From b0ea52690ba56a0d0602ad8674b7e5ab2ba3e778 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 8 Jan 2012 17:39:03 +0000 Subject: Initial diff --git a/Changelog.txt b/Changelog.txt new file mode 100644 index 0000000..5b06236 --- /dev/null +++ b/Changelog.txt @@ -0,0 +1,19 @@ + - Special brush types + - Special brush delete + - LOVE + - LOLZ + - Property edit + - Saving, loading, thumbnailing, etc + - HEAT/COOL + - Streamlines + - Grid + - Sign moving + - Electron fancyness with glass, fire_r-g-b now out of scope + - Grav fancyness, use current frame index to determine colour, not globals! + - Emp flash + - Stickman HP + + To do: + See TODO's + Char * and string, hmm.... + Vectors for things like signs, stamp list, etc where appropriate \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..65a9605 --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +HEADERS := $(wildcard includes/*.h) + +OLD_SOURCES := $(wildcard src/*.c) +OLD_OBJS := $(patsubst src/%.c,build/obj/%.o,$(OLD_SOURCES)) + +EL_SOURCES := $(wildcard elements/*.cpp) +EL_OBJS := $(patsubst elements/%.cpp,build/obj/elements/%.o,$(EL_SOURCES)) +EL_PREREQ := $(patsubst build/obj/elements/%.o,build/obj/elements/%.powder.exe.o,$(EL_OBJS)) + +CORE_SOURCES := $(wildcard src/*.cpp) +CORE_OBJS := $(patsubst src/%.cpp,build/obj/core/%.o,$(CORE_SOURCES)) +CORE_PREREQ := $(patsubst build/obj/core/%.o,build/obj/core/%.powder.exe.o,$(CORE_OBJS)) + +UI_SOURCES := $(wildcard src/interface/*.cpp) +UI_OBJS := $(patsubst src/interface/%.cpp,build/obj/ui/%.o,$(UI_SOURCES)) +UI_PREREQ := $(patsubst build/obj/ui/%.o,build/obj/ui/%.powder.exe.o,$(UI_OBJS)) + +CFLAGS := -Iincludes/ -Idata/ -DWIN32 +OFLAGS := -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -fkeep-inline-functions +LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 # -mwindows + +CFLAGS += $(OFLAGS) + +CPPC := g++ +CPPC_WIN := i686-w64-mingw32-gcc +WIN_RES := i686-w64-mingw32-windres + +build/powder.exe: $(EL_PREREQ) $(CORE_PREREQ) $(UI_PREREQ) + $(CPPC) $(CFLAGS) $(LDFLAGS) $(EXTRA_OBJS) $(EL_PREREQ) $(CORE_PREREQ) $(UI_PREREQ) $(LFLAGS) -o $@ -ggdb +build/obj/ui/%.powder.exe.o: src/interface/%.cpp $(HEADERS) + $(CPPC) -c $(CFLAGS) -o $@ $< -ggdb +build/obj/elements/%.powder.exe.o: elements/%.cpp $(HEADERS) + $(CPPC) -c $(CFLAGS) -o $@ $< -ggdb +build/obj/core/%.powder.exe.o: src/%.cpp $(HEADERS) + $(CPPC) -c $(CFLAGS) -o $@ $< -ggdb + +clean: + rm build/obj/core/*.o + rm build/obj/ui/*.o + rm build/obj/elements/*.o + rm build/obj/*.o + rm build/*.exe \ No newline at end of file diff --git a/build/obj/core/.empty b/build/obj/core/.empty new file mode 100644 index 0000000..e69de29 diff --git a/build/obj/core/Air.powder.exe.o b/build/obj/core/Air.powder.exe.o new file mode 100644 index 0000000..45cc899 Binary files /dev/null and b/build/obj/core/Air.powder.exe.o differ diff --git a/build/obj/core/Graphics.powder.exe.o b/build/obj/core/Graphics.powder.exe.o new file mode 100644 index 0000000..eb6dcd3 Binary files /dev/null and b/build/obj/core/Graphics.powder.exe.o differ diff --git a/build/obj/core/Gravity.powder.exe.o b/build/obj/core/Gravity.powder.exe.o new file mode 100644 index 0000000..00d22eb Binary files /dev/null and b/build/obj/core/Gravity.powder.exe.o differ diff --git a/build/obj/core/Misc.powder.exe.o b/build/obj/core/Misc.powder.exe.o new file mode 100644 index 0000000..2eac711 Binary files /dev/null and b/build/obj/core/Misc.powder.exe.o differ diff --git a/build/obj/core/PowderToy.powder.exe.o b/build/obj/core/PowderToy.powder.exe.o new file mode 100644 index 0000000..8bf89c1 Binary files /dev/null and b/build/obj/core/PowderToy.powder.exe.o differ diff --git a/build/obj/core/Renderer.powder.exe.o b/build/obj/core/Renderer.powder.exe.o new file mode 100644 index 0000000..c0af1b2 Binary files /dev/null and b/build/obj/core/Renderer.powder.exe.o differ diff --git a/build/obj/core/Simulation.powder.exe.o b/build/obj/core/Simulation.powder.exe.o new file mode 100644 index 0000000..91d1729 Binary files /dev/null and b/build/obj/core/Simulation.powder.exe.o differ diff --git a/build/obj/elements/.empty b/build/obj/elements/.empty new file mode 100644 index 0000000..e69de29 diff --git a/build/obj/elements/O2.powder.exe.o b/build/obj/elements/O2.powder.exe.o new file mode 100644 index 0000000..8b898ce Binary files /dev/null and b/build/obj/elements/O2.powder.exe.o differ diff --git a/build/obj/elements/acel.powder.exe.o b/build/obj/elements/acel.powder.exe.o new file mode 100644 index 0000000..fe67a50 Binary files /dev/null and b/build/obj/elements/acel.powder.exe.o differ diff --git a/build/obj/elements/acid.powder.exe.o b/build/obj/elements/acid.powder.exe.o new file mode 100644 index 0000000..64f5ba6 Binary files /dev/null and b/build/obj/elements/acid.powder.exe.o differ diff --git a/build/obj/elements/amtr.powder.exe.o b/build/obj/elements/amtr.powder.exe.o new file mode 100644 index 0000000..c39bbd2 Binary files /dev/null and b/build/obj/elements/amtr.powder.exe.o differ diff --git a/build/obj/elements/anar.powder.exe.o b/build/obj/elements/anar.powder.exe.o new file mode 100644 index 0000000..c74d1f4 Binary files /dev/null and b/build/obj/elements/anar.powder.exe.o differ diff --git a/build/obj/elements/aray.powder.exe.o b/build/obj/elements/aray.powder.exe.o new file mode 100644 index 0000000..4ef850e Binary files /dev/null and b/build/obj/elements/aray.powder.exe.o differ diff --git a/build/obj/elements/bang.powder.exe.o b/build/obj/elements/bang.powder.exe.o new file mode 100644 index 0000000..fd2febe Binary files /dev/null and b/build/obj/elements/bang.powder.exe.o differ diff --git a/build/obj/elements/bcln.powder.exe.o b/build/obj/elements/bcln.powder.exe.o new file mode 100644 index 0000000..428e241 Binary files /dev/null and b/build/obj/elements/bcln.powder.exe.o differ diff --git a/build/obj/elements/bcol.powder.exe.o b/build/obj/elements/bcol.powder.exe.o new file mode 100644 index 0000000..0555394 Binary files /dev/null and b/build/obj/elements/bcol.powder.exe.o differ diff --git a/build/obj/elements/bizr.powder.exe.o b/build/obj/elements/bizr.powder.exe.o new file mode 100644 index 0000000..0be86ad Binary files /dev/null and b/build/obj/elements/bizr.powder.exe.o differ diff --git a/build/obj/elements/bmtl.powder.exe.o b/build/obj/elements/bmtl.powder.exe.o new file mode 100644 index 0000000..ab1031f Binary files /dev/null and b/build/obj/elements/bmtl.powder.exe.o differ diff --git a/build/obj/elements/bomb.powder.exe.o b/build/obj/elements/bomb.powder.exe.o new file mode 100644 index 0000000..0cbfcee Binary files /dev/null and b/build/obj/elements/bomb.powder.exe.o differ diff --git a/build/obj/elements/boyl.powder.exe.o b/build/obj/elements/boyl.powder.exe.o new file mode 100644 index 0000000..68d06cc Binary files /dev/null and b/build/obj/elements/boyl.powder.exe.o differ diff --git a/build/obj/elements/brmt.powder.exe.o b/build/obj/elements/brmt.powder.exe.o new file mode 100644 index 0000000..69e2e72 Binary files /dev/null and b/build/obj/elements/brmt.powder.exe.o differ diff --git a/build/obj/elements/btry.powder.exe.o b/build/obj/elements/btry.powder.exe.o new file mode 100644 index 0000000..abca955 Binary files /dev/null and b/build/obj/elements/btry.powder.exe.o differ diff --git a/build/obj/elements/c5.powder.exe.o b/build/obj/elements/c5.powder.exe.o new file mode 100644 index 0000000..8a98c7b Binary files /dev/null and b/build/obj/elements/c5.powder.exe.o differ diff --git a/build/obj/elements/caus.powder.exe.o b/build/obj/elements/caus.powder.exe.o new file mode 100644 index 0000000..672ec2d Binary files /dev/null and b/build/obj/elements/caus.powder.exe.o differ diff --git a/build/obj/elements/cbnw.powder.exe.o b/build/obj/elements/cbnw.powder.exe.o new file mode 100644 index 0000000..7b2e0be Binary files /dev/null and b/build/obj/elements/cbnw.powder.exe.o differ diff --git a/build/obj/elements/clne.powder.exe.o b/build/obj/elements/clne.powder.exe.o new file mode 100644 index 0000000..9a05ad2 Binary files /dev/null and b/build/obj/elements/clne.powder.exe.o differ diff --git a/build/obj/elements/clst.powder.exe.o b/build/obj/elements/clst.powder.exe.o new file mode 100644 index 0000000..d815446 Binary files /dev/null and b/build/obj/elements/clst.powder.exe.o differ diff --git a/build/obj/elements/co2.powder.exe.o b/build/obj/elements/co2.powder.exe.o new file mode 100644 index 0000000..dfffcbc Binary files /dev/null and b/build/obj/elements/co2.powder.exe.o differ diff --git a/build/obj/elements/coal.powder.exe.o b/build/obj/elements/coal.powder.exe.o new file mode 100644 index 0000000..eedd71e Binary files /dev/null and b/build/obj/elements/coal.powder.exe.o differ diff --git a/build/obj/elements/conv.powder.exe.o b/build/obj/elements/conv.powder.exe.o new file mode 100644 index 0000000..41e02a4 Binary files /dev/null and b/build/obj/elements/conv.powder.exe.o differ diff --git a/build/obj/elements/dest.powder.exe.o b/build/obj/elements/dest.powder.exe.o new file mode 100644 index 0000000..36c5af9 Binary files /dev/null and b/build/obj/elements/dest.powder.exe.o differ diff --git a/build/obj/elements/deut.powder.exe.o b/build/obj/elements/deut.powder.exe.o new file mode 100644 index 0000000..a87fe12 Binary files /dev/null and b/build/obj/elements/deut.powder.exe.o differ diff --git a/build/obj/elements/dlay.powder.exe.o b/build/obj/elements/dlay.powder.exe.o new file mode 100644 index 0000000..4b82d63 Binary files /dev/null and b/build/obj/elements/dlay.powder.exe.o differ diff --git a/build/obj/elements/dstw.powder.exe.o b/build/obj/elements/dstw.powder.exe.o new file mode 100644 index 0000000..f095dfd Binary files /dev/null and b/build/obj/elements/dstw.powder.exe.o differ diff --git a/build/obj/elements/elec.powder.exe.o b/build/obj/elements/elec.powder.exe.o new file mode 100644 index 0000000..bb1b175 Binary files /dev/null and b/build/obj/elements/elec.powder.exe.o differ diff --git a/build/obj/elements/elementmisc.powder.exe.o b/build/obj/elements/elementmisc.powder.exe.o new file mode 100644 index 0000000..00ccf05 Binary files /dev/null and b/build/obj/elements/elementmisc.powder.exe.o differ diff --git a/build/obj/elements/emp.powder.exe.o b/build/obj/elements/emp.powder.exe.o new file mode 100644 index 0000000..4b05c3d Binary files /dev/null and b/build/obj/elements/emp.powder.exe.o differ diff --git a/build/obj/elements/figh.powder.exe.o b/build/obj/elements/figh.powder.exe.o new file mode 100644 index 0000000..2791d30 Binary files /dev/null and b/build/obj/elements/figh.powder.exe.o differ diff --git a/build/obj/elements/fire.powder.exe.o b/build/obj/elements/fire.powder.exe.o new file mode 100644 index 0000000..61fa33a Binary files /dev/null and b/build/obj/elements/fire.powder.exe.o differ diff --git a/build/obj/elements/firw.powder.exe.o b/build/obj/elements/firw.powder.exe.o new file mode 100644 index 0000000..49952c1 Binary files /dev/null and b/build/obj/elements/firw.powder.exe.o differ diff --git a/build/obj/elements/fog.powder.exe.o b/build/obj/elements/fog.powder.exe.o new file mode 100644 index 0000000..28a55ae Binary files /dev/null and b/build/obj/elements/fog.powder.exe.o differ diff --git a/build/obj/elements/frzw.powder.exe.o b/build/obj/elements/frzw.powder.exe.o new file mode 100644 index 0000000..5ef27b8 Binary files /dev/null and b/build/obj/elements/frzw.powder.exe.o differ diff --git a/build/obj/elements/frzz.powder.exe.o b/build/obj/elements/frzz.powder.exe.o new file mode 100644 index 0000000..f02b65e Binary files /dev/null and b/build/obj/elements/frzz.powder.exe.o differ diff --git a/build/obj/elements/fsep.powder.exe.o b/build/obj/elements/fsep.powder.exe.o new file mode 100644 index 0000000..a00227a Binary files /dev/null and b/build/obj/elements/fsep.powder.exe.o differ diff --git a/build/obj/elements/fuse.powder.exe.o b/build/obj/elements/fuse.powder.exe.o new file mode 100644 index 0000000..c2f2ca7 Binary files /dev/null and b/build/obj/elements/fuse.powder.exe.o differ diff --git a/build/obj/elements/fwrk.powder.exe.o b/build/obj/elements/fwrk.powder.exe.o new file mode 100644 index 0000000..06b974d Binary files /dev/null and b/build/obj/elements/fwrk.powder.exe.o differ diff --git a/build/obj/elements/gbmb.powder.exe.o b/build/obj/elements/gbmb.powder.exe.o new file mode 100644 index 0000000..de55e3e Binary files /dev/null and b/build/obj/elements/gbmb.powder.exe.o differ diff --git a/build/obj/elements/glas.powder.exe.o b/build/obj/elements/glas.powder.exe.o new file mode 100644 index 0000000..c272d35 Binary files /dev/null and b/build/obj/elements/glas.powder.exe.o differ diff --git a/build/obj/elements/glow.powder.exe.o b/build/obj/elements/glow.powder.exe.o new file mode 100644 index 0000000..e1155f5 Binary files /dev/null and b/build/obj/elements/glow.powder.exe.o differ diff --git a/build/obj/elements/goo.powder.exe.o b/build/obj/elements/goo.powder.exe.o new file mode 100644 index 0000000..7f88f27 Binary files /dev/null and b/build/obj/elements/goo.powder.exe.o differ diff --git a/build/obj/elements/gpmp.powder.exe.o b/build/obj/elements/gpmp.powder.exe.o new file mode 100644 index 0000000..2dff2b2 Binary files /dev/null and b/build/obj/elements/gpmp.powder.exe.o differ diff --git a/build/obj/elements/graphics_default.powder.exe.o b/build/obj/elements/graphics_default.powder.exe.o new file mode 100644 index 0000000..7137bfd Binary files /dev/null and b/build/obj/elements/graphics_default.powder.exe.o differ diff --git a/build/obj/elements/h2.powder.exe.o b/build/obj/elements/h2.powder.exe.o new file mode 100644 index 0000000..5d277a0 Binary files /dev/null and b/build/obj/elements/h2.powder.exe.o differ diff --git a/build/obj/elements/hswc.powder.exe.o b/build/obj/elements/hswc.powder.exe.o new file mode 100644 index 0000000..b5d9ef9 Binary files /dev/null and b/build/obj/elements/hswc.powder.exe.o differ diff --git a/build/obj/elements/ice.powder.exe.o b/build/obj/elements/ice.powder.exe.o new file mode 100644 index 0000000..5802d05 Binary files /dev/null and b/build/obj/elements/ice.powder.exe.o differ diff --git a/build/obj/elements/ignt.powder.exe.o b/build/obj/elements/ignt.powder.exe.o new file mode 100644 index 0000000..fcf3e55 Binary files /dev/null and b/build/obj/elements/ignt.powder.exe.o differ diff --git a/build/obj/elements/iron.powder.exe.o b/build/obj/elements/iron.powder.exe.o new file mode 100644 index 0000000..37654eb Binary files /dev/null and b/build/obj/elements/iron.powder.exe.o differ diff --git a/build/obj/elements/isz.powder.exe.o b/build/obj/elements/isz.powder.exe.o new file mode 100644 index 0000000..2a2817f Binary files /dev/null and b/build/obj/elements/isz.powder.exe.o differ diff --git a/build/obj/elements/lava.powder.exe.o b/build/obj/elements/lava.powder.exe.o new file mode 100644 index 0000000..cfd929a Binary files /dev/null and b/build/obj/elements/lava.powder.exe.o differ diff --git a/build/obj/elements/lcry.powder.exe.o b/build/obj/elements/lcry.powder.exe.o new file mode 100644 index 0000000..c052782 Binary files /dev/null and b/build/obj/elements/lcry.powder.exe.o differ diff --git a/build/obj/elements/legacy.powder.exe.o b/build/obj/elements/legacy.powder.exe.o new file mode 100644 index 0000000..1ceb9e9 Binary files /dev/null and b/build/obj/elements/legacy.powder.exe.o differ diff --git a/build/obj/elements/ligh.powder.exe.o b/build/obj/elements/ligh.powder.exe.o new file mode 100644 index 0000000..0be626d Binary files /dev/null and b/build/obj/elements/ligh.powder.exe.o differ diff --git a/build/obj/elements/merc.powder.exe.o b/build/obj/elements/merc.powder.exe.o new file mode 100644 index 0000000..424df1a Binary files /dev/null and b/build/obj/elements/merc.powder.exe.o differ diff --git a/build/obj/elements/mort.powder.exe.o b/build/obj/elements/mort.powder.exe.o new file mode 100644 index 0000000..e59cb7d Binary files /dev/null and b/build/obj/elements/mort.powder.exe.o differ diff --git a/build/obj/elements/nbhl.powder.exe.o b/build/obj/elements/nbhl.powder.exe.o new file mode 100644 index 0000000..a26a886 Binary files /dev/null and b/build/obj/elements/nbhl.powder.exe.o differ diff --git a/build/obj/elements/neut.powder.exe.o b/build/obj/elements/neut.powder.exe.o new file mode 100644 index 0000000..c57bc49 Binary files /dev/null and b/build/obj/elements/neut.powder.exe.o differ diff --git a/build/obj/elements/newgraphics.powder.exe.o b/build/obj/elements/newgraphics.powder.exe.o new file mode 100644 index 0000000..323ce79 Binary files /dev/null and b/build/obj/elements/newgraphics.powder.exe.o differ diff --git a/build/obj/elements/none.powder.exe.o b/build/obj/elements/none.powder.exe.o new file mode 100644 index 0000000..532e45c Binary files /dev/null and b/build/obj/elements/none.powder.exe.o differ diff --git a/build/obj/elements/nptct.powder.exe.o b/build/obj/elements/nptct.powder.exe.o new file mode 100644 index 0000000..59f7364 Binary files /dev/null and b/build/obj/elements/nptct.powder.exe.o differ diff --git a/build/obj/elements/nwhl.powder.exe.o b/build/obj/elements/nwhl.powder.exe.o new file mode 100644 index 0000000..52b8ba6 Binary files /dev/null and b/build/obj/elements/nwhl.powder.exe.o differ diff --git a/build/obj/elements/pbcn.powder.exe.o b/build/obj/elements/pbcn.powder.exe.o new file mode 100644 index 0000000..8c4ed04 Binary files /dev/null and b/build/obj/elements/pbcn.powder.exe.o differ diff --git a/build/obj/elements/pcln.powder.exe.o b/build/obj/elements/pcln.powder.exe.o new file mode 100644 index 0000000..2c249b2 Binary files /dev/null and b/build/obj/elements/pcln.powder.exe.o differ diff --git a/build/obj/elements/phot.powder.exe.o b/build/obj/elements/phot.powder.exe.o new file mode 100644 index 0000000..c351d15 Binary files /dev/null and b/build/obj/elements/phot.powder.exe.o differ diff --git a/build/obj/elements/pipe.powder.exe.o b/build/obj/elements/pipe.powder.exe.o new file mode 100644 index 0000000..ab908dd Binary files /dev/null and b/build/obj/elements/pipe.powder.exe.o differ diff --git a/build/obj/elements/plnt.powder.exe.o b/build/obj/elements/plnt.powder.exe.o new file mode 100644 index 0000000..6f4e94a Binary files /dev/null and b/build/obj/elements/plnt.powder.exe.o differ diff --git a/build/obj/elements/plsm.powder.exe.o b/build/obj/elements/plsm.powder.exe.o new file mode 100644 index 0000000..0c6065b Binary files /dev/null and b/build/obj/elements/plsm.powder.exe.o differ diff --git a/build/obj/elements/plut.powder.exe.o b/build/obj/elements/plut.powder.exe.o new file mode 100644 index 0000000..af9e9a1 Binary files /dev/null and b/build/obj/elements/plut.powder.exe.o differ diff --git a/build/obj/elements/prti.powder.exe.o b/build/obj/elements/prti.powder.exe.o new file mode 100644 index 0000000..5c915f9 Binary files /dev/null and b/build/obj/elements/prti.powder.exe.o differ diff --git a/build/obj/elements/prto.powder.exe.o b/build/obj/elements/prto.powder.exe.o new file mode 100644 index 0000000..ff3e595 Binary files /dev/null and b/build/obj/elements/prto.powder.exe.o differ diff --git a/build/obj/elements/pump.powder.exe.o b/build/obj/elements/pump.powder.exe.o new file mode 100644 index 0000000..3399a80 Binary files /dev/null and b/build/obj/elements/pump.powder.exe.o differ diff --git a/build/obj/elements/pvod.powder.exe.o b/build/obj/elements/pvod.powder.exe.o new file mode 100644 index 0000000..24c9f8c Binary files /dev/null and b/build/obj/elements/pvod.powder.exe.o differ diff --git a/build/obj/elements/pyro.powder.exe.o b/build/obj/elements/pyro.powder.exe.o new file mode 100644 index 0000000..d685a7a Binary files /dev/null and b/build/obj/elements/pyro.powder.exe.o differ diff --git a/build/obj/elements/qrtz.powder.exe.o b/build/obj/elements/qrtz.powder.exe.o new file mode 100644 index 0000000..013439c Binary files /dev/null and b/build/obj/elements/qrtz.powder.exe.o differ diff --git a/build/obj/elements/rime.powder.exe.o b/build/obj/elements/rime.powder.exe.o new file mode 100644 index 0000000..0419eb1 Binary files /dev/null and b/build/obj/elements/rime.powder.exe.o differ diff --git a/build/obj/elements/shld.powder.exe.o b/build/obj/elements/shld.powder.exe.o new file mode 100644 index 0000000..d8a9d1e Binary files /dev/null and b/build/obj/elements/shld.powder.exe.o differ diff --git a/build/obj/elements/sing.powder.exe.o b/build/obj/elements/sing.powder.exe.o new file mode 100644 index 0000000..fa2b314 Binary files /dev/null and b/build/obj/elements/sing.powder.exe.o differ diff --git a/build/obj/elements/sltw.powder.exe.o b/build/obj/elements/sltw.powder.exe.o new file mode 100644 index 0000000..8b26948 Binary files /dev/null and b/build/obj/elements/sltw.powder.exe.o differ diff --git a/build/obj/elements/smke.powder.exe.o b/build/obj/elements/smke.powder.exe.o new file mode 100644 index 0000000..4d0f886 Binary files /dev/null and b/build/obj/elements/smke.powder.exe.o differ diff --git a/build/obj/elements/soap.powder.exe.o b/build/obj/elements/soap.powder.exe.o new file mode 100644 index 0000000..6ebe797 Binary files /dev/null and b/build/obj/elements/soap.powder.exe.o differ diff --git a/build/obj/elements/spng.powder.exe.o b/build/obj/elements/spng.powder.exe.o new file mode 100644 index 0000000..88a9263 Binary files /dev/null and b/build/obj/elements/spng.powder.exe.o differ diff --git a/build/obj/elements/sprk.powder.exe.o b/build/obj/elements/sprk.powder.exe.o new file mode 100644 index 0000000..bbc39a6 Binary files /dev/null and b/build/obj/elements/sprk.powder.exe.o differ diff --git a/build/obj/elements/stkm.powder.exe.o b/build/obj/elements/stkm.powder.exe.o new file mode 100644 index 0000000..660ad89 Binary files /dev/null and b/build/obj/elements/stkm.powder.exe.o differ diff --git a/build/obj/elements/stkm2.powder.exe.o b/build/obj/elements/stkm2.powder.exe.o new file mode 100644 index 0000000..98701ba Binary files /dev/null and b/build/obj/elements/stkm2.powder.exe.o differ diff --git a/build/obj/elements/stor.powder.exe.o b/build/obj/elements/stor.powder.exe.o new file mode 100644 index 0000000..db5d620 Binary files /dev/null and b/build/obj/elements/stor.powder.exe.o differ diff --git a/build/obj/elements/swch.powder.exe.o b/build/obj/elements/swch.powder.exe.o new file mode 100644 index 0000000..d31ce3d Binary files /dev/null and b/build/obj/elements/swch.powder.exe.o differ diff --git a/build/obj/elements/thdr.powder.exe.o b/build/obj/elements/thdr.powder.exe.o new file mode 100644 index 0000000..964258b Binary files /dev/null and b/build/obj/elements/thdr.powder.exe.o differ diff --git a/build/obj/elements/thrm.powder.exe.o b/build/obj/elements/thrm.powder.exe.o new file mode 100644 index 0000000..a864a91 Binary files /dev/null and b/build/obj/elements/thrm.powder.exe.o differ diff --git a/build/obj/elements/uran.powder.exe.o b/build/obj/elements/uran.powder.exe.o new file mode 100644 index 0000000..d47932d Binary files /dev/null and b/build/obj/elements/uran.powder.exe.o differ diff --git a/build/obj/elements/vine.powder.exe.o b/build/obj/elements/vine.powder.exe.o new file mode 100644 index 0000000..c4d23fc Binary files /dev/null and b/build/obj/elements/vine.powder.exe.o differ diff --git a/build/obj/elements/warp.powder.exe.o b/build/obj/elements/warp.powder.exe.o new file mode 100644 index 0000000..ba61bcc Binary files /dev/null and b/build/obj/elements/warp.powder.exe.o differ diff --git a/build/obj/elements/watr.powder.exe.o b/build/obj/elements/watr.powder.exe.o new file mode 100644 index 0000000..e255680 Binary files /dev/null and b/build/obj/elements/watr.powder.exe.o differ diff --git a/build/obj/elements/wifi.powder.exe.o b/build/obj/elements/wifi.powder.exe.o new file mode 100644 index 0000000..6f2cc7a Binary files /dev/null and b/build/obj/elements/wifi.powder.exe.o differ diff --git a/build/obj/elements/wire.powder.exe.o b/build/obj/elements/wire.powder.exe.o new file mode 100644 index 0000000..29051ec Binary files /dev/null and b/build/obj/elements/wire.powder.exe.o differ diff --git a/build/obj/elements/wtrv.powder.exe.o b/build/obj/elements/wtrv.powder.exe.o new file mode 100644 index 0000000..f1e7e08 Binary files /dev/null and b/build/obj/elements/wtrv.powder.exe.o differ diff --git a/build/obj/elements/yest.powder.exe.o b/build/obj/elements/yest.powder.exe.o new file mode 100644 index 0000000..399c2a3 Binary files /dev/null and b/build/obj/elements/yest.powder.exe.o differ diff --git a/build/obj/ui/.empty b/build/obj/ui/.empty new file mode 100644 index 0000000..e69de29 diff --git a/build/obj/ui/Button.powder.exe.o b/build/obj/ui/Button.powder.exe.o new file mode 100644 index 0000000..e0a85bb Binary files /dev/null and b/build/obj/ui/Button.powder.exe.o differ diff --git a/build/obj/ui/Component.powder.exe.o b/build/obj/ui/Component.powder.exe.o new file mode 100644 index 0000000..ea9e192 Binary files /dev/null and b/build/obj/ui/Component.powder.exe.o differ diff --git a/build/obj/ui/Panel.powder.exe.o b/build/obj/ui/Panel.powder.exe.o new file mode 100644 index 0000000..cec5084 Binary files /dev/null and b/build/obj/ui/Panel.powder.exe.o differ diff --git a/build/obj/ui/Sandbox.powder.exe.o b/build/obj/ui/Sandbox.powder.exe.o new file mode 100644 index 0000000..f50bd5d Binary files /dev/null and b/build/obj/ui/Sandbox.powder.exe.o differ diff --git a/build/obj/ui/State.powder.exe.o b/build/obj/ui/State.powder.exe.o new file mode 100644 index 0000000..4572157 Binary files /dev/null and b/build/obj/ui/State.powder.exe.o differ diff --git a/build/obj/ui/Window.powder.exe.o b/build/obj/ui/Window.powder.exe.o new file mode 100644 index 0000000..2daad32 Binary files /dev/null and b/build/obj/ui/Window.powder.exe.o differ diff --git a/build/powder.exe b/build/powder.exe new file mode 100644 index 0000000..d9e07ce Binary files /dev/null and b/build/powder.exe differ diff --git a/data/Shaders.h b/data/Shaders.h new file mode 100644 index 0000000..9eb125b --- /dev/null +++ b/data/Shaders.h @@ -0,0 +1,99 @@ +/* + * Shaders.h + * + * Created on: Jan 7, 2012 + * Author: Simon + */ + +#ifndef SHADERS_H_ +#define SHADERS_H_ + +const char * fireFragment = "#version 120\n\ +uniform sampler2D fireAlpha;\ +void main () {\ + vec4 texColor = texture2D(fireAlpha, gl_PointCoord);\ + gl_FragColor = vec4(gl_Color.rgb, texColor.a*gl_Color.a);\ +}"; +const char * fireVertex = "#version 120\n\ +void main(void)\ +{\ + gl_Position = ftransform();;\ + gl_FrontColor = gl_Color;\ +}"; +const char * lensFragment = "#version 120\n\ +uniform sampler2D pTex;\ +uniform sampler2D tfX;\ +uniform sampler2D tfY;\ +uniform float xres;\ +uniform float yres;\ +void main () {\ + vec4 transformX = texture2D(tfX, vec2(gl_TexCoord[0].s, -gl_TexCoord[0].t));\ + vec4 transformY = -texture2D(tfY, vec2(gl_TexCoord[0].s, -gl_TexCoord[0].t));\ + transformX.r /= xres;\ + transformY.g /= yres;\ + vec4 texColor = vec4(\ + texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r*0.75, transformY.g*0.75)).r,\ + texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r*0.875, transformY.g*0.875)).g,\ + texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r, transformY.g)).b,\ + 1.0\ + );\ + gl_FragColor = texColor;\ +}"; +const char * lensVertex = "#version 120\n\ +void main(void)\ +{\ + gl_TexCoord[0] = gl_MultiTexCoord0;\ + gl_Position = ftransform();;\ + gl_FrontColor = gl_Color;\ +}"; +const char * airVFragment = "#version 120\n\ +uniform sampler2D airX;\ +uniform sampler2D airY;\ +uniform sampler2D airP;\ +void main () {\ + vec4 texX = texture2D(airX, gl_TexCoord[0].st);\ + vec4 texY = texture2D(airY, gl_TexCoord[0].st);\ + vec4 texP = texture2D(airP, gl_TexCoord[0].st);\ + gl_FragColor = vec4(abs(texX.r)/2.0, texP.b/2.0, abs(texY.g)/2.0, 1.0);\ +}"; +const char * airVVertex = "#version 120\n\ +void main(void)\ +{\ + gl_TexCoord[0] = gl_MultiTexCoord0;\ + gl_Position = ftransform();;\ + gl_FrontColor = gl_Color;\ +}"; +const char * airPFragment = "#version 120\n\ +uniform sampler2D airX;\ +uniform sampler2D airY;\ +uniform sampler2D airP;\ +void main () {\ + vec4 texP = texture2D(airP, gl_TexCoord[0].st);\ + gl_FragColor = vec4(max(texP.b/2.0, 0), 0, abs(min(texP.b/2.0, 0)), 1.0);\ +}"; +const char * airPVertex = "#version 120\n\ +void main(void)\ +{\ + gl_TexCoord[0] = gl_MultiTexCoord0;\ + gl_Position = ftransform();;\ + gl_FrontColor = gl_Color;\ +}"; +const char * airCFragment = "#version 120\n\ +uniform sampler2D airX;\ +uniform sampler2D airY;\ +uniform sampler2D airP;\ +void main () {\ + vec4 texX = texture2D(airX, gl_TexCoord[0].st);\ + vec4 texY = texture2D(airY, gl_TexCoord[0].st);\ + vec4 texP = texture2D(airP, gl_TexCoord[0].st);\ + gl_FragColor = vec4(max(texP.b/2.0, 0), 0, abs(min(texP.b/2.0, 0)), 1.0) + vec4(abs(texX.r)/8.0, abs(texX.r)/8.0, abs(texX.r)/8.0, 1.0) + vec4(abs(texY.g)/8.0, abs(texY.g)/8.0, abs(texY.g)/8.0, 1.0);\ +}"; +const char * airCVertex = "#version 120\n\ +void main(void)\ +{\ + gl_TexCoord[0] = gl_MultiTexCoord0;\ + gl_Position = ftransform();;\ + gl_FrontColor = gl_Color;\ +}"; + +#endif /* SHADERS_H_ */ diff --git a/data/font.h b/data/font.h new file mode 100644 index 0000000..5e2be5b --- /dev/null +++ b/data/font.h @@ -0,0 +1,298 @@ +#ifndef FONT_H_CHECK +#define FONT_H_CHECK +#define FONT_H 10 +#ifdef INCLUDE_FONTDATA +char font_data[] = { + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0xC7, 0x31, 0x0C, 0x02, 0x70, 0x04, 0x00, 0x00, + 0x05, 0xCC, 0x74, 0x23, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x80, 0x19, 0xCC, 0xE0, 0x3F, 0xCC, 0xF0, 0x2F, 0xCC, 0x90, 0x09, 0x00, 0x00, 0x00, + 0x06, 0x30, 0xD0, 0x3F, 0x33, 0xE1, 0x07, 0xF4, 0x12, 0x33, 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x07, 0x2D, 0xCE, 0xCC, 0xE1, 0x1D, 0xC0, 0x03, 0x74, 0x4B, 0x33, 0xB3, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x7D, 0x30, 0x0C, 0x13, 0xD0, 0x32, 0xB3, 0x33, 0x1C, 0x7D, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x4C, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x34, 0x1D, 0x07, 0x03, 0x07, 0x1D, 0x34, 0x00, 0x00, 0x00, + 0x04, 0x07, 0x1D, 0x34, 0x30, 0x34, 0x1D, 0x07, 0x00, 0x00, 0x00, + 0x06, 0x44, 0xD0, 0x1C, 0x64, 0xF0, 0x3F, 0x64, 0xD0, 0x1C, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x02, 0x30, 0xE0, 0x2F, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0D, 0x03, 0x00, + 0x05, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, + 0x06, 0x80, 0x02, 0x0C, 0xA0, 0x00, 0x03, 0x28, 0xC0, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xF8, 0xE0, 0x39, 0x07, 0x33, 0x32, 0x03, 0xB3, 0x38, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x30, 0xF0, 0x60, 0x03, 0x0C, 0x30, 0xC0, 0x40, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFC, 0xB1, 0x34, 0x41, 0x03, 0x0A, 0x2C, 0x70, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFC, 0x71, 0x34, 0x01, 0x03, 0x1E, 0x00, 0x33, 0x34, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xC0, 0x03, 0x37, 0x1C, 0x73, 0x34, 0xBF, 0x03, 0x30, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFF, 0x33, 0x00, 0x57, 0xE0, 0x2F, 0x00, 0x13, 0x30, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xF4, 0xD3, 0x00, 0x07, 0xF0, 0x1F, 0x03, 0x33, 0x34, 0xFD, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFF, 0x07, 0x34, 0x80, 0x03, 0x0E, 0x38, 0xD0, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFC, 0xB1, 0x34, 0x03, 0xD3, 0x1F, 0x03, 0x73, 0x34, 0xFD, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFC, 0xB1, 0x34, 0x03, 0xC3, 0x3F, 0x40, 0x23, 0x30, 0xFD, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x70, 0x04, 0x40, 0x70, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x1C, 0x04, 0x00, 0x0C, 0x0D, 0x03, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0xC0, 0xC3, 0x0B, 0x1B, 0xC0, 0x0B, 0xC0, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0F, 0x80, 0x0F, 0x90, 0x83, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFD, 0x71, 0x30, 0x81, 0x03, 0x0E, 0x34, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0xF8, 0x0F, 0x1D, 0x30, 0xE7, 0x37, 0x73, 0x1C, 0xE3, 0x2F, 0x07, 0x00, 0xFD, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x74, 0xD0, 0x1D, 0x47, 0x33, 0x30, 0xFF, 0x33, 0x30, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xBF, 0x30, 0x38, 0x43, 0xF3, 0x1F, 0x43, 0x33, 0x34, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xF4, 0xD1, 0x34, 0x03, 0x31, 0x00, 0x03, 0x70, 0x34, 0xFD, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x7F, 0x30, 0x1D, 0x43, 0x33, 0x30, 0x03, 0x33, 0x34, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFF, 0x32, 0x00, 0x03, 0xF0, 0x0B, 0x03, 0x30, 0x10, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFF, 0x33, 0x10, 0x03, 0xF0, 0x0B, 0x03, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xF4, 0xD1, 0x34, 0x03, 0x30, 0x3E, 0x03, 0x73, 0x34, 0xFD, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x47, 0x33, 0x30, 0x03, 0xF3, 0x3F, 0x03, 0x33, 0x30, 0x47, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x1D, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1D, 0x00, 0x00, 0x00, + 0x06, 0xD0, 0x01, 0x0C, 0xC0, 0x00, 0x0C, 0xC0, 0x10, 0x0D, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x47, 0xC3, 0x34, 0x70, 0x03, 0xBC, 0x00, 0xB3, 0xC0, 0xB0, 0x70, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x07, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x30, 0x10, 0xFF, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x03, 0x30, 0x1F, 0x3D, 0x7B, 0x3B, 0xE3, 0x32, 0x83, 0x30, 0x03, 0x30, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x07, 0xCD, 0x03, 0x73, 0xC3, 0x8C, 0x32, 0xC3, 0xCD, 0xC0, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0xF4, 0x41, 0xC7, 0x71, 0xD0, 0x0C, 0x30, 0x03, 0xCD, 0xD1, 0xD1, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x7F, 0x30, 0x1D, 0x43, 0x73, 0x34, 0xFF, 0x31, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0xF4, 0x41, 0xD3, 0x71, 0xD0, 0x0C, 0x30, 0xC3, 0xCD, 0xD1, 0xD1, 0xDF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFF, 0x31, 0x34, 0x03, 0xF3, 0x0F, 0xD7, 0x30, 0x34, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFC, 0xB1, 0x31, 0x07, 0xD0, 0x0F, 0x90, 0x23, 0x34, 0xFE, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x06, 0xFF, 0x13, 0x13, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x03, 0xCC, 0x00, 0x33, 0xC0, 0x0C, 0x30, 0x03, 0xCD, 0xD2, 0xD1, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x03, 0x33, 0x30, 0x03, 0xB3, 0x38, 0xCD, 0xC1, 0x0D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x03, 0x30, 0x43, 0x30, 0xC7, 0x34, 0xCD, 0x1C, 0xED, 0x1E, 0x2C, 0x0E, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x03, 0x4C, 0xC3, 0x81, 0x3B, 0xD0, 0x03, 0xDC, 0x42, 0xC3, 0x31, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x03, 0xB3, 0x38, 0xDC, 0x40, 0x07, 0x30, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0xFF, 0x0F, 0xD0, 0x02, 0x2C, 0xC0, 0x02, 0x2D, 0xC0, 0x06, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x2F, 0x03, 0x03, 0x03, 0x03, 0x03, 0x2F, 0x00, 0x00, 0x00, + 0x05, 0x03, 0x28, 0xC0, 0x00, 0x0A, 0x30, 0x80, 0x02, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x3E, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3E, 0x00, 0x00, 0x00, + 0x04, 0x1D, 0x37, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x83, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xD0, 0x47, 0x30, 0xFC, 0x0C, 0xD3, 0x1F, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x07, 0x0C, 0xF0, 0xC7, 0x35, 0xC3, 0x0C, 0xF3, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xD0, 0xC3, 0x25, 0x03, 0x4C, 0xD2, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x05, 0xD0, 0x00, 0x83, 0x8F, 0x33, 0xC3, 0x1C, 0xD3, 0x1F, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xD0, 0xC7, 0x30, 0xBF, 0x0C, 0xD0, 0x0B, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x3D, 0x07, 0x03, 0x2F, 0x03, 0x03, 0x07, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xC0, 0xCB, 0x32, 0xC3, 0xF4, 0x03, 0x4C, 0x30, 0x7E, 0x00, 0x00, + 0x05, 0x03, 0x0C, 0xF0, 0xC7, 0x39, 0xC3, 0x0C, 0x73, 0x1C, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x04, 0x1C, 0x00, 0x0D, 0x0C, 0x0C, 0x1D, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x30, 0x00, 0x34, 0x30, 0x30, 0x30, 0x30, 0x1E, 0x00, + 0x05, 0x03, 0x0C, 0x31, 0xCE, 0x0E, 0x1F, 0xCC, 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x47, 0x3D, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x9B, 0x71, 0x37, 0x33, 0x33, 0x32, 0x43, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xF0, 0xC7, 0x31, 0xC3, 0x0C, 0x33, 0x0D, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xD0, 0xC7, 0x31, 0xC3, 0x4C, 0xD3, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xF0, 0xC7, 0x31, 0xC3, 0x4C, 0xF3, 0xC7, 0x00, 0x03, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xD0, 0xDF, 0x31, 0xC3, 0x4C, 0xD3, 0x0F, 0x30, 0xC0, 0x00, 0x05, + 0x03, 0x00, 0x30, 0x7F, 0xC7, 0x30, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xC0, 0xC7, 0x10, 0x3C, 0x04, 0xF3, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x0C, 0x0C, 0x3F, 0x0C, 0x0C, 0x1C, 0x74, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x70, 0xDC, 0x30, 0xC3, 0x4C, 0xD3, 0x1F, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x30, 0xCC, 0x30, 0xD3, 0xDC, 0xC2, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x47, 0x33, 0x32, 0x33, 0x73, 0x37, 0xCD, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x30, 0xCD, 0x32, 0x7D, 0x8C, 0x73, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x30, 0xCC, 0x30, 0xC7, 0x74, 0x43, 0x07, 0x0C, 0x1F, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xF0, 0x4F, 0x2C, 0x2C, 0x2C, 0xF1, 0x0F, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x38, 0x0C, 0x0C, 0x03, 0x0C, 0x0C, 0x38, 0x00, 0x00, 0x00, + 0x02, 0x32, 0x33, 0x33, 0x13, 0x00, + 0x04, 0x0B, 0x0C, 0x0C, 0x30, 0x0C, 0x0C, 0x0B, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x1D, 0x72, 0x37, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x07, 0x00, 0x1F, 0x00, 0x7F, 0x00, 0xFF, 0x01, 0xFF, 0x07, 0xFF, 0x1F, 0xFF, 0x7F, 0xFF, 0x1B, 0xBF, 0x01, 0x1B, 0x00, + 0x0C, 0x00, 0x40, 0xFF, 0x00, 0x00, 0xF8, 0xF0, 0x3F, 0xEE, 0x2C, 0x30, 0xCB, 0x0B, 0x30, 0x42, 0xC3, 0x33, 0x00, 0x03, 0x30, 0x00, 0xF3, 0x33, 0x00, 0x03, 0x30, 0x00, 0xFF, 0x3F, 0x00, + 0x0C, 0xC2, 0x00, 0x00, 0xCB, 0x00, 0x00, 0xEE, 0xC0, 0xFF, 0xF8, 0xB0, 0xC0, 0xFF, 0x2C, 0xC0, 0x00, 0x0C, 0xCF, 0x00, 0x0C, 0xC0, 0x00, 0xCC, 0xCF, 0x00, 0x0C, 0xC0, 0x00, 0xFC, 0xFF, + 0x0A, 0x00, 0x00, 0x0D, 0x00, 0x70, 0x00, 0x00, 0xF3, 0xFF, 0xD3, 0x03, 0xE0, 0x3C, 0x3F, 0x38, 0x03, 0xD0, 0x33, 0xFF, 0x38, 0x03, 0xE0, 0xF0, 0xFF, 0x03, + 0x0C, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x8B, 0xF7, 0x0C, 0x13, 0x9F, 0x3B, 0x37, 0x00, 0xC0, 0x23, 0xFF, 0xFF, 0x8B, 0x03, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0xD0, 0x7F, 0x80, 0x03, 0x2C, 0x0D, 0x00, 0x37, 0x00, 0xC0, 0xF3, 0xFF, 0x3C, 0xFF, 0xCF, 0x03, 0x00, 0xDC, 0x00, 0x70, 0x38, 0xC0, 0x02, 0xFD, 0x07, + 0x0A, 0x00, 0x00, 0x00, 0xFC, 0x03, 0xF0, 0xFF, 0xC0, 0xFF, 0x3F, 0xFC, 0xFF, 0xC3, 0xFF, 0x3F, 0xFC, 0xFF, 0x03, 0xFF, 0x0F, 0xC0, 0x3F, 0x00, 0x00, 0x00, + 0x0A, 0xFF, 0xFF, 0x3F, 0x00, 0xC0, 0x03, 0x00, 0x3C, 0xF0, 0xC0, 0xC3, 0x3A, 0x3C, 0x0B, 0xCE, 0x2B, 0x80, 0x7E, 0x00, 0xD0, 0x03, 0x00, 0xFC, 0xFF, 0xFF, + 0x0A, 0x00, 0x00, 0xC0, 0xFF, 0x3F, 0xFC, 0xFF, 0xC3, 0xFF, 0x3F, 0xFC, 0xFF, 0xC3, 0xFF, 0x3F, 0xFC, 0xFF, 0xC3, 0xFF, 0x3F, 0xFC, 0xFF, 0x03, 0x00, 0x00, + 0x0A, 0xD0, 0x7F, 0x80, 0x03, 0x2C, 0x0D, 0x0F, 0x37, 0xF0, 0xC0, 0xF3, 0xFF, 0x3C, 0xFF, 0xCF, 0x03, 0x0F, 0xDC, 0xF0, 0x70, 0x38, 0xC0, 0x02, 0xFD, 0x07, + 0x0A, 0x40, 0x1F, 0x00, 0xAD, 0x07, 0xB0, 0xC5, 0x00, 0x17, 0x0C, 0x70, 0xD0, 0x00, 0x0C, 0x03, 0xBC, 0xEF, 0xB3, 0x11, 0xE0, 0x07, 0x05, 0x3C, 0x52, 0xC8, + 0x0A, 0x00, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x3F, 0x00, 0xFC, 0x03, 0xC0, 0x3F, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0xFF, 0x3F, 0xFC, 0xFF, 0xC3, 0xFF, 0x3F, + 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0xFC, 0xFF, 0x0F, 0xFC, 0xFF, 0x3F, 0xFC, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0xB8, 0xE0, 0x2F, 0xFF, 0xE3, 0x2F, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0xD0, 0x7F, 0x80, 0xFF, 0x2F, 0xFD, 0xFF, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0x7F, 0xF8, 0xFF, 0x02, 0xFD, 0x07, + 0x0A, 0x40, 0x01, 0x00, 0x02, 0x00, 0xC8, 0x07, 0x10, 0xC3, 0x00, 0x31, 0x0D, 0x00, 0xFD, 0x01, 0x00, 0x74, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0xF0, 0xF0, 0x00, 0x0F, 0x0F, 0xF0, 0xF0, 0x00, 0x0F, 0x0F, 0xF0, 0xF0, 0x00, 0x0F, 0x0F, 0xF0, 0xF0, 0x00, 0x00, 0x00, + 0x0A, 0x40, 0x05, 0x80, 0xFF, 0x8B, 0x1E, 0xD0, 0x2E, 0x00, 0xF0, 0x00, 0xE0, 0xFF, 0x0B, 0x00, 0x0F, 0x00, 0xB8, 0x03, 0xB0, 0xE2, 0xFF, 0x02, 0x50, 0x01, + 0x08, 0xFF, 0x07, 0x03, 0x1E, 0x03, 0x73, 0x03, 0xEF, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0xFF, 0xFF, + 0x0B, 0x00, 0x00, 0x00, 0xE4, 0x2F, 0xE0, 0x1B, 0x0C, 0x1D, 0x00, 0xFF, 0x03, 0xBE, 0xF0, 0xC1, 0x01, 0xAD, 0x34, 0xC0, 0x36, 0x0B, 0x30, 0xDC, 0xE4, 0x07, 0xFD, 0x1B, 0x00, + 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0x02, 0xA0, 0xAA, 0x00, 0xA8, 0xC2, 0x0F, 0x2A, 0xFF, 0x03, 0xCA, 0x3F, 0x80, 0xFC, 0x0F, 0x20, 0x0F, 0x00, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0xC0, 0x01, 0x00, 0xC0, 0x07, 0xAA, 0xEA, 0x1F, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xAA, 0xEA, 0x1F, 0x00, 0xC0, 0x07, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, + 0x0C, 0x40, 0x03, 0x00, 0xD0, 0x03, 0x00, 0xF4, 0xAB, 0xAA, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xF4, 0xAB, 0xAA, 0xD0, 0x03, 0x00, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x09, 0xFE, 0xFF, 0xE3, 0xFF, 0x0F, 0xAA, 0x3E, 0x0A, 0xF8, 0x2E, 0xE0, 0xBF, 0x80, 0xFF, 0xAA, 0xFE, 0xFF, 0xE2, 0xFF, 0x02, 0x02, 0x00, 0x00, + 0x09, 0x00, 0x80, 0x04, 0xD0, 0xE2, 0xFF, 0x02, 0x00, 0x00, 0xFF, 0x6F, 0x00, 0x40, 0xE6, 0xAF, 0x50, 0x00, 0x09, 0x00, 0x20, 0x00, 0x64, 0x00, + 0x09, 0xE0, 0x3F, 0x70, 0x60, 0x63, 0xC0, 0xE4, 0x80, 0xC2, 0x03, 0x07, 0x0F, 0x1E, 0x6C, 0xFF, 0x27, 0xFF, 0x3F, 0xE0, 0x2F, 0x00, 0x00, 0x00, + 0x09, 0x44, 0x44, 0x00, 0x12, 0x41, 0x88, 0x04, 0x21, 0x21, 0x84, 0x48, 0x20, 0x23, 0xC2, 0xCC, 0x08, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x1D, 0x00, 0x1D, 0x00, 0x78, 0x00, 0xB4, 0x07, 0xF0, 0x2F, 0xC0, 0xFB, 0x00, 0xBE, 0x02, 0xF4, 0x07, 0xFD, 0xFF, 0x01, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x01, 0x00, 0x19, 0x00, 0xA8, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0xFC, 0xFF, 0x3F, 0x00, 0xF0, 0xDC, 0xCB, 0x03, 0x00, 0xFF, 0xFF, 0x4F, 0x07, 0x40, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0xFF, 0x3F, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0xFF, 0xFF, 0x3F, 0x00, 0xC0, 0x07, 0x00, 0xBD, 0x02, 0xE8, 0xB3, 0xE0, 0x3C, 0xAC, 0xC3, 0x03, 0x0F, 0x3C, 0x00, 0xC0, 0x03, 0x00, 0xFC, 0xFF, 0xFF, + 0x0B, 0xC0, 0xC8, 0xC0, 0x91, 0x1B, 0xCD, 0x36, 0xE7, 0x00, 0x47, 0x03, 0xA7, 0x80, 0x36, 0xFD, 0xFF, 0xC1, 0x9B, 0xF9, 0xB8, 0xB8, 0xB8, 0xB7, 0x99, 0xF7, 0xFF, 0xFF, 0x0F, + 0x0B, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xF0, 0x03, 0x00, 0xFC, 0x00, 0xC0, 0xFF, 0x00, 0xF0, 0x3F, 0x00, 0xFF, 0x3F, 0xF0, 0xFF, 0x3F, 0xFC, 0xFF, 0xCF, 0xFF, 0xFF, 0x0F, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x1F, 0xCB, 0x30, 0xC3, 0x3F, 0xC7, 0x00, 0x7E, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0xFC, 0xFF, 0xC3, 0xFF, 0x3F, 0x0C, 0x00, 0xC3, 0xFC, 0x33, 0x0C, 0x24, 0xC3, 0xC0, 0x31, 0x0C, 0x06, 0xC3, 0x30, 0x30, 0x0C, 0x00, 0xC3, 0xFF, 0x3F, + 0x0A, 0xFF, 0x3F, 0x30, 0x00, 0x03, 0xC3, 0x30, 0x30, 0x3F, 0xFF, 0xFF, 0x3F, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0x0C, 0x0C, 0xC3, 0xC0, 0x00, 0x0C, 0xFC, 0xFF, + 0x0A, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0xFC, 0x0F, 0xC0, 0xFF, 0x00, 0xFC, 0x0F, 0xC0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x3C, 0x00, 0xC0, 0x03, 0xF0, 0x3F, 0x00, 0xFF, 0x03, 0x00, 0x00, + 0x09, 0xE0, 0x2F, 0xF0, 0xFF, 0xE3, 0xB8, 0xEC, 0x9B, 0xF9, 0xBF, 0xF8, 0xBF, 0x99, 0xEF, 0xB8, 0x2C, 0xFF, 0x3F, 0xE0, 0x2F, 0x00, 0x00, 0x00, + 0x04, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0x03, 0x87, 0x87, 0xC3, 0x30, 0x0C, 0xE3, 0xDE, 0x01, + 0x03, 0x74, 0xBB, 0x0C, 0xC3, 0x30, 0x2C, 0x2D, 0x0D, + 0x05, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0F, + 0x05, 0x00, 0x00, 0xD0, 0xC7, 0x34, 0xC3, 0x0C, 0x73, 0x4C, 0x1F, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x39, 0xC0, 0x00, 0x43, 0x2F, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xD0, 0x87, 0x30, 0x60, 0x60, 0x60, 0xC0, 0x3F, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xD0, 0x87, 0x30, 0xB8, 0x00, 0x23, 0x4C, 0x1F, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x0E, 0x36, 0xC6, 0xFC, 0x03, 0x0C, 0x30, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xF0, 0xCB, 0x00, 0x7F, 0x40, 0x13, 0x8C, 0x1F, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xD0, 0xCB, 0x10, 0x2F, 0x4C, 0x33, 0x4C, 0x1F, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xF0, 0x0F, 0x30, 0x60, 0x60, 0xC0, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xD0, 0xC7, 0x30, 0x7D, 0x4C, 0x33, 0x4C, 0x1F, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0xD0, 0xC7, 0x30, 0xC6, 0xE0, 0x03, 0x8C, 0x1F, 0x00, 0x00, 0x00, + 0x04, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x03, 0xC0, 0xF0, 0x3C, 0xCF, 0xF3, 0x3C, 0x03, 0x00, + 0x03, 0x00, 0xCC, 0xF3, 0x3C, 0xCF, 0xF3, 0x30, 0x00, + 0x05, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x03, 0x30, 0xC0, 0x0F, 0x30, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0xD0, 0x7F, 0x40, 0xFF, 0x1F, 0xFC, 0xFF, 0x43, 0xFF, 0x1F, 0x40, 0x15, 0x00, 0x00, 0x00, + 0x0A, 0xE4, 0x06, 0x90, 0x91, 0x01, 0x06, 0x24, 0x30, 0x90, 0x1B, 0x46, 0x6E, 0x96, 0xB9, 0x91, 0xE4, 0x06, 0x0C, 0x18, 0x90, 0x40, 0x46, 0x06, 0x90, 0x1B, + 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3F, 0x02, 0xC2, 0xAB, 0xAA, 0x3E, 0x20, 0xE0, 0xAB, 0xAA, 0x3E, 0x02, 0xC2, 0xFF, 0xFF, 0x0F, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0x08, 0x02, 0xC0, 0x30, 0x00, 0x0C, 0x03, 0xF0, 0xFF, 0x00, 0xFE, 0x0B, 0xD0, 0x7F, 0x00, 0xA4, 0x01, 0x00, 0x0A, 0x00, 0xA0, 0x00, + 0x0A, 0x00, 0x80, 0x00, 0x81, 0x24, 0x10, 0x85, 0x00, 0x20, 0x66, 0x40, 0x15, 0x45, 0x62, 0x90, 0x4D, 0xD0, 0xF1, 0x23, 0x01, 0xFD, 0x41, 0x41, 0x07, 0x00, + 0x0A, 0x00, 0x05, 0x00, 0xA0, 0x00, 0x40, 0x1F, 0x00, 0xF8, 0x02, 0xD0, 0x7F, 0x00, 0xFE, 0x0B, 0xF0, 0xFF, 0x00, 0xFF, 0x0F, 0xD0, 0x7F, 0x00, 0xF4, 0x01, + 0x0A, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0xD4, 0x01, 0xD0, 0x06, 0x40, 0x7F, 0x00, 0xFD, 0x01, 0xF4, 0x07, 0xD0, 0x1F, 0x00, 0x7F, 0x00, 0xD0, 0x01, 0x00, + 0x0A, 0x40, 0x15, 0x00, 0xFE, 0x0B, 0x88, 0x2F, 0x52, 0xF0, 0x50, 0x01, 0x0A, 0xD4, 0xAF, 0x7F, 0xFD, 0xF5, 0xC7, 0x0B, 0x3E, 0x70, 0xD0, 0x00, 0xA4, 0x01, + 0x0A, 0x80, 0x2F, 0x80, 0x5F, 0x2F, 0x0C, 0x00, 0xC3, 0x00, 0x30, 0x0C, 0x00, 0xC3, 0x01, 0x34, 0x34, 0xC0, 0x01, 0x07, 0x0D, 0xD0, 0x75, 0x00, 0xF4, 0x01, + 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xF4, 0x01, 0xC0, 0x3F, 0x00, 0xF0, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0xF0, 0x00, 0xE0, 0xEF, 0x00, 0xBB, 0x0B, 0xA0, 0xAA, 0x00, 0xAA, 0x0A, 0x80, 0x19, 0x00, 0x64, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x2D, 0x80, 0xE7, 0x0B, 0xBE, 0xF8, 0xFA, 0x02, 0xFE, 0x0B, 0x80, 0x2F, 0x00, 0x50, 0x00, + 0x0A, 0x00, 0x05, 0x00, 0xF8, 0x02, 0xE0, 0xBF, 0x80, 0xAF, 0x2F, 0xBE, 0xE0, 0xDB, 0x02, 0x78, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x05, 0x00, 0xA0, 0x00, 0x40, 0x1F, 0x50, 0xFE, 0x5B, 0xFD, 0xFF, 0x47, 0xFF, 0x1F, 0xE0, 0xBF, 0x00, 0xFE, 0x0B, 0xF0, 0xF5, 0x40, 0x01, 0x14, + 0x0A, 0x40, 0x1A, 0x00, 0x09, 0x06, 0x20, 0x80, 0x00, 0x02, 0x08, 0xFC, 0xFF, 0xC3, 0x00, 0x30, 0x0C, 0x00, 0xC3, 0x00, 0x30, 0x0C, 0x00, 0xC3, 0xFF, 0x3F, + 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x0A, 0xF0, 0xFF, 0x00, 0xAA, 0x0A, 0xF0, 0xFF, 0x00, 0x00, 0x00, + 0x09, 0xE0, 0x2F, 0xF0, 0xFF, 0xE3, 0xFF, 0xED, 0xFF, 0xE1, 0xDF, 0xE1, 0x2F, 0xE1, 0xEF, 0xE2, 0x2F, 0xEF, 0x3F, 0xE0, 0x2F, 0x00, 0x00, 0x00, + 0x0A, 0xC0, 0x31, 0x00, 0x30, 0x01, 0x40, 0x34, 0x00, 0xCC, 0x00, 0x00, 0x0A, 0x00, 0xF8, 0x02, 0xE0, 0xBF, 0x80, 0xFF, 0x2F, 0xFE, 0xFF, 0xFB, 0xFF, 0xFF, + 0x0A, 0x00, 0x00, 0x80, 0xFF, 0x2F, 0xFC, 0xFF, 0xC3, 0x07, 0x3D, 0x3C, 0xC0, 0xC3, 0x03, 0x3C, 0x7C, 0xD0, 0xC3, 0xFF, 0x3F, 0xF8, 0xFF, 0x02, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x3C, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0xC0, 0xF3, 0x3C, 0x3C, 0xCF, 0x03, 0x00, 0x00, + 0x0A, 0xB9, 0x91, 0xE3, 0x46, 0x2E, 0x1B, 0xB9, 0x61, 0xE4, 0x06, 0x91, 0x1B, 0x41, 0x6E, 0x24, 0xB9, 0x91, 0xE3, 0x46, 0x2E, 0x1B, 0xB9, 0x01, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x0C, 0xC0, 0x23, 0x00, 0x80, 0x08, 0x00, 0x20, 0x0F, 0xC0, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0xE0, 0x2F, 0xC0, 0x01, 0x0D, 0x06, 0x40, 0x32, 0x00, 0x30, 0x03, 0x00, 0x33, 0x00, 0x30, 0x06, 0x40, 0xC2, 0x01, 0x0D, 0xE0, 0x2F, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0x20, 0x00, 0x20, 0x23, 0x80, 0x32, 0x0A, 0x0D, 0xC3, 0xD1, 0x10, 0x1C, 0x0D, 0xC0, 0x81, 0x02, 0x0A, 0xE0, 0x2F, 0x00, 0x54, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0xFC, 0x03, 0xB0, 0xE0, 0x00, 0x03, 0x0C, 0x30, 0xC0, 0x00, 0x0B, 0x0E, 0xC0, 0x3F, 0x00, 0xAC, 0x03, 0xC0, 0x3A, 0x00, 0xAC, 0x03, + 0x05, 0x6F, 0xBC, 0xF1, 0xC6, 0x1B, 0x6F, 0xBC, 0xF1, 0xC6, 0x1B, 0x6F, 0x00, 0x00, + 0x08, 0xE4, 0x6F, 0xE4, 0x6F, 0xE4, 0x6F, 0xE4, 0x6F, 0xE4, 0x6F, 0xE4, 0x6F, 0xE4, 0x6F, 0xE4, 0x6F, 0xE4, 0x6F, 0x00, 0x00, + 0x09, 0x00, 0xE4, 0x03, 0x90, 0x0F, 0x40, 0x3E, 0x00, 0xF9, 0x00, 0xE4, 0x03, 0x90, 0x0F, 0x40, 0x3E, 0x00, 0xF9, 0x00, 0xE4, 0x03, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0xFF, 0x03, 0xF0, 0x3F, 0x00, 0xFF, 0x03, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0x08, 0x82, 0xE0, 0xBA, 0x2E, 0x08, 0x82, 0x80, 0x20, 0x08, 0xAE, 0xEB, 0x82, 0x20, 0x08, 0x08, 0x82, 0xE0, 0xBA, 0x2E, 0x08, 0x82, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x30, 0x00, 0x00, 0x03, 0x30, 0xFC, 0x00, 0x43, 0x07, 0xFC, 0x20, 0x40, 0x07, 0x30, 0x20, 0x00, 0x03, 0x00, 0xFC, 0x00, 0x40, 0x07, 0x00, 0x20, + 0x0A, 0x00, 0x43, 0xC0, 0x20, 0x1D, 0x20, 0x61, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x84, 0x01, 0x24, 0xB4, 0xF1, 0x01, 0xFE, 0x0F, 0xD0, 0x0F, 0x00, 0xFC, + 0x0A, 0x00, 0x00, 0x00, 0x54, 0x00, 0x90, 0x1A, 0x40, 0xFE, 0x06, 0xE4, 0x6F, 0x40, 0xFE, 0x06, 0x90, 0x1A, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x88, 0x88, 0x88, 0x55, 0x55, 0x55, 0xFF, 0x00, 0x54, 0x55, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x64, 0x00, 0xA5, 0x6B, 0x01, 0x64, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, +}; +short font_ptrs[] = { + 0x0000, 0x000E, 0x001C, 0x002A, 0x0038, 0x0046, 0x0054, 0x0062, + 0x0070, 0x007E, 0x008C, 0x009A, 0x00A8, 0x00B6, 0x00C4, 0x00D2, + 0x00E0, 0x00EE, 0x00FC, 0x010A, 0x0118, 0x0126, 0x0134, 0x0142, + 0x0150, 0x015E, 0x016C, 0x017A, 0x0188, 0x0196, 0x01A4, 0x01B2, + 0x01C0, 0x01CE, 0x01D7, 0x01E5, 0x01F5, 0x0205, 0x0218, 0x0228, + 0x0231, 0x023C, 0x0247, 0x0257, 0x0267, 0x0272, 0x0280, 0x0289, + 0x0299, 0x02A9, 0x02B7, 0x02C7, 0x02D7, 0x02E7, 0x02F7, 0x0307, + 0x0317, 0x0327, 0x0337, 0x0340, 0x034B, 0x035B, 0x036B, 0x037B, + 0x038B, 0x03A0, 0x03B0, 0x03C0, 0x03D0, 0x03E0, 0x03F0, 0x0400, + 0x0410, 0x0420, 0x042B, 0x043B, 0x044E, 0x045E, 0x0473, 0x0486, + 0x0499, 0x04A9, 0x04BC, 0x04CC, 0x04DC, 0x04EC, 0x04FF, 0x050F, + 0x0524, 0x0537, 0x0547, 0x055A, 0x0565, 0x0573, 0x057E, 0x0589, + 0x0599, 0x05A2, 0x05B0, 0x05BE, 0x05CC, 0x05DA, 0x05E8, 0x05F3, + 0x0601, 0x060F, 0x061A, 0x0625, 0x0633, 0x063E, 0x064E, 0x065C, + 0x066A, 0x0678, 0x0686, 0x068F, 0x069D, 0x06A8, 0x06B6, 0x06C4, + 0x06D4, 0x06E2, 0x06F0, 0x06FE, 0x0709, 0x070F, 0x071A, 0x072A, + 0x0735, 0x074A, 0x0769, 0x0788, 0x07A2, 0x07C1, 0x07DB, 0x07F5, + 0x080F, 0x0829, 0x0843, 0x085D, 0x0877, 0x0896, 0x08A6, 0x08C0, + 0x08DA, 0x08F4, 0x090E, 0x0923, 0x0940, 0x095D, 0x097C, 0x099B, + 0x09B3, 0x09CB, 0x09E3, 0x09FB, 0x0A13, 0x0A2B, 0x0A43, 0x0A5B, + 0x0A73, 0x0A8B, 0x0AA3, 0x0ABD, 0x0ADA, 0x0AF7, 0x0B0C, 0x0B26, + 0x0B40, 0x0B5A, 0x0B74, 0x0B8C, 0x0B97, 0x0BA0, 0x0BA9, 0x0BB7, + 0x0BC5, 0x0BD3, 0x0BE1, 0x0BEF, 0x0BFD, 0x0C0B, 0x0C19, 0x0C27, + 0x0C35, 0x0C43, 0x0C4E, 0x0C57, 0x0C60, 0x0C6E, 0x0C7E, 0x0C8E, + 0x0CA8, 0x0CC2, 0x0CDC, 0x0CF6, 0x0D10, 0x0D2A, 0x0D44, 0x0D5E, + 0x0D78, 0x0D92, 0x0DAC, 0x0DC6, 0x0DE0, 0x0DFA, 0x0E14, 0x0E2E, + 0x0E46, 0x0E60, 0x0E7A, 0x0E94, 0x0EAE, 0x0EC8, 0x0EE2, 0x0EFC, + 0x0F16, 0x0F24, 0x0F39, 0x0F51, 0x0F6B, 0x0F85, 0x0F9F, 0x0FB9, + 0x0FD3, 0x0FF0, 0x100A, 0x101A, 0x102A, 0x103A, 0x104A, 0x105A, + 0x106A, 0x107A, 0x108A, 0x109A, 0x10AA, 0x10BA, 0x10CA, 0x10DA, + 0x10EA, 0x10FA, 0x110A, 0x111A, 0x112A, 0x113A, 0x114A, 0x115A, + 0x116A, 0x117A, 0x118A, 0x119A, 0x11AA, 0x11BA, 0x11CA, 0x11DA, +}; +#endif +#endif diff --git a/data/hmap.h b/data/hmap.h new file mode 100644 index 0000000..7de3fa3 --- /dev/null +++ b/data/hmap.h @@ -0,0 +1,27 @@ +/** + * Powder Toy - Heatmap Data + * + * Copyright (c) 2010 Simon Robertshaw + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + */ +#ifndef HMAP_H +#define HMAP_H +#include +static char color_data[] = {0x2B,0x00,0xFF,0x2B,0x00,0xFF,0x28,0x04,0xFF,0x24,0x08,0xFF,0x20,0x0D,0xFF,0x1C,0x12,0xFF,0x17,0x18,0xFF,0x12,0x1E,0xFF,0x0D,0x25,0xFF,0x07,0x2D,0xFF,0x03,0x35,0xFF,0x01,0x3E,0xFF,0x00,0x42,0xFF,0x00,0x44,0xFF,0x00,0x48,0xFF,0x00,0x4A,0xFF,0x00,0x4D,0xFF,0x00,0x51,0xFF,0x00,0x54,0xFF,0x00,0x58,0xFF,0x00,0x5C,0xFF,0x00,0x5E,0xFF,0x00,0x62,0xFF,0x00,0x66,0xFF,0x00,0x6A,0xFF,0x00,0x6D,0xFF,0x00,0x71,0xFF,0x00,0x75,0xFF,0x00,0x79,0xFF,0x00,0x7C,0xFF,0x00,0x7F,0xFF,0x00,0x83,0xFF,0x00,0x87,0xFF,0x00,0x8B,0xFF,0x00,0x8F,0xFF,0x00,0x92,0xFF,0x00,0x96,0xFF,0x00,0x99,0xFF,0x00,0x9C,0xFF,0x00,0xA0,0xFF,0x00,0xA3,0xFF,0x00,0xA7,0xFF,0x00,0xAA,0xFF,0x00,0xAD,0xFF,0x00,0xAE,0xFE,0x00,0xB1,0xFE,0x00,0xB3,0xFE,0x00,0xB6,0xFE,0x00,0xB9,0xFE,0x00,0xBB,0xFD,0x00,0xBD,0xFD,0x00,0xC0,0xFD,0x00,0xC2,0xFD,0x00,0xC5,0xFD,0x00,0xC7,0xFD,0x00,0xC9,0xFD,0x00,0xCC,0xFC,0x00,0xCF,0xFD,0x00,0xD0,0xFC,0x00,0xD3,0xFC,0x00,0xD5,0xFC,0x00,0xD7,0xFB,0x00,0xDA,0xFB,0x00,0xDC,0xFB,0x00,0xDE,0xFB,0x00,0xE1,0xFA,0x00,0xE3,0xF9,0x00,0xE6,0xF9,0x00,0xE7,0xF9,0x00,0xEA,0xF8,0x00,0xEB,0xF7,0x00,0xED,0xF7,0x00,0xEF,0xF6,0x00,0xF1,0xF5,0x00,0xF2,0xF4,0x00,0xF5,0xF3,0x00,0xF6,0xF2,0x00,0xF7,0xF2,0x00,0xFA,0xF0,0x00,0xFA,0xEF,0x00,0xFC,0xEE,0x00,0xFD,0xEC,0x00,0xFF,0xEB,0x00,0xFF,0xE9,0x00,0xFF,0xE8,0x00,0xFF,0xE7,0x00,0xFF,0xE6,0x00,0xFF,0xE3,0x00,0xFF,0xE3,0x00,0xFF,0xE1,0x00,0xFF,0xDF,0x00,0xFF,0xDE,0x00,0xFF,0xDC,0x00,0xFF,0xDA,0x00,0xFF,0xD8,0x00,0xFF,0xD6,0x00,0xFF,0xD4,0x00,0xFF,0xD2,0x00,0xFF,0xD0,0x00,0xFF,0xCF,0x00,0xFF,0xCC,0x00,0xFF,0xCA,0x00,0xFF,0xC8,0x00,0xFF,0xC5,0x00,0xFF,0xC3,0x00,0xFF,0xC1,0x00,0xFF,0xBF,0x00,0xFF,0xBD,0x00,0xFF,0xBB,0x00,0xFF,0xB9,0x00,0xFF,0xB5,0x00,0xFF,0xB3,0x00,0xFF,0xB1,0x00,0xFF,0xAF,0x00,0xFF,0xAC,0x00,0xFF,0xAA,0x00,0xFF,0xA8,0x00,0xFF,0xA5,0x00,0xFF,0xA3,0x00,0xFF,0xA1,0x00,0xFF,0x9F,0x00,0xFF,0x9C,0x00,0xFF,0x99,0x00,0xFF,0x97,0x00,0xFF,0x95,0x00,0xFF,0x93,0x00,0xFF,0x90,0x00,0xFF,0x8F,0x00,0xFF,0x8C,0x00,0xFF,0x8A,0x00,0xFF,0x88,0x00,0xFF,0x86,0x00,0xFF,0x83,0x00,0xFF,0x81,0x00,0xFF,0x7F,0x00,0xFF,0x7D,0x00,0xFF,0x7C,0x00,0xFF,0x7A,0x00,0xFF,0x78,0x00,0xFF,0x76,0x00,0xFF,0x74,0x00,0xFF,0x72,0x00,0xFF,0x71,0x00,0xFF,0x6F,0x00,0xFF,0x6D,0x00,0xFF,0x6A,0x00,0xFF,0x69,0x00,0xFF,0x67,0x00,0xFF,0x65,0x00,0xFF,0x64,0x00,0xFF,0x61,0x00,0xFF,0x5F,0x00,0xFF,0x5D,0x00,0xFF,0x5B,0x00,0xFF,0x5A,0x00,0xFF,0x57,0x00,0xFF,0x56,0x00,0xFF,0x54,0x00,0xFF,0x51,0x00,0xFF,0x4F,0x00,0xFF,0x4E,0x00,0xFF,0x4C,0x00,0xFF,0x4A,0x00,0xFF,0x48,0x00,0xFF,0x46,0x00,0xFF,0x45,0x00,0xFF,0x43,0x00,0xFF,0x40,0x00,0xFF,0x3F,0x00,0xFF,0x3C,0x00,0xFF,0x3B,0x00,0xFF,0x39,0x00,0xFF,0x37,0x00,0xFF,0x35,0x00,0xFF,0x33,0x00,0xFF,0x32,0x00,0xFF,0x30,0x00,0xFF,0x2F,0x00,0xFF,0x2D,0x00,0xFF,0x2B,0x00,0xFF,0x2A,0x00,0xFF,0x28,0x00,0xFF,0x27,0x00,0xFF,0x25,0x00,0xFF,0x23,0x00,0xFF,0x22,0x00,0xFF,0x21,0x00,0xFF,0x1F,0x00,0xFF,0x1E,0x00,0xFF,0x1C,0x00,0xFF,0x1B,0x00,0xFF,0x1A,0x00,0xFF,0x19,0x00,0xFF,0x18,0x00,0xFF,0x16,0x00,0xFF,0x16,0x01,0xFF,0x15,0x02,0xFF,0x14,0x02,0xFF,0x12,0x02,0xFF,0x12,0x03,0xFF,0x12,0x04,0xFF,0x10,0x05,0xFF,0x10,0x06,0xFF,0x0F,0x06,0xFF,0x0F,0x07,0xFF,0x0D,0x08,0xFF,0x0D,0x09,0xFF,0x0C,0x0A,0xFF,0x0C,0x0B,0xFF,0x0C,0x0C,0xFF,0x0B,0x0C,0xFF,0x0B,0x0E,0xFF,0x0A,0x0F,0xFF,0x09,0x10,0xFF,0x09,0x11,0xFF,0x08,0x12,0xFF,0x08,0x13,0xFF,0x08,0x14,0xFF,0x07,0x15,0xFF,0x07,0x16,0xFF,0x06,0x18,0xFF,0x06,0x19,0xFF,0x06,0x1A,0xFF,0x06,0x1C,0xFF,0x06,0x1D,0xFF,0x06,0x1E,0xFF,0x05,0x1F,0xFF,0x05,0x20,0xFF,0x05,0x21,0xFF,0x05,0x23,0xFF,0x04,0x24,0xFF,0x04,0x25,0xFF,0x04,0x26,0xFF,0x04,0x28,0xFF,0x03,0x29,0xFF,0x03,0x2B,0xFF,0x03,0x2B,0xFF,0x03,0x2D,0xFF,0x03,0x2E,0xFF,0x03,0x30,0xFF,0x03,0x31,0xFF,0x02,0x32,0xFF,0x03,0x34,0xFF,0x03,0x35,0xFF,0x02,0x37,0xFF,0x03,0x39,0xFF,0x02,0x3A,0xFF,0x02,0x3B,0xFF,0x01,0x3C,0xFF,0x01,0x3E,0xFF,0x01,0x3F,0xFF,0x01,0x40,0xFF,0x02,0x42,0xFF,0x02,0x44,0xFF,0x01,0x45,0xFF,0x01,0x46,0xFF,0x01,0x48,0xFF,0x01,0x49,0xFF,0x01,0x4A,0xFF,0x01,0x4C,0xFF,0x00,0x4E,0xFF,0x01,0x4E,0xFF,0x00,0x50,0xFF,0x01,0x52,0xFF,0x01,0x52,0xFF,0x00,0x54,0xFF,0x00,0x55,0xFF,0x00,0x56,0xFF,0x00,0x58,0xFF,0x00,0x58,0xFF,0x00,0x59,0xFF,0x00,0x5A,0xFF,0x00,0x5B,0xFF,0x00,0x5C,0xFF,0x00,0x5D,0xFF,0x00,0x5E,0xFF,0x00,0x5F,0xFF,0x00,0x60,0xFF,0x00,0x61,0xFF,0x00,0x62,0xFF,0x00,0x63,0xFF,0x00,0x64,0xFF,0x00,0x65,0xFF,0x00,0x66,0xFF,0x00,0x67,0xFF,0x00,0x69,0xFF,0x00,0x6A,0xFF,0x00,0x6A,0xFF,0x00,0x6B,0xFF,0x00,0x6C,0xFF,0x00,0x6E,0xFF,0x00,0x6F,0xFF,0x00,0x70,0xFF,0x00,0x71,0xFF,0x00,0x72,0xFF,0x00,0x73,0xFF,0x00,0x74,0xFF,0x00,0x75,0xFF,0x00,0x76,0xFF,0x00,0x77,0xFF,0x00,0x79,0xFF,0x00,0x7A,0xFF,0x00,0x7B,0xFF,0x00,0x7B,0xFF,0x00,0x7D,0xFF,0x00,0x7E,0xFF,0x00,0x7F,0xFF,0x00,0x80,0xFF,0x00,0x82,0xFF,0x00,0x83,0xFF,0x00,0x83,0xFF,0x00,0x84,0xFF,0x00,0x86,0xFF,0x00,0x87,0xFF,0x00,0x88,0xFF,0x00,0x89,0xFF,0x00,0x8A,0xFF,0x00,0x8C,0xFF,0x00,0x8D,0xFF,0x00,0x8E,0xFF,0x00,0x8F,0xFF,0x00,0x90,0xFF,0x00,0x92,0xFF,0x00,0x93,0xFF,0x00,0x93,0xFF,0x00,0x94,0xFF,0x00,0x96,0xFF,0x00,0x97,0xFF,0x00,0x98,0xFF,0x00,0x99,0xFF,0x00,0x9A,0xFF,0x00,0x9B,0xFF,0x00,0x9C,0xFF,0x00,0x9E,0xFF,0x00,0x9E,0xFF,0x00,0x9F,0xFF,0x00,0xA0,0xFF,0x00,0xA1,0xFF,0x00,0xA3,0xFF,0x00,0xA4,0xFF,0x00,0xA4,0xFF,0x00,0xA6,0xFF,0x00,0xA7,0xFF,0x00,0xA7,0xFF,0x00,0xA9,0xFF,0x00,0xAA,0xFF,0x00,0xAB,0xFF,0x00,0xAC,0xFF,0x00,0xAD,0xFF,0x00,0xAE,0xFF,0x00,0xAE,0xFF,0x00,0xB0,0xFF,0x00,0xB1,0xFF,0x00,0xB1,0xFF,0x00,0xB2,0xFF,0x00,0xB3,0xFF,0x00,0xB5,0xFF,0x00,0xB6,0xFF,0x00,0xB7,0xFF,0x00,0xB8,0xFF,0x00,0xB8,0xFF,0x00,0xBA,0xFF,0x00,0xBB,0xFF,0x00,0xBB,0xFF,0x00,0xBC,0xFF,0x00,0xBD,0xFF,0x00,0xBD,0xFF,0x00,0xBE,0xFF,0x00,0xBF,0xFF,0x00,0xC0,0xFE,0x00,0xC1,0xFE,0x00,0xC2,0xFE,0x00,0xC2,0xFF,0x00,0xC3,0xFE,0x00,0xC4,0xFE,0x00,0xC5,0xFE,0x00,0xC6,0xFD,0x00,0xC7,0xFD,0x00,0xC8,0xFD,0x00,0xC8,0xFC,0x00,0xC9,0xFC,0x00,0xCA,0xFC,0x00,0xCB,0xFC,0x00,0xCC,0xFB,0x00,0xCC,0xFC,0x00,0xCD,0xFB,0x00,0xCE,0xFB,0x00,0xCF,0xFB,0x00,0xCF,0xFA,0x00,0xD0,0xFA,0x00,0xD1,0xFA,0x00,0xD1,0xFA,0x00,0xD3,0xF9,0x00,0xD3,0xFA,0x00,0xD4,0xF9,0x00,0xD5,0xF9,0x00,0xD5,0xF8,0x00,0xD6,0xF8,0x00,0xD7,0xF8,0x00,0xD8,0xF7,0x00,0xD9,0xF7,0x00,0xD9,0xF6,0x00,0xDA,0xF7,0x00,0xDB,0xF6,0x00,0xDC,0xF5,0x00,0xDC,0xF5,0x00,0xDD,0xF5,0x00,0xDD,0xF5,0x00,0xDE,0xF5,0x00,0xDF,0xF4,0x00,0xDF,0xF4,0x00,0xE0,0xF3,0x00,0xE1,0xF4,0x00,0xE2,0xF2,0x00,0xE2,0xF3,0x00,0xE3,0xF2,0x00,0xE3,0xF1,0x00,0xE4,0xF1,0x00,0xE5,0xF1,0x00,0xE6,0xF0,0x00,0xE6,0xF0,0x00,0xE7,0xF0,0x00,0xE7,0xEF,0x00,0xE8,0xEF,0x00,0xE9,0xEE,0x00,0xEA,0xEE,0x00,0xEA,0xEE,0x00,0xEB,0xED,0x00,0xEC,0xED,0x00,0xEC,0xED,0x00,0xED,0xEB,0x00,0xED,0xEC,0x00,0xED,0xEB,0x00,0xEE,0xEA,0x00,0xEF,0xEB,0x00,0xF0,0xE9,0x00,0xF0,0xEA,0x00,0xF1,0xE9,0x00,0xF1,0xE8,0x00,0xF2,0xE7,0x00,0xF2,0xE7,0x00,0xF3,0xE6,0x00,0xF3,0xE6,0x00,0xF4,0xE6,0x00,0xF4,0xE5,0x00,0xF5,0xE5,0x00,0xF6,0xE4,0x00,0xF5,0xE3,0x00,0xF7,0xE3,0x00,0xF6,0xE2,0x00,0xF8,0xE1,0x00,0xF8,0xE1,0x00,0xF8,0xE1,0x00,0xF9,0xDF,0x00,0xF9,0xDF,0x00,0xFA,0xDE,0x00,0xFA,0xDE,0x00,0xFA,0xDE,0x00,0xFA,0xDD,0x00,0xFB,0xDC,0x00,0xFC,0xDB,0x00,0xFC,0xDB,0x00,0xFD,0xDB,0x00,0xFD,0xDA,0x00,0xFD,0xD8,0x00,0xFD,0xD8,0x00,0xFE,0xD8,0x00,0xFE,0xD7,0x00,0xFF,0xD6,0x00,0xFE,0xD5,0x00,0xFF,0xD5,0x00,0xFF,0xD3,0x00,0xFF,0xD3,0x00,0xFF,0xD2,0x00,0xFF,0xD2,0x00,0xFF,0xD2,0x00,0xFF,0xD0,0x00,0xFF,0xD0,0x00,0xFF,0xCF,0x00,0xFF,0xCF,0x00,0xFF,0xCE,0x00,0xFF,0xCD,0x00,0xFF,0xCC,0x00,0xFF,0xCC,0x00,0xFF,0xCB,0x00,0xFF,0xCA,0x00,0xFF,0xC9,0x00,0xFF,0xC9,0x00,0xFF,0xC8,0x00,0xFF,0xC7,0x00,0xFF,0xC7,0x00,0xFF,0xC6,0x00,0xFF,0xC5,0x00,0xFF,0xC5,0x00,0xFF,0xC4,0x00,0xFF,0xC3,0x00,0xFF,0xC2,0x00,0xFF,0xC2,0x00,0xFF,0xC1,0x00,0xFF,0xC0,0x00,0xFF,0xBF,0x00,0xFF,0xBE,0x00,0xFF,0xBD,0x00,0xFF,0xBC,0x00,0xFF,0xBC,0x00,0xFF,0xBB,0x00,0xFF,0xBA,0x00,0xFF,0xB9,0x00,0xFF,0xB9,0x00,0xFF,0xB8,0x00,0xFF,0xB6,0x00,0xFF,0xB6,0x00,0xFF,0xB5,0x00,0xFF,0xB4,0x00,0xFF,0xB3,0x00,0xFF,0xB2,0x00,0xFF,0xB1,0x00,0xFF,0xB0,0x00,0xFF,0xB0,0x00,0xFF,0xAF,0x00,0xFF,0xAE,0x00,0xFF,0xAD,0x00,0xFF,0xAC,0x00,0xFF,0xAB,0x00,0xFF,0xAA,0x00,0xFF,0xA9,0x00,0xFF,0xA8,0x00,0xFF,0xA8,0x00,0xFF,0xA6,0x00,0xFF,0xA6,0x00,0xFF,0xA5,0x00,0xFF,0xA4,0x00,0xFF,0xA3,0x00,0xFF,0xA2,0x00,0xFF,0xA1,0x00,0xFF,0xA0,0x00,0xFF,0x9F,0x00,0xFF,0x9E,0x00,0xFF,0x9D,0x00,0xFF,0x9D,0x00,0xFF,0x9B,0x00,0xFF,0x9B,0x00,0xFF,0x99,0x00,0xFF,0x98,0x00,0xFF,0x98,0x00,0xFF,0x97,0x00,0xFF,0x95,0x00,0xFF,0x94,0x00,0xFF,0x93,0x00,0xFF,0x93,0x00,0xFF,0x92,0x00,0xFF,0x91,0x00,0xFF,0x90,0x00,0xFF,0x8F,0x00,0xFF,0x8E,0x00,0xFF,0x8D,0x00,0xFF,0x8C,0x00,0xFF,0x8B,0x00,0xFF,0x8A,0x00,0xFF,0x89,0x00,0xFF,0x89,0x00,0xFF,0x88,0x00,0xFF,0x87,0x00,0xFF,0x86,0x00,0xFF,0x84,0x00,0xFF,0x84,0x00,0xFF,0x82,0x00,0xFF,0x82,0x00,0xFF,0x81,0x00,0xFF,0x80,0x00,0xFF,0x7F,0x00,0xFF,0x7E,0x00,0xFF,0x7D,0x00,0xFF,0x7C,0x00,0xFF,0x7B,0x00,0xFF,0x7B,0x00,0xFF,0x7A,0x00,0xFF,0x78,0x00,0xFF,0x78,0x00,0xFF,0x77,0x00,0xFF,0x76,0x00,0xFF,0x74,0x00,0xFF,0x74,0x00,0xFF,0x73,0x00,0xFF,0x72,0x00,0xFF,0x71,0x00,0xFF,0x70,0x00,0xFF,0x70,0x00,0xFF,0x6E,0x00,0xFF,0x6D,0x00,0xFF,0x6C,0x00,0xFF,0x6C,0x00,0xFF,0x6B,0x00,0xFF,0x6A,0x00,0xFF,0x6A,0x00,0xFF,0x68,0x00,0xFF,0x67,0x00,0xFF,0x66,0x00,0xFF,0x66,0x00,0xFF,0x65,0x00,0xFF,0x64,0x00,0xFF,0x64,0x00,0xFF,0x62,0x00,0xFF,0x62,0x00,0xFF,0x61,0x00,0xFF,0x60,0x00,0xFF,0x5F,0x00,0xFF,0x5E,0x00,0xFF,0x5D,0x00,0xFF,0x5D,0x00,0xFF,0x5C,0x00,0xFF,0x5A,0x00,0xFF,0x5A,0x00,0xFF,0x59,0x00,0xFF,0x58,0x00,0xFF,0x57,0x00,0xFF,0x56,0x00,0xFF,0x55,0x00,0xFF,0x54,0x00,0xFF,0x54,0x00,0xFF,0x53,0x00,0xFF,0x52,0x00,0xFF,0x51,0x00,0xFF,0x50,0x00,0xFF,0x4F,0x00,0xFF,0x4E,0x00,0xFF,0x4D,0x00,0xFF,0x4D,0x00,0xFF,0x4C,0x00,0xFF,0x4A,0x00,0xFF,0x4A,0x00,0xFF,0x48,0x00,0xFF,0x47,0x00,0xFF,0x47,0x00,0xFF,0x45,0x00,0xFF,0x45,0x00,0xFF,0x44,0x00,0xFF,0x43,0x00,0xFF,0x43,0x00,0xFF,0x41,0x00,0xFF,0x40,0x00,0xFF,0x40,0x00,0xFF,0x3F,0x00,0xFF,0x3E,0x00,0xFF,0x3C,0x00,0xFF,0x3C,0x00,0xFF,0x3B,0x00,0xFF,0x3A,0x00,0xFF,0x38,0x00,0xFF,0x38,0x00,0xFF,0x37,0x00,0xFF,0x36,0x00,0xFF,0x35,0x00,0xFF,0x34,0x00,0xFF,0x34,0x00,0xFF,0x33,0x00,0xFF,0x31,0x00,0xFF,0x31,0x00,0xFF,0x2F,0x00,0xFF,0x2F,0x00,0xFF,0x2E,0x00,0xFF,0x2C,0x00,0xFF,0x2C,0x00,0xFF,0x2B,0x00,0xFF,0x2A,0x00,0xFF,0x29,0x00,0xFF,0x28,0x00,0xFF,0x27,0x00,0xFF,0x26,0x00,0xFF,0x26,0x00,0xFF,0x25,0x00,0xFF,0x25,0x00,0xFF,0x23,0x00,0xFF,0x23,0x00,0xFF,0x22,0x00,0xFF,0x21,0x00,0xFF,0x20,0x00,0xFF,0x1F,0x00,0xFF,0x1E,0x00,0xFF,0x1D,0x00,0xFF,0x1D,0x00,0xFF,0x1C,0x00,0xFF,0x1B,0x00,0xFF,0x1A,0x00,0xFF,0x19,0x00,0xFF,0x19,0x00,0xFF,0x18,0x00,0xFF,0x17,0x00,0xFF,0x16,0x00,0xFF,0x15,0x00,0xFF,0x15,0x00,0xFF,0x14,0x00,0xFF,0x14,0x00,0xFF,0x12,0x00,0xFF,0x12,0x00,0xFF,0x12,0x00,0xFF,0x10,0x00,0xFF,0x10,0x00,0xFF,0x0F,0x00,0xFF,0x0E,0x00,0xFF,0x0E,0x00,0xFF,0x0D,0x00,0xFF,0x0C,0x00,0xFF,0x0B,0x00,0xFF,0x0B,0x00,0xFF,0x0B,0x00,0xFF,0x0A,0x00,0xFF,0x09,0x00,0xFF,0x09,0x00,0xFF,0x08,0x00,0xFF,0x07,0x00,0xFF,0x07,0x00,0xFF,0x06,0x00,0xFF,0x06,0x00,0xFF,0x05,0x00,0xFF,0x04,0x00,0xFF,0x04,0x00,0xFF,0x04,0x00,0xFF,0x04,0x00,0xFF,0x03,0x00,0xFF,0x03,0x00,0xFF,0x02,0x00,0xFF,0x01,0x00,0xFF,0x01,0x00,0xFF,0x01,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x01,0xFF,0x00,0x01,0xFF,0x00,0x02,0xFF,0x00,0x01,0xFF,0x00,0x02,0xFF,0x00,0x03,0xFF,0x00,0x03,0xFF,0x00,0x03,0xFF,0x00,0x04,0xFF,0x00,0x05,0xFF,0x00,0x05,0xFF,0x00,0x05,0xFF,0x00,0x06,0xFF,0x00,0x07,0xFF,0x00,0x06,0xFF,0x00,0x07,0xFF,0x00,0x08,0xFF,0x00,0x09,0xFF,0x00,0x09,0xFF,0x00,0x09,0xFF,0x00,0x0B,0xFF,0x00,0x0B,0xFF,0x00,0x0C,0xFF,0x00,0x0B,0xFF,0x00,0x0C,0xFF,0x00,0x0E,0xFF,0x00,0x0D,0xFF,0x00,0x0E,0xFF,0x00,0x0F,0xFF,0x00,0x0F,0xFF,0x00,0x10,0xFF,0x00,0x11,0xFF,0x00,0x11,0xFF,0x00,0x12,0xFF,0x00,0x13,0xFF,0x00,0x14,0xFF,0x00,0x14,0xFF,0x00,0x15,0xFF,0x00,0x16,0xFF,0x00,0x16,0xFF,0x00,0x17,0xFF,0x00,0x17,0xFF,0x00,0x18,0xFF,0x00,0x19,0xFF,0x00,0x1A,0xFF,0x00,0x1A,0xFF,0x00,0x1B,0xFF,0x00,0x1C,0xFF,0x00,0x1D,0xFF,0x00,0x1E,0xFF,0x00,0x1E,0xFF,0x00,0x1F,0xFF,0x00,0x20,0xFF,0x00,0x21,0xFF,0x00,0x22,0xFF,0x00,0x22,0xFF,0x00,0x22,0xFF,0x00,0x24,0xFF,0x00,0x25,0xFF,0x00,0x26,0xFF,0x00,0x26,0xFF,0x00,0x27,0xFF,0x00,0x27,0xFF,0x00,0x28,0xFF,0x00,0x2A,0xFF,0x00,0x2A,0xFF,0x00,0x2B,0xFF,0x00,0x2C,0xFF,0x00,0x2C,0xFF,0x00,0x2E,0xFF,0x00,0x2E,0xFF,0x00,0x2F,0xFF,0x00,0x30,0xFF,0x00,0x31,0xFF,0x00,0x31,0xFF,0x00,0x32,0xFF,0x00,0x33,0xFF,0x00,0x34,0xFF,0x00,0x35,0xFF,0x00,0x36,0xFF,0x00,0x37,0xFF,0x00,0x37,0xFF,0x00,0x39,0xFF,0x00,0x3A,0xFF,0x00,0x3A,0xFF,0x00,0x3B,0xFF,0x00,0x3C,0xFF,0x00,0x3D,0xFF,0x00,0x3E,0xFF,0x00,0x3E,0xFF,0x00,0x3F,0xFF,0x00,0x40,0xFF,0x00,0x41,0xFF,0x00,0x42,0xFF,0x00,0x43,0xFF,0x00,0x43,0xFF,0x00,0x45,0xFF,0x00,0x46,0xFF,0x00,0x46,0xFF,0x00,0x47,0xFF,0x00,0x48,0xFF,0x00,0x49,0xFF,0x00,0x4A,0xFF,0x00,0x4B,0xFF,0x00,0x4C,0xFF,0x00,0x4C,0xFF,0x00,0x4D,0xFF,0x00,0x4E,0xFF,0x00,0x4F,0xFF,0x00,0x50,0xFF,0x00,0x51,0xFF,0x00,0x51,0xFF,0x00,0x52,0xFF,0x00,0x53,0xFF,0x00,0x54,0xFF,0x00,0x54,0xFF,0x00,0x56,0xFF,0x00,0x56,0xFF,0x00,0x57,0xFF,0x00,0x59,0xFF,0x00,0x59,0xFF,0x00,0x5A,0xFF,0x00,0x5A,0xFF,0x00,0x5C,0xFF,0x00,0x5D,0xFF,0x00,0x5D,0xFF,0x00,0x5E,0xFF,0x00,0x5F,0xFF,0x00,0x60,0xFF,0x00,0x61,0xFF,0x00,0x61,0xFF,0x00,0x62,0xFF,0x00,0x63,0xFF,0x00,0x64,0xFF,0x00,0x64,0xFF,0x00,0x65,0xFF,0x00,0x66,0xFF,0x00,0x67,0xFF,0x00,0x67,0xFF,0x00,0x68,0xFF,0x00,0x69,0xFF,0x00,0x6A,0xFF,0x00,0x6B,0xFF,0x00,0x6B,0xFF,0x00,0x6C,0xFF,0x00,0x6C,0xFF,0x00,0x6D,0xFF,0x00,0x6E,0xFF,0x00,0x6F,0xFF,0x00,0x6F,0xFF,0x00,0x70,0xFF,0x00,0x71,0xFF,0x00,0x72,0xFF,0x00,0x72,0xFF,0x00,0x73,0xFF,0x00,0x74,0xFF,0x00,0x74,0xFF,0x00,0x75,0xFF,0x00,0x76,0xFF,0x00,0x77,0xFF,0x00,0x78,0xFF,0x00,0x78,0xFF,0x00,0x79,0xFF,0x00,0x7A,0xFF,0x00,0x7A,0xFF,0x00,0x7B,0xFF,0x00,0x7C,0xFF,0x00,0x7D,0xFF,0x00,0x7E,0xFF,0x00,0x7E,0xFF,0x00,0x80,0xFF,0x00,0x80,0xFF,0x00,0x81,0xFF,0x00,0x82,0xFF,0x00,0x82,0xFF,0x00,0x83,0xFF,0x00,0x84,0xFF,0x00,0x85,0xFF,0x00,0x85,0xFF,0x00,0x87,0xFF,0x00,0x87,0xFF,0x00,0x88,0xFF,0x00,0x89,0xFF,0x00,0x8A,0xFF,0x00,0x8A,0xFF,0x00,0x8B,0xFF,0x00,0x8C,0xFF,0x00,0x8D,0xFF,0x00,0x8E,0xFF,0x00,0x8F,0xFF,0x00,0x90,0xFF,0x00,0x90,0xFF,0x00,0x91,0xFF,0x00,0x92,0xFF,0x00,0x92,0xFF,0x00,0x94,0xFF,0x00,0x94,0xFF,0x00,0x95,0xFF,0x00,0x95,0xFF,0x00,0x97,0xFF,0x00,0x98,0xFF,0x00,0x98,0xFF,0x00,0x99,0xFF,0x00,0x9A,0xFF,0x00,0x9B,0xFF,0x00,0x9B,0xFF,0x00,0x9C,0xFF,0x00,0x9D,0xFF,0x00,0x9E,0xFF,0x00,0x9F,0xFF,0x00,0x9F,0xFF,0x00,0xA0,0xFF,0x00,0xA1,0xFF,0x00,0xA2,0xFF,0x00,0xA2,0xFF,0x00,0xA3,0xFF,0x00,0xA4,0xFF,0x00,0xA5,0xFF,0x00,0xA6,0xFF,0x00,0xA6,0xFF,0x00,0xA7,0xFF,0x00,0xA8,0xFF,0x00,0xA9,0xFF,0x00,0xAA,0xFF,0x00,0xAA,0xFF,0x00,0xAB,0xFF,0x00,0xAC,0xFF,0x00,0xAD,0xFF,0x00,0xAE,0xFF,0x00,0xAE,0xFF,0x00,0xAF,0xFF,0x00,0xB0,0xFF,0x00,0xB1,0xFF,0x00,0xB1,0xFF,0x00,0xB2,0xFF,0x00,0xB3,0xFF,0x00,0xB4,0xFF,0x00,0xB4,0xFF,0x00,0xB5,0xFF,0x00,0xB6,0xFF,0x00,0xB7,0xFF,0x00,0xB7,0xFF,0x00,0xB8,0xFF,0x00,0xB9,0xFF,0x00,0xB9,0xFF,0x00,0xBA,0xFF,0x00,0xBA,0xFF,0x00,0xBC,0xFF,0x00,0xBC,0xFF,0x00,0xBC,0xFF,0x00,0xBD,0xFF,0x00,0xBE,0xFF,0x00,0xBE,0xFF,0x00,0xBF,0xFF,0x00,0xC0,0xFF,0x00,0xC1,0xFF,0x00,0xC1,0xFF,0x00,0xC1,0xFF,0x00,0xC2,0xFF,0x00,0xC2,0xFF,0x00,0xC4,0xFF,0x00,0xC4,0xFF,0x00,0xC5,0xFF,0x00,0xC5,0xFF,0x00,0xC6,0xFF,0x00,0xC7,0xFF,0x00,0xC7,0xFF,0x00,0xC7,0xFF,0x00,0xC8,0xFF,0x00,0xC9,0xFF,0x00,0xC9,0xFF,0x00,0xCA,0xFF,0x00,0xCA,0xFF,0x00,0xCB,0xFF,0x00,0xCC,0xFF,0x00,0xCC,0xFF,0x00,0xCC,0xFF,0x00,0xCD,0xFF,0x00,0xCD,0xFF,0x00,0xCE,0xFF,0x00,0xCE,0xFF,0x00,0xCF,0xFF,0x00,0xCF,0xFF,0x00,0xD0,0xFF,0x00,0xD0,0xFF,0x00,0xD1,0xFF,0x00,0xD1,0xFF,0x00,0xD1,0xFF,0x00,0xD2,0xFF,0x00,0xD2,0xFF,0x00,0xD3,0xFF,0x00,0xD3,0xFF,0x00,0xD4,0xFF,0x00,0xD3,0xFF,0x00,0xD4,0xFF,0x00,0xD4}; //1024 Pixels +//static char plasma_data[] = {0x00,0x00,0x00,0x03,0x00,0x00,0x05,0x00,0x00,0x09,0x00,0x00,0x0E,0x00,0x00,0x12,0x00,0x00,0x17,0x00,0x00,0x1C,0x00,0x00,0x22,0x00,0x00,0x27,0x00,0x00,0x2C,0x00,0x00,0x32,0x00,0x00,0x37,0x00,0x00,0x3C,0x00,0x00,0x41,0x00,0x00,0x45,0x00,0x00,0x4A,0x00,0x00,0x4D,0x00,0x00,0x51,0x00,0x00,0x53,0x00,0x00,0x55,0x00,0x00,0x55,0x00,0x02,0x55,0x02,0x03,0x55,0x03,0x06,0x55,0x03,0x07,0x55,0x05,0x09,0x55,0x06,0x0C,0x55,0x06,0x0F,0x55,0x07,0x10,0x55,0x09,0x13,0x55,0x0A,0x16,0x55,0x0C,0x1A,0x55,0x0C,0x1D,0x54,0x0E,0x20,0x53,0x10,0x23,0x54,0x11,0x26,0x53,0x13,0x2A,0x52,0x14,0x2E,0x51,0x15,0x31,0x50,0x17,0x35,0x50,0x19,0x38,0x4E,0x1A,0x3D,0x4D,0x1C,0x40,0x4D,0x1D,0x44,0x4C,0x1F,0x47,0x4B,0x21,0x4C,0x4A,0x23,0x4F,0x49,0x24,0x54,0x48,0x25,0x57,0x47,0x28,0x5B,0x46,0x29,0x5F,0x45,0x2B,0x62,0x44,0x2D,0x66,0x44,0x2E,0x6A,0x43,0x30,0x6E,0x42,0x32,0x72,0x41,0x33,0x76,0x40,0x35,0x79,0x3F,0x38,0x7C,0x3F,0x39,0x7F,0x3E,0x3B,0x83,0x3D,0x3D,0x86,0x3C,0x3F,0x8A,0x3B,0x40,0x8C,0x3B,0x43,0x8F,0x3B,0x44,0x92,0x3A,0x46,0x95,0x39,0x48,0x98,0x39,0x4A,0x9B,0x39,0x4C,0x9C,0x39,0x4E,0x9F,0x3A,0x4F,0xA1,0x39,0x51,0xA3,0x39,0x52,0xA4,0x39,0x54,0xA6,0x39,0x56,0xA7,0x39,0x57,0xA8,0x39,0x58,0xA8,0x3A,0x5A,0xA9,0x3A,0x5C,0xA8,0x3A,0x5D,0xA8,0x3B,0x5F,0xA8,0x3C,0x61,0xA8,0x3D,0x62,0xA8,0x3D,0x64,0xA9,0x3E,0x66,0xA8,0x3E,0x67,0xA9,0x3F,0x68,0xA8,0x40,0x6A,0xA8,0x41,0x6C,0xA8,0x42,0x6E,0xA8,0x42,0x70,0xA8,0x43,0x71,0xA8,0x44,0x73,0xA8,0x45,0x74,0xA9,0x46,0x76,0xA8,0x48,0x79,0xA8,0x49,0x7A,0xA7,0x4A,0x7C,0xA6,0x4A,0x7D,0xA5,0x4C,0x7F,0xA4,0x4D,0x81,0xA3,0x4E,0x83,0xA2,0x4E,0x85,0xA1,0x50,0x86,0xA0,0x51,0x88,0x9F,0x52,0x8A,0x9D,0x53,0x8B,0x9D,0x55,0x8D,0x9B,0x56,0x8F,0x9A,0x57,0x91,0x98,0x58,0x92,0x98,0x5A,0x94,0x97,0x5B,0x96,0x95,0x5C,0x97,0x94,0x5E,0x99,0x93,0x5F,0x9A,0x91,0x60,0x9C,0x90,0x61,0x9D,0x90,0x62,0x9F,0x8E,0x64,0xA1,0x8D,0x65,0xA2,0x8C,0x67,0xA3,0x8B,0x68,0xA5,0x8A,0x6A,0xA6,0x89,0x6A,0xA7,0x88,0x6B,0xA9,0x87,0x6D,0xAB,0x86,0x6E,0xAB,0x86,0x6F,0xAE,0x85,0x71,0xAE,0x85,0x72,0xAF,0x85,0x73,0xB0,0x84,0x75,0xB2,0x83,0x75,0xB2,0x83,0x77,0xB4,0x83,0x77,0xB5,0x83,0x79,0xB6,0x83,0x7A,0xB6,0x83,0x7B,0xB8,0x83,0x7D,0xB9,0x84,0x7E,0xB9,0x83,0x7F,0xBA,0x84,0x7F,0xBB,0x85,0x82,0xBC,0x85,0x83,0xBD,0x86,0x84,0xBD,0x87,0x85,0xBD,0x87,0x86,0xBE,0x88,0x88,0xBF,0x88,0x89,0xBF,0x89,0x8A,0xC0,0x8B,0x8B,0xC0,0x8C,0x8D,0xC1,0x8D,0x8F,0xC1,0x8E,0x90,0xC2,0x8F,0x91,0xC1,0x90,0x92,0xC2,0x91,0x94,0xC3,0x93,0x95,0xC3,0x93,0x97,0xC3,0x95,0x98,0xC3,0x96,0x99,0xC3,0x98,0x9B,0xC4,0x99,0x9C,0xC3,0x9A,0x9E,0xC4,0x9B,0x9F,0xC4,0x9D,0xA0,0xC4,0x9E,0xA2,0xC4,0x9F,0xA4,0xC4,0xA0,0xA5,0xC4,0xA2,0xA6,0xC4,0xA4,0xA8,0xC4,0xA5,0xA9,0xC5,0xA6,0xAA,0xC5,0xA8,0xAB,0xC4,0xA9,0xAC,0xC4,0xAA,0xAE,0xC4,0xAC,0xAF,0xC4,0xAD,0xB0,0xC4,0xAE,0xB2,0xC4,0xB0,0xB3,0xC4,0xB1,0xB4,0xC4,0xB3,0xB5,0xC5,0xB4,0xB6,0xC4,0xB6,0xB7,0xC4,0xB7,0xB8,0xC4,0xB7,0xBA,0xC4,0xB9,0xBA,0xC4,0xBA,0xBC,0xC4,0xBB,0xBC,0xC4,0xBC,0xBE,0xC4,0xBD,0xBF,0xC4,0xBE,0xBF,0xC4,0xBF,0xC0,0xC4,0xC0,0xC1,0xC4,0xC1,0xC2,0xC4,0xC2,0xC2,0xC4,0xC3,0xC4,0xC4,0xC3,0xC4,0xC4,0xC4}; //200 Pixels +static char hflm_data[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x01,0x01,0x02,0x02,0x01,0x04,0x02,0x01,0x04,0x02,0x03,0x05,0x03,0x03,0x07,0x04,0x04,0x08,0x04,0x03,0x09,0x04,0x04,0x0B,0x05,0x04,0x0C,0x05,0x05,0x0D,0x06,0x05,0x0E,0x07,0x06,0x10,0x07,0x07,0x11,0x08,0x07,0x12,0x09,0x08,0x14,0x09,0x08,0x15,0x0A,0x09,0x17,0x0A,0x09,0x19,0x0B,0x0A,0x1A,0x0C,0x0A,0x1C,0x0D,0x0B,0x1D,0x0D,0x0B,0x1F,0x0D,0x0C,0x22,0x0F,0x0D,0x23,0x0F,0x0E,0x25,0x10,0x0E,0x26,0x11,0x0F,0x28,0x12,0x10,0x2A,0x13,0x10,0x2C,0x13,0x11,0x2E,0x14,0x12,0x2F,0x15,0x12,0x31,0x15,0x13,0x33,0x16,0x14,0x35,0x17,0x15,0x36,0x18,0x15,0x39,0x19,0x16,0x3B,0x19,0x17,0x3D,0x1B,0x17,0x3E,0x1B,0x18,0x40,0x1C,0x19,0x42,0x1D,0x1A,0x43,0x1D,0x1B,0x45,0x1E,0x1C,0x47,0x1F,0x1C,0x49,0x20,0x1D,0x4B,0x21,0x1F,0x4C,0x21,0x1F,0x4E,0x22,0x20,0x50,0x23,0x21,0x52,0x23,0x22,0x53,0x24,0x23,0x55,0x25,0x23,0x56,0x26,0x24,0x59,0x26,0x25,0x5A,0x27,0x26,0x5B,0x28,0x27,0x5D,0x28,0x28,0x5E,0x29,0x29,0x60,0x29,0x2A,0x62,0x2A,0x2B,0x63,0x2B,0x2C,0x64,0x2C,0x2E,0x65,0x2C,0x2E,0x66,0x2C,0x2F,0x68,0x2D,0x31,0x69,0x2E,0x32,0x6A,0x2F,0x32,0x6B,0x2F,0x34,0x6C,0x30,0x34,0x6D,0x30,0x35,0x6F,0x31,0x37,0x70,0x31,0x38,0x71,0x32,0x39,0x72,0x33,0x3B,0x73,0x33,0x3C,0x74,0x34,0x3D,0x75,0x35,0x3E,0x76,0x35,0x3F,0x78,0x36,0x41,0x78,0x36,0x42,0x79,0x36,0x43,0x7A,0x37,0x44,0x7B,0x37,0x46,0x7C,0x38,0x48,0x7D,0x39,0x48,0x7E,0x3A,0x49,0x7F,0x39,0x4B,0x80,0x3A,0x4C,0x81,0x3B,0x4E,0x82,0x3C,0x4F,0x83,0x3C,0x51,0x84,0x3C,0x52,0x84,0x3D,0x54,0x86,0x3E,0x55,0x87,0x3E,0x56,0x88,0x3F,0x57,0x89,0x40,0x59,0x8A,0x40,0x5A,0x8A,0x41,0x5C,0x8B,0x41,0x5D,0x8C,0x42,0x5F,0x8D,0x41,0x60,0x8E,0x42,0x62,0x8E,0x42,0x62,0x8F,0x44,0x65,0x90,0x43,0x65,0x91,0x45,0x67,0x91,0x44,0x69,0x92,0x45,0x6A,0x93,0x46,0x6B,0x94,0x46,0x6C,0x94,0x46,0x6E,0x96,0x47,0x70,0x96,0x48,0x70,0x97,0x48,0x72,0x98,0x48,0x73,0x99,0x49,0x74,0x99,0x49,0x76,0x9A,0x4A,0x77,0x9A,0x4B,0x78,0x9B,0x4B,0x7A,0x9C,0x4B,0x7B,0x9D,0x4B,0x7C,0x9E,0x4C,0x7D,0x9F,0x4C,0x7E,0x9F,0x4D,0x7F,0xA0,0x4E,0x80,0xA0,0x4E,0x82,0xA1,0x4E,0x83,0xA2,0x4F,0x84,0xA3,0x4F,0x85,0xA3,0x4F,0x86,0xA4,0x4F,0x88,0xA5,0x50,0x89,0xA5,0x50,0x89,0xA6,0x51,0x8B,0xA6,0x51,0x8B,0xA7,0x51,0x8D,0xA8,0x51,0x8E,0xA9,0x52,0x8F,0xAA,0x52,0x90,0xAA,0x53,0x92,0xAB,0x53,0x92,0xAB,0x53,0x93,0xAC,0x54,0x95,0xAD,0x53,0x95,0xAE,0x54,0x96,0xAE,0x55,0x98,0xAE,0x54,0x98,0xAF,0x55,0x9A,0xB0,0x56,0x9B,0xB0,0x56,0x9C,0xB1,0x56,0x9D,0xB1,0x56,0x9E,0xB2,0x56,0xA0,0xB3,0x57,0xA0,0xB3,0x57,0xA1,0xB3,0x57,0xA2,0xB4,0x58,0xA3,0xB4,0x58,0xA4,0xB5,0x57,0xA5,0xB6,0x58,0xA6,0xB6,0x58,0xA7,0xB7,0x58,0xA8,0xB7,0x59,0xA9,0xB8,0x58,0xAA,0xB9,0x5A,0xAB,0xB9,0x59,0xAC,0xBA,0x5A,0xAD,0xBA,0x5A,0xAE,0xBB,0x5A,0xAF,0xBB,0x5A,0xB0,0xBC,0x5B,0xB0,0xBC,0x5A,0xB1,0xBD,0x5B,0xB2,0xBD,0x5B,0xB3,0xBD,0x5B,0xB4,0xBE,0x5C,0xB5,0xBE,0x5B,0xB5,0xBE,0x5B,0xB7,0xBF,0x5C,0xB7,0xBF,0x5C,0xB8,0xBF,0x5C,0xB9,0xC0,0x5C,0xB9,0xC0,0x5C,0xBA,0xC0,0x5C,0xBA,0xC1,0x5D,0xBB,0xC2,0x5D,0xBC,0xC2,0x5D,0xBC,0xC2,0x5D,0xBD,0xC2,0x5E,0xBE,0xC3,0x5E,0xBE,0xC3,0x5E,0xBF,0xC3,0x5E,0xC0,0xC3,0x5E,0xC0,0xC4,0x5E,0xC1,0xC4,}; //200 Pixels +static char firw_data[] = {0xFF,0x00,0xFF,0xFF,0x00,0xFF,0xFC,0x00,0xFF,0xF8,0x00,0xFF,0xF3,0x00,0xFF,0xEE,0x00,0xFF,0xE9,0x00,0xFF,0xE4,0x00,0xFF,0xDD,0x00,0xFF,0xD8,0x00,0xFF,0xD2,0x00,0xFF,0xCB,0x00,0xFF,0xC4,0x00,0xFF,0xBD,0x00,0xFF,0xB5,0x00,0xFF,0xAD,0x00,0xFF,0xA6,0x00,0xFF,0x9E,0x00,0xFF,0x96,0x00,0xFF,0x8E,0x00,0xFF,0x87,0x00,0xFF,0x7E,0x00,0xFF,0x77,0x00,0xFF,0x6E,0x00,0xFF,0x66,0x00,0xFF,0x5E,0x00,0xFF,0x56,0x00,0xFF,0x4F,0x00,0xFF,0x47,0x00,0xFF,0x40,0x00,0xFF,0x39,0x00,0xFF,0x32,0x00,0xFF,0x2B,0x00,0xFF,0x25,0x00,0xFF,0x1E,0x00,0xFF,0x19,0x00,0xFF,0x14,0x00,0xFF,0x0F,0x00,0xFF,0x0A,0x00,0xFF,0x06,0x00,0xFF,0x01,0x00,0xFF,0x00,0x01,0xFF,0x00,0x05,0xFF,0x00,0x09,0xFF,0x00,0x0E,0xFF,0x00,0x13,0xFF,0x00,0x18,0xFF,0x00,0x1E,0xFF,0x00,0x24,0xFF,0x00,0x2A,0xFF,0x00,0x30,0xFF,0x00,0x37,0xFF,0x00,0x3E,0xFF,0x00,0x45,0xFF,0x00,0x4D,0xFF,0x00,0x55,0xFF,0x00,0x5C,0xFF,0x00,0x64,0xFF,0x00,0x6C,0xFF,0x00,0x74,0xFF,0x00,0x7C,0xFF,0x00,0x84,0xFF,0x00,0x8D,0xFF,0x00,0x95,0xFF,0x00,0x9D,0xFF,0x00,0xA4,0xFF,0x00,0xAC,0xFF,0x00,0xB3,0xFF,0x00,0xBB,0xFF,0x00,0xC2,0xFF,0x00,0xC9,0xFF,0x00,0xD0,0xFF,0x00,0xD7,0xFF,0x00,0xDD,0xFF,0x00,0xE3,0xFF,0x00,0xE9,0xFF,0x00,0xED,0xFF,0x00,0xF2,0xFF,0x00,0xF6,0xFF,0x00,0xFB,0xFF,0x00,0xFE,0xFF,0x00,0xFF,0xFC,0x00,0xFF,0xF8,0x00,0xFF,0xF4,0x00,0xFF,0xF0,0x00,0xFF,0xEA,0x00,0xFF,0xE5,0x00,0xFF,0xDF,0x00,0xFF,0xD9,0x00,0xFF,0xD3,0x00,0xFF,0xCC,0x00,0xFF,0xC5,0x00,0xFF,0xBD,0x00,0xFF,0xB7,0x00,0xFF,0xAF,0x00,0xFF,0xA7,0x00,0xFF,0xA0,0x00,0xFF,0x97,0x00,0xFF,0x8F,0x00,0xFF,0x88,0x00,0xFF,0x80,0x00,0xFF,0x77,0x00,0xFF,0x6F,0x00,0xFF,0x68,0x00,0xFF,0x5F,0x00,0xFF,0x57,0x00,0xFF,0x50,0x00,0xFF,0x48,0x00,0xFF,0x41,0x00,0xFF,0x3A,0x00,0xFF,0x33,0x00,0xFF,0x2D,0x00,0xFF,0x26,0x00,0xFF,0x20,0x00,0xFF,0x1A,0x00,0xFF,0x15,0x00,0xFF,0x10,0x00,0xFF,0x0B,0x00,0xFF,0x07,0x00,0xFF,0x03,0x00,0xFF,0x00,0x04,0xFF,0x00,0x08,0xFF,0x00,0x0D,0xFF,0x00,0x11,0xFF,0x00,0x17,0xFF,0x00,0x1D,0xFF,0x00,0x23,0xFF,0x00,0x28,0xFF,0x00,0x2F,0xFF,0x00,0x36,0xFF,0x00,0x3D,0xFF,0x00,0x44,0xFF,0x00,0x4B,0xFF,0x00,0x53,0xFF,0x00,0x5A,0xFF,0x00,0x62,0xFF,0x00,0x6B,0xFF,0x00,0x72,0xFF,0x00,0x7B,0xFF,0x00,0x82,0xFF,0x00,0x8A,0xFF,0x00,0x92,0xFF,0x00,0x9A,0xFF,0x00,0xA3,0xFF,0x00,0xAA,0xFF,0x00,0xB1,0xFF,0x00,0xBA,0xFF,0x00,0xC1,0xFF,0x00,0xC8,0xFF,0x00,0xCF,0xFF,0x00,0xD5,0xFF,0x00,0xDB,0xFF,0x00,0xE1,0xFF,0x00,0xE7,0xFF,0x00,0xEC,0xFF,0x00,0xF1,0xFF,0x00,0xF6,0xFF,0x00,0xFA,0xFF,0x00,0xFE,0xFF,0x00,0xFF,0xFD,0x00,0xFF,0xF9,0x00,0xFF,0xF5,0x00,0xFF,0xF1,0x00,0xFF,0xEB,0x00,0xFF,0xE6,0x00,0xFF,0xE0,0x00,0xFF,0xDB,0x00,0xFF,0xD4,0x00,0xFF,0xCE,0x00,0xFF,0xC7,0x00,0xFF,0xBF,0x00,0xFF,0xB8,0x00,0xFF,0xB1,0x00,0xFF,0xA9,0x00,0xFF,0xA1,0x00,0xFF,0x99,0x00,0xFF,0x91,0x00,0xFF,0x89,0x00,0xFF,0x82,0x00,0xFF,0x79,0x00,0xFF,0x71,0x00,0xFF,0x6A,0x00,0xFF,0x61,0x00,0xFF,0x59,0x00,0xFF,0x52,0x00,0xFF,0x4A,0x00,0xFF,0x43,0x00,0xFF,0x3C,0x00,0xFF,0x34,0x00,0xFF,0x2E,0x00,0xFF,0x28,0x00,0xFF,0x22,0x00,0xFF,0x1B,0x00,0xFF,0x16,0x00,0xFF,0x10,0x00,0xFF,0x0C,0x00,0xFF,0x08,0x00,0xFF,0x04,0x00,0xFF,0x00,0x00,}; //200 Pixels +#endif diff --git a/data/icon.h b/data/icon.h new file mode 100644 index 0000000..4eeff5e --- /dev/null +++ b/data/icon.h @@ -0,0 +1,22 @@ +/** + * Powder Toy - Main source + * + * Copyright (c) 2008 - 2010 Stanislaw Skowronek. + * Copyright (c) 2010 Simon Robertshaw + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + */ +static unsigned char app_icon[] = {0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0xd3,0xd9,0xe0,0xff,0xd3,0xd9,0xe0,0xff,0xd3,0xd9,0xe0,0xff,0xd3,0xd9,0xe0,0xff,0xd3,0xd9,0xe0,0xff,0xd3,0xd9,0xe0,0xff,0xd3,0xd9,0xe0,0xff,0xd3,0xd9,0xe0,0xff,0xd3,0xd9,0xe0,0xff,0x68,0x79,0x91,0xff,0xd3,0xd9,0xe0,0xff,0x68,0x79,0x91,0xff,0xd3,0xd9,0xe0,0xff,0x68,0x79,0x91,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x56,0x03,0x08,0xff,0xdb,0x07,0x05,0xff,0xff,0xc4,0x10,0xff,0xff,0xfe,0x14,0xff,0xff,0xff,0x23,0xff,0xff,0xff,0x16,0xff,0xff,0x9a,0x0a,0xff,0xff,0x64,0x0c,0xff,0xff,0x44,0x0a,0xff,0xff,0x22,0x0b,0xff,0xc0,0x24,0x0d,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0xff,0x24,0x00,0xff,0xff,0x96,0x1c,0xff,0xff,0xff,0x89,0xff,0xff,0xff,0x30,0xff,0xff,0xfd,0x00,0xff,0xff,0xd6,0x03,0xff,0xff,0x63,0x01,0xff,0xff,0x9a,0x00,0xff,0xff,0xbe,0x0a,0xff,0xff,0x5e,0x00,0xff,0xc3,0x0c,0x0c,0xff,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0xff,0xe2,0x41,0xff,0xff,0xff,0xd8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe9,0xff,0xff,0xf3,0x43,0xff,0xff,0xe8,0x00,0xff,0xff,0xfb,0x15,0xff,0xff,0xff,0x62,0xff,0xff,0xff,0xc6,0xff,0xff,0xff,0x5b,0xff,0xc2,0x77,0x08,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0xff,0xff,0xcc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc6,0xff,0xff,0xff,0x99,0xff,0xff,0xff,0xd5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0xff,0xc4,0xae,0x26,0xff,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0xff,0xda,0x87,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfd,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcd,0xff,0xc1,0x89,0x20,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0xff,0x68,0x09,0xff,0xff,0xf5,0x72,0xff,0xff,0xff,0xbf,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xe5,0xff,0xff,0xfd,0xcf,0xff,0xff,0xf5,0xcd,0xff,0xff,0xff,0xd4,0xff,0xff,0xff,0xd0,0xff,0xff,0xf2,0x3d,0xff,0xc3,0x48,0x03,0xff,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x98,0x15,0x0f,0xff,0xaf,0x3d,0x09,0xff,0xad,0x4f,0x0d,0xff,0xae,0x6b,0x1b,0xff,0xb0,0x76,0x1e,0xff,0xa1,0x36,0x08,0xff,0x95,0x26,0x07,0xff,0xad,0x5b,0x16,0xff,0xbf,0x99,0x26,0xff,0xad,0x59,0x09,0xff,0x76,0x22,0x16,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff,0x8f,0x92,0x97,0xff}; +static unsigned char app_icon_w32[] = { 0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x44,0x47,0x49,0x00,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x44,0x46,0x48,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x86,0x88,0x8A,0xFF,0xD8,0xDE,0xE6,0xFF,0xD1,0xD7,0xDF,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0xD1,0xD7,0xDE,0xFF,0x68,0x79,0x91,0xFF,0xD1,0xD7,0xDE,0xFF,0x68,0x79,0x91,0xFF,0xD1,0xD7,0xDE,0xFF,0x68,0x79,0x91,0xFF,0xD1,0xD7,0xDE,0xFF,0x81,0x84,0x88,0xFF,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x83,0x85,0x89,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x02,0x00,0x00,0xFF,0x06,0x00,0x00,0xFF,0x05,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x1E,0x00,0x00,0xFF,0x07,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x01,0x00,0x00,0xFF,0x05,0x00,0x00,0xFF,0x03,0x00,0x00,0xFF,0x02,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x14,0x00,0x00,0xFF,0xE1,0x01,0x00,0xFF,0xF4,0x03,0x00,0xFF,0x24,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x7F,0x81,0x86,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x05,0x00,0x00,0xFF,0x0F,0x00,0x00,0xFF,0x05,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x03,0x00,0x00,0xFF,0x36,0x01,0x00,0xFF,0x06,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x01,0x00,0x00,0xFF,0x02,0x00,0x00,0xFF,0x01,0x00,0x00,0xFF,0x01,0x00,0x00,0xFF,0x07,0x00,0x00,0xFF,0x06,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x1A,0x00,0x00,0xFF,0xE7,0x0A,0x01,0xFF,0xFF,0x07,0x01,0xFF,0x41,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x7F,0x81,0x85,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x1A,0x00,0x00,0xFF,0x16,0x01,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x0B,0x00,0x00,0xFF,0x55,0x02,0x00,0xFF,0x04,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x01,0x00,0x00,0xFF,0x01,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x02,0x00,0x00,0xFF,0x03,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x39,0x00,0x00,0xFF,0xF8,0x1B,0x02,0xFF,0xFF,0x2F,0x03,0xFF,0x52,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x7F,0x81,0x85,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x1C,0x00,0x00,0xFF,0x5C,0x01,0x00,0xFF,0x09,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x36,0x01,0x00,0xFF,0xAE,0x04,0x01,0xFF,0x02,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x01,0x00,0x00,0xFF,0x01,0x00,0x00,0xFF,0x01,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x50,0x00,0x00,0xFF,0xFE,0x44,0x02,0xFF,0xFF,0x5C,0x03,0xFF,0x60,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x7F,0x81,0x85,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x12,0x00,0x00,0xFF,0x9F,0x02,0x00,0xFF,0x49,0x01,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x73,0x04,0x00,0xFF,0xEC,0x09,0x01,0xFF,0x2B,0x00,0x00,0xFF,0x06,0x00,0x00,0xFF,0x13,0x00,0x00,0xFF,0x07,0x00,0x00,0xFF,0x04,0x00,0x00,0xFF,0x04,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x4E,0x06,0x00,0xFF,0xFF,0xC1,0x08,0xFF,0xFD,0x9A,0x07,0xFF,0x49,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x7F,0x81,0x85,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x8B,0x01,0x00,0xFF,0xD5,0x03,0x00,0xFF,0x07,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x03,0x00,0x00,0xFF,0xB7,0x0D,0x01,0xFF,0xFF,0x0F,0x02,0xFF,0xDE,0x00,0x00,0xFF,0xAB,0x00,0x00,0xFF,0xA5,0x01,0x00,0xFF,0x3D,0x00,0x00,0xFF,0x02,0x00,0x00,0xFF,0x03,0x00,0x00,0xFF,0x03,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x8B,0x35,0x03,0xFF,0xFF,0xF0,0x0E,0xFF,0xDF,0x4B,0x01,0xFF,0x14,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0x00,0x00,0x00,0xFF,0x55,0x00,0x00,0xFF,0xFF,0x05,0x01,0xFF,0x73,0x01,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x1B,0x00,0x00,0xFF,0xE5,0x0F,0x01,0xFF,0xFF,0x0D,0x02,0xFF,0xFF,0x04,0x01,0xFF,0xFF,0x03,0x00,0xFF,0xFF,0x01,0x00,0xFF,0x8F,0x00,0x00,0xFF,0x02,0x00,0x00,0xFF,0x02,0x00,0x00,0xFF,0x03,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x1B,0x00,0x00,0xFF,0xD9,0x47,0x03,0xFF,0xFF,0x92,0x06,0xFF,0xAF,0x12,0x00,0xFF,0x01,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0x20,0x00,0x00,0xFF,0xE5,0x08,0x01,0xFF,0xD1,0x04,0x01,0xFF,0x0E,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x30,0x01,0x00,0xFF,0xF6,0x47,0x04,0xFF,0xFF,0x1F,0x02,0xFF,0xFF,0x03,0x01,0xFF,0xFF,0x06,0x01,0xFF,0xFF,0x03,0x00,0xFF,0xC7,0x01,0x00,0xFF,0x1F,0x00,0x00,0xFF,0x03,0x00,0x00,0xFF,0x06,0x01,0x00,0xFF,0x00,0x00,0x00,0xFF,0x38,0x02,0x00,0xFF,0xFB,0x72,0x07,0xFF,0xFF,0x5A,0x03,0xFF,0x73,0x01,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0xA1,0x02,0x00,0xFF,0xFF,0x0C,0x03,0xFF,0x7B,0x01,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x3B,0x06,0x00,0xFF,0xFF,0xBB,0x0C,0xFF,0xFF,0x56,0x04,0xFF,0xFF,0x00,0x01,0xFF,0xFF,0x10,0x03,0xFF,0xFF,0x02,0x01,0xFF,0xDE,0x01,0x00,0xFF,0x34,0x00,0x00,0xFF,0x03,0x00,0x00,0xFF,0x05,0x01,0x00,0xFF,0x00,0x00,0x00,0xFF,0x3B,0x03,0x00,0xFF,0xFC,0x83,0x06,0xFF,0xFF,0x71,0x03,0xFF,0x83,0x05,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0xFB,0x18,0x03,0xFF,0xFF,0x0E,0x02,0xFF,0xB9,0x00,0x00,0xFF,0x06,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x21,0x01,0x00,0xFF,0xE8,0xB9,0x0F,0xFF,0xFF,0x8F,0x0C,0xFF,0xFF,0x02,0x00,0xFF,0xFF,0x3C,0x04,0xFF,0xFF,0x16,0x02,0xFF,0xFD,0x00,0x00,0xFF,0x63,0x00,0x00,0xFF,0x02,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x40,0x0B,0x00,0xFF,0xFE,0xAD,0x06,0xFF,0xFF,0xC9,0x06,0xFF,0xCC,0x45,0x02,0xFF,0x08,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0xFF,0x49,0x03,0xFF,0xFF,0x7E,0x03,0xFF,0xFF,0x45,0x01,0xFF,0x67,0x05,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x09,0x00,0x00,0xFF,0xCC,0xA0,0x08,0xFF,0xFB,0xAA,0x0A,0xFF,0xC9,0x00,0x00,0xFF,0xFE,0x6B,0x03,0xFF,0xFF,0x79,0x02,0xFF,0xF9,0x0A,0x00,0xFF,0x4C,0x00,0x00,0xFF,0x02,0x00,0x00,0xFF,0x08,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x3F,0x14,0x00,0xFF,0xFC,0xDF,0x10,0xFF,0xFF,0xFF,0x10,0xFF,0xFA,0xCD,0x14,0xFF,0x46,0x0C,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0xFF,0x7F,0x03,0xFF,0xFF,0xFF,0x06,0xFF,0xFF,0xE7,0x03,0xFF,0xD5,0x39,0x01,0xFF,0x0E,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x1A,0x06,0x00,0xFF,0xEA,0xCF,0x17,0xFF,0xE2,0xA6,0x10,0xFF,0x32,0x00,0x00,0xFF,0xCB,0x80,0x06,0xFF,0xFF,0xF4,0x09,0xFF,0xD8,0x44,0x00,0xFF,0x10,0x00,0x00,0xFF,0x01,0x00,0x00,0xFF,0x07,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x44,0x21,0x00,0xFF,0xFD,0xE9,0x1C,0xFF,0xFF,0xD6,0x09,0xFF,0xFF,0xFF,0x28,0xFF,0xB4,0x75,0x04,0xFF,0x01,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0xFF,0x8D,0x03,0xFF,0xFF,0xFF,0x41,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,0x7E,0x01,0xFF,0x4C,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x49,0x30,0x04,0xFF,0xFF,0xFC,0x5A,0xFF,0xB0,0x7E,0x14,0xFF,0x00,0x00,0x00,0xFF,0x89,0x66,0x0F,0xFF,0xFF,0xFF,0x6B,0xFF,0xE6,0xA7,0x1E,0xFF,0x1E,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x6F,0x5A,0x18,0xFF,0xFF,0xFE,0x70,0xFF,0xCD,0x6C,0x04,0xFF,0xE8,0xB5,0x27,0xFF,0xFE,0xF3,0x60,0xFF,0x6E,0x3D,0x08,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0xDB,0x8A,0x26,0xFF,0xFF,0xFF,0xD5,0xFF,0xFF,0xFF,0xD8,0xFF,0xFF,0xCF,0x3A,0xFF,0x94,0x12,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x15,0x0A,0x01,0xFF,0xBF,0xAC,0x7E,0xFF,0xFF,0xFF,0xDE,0xFF,0x82,0x5F,0x20,0xFF,0x00,0x00,0x00,0xFF,0x67,0x5B,0x28,0xFF,0xFF,0xFF,0xF3,0xFF,0xFF,0xF1,0xAA,0xFF,0x5D,0x2E,0x07,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x18,0x0D,0x02,0xFF,0xD0,0xC0,0x90,0xFF,0xFF,0xFF,0xF4,0xFF,0x92,0x61,0x27,0xFF,0x72,0x3F,0x0F,0xFF,0xFF,0xFF,0xE2,0xFF,0xFA,0xE5,0xAE,0xFF,0x80,0x4B,0x19,0xFF,0x02,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0xC9,0xA1,0x64,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFB,0xB2,0xFF,0xA1,0x33,0x03,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x01,0x00,0x00,0xFF,0x96,0x7E,0x5E,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7E,0x6A,0x41,0xFF,0x00,0x00,0x00,0xFF,0x7F,0x75,0x56,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xA9,0x8D,0x54,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x8C,0x69,0x4F,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0x93,0x82,0x58,0xFF,0x16,0x05,0x00,0xFF,0xEB,0xDB,0xB8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF2,0xBD,0xFF,0x62,0x42,0x14,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0xA3,0x7F,0x47,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0xDD,0xA4,0xFF,0x51,0x19,0x02,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x04,0x00,0x00,0xFF,0xD0,0xB6,0x88,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x6A,0x5A,0x39,0xFF,0x00,0x00,0x00,0xFF,0x85,0x7D,0x4E,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xB4,0xA5,0x73,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0xB5,0x9B,0x6F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x8B,0x78,0x4E,0xFF,0x00,0x00,0x00,0xFF,0xCC,0xAE,0x7E,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x8F,0x74,0x38,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0x24,0x14,0x03,0xFF,0x8C,0x7E,0x44,0xFF,0xA2,0x8E,0x5D,0xFF,0x5B,0x37,0x17,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x71,0x46,0x1E,0xFF,0xCB,0xA4,0x71,0xFF,0xAC,0x93,0x66,0xFF,0x17,0x0E,0x04,0xFF,0x00,0x00,0x00,0xFF,0x30,0x23,0x0A,0xFF,0xBF,0xA4,0x60,0xFF,0xC4,0xAC,0x78,0xFF,0x43,0x34,0x1A,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x5C,0x3D,0x18,0xFF,0xC9,0xA9,0x6F,0xFF,0xB8,0x94,0x63,0xFF,0x2A,0x19,0x07,0xFF,0x00,0x00,0x00,0xFF,0x53,0x3B,0x16,0xFF,0xC7,0xB6,0x70,0xFF,0xBD,0xA2,0x66,0xFF,0x2C,0x1C,0x09,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0x00,0x00,0x00,0xFF,0x47,0x14,0x14,0xFF,0x47,0x14,0x14,0xFF,0x00,0x00,0x00,0xFF,0x1F,0x30,0xD6,0xFF,0x1F,0x30,0xD6,0xFF,0x00,0x00,0x00,0xFF,0xF7,0x0F,0x00,0xFF,0xF7,0x0F,0x00,0xFF,0x00,0x00,0x00,0xFF,0xC8,0x47,0x0E,0xFF,0xC8,0x47,0x0E,0xFF,0x00,0x00,0x00,0xFF,0x20,0xE6,0x0F,0xFF,0x20,0xE6,0x0F,0xFF,0x00,0x00,0x00,0xFF,0xEB,0xF5,0x22,0xFF,0xEB,0xF5,0x22,0xFF,0x00,0x00,0x00,0xFF,0x40,0x40,0x40,0xFF,0x79,0x79,0x79,0xFF,0x00,0x00,0x00,0xFF,0x79,0x79,0x79,0xFF,0x79,0x79,0x79,0xFF,0x00,0x00,0x00,0xFF,0xD7,0xF1,0x00,0xFF,0xD7,0xF1,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0x00,0x00,0x00,0xFF,0xFE,0xFF,0xFF,0xFF,0x00,0x00,0x00,0xFF,0xFE,0xFF,0xFF,0xFF,0x00,0x00,0x00,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0x00,0x00,0x00,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0x00,0x00,0x00,0xFF,0xFE,0xFF,0xFF,0xFF,0x00,0x00,0x00,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0x00,0x00,0x00,0xFF,0xFE,0xFF,0xFF,0xFF,0x00,0x00,0x00,0xFF,0xFE,0xFF,0xFF,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x81,0x84,0x88,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x81,0x84,0x88,0xFF,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x44,0x46,0x48,0x00,0x7A,0x7D,0x81,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x83,0x86,0x8A,0xFF,0x86,0x89,0x8C,0xFF,0x89,0x8C,0x8F,0xFF,0x87,0x8A,0x8F,0xFF,0x85,0x87,0x8B,0xFF,0x82,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x81,0x84,0x88,0xFF,0x44,0x46,0x48,0x00,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x04,0x03,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00,0x03,0x05,0x04,0x00 }; \ No newline at end of file diff --git a/data/icondoc.h b/data/icondoc.h new file mode 100644 index 0000000..6a79145 --- /dev/null +++ b/data/icondoc.h @@ -0,0 +1,138 @@ +/** + * Powder Toy - Main source + * + * Copyright (c) 2008 - 2010 Stanislaw Skowronek. + * Copyright (c) 2010 Simon Robertshaw + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + */ + +static unsigned char icon_doc_32_png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7a, 0x7a, + 0xf4, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00, + 0x00, 0x06, 0x62, 0x4b, 0x47, 0x44, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xa0, 0xbd, 0xa7, 0x93, + 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, + 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xdb, 0x04, + 0x06, 0x11, 0x21, 0x0c, 0xfc, 0x0b, 0x2f, 0xdf, 0x00, 0x00, 0x04, 0x65, 0x49, 0x44, 0x41, 0x54, + 0x58, 0xc3, 0xb5, 0x96, 0x7f, 0x4c, 0xd4, 0x65, 0x1c, 0xc7, 0x5f, 0xcf, 0x73, 0xdf, 0xe3, 0x7e, + 0x90, 0x8b, 0x98, 0xb8, 0x36, 0x12, 0xb8, 0x38, 0x69, 0x03, 0x4c, 0x64, 0xec, 0x6a, 0xa2, 0xd3, + 0xb5, 0x74, 0x78, 0x4c, 0x42, 0x33, 0x51, 0xda, 0x5c, 0xe3, 0x97, 0x72, 0x79, 0xcc, 0x5c, 0xfd, + 0x53, 0xcb, 0x50, 0x69, 0x93, 0xda, 0x9a, 0x3a, 0x0d, 0x0d, 0x99, 0xf3, 0x9f, 0x3b, 0x98, 0x89, + 0x72, 0x14, 0x64, 0xb2, 0x62, 0x2b, 0x56, 0xad, 0x56, 0x20, 0xbf, 0x06, 0x3a, 0xe1, 0x1c, 0x8b, + 0xed, 0x86, 0x89, 0x77, 0x96, 0x7f, 0x30, 0xf6, 0xed, 0x0f, 0xb9, 0x1b, 0xe6, 0x1d, 0x7c, 0x39, + 0xe8, 0xb3, 0x3d, 0x7b, 0xbe, 0xcf, 0xb3, 0xef, 0xf3, 0x7c, 0x5f, 0xcf, 0xfb, 0xf3, 0xe3, 0xf9, + 0x0a, 0x9e, 0xb4, 0xd5, 0x40, 0x0a, 0x0b, 0x37, 0x3f, 0x30, 0x0a, 0x78, 0x17, 0xb2, 0x48, 0x09, + 0x33, 0x97, 0x52, 0x52, 0x52, 0xe2, 0x11, 0x42, 0xa0, 0xaa, 0x2a, 0x42, 0x08, 0x80, 0xd0, 0xb3, + 0xaa, 0xaa, 0xa1, 0x17, 0x55, 0x55, 0x45, 0x55, 0x55, 0xcc, 0x66, 0x33, 0x05, 0x05, 0x05, 0x3e, + 0xa7, 0xd3, 0x59, 0x73, 0xf3, 0xe6, 0xcd, 0xd6, 0x19, 0x90, 0xa8, 0x01, 0xa4, 0x10, 0x82, 0xce, + 0xce, 0x4e, 0x4d, 0x1b, 0x5c, 0xe8, 0xed, 0x61, 0x6f, 0x7a, 0x26, 0x89, 0x89, 0x89, 0x2b, 0xda, + 0xdb, 0xdb, 0x3f, 0xcd, 0xcb, 0xcb, 0xd3, 0xdf, 0xba, 0x75, 0xab, 0x59, 0x2b, 0x84, 0x0c, 0x33, + 0xa7, 0x9f, 0x7d, 0xca, 0xf9, 0xec, 0xfc, 0xa9, 0xd3, 0x08, 0x21, 0x68, 0x68, 0x68, 0xc0, 0xe7, + 0xf3, 0x19, 0x3a, 0x3a, 0x3a, 0x6a, 0xad, 0x56, 0xeb, 0x0e, 0xad, 0x6e, 0x94, 0x91, 0x14, 0xd0, + 0xd2, 0x00, 0xba, 0xea, 0xeb, 0x11, 0x42, 0x30, 0x35, 0x35, 0x45, 0x57, 0x57, 0x17, 0x89, 0x89, + 0x89, 0x4a, 0x5b, 0x5b, 0x5b, 0xad, 0xc5, 0x62, 0x79, 0x5d, 0x0b, 0x84, 0x24, 0x4a, 0xeb, 0x77, + 0x55, 0x86, 0x20, 0x84, 0x10, 0x48, 0x29, 0x19, 0x1e, 0x1e, 0x46, 0x4a, 0x49, 0x52, 0x52, 0x92, + 0xd2, 0xda, 0xda, 0x7a, 0x5c, 0x0b, 0x44, 0xd4, 0x00, 0x19, 0xc5, 0x75, 0xa1, 0x8f, 0x03, 0x48, + 0x29, 0x19, 0x1f, 0x1f, 0x0f, 0xc1, 0x58, 0x2c, 0x16, 0xa5, 0xb9, 0xb9, 0x79, 0x5e, 0x25, 0xa2, + 0x06, 0x98, 0x6d, 0x41, 0x97, 0x04, 0x01, 0x14, 0x45, 0x41, 0x51, 0x14, 0x52, 0x53, 0x53, 0x75, + 0x4d, 0x4d, 0x4d, 0xb5, 0xc9, 0xc9, 0xc9, 0x11, 0x21, 0x16, 0x05, 0x30, 0xe0, 0x7e, 0xfb, 0x31, + 0x08, 0x9f, 0xcf, 0x47, 0x42, 0x42, 0x02, 0xf1, 0xf1, 0xf1, 0x58, 0xad, 0x56, 0xb2, 0xb3, 0xb3, + 0x71, 0x3a, 0x9d, 0x3a, 0x87, 0xc3, 0x71, 0x24, 0x21, 0x21, 0xe1, 0x9d, 0x70, 0x10, 0x32, 0xd2, + 0x89, 0xe6, 0x8d, 0x01, 0xb7, 0x83, 0xf4, 0x3d, 0x67, 0x1e, 0x5b, 0xa3, 0xd7, 0xeb, 0x31, 0x9b, + 0xcd, 0xc4, 0xc6, 0xc6, 0x32, 0x3d, 0x3d, 0x4d, 0x20, 0x10, 0x60, 0x64, 0x64, 0x84, 0x93, 0x27, + 0x4f, 0xc6, 0x66, 0x66, 0x66, 0x96, 0x6a, 0x06, 0x98, 0x2d, 0x6b, 0xb8, 0x76, 0x65, 0x70, 0x90, + 0xcc, 0xe2, 0xba, 0xd0, 0x78, 0xc0, 0xed, 0x08, 0xf9, 0x3e, 0x26, 0x26, 0x06, 0xa3, 0xd1, 0x88, + 0xc1, 0x60, 0xc0, 0x64, 0x32, 0x61, 0x30, 0x18, 0x1e, 0x15, 0x1c, 0x45, 0x89, 0x05, 0xe2, 0x16, + 0xed, 0x82, 0x6a, 0xcf, 0x55, 0x76, 0xa4, 0xa7, 0x87, 0xc6, 0x6f, 0x1c, 0x3b, 0xfa, 0x44, 0x40, + 0x06, 0x61, 0xa4, 0x94, 0xe8, 0x74, 0x3a, 0xf4, 0x7a, 0x3d, 0x26, 0x93, 0x09, 0x40, 0xa7, 0xa5, + 0x12, 0x22, 0x65, 0x64, 0xae, 0xea, 0x82, 0xc2, 0xc7, 0xc6, 0x97, 0x3e, 0x3c, 0xfc, 0x84, 0x72, + 0xb3, 0x4b, 0xb8, 0x94, 0x12, 0x55, 0x55, 0x31, 0x1a, 0x8d, 0x61, 0x0f, 0xac, 0xf0, 0x3f, 0xd8, + 0x7f, 0x21, 0x66, 0x5c, 0x00, 0x20, 0x16, 0x1d, 0x03, 0x59, 0x7b, 0x76, 0xa3, 0xb5, 0x52, 0x06, + 0x9b, 0x94, 0x32, 0x08, 0xc0, 0xa2, 0xb3, 0xa0, 0xa7, 0xb1, 0x29, 0xf4, 0x5c, 0x7a, 0xea, 0x04, + 0xfd, 0x2e, 0x07, 0x73, 0xed, 0x11, 0xec, 0x75, 0x3a, 0x9d, 0xe6, 0xdb, 0x10, 0xad, 0x97, 0x51, + 0x43, 0xd5, 0x41, 0x1a, 0xe6, 0x71, 0x45, 0xd0, 0x22, 0x01, 0x44, 0x5d, 0x07, 0xa2, 0xa9, 0x94, + 0x0b, 0xaa, 0x84, 0x5a, 0xfd, 0xbb, 0xab, 0xe6, 0x98, 0xa6, 0x5b, 0x33, 0x52, 0x66, 0x45, 0xad, + 0x40, 0xb5, 0xe7, 0x2a, 0xa5, 0xa7, 0x4e, 0x60, 0x2f, 0x2c, 0x5c, 0x7a, 0x05, 0xe6, 0x02, 0x08, + 0x06, 0xdd, 0xd8, 0xa8, 0x97, 0x86, 0xaa, 0x83, 0xd8, 0x7a, 0xcf, 0x92, 0xb5, 0xbb, 0x48, 0x13, + 0x84, 0x66, 0x80, 0xb9, 0x82, 0x70, 0x5f, 0xe7, 0x14, 0x17, 0x7a, 0x7b, 0xe8, 0xfc, 0xe6, 0x1a, + 0xab, 0xf2, 0xed, 0x68, 0x0d, 0x97, 0x48, 0x7b, 0x2a, 0x0b, 0x91, 0xcc, 0xba, 0x75, 0x2b, 0x5d, + 0xf5, 0xe7, 0xe9, 0xaa, 0x3f, 0xcf, 0x85, 0x1b, 0x3d, 0x20, 0xa0, 0xb8, 0xe6, 0x63, 0xfe, 0x0e, + 0x04, 0xd8, 0x75, 0xec, 0x28, 0x97, 0x0e, 0x7f, 0xb4, 0x34, 0x0a, 0x44, 0x32, 0xcf, 0x5e, 0x0b, + 0xd5, 0x9e, 0x16, 0x06, 0xdc, 0x0e, 0x6c, 0x7d, 0xe7, 0x98, 0xbc, 0x37, 0x49, 0x4e, 0x6e, 0x2e, + 0x4f, 0x2d, 0x5b, 0x86, 0x7d, 0xfb, 0x76, 0xaa, 0x3d, 0x57, 0xb1, 0xda, 0xed, 0x54, 0x7b, 0x5a, + 0x34, 0xef, 0xa9, 0x09, 0x20, 0xe8, 0xe3, 0x8a, 0xef, 0xa7, 0x00, 0x95, 0xa1, 0x35, 0x07, 0xb8, + 0xfe, 0x5c, 0x11, 0x5b, 0xc6, 0x9a, 0x58, 0x99, 0x92, 0xc2, 0x2b, 0xf9, 0xf9, 0xd8, 0x7a, 0xcf, + 0xd2, 0xe2, 0x72, 0x03, 0x2a, 0x63, 0xa3, 0xa3, 0xac, 0xaf, 0x28, 0xd7, 0xa4, 0x80, 0xa2, 0x45, + 0xae, 0xee, 0xc6, 0x26, 0xd6, 0xee, 0x2e, 0xa2, 0xcc, 0xe9, 0xc4, 0x7b, 0xfb, 0x36, 0x69, 0xdd, + 0xa7, 0x39, 0xf7, 0xbb, 0x09, 0xef, 0x6a, 0x1b, 0x65, 0x0f, 0xae, 0x71, 0xc4, 0xfb, 0x2c, 0x5f, + 0xae, 0xd9, 0x42, 0x61, 0x31, 0xec, 0x7c, 0xf0, 0x2d, 0x30, 0xc4, 0x91, 0x95, 0x2b, 0x97, 0x46, + 0x81, 0x0d, 0xfb, 0x2a, 0x38, 0x74, 0xf1, 0x22, 0x55, 0x1f, 0xbc, 0x8f, 0xad, 0xef, 0x2c, 0x77, + 0xbc, 0x5e, 0xf6, 0x77, 0x4e, 0xb1, 0xaf, 0xa4, 0x14, 0x21, 0x04, 0xc3, 0x59, 0x07, 0x58, 0xb7, + 0x69, 0x23, 0x57, 0x5c, 0x6e, 0x9e, 0x8e, 0x7b, 0x06, 0x21, 0x1e, 0x05, 0xea, 0x56, 0x0d, 0xe9, + 0x39, 0x67, 0x1a, 0x0a, 0x21, 0xd8, 0x50, 0x51, 0x4e, 0xc0, 0xef, 0xa7, 0x2c, 0xe6, 0x17, 0x4a, + 0x5e, 0xcc, 0x22, 0xa3, 0xb8, 0x8e, 0xa1, 0xbe, 0x3e, 0x02, 0x81, 0x00, 0x3f, 0xfc, 0xf6, 0x2b, + 0xdf, 0xb5, 0xb5, 0xe1, 0xbd, 0x3b, 0x41, 0x5f, 0x77, 0x0f, 0x39, 0xb9, 0xeb, 0x38, 0x73, 0xbc, + 0x96, 0x8c, 0xe2, 0x3a, 0x6c, 0xeb, 0xd7, 0x73, 0x67, 0x64, 0x84, 0x55, 0xf9, 0x76, 0xec, 0xef, + 0xbd, 0x3b, 0x67, 0x5a, 0x47, 0x54, 0x20, 0xb7, 0xbc, 0x8c, 0x07, 0x7e, 0x3f, 0x69, 0x19, 0x19, + 0xbc, 0xe9, 0xf9, 0x8b, 0x7e, 0x57, 0x25, 0xcd, 0x03, 0x03, 0x6c, 0xde, 0xb6, 0x0d, 0x57, 0x41, + 0x3c, 0x83, 0x37, 0x7a, 0x71, 0xbf, 0xb6, 0x9c, 0x2d, 0x63, 0x8d, 0xe4, 0xbf, 0xba, 0x99, 0x43, + 0xcb, 0x87, 0x10, 0x42, 0xd0, 0xef, 0xaa, 0xc4, 0x7f, 0x7f, 0x92, 0xfb, 0x93, 0x93, 0x6c, 0xcc, + 0xcb, 0x23, 0xe0, 0xf7, 0xcf, 0x59, 0x09, 0x23, 0xfe, 0x0f, 0x7c, 0x51, 0xf8, 0x02, 0x8d, 0xe3, + 0x71, 0xdc, 0x9b, 0xb8, 0xcb, 0x8a, 0xac, 0x2c, 0xba, 0x9f, 0xdf, 0xc4, 0x1f, 0x1d, 0xd7, 0x11, + 0x42, 0xf0, 0xd9, 0xc4, 0x0a, 0xf6, 0xbf, 0xb5, 0x93, 0x31, 0x9d, 0x0e, 0xef, 0xf8, 0x9f, 0x74, + 0x7b, 0x5a, 0x90, 0xf9, 0x0e, 0x3e, 0xa9, 0x85, 0xcf, 0xbf, 0xfe, 0x0a, 0x23, 0x0f, 0xc9, 0xb1, + 0xbd, 0xc4, 0xda, 0xbb, 0x3f, 0xa2, 0xa6, 0xa6, 0xd1, 0x5d, 0xf2, 0x13, 0x6d, 0x97, 0x2f, 0x87, + 0x4f, 0xcf, 0x30, 0x73, 0x2f, 0x03, 0x99, 0x80, 0x69, 0x89, 0xff, 0x53, 0x1e, 0x02, 0x7d, 0xc0, + 0xcf, 0xf3, 0x01, 0x98, 0x81, 0x65, 0x33, 0xfd, 0x52, 0xda, 0x3f, 0x40, 0x60, 0xa6, 0x0f, 0xd9, + 0xbf, 0x2f, 0x89, 0x69, 0x46, 0x25, 0x68, 0x1c, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, + 0x44, 0xae, 0x42, 0x60, 0x82 +}; +static unsigned char icon_doc_16_png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, + 0x61, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00, + 0x00, 0x06, 0x62, 0x4b, 0x47, 0x44, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xa0, 0xbd, 0xa7, 0x93, + 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, + 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xdb, 0x04, + 0x06, 0x11, 0x21, 0x22, 0x20, 0xdd, 0x22, 0x10, 0x00, 0x00, 0x01, 0x95, 0x49, 0x44, 0x41, 0x54, + 0x38, 0xcb, 0x95, 0x93, 0x3d, 0x4b, 0x82, 0x51, 0x14, 0xc7, 0x7f, 0xc7, 0x24, 0x4d, 0x7c, 0x96, + 0x96, 0x50, 0x48, 0x14, 0x8a, 0x86, 0x16, 0x23, 0x28, 0xea, 0x23, 0xd8, 0xd0, 0xcb, 0x20, 0x86, + 0x6b, 0x11, 0xb4, 0xd8, 0x10, 0x6d, 0x81, 0xbd, 0x7c, 0x02, 0x5b, 0xa2, 0x10, 0x47, 0x6b, 0x2a, + 0xa7, 0x1c, 0x0b, 0x24, 0xb3, 0xa9, 0xf7, 0xa1, 0x25, 0xb2, 0x20, 0xe4, 0x59, 0xad, 0xd0, 0xb2, + 0xdb, 0x50, 0x8f, 0x3c, 0xbe, 0x3c, 0x50, 0x07, 0x2e, 0xdc, 0x73, 0xef, 0x39, 0xff, 0xf3, 0x3b, + 0x87, 0x7b, 0x45, 0x29, 0x05, 0x80, 0x88, 0x0c, 0x02, 0x1a, 0x16, 0xa6, 0x94, 0x3a, 0x6b, 0x77, + 0x6e, 0x37, 0xed, 0xb5, 0x68, 0x34, 0x9a, 0x37, 0x1c, 0x8f, 0xcf, 0xc7, 0x4b, 0xb1, 0x08, 0x40, + 0xa9, 0x54, 0x42, 0x44, 0xc6, 0xda, 0x89, 0x98, 0x05, 0x04, 0xa0, 0x50, 0x28, 0x10, 0xcf, 0x1c, + 0x12, 0x9f, 0x9c, 0xaa, 0x5f, 0xf4, 0x0e, 0x05, 0xd1, 0x75, 0x3d, 0x2f, 0x22, 0xe3, 0x4a, 0xa9, + 0xbc, 0x59, 0xc0, 0x66, 0x76, 0x44, 0x04, 0xa0, 0x21, 0x19, 0xe0, 0xfe, 0x34, 0x8f, 0xcb, 0xe5, + 0x42, 0xd7, 0xf5, 0x53, 0x11, 0x19, 0xb3, 0x12, 0x10, 0x43, 0xa4, 0x79, 0x01, 0x38, 0x1c, 0x0e, + 0xb3, 0xc8, 0x78, 0xdb, 0x16, 0x8c, 0xe0, 0xe0, 0x6c, 0x84, 0x8b, 0xf4, 0x5e, 0x03, 0x99, 0xd7, + 0xeb, 0x05, 0x20, 0x10, 0x08, 0xd4, 0x8b, 0x35, 0x13, 0xd8, 0x8c, 0x8a, 0x97, 0x7b, 0xfb, 0xf5, + 0xea, 0xf3, 0x5b, 0x09, 0x1e, 0x0e, 0x96, 0xd1, 0x34, 0x0d, 0x4d, 0xd3, 0xf0, 0xfb, 0xfd, 0x0d, + 0x79, 0x2d, 0x04, 0x06, 0x85, 0x61, 0xc9, 0xd8, 0x12, 0x49, 0xc0, 0x6e, 0xff, 0x09, 0x75, 0x3a, + 0x9d, 0x96, 0x04, 0xd2, 0x9c, 0xdc, 0xce, 0x7e, 0x63, 0xe4, 0x5f, 0x43, 0x0c, 0x6f, 0xac, 0xd3, + 0x44, 0xf7, 0x37, 0x82, 0x78, 0x26, 0xc3, 0x5c, 0x22, 0x41, 0x68, 0x7a, 0xfa, 0x4f, 0x04, 0xf5, + 0x21, 0xde, 0xa5, 0x17, 0x11, 0x11, 0x9e, 0x8b, 0x8f, 0x24, 0x63, 0x31, 0x46, 0x6f, 0xb6, 0x19, + 0x9a, 0x8d, 0x98, 0x29, 0x6c, 0x96, 0x2d, 0x00, 0x2c, 0x1c, 0x7f, 0x92, 0xba, 0xbe, 0xe2, 0x24, + 0x9b, 0xa5, 0x7f, 0x22, 0x64, 0xbe, 0x6a, 0x89, 0x6d, 0x79, 0xca, 0x7d, 0xa1, 0x10, 0xb9, 0x9d, + 0x5d, 0x72, 0x3b, 0xbb, 0xa4, 0xae, 0xaf, 0x00, 0x88, 0x6e, 0x6e, 0xf2, 0x5a, 0x2e, 0x13, 0x5e, + 0x5f, 0xe3, 0xe9, 0x28, 0x6b, 0x29, 0x40, 0xad, 0x56, 0x63, 0xb8, 0xf3, 0x8b, 0x81, 0x99, 0x19, + 0xdc, 0x5f, 0x6f, 0x64, 0x57, 0x57, 0x78, 0xb3, 0xbb, 0xe9, 0xa9, 0x54, 0xa8, 0x54, 0x3f, 0xa8, + 0xde, 0xde, 0xd1, 0xed, 0xf1, 0x34, 0xa2, 0x98, 0xbe, 0xf3, 0x08, 0xe0, 0x01, 0xba, 0x00, 0x37, + 0xe0, 0x00, 0x3a, 0x0c, 0x6d, 0xa0, 0x02, 0x94, 0x81, 0x77, 0xe0, 0x45, 0x29, 0x75, 0x0e, 0xf0, + 0x0d, 0xff, 0x1c, 0x7a, 0x37, 0x5c, 0xfd, 0x46, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, + 0x44, 0xae, 0x42, 0x60, 0x82 +}; diff --git a/data/images.h b/data/images.h new file mode 100644 index 0000000..2a69aaf --- /dev/null +++ b/data/images.h @@ -0,0 +1,29 @@ +/** + * Powder Toy - Images + * + * Copyright (c) 2008 - 2010 Stanislaw Skowronek. + * Copyright (c) 2010 Simon Robertshaw. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + */ +#ifndef IMAGE_H +#define IMAGE_H +char save_to_server_image[] = { + 0xC8, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x07, 0x31, 0x31, 0x31, 0x37, 0x6A, 0x6A, 0x6A, 0x76, 0xA1, 0xA1, 0xA1, 0xB3, 0xC5, 0xC5, 0xC5, 0xDB, 0xDF, 0xDF, 0xDF, 0xF8, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xDE, 0xDE, 0xDE, 0xF7, 0xC2, 0xC2, 0xC2, 0xD8, 0x9D, 0x9D, 0x9D, 0xAF, 0x66, 0x66, 0x66, 0x72, 0x2D, 0x2D, 0x2D, 0x32, 0x03, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x26, 0x26, 0x2B, 0x75, 0x75, 0x75, 0x82, 0xBC, 0xBC, 0xBC, 0xD1, 0xE3, 0xE3, 0xE3, 0xFD, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE1, 0xE1, 0xE1, 0xFA, 0xB6, 0xB6, 0xB6, 0xCB, 0x6E, 0x6E, 0x6E, 0x7B, 0x22, 0x22, 0x22, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x3C, 0x96, 0x96, 0x96, 0xA7, 0xDC, 0xDC, 0xDC, 0xF5, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xD8, 0xD8, 0xD8, 0xF0, 0x8F, 0x8F, 0x8F, 0x9F, 0x2F, 0x2F, 0x2F, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x27, 0x27, 0x2C, 0x94, 0x94, 0x94, 0xA5, 0xE1, 0xE1, 0xE1, 0xFA, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xE5, 0xE5, 0xE5, 0xFF, 0xDD, 0xDD, 0xDD, 0xF6, 0x8A, 0x8A, 0x8A, 0x9A, 0x20, 0x20, 0x20, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x07, 0x6B, 0x6B, 0x6B, 0x78, 0xD7, 0xD7, 0xD7, 0xF0, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xD1, 0xD1, 0xD1, 0xEA, 0x61, 0x61, 0x61, 0x6D, 0x02, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x25, 0x2A, 0xAA, 0xAA, 0xAA, 0xBE, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0xE4, 0xE4, 0xE4, 0xFF, 0x9F, 0x9F, 0x9F, 0xB2, 0x1C, 0x1C, 0x1C, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x45, 0x45, 0x4E, 0xCE, 0xCE, 0xCE, 0xE7, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xE3, 0xE3, 0xE3, 0xFF, 0xC7, 0xC7, 0xC7, 0xDF, 0x39, 0x39, 0x39, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x5D, 0x5D, 0x69, 0xDE, 0xDE, 0xDE, 0xFA, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xE2, 0xE2, 0xE2, 0xFF, 0xD7, 0xD7, 0xD7, 0xF3, 0x4E, 0x4E, 0x4E, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x65, 0x65, 0x73, 0xE0, 0xE0, 0xE0, 0xFE, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xDB, 0xDB, 0xDB, 0xF8, 0x56, 0x56, 0x56, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x5E, 0x5E, 0x6B, 0xE0, 0xE0, 0xE0, 0xFE, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xE1, 0xE1, 0xE1, 0xFF, 0xDC, 0xDC, 0xDC, 0xF9, 0x4F, 0x4F, 0x4F, 0x5B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x46, 0x46, 0x51, 0xDC, 0xDC, 0xDC, 0xFA, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xD5, 0xD5, 0xD5, 0xF3, 0x37, 0x37, 0x37, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x27, 0x27, 0x30, 0xCF, 0xCF, 0xCF, 0xED, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xC7, 0xC7, 0xC7, 0xE3, 0x1C, 0x1C, 0x1C, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x0C, 0xB0, 0xB0, 0xB0, 0xC9, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xA2, 0xA2, 0xA2, 0xB9, 0x04, 0x04, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x74, 0x74, 0x87, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0x63, 0x63, 0x63, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x2B, 0x2B, 0x36, 0xD6, 0xD6, 0xD6, 0xF7, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xCF, 0xCF, 0xCF, 0xEF, 0x1F, 0x1F, 0x1F, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x14, 0x20, 0x20, 0x20, 0x26, 0x2A, 0x2A, 0x2A, 0x31, 0x29, 0x29, 0x29, 0x2F, 0x1E, 0x1E, 0x1E, 0x23, 0x0C, 0x0C, 0x0C, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x03, 0x9F, 0x9F, 0x9F, 0xB8, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0x8F, 0x8F, 0x8F, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x26, 0x67, 0x67, 0x67, 0x78, 0xA2, 0xA2, 0xA2, 0xBD, 0xC3, 0xC3, 0xC3, 0xE3, 0xD5, 0xD5, 0xD5, 0xF8, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xD1, 0xD1, 0xD1, 0xF3, 0xBD, 0xBD, 0xBD, 0xDC, 0x95, 0x95, 0x95, 0xAD, 0x55, 0x55, 0x55, 0x63, 0x14, 0x14, 0x14, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x3D, 0x3D, 0x4C, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xD8, 0xD8, 0xD8, 0xFB, 0x2E, 0x2E, 0x2E, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x22, 0x82, 0x82, 0x82, 0x98, 0xCE, 0xCE, 0xCE, 0xF1, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xC0, 0xC0, 0xC0, 0xE1, 0x69, 0x69, 0x69, 0x7B, 0x0B, 0x0B, 0x0B, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x03, 0xA2, 0xA2, 0xA2, 0xBE, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0x91, 0x91, 0x91, 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x4D, 0x4D, 0x5A, 0xC3, 0xC3, 0xC3, 0xE5, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xAD, 0xAD, 0xAD, 0xCB, 0x2D, 0x2D, 0x2D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x2D, 0x2D, 0x3C, 0xD6, 0xD6, 0xD6, 0xFC, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD2, 0xD2, 0xD2, 0xF7, 0x20, 0x20, 0x20, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x67, 0x67, 0x7A, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xCA, 0xCA, 0xCA, 0xEF, 0x3F, 0x3F, 0x3F, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x9C, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0x6E, 0x6E, 0x6E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x61, 0x61, 0x73, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xCA, 0xCA, 0xCA, 0xF0, 0x4B, 0x4B, 0x4B, 0x5A, 0xB9, 0xB9, 0xB9, 0xDC, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xB5, 0xB5, 0xB5, 0xD7, 0x07, 0x07, 0x07, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x3A, 0x3A, 0x48, 0xD3, 0xD3, 0xD3, 0xFC, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD1, 0xD1, 0xD1, 0xF9, 0xD3, 0xD3, 0xD3, 0xFC, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD5, 0xD5, 0xD5, 0xFE, 0x2C, 0x2C, 0x2C, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x0C, 0x11, 0xB3, 0xB3, 0xB3, 0xD6, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0x64, 0x64, 0x64, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x5B, 0x5B, 0x73, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0x98, 0x98, 0x98, 0xBD, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x0A, 0xB2, 0xB2, 0xB2, 0xD7, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xBD, 0xBD, 0xBD, 0xE5, 0x0C, 0x0C, 0x0C, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x2F, 0x2F, 0x43, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD0, 0xD0, 0xD0, 0xFC, 0x20, 0x20, 0x20, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x62, 0x62, 0x84, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0x3A, 0x3A, 0x3A, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x86, 0x86, 0xAF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0x4D, 0x4D, 0x4D, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x9B, 0x9B, 0xC9, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0x5D, 0x5D, 0x5D, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xA3, 0xA3, 0xD6, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0x67, 0x67, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x93, 0x93, 0xCB, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0x69, 0x69, 0x69, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x86, 0x86, 0xAE, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0x64, 0x64, 0x64, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x12, 0x12, 0x17, 0x43, 0x43, 0x43, 0x55, 0x7B, 0x7B, 0x7B, 0x9B, 0xB6, 0xB6, 0xB6, 0xE6, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0x5A, 0x5A, 0x5A, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x28, 0x33, 0x76, 0x76, 0x76, 0x96, 0xB4, 0xB4, 0xB4, 0xE4, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0x49, 0x49, 0x49, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x1B, 0x1B, 0x23, 0x7A, 0x7A, 0x7A, 0x9C, 0xC1, 0xC1, 0xC1, 0xF6, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0x41, 0x41, 0x41, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x4F, 0x4F, 0x65, 0xB4, 0xB4, 0xB4, 0xE7, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xA9, 0xA9, 0xA9, 0xD8, 0xA5, 0xA5, 0xA5, 0xD3, 0xA4, 0xA4, 0xA4, 0xD2, 0x98, 0x98, 0x98, 0xC3, 0x85, 0x85, 0x85, 0xAA, 0x69, 0x69, 0x69, 0x87, 0x3E, 0x3E, 0x3E, 0x50, 0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x0D, 0x77, 0x77, 0x77, 0x9A, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xB8, 0xB8, 0xB8, 0xEE, 0x8A, 0x8A, 0x8A, 0xB2, 0x45, 0x45, 0x45, 0x59, 0x07, 0x07, 0x07, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x0D, 0x0D, 0x13, 0x8D, 0x8D, 0x8D, 0xB7, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xA1, 0xA1, 0xA1, 0xD1, 0x49, 0x49, 0x49, 0x5F, 0x03, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x0B, 0x0B, 0x10, 0x8E, 0x8E, 0x8E, 0xBA, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0x8D, 0x8D, 0x8D, 0xB8, 0x1F, 0x1F, 0x1F, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x7E, 0x7E, 0x7E, 0xA6, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xB1, 0xB1, 0xB1, 0xE8, 0x41, 0x41, 0x41, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x59, 0x59, 0x77, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xBE, 0xBE, 0xBE, 0xFB, 0x52, 0x52, 0x52, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x24, 0x34, 0xB6, 0xB6, 0xB6, 0xF3, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0x4E, 0x4E, 0x4E, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x03, 0x8B, 0x8B, 0x8B, 0xBB, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBA, 0xBA, 0xBA, 0xFA, 0x37, 0x37, 0x37, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x51, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xA8, 0xA8, 0xA8, 0xE2, 0x14, 0x14, 0x14, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x03, 0x8C, 0x8C, 0x8C, 0xBF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0xBC, 0xBC, 0xBC, 0xFF, 0x7A, 0x7A, 0x7A, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x23, 0x23, 0x37, 0xB9, 0xB9, 0xB9, 0xFC, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBA, 0xBA, 0xBA, 0xFD, 0x2F, 0x2F, 0x2F, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x5F, 0x5F, 0x89, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0x88, 0x88, 0x88, 0xBB, 0x01, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x11, 0x95, 0x95, 0x95, 0xCF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB7, 0xB7, 0xB7, 0xFC, 0x24, 0x24, 0x24, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x21, 0x21, 0x38, 0xAF, 0xAF, 0xAF, 0xF4, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0x62, 0x62, 0x62, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x41, 0x41, 0x69, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0x96, 0x96, 0x96, 0xD4, 0x0A, 0x0A, 0x0A, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x58, 0x58, 0x8B, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xA8, 0xAD, 0xA7, 0xFF, 0xA8, 0xAD, 0xA7, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB0, 0xB0, 0xB0, 0xF8, 0x24, 0x24, 0x24, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x69, 0x69, 0xA3, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0x63, 0xD2, 0x58, 0xFF, 0x63, 0xD2, 0x58, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0x44, 0x44, 0x44, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x72, 0x72, 0xB2, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0x7D, 0xBF, 0x76, 0xFF, 0x35, 0xEB, 0x22, 0xFF, 0x35, 0xEB, 0x22, 0xFF, 0x7D, 0xBF, 0x76, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0x5B, 0x5B, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x72, 0x72, 0xB5, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0x92, 0xAF, 0x8F, 0xFF, 0x3A, 0xE7, 0x28, 0xFF, 0x35, 0xEA, 0x22, 0xFF, 0x35, 0xEA, 0x22, 0xFF, 0x3A, 0xE7, 0x28, 0xFF, 0x92, 0xAF, 0x8F, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0x6B, 0x6B, 0x6B, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x67, 0x67, 0xA9, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0x9E, 0xA4, 0x9D, 0xFF, 0x47, 0xDD, 0x37, 0xFF, 0x35, 0xE9, 0x22, 0xFF, 0x35, 0xE9, 0x22, 0xFF, 0x35, 0xE9, 0x22, 0xFF, 0x35, 0xE9, 0x22, 0xFF, 0x47, 0xDD, 0x37, 0xFF, 0x9E, 0xA4, 0x9D, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0x72, 0x72, 0x72, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x56, 0x56, 0x94, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0x5D, 0xCD, 0x51, 0xFF, 0x35, 0xE8, 0x22, 0xFF, 0x35, 0xE8, 0x22, 0xFF, 0x35, 0xE8, 0x22, 0xFF, 0x35, 0xE8, 0x22, 0xFF, 0x35, 0xE8, 0x22, 0xFF, 0x35, 0xE8, 0x22, 0xFF, 0x5C, 0xCE, 0x50, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0x6E, 0x6E, 0x6E, 0xB3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x41, 0x41, 0x77, 0xAE, 0xAE, 0xAE, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x76, 0xB8, 0x6F, 0xFF, 0x35, 0xE7, 0x22, 0xFF, 0x35, 0xE7, 0x22, 0xFF, 0x35, 0xE7, 0x22, 0xFF, 0x35, 0xE7, 0x22, 0xFF, 0x35, 0xE7, 0x22, 0xFF, 0x35, 0xE7, 0x22, 0xFF, 0x35, 0xE7, 0x22, 0xFF, 0x35, 0xE7, 0x22, 0xFF, 0x76, 0xB8, 0x6F, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0x61, 0x61, 0x61, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x25, 0x49, 0xA5, 0xA5, 0xA5, 0xFB, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x8B, 0xA7, 0x88, 0xFF, 0x39, 0xE2, 0x26, 0xFF, 0x35, 0xE5, 0x22, 0xFF, 0x35, 0xE5, 0x22, 0xFF, 0x35, 0xE5, 0x22, 0xFF, 0x35, 0xE5, 0x22, 0xFF, 0x35, 0xE5, 0x22, 0xFF, 0x35, 0xE5, 0x22, 0xFF, 0x35, 0xE5, 0x22, 0xFF, 0x35, 0xE5, 0x22, 0xFF, 0x39, 0xE2, 0x26, 0xFF, 0x8B, 0xA7, 0x88, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0x4D, 0x4D, 0x4D, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x0E, 0x1D, 0x88, 0x88, 0x88, 0xE0, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x96, 0x9D, 0x95, 0xFF, 0x44, 0xD9, 0x34, 0xFF, 0x34, 0xE4, 0x21, 0xFF, 0x35, 0xE4, 0x22, 0xFF, 0x35, 0xE4, 0x22, 0xFF, 0x35, 0xE4, 0x22, 0xFF, 0x35, 0xE4, 0x22, 0xFF, 0x35, 0xE4, 0x22, 0xFF, 0x35, 0xE4, 0x22, 0xFF, 0x35, 0xE4, 0x22, 0xFF, 0x35, 0xE4, 0x22, 0xFF, 0x34, 0xE4, 0x21, 0xFF, 0x44, 0xD9, 0x34, 0xFF, 0x96, 0x9D, 0x95, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0x34, 0x34, 0x34, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x59, 0x59, 0x59, 0xA4, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x57, 0xC7, 0x4B, 0xFF, 0x33, 0xE2, 0x20, 0xFF, 0x33, 0xE2, 0x20, 0xFF, 0x34, 0xE2, 0x21, 0xFF, 0x34, 0xE2, 0x21, 0xFF, 0x34, 0xE2, 0x21, 0xFF, 0x34, 0xE2, 0x21, 0xFF, 0x34, 0xE2, 0x21, 0xFF, 0x34, 0xE2, 0x21, 0xFF, 0x34, 0xE2, 0x21, 0xFF, 0x34, 0xE2, 0x21, 0xFF, 0x33, 0xE2, 0x20, 0xFF, 0x33, 0xE2, 0x20, 0xFF, 0x56, 0xC8, 0x4A, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0x99, 0x99, 0x99, 0xF3, 0x18, 0x18, 0x18, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x29, 0x29, 0x54, 0xA4, 0xA4, 0xA4, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x6F, 0xB4, 0x68, 0xFF, 0x31, 0xE1, 0x1F, 0xFF, 0x31, 0xE1, 0x1F, 0xFF, 0x31, 0xE1, 0x1F, 0xFF, 0x32, 0xE1, 0x20, 0xFF, 0x32, 0xE1, 0x20, 0xFF, 0x32, 0xE1, 0x20, 0xFF, 0x32, 0xE1, 0x20, 0xFF, 0x32, 0xE1, 0x20, 0xFF, 0x32, 0xE1, 0x20, 0xFF, 0x32, 0xE1, 0x20, 0xFF, 0x32, 0xE1, 0x20, 0xFF, 0x31, 0xE1, 0x1F, 0xFF, 0x31, 0xE1, 0x1F, 0xFF, 0x31, 0xE1, 0x1F, 0xFF, 0x6F, 0xB4, 0x68, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0x73, 0x73, 0x73, 0xC8, 0x05, 0x05, 0x05, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x0E, 0x7D, 0x7D, 0x7D, 0xDC, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x84, 0xA4, 0x81, 0xFF, 0x35, 0xDC, 0x22, 0xFF, 0x31, 0xDF, 0x1E, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1F, 0xFF, 0x31, 0xDF, 0x1E, 0xFF, 0x35, 0xDC, 0x22, 0xFF, 0x84, 0xA4, 0x81, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0x3F, 0x3F, 0x3F, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x3B, 0x3B, 0x79, 0xA4, 0xA4, 0xA4, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x91, 0x9A, 0x90, 0xFF, 0x3F, 0xD2, 0x2F, 0xFF, 0x2F, 0xDD, 0x1C, 0xFF, 0x30, 0xDD, 0x1D, 0xFF, 0x30, 0xDD, 0x1D, 0xFF, 0x31, 0xDD, 0x1E, 0xFF, 0x31, 0xDD, 0x1E, 0xFF, 0x31, 0xDD, 0x1E, 0xFF, 0x31, 0xDD, 0x1E, 0xFF, 0x31, 0xDD, 0x1E, 0xFF, 0x31, 0xDD, 0x1E, 0xFF, 0x31, 0xDD, 0x1E, 0xFF, 0x31, 0xDD, 0x1E, 0xFF, 0x31, 0xDD, 0x1E, 0xFF, 0x31, 0xDD, 0x1E, 0xFF, 0x30, 0xDD, 0x1D, 0xFF, 0x30, 0xDD, 0x1D, 0xFF, 0x2F, 0xDD, 0x1C, 0xFF, 0x3F, 0xD2, 0x2F, 0xFF, 0x91, 0x9A, 0x90, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0x93, 0x93, 0x93, 0xF5, 0x13, 0x13, 0x13, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x14, 0x7A, 0x7A, 0x7A, 0xDF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x50, 0xC3, 0x44, 0xFF, 0x2E, 0xDB, 0x1B, 0xFF, 0x2F, 0xDB, 0x1C, 0xFF, 0x2F, 0xDB, 0x1C, 0xFF, 0x2F, 0xDB, 0x1C, 0xFF, 0x2F, 0xDB, 0x1C, 0xFF, 0x30, 0xDC, 0x1D, 0xFF, 0x30, 0xDC, 0x1D, 0xFF, 0x30, 0xDC, 0x1D, 0xFF, 0x30, 0xDC, 0x1D, 0xFF, 0x30, 0xDC, 0x1D, 0xFF, 0x30, 0xDC, 0x1D, 0xFF, 0x30, 0xDC, 0x1D, 0xFF, 0x30, 0xDC, 0x1D, 0xFF, 0x2F, 0xDB, 0x1C, 0xFF, 0x2F, 0xDB, 0x1C, 0xFF, 0x2F, 0xDB, 0x1C, 0xFF, 0x2F, 0xDB, 0x1C, 0xFF, 0x2E, 0xDB, 0x1B, 0xFF, 0x50, 0xC3, 0x44, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0x53, 0x53, 0x53, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x2E, 0x2E, 0x62, 0x99, 0x99, 0x99, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x69, 0xB0, 0x61, 0xFF, 0x2C, 0xD9, 0x19, 0xFF, 0x2D, 0xD9, 0x1A, 0xFF, 0x2D, 0xD9, 0x1A, 0xFF, 0x2E, 0xD9, 0x1B, 0xFF, 0x2E, 0xD9, 0x1B, 0xFF, 0x2F, 0xDA, 0x1C, 0xFF, 0x2F, 0xDA, 0x1C, 0xFF, 0x2F, 0xDA, 0x1C, 0xFF, 0x2F, 0xDA, 0x1C, 0xFF, 0x2F, 0xDA, 0x1C, 0xFF, 0x2F, 0xDA, 0x1C, 0xFF, 0x2F, 0xDA, 0x1C, 0xFF, 0x2F, 0xDA, 0x1C, 0xFF, 0x2F, 0xDA, 0x1C, 0xFF, 0x2F, 0xDA, 0x1C, 0xFF, 0x2E, 0xD9, 0x1B, 0xFF, 0x2E, 0xD9, 0x1B, 0xFF, 0x2D, 0xD9, 0x1A, 0xFF, 0x2D, 0xD9, 0x1A, 0xFF, 0x2C, 0xD9, 0x19, 0xFF, 0x68, 0xB0, 0x60, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0x8B, 0x8B, 0x8B, 0xF4, 0x16, 0x16, 0x16, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x55, 0x55, 0x55, 0xAF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x80, 0x9F, 0x7C, 0xFF, 0x2D, 0xD5, 0x1B, 0xFF, 0x2B, 0xD7, 0x18, 0xFF, 0x2C, 0xD7, 0x19, 0xFF, 0x2C, 0xD7, 0x19, 0xFF, 0x2C, 0xD7, 0x19, 0xFF, 0x2D, 0xD7, 0x1A, 0xFF, 0x2D, 0xD7, 0x1A, 0xFF, 0x2D, 0xD7, 0x1A, 0xFF, 0x2D, 0xD7, 0x1A, 0xFF, 0x2E, 0xD8, 0x1B, 0xFF, 0x2E, 0xD8, 0x1B, 0xFF, 0x2E, 0xD8, 0x1B, 0xFF, 0x2E, 0xD8, 0x1B, 0xFF, 0x2D, 0xD7, 0x1A, 0xFF, 0x2D, 0xD7, 0x1A, 0xFF, 0x2D, 0xD7, 0x1A, 0xFF, 0x2D, 0xD7, 0x1A, 0xFF, 0x2C, 0xD7, 0x19, 0xFF, 0x2C, 0xD7, 0x19, 0xFF, 0x2C, 0xD7, 0x19, 0xFF, 0x2B, 0xD7, 0x18, 0xFF, 0x2D, 0xD5, 0x1B, 0xFF, 0x80, 0x9F, 0x7C, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x41, 0x41, 0x41, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x0D, 0x0D, 0x1B, 0x6E, 0x6E, 0x6E, 0xD9, 0xA3, 0xA3, 0xA3, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x97, 0x97, 0x97, 0xFF, 0x8F, 0x98, 0x8E, 0xFF, 0x37, 0xCC, 0x26, 0xFF, 0x29, 0xD5, 0x16, 0xFF, 0x2A, 0xD5, 0x17, 0xFF, 0x2A, 0xD5, 0x17, 0xFF, 0x2B, 0xD5, 0x18, 0xFF, 0x2B, 0xD5, 0x18, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2C, 0xD6, 0x19, 0xFF, 0x2B, 0xD5, 0x18, 0xFF, 0x2B, 0xD5, 0x18, 0xFF, 0x2A, 0xD5, 0x17, 0xFF, 0x2A, 0xD5, 0x17, 0xFF, 0x29, 0xD5, 0x16, 0xFF, 0x37, 0xCC, 0x26, 0xFF, 0x8F, 0x98, 0x8E, 0xFF, 0x97, 0x97, 0x97, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0x64, 0x64, 0x64, 0xC9, 0x06, 0x06, 0x06, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x19, 0x19, 0x37, 0x77, 0x77, 0x77, 0xE9, 0xA2, 0xA2, 0xA2, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x94, 0x94, 0x94, 0xFF, 0x49, 0xBE, 0x3C, 0xFF, 0x28, 0xD3, 0x15, 0xFF, 0x28, 0xD3, 0x15, 0xFF, 0x29, 0xD3, 0x16, 0xFF, 0x29, 0xD3, 0x16, 0xFF, 0x29, 0xD3, 0x16, 0xFF, 0x29, 0xD3, 0x16, 0xFF, 0x2A, 0xD3, 0x17, 0xFF, 0x2A, 0xD3, 0x17, 0xFF, 0x2A, 0xD3, 0x17, 0xFF, 0x2B, 0xD4, 0x18, 0xFF, 0x2B, 0xD4, 0x18, 0xFF, 0x2B, 0xD4, 0x18, 0xFF, 0x2B, 0xD4, 0x18, 0xFF, 0x2B, 0xD4, 0x18, 0xFF, 0x2B, 0xD4, 0x18, 0xFF, 0x2A, 0xD3, 0x17, 0xFF, 0x2A, 0xD3, 0x17, 0xFF, 0x2A, 0xD3, 0x17, 0xFF, 0x29, 0xD3, 0x16, 0xFF, 0x29, 0xD3, 0x16, 0xFF, 0x29, 0xD3, 0x16, 0xFF, 0x29, 0xD3, 0x16, 0xFF, 0x28, 0xD3, 0x15, 0xFF, 0x28, 0xD3, 0x15, 0xFF, 0x49, 0xBE, 0x3C, 0xFF, 0x94, 0x94, 0x94, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0x77, 0x77, 0x77, 0xE9, 0x15, 0x15, 0x15, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x1E, 0x1E, 0x42, 0x75, 0x75, 0x75, 0xEA, 0x9E, 0x9E, 0x9E, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x97, 0x97, 0x97, 0xFF, 0x95, 0x95, 0x95, 0xFF, 0x64, 0xAD, 0x5B, 0xFF, 0x26, 0xD1, 0x13, 0xFF, 0x26, 0xD1, 0x13, 0xFF, 0x26, 0xD1, 0x13, 0xFF, 0x27, 0xD1, 0x14, 0xFF, 0x27, 0xD1, 0x14, 0xFF, 0x28, 0xD1, 0x15, 0xFF, 0x28, 0xD1, 0x15, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x29, 0xD1, 0x16, 0xFF, 0x28, 0xD1, 0x15, 0xFF, 0x28, 0xD1, 0x15, 0xFF, 0x27, 0xD1, 0x14, 0xFF, 0x27, 0xD1, 0x14, 0xFF, 0x26, 0xD1, 0x13, 0xFF, 0x26, 0xD1, 0x13, 0xFF, 0x26, 0xD1, 0x13, 0xFF, 0x64, 0xAD, 0x5B, 0xFF, 0x95, 0x95, 0x95, 0xFF, 0x97, 0x97, 0x97, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x79, 0x79, 0x79, 0xF0, 0x1E, 0x1E, 0x1E, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x1A, 0x1A, 0x39, 0x68, 0x68, 0x68, 0xD9, 0x96, 0x96, 0x96, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x97, 0x97, 0x97, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x7C, 0x9F, 0x78, 0xFF, 0x28, 0xCD, 0x14, 0xFF, 0x25, 0xCE, 0x11, 0xFF, 0x26, 0xCF, 0x12, 0xFF, 0x26, 0xCF, 0x12, 0xFF, 0x26, 0xCF, 0x13, 0xFF, 0x26, 0xCF, 0x13, 0xFF, 0x26, 0xCF, 0x13, 0xFF, 0x26, 0xCF, 0x13, 0xFF, 0x27, 0xCF, 0x14, 0xFF, 0x27, 0xCF, 0x14, 0xFF, 0x27, 0xCF, 0x14, 0xFF, 0x27, 0xCF, 0x14, 0xFF, 0x28, 0xCF, 0x15, 0xFF, 0x28, 0xCF, 0x15, 0xFF, 0x28, 0xCF, 0x15, 0xFF, 0x28, 0xCF, 0x15, 0xFF, 0x27, 0xCF, 0x14, 0xFF, 0x27, 0xCF, 0x14, 0xFF, 0x27, 0xCF, 0x14, 0xFF, 0x27, 0xCF, 0x14, 0xFF, 0x26, 0xCF, 0x13, 0xFF, 0x26, 0xCF, 0x13, 0xFF, 0x26, 0xCF, 0x13, 0xFF, 0x26, 0xCF, 0x13, 0xFF, 0x26, 0xCF, 0x12, 0xFF, 0x26, 0xCF, 0x12, 0xFF, 0x25, 0xCE, 0x11, 0xFF, 0x28, 0xCD, 0x14, 0xFF, 0x7C, 0x9F, 0x78, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x97, 0x97, 0x97, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x72, 0x72, 0x72, 0xE6, 0x1E, 0x1E, 0x1E, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x0D, 0x0D, 0x1C, 0x50, 0x50, 0x50, 0xAF, 0x88, 0x88, 0x88, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x8C, 0x97, 0x8B, 0xFF, 0x31, 0xC4, 0x20, 0xFF, 0x24, 0xCC, 0x10, 0xFF, 0x24, 0xCC, 0x10, 0xFF, 0x24, 0xCC, 0x10, 0xFF, 0x24, 0xCC, 0x10, 0xFF, 0x25, 0xCD, 0x11, 0xFF, 0x25, 0xCD, 0x11, 0xFF, 0x26, 0xCD, 0x12, 0xFF, 0x26, 0xCD, 0x12, 0xFF, 0x26, 0xCD, 0x12, 0xFF, 0x26, 0xCD, 0x13, 0xFF, 0x26, 0xCD, 0x13, 0xFF, 0x26, 0xCD, 0x13, 0xFF, 0x26, 0xCD, 0x13, 0xFF, 0x26, 0xCD, 0x13, 0xFF, 0x26, 0xCD, 0x13, 0xFF, 0x26, 0xCD, 0x13, 0xFF, 0x26, 0xCD, 0x13, 0xFF, 0x26, 0xCD, 0x13, 0xFF, 0x26, 0xCD, 0x13, 0xFF, 0x26, 0xCD, 0x12, 0xFF, 0x26, 0xCD, 0x12, 0xFF, 0x26, 0xCD, 0x12, 0xFF, 0x25, 0xCD, 0x11, 0xFF, 0x25, 0xCD, 0x11, 0xFF, 0x24, 0xCC, 0x10, 0xFF, 0x24, 0xCC, 0x10, 0xFF, 0x24, 0xCC, 0x10, 0xFF, 0x24, 0xCC, 0x10, 0xFF, 0x31, 0xC4, 0x20, 0xFF, 0x8C, 0x97, 0x8B, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x9A, 0x9A, 0x9A, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0x8E, 0x8E, 0x8E, 0xFF, 0x5D, 0x5D, 0x5D, 0xC7, 0x15, 0x15, 0x15, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x2E, 0x2E, 0x2E, 0x66, 0x6A, 0x6A, 0x6A, 0xDF, 0x8C, 0x8C, 0x8C, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x44, 0xB9, 0x36, 0xFF, 0x21, 0xCA, 0x0D, 0xFF, 0x21, 0xCA, 0x0D, 0xFF, 0x22, 0xCA, 0x0E, 0xFF, 0x22, 0xCA, 0x0E, 0xFF, 0x23, 0xCA, 0x0F, 0xFF, 0x23, 0xCA, 0x0F, 0xFF, 0x24, 0xCB, 0x10, 0xFF, 0x24, 0xCB, 0x10, 0xFF, 0x24, 0xCB, 0x10, 0xFF, 0x24, 0xCB, 0x10, 0xFF, 0x24, 0xCB, 0x10, 0xFF, 0x25, 0xCB, 0x11, 0xFF, 0x25, 0xCB, 0x11, 0xFF, 0x25, 0xCB, 0x11, 0xFF, 0x25, 0xCB, 0x11, 0xFF, 0x25, 0xCB, 0x11, 0xFF, 0x25, 0xCB, 0x11, 0xFF, 0x25, 0xCB, 0x11, 0xFF, 0x25, 0xCB, 0x11, 0xFF, 0x24, 0xCB, 0x10, 0xFF, 0x24, 0xCB, 0x10, 0xFF, 0x24, 0xCB, 0x10, 0xFF, 0x24, 0xCB, 0x10, 0xFF, 0x24, 0xCB, 0x10, 0xFF, 0x23, 0xCA, 0x0F, 0xFF, 0x23, 0xCA, 0x0F, 0xFF, 0x22, 0xCA, 0x0E, 0xFF, 0x22, 0xCA, 0x0E, 0xFF, 0x21, 0xCA, 0x0D, 0xFF, 0x21, 0xCA, 0x0D, 0xFF, 0x44, 0xB9, 0x36, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0x93, 0x93, 0x93, 0xFF, 0x78, 0x78, 0x78, 0xF3, 0x3E, 0x3E, 0x3E, 0x89, 0x06, 0x06, 0x06, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x0B, 0x0B, 0x19, 0x39, 0x39, 0x39, 0x7E, 0x68, 0x68, 0x68, 0xDC, 0x84, 0x84, 0x84, 0xFF, 0x92, 0x92, 0x92, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x5E, 0xAB, 0x55, 0xFF, 0x1F, 0xC8, 0x0B, 0xFF, 0x20, 0xC8, 0x0C, 0xFF, 0x20, 0xC8, 0x0C, 0xFF, 0x21, 0xC8, 0x0D, 0xFF, 0x21, 0xC8, 0x0D, 0xFF, 0x21, 0xC8, 0x0D, 0xFF, 0x21, 0xC8, 0x0D, 0xFF, 0x22, 0xC8, 0x0E, 0xFF, 0x22, 0xC8, 0x0E, 0xFF, 0x22, 0xC8, 0x0E, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x23, 0xC8, 0x0F, 0xFF, 0x22, 0xC8, 0x0E, 0xFF, 0x22, 0xC8, 0x0E, 0xFF, 0x22, 0xC8, 0x0E, 0xFF, 0x21, 0xC8, 0x0D, 0xFF, 0x21, 0xC8, 0x0D, 0xFF, 0x21, 0xC8, 0x0D, 0xFF, 0x21, 0xC8, 0x0D, 0xFF, 0x20, 0xC8, 0x0C, 0xFF, 0x20, 0xC8, 0x0C, 0xFF, 0x1F, 0xC8, 0x0B, 0xFF, 0x5E, 0xAB, 0x55, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x8B, 0x8B, 0x8B, 0xFF, 0x77, 0x77, 0x77, 0xF5, 0x4B, 0x4B, 0x4B, 0xA5, 0x17, 0x17, 0x17, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x13, 0x28, 0x28, 0x28, 0x59, 0x4C, 0x4C, 0x4C, 0xA7, 0x6B, 0x6B, 0x6B, 0xE1, 0x81, 0x81, 0x81, 0xFF, 0x89, 0x89, 0x89, 0xFF, 0x8F, 0x8F, 0x8F, 0xFF, 0x93, 0x93, 0x93, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x95, 0x95, 0x95, 0xFF, 0x95, 0x95, 0x95, 0xFF, 0x95, 0x95, 0x95, 0xFF, 0x94, 0x94, 0x94, 0xFF, 0x94, 0x94, 0x94, 0xFF, 0x93, 0x93, 0x93, 0xFF, 0x92, 0x92, 0x92, 0xFF, 0x91, 0x91, 0x91, 0xFF, 0x90, 0x90, 0x90, 0xFF, 0x8F, 0x8F, 0x8F, 0xFF, 0x8D, 0x8D, 0x8D, 0xFF, 0x8B, 0x8B, 0x8B, 0xFF, 0x70, 0x96, 0x6C, 0xFF, 0x20, 0xC3, 0x0D, 0xFF, 0x1D, 0xC4, 0x0A, 0xFF, 0x1D, 0xC4, 0x0A, 0xFF, 0x1D, 0xC4, 0x0A, 0xFF, 0x1D, 0xC4, 0x0A, 0xFF, 0x1E, 0xC5, 0x0B, 0xFF, 0x1E, 0xC5, 0x0B, 0xFF, 0x1F, 0xC5, 0x0C, 0xFF, 0x1F, 0xC5, 0x0C, 0xFF, 0x1F, 0xC5, 0x0C, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x20, 0xC5, 0x0D, 0xFF, 0x1F, 0xC5, 0x0C, 0xFF, 0x1F, 0xC5, 0x0C, 0xFF, 0x1F, 0xC5, 0x0C, 0xFF, 0x1E, 0xC5, 0x0B, 0xFF, 0x1E, 0xC5, 0x0B, 0xFF, 0x1D, 0xC4, 0x0A, 0xFF, 0x1D, 0xC4, 0x0A, 0xFF, 0x1D, 0xC4, 0x0A, 0xFF, 0x1D, 0xC4, 0x0A, 0xFF, 0x20, 0xC3, 0x0D, 0xFF, 0x70, 0x96, 0x6C, 0xFF, 0x8B, 0x8B, 0x8B, 0xFF, 0x8D, 0x8D, 0x8D, 0xFF, 0x8F, 0x8F, 0x8F, 0xFF, 0x90, 0x90, 0x90, 0xFF, 0x91, 0x91, 0x91, 0xFF, 0x92, 0x92, 0x92, 0xFF, 0x93, 0x93, 0x93, 0xFF, 0x94, 0x94, 0x94, 0xFF, 0x94, 0x94, 0x94, 0xFF, 0x95, 0x95, 0x95, 0xFF, 0x95, 0x95, 0x95, 0xFF, 0x95, 0x95, 0x95, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x96, 0x96, 0x96, 0xFF, 0x95, 0x95, 0x95, 0xFF, 0x92, 0x92, 0x92, 0xFF, 0x8D, 0x8D, 0x8D, 0xFF, 0x86, 0x86, 0x86, 0xFF, 0x77, 0x77, 0x77, 0xF3, 0x5D, 0x5D, 0x5D, 0xC9, 0x3A, 0x3A, 0x3A, 0x80, 0x14, 0x14, 0x14, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x0D, 0x0D, 0x1D, 0x20, 0x20, 0x20, 0x47, 0x35, 0x35, 0x35, 0x74, 0x43, 0x43, 0x43, 0x93, 0x4D, 0x4D, 0x4D, 0xA9, 0x52, 0x52, 0x52, 0xB5, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB7, 0x53, 0x53, 0x53, 0xB7, 0x52, 0x52, 0x52, 0xB7, 0x52, 0x52, 0x52, 0xB7, 0x51, 0x51, 0x51, 0xB8, 0x50, 0x50, 0x50, 0xB8, 0x4F, 0x4F, 0x4F, 0xB9, 0x4F, 0x4F, 0x4F, 0xBA, 0x4E, 0x4E, 0x4E, 0xBA, 0x49, 0x54, 0x48, 0xC0, 0x20, 0xB4, 0x0F, 0xF7, 0x1A, 0xC2, 0x07, 0xFF, 0x1B, 0xC2, 0x08, 0xFF, 0x1B, 0xC2, 0x08, 0xFF, 0x1B, 0xC2, 0x08, 0xFF, 0x1C, 0xC2, 0x09, 0xFF, 0x1C, 0xC2, 0x09, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1E, 0xC3, 0x0B, 0xFF, 0x1E, 0xC3, 0x0B, 0xFF, 0x1E, 0xC3, 0x0B, 0xFF, 0x1E, 0xC3, 0x0B, 0xFF, 0x1E, 0xC3, 0x0B, 0xFF, 0x1E, 0xC3, 0x0B, 0xFF, 0x1E, 0xC3, 0x0B, 0xFF, 0x1E, 0xC3, 0x0B, 0xFF, 0x1E, 0xC3, 0x0B, 0xFF, 0x1E, 0xC3, 0x0B, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1D, 0xC2, 0x0A, 0xFF, 0x1C, 0xC2, 0x09, 0xFF, 0x1C, 0xC2, 0x09, 0xFF, 0x1B, 0xC2, 0x08, 0xFF, 0x1B, 0xC2, 0x08, 0xFF, 0x1B, 0xC2, 0x08, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x20, 0xB4, 0x0F, 0xF7, 0x49, 0x54, 0x48, 0xC0, 0x4E, 0x4E, 0x4E, 0xBA, 0x4F, 0x4F, 0x4F, 0xBA, 0x4F, 0x4F, 0x4F, 0xB9, 0x50, 0x50, 0x50, 0xB8, 0x51, 0x51, 0x51, 0xB8, 0x52, 0x52, 0x52, 0xB7, 0x52, 0x52, 0x52, 0xB7, 0x53, 0x53, 0x53, 0xB7, 0x53, 0x53, 0x53, 0xB7, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x53, 0x53, 0x53, 0xB6, 0x51, 0x51, 0x51, 0xB2, 0x4A, 0x4A, 0x4A, 0xA2, 0x3E, 0x3E, 0x3E, 0x88, 0x2D, 0x2D, 0x2D, 0x63, 0x17, 0x17, 0x17, 0x32, 0x05, 0x05, 0x05, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x12, 0x8A, 0x04, 0xBC, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1B, 0xC0, 0x08, 0xFF, 0x1B, 0xC0, 0x08, 0xFF, 0x1B, 0xC0, 0x08, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1C, 0xC0, 0x09, 0xFF, 0x1B, 0xC0, 0x08, 0xFF, 0x1B, 0xC0, 0x08, 0xFF, 0x1B, 0xC0, 0x08, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1A, 0xC0, 0x07, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x12, 0x8A, 0x04, 0xBC, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x0B, 0x58, 0x02, 0x80, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x19, 0xBD, 0x05, 0xFF, 0x19, 0xBD, 0x05, 0xFF, 0x19, 0xBD, 0x05, 0xFF, 0x1A, 0xBE, 0x06, 0xFF, 0x1A, 0xBE, 0x06, 0xFF, 0x1A, 0xBE, 0x06, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x07, 0xFF, 0x1A, 0xBE, 0x06, 0xFF, 0x1A, 0xBE, 0x06, 0xFF, 0x1A, 0xBE, 0x06, 0xFF, 0x19, 0xBD, 0x05, 0xFF, 0x19, 0xBD, 0x05, 0xFF, 0x19, 0xBD, 0x05, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x0B, 0x58, 0x02, 0x80, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x05, 0x25, 0x01, 0x45, 0x14, 0xA2, 0x02, 0xFC, 0x14, 0xA4, 0x02, 0xFF, 0x14, 0xA4, 0x02, 0xFF, 0x14, 0xA4, 0x02, 0xFF, 0x14, 0xA4, 0x02, 0xFF, 0x15, 0xA4, 0x03, 0xFF, 0x15, 0xA4, 0x03, 0xFF, 0x15, 0xA4, 0x03, 0xFF, 0x15, 0xA4, 0x03, 0xFF, 0x15, 0xA9, 0x03, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x18, 0xBA, 0x04, 0xFF, 0x15, 0xA9, 0x03, 0xFF, 0x15, 0xA4, 0x03, 0xFF, 0x15, 0xA4, 0x03, 0xFF, 0x15, 0xA4, 0x03, 0xFF, 0x15, 0xA4, 0x03, 0xFF, 0x14, 0xA4, 0x02, 0xFF, 0x14, 0xA4, 0x02, 0xFF, 0x14, 0xA4, 0x02, 0xFF, 0x14, 0xA4, 0x02, 0xFF, 0x14, 0xA2, 0x02, 0xFC, 0x05, 0x25, 0x01, 0x45, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x07, 0x42, 0x00, 0x86, 0x09, 0x4E, 0x01, 0x9F, 0x09, 0x4E, 0x01, 0x9F, 0x09, 0x4E, 0x01, 0xA1, 0x09, 0x4E, 0x01, 0xA2, 0x09, 0x4E, 0x01, 0xA3, 0x09, 0x4E, 0x01, 0xA4, 0x09, 0x4E, 0x01, 0xA5, 0x09, 0x4E, 0x01, 0xA7, 0x09, 0x4E, 0x01, 0xA8, 0x0B, 0x5D, 0x01, 0xB8, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x0B, 0x5D, 0x01, 0xB8, 0x09, 0x4E, 0x01, 0xA8, 0x09, 0x4E, 0x01, 0xA7, 0x09, 0x4E, 0x01, 0xA5, 0x09, 0x4E, 0x01, 0xA4, 0x09, 0x4E, 0x01, 0xA3, 0x09, 0x4E, 0x01, 0xA2, 0x09, 0x4E, 0x01, 0xA1, 0x09, 0x4E, 0x01, 0x9F, 0x09, 0x4E, 0x01, 0x9F, 0x07, 0x42, 0x00, 0x86, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x24, 0x03, 0x18, 0x00, 0x4D, 0x14, 0xB5, 0x00, 0xFF, 0x14, 0xB5, 0x00, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x14, 0xB5, 0x00, 0xFF, 0x14, 0xB5, 0x00, 0xFF, 0x03, 0x18, 0x00, 0x4D, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x23, 0x03, 0x18, 0x00, 0x4C, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB2, 0x00, 0xFF, 0x14, 0xB2, 0x00, 0xFF, 0x14, 0xB2, 0x00, 0xFF, 0x14, 0xB2, 0x00, 0xFF, 0x14, 0xB2, 0x00, 0xFF, 0x14, 0xB2, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x03, 0x18, 0x00, 0x4C, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x21, 0x03, 0x18, 0x00, 0x4B, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x03, 0x18, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x21, 0x03, 0x17, 0x00, 0x4B, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAC, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x03, 0x17, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x1F, 0x03, 0x17, 0x00, 0x4A, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x03, 0x17, 0x00, 0x4A, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x1E, 0x03, 0x16, 0x00, 0x49, 0x13, 0xA5, 0x00, 0xFF, 0x13, 0xA5, 0x00, 0xFF, 0x13, 0xA5, 0x00, 0xFF, 0x13, 0xA5, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA5, 0x00, 0xFF, 0x13, 0xA5, 0x00, 0xFF, 0x13, 0xA5, 0x00, 0xFF, 0x13, 0xA5, 0x00, 0xFF, 0x03, 0x16, 0x00, 0x49, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x1D, 0x03, 0x16, 0x00, 0x48, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x12, 0xA2, 0x00, 0xFF, 0x03, 0x16, 0x00, 0x48, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1C, 0x03, 0x16, 0x00, 0x47, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x03, 0x16, 0x00, 0x47, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1C, 0x03, 0x15, 0x00, 0x47, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x03, 0x15, 0x00, 0x47, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1B, 0x02, 0x15, 0x00, 0x47, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x02, 0x15, 0x00, 0x47, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1B, 0x02, 0x14, 0x00, 0x46, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x02, 0x14, 0x00, 0x46, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x14, 0x00, 0x46, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x02, 0x14, 0x00, 0x46, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x13, 0x00, 0x45, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x91, 0x00, 0xFF, 0x12, 0x91, 0x00, 0xFF, 0x12, 0x91, 0x00, 0xFF, 0x12, 0x91, 0x00, 0xFF, 0x12, 0x91, 0x00, 0xFF, 0x12, 0x91, 0x00, 0xFF, 0x12, 0x91, 0x00, 0xFF, 0x12, 0x91, 0x00, 0xFF, 0x12, 0x91, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x02, 0x13, 0x00, 0x45, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x02, 0x13, 0x00, 0x45, 0x12, 0x8F, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8E, 0x00, 0xFF, 0x12, 0x8F, 0x00, 0xFF, 0x02, 0x13, 0x00, 0x45, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x02, 0x13, 0x00, 0x45, 0x12, 0x8D, 0x00, 0xFF, 0x12, 0x8D, 0x00, 0xFF, 0x12, 0x8D, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8C, 0x00, 0xFF, 0x12, 0x8D, 0x00, 0xFF, 0x12, 0x8D, 0x00, 0xFF, 0x12, 0x8D, 0x00, 0xFF, 0x02, 0x13, 0x00, 0x45, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x02, 0x12, 0x00, 0x45, 0x12, 0x8A, 0x00, 0xFF, 0x12, 0x8A, 0x00, 0xFF, 0x12, 0x8A, 0x00, 0xFF, 0x12, 0x8A, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x89, 0x00, 0xFF, 0x12, 0x8A, 0x00, 0xFF, 0x12, 0x8A, 0x00, 0xFF, 0x12, 0x8A, 0x00, 0xFF, 0x12, 0x8A, 0x00, 0xFF, 0x02, 0x12, 0x00, 0x45, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x02, 0x12, 0x00, 0x45, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x02, 0x12, 0x00, 0x45, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x02, 0x12, 0x00, 0x45, 0x11, 0x85, 0x00, 0xFF, 0x11, 0x85, 0x00, 0xFF, 0x11, 0x85, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x10, 0x84, 0x00, 0xFF, 0x10, 0x84, 0x00, 0xFF, 0x10, 0x84, 0x00, 0xFF, 0x10, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x85, 0x00, 0xFF, 0x11, 0x85, 0x00, 0xFF, 0x11, 0x85, 0x00, 0xFF, 0x02, 0x12, 0x00, 0x45, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x19, 0x02, 0x11, 0x00, 0x45, 0x11, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x11, 0x82, 0x00, 0xFF, 0x02, 0x11, 0x00, 0x45, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x02, 0x11, 0x00, 0x44, 0x10, 0x80, 0x00, 0xFF, 0x10, 0x80, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x80, 0x00, 0xFF, 0x10, 0x80, 0x00, 0xFF, 0x02, 0x11, 0x00, 0x44, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x38, 0x39, 0x6D, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x36, 0x37, 0x39, 0x74, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x34, 0x33, 0x33, 0xFF, 0x40, 0x33, 0x33, 0xFF, 0x66, 0x33, 0x33, 0xFF, 0x8B, 0x36, 0x35, 0xFF, 0xA0, 0x43, 0x35, 0xFF, 0xA5, 0x3B, 0x36, 0xFF, 0xA2, 0x3C, 0x35, 0xFF, 0xA5, 0x42, 0x35, 0xFF, 0xA7, 0x59, 0x37, 0xFF, 0xA8, 0x6A, 0x37, 0xFF, 0xA8, 0x72, 0x37, 0xFF, 0xA9, 0x7D, 0x39, 0xFF, 0xA9, 0x88, 0x3D, 0xFF, 0xA9, 0x8E, 0x41, 0xFF, 0xA9, 0x8F, 0x43, 0xFF, 0xA9, 0x8E, 0x44, 0xFF, 0xA9, 0x90, 0x44, 0xFF, 0xA9, 0x90, 0x41, 0xFF, 0xA9, 0x91, 0x3F, 0xFF, 0xA9, 0x90, 0x3E, 0xFF, 0xA9, 0x90, 0x3C, 0xFF, 0xA9, 0x90, 0x38, 0xFF, 0xA9, 0x8D, 0x37, 0xFF, 0xA8, 0x74, 0x36, 0xFF, 0xA8, 0x66, 0x35, 0xFF, 0xA8, 0x5C, 0x35, 0xFF, 0xA8, 0x52, 0x35, 0xFF, 0xA7, 0x4C, 0x35, 0xFF, 0xA8, 0x49, 0x35, 0xFF, 0xA7, 0x47, 0x35, 0xFF, 0xA8, 0x46, 0x36, 0xFF, 0xA6, 0x40, 0x36, 0xFF, 0xA6, 0x3C, 0x35, 0xFF, 0xA7, 0x3C, 0x35, 0xFF, 0xA6, 0x3E, 0x36, 0xFF, 0xA5, 0x3D, 0x36, 0xFF, 0x60, 0x5F, 0x5F, 0xFF, 0x60, 0x5F, 0x5F, 0xFF, 0x60, 0x5F, 0x5F, 0xFF, 0x60, 0x5F, 0x5F, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x29, 0x01, 0x00, 0xFF, 0x77, 0x00, 0x02, 0xFF, 0xB9, 0x01, 0x03, 0xFF, 0xE4, 0x07, 0x06, 0xFF, 0xFB, 0x1B, 0x07, 0xFF, 0xFE, 0x3F, 0x09, 0xFF, 0xFE, 0x6F, 0x0A, 0xFF, 0xFE, 0xAE, 0x0A, 0xFF, 0xFD, 0xEB, 0x0D, 0xFF, 0xFE, 0xFE, 0x15, 0xFF, 0xFD, 0xFD, 0x27, 0xFF, 0xFD, 0xFD, 0x3C, 0xFF, 0xFD, 0xFD, 0x4A, 0xFF, 0xFC, 0xFC, 0x46, 0xFF, 0xFD, 0xFC, 0x4E, 0xFF, 0xFC, 0xFD, 0x5D, 0xFF, 0xFC, 0xFC, 0x5A, 0xFF, 0xFB, 0xFC, 0x4D, 0xFF, 0xFC, 0xFB, 0x33, 0xFF, 0xFC, 0xFB, 0x31, 0xFF, 0xFB, 0xFB, 0x22, 0xFF, 0xFB, 0xFA, 0x0B, 0xFF, 0xFB, 0xFA, 0x07, 0xFF, 0xFA, 0xDD, 0x08, 0xFF, 0xFA, 0xAF, 0x08, 0xFF, 0xFA, 0x9A, 0x08, 0xFF, 0xF9, 0x72, 0x07, 0xFF, 0xF8, 0x68, 0x07, 0xFF, 0xF9, 0x63, 0x08, 0xFF, 0xF8, 0x5E, 0x07, 0xFF, 0xF8, 0x49, 0x07, 0xFF, 0xF7, 0x36, 0x07, 0xFF, 0xF7, 0x2E, 0x06, 0xFF, 0xF7, 0x35, 0x07, 0xFF, 0xF7, 0x37, 0x06, 0xFF, 0xF7, 0x34, 0x07, 0xFF, 0x2A, 0x2A, 0x2A, 0xFF, 0x2A, 0x2A, 0x2A, 0xFF, 0x27, 0x27, 0x28, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x94, 0x05, 0x04, 0xFF, 0xDF, 0x05, 0x05, 0xFF, 0xFD, 0x08, 0x07, 0xFF, 0xFE, 0x00, 0x06, 0xFF, 0xFE, 0x0E, 0x06, 0xFF, 0xFE, 0x88, 0x09, 0xFF, 0xFE, 0xF0, 0x0E, 0xFF, 0xFE, 0xFE, 0x15, 0xFF, 0xFE, 0xFE, 0x18, 0xFF, 0xFD, 0xFD, 0x13, 0xFF, 0xFD, 0xFD, 0x1C, 0xFF, 0xFD, 0xFD, 0x2A, 0xFF, 0xFD, 0xFC, 0x2B, 0xFF, 0xFD, 0xFD, 0x1B, 0xFF, 0xFC, 0xFD, 0x1C, 0xFF, 0xFC, 0xFC, 0x26, 0xFF, 0xFC, 0xFB, 0x23, 0xFF, 0xFC, 0xFB, 0x1C, 0xFF, 0xFB, 0xFB, 0x0C, 0xFF, 0xFB, 0xFB, 0x0A, 0xFF, 0xFB, 0xFA, 0x07, 0xFF, 0xFA, 0xFB, 0x06, 0xFF, 0xFA, 0xE2, 0x06, 0xFF, 0xF9, 0xAA, 0x06, 0xFF, 0xF9, 0x7E, 0x06, 0xFF, 0xF9, 0x6C, 0x06, 0xFF, 0xF8, 0x73, 0x07, 0xFF, 0xF9, 0x7A, 0x07, 0xFF, 0xF9, 0x7D, 0x07, 0xFF, 0xF8, 0x73, 0x07, 0xFF, 0xF8, 0x58, 0x07, 0xFF, 0xF7, 0x3E, 0x06, 0xFF, 0xF7, 0x30, 0x06, 0xFF, 0xF6, 0x3B, 0x06, 0xFF, 0xF6, 0x40, 0x06, 0xFF, 0xF6, 0x3F, 0x06, 0xFF, 0x2C, 0x2C, 0x2C, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF6, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFB, 0x18, 0x08, 0xFF, 0xFF, 0x06, 0x07, 0xFF, 0xFF, 0x00, 0x06, 0xFF, 0xFE, 0x00, 0x06, 0xFF, 0xFF, 0x08, 0x06, 0xFF, 0xFE, 0xA9, 0x08, 0xFF, 0xFE, 0xFE, 0x20, 0xFF, 0xFE, 0xFE, 0x39, 0xFF, 0xFD, 0xFD, 0x25, 0xFF, 0xFD, 0xFD, 0x08, 0xFF, 0xFD, 0xFD, 0x04, 0xFF, 0xFD, 0xFC, 0x05, 0xFF, 0xFD, 0xFD, 0x06, 0xFF, 0xFD, 0xFD, 0x06, 0xFF, 0xFC, 0xFC, 0x05, 0xFF, 0xFC, 0xFC, 0x04, 0xFF, 0xFB, 0xFC, 0x04, 0xFF, 0xFB, 0xFB, 0x05, 0xFF, 0xFB, 0xFB, 0x05, 0xFF, 0xFA, 0xFB, 0x05, 0xFF, 0xFB, 0xF9, 0x06, 0xFF, 0xFA, 0xD3, 0x06, 0xFF, 0xFA, 0x92, 0x06, 0xFF, 0xF9, 0x5C, 0x06, 0xFF, 0xF9, 0x40, 0x06, 0xFF, 0xF9, 0x40, 0x06, 0xFF, 0xF9, 0x54, 0x07, 0xFF, 0xF8, 0x5C, 0x08, 0xFF, 0xF8, 0x69, 0x09, 0xFF, 0xF8, 0x5B, 0x07, 0xFF, 0xF7, 0x43, 0x07, 0xFF, 0xF7, 0x20, 0x06, 0xFF, 0xF7, 0x19, 0x06, 0xFF, 0xF7, 0x22, 0x06, 0xFF, 0xF6, 0x1C, 0x06, 0xFF, 0xF6, 0x12, 0x06, 0xFF, 0x29, 0x29, 0x29, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFF, 0x02, 0x05, 0xFF, 0xFF, 0x00, 0x05, 0xFF, 0xFE, 0x00, 0x06, 0xFF, 0xFE, 0x00, 0x06, 0xFF, 0xFE, 0x21, 0x06, 0xFF, 0xFE, 0xD0, 0x09, 0xFF, 0xFE, 0xFE, 0x31, 0xFF, 0xFE, 0xFD, 0x47, 0xFF, 0xFE, 0xFD, 0x1E, 0xFF, 0xFD, 0xFD, 0x06, 0xFF, 0xFD, 0xFD, 0x08, 0xFF, 0xFC, 0xFD, 0x08, 0xFF, 0xFD, 0xFD, 0x08, 0xFF, 0xFD, 0xFC, 0x08, 0xFF, 0xFC, 0xFC, 0x09, 0xFF, 0xFB, 0xFC, 0x08, 0xFF, 0xFB, 0xFB, 0x08, 0xFF, 0xFB, 0xFB, 0x07, 0xFF, 0xFB, 0xF9, 0x07, 0xFF, 0xFA, 0xEC, 0x06, 0xFF, 0xFA, 0xD1, 0x07, 0xFF, 0xFA, 0x8F, 0x06, 0xFF, 0xFA, 0x52, 0x06, 0xFF, 0xFA, 0x27, 0x05, 0xFF, 0xF9, 0x1B, 0x05, 0xFF, 0xF9, 0x30, 0x06, 0xFF, 0xF8, 0x43, 0x06, 0xFF, 0xF8, 0x59, 0x08, 0xFF, 0xF8, 0x74, 0x09, 0xFF, 0xF7, 0x55, 0x08, 0xFF, 0xF7, 0x34, 0x06, 0xFF, 0xF6, 0x24, 0x07, 0xFF, 0xF6, 0x0E, 0x06, 0xFF, 0xF6, 0x0B, 0x06, 0xFF, 0xF6, 0x05, 0x06, 0xFF, 0xF5, 0x00, 0x06, 0xFF, 0x28, 0x27, 0x27, 0xFF, 0x28, 0x28, 0x28, 0xFF, 0x26, 0x26, 0x26, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFE, 0x00, 0x06, 0xFF, 0xFF, 0x00, 0x06, 0xFF, 0xFF, 0x01, 0x07, 0xFF, 0xFE, 0x09, 0x07, 0xFF, 0xFE, 0x6D, 0x05, 0xFF, 0xFD, 0xF9, 0x14, 0xFF, 0xFD, 0xFE, 0x42, 0xFF, 0xFD, 0xFD, 0x50, 0xFF, 0xFD, 0xFE, 0x23, 0xFF, 0xFD, 0xFD, 0x05, 0xFF, 0xFC, 0xFD, 0x07, 0xFF, 0xFC, 0xFC, 0x08, 0xFF, 0xFC, 0xFD, 0x09, 0xFF, 0xFC, 0xFB, 0x09, 0xFF, 0xFC, 0xFC, 0x0A, 0xFF, 0xFB, 0xFB, 0x0C, 0xFF, 0xFC, 0xFB, 0x07, 0xFF, 0xFB, 0xFA, 0x06, 0xFF, 0xFA, 0xE8, 0x06, 0xFF, 0xFA, 0xC9, 0x06, 0xFF, 0xF9, 0xAB, 0x06, 0xFF, 0xF9, 0x6F, 0x06, 0xFF, 0xF9, 0x35, 0x06, 0xFF, 0xF9, 0x13, 0x06, 0xFF, 0xF8, 0x1B, 0x06, 0xFF, 0xF9, 0x34, 0x07, 0xFF, 0xF9, 0x3F, 0x06, 0xFF, 0xF8, 0x66, 0x07, 0xFF, 0xF7, 0x8B, 0x08, 0xFF, 0xF7, 0x84, 0x0A, 0xFF, 0xF7, 0x5D, 0x07, 0xFF, 0xF7, 0x45, 0x06, 0xFF, 0xF7, 0x21, 0x06, 0xFF, 0xF5, 0x11, 0x06, 0xFF, 0xF5, 0x05, 0x06, 0xFF, 0xF5, 0x02, 0x06, 0xFF, 0x12, 0x12, 0x12, 0xFF, 0x0E, 0x0E, 0x0E, 0xFF, 0x0A, 0x0A, 0x0A, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFE, 0x08, 0x07, 0xFF, 0xFF, 0x1F, 0x08, 0xFF, 0xFE, 0x3A, 0x07, 0xFF, 0xFE, 0x7C, 0x07, 0xFF, 0xFE, 0xE2, 0x07, 0xFF, 0xFD, 0xFD, 0x39, 0xFF, 0xFD, 0xFD, 0x78, 0xFF, 0xFD, 0xFD, 0x7F, 0xFF, 0xFD, 0xFD, 0x49, 0xFF, 0xFC, 0xFD, 0x12, 0xFF, 0xFD, 0xFD, 0x07, 0xFF, 0xFC, 0xFD, 0x0B, 0xFF, 0xFC, 0xFC, 0x0C, 0xFF, 0xFC, 0xFC, 0x0B, 0xFF, 0xFC, 0xFC, 0x0E, 0xFF, 0xFB, 0xFB, 0x0A, 0xFF, 0xFA, 0xFB, 0x07, 0xFF, 0xFA, 0xED, 0x06, 0xFF, 0xFA, 0xD8, 0x06, 0xFF, 0xFA, 0xC3, 0x06, 0xFF, 0xFA, 0xA8, 0x06, 0xFF, 0xFA, 0x75, 0x06, 0xFF, 0xF9, 0x41, 0x06, 0xFF, 0xF9, 0x28, 0x06, 0xFF, 0xF9, 0x36, 0x06, 0xFF, 0xF8, 0x45, 0x06, 0xFF, 0xF8, 0x58, 0x06, 0xFF, 0xF7, 0x94, 0x08, 0xFF, 0xF7, 0xDD, 0x0B, 0xFF, 0xF7, 0xE0, 0x0A, 0xFF, 0xF7, 0xBF, 0x08, 0xFF, 0xF6, 0xA4, 0x08, 0xFF, 0xF6, 0x7B, 0x08, 0xFF, 0xF6, 0x59, 0x07, 0xFF, 0xF6, 0x31, 0x06, 0xFF, 0xF5, 0x22, 0x06, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFE, 0x66, 0x08, 0xFF, 0xFE, 0xA9, 0x09, 0xFF, 0xFE, 0xD1, 0x08, 0xFF, 0xFE, 0xF9, 0x08, 0xFF, 0xFD, 0xFE, 0x2A, 0xFF, 0xFD, 0xFD, 0x95, 0xFF, 0xFD, 0xFE, 0xD4, 0xFF, 0xFE, 0xFD, 0xD3, 0xFF, 0xFD, 0xFC, 0xA2, 0xFF, 0xFD, 0xFC, 0x59, 0xFF, 0xFC, 0xFC, 0x27, 0xFF, 0xFC, 0xFC, 0x15, 0xFF, 0xFC, 0xFB, 0x0D, 0xFF, 0xFC, 0xFC, 0x0E, 0xFF, 0xFB, 0xFC, 0x11, 0xFF, 0xFB, 0xFB, 0x09, 0xFF, 0xFA, 0xF6, 0x08, 0xFF, 0xFA, 0xD3, 0x07, 0xFF, 0xFA, 0xCF, 0x07, 0xFF, 0xF9, 0xCA, 0x06, 0xFF, 0xF9, 0xC0, 0x07, 0xFF, 0xF9, 0x98, 0x06, 0xFF, 0xF9, 0x6E, 0x06, 0xFF, 0xF8, 0x5F, 0x06, 0xFF, 0xF8, 0x66, 0x06, 0xFF, 0xF8, 0x71, 0x06, 0xFF, 0xF8, 0x96, 0x06, 0xFF, 0xF8, 0xDB, 0x08, 0xFF, 0xF7, 0xF7, 0x09, 0xFF, 0xF6, 0xF7, 0x0E, 0xFF, 0xF6, 0xF7, 0x0F, 0xFF, 0xF6, 0xF6, 0x0A, 0xFF, 0xF5, 0xEE, 0x08, 0xFF, 0xF6, 0xDA, 0x09, 0xFF, 0xF5, 0xA5, 0x07, 0xFF, 0xF5, 0x6D, 0x06, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFE, 0xE6, 0x07, 0xFF, 0xFE, 0xFF, 0x0E, 0xFF, 0xFE, 0xFE, 0x1F, 0xFF, 0xFE, 0xFD, 0x40, 0xFF, 0xFD, 0xFE, 0x9A, 0xFF, 0xFD, 0xFD, 0xF0, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xF7, 0xFF, 0xFC, 0xFC, 0xDA, 0xFF, 0xFC, 0xFC, 0x90, 0xFF, 0xFB, 0xFC, 0x4B, 0xFF, 0xFC, 0xFB, 0x27, 0xFF, 0xFB, 0xFB, 0x15, 0xFF, 0xFB, 0xFB, 0x09, 0xFF, 0xFB, 0xFB, 0x08, 0xFF, 0xFA, 0xEC, 0x07, 0xFF, 0xFA, 0xC0, 0x06, 0xFF, 0xFA, 0xC9, 0x07, 0xFF, 0xFA, 0xDE, 0x07, 0xFF, 0xF9, 0xE4, 0x07, 0xFF, 0xF9, 0xC1, 0x07, 0xFF, 0xF9, 0xA6, 0x06, 0xFF, 0xF8, 0xA5, 0x06, 0xFF, 0xF8, 0xAC, 0x06, 0xFF, 0xF8, 0xC3, 0x07, 0xFF, 0xF7, 0xE6, 0x08, 0xFF, 0xF8, 0xF7, 0x09, 0xFF, 0xF7, 0xF7, 0x06, 0xFF, 0xF6, 0xF7, 0x1A, 0xFF, 0xF6, 0xF7, 0x30, 0xFF, 0xF6, 0xF6, 0x1E, 0xFF, 0xF5, 0xF6, 0x0D, 0xFF, 0xF6, 0xF6, 0x06, 0xFF, 0xF5, 0xF5, 0x06, 0xFF, 0xF4, 0xD9, 0x08, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFE, 0xFE, 0x0F, 0xFF, 0xFE, 0xFE, 0x3D, 0xFF, 0xFE, 0xFE, 0x7F, 0xFF, 0xFE, 0xFE, 0xBE, 0xFF, 0xFD, 0xFD, 0xF7, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFC, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xF7, 0xFF, 0xFB, 0xFC, 0xBD, 0xFF, 0xFB, 0xFB, 0x66, 0xFF, 0xFB, 0xFB, 0x2F, 0xFF, 0xFB, 0xFB, 0x10, 0xFF, 0xFA, 0xFB, 0x06, 0xFF, 0xFA, 0xDD, 0x06, 0xFF, 0xFA, 0xAC, 0x06, 0xFF, 0xFA, 0xC7, 0x07, 0xFF, 0xF9, 0xEC, 0x07, 0xFF, 0xF9, 0xF7, 0x08, 0xFF, 0xF8, 0xE6, 0x07, 0xFF, 0xF8, 0xDF, 0x08, 0xFF, 0xF8, 0xE6, 0x08, 0xFF, 0xF8, 0xED, 0x07, 0xFF, 0xF8, 0xF7, 0x07, 0xFF, 0xF7, 0xF7, 0x07, 0xFF, 0xF7, 0xF7, 0x05, 0xFF, 0xF6, 0xF7, 0x0E, 0xFF, 0xF7, 0xF6, 0x41, 0xFF, 0xF6, 0xF6, 0x80, 0xFF, 0xF5, 0xF6, 0x89, 0xFF, 0xF5, 0xF5, 0x62, 0xFF, 0xF5, 0xF5, 0x27, 0xFF, 0xF5, 0xF5, 0x06, 0xFF, 0xF4, 0xF5, 0x05, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFE, 0xFF, 0x55, 0xFF, 0xFE, 0xFE, 0xAF, 0xFF, 0xFD, 0xFE, 0xF2, 0xFF, 0xFD, 0xFE, 0xFD, 0xFF, 0xFE, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFC, 0xFF, 0xFC, 0xFC, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xC6, 0xFF, 0xFB, 0xFB, 0x76, 0xFF, 0xFA, 0xFB, 0x41, 0xFF, 0xFB, 0xFA, 0x15, 0xFF, 0xFA, 0xCC, 0x04, 0xFF, 0xF9, 0xA6, 0x06, 0xFF, 0xF9, 0xD6, 0x07, 0xFF, 0xF9, 0xF7, 0x08, 0xFF, 0xF8, 0xF9, 0x08, 0xFF, 0xF8, 0xF8, 0x08, 0xFF, 0xF8, 0xF9, 0x07, 0xFF, 0xF7, 0xF8, 0x08, 0xFF, 0xF7, 0xF8, 0x08, 0xFF, 0xF7, 0xF7, 0x08, 0xFF, 0xF7, 0xF7, 0x09, 0xFF, 0xF6, 0xF7, 0x1D, 0xFF, 0xF6, 0xF7, 0x53, 0xFF, 0xF6, 0xF6, 0xA3, 0xFF, 0xF5, 0xF5, 0xE7, 0xFF, 0xF5, 0xF5, 0xF3, 0xFF, 0xF5, 0xF5, 0xE2, 0xFF, 0xF5, 0xF5, 0x97, 0xFF, 0xF4, 0xF5, 0x3F, 0xFF, 0xF4, 0xF4, 0x10, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFE, 0xFE, 0xC8, 0xFF, 0xFE, 0xFE, 0xFD, 0xFF, 0xFE, 0xFE, 0xFE, 0xFF, 0xFE, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFC, 0xFD, 0xFF, 0xFC, 0xFC, 0xFD, 0xFF, 0xFD, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFC, 0xFB, 0xFC, 0xFF, 0xFC, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xC5, 0xFF, 0xFA, 0xFA, 0x7F, 0xFF, 0xFB, 0xFB, 0x3F, 0xFF, 0xFA, 0xD2, 0x0B, 0xFF, 0xFA, 0xBC, 0x06, 0xFF, 0xF9, 0xEF, 0x0A, 0xFF, 0xF9, 0xF9, 0x0B, 0xFF, 0xF8, 0xF9, 0x0A, 0xFF, 0xF8, 0xF8, 0x09, 0xFF, 0xF8, 0xF8, 0x0A, 0xFF, 0xF8, 0xF7, 0x0E, 0xFF, 0xF7, 0xF8, 0x19, 0xFF, 0xF7, 0xF7, 0x31, 0xFF, 0xF7, 0xF6, 0x57, 0xFF, 0xF6, 0xF7, 0x91, 0xFF, 0xF6, 0xF6, 0xCC, 0xFF, 0xF6, 0xF6, 0xF3, 0xFF, 0xF6, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xEE, 0xFF, 0xF4, 0xF5, 0xA8, 0xFF, 0xF4, 0xF4, 0x4A, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFD, 0xFE, 0xFE, 0xFF, 0xFD, 0xFE, 0xFE, 0xFF, 0xFE, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFC, 0xFC, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFA, 0xFA, 0xFF, 0xFB, 0xFA, 0xE5, 0xFF, 0xFA, 0xFA, 0xA7, 0xFF, 0xF9, 0xFA, 0x5E, 0xFF, 0xF9, 0xF2, 0x18, 0xFF, 0xF9, 0xF0, 0x0A, 0xFF, 0xF9, 0xF9, 0x17, 0xFF, 0xF9, 0xF8, 0x21, 0xFF, 0xF8, 0xF9, 0x23, 0xFF, 0xF8, 0xF8, 0x27, 0xFF, 0xF7, 0xF8, 0x31, 0xFF, 0xF7, 0xF7, 0x45, 0xFF, 0xF8, 0xF7, 0x6E, 0xFF, 0xF7, 0xF6, 0xAB, 0xFF, 0xF7, 0xF7, 0xDF, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF4, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF4, 0xF4, 0xDB, 0xFF, 0xF3, 0xF4, 0x7D, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFE, 0xFE, 0xFE, 0xFF, 0xFD, 0xFD, 0xFE, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFC, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFD, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFB, 0xFF, 0xFB, 0xFC, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xE8, 0xFF, 0xFA, 0xFA, 0xB3, 0xFF, 0xF9, 0xF9, 0x6A, 0xFF, 0xF9, 0xF9, 0x2B, 0xFF, 0xF9, 0xF9, 0x20, 0xFF, 0xF8, 0xF9, 0x3E, 0xFF, 0xF8, 0xF9, 0x52, 0xFF, 0xF8, 0xF8, 0x52, 0xFF, 0xF8, 0xF8, 0x5E, 0xFF, 0xF8, 0xF7, 0x75, 0xFF, 0xF7, 0xF7, 0x9F, 0xFF, 0xF7, 0xF7, 0xE0, 0xFF, 0xF6, 0xF7, 0xF6, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF4, 0xFF, 0xF5, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xDC, 0xFF, 0xF4, 0xF4, 0x8D, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF2, 0xF3, 0xF3, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFE, 0xFD, 0xFD, 0xFF, 0xFD, 0xFE, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFC, 0xFD, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFA, 0xFF, 0xFB, 0xFA, 0xFB, 0xFF, 0xFA, 0xFB, 0xFA, 0xFF, 0xFA, 0xFA, 0xEF, 0xFF, 0xFA, 0xF9, 0xC4, 0xFF, 0xF9, 0xF9, 0x89, 0xFF, 0xF9, 0xF9, 0x5C, 0xFF, 0xF9, 0xF9, 0x63, 0xFF, 0xF8, 0xF9, 0x83, 0xFF, 0xF8, 0xF8, 0x95, 0xFF, 0xF8, 0xF8, 0x9A, 0xFF, 0xF8, 0xF8, 0xA5, 0xFF, 0xF7, 0xF8, 0xC1, 0xFF, 0xF7, 0xF7, 0xE7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF4, 0xF4, 0xCE, 0xFF, 0xF3, 0xF3, 0x98, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFE, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFC, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFD, 0xFC, 0xFD, 0xFF, 0xFD, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFC, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xFA, 0xFA, 0xFF, 0xF9, 0xF9, 0xEF, 0xFF, 0xF9, 0xF9, 0xCD, 0xFF, 0xF9, 0xF9, 0xAA, 0xFF, 0xF8, 0xF8, 0xBB, 0xFF, 0xF8, 0xF8, 0xDE, 0xFF, 0xF8, 0xF8, 0xE5, 0xFF, 0xF8, 0xF8, 0xEB, 0xFF, 0xF7, 0xF8, 0xF2, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF7, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF4, 0xF0, 0xFF, 0xF4, 0xF3, 0xD2, 0xFF, 0xF3, 0xF3, 0xB0, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFC, 0xFD, 0xFF, 0xFD, 0xFC, 0xFC, 0xFF, 0xFD, 0xFC, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFA, 0xFA, 0xFF, 0xFA, 0xFB, 0xFA, 0xFF, 0xFB, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF8, 0xF9, 0xF1, 0xFF, 0xF8, 0xF8, 0xF7, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF7, 0xF8, 0xFF, 0xF8, 0xF7, 0xF7, 0xFF, 0xF8, 0xF7, 0xF8, 0xFF, 0xF7, 0xF6, 0xF7, 0xFF, 0xF7, 0xF6, 0xF7, 0xFF, 0xF6, 0xF7, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF5, 0xFF, 0xF5, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF4, 0xF4, 0xFF, 0xF3, 0xF4, 0xF4, 0xFF, 0xF4, 0xF3, 0xE3, 0xFF, 0xF3, 0xF3, 0xC0, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFD, 0xFD, 0xF8, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFB, 0xFB, 0xFF, 0xFC, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFA, 0xFF, 0xFB, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF9, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF7, 0xFF, 0xF8, 0xF7, 0xF8, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF5, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF5, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF3, 0xF4, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF3, 0xF3, 0xEF, 0xFF, 0xF3, 0xF3, 0xC6, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF2, 0xF3, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0xFD, 0xDF, 0xFF, 0xFC, 0xFC, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFA, 0xFB, 0xFF, 0xFA, 0xFB, 0xFA, 0xFF, 0xFA, 0xFB, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xF9, 0xFA, 0xFF, 0xFA, 0xF9, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF8, 0xF9, 0xF9, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF7, 0xF8, 0xFF, 0xF7, 0xF7, 0xF8, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF6, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF6, 0xF5, 0xFF, 0xF5, 0xF6, 0xF5, 0xFF, 0xF4, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF3, 0xF3, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF3, 0xF3, 0xED, 0xFF, 0xF3, 0xF3, 0xC4, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF2, 0xF2, 0xF2, 0xFF, 0xF2, 0xF2, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0xFD, 0xB7, 0xFF, 0xFD, 0xFC, 0xEE, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFA, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xFA, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF7, 0xF8, 0xF8, 0xFF, 0xF7, 0xF8, 0xF8, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF6, 0xFF, 0xF6, 0xF6, 0xF7, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF6, 0xF6, 0xF5, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF4, 0xFF, 0xF4, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF5, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF3, 0xF3, 0xF4, 0xFF, 0xF3, 0xF3, 0xF4, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF2, 0xF3, 0xDF, 0xFF, 0xF2, 0xF2, 0xB2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFD, 0xEB, 0x82, 0xFF, 0xFC, 0xFC, 0xC1, 0xFF, 0xFC, 0xFC, 0xF3, 0xFF, 0xFC, 0xFC, 0xFB, 0xFF, 0xFC, 0xFC, 0xFB, 0xFF, 0xFB, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFA, 0xFB, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xFA, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF8, 0xF9, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF7, 0xF8, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF5, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF5, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF3, 0xF4, 0xFF, 0xF3, 0xF4, 0xF4, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF3, 0xF2, 0xE4, 0xFF, 0xF2, 0xF3, 0xBE, 0xFF, 0xF2, 0xF2, 0x8D, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0xD0, 0x4B, 0xFF, 0xFC, 0xFA, 0x81, 0xFF, 0xFC, 0xFC, 0xB9, 0xFF, 0xFB, 0xFB, 0xEA, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFA, 0xFF, 0xFA, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xFA, 0xFA, 0xFF, 0xFA, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF8, 0xF9, 0xFF, 0xF9, 0xF8, 0xF9, 0xFF, 0xF9, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF7, 0xF7, 0xF8, 0xFF, 0xF8, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF6, 0xFF, 0xF6, 0xF7, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF3, 0xF4, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF3, 0xF4, 0xF3, 0xFF, 0xF3, 0xF2, 0xE3, 0xFF, 0xF3, 0xF3, 0xB7, 0xFF, 0xF2, 0xF2, 0x88, 0xFF, 0xF3, 0xEC, 0x56, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0xB9, 0x1D, 0xFF, 0xFC, 0xEB, 0x48, 0xFF, 0xFC, 0xFB, 0x79, 0xFF, 0xFB, 0xFB, 0xA5, 0xFF, 0xFB, 0xFB, 0xC7, 0xFF, 0xFB, 0xFA, 0xE2, 0xFF, 0xFA, 0xFA, 0xF8, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xF9, 0xFA, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF8, 0xF9, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF7, 0xF8, 0xFF, 0xF8, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF5, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF4, 0xF4, 0xFF, 0xF4, 0xF3, 0xF3, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF3, 0xF3, 0xEF, 0xFF, 0xF2, 0xF3, 0xC1, 0xFF, 0xF3, 0xF3, 0x85, 0xFF, 0xF2, 0xF2, 0x4C, 0xFF, 0xF2, 0xD6, 0x1D, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF2, 0xF2, 0xF2, 0xFF, 0xF2, 0xF1, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0xB9, 0x06, 0xFF, 0xFC, 0xE2, 0x1D, 0xFF, 0xFC, 0xFA, 0x40, 0xFF, 0xFB, 0xFB, 0x5C, 0xFF, 0xFB, 0xFB, 0x75, 0xFF, 0xFA, 0xFA, 0x88, 0xFF, 0xFA, 0xFA, 0xAA, 0xFF, 0xFA, 0xFA, 0xC8, 0xFF, 0xF9, 0xFA, 0xDB, 0xFF, 0xF9, 0xF9, 0xE3, 0xFF, 0xF9, 0xF9, 0xEF, 0xFF, 0xF8, 0xF9, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF4, 0xFF, 0xF7, 0xF7, 0xE9, 0xFF, 0xF7, 0xF6, 0xE7, 0xFF, 0xF6, 0xF6, 0xE5, 0xFF, 0xF6, 0xF5, 0xE3, 0xFF, 0xF6, 0xF5, 0xE6, 0xFF, 0xF6, 0xF6, 0xE7, 0xFF, 0xF5, 0xF5, 0xE5, 0xFF, 0xF4, 0xF4, 0xE1, 0xFF, 0xF4, 0xF4, 0xD9, 0xFF, 0xF4, 0xF4, 0xD6, 0xFF, 0xF4, 0xF4, 0xDC, 0xFF, 0xF4, 0xF4, 0xE8, 0xFF, 0xF4, 0xF4, 0xE9, 0xFF, 0xF3, 0xF3, 0xE6, 0xFF, 0xF3, 0xF2, 0xD3, 0xFF, 0xF3, 0xF3, 0x95, 0xFF, 0xF2, 0xF3, 0x4E, 0xFF, 0xF2, 0xEF, 0x16, 0xFF, 0xF2, 0xBF, 0x04, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF1, 0xF1, 0xF1, 0xFF, 0xF1, 0xF1, 0xF1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0x95, 0x05, 0xFF, 0xFB, 0xBC, 0x06, 0xFF, 0xFB, 0xD4, 0x0C, 0xFF, 0xFA, 0xDA, 0x16, 0xFF, 0xFA, 0xDC, 0x22, 0xFF, 0xFA, 0xE8, 0x2B, 0xFF, 0xFA, 0xF3, 0x3C, 0xFF, 0xFA, 0xFA, 0x4D, 0xFF, 0xFA, 0xF9, 0x58, 0xFF, 0xF9, 0xF9, 0x60, 0xFF, 0xF9, 0xF9, 0x78, 0xFF, 0xF8, 0xF9, 0xA0, 0xFF, 0xF9, 0xF8, 0xBE, 0xFF, 0xF8, 0xF8, 0xCB, 0xFF, 0xF8, 0xF7, 0xC5, 0xFF, 0xF8, 0xF7, 0xA7, 0xFF, 0xF7, 0xF6, 0x7B, 0xFF, 0xF7, 0xF7, 0x5E, 0xFF, 0xF6, 0xF7, 0x56, 0xFF, 0xF6, 0xEF, 0x4F, 0xFF, 0xF6, 0xEF, 0x4E, 0xFF, 0xF5, 0xED, 0x52, 0xFF, 0xF5, 0xE6, 0x54, 0xFF, 0xF5, 0xE6, 0x50, 0xFF, 0xF5, 0xEA, 0x4F, 0xFF, 0xF4, 0xF2, 0x4D, 0xFF, 0xF4, 0xF4, 0x54, 0xFF, 0xF4, 0xF4, 0x6E, 0xFF, 0xF4, 0xF4, 0x89, 0xFF, 0xF3, 0xF3, 0x9D, 0xFF, 0xF3, 0xF3, 0xA0, 0xFF, 0xF3, 0xF3, 0x84, 0xFF, 0xF2, 0xF2, 0x4B, 0xFF, 0xF3, 0xF2, 0x19, 0xFF, 0xF2, 0xED, 0x06, 0xFF, 0xF2, 0xB2, 0x06, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFB, 0x32, 0x05, 0xFF, 0xFB, 0x5D, 0x05, 0xFF, 0xFB, 0x76, 0x05, 0xFF, 0xFA, 0x82, 0x03, 0xFF, 0xFB, 0x8B, 0x03, 0xFF, 0xFA, 0x99, 0x03, 0xFF, 0xFA, 0xA8, 0x04, 0xFF, 0xFA, 0xBB, 0x06, 0xFF, 0xF9, 0xBE, 0x06, 0xFF, 0xF9, 0xC4, 0x07, 0xFF, 0xF8, 0xDB, 0x0E, 0xFF, 0xF8, 0xF1, 0x1A, 0xFF, 0xF8, 0xF8, 0x2E, 0xFF, 0xF8, 0xF8, 0x37, 0xFF, 0xF7, 0xF7, 0x32, 0xFF, 0xF7, 0xF6, 0x1D, 0xFF, 0xF6, 0xD7, 0x0B, 0xFF, 0xF7, 0xAB, 0x06, 0xFF, 0xF6, 0x86, 0x03, 0xFF, 0xF6, 0x64, 0x01, 0xFF, 0xF5, 0x65, 0x02, 0xFF, 0xF5, 0x5B, 0x02, 0xFF, 0xF5, 0x4B, 0x01, 0xFF, 0xF5, 0x4B, 0x02, 0xFF, 0xF5, 0x58, 0x01, 0xFF, 0xF4, 0x74, 0x02, 0xFF, 0xF4, 0xA1, 0x05, 0xFF, 0xF3, 0xDE, 0x0E, 0xFF, 0xF3, 0xF3, 0x1F, 0xFF, 0xF3, 0xF3, 0x2F, 0xFF, 0xF2, 0xF2, 0x33, 0xFF, 0xF2, 0xF2, 0x1F, 0xFF, 0xF2, 0xF2, 0x0A, 0xFF, 0xF2, 0xE9, 0x04, 0xFF, 0xF1, 0xC6, 0x07, 0xFF, 0xF2, 0xA0, 0x07, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFB, 0x00, 0x05, 0xFF, 0xFB, 0x04, 0x05, 0xFF, 0xFB, 0x0E, 0x05, 0xFF, 0xFA, 0x17, 0x06, 0xFF, 0xFA, 0x1C, 0x06, 0xFF, 0xFA, 0x23, 0x05, 0xFF, 0xFA, 0x31, 0x05, 0xFF, 0xF9, 0x35, 0x05, 0xFF, 0xF9, 0x37, 0x04, 0xFF, 0xF8, 0x3B, 0x04, 0xFF, 0xF8, 0x56, 0x04, 0xFF, 0xF8, 0x7B, 0x03, 0xFF, 0xF7, 0x9F, 0x02, 0xFF, 0xF7, 0xB8, 0x04, 0xFF, 0xF7, 0xBB, 0x03, 0xFF, 0xF7, 0x91, 0x03, 0xFF, 0xF6, 0x4D, 0x04, 0xFF, 0xF6, 0x17, 0x05, 0xFF, 0xF6, 0x0D, 0x06, 0xFF, 0xF5, 0x00, 0x05, 0xFF, 0xF5, 0x00, 0x05, 0xFF, 0xEF, 0x00, 0x05, 0xFF, 0xE6, 0x00, 0x04, 0xFF, 0xE2, 0x00, 0x04, 0xFF, 0xF4, 0x00, 0x05, 0xFF, 0xF3, 0x01, 0x05, 0xFF, 0xF3, 0x13, 0x05, 0xFF, 0xF3, 0x50, 0x04, 0xFF, 0xF3, 0xA6, 0x03, 0xFF, 0xF3, 0xCC, 0x04, 0xFF, 0xF3, 0xD0, 0x03, 0xFF, 0xF3, 0xC8, 0x04, 0xFF, 0xF2, 0xA9, 0x05, 0xFF, 0xF1, 0x81, 0x06, 0xFF, 0xF2, 0x59, 0x06, 0xFF, 0xF1, 0x3F, 0x07, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFA, 0xFB, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFA, 0xF9, 0xFA, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF6, 0xF7, 0xF7, 0xFF, 0xF6, 0xF7, 0xF7, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF2, 0xF3, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF2, 0xF3, 0xF2, 0xFF, 0xF2, 0xF2, 0xF2, 0xFF, 0xF1, 0xF2, 0xF2, 0xFF, 0xF2, 0xF1, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF1, 0xF1, 0xF1, 0xFF, 0xF1, 0xF1, 0xF1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF0, 0xF1, 0xF1, 0xFF, 0xF0, 0xF1, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFB, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF9, 0xF9, 0xFA, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF8, 0xF9, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF7, 0xF8, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF6, 0xF7, 0xF7, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF4, 0xF5, 0xFF, 0xF5, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF3, 0xF3, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF2, 0xF2, 0xF3, 0xFF, 0xF2, 0xF2, 0xF2, 0xFF, 0xF1, 0xF2, 0xF1, 0xFF, 0xF2, 0xF1, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF1, 0xF1, 0xF1, 0xFF, 0xF1, 0xF1, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF0, 0xF1, 0xF1, 0xFF, 0xF1, 0xF0, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x20, 0x45, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x01, 0x2C, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +char save_to_disk_image[] = { + 0xC8, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x37, 0x39, 0x6C, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x36, 0x37, 0x39, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0x68, 0x79, 0x91, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x34, 0x33, 0x33, 0xFF, 0x40, 0x33, 0x33, 0xFF, 0x66, 0x33, 0x33, 0xFF, 0x8B, 0x36, 0x35, 0xFF, 0xA0, 0x43, 0x35, 0xFF, 0xA5, 0x3B, 0x36, 0xFF, 0xA2, 0x3C, 0x35, 0xFF, 0xA5, 0x42, 0x35, 0xFF, 0xA7, 0x59, 0x37, 0xFF, 0xA8, 0x6A, 0x37, 0xFF, 0xA8, 0x72, 0x37, 0xFF, 0xA9, 0x7D, 0x39, 0xFF, 0xA9, 0x88, 0x3D, 0xFF, 0xA9, 0x8E, 0x41, 0xFF, 0xA9, 0x8F, 0x43, 0xFF, 0xA9, 0x8E, 0x44, 0xFF, 0xA9, 0x90, 0x44, 0xFF, 0xA9, 0x90, 0x41, 0xFF, 0xA9, 0x91, 0x3F, 0xFF, 0xA9, 0x90, 0x3E, 0xFF, 0xA9, 0x90, 0x3C, 0xFF, 0xA9, 0x90, 0x38, 0xFF, 0xA9, 0x8D, 0x37, 0xFF, 0xA8, 0x74, 0x36, 0xFF, 0xA8, 0x66, 0x35, 0xFF, 0xA8, 0x5C, 0x35, 0xFF, 0xA8, 0x52, 0x35, 0xFF, 0xA7, 0x4C, 0x35, 0xFF, 0xA8, 0x49, 0x35, 0xFF, 0xA7, 0x47, 0x35, 0xFF, 0xA8, 0x46, 0x36, 0xFF, 0xA6, 0x40, 0x36, 0xFF, 0xA6, 0x3C, 0x35, 0xFF, 0xA7, 0x3C, 0x35, 0xFF, 0xA6, 0x3E, 0x36, 0xFF, 0xA5, 0x3D, 0x36, 0xFF, 0x60, 0x5F, 0x5F, 0xFF, 0x60, 0x5F, 0x5F, 0xFF, 0x60, 0x5F, 0x5F, 0xFF, 0x60, 0x5F, 0x5F, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x29, 0x01, 0x00, 0xFF, 0x77, 0x00, 0x02, 0xFF, 0xB9, 0x01, 0x03, 0xFF, 0xE4, 0x07, 0x06, 0xFF, 0xFB, 0x1B, 0x07, 0xFF, 0xFE, 0x3F, 0x09, 0xFF, 0xFE, 0x6F, 0x0A, 0xFF, 0xFE, 0xAE, 0x0A, 0xFF, 0xFD, 0xEB, 0x0D, 0xFF, 0xFE, 0xFE, 0x15, 0xFF, 0xFD, 0xFD, 0x27, 0xFF, 0xFD, 0xFD, 0x3C, 0xFF, 0xFD, 0xFD, 0x4A, 0xFF, 0xFC, 0xFC, 0x46, 0xFF, 0xFD, 0xFC, 0x4E, 0xFF, 0xFC, 0xFD, 0x5D, 0xFF, 0xFC, 0xFC, 0x5A, 0xFF, 0xFB, 0xFC, 0x4D, 0xFF, 0xFC, 0xFB, 0x33, 0xFF, 0xFC, 0xFB, 0x31, 0xFF, 0xFB, 0xFB, 0x22, 0xFF, 0xFB, 0xFA, 0x0B, 0xFF, 0xFB, 0xFA, 0x07, 0xFF, 0xFA, 0xDD, 0x08, 0xFF, 0xFA, 0xAF, 0x08, 0xFF, 0xFA, 0x9A, 0x08, 0xFF, 0xF9, 0x72, 0x07, 0xFF, 0xF8, 0x68, 0x07, 0xFF, 0xF9, 0x63, 0x08, 0xFF, 0xF8, 0x5E, 0x07, 0xFF, 0xF8, 0x49, 0x07, 0xFF, 0xF7, 0x36, 0x07, 0xFF, 0xF7, 0x2E, 0x06, 0xFF, 0xF7, 0x35, 0x07, 0xFF, 0xF7, 0x37, 0x06, 0xFF, 0xF7, 0x34, 0x07, 0xFF, 0x2A, 0x2A, 0x2A, 0xFF, 0x2A, 0x2A, 0x2A, 0xFF, 0x27, 0x27, 0x28, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x94, 0x05, 0x04, 0xFF, 0xDF, 0x05, 0x05, 0xFF, 0xFD, 0x08, 0x07, 0xFF, 0xFE, 0x00, 0x06, 0xFF, 0xFE, 0x0E, 0x06, 0xFF, 0xFE, 0x88, 0x09, 0xFF, 0xFE, 0xF0, 0x0E, 0xFF, 0xFE, 0xFE, 0x15, 0xFF, 0xFE, 0xFE, 0x18, 0xFF, 0xFD, 0xFD, 0x13, 0xFF, 0xFD, 0xFD, 0x1C, 0xFF, 0xFD, 0xFD, 0x2A, 0xFF, 0xFD, 0xFC, 0x2B, 0xFF, 0xFD, 0xFD, 0x1B, 0xFF, 0xFC, 0xFD, 0x1C, 0xFF, 0xFC, 0xFC, 0x26, 0xFF, 0xFC, 0xFB, 0x23, 0xFF, 0xFC, 0xFB, 0x1C, 0xFF, 0xFB, 0xFB, 0x0C, 0xFF, 0xFB, 0xFB, 0x0A, 0xFF, 0xFB, 0xFA, 0x07, 0xFF, 0xFA, 0xFB, 0x06, 0xFF, 0xFA, 0xE2, 0x06, 0xFF, 0xF9, 0xAA, 0x06, 0xFF, 0xF9, 0x7E, 0x06, 0xFF, 0xF9, 0x6C, 0x06, 0xFF, 0xF8, 0x73, 0x07, 0xFF, 0xF9, 0x7A, 0x07, 0xFF, 0xF9, 0x7D, 0x07, 0xFF, 0xF8, 0x73, 0x07, 0xFF, 0xF8, 0x58, 0x07, 0xFF, 0xF7, 0x3E, 0x06, 0xFF, 0xF7, 0x30, 0x06, 0xFF, 0xF6, 0x3B, 0x06, 0xFF, 0xF6, 0x40, 0x06, 0xFF, 0xF6, 0x3F, 0x06, 0xFF, 0x2C, 0x2C, 0x2C, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF6, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFB, 0x18, 0x08, 0xFF, 0xFF, 0x06, 0x07, 0xFF, 0xFF, 0x00, 0x06, 0xFF, 0xFE, 0x00, 0x06, 0xFF, 0xFF, 0x08, 0x06, 0xFF, 0xFE, 0xA9, 0x08, 0xFF, 0xFE, 0xFE, 0x20, 0xFF, 0xFE, 0xFE, 0x39, 0xFF, 0xFD, 0xFD, 0x25, 0xFF, 0xFD, 0xFD, 0x08, 0xFF, 0xFD, 0xFD, 0x04, 0xFF, 0xFD, 0xFC, 0x05, 0xFF, 0xFD, 0xFD, 0x06, 0xFF, 0xFD, 0xFD, 0x06, 0xFF, 0xFC, 0xFC, 0x05, 0xFF, 0xFC, 0xFC, 0x04, 0xFF, 0xFB, 0xFC, 0x04, 0xFF, 0xFB, 0xFB, 0x05, 0xFF, 0xFB, 0xFB, 0x05, 0xFF, 0xFA, 0xFB, 0x05, 0xFF, 0xFB, 0xF9, 0x06, 0xFF, 0xFA, 0xD3, 0x06, 0xFF, 0xFA, 0x92, 0x06, 0xFF, 0xF9, 0x5C, 0x06, 0xFF, 0xF9, 0x40, 0x06, 0xFF, 0xF9, 0x40, 0x06, 0xFF, 0xF9, 0x54, 0x07, 0xFF, 0xF8, 0x5C, 0x08, 0xFF, 0xF8, 0x69, 0x09, 0xFF, 0xF8, 0x5B, 0x07, 0xFF, 0xF7, 0x43, 0x07, 0xFF, 0xF7, 0x20, 0x06, 0xFF, 0xF7, 0x19, 0x06, 0xFF, 0xF7, 0x22, 0x06, 0xFF, 0xF6, 0x1C, 0x06, 0xFF, 0xF6, 0x12, 0x06, 0xFF, 0x29, 0x29, 0x29, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFF, 0x02, 0x05, 0xFF, 0xFF, 0x00, 0x05, 0xFF, 0xFE, 0x00, 0x06, 0xFF, 0xFE, 0x00, 0x06, 0xFF, 0xFE, 0x21, 0x06, 0xFF, 0xFE, 0xD0, 0x09, 0xFF, 0xFE, 0xFE, 0x31, 0xFF, 0xFE, 0xFD, 0x47, 0xFF, 0xFE, 0xFD, 0x1E, 0xFF, 0xFD, 0xFD, 0x06, 0xFF, 0xFD, 0xFD, 0x08, 0xFF, 0xFC, 0xFD, 0x08, 0xFF, 0xFD, 0xFD, 0x08, 0xFF, 0xFD, 0xFC, 0x08, 0xFF, 0xFC, 0xFC, 0x09, 0xFF, 0xFB, 0xFC, 0x08, 0xFF, 0xFB, 0xFB, 0x08, 0xFF, 0xFB, 0xFB, 0x07, 0xFF, 0xFB, 0xF9, 0x07, 0xFF, 0xFA, 0xEC, 0x06, 0xFF, 0xFA, 0xD1, 0x07, 0xFF, 0xFA, 0x8F, 0x06, 0xFF, 0xFA, 0x52, 0x06, 0xFF, 0xFA, 0x27, 0x05, 0xFF, 0xF9, 0x1B, 0x05, 0xFF, 0xF9, 0x30, 0x06, 0xFF, 0xF8, 0x43, 0x06, 0xFF, 0xF8, 0x59, 0x08, 0xFF, 0xF8, 0x74, 0x09, 0xFF, 0xF7, 0x55, 0x08, 0xFF, 0xF7, 0x34, 0x06, 0xFF, 0xF6, 0x24, 0x07, 0xFF, 0xF6, 0x0E, 0x06, 0xFF, 0xF6, 0x0B, 0x06, 0xFF, 0xF6, 0x05, 0x06, 0xFF, 0xF5, 0x00, 0x06, 0xFF, 0x28, 0x27, 0x27, 0xFF, 0x28, 0x28, 0x28, 0xFF, 0x26, 0x26, 0x26, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFE, 0x00, 0x06, 0xFF, 0xFF, 0x00, 0x06, 0xFF, 0xFF, 0x01, 0x07, 0xFF, 0xFE, 0x09, 0x07, 0xFF, 0xFE, 0x6D, 0x05, 0xFF, 0xFD, 0xF9, 0x14, 0xFF, 0xFD, 0xFE, 0x42, 0xFF, 0xFD, 0xFD, 0x50, 0xFF, 0xFD, 0xFE, 0x23, 0xFF, 0xFD, 0xFD, 0x05, 0xFF, 0xFC, 0xFD, 0x07, 0xFF, 0xFC, 0xFC, 0x08, 0xFF, 0xFC, 0xFD, 0x09, 0xFF, 0xFC, 0xFB, 0x09, 0xFF, 0xFC, 0xFC, 0x0A, 0xFF, 0xFB, 0xFB, 0x0C, 0xFF, 0xFC, 0xFB, 0x07, 0xFF, 0xFB, 0xFA, 0x06, 0xFF, 0xFA, 0xE8, 0x06, 0xFF, 0xFA, 0xC9, 0x06, 0xFF, 0xF9, 0xAB, 0x06, 0xFF, 0xF9, 0x6F, 0x06, 0xFF, 0xF9, 0x35, 0x06, 0xFF, 0xF9, 0x13, 0x06, 0xFF, 0xF8, 0x1B, 0x06, 0xFF, 0xF9, 0x34, 0x07, 0xFF, 0xF9, 0x3F, 0x06, 0xFF, 0xF8, 0x66, 0x07, 0xFF, 0xF7, 0x8B, 0x08, 0xFF, 0xF7, 0x84, 0x0A, 0xFF, 0xF7, 0x5D, 0x07, 0xFF, 0xF7, 0x45, 0x06, 0xFF, 0xF7, 0x21, 0x06, 0xFF, 0xF5, 0x11, 0x06, 0xFF, 0xF5, 0x05, 0x06, 0xFF, 0xF5, 0x02, 0x06, 0xFF, 0x12, 0x12, 0x12, 0xFF, 0x0E, 0x0E, 0x0E, 0xFF, 0x0A, 0x0A, 0x0A, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFE, 0x08, 0x07, 0xFF, 0xFF, 0x1F, 0x08, 0xFF, 0xFE, 0x3A, 0x07, 0xFF, 0xFE, 0x7C, 0x07, 0xFF, 0xFE, 0xE2, 0x07, 0xFF, 0xFD, 0xFD, 0x39, 0xFF, 0xFD, 0xFD, 0x78, 0xFF, 0xFD, 0xFD, 0x7F, 0xFF, 0xFD, 0xFD, 0x49, 0xFF, 0xFC, 0xFD, 0x12, 0xFF, 0xFD, 0xFD, 0x07, 0xFF, 0xFC, 0xFD, 0x0B, 0xFF, 0xFC, 0xFC, 0x0C, 0xFF, 0xFC, 0xFC, 0x0B, 0xFF, 0xFC, 0xFC, 0x0E, 0xFF, 0xFB, 0xFB, 0x0A, 0xFF, 0xFA, 0xFB, 0x07, 0xFF, 0xFA, 0xED, 0x06, 0xFF, 0xFA, 0xD8, 0x06, 0xFF, 0xFA, 0xC3, 0x06, 0xFF, 0xFA, 0xA8, 0x06, 0xFF, 0xFA, 0x75, 0x06, 0xFF, 0xF9, 0x41, 0x06, 0xFF, 0xF9, 0x28, 0x06, 0xFF, 0xF9, 0x36, 0x06, 0xFF, 0xF8, 0x45, 0x06, 0xFF, 0xF8, 0x58, 0x06, 0xFF, 0xF7, 0x94, 0x08, 0xFF, 0xF7, 0xDD, 0x0B, 0xFF, 0xF7, 0xE0, 0x0A, 0xFF, 0xF7, 0xBF, 0x08, 0xFF, 0xF6, 0xA4, 0x08, 0xFF, 0xF6, 0x7B, 0x08, 0xFF, 0xF6, 0x59, 0x07, 0xFF, 0xF6, 0x31, 0x06, 0xFF, 0xF5, 0x22, 0x06, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFE, 0x66, 0x08, 0xFF, 0xFE, 0xA9, 0x09, 0xFF, 0xFE, 0xD1, 0x08, 0xFF, 0xFE, 0xF9, 0x08, 0xFF, 0xFD, 0xFE, 0x2A, 0xFF, 0xFD, 0xFD, 0x95, 0xFF, 0xFD, 0xFE, 0xD4, 0xFF, 0xFE, 0xFD, 0xD3, 0xFF, 0xFD, 0xFC, 0xA2, 0xFF, 0xFD, 0xFC, 0x59, 0xFF, 0xFC, 0xFC, 0x27, 0xFF, 0xFC, 0xFC, 0x15, 0xFF, 0xFC, 0xFB, 0x0D, 0xFF, 0xFC, 0xFC, 0x0E, 0xFF, 0xFB, 0xFC, 0x11, 0xFF, 0xFB, 0xFB, 0x09, 0xFF, 0xFA, 0xF6, 0x08, 0xFF, 0xFA, 0xD3, 0x07, 0xFF, 0xFA, 0xCF, 0x07, 0xFF, 0xF9, 0xCA, 0x06, 0xFF, 0xF9, 0xC0, 0x07, 0xFF, 0xF9, 0x98, 0x06, 0xFF, 0xF9, 0x6E, 0x06, 0xFF, 0xF8, 0x5F, 0x06, 0xFF, 0xF8, 0x66, 0x06, 0xFF, 0xF8, 0x71, 0x06, 0xFF, 0xF8, 0x96, 0x06, 0xFF, 0xF8, 0xDB, 0x08, 0xFF, 0xF7, 0xF7, 0x09, 0xFF, 0xF6, 0xF7, 0x0E, 0xFF, 0xF6, 0xF7, 0x0F, 0xFF, 0xF6, 0xF6, 0x0A, 0xFF, 0xF5, 0xEE, 0x08, 0xFF, 0xF6, 0xDA, 0x09, 0xFF, 0xF5, 0xA5, 0x07, 0xFF, 0xF5, 0x6D, 0x06, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFE, 0xE6, 0x07, 0xFF, 0xFE, 0xFF, 0x0E, 0xFF, 0xFE, 0xFE, 0x1F, 0xFF, 0xFE, 0xFD, 0x40, 0xFF, 0xFD, 0xFE, 0x9A, 0xFF, 0xFD, 0xFD, 0xF0, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xF7, 0xFF, 0xFC, 0xFC, 0xDA, 0xFF, 0xFC, 0xFC, 0x90, 0xFF, 0xFB, 0xFC, 0x4B, 0xFF, 0xFC, 0xFB, 0x27, 0xFF, 0xFB, 0xFB, 0x15, 0xFF, 0xFB, 0xFB, 0x09, 0xFF, 0xFB, 0xFB, 0x08, 0xFF, 0xFA, 0xEC, 0x07, 0xFF, 0xFA, 0xC0, 0x06, 0xFF, 0xFA, 0xC9, 0x07, 0xFF, 0xFA, 0xDE, 0x07, 0xFF, 0xF9, 0xE4, 0x07, 0xFF, 0xF9, 0xC1, 0x07, 0xFF, 0xF9, 0xA6, 0x06, 0xFF, 0xF8, 0xA5, 0x06, 0xFF, 0xF8, 0xAC, 0x06, 0xFF, 0xF8, 0xC3, 0x07, 0xFF, 0xF7, 0xE6, 0x08, 0xFF, 0xF8, 0xF7, 0x09, 0xFF, 0xF7, 0xF7, 0x06, 0xFF, 0xF6, 0xF7, 0x1A, 0xFF, 0xF6, 0xF7, 0x30, 0xFF, 0xF6, 0xF6, 0x1E, 0xFF, 0xF5, 0xF6, 0x0D, 0xFF, 0xF6, 0xF6, 0x06, 0xFF, 0xF5, 0xF5, 0x06, 0xFF, 0xF4, 0xD9, 0x08, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0xFE, 0xFE, 0x0F, 0xFF, 0xFE, 0xFE, 0x3D, 0xFF, 0xFE, 0xFE, 0x7F, 0xFF, 0xFE, 0xFE, 0xBE, 0xFF, 0xFD, 0xFD, 0xF7, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFC, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xF7, 0xFF, 0xFB, 0xFC, 0xBD, 0xFF, 0xFB, 0xFB, 0x66, 0xFF, 0xFB, 0xFB, 0x2F, 0xFF, 0xFB, 0xFB, 0x10, 0xFF, 0xFA, 0xFB, 0x06, 0xFF, 0xFA, 0xDD, 0x06, 0xFF, 0xFA, 0xAC, 0x06, 0xFF, 0xFA, 0xC7, 0x07, 0xFF, 0xF9, 0xEC, 0x07, 0xFF, 0xF9, 0xF7, 0x08, 0xFF, 0xF8, 0xE6, 0x07, 0xFF, 0xF8, 0xDF, 0x08, 0xFF, 0xF8, 0xE6, 0x08, 0xFF, 0xF8, 0xED, 0x07, 0xFF, 0xF8, 0xF7, 0x07, 0xFF, 0xF7, 0xF7, 0x07, 0xFF, 0xF7, 0xF7, 0x05, 0xFF, 0xF6, 0xF7, 0x0E, 0xFF, 0xF7, 0xF6, 0x41, 0xFF, 0xF6, 0xF6, 0x80, 0xFF, 0xF5, 0xF6, 0x89, 0xFF, 0xF5, 0xF5, 0x62, 0xFF, 0xF5, 0xF5, 0x27, 0xFF, 0xF5, 0xF5, 0x06, 0xFF, 0xF4, 0xF5, 0x05, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xD3, 0xD9, 0xE0, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFE, 0xFF, 0x55, 0xFF, 0xFE, 0xFE, 0xAF, 0xFF, 0xFD, 0xFE, 0xF2, 0xFF, 0xFD, 0xFE, 0xFD, 0xFF, 0xFE, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFC, 0xFF, 0xFC, 0xFC, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xC6, 0xFF, 0xFB, 0xFB, 0x76, 0xFF, 0xFA, 0xFB, 0x41, 0xFF, 0xFB, 0xFA, 0x15, 0xFF, 0xFA, 0xCC, 0x04, 0xFF, 0xF9, 0xA6, 0x06, 0xFF, 0xF9, 0xD6, 0x07, 0xFF, 0xF9, 0xF7, 0x08, 0xFF, 0xF8, 0xF9, 0x08, 0xFF, 0xF8, 0xF8, 0x08, 0xFF, 0xF8, 0xF9, 0x07, 0xFF, 0xF7, 0xF8, 0x08, 0xFF, 0xF7, 0xF8, 0x08, 0xFF, 0xF7, 0xF7, 0x08, 0xFF, 0xF7, 0xF7, 0x09, 0xFF, 0xF6, 0xF7, 0x1D, 0xFF, 0xF6, 0xF7, 0x53, 0xFF, 0xF6, 0xF6, 0xA3, 0xFF, 0xF5, 0xF5, 0xE7, 0xFF, 0xF5, 0xF5, 0xF3, 0xFF, 0xF5, 0xF5, 0xE2, 0xFF, 0xF5, 0xF5, 0x97, 0xFF, 0xF4, 0xF5, 0x3F, 0xFF, 0xF4, 0xF4, 0x10, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFE, 0xFE, 0xC8, 0xFF, 0xFE, 0xFE, 0xFD, 0xFF, 0xFE, 0xFE, 0xFE, 0xFF, 0xFE, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFC, 0xFD, 0xFF, 0xFC, 0xFC, 0xFD, 0xFF, 0xFD, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFC, 0xFB, 0xFC, 0xFF, 0xFC, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xC5, 0xFF, 0xFA, 0xFA, 0x7F, 0xFF, 0xFB, 0xFB, 0x3F, 0xFF, 0xFA, 0xD2, 0x0B, 0xFF, 0xFA, 0xBC, 0x06, 0xFF, 0xF9, 0xEF, 0x0A, 0xFF, 0xF9, 0xF9, 0x0B, 0xFF, 0xF8, 0xF9, 0x0A, 0xFF, 0xF8, 0xF8, 0x09, 0xFF, 0xF8, 0xF8, 0x0A, 0xFF, 0xF8, 0xF7, 0x0E, 0xFF, 0xF7, 0xF8, 0x19, 0xFF, 0xF7, 0xF7, 0x31, 0xFF, 0xF7, 0xF6, 0x57, 0xFF, 0xF6, 0xF7, 0x91, 0xFF, 0xF6, 0xF6, 0xCC, 0xFF, 0xF6, 0xF6, 0xF3, 0xFF, 0xF6, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xEE, 0xFF, 0xF4, 0xF5, 0xA8, 0xFF, 0xF4, 0xF4, 0x4A, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFD, 0xFE, 0xFE, 0xFF, 0xFD, 0xFE, 0xFE, 0xFF, 0xFE, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFC, 0xFC, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFA, 0xFA, 0xFF, 0xFB, 0xFA, 0xE5, 0xFF, 0xFA, 0xFA, 0xA7, 0xFF, 0xF9, 0xFA, 0x5E, 0xFF, 0xF9, 0xF2, 0x18, 0xFF, 0xF9, 0xF0, 0x0A, 0xFF, 0xF9, 0xF9, 0x17, 0xFF, 0xF9, 0xF8, 0x21, 0xFF, 0xF8, 0xF9, 0x23, 0xFF, 0xF8, 0xF8, 0x27, 0xFF, 0xF7, 0xF8, 0x31, 0xFF, 0xF7, 0xF7, 0x45, 0xFF, 0xF8, 0xF7, 0x6E, 0xFF, 0xF7, 0xF6, 0xAB, 0xFF, 0xF7, 0xF7, 0xDF, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF4, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF4, 0xF4, 0xDB, 0xFF, 0xF3, 0xF4, 0x7D, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFE, 0xFE, 0xFE, 0xFF, 0xFD, 0xFD, 0xFE, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFC, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFD, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFB, 0xFF, 0xFB, 0xFC, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xE8, 0xFF, 0xFA, 0xFA, 0xB3, 0xFF, 0xF9, 0xF9, 0x6A, 0xFF, 0xF9, 0xF9, 0x2B, 0xFF, 0xF9, 0xF9, 0x20, 0xFF, 0xF8, 0xF9, 0x3E, 0xFF, 0xF8, 0xF9, 0x52, 0xFF, 0xF8, 0xF8, 0x52, 0xFF, 0xF8, 0xF8, 0x5E, 0xFF, 0xF8, 0xF7, 0x75, 0xFF, 0xF7, 0xF7, 0x9F, 0xFF, 0xF7, 0xF7, 0xE0, 0xFF, 0xF6, 0xF7, 0xF6, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF4, 0xFF, 0xF5, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xDC, 0xFF, 0xF4, 0xF4, 0x8D, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF2, 0xF3, 0xF3, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFE, 0xFD, 0xFD, 0xFF, 0xFD, 0xFE, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFC, 0xFD, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFA, 0xFF, 0xFB, 0xFA, 0xFB, 0xFF, 0xFA, 0xFB, 0xFA, 0xFF, 0xFA, 0xFA, 0xEF, 0xFF, 0xFA, 0xF9, 0xC4, 0xFF, 0xF9, 0xF9, 0x89, 0xFF, 0xF9, 0xF9, 0x5C, 0xFF, 0xF9, 0xF9, 0x63, 0xFF, 0xF8, 0xF9, 0x83, 0xFF, 0xF8, 0xF8, 0x95, 0xFF, 0xF8, 0xF8, 0x9A, 0xFF, 0xF8, 0xF8, 0xA5, 0xFF, 0xF7, 0xF8, 0xC1, 0xFF, 0xF7, 0xF7, 0xE7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF4, 0xF4, 0xCE, 0xFF, 0xF3, 0xF3, 0x98, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFE, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFC, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFD, 0xFC, 0xFD, 0xFF, 0xFD, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFC, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xFA, 0xFA, 0xFF, 0xF9, 0xF9, 0xEF, 0xFF, 0xF9, 0xF9, 0xCD, 0xFF, 0xF9, 0xF9, 0xAA, 0xFF, 0xF8, 0xF8, 0xBB, 0xFF, 0xF8, 0xF8, 0xDE, 0xFF, 0xF8, 0xF8, 0xE5, 0xFF, 0xF8, 0xF8, 0xEB, 0xFF, 0xF7, 0xF8, 0xF2, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF7, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF4, 0xF0, 0xFF, 0xF4, 0xF3, 0xD2, 0xFF, 0xF3, 0xF3, 0xB0, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFD, 0xFF, 0xFD, 0xFC, 0xFD, 0xFF, 0xFD, 0xFC, 0xFC, 0xFF, 0xFD, 0xFC, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFA, 0xFA, 0xFF, 0xFA, 0xFB, 0xFA, 0xFF, 0xFB, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF8, 0xF9, 0xF1, 0xFF, 0xF8, 0xF8, 0xF7, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF7, 0xF8, 0xFF, 0xF8, 0xF7, 0xF7, 0xFF, 0xF8, 0xF7, 0xF8, 0xFF, 0xF7, 0xF6, 0xF7, 0xFF, 0xF7, 0xF6, 0xF7, 0xFF, 0xF6, 0xF7, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF5, 0xFF, 0xF5, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF4, 0xF4, 0xFF, 0xF3, 0xF4, 0xF4, 0xFF, 0xF4, 0xF3, 0xE3, 0xFF, 0xF3, 0xF3, 0xC0, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFD, 0xFD, 0xF8, 0xFF, 0xFC, 0xFD, 0xFD, 0xFF, 0xFD, 0xFD, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFB, 0xFB, 0xFF, 0xFC, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFA, 0xFF, 0xFB, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF9, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF7, 0xFF, 0xF8, 0xF7, 0xF8, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF5, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF5, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF3, 0xF4, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF3, 0xF3, 0xEF, 0xFF, 0xF3, 0xF3, 0xC6, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF2, 0xF3, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0xFD, 0xDF, 0xFF, 0xFC, 0xFC, 0xFD, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFB, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFA, 0xFB, 0xFF, 0xFA, 0xFB, 0xFA, 0xFF, 0xFA, 0xFB, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xF9, 0xFA, 0xFF, 0xFA, 0xF9, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF8, 0xF9, 0xF9, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF7, 0xF8, 0xFF, 0xF7, 0xF7, 0xF8, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF6, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF6, 0xF5, 0xFF, 0xF5, 0xF6, 0xF5, 0xFF, 0xF4, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF3, 0xF3, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF3, 0xF3, 0xED, 0xFF, 0xF3, 0xF3, 0xC4, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF2, 0xF2, 0xF2, 0xFF, 0xF2, 0xF2, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0xFD, 0xB7, 0xFF, 0xFD, 0xFC, 0xEE, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFC, 0xFC, 0xFC, 0xFF, 0xFB, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFA, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xFA, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF7, 0xF8, 0xF8, 0xFF, 0xF7, 0xF8, 0xF8, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF6, 0xFF, 0xF6, 0xF6, 0xF7, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF6, 0xF6, 0xF5, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF4, 0xFF, 0xF4, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF5, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF3, 0xF3, 0xF4, 0xFF, 0xF3, 0xF3, 0xF4, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF2, 0xF3, 0xDF, 0xFF, 0xF2, 0xF2, 0xB2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFD, 0xEB, 0x82, 0xFF, 0xFC, 0xFC, 0xC1, 0xFF, 0xFC, 0xFC, 0xF3, 0xFF, 0xFC, 0xFC, 0xFB, 0xFF, 0xFC, 0xFC, 0xFB, 0xFF, 0xFB, 0xFB, 0xFC, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFA, 0xFB, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xFA, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF8, 0xF9, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF7, 0xF8, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF5, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF5, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF3, 0xF4, 0xFF, 0xF3, 0xF4, 0xF4, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF3, 0xF2, 0xE4, 0xFF, 0xF2, 0xF3, 0xBE, 0xFF, 0xF2, 0xF2, 0x8D, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0xD0, 0x4B, 0xFF, 0xFC, 0xFA, 0x81, 0xFF, 0xFC, 0xFC, 0xB9, 0xFF, 0xFB, 0xFB, 0xEA, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFB, 0xFF, 0xFB, 0xFB, 0xFA, 0xFF, 0xFA, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xF9, 0xFA, 0xFA, 0xFF, 0xFA, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF8, 0xF9, 0xFF, 0xF9, 0xF8, 0xF9, 0xFF, 0xF9, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF7, 0xF7, 0xF8, 0xFF, 0xF8, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF6, 0xFF, 0xF6, 0xF7, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF3, 0xF4, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF3, 0xF4, 0xF3, 0xFF, 0xF3, 0xF2, 0xE3, 0xFF, 0xF3, 0xF3, 0xB7, 0xFF, 0xF2, 0xF2, 0x88, 0xFF, 0xF3, 0xEC, 0x56, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0xB9, 0x1D, 0xFF, 0xFC, 0xEB, 0x48, 0xFF, 0xFC, 0xFB, 0x79, 0xFF, 0xFB, 0xFB, 0xA5, 0xFF, 0xFB, 0xFB, 0xC7, 0xFF, 0xFB, 0xFA, 0xE2, 0xFF, 0xFA, 0xFA, 0xF8, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0xFA, 0xF9, 0xFA, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0xF9, 0xF8, 0xF9, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF7, 0xF8, 0xFF, 0xF8, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF6, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF5, 0xF4, 0xFF, 0xF5, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF3, 0xF4, 0xF4, 0xFF, 0xF4, 0xF3, 0xF3, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF3, 0xF3, 0xEF, 0xFF, 0xF2, 0xF3, 0xC1, 0xFF, 0xF3, 0xF3, 0x85, 0xFF, 0xF2, 0xF2, 0x4C, 0xFF, 0xF2, 0xD6, 0x1D, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF2, 0xF2, 0xF2, 0xFF, 0xF2, 0xF1, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0xB9, 0x06, 0xFF, 0xFC, 0xE2, 0x1D, 0xFF, 0xFC, 0xFA, 0x40, 0xFF, 0xFB, 0xFB, 0x5C, 0xFF, 0xFB, 0xFB, 0x75, 0xFF, 0xFA, 0xFA, 0x88, 0xFF, 0xFA, 0xFA, 0xAA, 0xFF, 0xFA, 0xFA, 0xC8, 0xFF, 0xF9, 0xFA, 0xDB, 0xFF, 0xF9, 0xF9, 0xE3, 0xFF, 0xF9, 0xF9, 0xEF, 0xFF, 0xF8, 0xF9, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF7, 0xF7, 0xFF, 0xF7, 0xF7, 0xF4, 0xFF, 0xF7, 0xF7, 0xE9, 0xFF, 0xF7, 0xF6, 0xE7, 0xFF, 0xF6, 0xF6, 0xE5, 0xFF, 0xF6, 0xF5, 0xE3, 0xFF, 0xF6, 0xF5, 0xE6, 0xFF, 0xF6, 0xF6, 0xE7, 0xFF, 0xF5, 0xF5, 0xE5, 0xFF, 0xF4, 0xF4, 0xE1, 0xFF, 0xF4, 0xF4, 0xD9, 0xFF, 0xF4, 0xF4, 0xD6, 0xFF, 0xF4, 0xF4, 0xDC, 0xFF, 0xF4, 0xF4, 0xE8, 0xFF, 0xF4, 0xF4, 0xE9, 0xFF, 0xF3, 0xF3, 0xE6, 0xFF, 0xF3, 0xF2, 0xD3, 0xFF, 0xF3, 0xF3, 0x95, 0xFF, 0xF2, 0xF3, 0x4E, 0xFF, 0xF2, 0xEF, 0x16, 0xFF, 0xF2, 0xBF, 0x04, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF1, 0xF1, 0xF1, 0xFF, 0xF1, 0xF1, 0xF1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFC, 0x95, 0x05, 0xFF, 0xFB, 0xBC, 0x06, 0xFF, 0xFB, 0xD4, 0x0C, 0xFF, 0xFA, 0xDA, 0x16, 0xFF, 0xFA, 0xDC, 0x22, 0xFF, 0xFA, 0xE8, 0x2B, 0xFF, 0xFA, 0xF3, 0x3C, 0xFF, 0xFA, 0xFA, 0x4D, 0xFF, 0xFA, 0xF9, 0x58, 0xFF, 0xF9, 0xF9, 0x60, 0xFF, 0xF9, 0xF9, 0x78, 0xFF, 0xF8, 0xF9, 0xA0, 0xFF, 0xF9, 0xF8, 0xBE, 0xFF, 0xF8, 0xF8, 0xCB, 0xFF, 0xF8, 0xF7, 0xC5, 0xFF, 0xF8, 0xF7, 0xA7, 0xFF, 0xF7, 0xF6, 0x7B, 0xFF, 0xF7, 0xF7, 0x5E, 0xFF, 0xF6, 0xF7, 0x56, 0xFF, 0xF6, 0xEF, 0x4F, 0xFF, 0xF6, 0xEF, 0x4E, 0xFF, 0xF5, 0xED, 0x52, 0xFF, 0xF5, 0xE6, 0x54, 0xFF, 0xF5, 0xE6, 0x50, 0xFF, 0xF5, 0xEA, 0x4F, 0xFF, 0xF4, 0xF2, 0x4D, 0xFF, 0xF4, 0xF4, 0x54, 0xFF, 0xF4, 0xF4, 0x6E, 0xFF, 0xF4, 0xF4, 0x89, 0xFF, 0xF3, 0xF3, 0x9D, 0xFF, 0xF3, 0xF3, 0xA0, 0xFF, 0xF3, 0xF3, 0x84, 0xFF, 0xF2, 0xF2, 0x4B, 0xFF, 0xF3, 0xF2, 0x19, 0xFF, 0xF2, 0xED, 0x06, 0xFF, 0xF2, 0xB2, 0x06, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFB, 0x32, 0x05, 0xFF, 0xFB, 0x5D, 0x05, 0xFF, 0xFB, 0x76, 0x05, 0xFF, 0xFA, 0x82, 0x03, 0xFF, 0xFB, 0x8B, 0x03, 0xFF, 0xFA, 0x99, 0x03, 0xFF, 0xFA, 0xA8, 0x04, 0xFF, 0xFA, 0xBB, 0x06, 0xFF, 0xF9, 0xBE, 0x06, 0xFF, 0xF9, 0xC4, 0x07, 0xFF, 0xF8, 0xDB, 0x0E, 0xFF, 0xF8, 0xF1, 0x1A, 0xFF, 0xF8, 0xF8, 0x2E, 0xFF, 0xF8, 0xF8, 0x37, 0xFF, 0xF7, 0xF7, 0x32, 0xFF, 0xF7, 0xF6, 0x1D, 0xFF, 0xF6, 0xD7, 0x0B, 0xFF, 0xF7, 0xAB, 0x06, 0xFF, 0xF6, 0x86, 0x03, 0xFF, 0xF6, 0x64, 0x01, 0xFF, 0xF5, 0x65, 0x02, 0xFF, 0xF5, 0x5B, 0x02, 0xFF, 0xF5, 0x4B, 0x01, 0xFF, 0xF5, 0x4B, 0x02, 0xFF, 0xF5, 0x58, 0x01, 0xFF, 0xF4, 0x74, 0x02, 0xFF, 0xF4, 0xA1, 0x05, 0xFF, 0xF3, 0xDE, 0x0E, 0xFF, 0xF3, 0xF3, 0x1F, 0xFF, 0xF3, 0xF3, 0x2F, 0xFF, 0xF2, 0xF2, 0x33, 0xFF, 0xF2, 0xF2, 0x1F, 0xFF, 0xF2, 0xF2, 0x0A, 0xFF, 0xF2, 0xE9, 0x04, 0xFF, 0xF1, 0xC6, 0x07, 0xFF, 0xF2, 0xA0, 0x07, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xFB, 0x00, 0x05, 0xFF, 0xFB, 0x04, 0x05, 0xFF, 0xFB, 0x0E, 0x05, 0xFF, 0xFA, 0x17, 0x06, 0xFF, 0xFA, 0x1C, 0x06, 0xFF, 0xFA, 0x23, 0x05, 0xFF, 0xFA, 0x31, 0x05, 0xFF, 0xF9, 0x35, 0x05, 0xFF, 0xF9, 0x37, 0x04, 0xFF, 0xF8, 0x3B, 0x04, 0xFF, 0xF8, 0x56, 0x04, 0xFF, 0xF8, 0x7B, 0x03, 0xFF, 0xF7, 0x9F, 0x02, 0xFF, 0xF7, 0xB8, 0x04, 0xFF, 0xF7, 0xBB, 0x03, 0xFF, 0xF7, 0x91, 0x03, 0xFF, 0xF6, 0x4D, 0x04, 0xFF, 0xF6, 0x17, 0x05, 0xFF, 0xF6, 0x0D, 0x06, 0xFF, 0xF5, 0x00, 0x05, 0xFF, 0xF5, 0x00, 0x05, 0xFF, 0xEF, 0x00, 0x05, 0xFF, 0xE6, 0x00, 0x04, 0xFF, 0xE2, 0x00, 0x04, 0xFF, 0xF4, 0x00, 0x05, 0xFF, 0xF3, 0x01, 0x05, 0xFF, 0xF3, 0x13, 0x05, 0xFF, 0xF3, 0x50, 0x04, 0xFF, 0xF3, 0xA6, 0x03, 0xFF, 0xF3, 0xCC, 0x04, 0xFF, 0xF3, 0xD0, 0x03, 0xFF, 0xF3, 0xC8, 0x04, 0xFF, 0xF2, 0xA9, 0x05, 0xFF, 0xF1, 0x81, 0x06, 0xFF, 0xF2, 0x59, 0x06, 0xFF, 0xF1, 0x3F, 0x07, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFA, 0xFB, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFA, 0xF9, 0xFA, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF9, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF6, 0xF7, 0xF7, 0xFF, 0xF6, 0xF7, 0xF7, 0xFF, 0xF7, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF2, 0xF3, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF2, 0xF3, 0xF2, 0xFF, 0xF2, 0xF2, 0xF2, 0xFF, 0xF1, 0xF2, 0xF2, 0xFF, 0xF2, 0xF1, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF1, 0xF1, 0xF1, 0xFF, 0xF1, 0xF1, 0xF1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF0, 0xF1, 0xF1, 0xFF, 0xF0, 0xF1, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFB, 0xFA, 0xFB, 0xFF, 0xFA, 0xFA, 0xFA, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF9, 0xF9, 0xFA, 0xFF, 0xF9, 0xF9, 0xF9, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF8, 0xF9, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF8, 0xF8, 0xF8, 0xFF, 0xF7, 0xF8, 0xF7, 0xFF, 0xF7, 0xF7, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF6, 0xF7, 0xF7, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF6, 0xF6, 0xF6, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF5, 0xF5, 0xFF, 0xF5, 0xF4, 0xF5, 0xFF, 0xF5, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF4, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0xF4, 0xF4, 0xF3, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF3, 0xF3, 0xF3, 0xFF, 0xF3, 0xF3, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF2, 0xF2, 0xF3, 0xFF, 0xF2, 0xF2, 0xF2, 0xFF, 0xF1, 0xF2, 0xF1, 0xFF, 0xF2, 0xF1, 0xF2, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF1, 0xF1, 0xF1, 0xFF, 0xF1, 0xF1, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xF0, 0xF1, 0xF1, 0xFF, 0xF1, 0xF0, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x20, 0x46, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x3F, 0x05, 0x1A, 0x03, 0x63, 0x21, 0xB8, 0x11, 0xFF, 0x21, 0xB7, 0x11, 0xFF, 0x21, 0xB6, 0x12, 0xFF, 0x21, 0xB6, 0x12, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x22, 0xB6, 0x13, 0xFF, 0x21, 0xB6, 0x12, 0xFF, 0x21, 0xB6, 0x12, 0xFF, 0x21, 0xB6, 0x11, 0xFF, 0x21, 0xB6, 0x11, 0xFF, 0x05, 0x19, 0x04, 0x64, 0x00, 0x00, 0x01, 0x41, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x26, 0x06, 0x1C, 0x03, 0x4F, 0x24, 0xCE, 0x12, 0xFF, 0x24, 0xCE, 0x12, 0xFF, 0x24, 0xCE, 0x12, 0xFF, 0x25, 0xCE, 0x13, 0xFF, 0x25, 0xCE, 0x13, 0xFF, 0x26, 0xCE, 0x14, 0xFF, 0x26, 0xCE, 0x14, 0xFF, 0x26, 0xCE, 0x14, 0xFF, 0x26, 0xCE, 0x14, 0xFF, 0x26, 0xCE, 0x14, 0xFF, 0x26, 0xCE, 0x14, 0xFF, 0x26, 0xCE, 0x14, 0xFF, 0x26, 0xCE, 0x14, 0xFF, 0x26, 0xCE, 0x14, 0xFF, 0x26, 0xCE, 0x14, 0xFF, 0x25, 0xCE, 0x13, 0xFF, 0x25, 0xCE, 0x13, 0xFF, 0x24, 0xCE, 0x12, 0xFF, 0x24, 0xCE, 0x12, 0xFF, 0x24, 0xCE, 0x12, 0xFF, 0x06, 0x1C, 0x03, 0x4F, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x06, 0x1D, 0x03, 0x45, 0x26, 0xD8, 0x12, 0xFF, 0x26, 0xD8, 0x12, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x27, 0xD8, 0x14, 0xFF, 0x27, 0xD8, 0x14, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x13, 0xFF, 0x26, 0xD8, 0x12, 0xFF, 0x26, 0xD8, 0x12, 0xFF, 0x06, 0x1D, 0x03, 0x45, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x05, 0x1D, 0x03, 0x45, 0x24, 0xD6, 0x10, 0xFF, 0x25, 0xD6, 0x11, 0xFF, 0x25, 0xD6, 0x11, 0xFF, 0x26, 0xD6, 0x12, 0xFF, 0x26, 0xD6, 0x12, 0xFF, 0x26, 0xD6, 0x12, 0xFF, 0x26, 0xD6, 0x12, 0xFF, 0x26, 0xD6, 0x13, 0xFF, 0x26, 0xD6, 0x13, 0xFF, 0x26, 0xD6, 0x13, 0xFF, 0x26, 0xD6, 0x13, 0xFF, 0x26, 0xD6, 0x13, 0xFF, 0x26, 0xD6, 0x13, 0xFF, 0x26, 0xD6, 0x12, 0xFF, 0x26, 0xD6, 0x12, 0xFF, 0x26, 0xD6, 0x12, 0xFF, 0x26, 0xD6, 0x12, 0xFF, 0x25, 0xD6, 0x11, 0xFF, 0x25, 0xD6, 0x11, 0xFF, 0x24, 0xD6, 0x10, 0xFF, 0x05, 0x1D, 0x03, 0x45, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x05, 0x1D, 0x03, 0x45, 0x24, 0xD4, 0x10, 0xFF, 0x24, 0xD4, 0x10, 0xFF, 0x24, 0xD4, 0x10, 0xFF, 0x24, 0xD4, 0x10, 0xFF, 0x24, 0xD4, 0x10, 0xFF, 0x25, 0xD4, 0x11, 0xFF, 0x25, 0xD4, 0x11, 0xFF, 0x25, 0xD4, 0x11, 0xFF, 0x25, 0xD4, 0x11, 0xFF, 0x25, 0xD4, 0x11, 0xFF, 0x25, 0xD4, 0x11, 0xFF, 0x25, 0xD4, 0x11, 0xFF, 0x25, 0xD4, 0x11, 0xFF, 0x25, 0xD4, 0x11, 0xFF, 0x25, 0xD4, 0x11, 0xFF, 0x24, 0xD4, 0x10, 0xFF, 0x24, 0xD4, 0x10, 0xFF, 0x24, 0xD4, 0x10, 0xFF, 0x24, 0xD4, 0x10, 0xFF, 0x24, 0xD4, 0x10, 0xFF, 0x05, 0x1D, 0x03, 0x45, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x05, 0x1C, 0x02, 0x45, 0x22, 0xD2, 0x0E, 0xFF, 0x22, 0xD2, 0x0E, 0xFF, 0x23, 0xD2, 0x0F, 0xFF, 0x23, 0xD2, 0x0F, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x24, 0xD2, 0x10, 0xFF, 0x23, 0xD2, 0x0F, 0xFF, 0x23, 0xD2, 0x0F, 0xFF, 0x22, 0xD2, 0x0E, 0xFF, 0x22, 0xD2, 0x0E, 0xFF, 0x05, 0x1C, 0x02, 0x45, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x1A, 0x05, 0x1C, 0x02, 0x45, 0x21, 0xD0, 0x0D, 0xFF, 0x21, 0xD0, 0x0D, 0xFF, 0x21, 0xD0, 0x0D, 0xFF, 0x22, 0xD0, 0x0E, 0xFF, 0x22, 0xD0, 0x0E, 0xFF, 0x22, 0xD0, 0x0E, 0xFF, 0x22, 0xD0, 0x0E, 0xFF, 0x23, 0xD0, 0x0F, 0xFF, 0x23, 0xD0, 0x0F, 0xFF, 0x23, 0xD0, 0x0F, 0xFF, 0x23, 0xD0, 0x0F, 0xFF, 0x23, 0xD0, 0x0F, 0xFF, 0x23, 0xD0, 0x0F, 0xFF, 0x22, 0xD0, 0x0E, 0xFF, 0x22, 0xD0, 0x0E, 0xFF, 0x22, 0xD0, 0x0E, 0xFF, 0x22, 0xD0, 0x0E, 0xFF, 0x21, 0xD0, 0x0D, 0xFF, 0x21, 0xD0, 0x0D, 0xFF, 0x21, 0xD0, 0x0D, 0xFF, 0x05, 0x1C, 0x02, 0x45, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x1A, 0x05, 0x1C, 0x02, 0x46, 0x20, 0xCD, 0x0C, 0xFF, 0x20, 0xCD, 0x0C, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x21, 0xCE, 0x0D, 0xFF, 0x20, 0xCD, 0x0C, 0xFF, 0x20, 0xCD, 0x0C, 0xFF, 0x05, 0x1C, 0x02, 0x46, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1A, 0x04, 0x1C, 0x02, 0x46, 0x1E, 0xCB, 0x0A, 0xFF, 0x1F, 0xCB, 0x0B, 0xFF, 0x1F, 0xCB, 0x0B, 0xFF, 0x1F, 0xCB, 0x0B, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x20, 0xCC, 0x0C, 0xFF, 0x1F, 0xCB, 0x0B, 0xFF, 0x1F, 0xCB, 0x0B, 0xFF, 0x1F, 0xCB, 0x0B, 0xFF, 0x1E, 0xCB, 0x0A, 0xFF, 0x04, 0x1C, 0x02, 0x46, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1B, 0x04, 0x1B, 0x02, 0x47, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1F, 0xC9, 0x0B, 0xFF, 0x1F, 0xC9, 0x0B, 0xFF, 0x1F, 0xC9, 0x0B, 0xFF, 0x1F, 0xC9, 0x0B, 0xFF, 0x1F, 0xC9, 0x0B, 0xFF, 0x1F, 0xC9, 0x0B, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x1E, 0xC9, 0x0A, 0xFF, 0x04, 0x1B, 0x02, 0x47, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1C, 0x04, 0x1B, 0x01, 0x47, 0x1C, 0xC7, 0x08, 0xFF, 0x1D, 0xC7, 0x09, 0xFF, 0x1D, 0xC7, 0x09, 0xFF, 0x1D, 0xC7, 0x09, 0xFF, 0x1D, 0xC7, 0x09, 0xFF, 0x1E, 0xC7, 0x0A, 0xFF, 0x1E, 0xC7, 0x0A, 0xFF, 0x1E, 0xC7, 0x0A, 0xFF, 0x1E, 0xC7, 0x0A, 0xFF, 0x1E, 0xC7, 0x0A, 0xFF, 0x1E, 0xC7, 0x0A, 0xFF, 0x1E, 0xC7, 0x0A, 0xFF, 0x1E, 0xC7, 0x0A, 0xFF, 0x1E, 0xC7, 0x0A, 0xFF, 0x1E, 0xC7, 0x0A, 0xFF, 0x1D, 0xC7, 0x09, 0xFF, 0x1D, 0xC7, 0x09, 0xFF, 0x1D, 0xC7, 0x09, 0xFF, 0x1D, 0xC7, 0x09, 0xFF, 0x1C, 0xC7, 0x08, 0xFF, 0x04, 0x1B, 0x01, 0x47, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1C, 0x04, 0x1B, 0x01, 0x47, 0x1A, 0xC4, 0x07, 0xFF, 0x1A, 0xC4, 0x07, 0xFF, 0x1A, 0xC4, 0x07, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1B, 0xC4, 0x08, 0xFF, 0x1A, 0xC4, 0x07, 0xFF, 0x1A, 0xC4, 0x07, 0xFF, 0x1A, 0xC4, 0x07, 0xFF, 0x04, 0x1B, 0x01, 0x47, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x1D, 0x04, 0x1A, 0x01, 0x48, 0x1A, 0xC1, 0x06, 0xFF, 0x1A, 0xC1, 0x06, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC2, 0x07, 0xFF, 0x1A, 0xC1, 0x06, 0xFF, 0x1A, 0xC1, 0x06, 0xFF, 0x04, 0x1A, 0x01, 0x48, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x1E, 0x03, 0x1A, 0x01, 0x49, 0x19, 0xBF, 0x05, 0xFF, 0x19, 0xBF, 0x05, 0xFF, 0x19, 0xBF, 0x05, 0xFF, 0x19, 0xBF, 0x05, 0xFF, 0x19, 0xBF, 0x05, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x1A, 0xC0, 0x06, 0xFF, 0x19, 0xBF, 0x05, 0xFF, 0x19, 0xBF, 0x05, 0xFF, 0x19, 0xBF, 0x05, 0xFF, 0x19, 0xBF, 0x05, 0xFF, 0x19, 0xBF, 0x05, 0xFF, 0x03, 0x1A, 0x01, 0x49, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x1F, 0x03, 0x1A, 0x01, 0x4A, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x18, 0xBD, 0x04, 0xFF, 0x03, 0x1A, 0x01, 0x4A, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x20, 0x03, 0x19, 0x00, 0x4B, 0x16, 0xBA, 0x02, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x17, 0xBA, 0x03, 0xFF, 0x16, 0xBA, 0x02, 0xFF, 0x03, 0x19, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x21, 0x03, 0x18, 0x00, 0x4B, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x16, 0xB8, 0x02, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x15, 0xB7, 0x01, 0xFF, 0x03, 0x18, 0x00, 0x4B, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x22, 0x03, 0x18, 0x00, 0x4C, 0x14, 0xB5, 0x00, 0xFF, 0x14, 0xB5, 0x00, 0xFF, 0x14, 0xB5, 0x00, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x15, 0xB5, 0x01, 0xFF, 0x14, 0xB5, 0x00, 0xFF, 0x14, 0xB5, 0x00, 0xFF, 0x14, 0xB5, 0x00, 0xFF, 0x03, 0x18, 0x00, 0x4C, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x24, 0x03, 0x1B, 0x00, 0x4D, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x14, 0xB1, 0x00, 0xFF, 0x03, 0x1B, 0x00, 0x4D, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x00, 0x0C, 0x06, 0x37, 0x00, 0x67, 0x08, 0x46, 0x00, 0x6E, 0x08, 0x46, 0x00, 0x70, 0x08, 0x46, 0x00, 0x71, 0x08, 0x46, 0x00, 0x73, 0x08, 0x46, 0x00, 0x75, 0x08, 0x46, 0x00, 0x77, 0x08, 0x46, 0x00, 0x79, 0x08, 0x46, 0x00, 0x7A, 0x08, 0x46, 0x00, 0x7C, 0x0A, 0x59, 0x00, 0x95, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x14, 0xAF, 0x00, 0xFF, 0x0A, 0x59, 0x00, 0x95, 0x08, 0x46, 0x00, 0x7C, 0x08, 0x46, 0x00, 0x7A, 0x08, 0x46, 0x00, 0x79, 0x08, 0x46, 0x00, 0x77, 0x08, 0x46, 0x00, 0x75, 0x08, 0x46, 0x00, 0x73, 0x08, 0x46, 0x00, 0x71, 0x08, 0x46, 0x00, 0x70, 0x08, 0x46, 0x00, 0x6E, 0x06, 0x37, 0x00, 0x67, 0x00, 0x01, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x06, 0x37, 0x00, 0x79, 0x12, 0x9C, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x14, 0xAB, 0x00, 0xFF, 0x12, 0x9C, 0x00, 0xFF, 0x06, 0x37, 0x00, 0x79, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x0B, 0x55, 0x00, 0xB6, 0x13, 0xA1, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x13, 0xA6, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA7, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x14, 0xA8, 0x00, 0xFF, 0x13, 0xA1, 0x00, 0xFF, 0x0B, 0x55, 0x00, 0xB6, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x01, 0x07, 0x00, 0x1D, 0x0D, 0x6E, 0x00, 0xE0, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA4, 0x00, 0xFF, 0x12, 0xA3, 0x00, 0xFF, 0x0D, 0x6E, 0x00, 0xE0, 0x01, 0x07, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x03, 0x17, 0x00, 0x41, 0x0F, 0x83, 0x00, 0xF9, 0x12, 0xA1, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA0, 0x00, 0xFF, 0x12, 0xA1, 0x00, 0xFF, 0x0F, 0x83, 0x00, 0xF9, 0x03, 0x17, 0x00, 0x41, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x05, 0x30, 0x00, 0x78, 0x10, 0x8F, 0x00, 0xFF, 0x12, 0x9E, 0x00, 0xFF, 0x12, 0x9E, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9D, 0x00, 0xFF, 0x12, 0x9E, 0x00, 0xFF, 0x12, 0x9E, 0x00, 0xFF, 0x10, 0x8F, 0x00, 0xFF, 0x05, 0x30, 0x00, 0x78, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x08, 0x4A, 0x00, 0xB0, 0x11, 0x94, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x99, 0x00, 0xFF, 0x12, 0x99, 0x00, 0xFF, 0x12, 0x99, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x98, 0x00, 0xFF, 0x12, 0x99, 0x00, 0xFF, 0x12, 0x99, 0x00, 0xFF, 0x12, 0x99, 0x00, 0xFF, 0x12, 0x99, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x12, 0x9A, 0x00, 0xFF, 0x11, 0x94, 0x00, 0xFF, 0x08, 0x4B, 0x00, 0xB3, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x01, 0x06, 0x00, 0x25, 0x0C, 0x63, 0x00, 0xDF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x95, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x12, 0x97, 0x00, 0xFF, 0x12, 0x96, 0x00, 0xFF, 0x0C, 0x63, 0x00, 0xDF, 0x01, 0x06, 0x00, 0x25, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x16, 0x02, 0x14, 0x00, 0x44, 0x0F, 0x79, 0x00, 0xFA, 0x12, 0x94, 0x00, 0xFF, 0x12, 0x93, 0x00, 0xFF, 0x12, 0x93, 0x00, 0xFF, 0x12, 0x93, 0x00, 0xFF, 0x12, 0x93, 0x00, 0xFF, 0x12, 0x93, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x92, 0x00, 0xFF, 0x12, 0x93, 0x00, 0xFF, 0x12, 0x93, 0x00, 0xFF, 0x12, 0x93, 0x00, 0xFF, 0x12, 0x93, 0x00, 0xFF, 0x12, 0x93, 0x00, 0xFF, 0x12, 0x94, 0x00, 0xFF, 0x0F, 0x79, 0x00, 0xFA, 0x02, 0x14, 0x00, 0x44, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x05, 0x29, 0x00, 0x76, 0x10, 0x82, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x11, 0x8F, 0x00, 0xFF, 0x11, 0x8F, 0x00, 0xFF, 0x11, 0x8F, 0x00, 0xFF, 0x11, 0x8F, 0x00, 0xFF, 0x11, 0x8F, 0x00, 0xFF, 0x11, 0x8F, 0x00, 0xFF, 0x11, 0x8F, 0x00, 0xFF, 0x11, 0x8F, 0x00, 0xFF, 0x11, 0x8F, 0x00, 0xFF, 0x11, 0x8F, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x12, 0x90, 0x00, 0xFF, 0x10, 0x83, 0x00, 0xFF, 0x05, 0x29, 0x00, 0x76, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x1A, 0x08, 0x43, 0x00, 0xAF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x8D, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x08, 0x44, 0x00, 0xB2, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x18, 0x01, 0x05, 0x00, 0x26, 0x0B, 0x5A, 0x00, 0xDD, 0x11, 0x89, 0x00, 0xFF, 0x11, 0x8B, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8A, 0x00, 0xFF, 0x11, 0x8B, 0x00, 0xFF, 0x11, 0x89, 0x00, 0xFF, 0x0B, 0x5A, 0x00, 0xDD, 0x01, 0x05, 0x00, 0x26, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x17, 0x10, 0x10, 0x10, 0x2D, 0x33, 0x42, 0x31, 0x7C, 0x13, 0x72, 0x04, 0xFC, 0x11, 0x88, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x87, 0x00, 0xFF, 0x11, 0x88, 0x00, 0xFF, 0x13, 0x72, 0x04, 0xFC, 0x36, 0x45, 0x34, 0x7F, 0x12, 0x12, 0x12, 0x2F, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x10, 0x1C, 0x1C, 0x1C, 0x33, 0x5C, 0x5C, 0x5C, 0x7C, 0xA3, 0xA3, 0xA3, 0xCE, 0xC6, 0xC6, 0xC6, 0xF7, 0x80, 0xA0, 0x7C, 0xFF, 0x0F, 0x77, 0x00, 0xFF, 0x11, 0x85, 0x00, 0xFF, 0x11, 0x85, 0x00, 0xFF, 0x11, 0x85, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x84, 0x00, 0xFF, 0x11, 0x85, 0x00, 0xFF, 0x11, 0x85, 0x00, 0xFF, 0x11, 0x85, 0x00, 0xFF, 0x0F, 0x77, 0x00, 0xFF, 0x80, 0xA0, 0x7C, 0xFF, 0xC7, 0xC7, 0xC7, 0xF9, 0xA6, 0xA6, 0xA6, 0xD2, 0x61, 0x61, 0x61, 0x81, 0x1F, 0x1F, 0x1F, 0x36, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x13, 0x13, 0x13, 0x23, 0x62, 0x62, 0x62, 0x7C, 0xB4, 0xB4, 0xB4, 0xDA, 0xD3, 0xD3, 0xD3, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0x51, 0x85, 0x49, 0xFF, 0x0F, 0x7C, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x81, 0x00, 0xFF, 0x10, 0x81, 0x00, 0xFF, 0x10, 0x81, 0x00, 0xFF, 0x10, 0x81, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x10, 0x82, 0x00, 0xFF, 0x0F, 0x7C, 0x00, 0xFF, 0x51, 0x85, 0x49, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xB8, 0xB8, 0xB8, 0xDE, 0x67, 0x67, 0x67, 0x82, 0x16, 0x16, 0x16, 0x27, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x03, 0x03, 0x03, 0x0B, 0x4E, 0x4E, 0x4E, 0x61, 0xAB, 0xAB, 0xAB, 0xCB, 0xD7, 0xD7, 0xD7, 0xFE, 0xD6, 0xD6, 0xD6, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xC3, 0xC6, 0xC3, 0xFF, 0x2B, 0x72, 0x21, 0xFF, 0x10, 0x7E, 0x00, 0xFF, 0x10, 0x80, 0x00, 0xFF, 0x10, 0x80, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x7F, 0x00, 0xFF, 0x10, 0x80, 0x00, 0xFF, 0x10, 0x80, 0x00, 0xFF, 0x10, 0x7E, 0x00, 0xFF, 0x2B, 0x72, 0x21, 0xFF, 0xC1, 0xC5, 0xC0, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xB1, 0xB1, 0xB1, 0xD1, 0x54, 0x54, 0x54, 0x67, 0x05, 0x05, 0x05, 0x0E, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x1B, 0x1B, 0x1B, 0x23, 0x89, 0x89, 0x89, 0x9F, 0xD5, 0xD5, 0xD5, 0xF6, 0xDB, 0xDB, 0xDB, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xAA, 0xB7, 0xA8, 0xFF, 0x14, 0x69, 0x07, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x10, 0x7D, 0x00, 0xFF, 0x14, 0x69, 0x07, 0xFF, 0xAA, 0xB7, 0xA8, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xD8, 0xD8, 0xD8, 0xF9, 0x8F, 0x8F, 0x8F, 0xA7, 0x1F, 0x1F, 0x1F, 0x28, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x43, 0x43, 0x43, 0x50, 0xB4, 0xB4, 0xB4, 0xD0, 0xDE, 0xDE, 0xDE, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0x83, 0x9F, 0x7F, 0xFF, 0x0E, 0x6D, 0x00, 0xFF, 0x10, 0x7B, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7A, 0x00, 0xFF, 0x10, 0x7B, 0x00, 0xFF, 0x0E, 0x6D, 0x00, 0xFF, 0x83, 0x9F, 0x7F, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xB9, 0xB9, 0xB9, 0xD6, 0x4A, 0x4A, 0x4A, 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x03, 0x66, 0x66, 0x66, 0x76, 0xCF, 0xCF, 0xCF, 0xED, 0xDE, 0xDE, 0xDE, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0x54, 0x82, 0x4D, 0xFF, 0x0F, 0x72, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x10, 0x78, 0x00, 0xFF, 0x0F, 0x73, 0x00, 0xFF, 0x54, 0x82, 0x4D, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xD4, 0xD4, 0xD4, 0xF2, 0x6D, 0x6D, 0x6D, 0x7E, 0x04, 0x04, 0x04, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x0B, 0x77, 0x77, 0x77, 0x88, 0xD9, 0xD9, 0xD9, 0xF8, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xC1, 0xC4, 0xC1, 0xFF, 0x2D, 0x6C, 0x23, 0xFF, 0x10, 0x75, 0x00, 0xFF, 0x10, 0x77, 0x00, 0xFF, 0x10, 0x77, 0x00, 0xFF, 0x10, 0x77, 0x00, 0xFF, 0x10, 0x77, 0x00, 0xFF, 0x10, 0x77, 0x00, 0xFF, 0x10, 0x77, 0x00, 0xFF, 0x10, 0x77, 0x00, 0xFF, 0x10, 0x77, 0x00, 0xFF, 0x10, 0x77, 0x00, 0xFF, 0x10, 0x77, 0x00, 0xFF, 0x10, 0x75, 0x00, 0xFF, 0x2B, 0x6B, 0x21, 0xFF, 0xC1, 0xC4, 0xC1, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDC, 0xDC, 0xDC, 0xFB, 0x80, 0x80, 0x80, 0x92, 0x0B, 0x0B, 0x0B, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x0C, 0x89, 0x89, 0x89, 0x9C, 0xE0, 0xE0, 0xE0, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xAB, 0xB6, 0xA9, 0xFF, 0x16, 0x64, 0x09, 0xFF, 0x10, 0x74, 0x00, 0xFF, 0x10, 0x74, 0x00, 0xFF, 0x10, 0x74, 0x00, 0xFF, 0x0F, 0x74, 0x00, 0xFF, 0x0F, 0x74, 0x00, 0xFF, 0x0F, 0x74, 0x00, 0xFF, 0x0F, 0x74, 0x00, 0xFF, 0x10, 0x74, 0x00, 0xFF, 0x10, 0x74, 0x00, 0xFF, 0x10, 0x74, 0x00, 0xFF, 0x16, 0x64, 0x09, 0xFF, 0xAB, 0xB6, 0xA9, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0x91, 0x91, 0x91, 0xA5, 0x0D, 0x0D, 0x0D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x0A, 0x84, 0x84, 0x84, 0x98, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0x85, 0x9E, 0x81, 0xFF, 0x0E, 0x65, 0x00, 0xFF, 0x0F, 0x73, 0x00, 0xFF, 0x0F, 0x73, 0x00, 0xFF, 0x0F, 0x73, 0x00, 0xFF, 0x0F, 0x73, 0x00, 0xFF, 0x0F, 0x73, 0x00, 0xFF, 0x0F, 0x73, 0x00, 0xFF, 0x0F, 0x73, 0x00, 0xFF, 0x0F, 0x73, 0x00, 0xFF, 0x0E, 0x65, 0x00, 0xFF, 0x85, 0x9E, 0x81, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0xDF, 0xDF, 0xDF, 0xFF, 0x8E, 0x8E, 0x8E, 0xA2, 0x0A, 0x0A, 0x0A, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x75, 0x75, 0x75, 0x88, 0xDC, 0xDC, 0xDC, 0xFD, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0x56, 0x81, 0x50, 0xFF, 0x0F, 0x6B, 0x00, 0xFF, 0x0F, 0x71, 0x00, 0xFF, 0x0F, 0x71, 0x00, 0xFF, 0x0F, 0x71, 0x00, 0xFF, 0x0F, 0x71, 0x00, 0xFF, 0x0F, 0x71, 0x00, 0xFF, 0x0F, 0x71, 0x00, 0xFF, 0x0F, 0x6B, 0x00, 0xFF, 0x56, 0x81, 0x50, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0xDE, 0xDE, 0xDE, 0xFF, 0x7F, 0x7F, 0x7F, 0x92, 0x03, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x5A, 0x5A, 0x6A, 0xD8, 0xD8, 0xD8, 0xF9, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xC5, 0xC6, 0xC4, 0xFF, 0x2F, 0x6A, 0x26, 0xFF, 0x0F, 0x6F, 0x00, 0xFF, 0x0F, 0x70, 0x00, 0xFF, 0x0F, 0x70, 0x00, 0xFF, 0x0F, 0x70, 0x00, 0xFF, 0x0F, 0x70, 0x00, 0xFF, 0x0F, 0x6F, 0x00, 0xFF, 0x2F, 0x6B, 0x26, 0xFF, 0xC5, 0xC6, 0xC4, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDD, 0xDD, 0xDD, 0xFF, 0xDA, 0xDA, 0xDA, 0xFC, 0x64, 0x64, 0x64, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x43, 0xCA, 0xCA, 0xCA, 0xEA, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xAF, 0xB9, 0xAD, 0xFF, 0x18, 0x60, 0x0C, 0xFF, 0x0F, 0x6F, 0x00, 0xFF, 0x0F, 0x6F, 0x00, 0xFF, 0x0F, 0x6F, 0x00, 0xFF, 0x0F, 0x6F, 0x00, 0xFF, 0x18, 0x60, 0x0C, 0xFF, 0xAD, 0xB7, 0xAB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xDC, 0xDC, 0xDC, 0xFF, 0xCF, 0xCF, 0xCF, 0xF0, 0x40, 0x40, 0x40, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x14, 0x14, 0x1B, 0xAD, 0xAD, 0xAD, 0xCA, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0x89, 0xA0, 0x86, 0xFF, 0x0E, 0x60, 0x00, 0xFF, 0x0F, 0x6E, 0x00, 0xFF, 0x0F, 0x6E, 0x00, 0xFF, 0x0E, 0x60, 0x00, 0xFF, 0x89, 0xA0, 0x86, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xDB, 0xDB, 0xDB, 0xFF, 0xB6, 0xB6, 0xB6, 0xD4, 0x19, 0x19, 0x19, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x76, 0x76, 0x8D, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0x5C, 0x84, 0x56, 0xFF, 0x0F, 0x67, 0x00, 0xFF, 0x0F, 0x67, 0x00, 0xFF, 0x5C, 0x84, 0x56, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCC, 0xCC, 0xCC, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0xDA, 0xDA, 0xDA, 0xFF, 0x81, 0x81, 0x81, 0x99, 0x01, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x37, 0x37, 0x46, 0xCB, 0xCB, 0xCB, 0xEF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xC7, 0xC9, 0xC7, 0xFF, 0x32, 0x6A, 0x29, 0xFF, 0x32, 0x6A, 0x29, 0xFF, 0xC7, 0xC9, 0xC7, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD9, 0xD9, 0xD9, 0xFF, 0xD0, 0xD0, 0xD0, 0xF4, 0x41, 0x41, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x0A, 0x9D, 0x9D, 0x9D, 0xBA, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xB4, 0xBC, 0xB2, 0xFF, 0xB4, 0xBC, 0xB2, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xD8, 0xD8, 0xD8, 0xFF, 0xA7, 0xA7, 0xA7, 0xC5, 0x0A, 0x0A, 0x0A, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x45, 0x45, 0x59, 0xD4, 0xD4, 0xD4, 0xFB, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD7, 0xD7, 0xD7, 0xFF, 0xD6, 0xD6, 0xD6, 0xFE, 0x50, 0x50, 0x50, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x0D, 0x9F, 0x9F, 0x9F, 0xBE, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xD6, 0xD6, 0xD6, 0xFF, 0xA9, 0xA9, 0xA9, 0xC9, 0x0C, 0x0C, 0x0C, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x41, 0x41, 0x56, 0xD1, 0xD1, 0xD1, 0xFA, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD5, 0xD5, 0xD5, 0xFF, 0xD4, 0xD4, 0xD4, 0xFE, 0x4B, 0x4B, 0x4B, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x07, 0x8C, 0x8C, 0x8C, 0xAD, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xBD, 0xBD, 0xBD, 0xFC, 0xAB, 0xAB, 0xAB, 0xEA, 0x9F, 0x9F, 0x9F, 0xDB, 0x97, 0x97, 0x97, 0xD0, 0x93, 0x93, 0x93, 0xCA, 0x93, 0x93, 0x93, 0xCA, 0x97, 0x97, 0x97, 0xD0, 0x9E, 0x9E, 0x9E, 0xDA, 0xAA, 0xAA, 0xAA, 0xE9, 0xBC, 0xBC, 0xBC, 0xFB, 0xC7, 0xC7, 0xC7, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0xD4, 0xD4, 0xD4, 0xFF, 0x98, 0x98, 0x98, 0xB9, 0x07, 0x07, 0x07, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x25, 0x35, 0xC3, 0xC3, 0xC3, 0xEC, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xB7, 0xB7, 0xB7, 0xF7, 0x9B, 0x9B, 0x9B, 0xD5, 0x84, 0x84, 0x84, 0xB5, 0x7A, 0x7A, 0x7A, 0xA5, 0x77, 0x77, 0x77, 0xA2, 0x76, 0x76, 0x76, 0xA3, 0x74, 0x74, 0x74, 0xA4, 0x74, 0x74, 0x74, 0xA4, 0x76, 0x76, 0x76, 0xA3, 0x77, 0x77, 0x77, 0xA2, 0x79, 0x79, 0x79, 0xA4, 0x83, 0x83, 0x83, 0xB4, 0x9B, 0x9B, 0x9B, 0xD5, 0xB6, 0xB6, 0xB6, 0xF5, 0xC9, 0xC9, 0xC9, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD2, 0xD2, 0xD2, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xD3, 0xD3, 0xD3, 0xFF, 0xC9, 0xC9, 0xC9, 0xF3, 0x2D, 0x2D, 0x2D, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x58, 0x58, 0x74, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xA2, 0xA2, 0xA2, 0xDE, 0x80, 0x80, 0x80, 0xAF, 0x77, 0x77, 0x77, 0xA1, 0x77, 0x77, 0x77, 0xA7, 0x73, 0x73, 0x73, 0xB0, 0x6D, 0x6D, 0x6D, 0xAC, 0x68, 0x68, 0x68, 0xA0, 0x63, 0x63, 0x63, 0x96, 0x63, 0x63, 0x63, 0x96, 0x67, 0x67, 0x67, 0x9F, 0x6D, 0x6D, 0x6D, 0xAC, 0x73, 0x73, 0x73, 0xB0, 0x77, 0x77, 0x77, 0xA7, 0x77, 0x77, 0x77, 0xA1, 0x7E, 0x7E, 0x7E, 0xAD, 0xA0, 0xA0, 0xA0, 0xDC, 0xC3, 0xC3, 0xC3, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0xD1, 0xD1, 0xD1, 0xFF, 0x63, 0x63, 0x63, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x09, 0x93, 0x93, 0x93, 0xBA, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFD, 0x92, 0x92, 0x92, 0xCA, 0x77, 0x77, 0x77, 0xA2, 0x78, 0x78, 0x78, 0xA5, 0x73, 0x73, 0x73, 0xB0, 0x5F, 0x5F, 0x5F, 0x96, 0x40, 0x40, 0x40, 0x5A, 0x34, 0x34, 0x34, 0x45, 0x42, 0x42, 0x42, 0x53, 0x52, 0x52, 0x52, 0x66, 0x52, 0x52, 0x52, 0x66, 0x43, 0x43, 0x43, 0x55, 0x34, 0x34, 0x34, 0x45, 0x3E, 0x3E, 0x3E, 0x58, 0x5D, 0x5D, 0x5D, 0x93, 0x73, 0x73, 0x73, 0xB0, 0x78, 0x78, 0x78, 0xA5, 0x76, 0x76, 0x76, 0xA1, 0x90, 0x90, 0x90, 0xC7, 0xBE, 0xBE, 0xBE, 0xFC, 0xCF, 0xCF, 0xCF, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0xD0, 0xD0, 0xD0, 0xFF, 0x9D, 0x9D, 0x9D, 0xC5, 0x09, 0x09, 0x09, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x2B, 0xB9, 0xB9, 0xB9, 0xE5, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0x8D, 0x8D, 0x8D, 0xC4, 0x75, 0x75, 0x75, 0x9F, 0x79, 0x79, 0x79, 0xAA, 0x67, 0x67, 0x67, 0xA6, 0x3D, 0x3D, 0x3D, 0x58, 0x35, 0x35, 0x35, 0x43, 0x77, 0x77, 0x77, 0x93, 0xAA, 0xAA, 0xAA, 0xD2, 0xC7, 0xC7, 0xC7, 0xF6, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xC8, 0xC8, 0xC8, 0xF7, 0xAB, 0xAB, 0xAB, 0xD4, 0x7B, 0x7B, 0x7B, 0x98, 0x36, 0x36, 0x36, 0x45, 0x3B, 0x3B, 0x3B, 0x54, 0x66, 0x66, 0x66, 0xA4, 0x79, 0x79, 0x79, 0xAB, 0x75, 0x75, 0x75, 0x9F, 0x8B, 0x8B, 0x8B, 0xC0, 0xC2, 0xC2, 0xC2, 0xFE, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xCF, 0xCF, 0xCF, 0xFF, 0xC0, 0xC0, 0xC0, 0xEC, 0x21, 0x21, 0x21, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x3B, 0x3B, 0x54, 0xCA, 0xCA, 0xCA, 0xFA, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0x95, 0x95, 0x95, 0xCE, 0x75, 0x75, 0x75, 0xA0, 0x7B, 0x7B, 0x7B, 0xAC, 0x5D, 0x5D, 0x5D, 0x95, 0x28, 0x28, 0x28, 0x35, 0x6E, 0x6E, 0x6E, 0x89, 0xC3, 0xC3, 0xC3, 0xF3, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xC6, 0xC6, 0xC6, 0xF6, 0x74, 0x74, 0x74, 0x90, 0x26, 0x26, 0x26, 0x33, 0x5A, 0x5A, 0x5A, 0x90, 0x7B, 0x7B, 0x7B, 0xAD, 0x75, 0x75, 0x75, 0xA0, 0x92, 0x92, 0x92, 0xCA, 0xC7, 0xC7, 0xC7, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCE, 0xCE, 0xCE, 0xFF, 0xCD, 0xCD, 0xCD, 0xFE, 0x46, 0x46, 0x46, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x6A, 0x6A, 0x90, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xA8, 0xA8, 0xA8, 0xE4, 0x74, 0x74, 0x74, 0xA2, 0x7B, 0x7B, 0x7B, 0xAA, 0x5F, 0x5F, 0x5F, 0x99, 0x29, 0x29, 0x29, 0x38, 0x97, 0x97, 0x97, 0xBC, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0x9E, 0x9E, 0x9E, 0xC4, 0x2A, 0x2A, 0x2A, 0x38, 0x5C, 0x5C, 0x5C, 0x94, 0x7B, 0x7B, 0x7B, 0xAB, 0x74, 0x74, 0x74, 0xA1, 0xA4, 0xA4, 0xA4, 0xE0, 0xCC, 0xCC, 0xCC, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0xCD, 0xCD, 0xCD, 0xFF, 0x76, 0x76, 0x76, 0x9E, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x09, 0x89, 0x89, 0x89, 0xB6, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xC3, 0xC3, 0xC3, 0xFE, 0x82, 0x82, 0x82, 0xB6, 0x76, 0x76, 0x76, 0xA3, 0x6E, 0x6E, 0x6E, 0xA9, 0x26, 0x26, 0x26, 0x39, 0x8D, 0x8D, 0x8D, 0xB1, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0x95, 0x95, 0x95, 0xBB, 0x26, 0x26, 0x26, 0x37, 0x6B, 0x6B, 0x6B, 0xA6, 0x77, 0x77, 0x77, 0xA4, 0x80, 0x80, 0x80, 0xB3, 0xC1, 0xC1, 0xC1, 0xFD, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0xCB, 0xCB, 0xCB, 0xFF, 0x91, 0x91, 0x91, 0xBF, 0x08, 0x08, 0x08, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x19, 0x9E, 0x9E, 0x9E, 0xCE, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xA6, 0xA6, 0xA6, 0xE1, 0x73, 0x73, 0x73, 0xA2, 0x7B, 0x7B, 0x7B, 0xAE, 0x3B, 0x3B, 0x3B, 0x60, 0x5D, 0x5D, 0x5D, 0x77, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0x92, 0x92, 0x92, 0xF6, 0x7B, 0x7B, 0x7B, 0xD8, 0x7A, 0x7A, 0x7A, 0xD7, 0x90, 0x90, 0x90, 0xF4, 0xAE, 0xAE, 0xAE, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0x66, 0x66, 0x66, 0x82, 0x37, 0x37, 0x37, 0x59, 0x7B, 0x7B, 0x7B, 0xAF, 0x72, 0x72, 0x72, 0xA1, 0xA1, 0xA1, 0xA1, 0xDC, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xCA, 0xCA, 0xCA, 0xFF, 0xA6, 0xA6, 0xA6, 0xD7, 0x13, 0x13, 0x13, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x1A, 0x1A, 0x2B, 0xAE, 0xAE, 0xAE, 0xE0, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0x8A, 0x8A, 0x8A, 0xC1, 0x74, 0x74, 0x74, 0xA3, 0x6A, 0x6A, 0x6A, 0x9F, 0x27, 0x27, 0x27, 0x3A, 0xBE, 0xBE, 0xBE, 0xF1, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xA6, 0xA6, 0xA6, 0xFE, 0x50, 0x50, 0x50, 0x8F, 0x14, 0x14, 0x14, 0x23, 0x03, 0x03, 0x03, 0x06, 0x03, 0x03, 0x03, 0x06, 0x12, 0x12, 0x12, 0x20, 0x4C, 0x4C, 0x4C, 0x88, 0xA2, 0xA2, 0xA2, 0xFB, 0xC8, 0xC8, 0xC8, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC3, 0xC3, 0xC3, 0xF7, 0x29, 0x29, 0x29, 0x3C, 0x66, 0x66, 0x66, 0x9A, 0x75, 0x75, 0x75, 0xA4, 0x86, 0x86, 0x86, 0xBD, 0xC7, 0xC7, 0xC7, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xC9, 0xC9, 0xC9, 0xFF, 0xB8, 0xB8, 0xB8, 0xEB, 0x20, 0x20, 0x20, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x27, 0x27, 0x3D, 0xBD, 0xBD, 0xBD, 0xF2, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xBD, 0xBD, 0xBD, 0xF7, 0x79, 0x79, 0x79, 0xAC, 0x79, 0x79, 0x79, 0xAB, 0x4C, 0x4C, 0x4C, 0x78, 0x58, 0x58, 0x58, 0x79, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xB4, 0xB4, 0xB4, 0xFE, 0x3B, 0x3B, 0x3B, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x60, 0xB0, 0xB0, 0xB0, 0xFC, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0x62, 0x62, 0x62, 0x85, 0x48, 0x48, 0x48, 0x72, 0x7A, 0x7A, 0x7A, 0xAC, 0x77, 0x77, 0x77, 0xA9, 0xBA, 0xBA, 0xBA, 0xF4, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC8, 0xC8, 0xC8, 0xFF, 0xC4, 0xC4, 0xC4, 0xFA, 0x2C, 0x2C, 0x2C, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x53, 0xC3, 0xC3, 0xC3, 0xFB, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xAD, 0xAD, 0xAD, 0xE7, 0x72, 0x72, 0x72, 0xA3, 0x7A, 0x7A, 0x7A, 0xAE, 0x34, 0x34, 0x34, 0x55, 0x91, 0x91, 0x91, 0xC1, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0x69, 0x69, 0x69, 0xAC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0xA0, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0x99, 0x99, 0x99, 0xCA, 0x30, 0x30, 0x30, 0x4F, 0x7A, 0x7A, 0x7A, 0xAE, 0x71, 0x71, 0x71, 0xA2, 0xAB, 0xAB, 0xAB, 0xE4, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0xC7, 0xC7, 0xC7, 0xFF, 0x36, 0x36, 0x36, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x64, 0xC3, 0xC3, 0xC3, 0xFD, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xA5, 0xA5, 0xA5, 0xDE, 0x6F, 0x6F, 0x6F, 0xA1, 0x76, 0x76, 0x76, 0xAA, 0x28, 0x28, 0x28, 0x42, 0xA6, 0xA6, 0xA6, 0xDD, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0x24, 0x24, 0x24, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x1E, 0x1E, 0x34, 0xC2, 0xC2, 0xC2, 0xFE, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xAD, 0xAD, 0xAD, 0xE4, 0x28, 0x28, 0x28, 0x42, 0x74, 0x74, 0x74, 0xA8, 0x6F, 0x6F, 0x6F, 0xA1, 0xA1, 0xA1, 0xA1, 0xDB, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0xC5, 0xC5, 0xC5, 0xFF, 0x3C, 0x3C, 0x3C, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x6B, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xA1, 0xA1, 0xA1, 0xDA, 0x6F, 0x6F, 0x6F, 0xA2, 0x73, 0x73, 0x73, 0xA6, 0x29, 0x29, 0x29, 0x44, 0xAD, 0xAD, 0xAD, 0xE8, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xBE, 0xBE, 0xBE, 0xF9, 0x12, 0x12, 0x12, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x0E, 0x18, 0xBA, 0xBA, 0xBA, 0xF5, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xB3, 0xB3, 0xB3, 0xEF, 0x2A, 0x2A, 0x2A, 0x45, 0x71, 0x71, 0x71, 0xA3, 0x6F, 0x6F, 0x6F, 0xA2, 0x9D, 0x9D, 0x9D, 0xD6, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0xC4, 0xC4, 0xC4, 0xFF, 0x3F, 0x3F, 0x3F, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x6A, 0xC1, 0xC1, 0xC1, 0xFE, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xA1, 0xA1, 0xA1, 0xDB, 0x6E, 0x6E, 0x6E, 0xA1, 0x74, 0x74, 0x74, 0xA7, 0x28, 0x28, 0x28, 0x43, 0xA7, 0xA7, 0xA7, 0xE5, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC1, 0xC1, 0xC1, 0xFC, 0x17, 0x17, 0x17, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x12, 0x12, 0x1D, 0xBE, 0xBE, 0xBE, 0xF8, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xAD, 0xAD, 0xAD, 0xEC, 0x29, 0x29, 0x29, 0x44, 0x72, 0x72, 0x72, 0xA4, 0x6F, 0x6F, 0x6F, 0xA2, 0x9E, 0x9E, 0x9E, 0xD7, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xFF, 0x3D, 0x3D, 0x3D, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x39, 0x39, 0x5E, 0xBE, 0xBE, 0xBE, 0xFC, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xA8, 0xA8, 0xA8, 0xE1, 0x6F, 0x6F, 0x6F, 0xA2, 0x77, 0x77, 0x77, 0xAD, 0x2C, 0x2C, 0x2C, 0x46, 0x91, 0x91, 0x91, 0xD4, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0x4A, 0x4A, 0x4A, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x58, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0x98, 0x98, 0x98, 0xDB, 0x2A, 0x2A, 0x2A, 0x43, 0x76, 0x76, 0x76, 0xAB, 0x6E, 0x6E, 0x6E, 0xA1, 0xA5, 0xA5, 0xA5, 0xDE, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC2, 0xC2, 0xC2, 0xFF, 0xC1, 0xC1, 0xC1, 0xFF, 0x37, 0x37, 0x37, 0x5B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x2A, 0x2A, 0x49, 0xB6, 0xB6, 0xB6, 0xF8, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xB2, 0xB2, 0xB2, 0xED, 0x71, 0x71, 0x71, 0xA5, 0x76, 0x76, 0x76, 0xAE, 0x41, 0x41, 0x41, 0x64, 0x66, 0x66, 0x66, 0xA8, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xA6, 0xA6, 0xA6, 0xDD, 0x0B, 0x0B, 0x0B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x0B, 0xA1, 0xA1, 0xA1, 0xD6, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0x6E, 0x6E, 0x6E, 0xB3, 0x3C, 0x3C, 0x3C, 0x5D, 0x76, 0x76, 0x76, 0xAE, 0x71, 0x71, 0x71, 0xA4, 0xAF, 0xAF, 0xAF, 0xEA, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xC0, 0xC0, 0xC0, 0xFF, 0xBD, 0xBD, 0xBD, 0xFD, 0x2E, 0x2E, 0x2E, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x1D, 0x1D, 0x34, 0xA8, 0xA8, 0xA8, 0xEA, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBD, 0xBD, 0xBD, 0xFC, 0x7E, 0x7E, 0x7E, 0xB3, 0x71, 0x71, 0x71, 0xA8, 0x5B, 0x5B, 0x5B, 0x87, 0x32, 0x32, 0x32, 0x56, 0xB3, 0xB3, 0xB3, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0x89, 0x89, 0x89, 0xB7, 0x12, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x16, 0x83, 0x83, 0x83, 0xAF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0x38, 0x38, 0x38, 0x60, 0x58, 0x58, 0x58, 0x82, 0x71, 0x71, 0x71, 0xA9, 0x7C, 0x7C, 0x7C, 0xB0, 0xBB, 0xBB, 0xBB, 0xFA, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xBF, 0xBF, 0xBF, 0xFF, 0xB2, 0xB2, 0xB2, 0xF6, 0x24, 0x24, 0x24, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x13, 0x13, 0x23, 0x96, 0x96, 0x96, 0xD8, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0x96, 0x96, 0x96, 0xCC, 0x6C, 0x6C, 0x6C, 0xA1, 0x72, 0x72, 0x72, 0xAA, 0x27, 0x27, 0x27, 0x3C, 0x74, 0x74, 0x74, 0xC7, 0xBD, 0xBD, 0xBD, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xAD, 0xAD, 0xAD, 0xE8, 0x64, 0x64, 0x64, 0x86, 0x3A, 0x3A, 0x3A, 0x4E, 0x39, 0x39, 0x39, 0x4D, 0x61, 0x61, 0x61, 0x82, 0xAB, 0xAB, 0xAB, 0xE5, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0x7C, 0x7C, 0x7C, 0xD2, 0x25, 0x25, 0x25, 0x3A, 0x71, 0x71, 0x71, 0xA8, 0x6C, 0x6C, 0x6C, 0xA1, 0x93, 0x93, 0x93, 0xC9, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF, 0x9E, 0x9E, 0x9E, 0xE1, 0x18, 0x18, 0x18, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x12, 0x83, 0x83, 0x83, 0xC5, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xB3, 0xB3, 0xB3, 0xF1, 0x74, 0x74, 0x74, 0xA7, 0x70, 0x70, 0x70, 0xAA, 0x5A, 0x5A, 0x5A, 0x86, 0x28, 0x28, 0x28, 0x43, 0x98, 0x98, 0x98, 0xF7, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0x9D, 0x9D, 0x9D, 0xFB, 0x2C, 0x2C, 0x2C, 0x49, 0x56, 0x56, 0x56, 0x7F, 0x71, 0x71, 0x71, 0xAB, 0x73, 0x73, 0x73, 0xA6, 0xB0, 0xB0, 0xB0, 0xED, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0x8B, 0x8B, 0x8B, 0xCD, 0x0D, 0x0D, 0x0D, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x04, 0x69, 0x69, 0x69, 0xA9, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0x90, 0x90, 0x90, 0xC7, 0x6A, 0x6A, 0x6A, 0xA0, 0x73, 0x73, 0x73, 0xB0, 0x3D, 0x3D, 0x3D, 0x5C, 0x3F, 0x3F, 0x3F, 0x6B, 0x99, 0x99, 0x99, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x43, 0x43, 0x43, 0x73, 0x39, 0x39, 0x39, 0x56, 0x74, 0x74, 0x74, 0xB0, 0x6A, 0x6A, 0x6A, 0xA0, 0x8D, 0x8D, 0x8D, 0xC3, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF, 0x72, 0x72, 0x72, 0xB4, 0x04, 0x04, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x76, 0xB8, 0xB8, 0xB8, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xB3, 0xB3, 0xB3, 0xF6, 0x7B, 0x7B, 0x7B, 0xAD, 0x6B, 0x6B, 0x6B, 0xA3, 0x73, 0x73, 0x73, 0xAF, 0x34, 0x34, 0x34, 0x4F, 0x3A, 0x3A, 0x3A, 0x62, 0x8D, 0x8D, 0x8D, 0xF5, 0xA8, 0xA8, 0xA8, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0x90, 0x90, 0x90, 0xF9, 0x3F, 0x3F, 0x3F, 0x69, 0x30, 0x30, 0x30, 0x49, 0x72, 0x72, 0x72, 0xAE, 0x6B, 0x6B, 0x6B, 0xA4, 0x79, 0x79, 0x79, 0xAB, 0xB2, 0xB2, 0xB2, 0xF4, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xBA, 0xBA, 0xBA, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0x4E, 0x4E, 0x4E, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x23, 0x23, 0x42, 0xA8, 0xA8, 0xA8, 0xF3, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xA8, 0xA8, 0xA8, 0xE8, 0x75, 0x75, 0x75, 0xA6, 0x6B, 0x6B, 0x6B, 0xA5, 0x70, 0x70, 0x70, 0xAD, 0x40, 0x40, 0x40, 0x61, 0x2C, 0x2C, 0x2C, 0x45, 0x63, 0x63, 0x63, 0xAB, 0x93, 0x93, 0x93, 0xFC, 0x9D, 0x9D, 0x9D, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0x9D, 0x9D, 0x9D, 0xFF, 0x94, 0x94, 0x94, 0xFE, 0x67, 0x67, 0x67, 0xB1, 0x2D, 0x2D, 0x2D, 0x47, 0x3D, 0x3D, 0x3D, 0x5C, 0x70, 0x70, 0x70, 0xAC, 0x6C, 0x6C, 0x6C, 0xA6, 0x72, 0x72, 0x72, 0xA4, 0xA6, 0xA6, 0xA6, 0xE5, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xB9, 0xB9, 0xB9, 0xFF, 0xAD, 0xAD, 0xAD, 0xF8, 0x29, 0x29, 0x29, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x0E, 0x1B, 0x8A, 0x8A, 0x8A, 0xD6, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xA3, 0xA3, 0xA3, 0xE2, 0x76, 0x76, 0x76, 0xA7, 0x6B, 0x6B, 0x6B, 0xA3, 0x71, 0x71, 0x71, 0xB0, 0x5B, 0x5B, 0x5B, 0x8C, 0x34, 0x34, 0x34, 0x4F, 0x35, 0x35, 0x35, 0x53, 0x49, 0x49, 0x49, 0x79, 0x5D, 0x5D, 0x5D, 0x9F, 0x67, 0x67, 0x67, 0xB4, 0x67, 0x67, 0x67, 0xB4, 0x5D, 0x5D, 0x5D, 0xA0, 0x4A, 0x4A, 0x4A, 0x7B, 0x35, 0x35, 0x35, 0x54, 0x33, 0x33, 0x33, 0x4E, 0x59, 0x59, 0x59, 0x88, 0x71, 0x71, 0x71, 0xB0, 0x6B, 0x6B, 0x6B, 0xA4, 0x75, 0x75, 0x75, 0xA6, 0xA1, 0xA1, 0xA1, 0xDF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0xB8, 0xB8, 0xB8, 0xFF, 0x92, 0x92, 0x92, 0xDF, 0x12, 0x12, 0x12, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x5B, 0x5B, 0x9D, 0xB6, 0xB6, 0xB6, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xA9, 0xA9, 0xA9, 0xEB, 0x7E, 0x7E, 0x7E, 0xB1, 0x6D, 0x6D, 0x6D, 0xA0, 0x6D, 0x6D, 0x6D, 0xA9, 0x71, 0x71, 0x71, 0xAF, 0x60, 0x60, 0x60, 0x95, 0x48, 0x48, 0x48, 0x6F, 0x3A, 0x3A, 0x3A, 0x59, 0x32, 0x32, 0x32, 0x4D, 0x32, 0x32, 0x32, 0x4D, 0x39, 0x39, 0x39, 0x58, 0x48, 0x48, 0x48, 0x6E, 0x5F, 0x5F, 0x5F, 0x93, 0x71, 0x71, 0x71, 0xAF, 0x6D, 0x6D, 0x6D, 0xA9, 0x6C, 0x6C, 0x6C, 0xA0, 0x7E, 0x7E, 0x7E, 0xB0, 0xA6, 0xA6, 0xA6, 0xE8, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB7, 0xB7, 0xB7, 0xFF, 0xB6, 0xB6, 0xB6, 0xFF, 0x65, 0x65, 0x65, 0xAB, 0x02, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x2E, 0x2E, 0x57, 0xA9, 0xA9, 0xA9, 0xFA, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB1, 0xB1, 0xB1, 0xF9, 0x92, 0x92, 0x92, 0xCE, 0x77, 0x77, 0x77, 0xAA, 0x6D, 0x6D, 0x6D, 0xA1, 0x6C, 0x6C, 0x6C, 0xA5, 0x6E, 0x6E, 0x6E, 0xAB, 0x6F, 0x6F, 0x6F, 0xAE, 0x70, 0x70, 0x70, 0xAF, 0x70, 0x70, 0x70, 0xAF, 0x6F, 0x6F, 0x6F, 0xAE, 0x6F, 0x6F, 0x6F, 0xAC, 0x6C, 0x6C, 0x6C, 0xA5, 0x6D, 0x6D, 0x6D, 0xA1, 0x77, 0x77, 0x77, 0xA9, 0x91, 0x91, 0x91, 0xCC, 0xAF, 0xAF, 0xAF, 0xF7, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xB5, 0xB5, 0xB5, 0xFF, 0xAE, 0xAE, 0xAE, 0xFD, 0x35, 0x35, 0x35, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x1E, 0x83, 0x83, 0x83, 0xD7, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xAD, 0xAD, 0xAD, 0xF5, 0x9A, 0x9A, 0x9A, 0xDA, 0x84, 0x84, 0x84, 0xBB, 0x79, 0x79, 0x79, 0xAC, 0x74, 0x74, 0x74, 0xA7, 0x72, 0x72, 0x72, 0xA5, 0x72, 0x72, 0x72, 0xA5, 0x74, 0x74, 0x74, 0xA7, 0x79, 0x79, 0x79, 0xAC, 0x83, 0x83, 0x83, 0xBA, 0x99, 0x99, 0x99, 0xD9, 0xAC, 0xAC, 0xAC, 0xF4, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0xB4, 0xB4, 0xB4, 0xFF, 0x8B, 0x8B, 0x8B, 0xE0, 0x13, 0x13, 0x13, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x49, 0x49, 0x88, 0xAE, 0xAE, 0xAE, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xAE, 0xAE, 0xAE, 0xF8, 0xA8, 0xA8, 0xA8, 0xF0, 0xA6, 0xA6, 0xA6, 0xEC, 0xA6, 0xA6, 0xA6, 0xEC, 0xA8, 0xA8, 0xA8, 0xF0, 0xAD, 0xAD, 0xAD, 0xF7, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xB3, 0xB3, 0xB3, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0x51, 0x51, 0x51, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x31, 0x8D, 0x8D, 0x8D, 0xE6, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF, 0x94, 0x94, 0x94, 0xED, 0x1D, 0x1D, 0x1D, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x4F, 0x4F, 0x95, 0xAC, 0xAC, 0xAC, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xB1, 0xB1, 0xB1, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0x56, 0x56, 0x56, 0xA1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x8B, 0x8B, 0x8B, 0xE7, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0xB0, 0xB0, 0xB0, 0xFF, 0x91, 0x91, 0x91, 0xEE, 0x1D, 0x1D, 0x1D, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x47, 0x47, 0x8B, 0xA6, 0xA6, 0xA6, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xAF, 0xAF, 0xAF, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0x4F, 0x4F, 0x4F, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x1E, 0x74, 0x74, 0x74, 0xD1, 0xAC, 0xAC, 0xAC, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAE, 0xAE, 0xAE, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0x7A, 0x7A, 0x7A, 0xD9, 0x12, 0x12, 0x12, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x29, 0x29, 0x56, 0x92, 0x92, 0x92, 0xF5, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0xAD, 0xAD, 0xAD, 0xFF, 0x97, 0x97, 0x97, 0xF8, 0x2F, 0x2F, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x4A, 0x4A, 0x4A, 0x95, 0x9F, 0x9F, 0x9F, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xAC, 0xAC, 0xAC, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0x50, 0x50, 0x50, 0xA1, 0x03, 0x03, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x16, 0x5F, 0x5F, 0x5F, 0xBB, 0xA3, 0xA3, 0xA3, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xAB, 0xAB, 0xAB, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0x65, 0x65, 0x65, 0xC5, 0x0E, 0x0E, 0x0E, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x14, 0x14, 0x2A, 0x70, 0x70, 0x70, 0xD4, 0xA5, 0xA5, 0xA5, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xAA, 0xAA, 0xAA, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0x77, 0x77, 0x77, 0xDD, 0x18, 0x18, 0x18, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0x48, 0x78, 0x78, 0x78, 0xE3, 0xA4, 0xA4, 0xA4, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA9, 0xA9, 0xA9, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0x7D, 0x7D, 0x7D, 0xE9, 0x26, 0x26, 0x26, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x25, 0x50, 0x79, 0x79, 0x79, 0xE7, 0xA2, 0xA2, 0xA2, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0x7E, 0x7E, 0x7E, 0xEC, 0x2A, 0x2A, 0x2A, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x24, 0x4E, 0x73, 0x73, 0x73, 0xDF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA8, 0xA8, 0xA8, 0xFF, 0xA0, 0xA0, 0xA0, 0xFF, 0x77, 0x77, 0x77, 0xE5, 0x29, 0x29, 0x29, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x42, 0x68, 0x68, 0x68, 0xD0, 0x99, 0x99, 0x99, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0xA7, 0xA7, 0xA7, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x6C, 0x6C, 0x6C, 0xD7, 0x22, 0x22, 0x22, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x14, 0x14, 0x2C, 0x58, 0x58, 0x58, 0xB7, 0x8F, 0x8F, 0x8F, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA6, 0xA6, 0xA6, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0x91, 0x91, 0x91, 0xFF, 0x5B, 0x5B, 0x5B, 0xBE, 0x17, 0x17, 0x17, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x15, 0x3D, 0x3D, 0x3D, 0x85, 0x7B, 0x7B, 0x7B, 0xEF, 0x99, 0x99, 0x99, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x7F, 0x7F, 0x7F, 0xF3, 0x41, 0x41, 0x41, 0x8D, 0x0B, 0x0B, 0x0B, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0x4B, 0x5C, 0x5C, 0x5C, 0xC1, 0x8B, 0x8B, 0x8B, 0xFE, 0x9E, 0x9E, 0x9E, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0xA5, 0xA5, 0xA5, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x8E, 0x8E, 0x8E, 0xFF, 0x5F, 0x5F, 0x5F, 0xC7, 0x25, 0x25, 0x25, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x16, 0x38, 0x38, 0x38, 0x7B, 0x69, 0x69, 0x69, 0xDA, 0x8D, 0x8D, 0x8D, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0x9E, 0x9E, 0x9E, 0xFF, 0x8F, 0x8F, 0x8F, 0xFF, 0x6C, 0x6C, 0x6C, 0xDF, 0x3B, 0x3B, 0x3B, 0x82, 0x0C, 0x0C, 0x0C, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x25, 0x3D, 0x3D, 0x3D, 0x87, 0x68, 0x68, 0x68, 0xD7, 0x8A, 0x8A, 0x8A, 0xFF, 0x97, 0x97, 0x97, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA4, 0xA4, 0xA4, 0xFF, 0xA1, 0xA1, 0xA1, 0xFF, 0x98, 0x98, 0x98, 0xFF, 0x8A, 0x8A, 0x8A, 0xFF, 0x6A, 0x6A, 0x6A, 0xDB, 0x40, 0x40, 0x40, 0x8D, 0x13, 0x13, 0x13, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x21, 0x33, 0x33, 0x33, 0x70, 0x57, 0x57, 0x57, 0xBB, 0x78, 0x78, 0x78, 0xF0, 0x8D, 0x8D, 0x8D, 0xFF, 0x97, 0x97, 0x97, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA3, 0xA3, 0xA3, 0xFF, 0xA2, 0xA2, 0xA2, 0xFF, 0x9F, 0x9F, 0x9F, 0xFF, 0x97, 0x97, 0x97, 0xFF, 0x8D, 0x8D, 0x8D, 0xFF, 0x7A, 0x7A, 0x7A, 0xF2, 0x58, 0x58, 0x58, 0xBF, 0x35, 0x35, 0x35, 0x75, 0x10, 0x10, 0x10, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x0D, 0x1F, 0x1F, 0x1F, 0x45, 0x3D, 0x3D, 0x3D, 0x86, 0x58, 0x58, 0x58, 0xBE, 0x6F, 0x6F, 0x6F, 0xE6, 0x83, 0x83, 0x83, 0xFB, 0x8C, 0x8C, 0x8C, 0xFF, 0x91, 0x91, 0x91, 0xFF, 0x97, 0x97, 0x97, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9C, 0x9C, 0x9C, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x9B, 0x9B, 0x9B, 0xFF, 0x99, 0x99, 0x99, 0xFF, 0x97, 0x97, 0x97, 0xFF, 0x92, 0x92, 0x92, 0xFF, 0x8D, 0x8D, 0x8D, 0xFF, 0x84, 0x84, 0x84, 0xFC, 0x70, 0x70, 0x70, 0xE8, 0x59, 0x59, 0x59, 0xC1, 0x3E, 0x3E, 0x3E, 0x89, 0x21, 0x21, 0x21, 0x49, 0x06, 0x06, 0x06, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x09, 0x12, 0x12, 0x12, 0x28, 0x2A, 0x2A, 0x2A, 0x5C, 0x3C, 0x3C, 0x3C, 0x83, 0x49, 0x49, 0x49, 0xA0, 0x56, 0x56, 0x56, 0xBD, 0x5D, 0x5D, 0x5D, 0xCC, 0x60, 0x60, 0x60, 0xD2, 0x62, 0x62, 0x62, 0xD7, 0x63, 0x63, 0x63, 0xD9, 0x63, 0x63, 0x63, 0xD9, 0x62, 0x62, 0x62, 0xD7, 0x60, 0x60, 0x60, 0xD3, 0x5D, 0x5D, 0x5D, 0xCD, 0x57, 0x57, 0x57, 0xBF, 0x49, 0x49, 0x49, 0xA1, 0x3D, 0x3D, 0x3D, 0x85, 0x2B, 0x2B, 0x2B, 0x5F, 0x14, 0x14, 0x14, 0x2B, 0x05, 0x05, 0x05, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +#endif diff --git a/elements/O2.cpp b/elements/O2.cpp new file mode 100644 index 0000000..78b4229 --- /dev/null +++ b/elements/O2.cpp @@ -0,0 +1,30 @@ +#include "element.h" + +int update_O2(UPDATE_FUNC_ARGS) +{ + int r,rx,ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rx>8].temp+=(rand()/(RAND_MAX/100)); + if(parts[r>>8].tmp&0x01) + parts[r>>8].temp=3473; + parts[r>>8].tmp |= 2; + } + if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM) + { + sim->create_part(i,x,y,PT_FIRE); + parts[i].temp+=(rand()/(RAND_MAX/100)); + parts[i].tmp |= 2; + } + + } + return 0; +} diff --git a/elements/acel.cpp b/elements/acel.cpp new file mode 100644 index 0000000..7ab9684 --- /dev/null +++ b/elements/acel.cpp @@ -0,0 +1,58 @@ +#include "element.h" + +int update_ACEL(UPDATE_FUNC_ARGS) { + int r, rx, ry; + parts[i].tmp = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; + if ((r>>8)>=NPART || !r) + continue; + if(sim->ptypes[r&0xFF].properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) + { + parts[r>>8].vx *= 1.1f; + parts[r>>8].vy *= 1.1f; + parts[i].tmp = 1; + } + } + return 0; +} + +int graphics_ACEL(GRAPHICS_FUNC_ARGS) +{ + if(cpart->tmp) + *pixel_mode |= PMODE_GLOW; + return 0; +} +int update_DCEL(UPDATE_FUNC_ARGS) { + int r, rx, ry; + parts[i].tmp = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; + if ((r>>8)>=NPART || !r) + continue; + if(sim->ptypes[r&0xFF].properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) + { + parts[r>>8].vx *= 0.9f; + parts[r>>8].vy *= 0.9f; + parts[i].tmp = 1; + } + } + return 0; +} + +int graphics_DCEL(GRAPHICS_FUNC_ARGS) +{ + if(cpart->tmp) + *pixel_mode |= PMODE_GLOW; + return 0; +} diff --git a/elements/acid.cpp b/elements/acid.cpp new file mode 100644 index 0000000..3a72b9d --- /dev/null +++ b/elements/acid.cpp @@ -0,0 +1,76 @@ +#include "element.h" + +int update_ACID(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, np; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxpart_change_type(i,x,y,PT_FIRE); + sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); + parts[i].life = 4; + parts[r>>8].life = 4; + } + else if ((r&0xFF)==PT_WTRV) + { + if(!(rand()%250)) + { + sim->part_change_type(i, x, y, PT_CAUS); + parts[i].life = (rand()%50)+25; + sim->kill_part(r>>8); + } + } + else if (((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && sim->ptypes[r&0xFF].hardness>(rand()%1000))&&parts[i].life>=50) + { + if (sim->parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid + { + float newtemp = ((60.0f-(float)sim->ptypes[r&0xFF].hardness))*7.0f; + if(newtemp < 0){ + newtemp = 0; + } + parts[i].temp += newtemp; + parts[i].life--; + sim->kill_part(r>>8); + } + } + else if (parts[i].life<=50) + { + sim->kill_part(i); + return 1; + } + } + } + for ( trade = 0; trade<2; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rx>8)>=NPART || !r) + continue; + if ((r&0xFF)==PT_ACID&&(parts[i].life>parts[r>>8].life)&&parts[i].life>0)//diffusion + { + int temp = parts[i].life - parts[r>>8].life; + if (temp ==1) + { + parts[r>>8].life ++; + parts[i].life --; + } + else if (temp>0) + { + parts[r>>8].life += temp/2; + parts[i].life -= temp/2; + } + } + } + } + return 0; +} diff --git a/elements/amtr.cpp b/elements/amtr.cpp new file mode 100644 index 0000000..d119cc9 --- /dev/null +++ b/elements/amtr.cpp @@ -0,0 +1,28 @@ +#include "element.h" + +int update_AMTR(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxkill_part(i); + return 1; + } + if (10>(rand()/(RAND_MAX/100))) + sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); + else + sim->kill_part(r>>8); + sim->pv[y/CELL][x/CELL] -= 2.0f; + } + } + return 0; +} diff --git a/elements/anar.cpp b/elements/anar.cpp new file mode 100644 index 0000000..83eaf5a --- /dev/null +++ b/elements/anar.cpp @@ -0,0 +1,27 @@ +#include "element.h" + +int update_ANAR(UPDATE_FUNC_ARGS) { + int r, rx, ry; + + //if (parts[i].temp >= 0.23) + // parts[i].temp --; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%22) + { + sim->part_change_type(i,x,y,PT_HFLM); + parts[i].life = rand()%150+50; + parts[r>>8].temp = parts[i].temp = 0; + sim->pv[y/CELL][x/CELL] -= 0.5; + } + } + } + return 0; +} diff --git a/elements/aray.cpp b/elements/aray.cpp new file mode 100644 index 0000000..65b0d53 --- /dev/null +++ b/elements/aray.cpp @@ -0,0 +1,104 @@ +#include "element.h" + +int update_ARAY(UPDATE_FUNC_ARGS) { + int r, nxx, nyy, docontinue, nxi, nyi, rx, ry, nr, ry1, rx1; + if (parts[i].life==0) { + int colored =0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN)?1:0; + int nostop = (parts[r>>8].ctype==PT_INST)?1:0; + for (docontinue = 1, nxx = 0, nyy = 0, nxi = rx*-1, nyi = ry*-1; docontinue; nyy+=nyi, nxx+=nxi) { + if (!(x+nxi+nxx= 0 && y+nyi+nyy >= 0)) { + break; + } + r = pmap[y+nyi+nyy][x+nxi+nxx]; + if (!r) { + int nr = sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_BRAY); + if (nr!=-1) { + if (destroy) {//if it came from PSCN + parts[nr].tmp = 2; + parts[nr].life = 2; + } else + parts[nr].ctype = colored; + parts[nr].temp = parts[i].temp; + } + } else if (!destroy) { + if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==0) {//if it hits another BRAY that isn't red + if (nyy!=0 || nxx!=0) { + parts[r>>8].life = 1020;//makes it last a while + parts[r>>8].tmp = 1; + if (!parts[r>>8].ctype)//and colors it if it isn't already + parts[r>>8].ctype = colored; + } + docontinue = 0;//then stop it + } else if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==1) {//if it hits one that already was a long life, reset it + parts[r>>8].life = 1020; + //docontinue = 1; + } else if ((r&0xFF)==PT_FILT) {//get color if passed through FILT + colored = parts[r>>8].ctype; + //this if prevents BRAY from stopping on certain materials + } else if ((r&0xFF)!=PT_STOR && (r&0xFF)!=PT_INWR && (r&0xFF)!=PT_ARAY && (r&0xFF)!=PT_WIFI && !((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { + if (nyy!=0 || nxx!=0) { + sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK); + } + //if (!(nostop && (ptypes[r&0xFF].properties&PROP_CONDUCTS))) { + if (!(nostop && parts[r>>8].ctype >= 0 && parts[r>>8].ctype < PT_NUM && (sim->ptypes[parts[r>>8].ctype].properties&PROP_CONDUCTS))) { + docontinue = 0; + } else { + docontinue = 1; + } + } else if((r&0xFF)==PT_STOR) { + if(parts[r>>8].tmp) + { + //Cause STOR to release + for(ry1 = 1; ry1 >= -1; ry1--){ + for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ + int np = sim->create_part(-1, x+nxi+nxx+rx1, y+nyi+nyy+ry1, parts[r>>8].tmp); + if (np!=-1) + { + parts[np].temp = parts[r>>8].temp; + parts[np].life = parts[r>>8].flags; + parts[np].tmp = parts[r>>8].pavg[0]; + parts[np].ctype = parts[r>>8].pavg[1]; + parts[r>>8].tmp = 0; + parts[r>>8].life = 10; + break; + } + } + } + } + else + { + parts[r>>8].life = 10; + } + } + } else if (destroy) { + if ((r&0xFF)==PT_BRAY) { + parts[r>>8].life = 1; + docontinue = 1; + //this if prevents red BRAY from stopping on certain materials + } else if ((r&0xFF)==PT_STOR || (r&0xFF)==PT_INWR || (r&0xFF)==PT_ARAY || (r&0xFF)==PT_WIFI || (r&0xFF)==PT_FILT || ((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { + if((r&0xFF)==PT_STOR) + { + parts[r>>8].tmp = 0; + parts[r>>8].life = 0; + } + docontinue = 1; + } else { + docontinue = 0; + } + } + } + } + //parts[i].life = 4; + } + } + return 0; +} diff --git a/elements/bang.cpp b/elements/bang.cpp new file mode 100644 index 0000000..658a567 --- /dev/null +++ b/elements/bang.cpp @@ -0,0 +1,75 @@ +#include "element.h" + +int update_BANG(UPDATE_FUNC_ARGS) { + int r, rx, ry, nb; + if(parts[i].tmp==0) + { + if(parts[i].temp>=673.0f) + parts[i].tmp = 1; + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxflood_prop(x, y, offsetof(Particle, tmp), &tempvalue, 0); + } + else if(parts[i].tmp==2) + { + parts[i].tmp = 3; + } + else if(parts[i].tmp>=3) + { + float otemp = parts[i].temp-275.13f; + //Explode!! + sim->pv[y/CELL][x/CELL] += 0.5f; + parts[i].tmp = 0; + if(!(rand()%3)) + { + if(!(rand()%2)) + { + sim->create_part(i, x, y, PT_FIRE); + parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); + } + else + { + sim->create_part(i, x, y, PT_SMKE); + parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); + } + } + else + { + if(!(rand()%15)) + { + sim->create_part(i, x, y, PT_BOMB); + parts[i].tmp = 1; + parts[i].life = 50; + parts[i].temp = restrict_flt((MAX_TEMP/3)+otemp, MIN_TEMP, MAX_TEMP); + parts[i].vx = rand()%20-10; + parts[i].vy = rand()%20-10; + } + else + { + sim->kill_part(i); + } + } + return 1; + } + return 0; +} diff --git a/elements/bcln.cpp b/elements/bcln.cpp new file mode 100644 index 0000000..8c00f95 --- /dev/null +++ b/elements/bcln.cpp @@ -0,0 +1,40 @@ +#include "element.h" + +int update_BCLN(UPDATE_FUNC_ARGS) { + if (!parts[i].life && sim->pv[y/CELL][x/CELL]>4.0f) + parts[i].life = rand()%40+80; + if (parts[i].life) + { + float advection = 0.1f; + parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; + parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; + } + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && + (r&0xFF)!=PT_STKM2 && (r&0xFF)!=PT_PBCN && + (r&0xFF)>8].ctype; + } + } + } + else { + if (parts[i].ctype==PT_LIFE) sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); + else sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + return 0; +} diff --git a/elements/bcol.cpp b/elements/bcol.cpp new file mode 100644 index 0000000..d941508 --- /dev/null +++ b/elements/bcol.cpp @@ -0,0 +1,68 @@ +#include "element.h" + +int update_BCOL(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, temp; + if (parts[i].life<=0) { + sim->create_part(i, x, y, PT_FIRE); + return 1; + } else if (parts[i].life < 100) { + parts[i].life--; + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) + { + if (parts[i].life>100) { + parts[i].life = 99; + } + } + if ((r&0xFF)==PT_LAVA && 1>(rand()%500)) + { + if (parts[r>>8].ctype == PT_IRON) { + parts[r>>8].ctype = PT_METL; + sim->kill_part(i); + return 1; + } + } + } + /*if(100-parts[i].life > parts[i].tmp2) + parts[i].tmp2 = 100-parts[i].life; + if(parts[i].tmp2 < 0) parts[i].tmp2 = 0; + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion + { + int temp = parts[i].tmp2 - parts[r>>8].tmp2; + if(temp < 10) + continue; + if (temp ==1) + { + parts[r>>8].tmp2 ++; + parts[i].tmp2 --; + } + else if (temp>0) + { + parts[r>>8].tmp2 += temp/2; + parts[i].tmp2 -= temp/2; + } + } + } + }*/ + if(parts[i].temp > parts[i].tmp2) + parts[i].tmp2 = parts[i].temp; + return 0; +} diff --git a/elements/bizr.cpp b/elements/bizr.cpp new file mode 100644 index 0000000..538b87f --- /dev/null +++ b/elements/bizr.cpp @@ -0,0 +1,44 @@ +#include "element.h" + +//Used by ALL 3 BIZR states +int update_BIZR(UPDATE_FUNC_ARGS) { + int r, rx, ry, nr, ng, nb, na; + float tr, tg, tb, ta, mr, mg, mb, ma; + float blend; + if(parts[i].dcolour){ + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; + tg = (parts[r>>8].dcolour>>8)&0xFF; + tb = (parts[r>>8].dcolour)&0xFF; + ta = (parts[r>>8].dcolour>>24)&0xFF; + + mr = (parts[i].dcolour>>16)&0xFF; + mg = (parts[i].dcolour>>8)&0xFF; + mb = (parts[i].dcolour)&0xFF; + ma = (parts[i].dcolour>>24)&0xFF; + + nr = (tr*blend) + (mr*(1-blend)); + ng = (tg*blend) + (mg*(1-blend)); + nb = (tb*blend) + (mb*(1-blend)); + na = (ta*blend) + (ma*(1-blend)); + + parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; + } + } + } + if(((r = sim->photons[y][x])&0xFF)==PT_PHOT || ((r = pmap[y][x])&0xFF)==PT_PHOT) + { + sim->part_change_type(r>>8, x, y, PT_ELEC); + parts[r>>8].ctype = 0; + } + return 0; +} diff --git a/elements/bmtl.cpp b/elements/bmtl.cpp new file mode 100644 index 0000000..a3dc4b8 --- /dev/null +++ b/elements/bmtl.cpp @@ -0,0 +1,29 @@ +#include "element.h" + +int update_BMTL(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, tempFactor; + if (parts[i].tmp>1) + { + parts[i].tmp--; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + if ((rt==PT_METL || rt==PT_IRON) && 1>(rand()/(RAND_MAX/100))) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_BMTL); + parts[r>>8].tmp=(parts[i].tmp<=7)?parts[i].tmp=1:parts[i].tmp-(rand()%5);//rand()/(RAND_MAX/300)+100; + } + } + } + else if (parts[i].tmp==1 && 1>rand()%1000) + { + parts[i].tmp = 0; + sim->part_change_type(i,x,y,PT_BRMT); + } + return 0; +} diff --git a/elements/bomb.cpp b/elements/bomb.cpp new file mode 100644 index 0000000..b2e9e7d --- /dev/null +++ b/elements/bomb.cpp @@ -0,0 +1,85 @@ +#include "element.h" + +int update_BOMB(UPDATE_FUNC_ARGS) { + int r, rx, ry, nb; + //Spark is used so much now that it should be a seperate element. + if (parts[i].tmp==1) { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties & (TYPE_SOLID | TYPE_PART | TYPE_LIQUID) && !(sim->ptypes[r&0xFF].properties & PROP_SPARKSETTLE)) { + sim->kill_part(i); + return 1; + } + } + } else if (parts[i].tmp==0) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+nxi, y+nxj, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 1; + parts[nb].life = 50; + parts[nb].temp = MAX_TEMP; + parts[nb].vx = rand()%20-10; + parts[nb].vy = rand()%20-10; + } + } + for (nxj=-rad; nxj<=rad; nxj++) + for (nxi=-rad; nxi<=rad; nxi++) + if ((pow(nxi,2))/(pow(rad,2))+(pow(nxj,2))/(pow(rad,2))<=1) + if ((pmap[y+nxj][x+nxi]&0xFF)!=PT_DMND && (pmap[y+nxj][x+nxi]&0xFF)!=PT_CLNE && (pmap[y+nxj][x+nxi]&0xFF)!=PT_PCLN && (pmap[y+nxj][x+nxi]&0xFF)!=PT_BCLN) { + sim->delete_part(x+nxi, y+nxj, 0);//it SHOULD kill anything but the exceptions above, doesn't seem to always work + sim->pv[(y+nxj)/CELL][(x+nxi)/CELL] += 0.1f; + nb = sim->create_part(-1, x+nxi, y+nxj, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 2; + parts[nb].life = 2; + parts[nb].temp = MAX_TEMP; + } + } + //create_parts(x, y, 9, 9, PT_BOMB); + //create_parts(x, y, 8, 8, PT_NONE); + sim->kill_part(i); + return 1; + } + } + } + return 0; +} +int graphics_BOMB(GRAPHICS_FUNC_ARGS) +{ + if (cpart->tmp==0) { + //Normal bomb + *pixel_mode |= PMODE_FLARE; + } + else if(cpart->tmp==2) + { + //Flash + *pixel_mode = PMODE_FLAT | FIRE_ADD; + *colr = *colg = *colb = *firer = *fireg = *fireb = *firea = 255; + } + else + { + //Flying spark + *pixel_mode = PMODE_SPARK | PMODE_ADD; + *cola = 4*cpart->life; + } + return 0; +} diff --git a/elements/boyl.cpp b/elements/boyl.cpp new file mode 100644 index 0000000..e4ee6d2 --- /dev/null +++ b/elements/boyl.cpp @@ -0,0 +1,43 @@ +#include "element.h" + +int update_BOYL(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (sim->pv[y/CELL][x/CELL]<(parts[i].temp/100)) + sim->pv[y/CELL][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL]); + if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp/100)) + sim->pv[y/CELL+1][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL+1][x/CELL]); + if (x+CELLpv[y/CELL][x/CELL+1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL+1]); + if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL+1][x/CELL+1]); + } + if (y-CELL>=0 && sim->pv[y/CELL-1][x/CELL]<(parts[i].temp/100)) + sim->pv[y/CELL-1][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL-1][x/CELL]); + if (x-CELL>=0) + { + sim->pv[y/CELL][x/CELL-1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL-1]); + if (y-CELL>=0) + sim->pv[y/CELL-1][x/CELL-1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL-1][x/CELL-1]); + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && + x+rxrand()%30) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FOG); + } + else if ((r&0xFF)==PT_O2 && 1>rand()%9) + { + sim->kill_part(r>>8); + sim->part_change_type(i,x,y,PT_WATR); + sim->pv[y/CELL][x/CELL] += 4.0; + } + } + return 0; +} diff --git a/elements/brmt.cpp b/elements/brmt.cpp new file mode 100644 index 0000000..c23bd99 --- /dev/null +++ b/elements/brmt.cpp @@ -0,0 +1,35 @@ +#include "element.h" + +int update_BRMT(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, tempFactor; + if (parts[i].temp > (250.0f+273.15f)) + { + printf("%f\n", (250.0f+273.15f)-parts[i].temp); + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + tempFactor = 1000 - (((250.0f+273.15f)-parts[i].temp)*2); + if(tempFactor < 2) + tempFactor = 2; + if ((rt==PT_BREC) && 1 > (rand()%tempFactor)) + { + if(rand()%2) + { + sim->create_part(r>>8, x+rx, y+ry, PT_THRM); + } + else + { sim->create_part(i, x, y, PT_THRM); + } + return 1; + //part_change_type(r>>8,x+rx,y+ry,PT_BMTL); + //parts[r>>8].tmp=(parts[i].tmp<=7)?parts[i].tmp=1:parts[i].tmp-(rand()%5);//rand()/(RAND_MAX/300)+100; + } + } + } + return 0; +} diff --git a/elements/btry.cpp b/elements/btry.cpp new file mode 100644 index 0000000..3f11003 --- /dev/null +++ b/elements/btry.cpp @@ -0,0 +1,24 @@ +#include "element.h" + +int update_BTRY(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + if (sim->parts_avg(i,r>>8,PT_INSL) != PT_INSL) + { + if ((sim->ptypes[rt].properties&PROP_CONDUCTS) && !(rt==PT_WATR||rt==PT_SLTW||rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR) && parts[r>>8].life==0 && abs(rx)+abs(ry) < 4) + { + parts[r>>8].life = 4; + parts[r>>8].ctype = rt; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + } + } + } + return 0; +} diff --git a/elements/c5.cpp b/elements/c5.cpp new file mode 100644 index 0000000..412245f --- /dev/null +++ b/elements/c5.cpp @@ -0,0 +1,24 @@ +#include "element.h" + +int update_C5(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].temp<100)||(r&0xFF)==PT_HFLM) + { + if (1>rand()%6) + { + sim->part_change_type(i,x,y,PT_HFLM); + parts[r>>8].temp = parts[i].temp = 0; + parts[i].life = rand()%150+50; + sim->pv[y/CELL][x/CELL] += 1.5; + } + } + } + return 0; +} diff --git a/elements/caus.cpp b/elements/caus.cpp new file mode 100644 index 0000000..2ec268e --- /dev/null +++ b/elements/caus.cpp @@ -0,0 +1,35 @@ +#include "element.h" + +int update_CAUS(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, np; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].hardness>(rand()%1000))&&parts[i].life>=50) + { + if (sim->parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid + { + float newtemp = ((60.0f-(float)sim->ptypes[r&0xFF].hardness))*7.0f; + if(newtemp < 0){ + newtemp = 0; + } + parts[i].temp += newtemp; + parts[i].life--; + sim->kill_part(r>>8); + } + } + else if (parts[i].life<=50) + { + sim->kill_part(i); + return 1; + } + } + } + return 0; +} diff --git a/elements/cbnw.cpp b/elements/cbnw.cpp new file mode 100644 index 0000000..cf0c13e --- /dev/null +++ b/elements/cbnw.cpp @@ -0,0 +1,89 @@ +#include "element.h" + +int update_CBNW(UPDATE_FUNC_ARGS) { + int r, rx, ry, oldt; + oldt = parts[i].tmp; + if (sim->pv[y/CELL][x/CELL]<=3) + { + if(20>(rand()%80000)) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.5f; + } + else if(sim->pv[y/CELL][x/CELL]<=-0.5) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.5f; + } + } + if (parts[i].tmp>0) + parts[i].tmp--; + if(!(rand()%200)) + { + parts[i].tmp2 = rand()%40; + } else if(parts[i].tmp2!=20) { + parts[i].tmp2 -= (parts[i].tmp2>20)?1:-1; + } + if(oldt==1) + { + //Explode + if(rand()%4) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.2f; + } + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties&TYPE_PART) && parts[i].tmp == 0 && 1>(rand()%250)) + { + //Start explode + parts[i].tmp = rand()%25;//(rand()%100)+50; + } + else if((sim->ptypes[r&0xFF].properties&TYPE_SOLID) && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_GLAS && parts[i].tmp == 0 && (2-sim->pv[y/CELL][x/CELL])>(rand()%20000)) + { + if(rand()%2) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.2f; + } + } + if ((r&0xFF)==PT_CBNW) + { + if(!parts[i].tmp && parts[r>>8].tmp) + { + parts[i].tmp = parts[r>>8].tmp; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[i].tmp--; + } + else if(parts[i].tmp && !parts[r>>8].tmp) + { + parts[r>>8].tmp = parts[i].tmp; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[r>>8].tmp++; + } + } + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + } + return 0; +} diff --git a/elements/clne.cpp b/elements/clne.cpp new file mode 100644 index 0000000..13b25b9 --- /dev/null +++ b/elements/clne.cpp @@ -0,0 +1,32 @@ +#include "element.h" + +int update_CLNE(UPDATE_FUNC_ARGS) { + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && + (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && + (r&0xFF)>8].ctype; + } + } + } + else { + if (parts[i].ctype==PT_LIFE) sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); + else sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + return 0; +} diff --git a/elements/clst.cpp b/elements/clst.cpp new file mode 100644 index 0000000..2c31d87 --- /dev/null +++ b/elements/clst.cpp @@ -0,0 +1,38 @@ +#include "element.h" + +int update_CLST(UPDATE_FUNC_ARGS) { + int r, rx, ry; + float cxy; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1500)) + { + sim->part_change_type(i,x,y,PT_PSTS); + sim->kill_part(r>>8); + } + if ((r&0xFF)==PT_NITR) + { + sim->create_part(i, x, y, PT_BANG); + sim->create_part(r>>8, x+rx, y+ry, PT_BANG); + } + if ((r&0xFF)==PT_CLST) + { + if(parts[i].temp <195) + cxy = 0.05; + if(parts[i].temp >= 195 && parts[i].temp <295) + cxy = 0.015; + if(parts[i].temp >= 295 && parts[i].temp <350) + cxy = 0.01; + if(parts[i].temp > 350) + cxy = 0.005; + parts[i].vx += cxy*rx; + parts[i].vy += cxy*ry;//These two can be set not to calculate over 350 later. They do virtually nothing over 0.005. + } + } + return 0; +} diff --git a/elements/co2.cpp b/elements/co2.cpp new file mode 100644 index 0000000..5a3bbf5 --- /dev/null +++ b/elements/co2.cpp @@ -0,0 +1,31 @@ +#include "element.h" + +int update_CO2(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%40000)&&parts[i].ctype==5) + { + parts[i].ctype = 0; + sim->create_part(-3, x, y, PT_WATR); + } + if ((r>>8)>=NPART || !r) + continue; + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW) && 1>(rand()%250)) + { + sim->part_change_type(i,x,y,PT_CBNW); + sim->kill_part(r>>8); + } + } + return 0; +} diff --git a/elements/coal.cpp b/elements/coal.cpp new file mode 100644 index 0000000..256aa69 --- /dev/null +++ b/elements/coal.cpp @@ -0,0 +1,75 @@ +#include "element.h" + +int update_COAL(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, temp; + if (parts[i].life<=0) { + sim->create_part(i, x, y, PT_FIRE); + return 1; + } else if (parts[i].life < 100) { + parts[i].life--; + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); + } + if ((sim->pv[y/CELL][x/CELL] > 4.3f)&&parts[i].tmp>40) + parts[i].tmp=39; + else if (parts[i].tmp<40&&parts[i].tmp>0) + parts[i].tmp--; + else if (parts[i].tmp<=0) { + sim->create_part(i, x, y, PT_BCOL); + return 1; + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) + { + if (parts[i].life>100) { + parts[i].life = 99; + } + } + if ((r&0xFF)==PT_LAVA && 1>(rand()%500)) + { + if (parts[r>>8].ctype == PT_IRON) { + parts[r>>8].ctype = PT_METL; + sim->kill_part(i); + return 1; + } + } + } + /*if(100-parts[i].life > parts[i].tmp2) + parts[i].tmp2 = 100-parts[i].life; + if(parts[i].tmp2 < 0) parts[i].tmp2 = 0; + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion + { + int temp = parts[i].tmp2 - parts[r>>8].tmp2; + if(temp < 10) + continue; + if (temp ==1) + { + parts[r>>8].tmp2 ++; + parts[i].tmp2 --; + } + else if (temp>0) + { + parts[r>>8].tmp2 += temp/2; + parts[i].tmp2 -= temp/2; + } + } + } + }*/ + if(parts[i].temp > parts[i].tmp2) + parts[i].tmp2 = parts[i].temp; + return 0; +} diff --git a/elements/conv.cpp b/elements/conv.cpp new file mode 100644 index 0000000..ce4ee48 --- /dev/null +++ b/elements/conv.cpp @@ -0,0 +1,45 @@ +#include "element.h" + +int update_CONV(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && + (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && + (r&0xFF)!=PT_CONV && (r&0xFF)>8].ctype; + } + } + } + else if(parts[i].ctype>0 && parts[i].ctype=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if((r&0xFF)!=PT_CONV && (r&0xFF)!=parts[i].ctype) + { + if (parts[i].ctype==PT_LIFE) sim->create_part(r>>8, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); + else sim->create_part(r>>8, x+rx, y+ry, parts[i].ctype); + } + } + } + return 0; +} diff --git a/elements/dest.cpp b/elements/dest.cpp new file mode 100644 index 0000000..014fad4 --- /dev/null +++ b/elements/dest.cpp @@ -0,0 +1,66 @@ +#include "element.h" + +int update_DEST(UPDATE_FUNC_ARGS) { + int r,rx,ry,topv; + rx=rand()%5-2; + ry=rand()%5-2; + + r = pmap[y+ry][x+rx]; + if (!r || (r&0xFF)==PT_DEST || (r&0xFF)==PT_DMND) + return 0; + + if (parts[i].life<=0 || parts[i].life>37) + { + parts[i].life=30+rand()%20; + parts[i].temp+=20000; + sim->pv[y/CELL][x/CELL]+=60.0f; + } + parts[i].temp+=10000; + if ((r&0xFF)==PT_PLUT || (r&0xFF)==PT_DEUT) + { + sim->pv[y/CELL][x/CELL]+=20.0f; + parts[i].temp+=18000; + if (rand()%2==0) + { + float orig_temp = parts[r>>8].temp; + sim->create_part(r>>8, x+rx, y+ry, PT_NEUT); + parts[r>>8].temp = restrict_flt(orig_temp+40000.0f, MIN_TEMP, MAX_TEMP); + sim->pv[y/CELL][x/CELL] += 10.0f; + parts[i].life-=4; + } + } + else if ((r&0xFF)==PT_INSL) + { + sim->create_part(r>>8, x+rx, y+ry, PT_PLSM); + } + else if (rand()%3==0) + { + sim->kill_part(r>>8); + parts[i].life -= 4*((sim->ptypes[r&0xFF].properties&TYPE_SOLID)?3:1); + if (parts[i].life<=0) + parts[i].life=1; + parts[i].temp+=10000; + } + else + { + if (sim->ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+10000.0f, MIN_TEMP, MAX_TEMP); + } + topv=sim->pv[y/CELL][x/CELL]/9+parts[r>>8].temp/900; + if (topv>40.0f) + topv=40.0f; + sim->pv[y/CELL][x/CELL]+=40.0f+topv; + parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); + return 0; +} +int graphics_DEST(GRAPHICS_FUNC_ARGS) +{ + if(cpart->life) + { + *pixel_mode |= PMODE_LFLARE; + } + else + { + *pixel_mode |= PMODE_SPARK; + } + return 0; +} diff --git a/elements/deut.cpp b/elements/deut.cpp new file mode 100644 index 0000000..03de364 --- /dev/null +++ b/elements/deut.cpp @@ -0,0 +1,89 @@ +#include "element.h" + +int update_DEUT(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, np; + int maxlife = ((10000/(parts[i].temp + 1))-1); + if ((10000%((int)parts[i].temp+1))>rand()%((int)parts[i].temp+1)) + maxlife ++; + if (parts[i].life < maxlife) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=maxlife)) + continue; + if ((r&0xFF)==PT_DEUT&&33>=rand()/(RAND_MAX/100)+1) + { + if ((parts[i].life + parts[r>>8].life + 1) <= maxlife) + { + parts[i].life += parts[r>>8].life + 1; + sim->kill_part(r>>8); + } + } + } + } + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create deut + { + np = sim->create_part(-1,x+rx,y+ry,PT_DEUT); + if (np<0) continue; + parts[i].life--; + parts[np].temp = parts[i].temp; + parts[np].life = 0; + } + } + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].life)&&parts[i].life>0)//diffusion + { + int temp = parts[i].life - parts[r>>8].life; + if (temp ==1) + { + parts[r>>8].life ++; + parts[i].life --; + } + else if (temp>0) + { + parts[r>>8].life += temp/2; + parts[i].life -= temp/2; + } + } + } + } + return 0; +} + +int graphics_DEUT(GRAPHICS_FUNC_ARGS) +{ + if(cpart->life>=700) + { + *colr += cpart->life*1; + *colg += cpart->life*2; + *colb += cpart->life*3; + *pixel_mode |= PMODE_GLOW; + } + else + { + *colr += cpart->life*1; + *colg += cpart->life*2; + *colb += cpart->life*3; + *pixel_mode |= PMODE_BLUR; + } + return 0; +} diff --git a/elements/dlay.cpp b/elements/dlay.cpp new file mode 100644 index 0000000..4643b30 --- /dev/null +++ b/elements/dlay.cpp @@ -0,0 +1,48 @@ +#include "element.h" + +int update_DLAY(UPDATE_FUNC_ARGS) { + int r, rx, ry, oldl; + oldl = parts[i].life; + if (parts[i].life>0) + parts[i].life--; + //if (parts[i].life==1) + //{ + if (parts[i].temp>=256.0+273.15) + parts[i].temp=256.0+273.15; + if (parts[i].temp<= -256.0+273.15) + parts[i].temp = -256.0+273.15; + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN) + { + parts[i].life = (int)(parts[i].temp-273.15); + } + else if ((r&0xFF)==PT_DLAY) + { + if(!parts[i].life && parts[r>>8].life) + { + parts[i].life = parts[r>>8].life; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[i].life--; + } + else if(parts[i].life && !parts[r>>8].life) + { + parts[r>>8].life = parts[i].life; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[r>>8].life++; + } + } + else if((r&0xFF)==PT_NSCN && oldl==1) + { + sim->create_part(-1, x+rx, y+ry, PT_SPRK); + } + } + //} + return 0; +} diff --git a/elements/dstw.cpp b/elements/dstw.cpp new file mode 100644 index 0000000..03ae7dd --- /dev/null +++ b/elements/dstw.cpp @@ -0,0 +1,39 @@ +#include "element.h" + +int update_DSTW(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) + { + sim->part_change_type(i,x,y,PT_SLTW); + sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); + } + if (((r&0xFF)==PT_WATR||(r&0xFF)==PT_SLTW) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_WATR); + } + if ((r&0xFF)==PT_SLTW && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_SLTW); + } + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>12.0f) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + } + return 0; +} diff --git a/elements/elec.cpp b/elements/elec.cpp new file mode 100644 index 0000000..6b06f8f --- /dev/null +++ b/elements/elec.cpp @@ -0,0 +1,101 @@ +#include "element.h" + +int update_ELEC(UPDATE_FUNC_ARGS) { + int r, rt, rx, ry, nb, rrx, rry; + float rr, rrr; + parts[i].pavg[0] = x; + parts[i].pavg[1] = y; + if(pmap[y][x]==PT_GLOW) + { + sim->part_change_type(i, x, y, PT_PHOT); + } + for (rx=-2; rx<=2; rx++) + for (ry=-2; ry<=2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)==PT_GLAS) + { + //fire_r[y/CELL][x/CELL] += rand()%200; //D: Doesn't work with OpenGL, also shouldn't be here TODO: FIX THIS SHIT + //fire_g[y/CELL][x/CELL] += rand()%200; + //fire_b[y/CELL][x/CELL] += rand()%200; + for (rrx=-1; rrx<=1; rrx++) + { + for (rry=-1; rry<=1; rry++) + { + if (x+rx+rrx>=0 && y+ry+rry>=0 && x+rx+rrxcreate_part(-1, x+rx+rrx, y+ry+rry, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 1; + parts[nb].life = 50; + parts[nb].temp = 400.0f; + parts[nb].vx = rand()%20-10; + parts[nb].vy = rand()%20-10; + } + } + } + } + sim->kill_part(i); + return 1; + } + if ((r&0xFF)==PT_LCRY) + { + parts[r>>8].tmp2 = 5+rand()%5; + } + if ((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_CBNW) + { + if(rand()%2) + { + sim->create_part(r>>8, x+rx, y+ry, PT_H2); + sim->part_change_type(i, x, y, PT_O2); + parts[i].life = 0; + parts[i].ctype = 0; + return 1; + } + else + { + sim->create_part(r>>8, x+rx, y+ry, PT_O2); + sim->part_change_type(i, x, y, PT_H2); + parts[i].life = 0; + parts[i].ctype = 0; + return 1; + } + } + if ((r&0xFF)==PT_NEUT) + { + sim->part_change_type(r>>8, x+rx, y+ry, PT_H2); + parts[r>>8].life = 0; + parts[r>>8].ctype = 0; + } + if ((r&0xFF)==PT_DEUT) + { + if(parts[r>>8].life < 6000) + parts[r>>8].life += 1; + parts[r>>8].temp = 0; + parts[i].temp = 0; + sim->kill_part(i); + return 1; + } + if (sim->ptypes[r&0xFF].properties & PROP_CONDUCTS) + { + sim->create_part(-1, x+rx, y+ry, PT_SPRK); + sim->kill_part(i); + return 1; + } + } + return 0; +} + +int graphics_ELEC(GRAPHICS_FUNC_ARGS) +{ + *firea = 70; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode |= FIRE_ADD; + return 0; +} diff --git a/elements/elementmisc.cpp b/elements/elementmisc.cpp new file mode 100644 index 0000000..a169e80 --- /dev/null +++ b/elements/elementmisc.cpp @@ -0,0 +1,12 @@ +#include "element.h" + +int update_MISC(UPDATE_FUNC_ARGS) { + /*int t = parts[i].type; + if (t==PT_LOVE) + ISLOVE=1; + else if (t==PT_LOLZ) + ISLOLZ=1; + else if (t==PT_GRAV) + ISGRAV=1;*/ + return 0; +} diff --git a/elements/emp.cpp b/elements/emp.cpp new file mode 100644 index 0000000..a187196 --- /dev/null +++ b/elements/emp.cpp @@ -0,0 +1,128 @@ +#include "element.h" + +int update_EMP(UPDATE_FUNC_ARGS) { + int r,rx,ry,ok=0,t,n,nx,ny; + if (parts[i].life) + return 0; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rx40) + // emp_decor=40; + for (r=0; r<=sim->parts_lastActiveIndex; r++) + { + t=parts[r].type; + rx=parts[r].x; + ry=parts[r].y; + if (t==PT_SPRK || (t==PT_SWCH && parts[r].life!=0 && parts[r].life!=10) || (t==PT_WIRE && parts[r].ctype>0)) + { + int is_elec=0; + if ((parts[r].ctype==PT_PSCN || parts[r].ctype==PT_NSCN || parts[r].ctype==PT_PTCT || + parts[r].ctype==PT_NTCT || parts[r].ctype==PT_INST || parts[r].ctype==PT_SWCH) || t==PT_WIRE || t==PT_SWCH) + { + is_elec=1; + if (sim->ptypes[parts[r].type].hconduct && rand()%100==0) + parts[r].temp = restrict_flt(parts[r].temp+3000.0f, MIN_TEMP, MAX_TEMP); + if (rand()%80==0) + sim->part_change_type(r, rx, ry, PT_BREC); + else if (rand()%120==0) + sim->part_change_type(r, rx, ry, PT_NTCT); + } + + for (nx=-2; nx<3; nx++) + for (ny=-2; ny<3; ny++) + if (rx+nx>=0 && ry+ny>=0 && rx+nx>8, rx+nx, ry+ny, PT_PLSM); + parts[n>>8].life=rand()%100+70; + parts[n>>8].temp+=3000; + }*/ + + //Some elements should only be affected by wire/swch, or by a spark on inst/semiconductor + //So not affected by spark on metl, watr etc + if (is_elec) + { + if (((n&0xFF)==PT_METL || (n&0xFF)==PT_BMTL) && rand()%280==0) + { + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+3000.0f, MIN_TEMP, MAX_TEMP); + } + if ((n&0xFF)==PT_BMTL && rand()%160==0) + { + sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BMTL);//TODO: Redundant, was this meant to be BRMT or something? + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); + } + if ((n&0xFF)==PT_METL && rand()%300==0) + { + sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BMTL); + } + if ((n&0xFF)==PT_WIFI && rand()%8==0) + { + //Randomise channel + parts[n>>8].temp = rand()%MAX_TEMP; + } + if ((n&0xFF)==PT_WIFI && rand()%16==0) + { + sim->create_part(n>>8, rx+nx, ry+ny, PT_BREC); + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); + } + } + if ((n&0xFF)==PT_SWCH && rand()%100==0) + { + sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BREC); + } + if ((n&0xFF)==PT_SWCH && rand()%100==0) + { + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+2000.0f, MIN_TEMP, MAX_TEMP); + } + if ((n&0xFF)==PT_ARAY && rand()%60==0) + { + sim->create_part(n>>8, rx+nx, ry+ny, PT_BREC); + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); + } + if (t==PT_DLAY && rand()%70==0) + { + //Randomise delay + parts[n>>8].temp = (rand()%256) + 273.15f; + } + } + } + } + return 0; +} +int graphics_EMP(GRAPHICS_FUNC_ARGS) +{ + if(cpart->life) + { + *colr = cpart->life*1.5; + *colg = cpart->life*1.5; + *colb = 200-(cpart->life); + if (*colr>255) + *colr = 255; + if (*colg>255) + *colg = 255; + if (*colb>255) + *colb = 255; + if (*colb<=0) + *colb = 0; + } + return 0; +} diff --git a/elements/figh.cpp b/elements/figh.cpp new file mode 100644 index 0000000..8b18871 --- /dev/null +++ b/elements/figh.cpp @@ -0,0 +1,105 @@ +#include "element.h" + +int update_FIGH(UPDATE_FUNC_ARGS) +{ + playerst* figh = &sim->fighters[(unsigned char)parts[i].tmp]; + + float tarx, tary; + + parts[i].tmp2 = 0; //0 - stay in place, 1 - seek a stick man + + //Set target cords + if (sim->player.spwn) + { + if (sim->player2.spwn) + if ((pow(sim->player.legs[2]-x, 2) + pow(sim->player.legs[3]-y, 2))<= + (pow(sim->player2.legs[2]-x, 2) + pow(sim->player2.legs[3]-y, 2))) + { + tarx = sim->player.legs[2]; + tary = sim->player.legs[3]; + } + else + { + tarx = sim->player2.legs[2]; + tary = sim->player2.legs[3]; + } + else + { + tarx = sim->player.legs[2]; + tary = sim->player.legs[3]; + } + + parts[i].tmp2 = 1; + } + else + if (sim->player2.spwn) + { + tarx = sim->player2.legs[2]; + tary = sim->player2.legs[3]; + + parts[i].tmp2 = 1; + } + + switch (parts[i].tmp2) + { + case 1: + if ((pow(tarx-x, 2) + pow(tary-y, 2))<600) + { + if (figh->elem == PT_LIGH || figh->elem == PT_NEUT + || (sim->ptypes[figh->elem].properties&(PROP_DEADLY|PROP_RADIOACTIVE)) + || sim->ptypes[figh->elem].heat>=323 || sim->ptypes[figh->elem].heat<=243) + figh->comm = (int)figh->comm | 0x08; + } + else + if (tarxeval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+6, NULL)) + figh->comm = 0x01; + else + figh->comm = 0x02; + + if (!sim->eval_move(PT_DUST, figh->legs[4]-4, figh->legs[5]-1, NULL) + || !sim->eval_move(PT_DUST, figh->legs[12]-4, figh->legs[13]-1, NULL) + || sim->eval_move(PT_DUST, 2*figh->legs[4]-figh->legs[6], figh->legs[5]+5, NULL)) + figh->comm = (int)figh->comm | 0x04; + } + else + { + if (!sim->eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+6, NULL)) + figh->comm = 0x02; + else + figh->comm = 0x01; + + if (!sim->eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL) + || !sim->eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL) + || sim->eval_move(PT_DUST, 2*figh->legs[12]-figh->legs[14], figh->legs[13]+5, NULL)) + figh->comm = (int)figh->comm | 0x04; + } + break; + default: + figh->comm = 0; + break; + } + + figh->pcomm = figh->comm; + + run_stickman(figh, UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + +int graphics_FIGH(GRAPHICS_FUNC_ARGS) +{ + playerst * cplayer;// = &sim->fighters[(unsigned char)cpart->tmp]; + *pixel_mode = PSPEC_STICKMAN; + /*if (cplayer->elemptypes[cplayer->elem].pcolors); + *colg = PIXG(sim->ptypes[cplayer->elem].pcolors); + *colb = PIXB(sim->ptypes[cplayer->elem].pcolors); + } + else*/ + { + *colr = *colg = *colb = 255; + } + return 1; +} diff --git a/elements/fire.cpp b/elements/fire.cpp new file mode 100644 index 0000000..1f9c0c2 --- /dev/null +++ b/elements/fire.cpp @@ -0,0 +1,19 @@ +#include "element.h" + +int graphics_FIRE(GRAPHICS_FUNC_ARGS) +{ + int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = (unsigned char)ren->flm_data[caddress]; + *colg = (unsigned char)ren->flm_data[caddress+1]; + *colb = (unsigned char)ren->flm_data[caddress+2]; + + *firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + return 0; +} diff --git a/elements/firw.cpp b/elements/firw.cpp new file mode 100644 index 0000000..74605b0 --- /dev/null +++ b/elements/firw.cpp @@ -0,0 +1,65 @@ +#include "element.h" + +int update_FIRW(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, np; + if (parts[i].tmp==0) { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + if (rt==PT_FIRE||rt==PT_PLSM||rt==PT_THDR) + { + parts[i].tmp = 1; + parts[i].life = rand()%50+60; + } + } + } + else if (parts[i].tmp==1) { + if (parts[i].life==0) { + parts[i].tmp=2; + } else { + float newVel = parts[i].life/25; + parts[i].flags = parts[i].flags&0xFFFFFFFE; + /* TODO: + if ((pmap[(int)(ly-newVel)][(int)lx]&0xFF)==PT_NONE && ly-newVel>0) { + parts[i].vy = -newVel; + ly-=newVel; + iy-=newVel; + }*/ + parts[i].vy = -newVel; + } + } + else if (parts[i].tmp==2) { + int col = rand()%200+4; + int tmul; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+rx, y+ry, PT_FIRW); + if (np>-1) + { + parts[np].vx = (rand()%3-1)*tmul; + parts[np].vy = (rand()%3-1)*tmul; + parts[np].tmp = col; + parts[np].life = rand()%100+100; + parts[np].temp = 6000.0f; + parts[np].dcolour = parts[i].dcolour; + } + } + sim->pv[y/CELL][x/CELL] += 20; + sim->kill_part(i); + return 1; + } else if (parts[i].tmp>=3) { + if (parts[i].life<=0) { + sim->kill_part(i); + return 1; + } + } + return 0; +} diff --git a/elements/fog.cpp b/elements/fog.cpp new file mode 100644 index 0000000..28952e9 --- /dev/null +++ b/elements/fog.cpp @@ -0,0 +1,22 @@ +#include "element.h" + +int update_FOG(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].state==ST_SOLID&&5>=rand()%50&&parts[i].life==0&&!((r&0xFF)==PT_CLNE||(r&0xFF)==PT_PCLN)) // TODO: should this also exclude BCLN? + { + sim->part_change_type(i,x,y,PT_RIME); + } + if ((r&0xFF)==PT_SPRK) + { + parts[i].life += rand()%20; + } + } + return 0; +} diff --git a/elements/frzw.cpp b/elements/frzw.cpp new file mode 100644 index 0000000..932bccb --- /dev/null +++ b/elements/frzw.cpp @@ -0,0 +1,30 @@ +#include "element.h" + +int update_FRZW(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%70) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FRZW); + } + } + if (parts[i].life==0&&13>rand()%2500) + { + sim->part_change_type(i,x,y,PT_ICEI); + parts[i].ctype=PT_FRZW; + parts[i].temp = restrict_flt(parts[i].temp-200.0f, MIN_TEMP, MAX_TEMP); + } + else if ((100-(parts[i].life))>rand()%50000) + { + sim->part_change_type(i,x,y,PT_ICEI); + parts[i].ctype=PT_FRZW; + parts[i].temp = restrict_flt(parts[i].temp-200.0f, MIN_TEMP, MAX_TEMP); + } + return 0; +} diff --git a/elements/frzz.cpp b/elements/frzz.cpp new file mode 100644 index 0000000..8e09c1d --- /dev/null +++ b/elements/frzz.cpp @@ -0,0 +1,25 @@ +#include "element.h" + +int update_FRZZ(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%100) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FRZW); + parts[r>>8].life = 100; + parts[i].type = PT_NONE; + } + + } + if (parts[i].type==PT_NONE) { + sim->kill_part(i); + return 1; + } + return 0; +} diff --git a/elements/fsep.cpp b/elements/fsep.cpp new file mode 100644 index 0000000..3db5ba5 --- /dev/null +++ b/elements/fsep.cpp @@ -0,0 +1,35 @@ +#include "element.h" + +int update_FSEP(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life<=0) { + r = sim->create_part(i, x, y, PT_PLSM); + if (r!=-1) + parts[r].life = 50; + return 1; + } else if (parts[i].life < 40) { + parts[i].life--; + if ((rand()%10)==0) { + r = sim->create_part(-1, (rx=x+rand()%3-1), (ry=y+rand()%3-1), PT_PLSM); + if (r!=-1) + parts[r].life = 50; + } + } + else { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=(273.15+400.0f))) && 1>(rand()%15)) + { + if (parts[i].life>40) { + parts[i].life = 39; + } + } + } + } + return 0; +} diff --git a/elements/fuse.cpp b/elements/fuse.cpp new file mode 100644 index 0000000..e1db1ff --- /dev/null +++ b/elements/fuse.cpp @@ -0,0 +1,41 @@ +#include "element.h" + +int update_FUSE(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life<=0) { + r = sim->create_part(i, x, y, PT_PLSM); + if (r!=-1) + parts[r].life = 50; + return 1; + } else if (parts[i].life < 40) { + parts[i].life--; + if ((rand()%100)==0) { + r = sim->create_part(-1, (rx=x+rand()%3-1), (ry=y+rand()%3-1), PT_PLSM); + if (r!=-1) + parts[r].life = 50; + } + } + if ((sim->pv[y/CELL][x/CELL] > 2.7f)&&parts[i].tmp>40) + parts[i].tmp=39; + else if (parts[i].tmp<40&&parts[i].tmp>0) + parts[i].tmp--; + else if (parts[i].tmp<=0) { + sim->create_part(i, x, y, PT_FSEP); + return 1; + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=(273.15+700.0f)) && 1>(rand()%20))) + { + if (parts[i].life>40) { + parts[i].life = 39; + } + } + } + return 0; +} diff --git a/elements/fwrk.cpp b/elements/fwrk.cpp new file mode 100644 index 0000000..d217ad9 --- /dev/null +++ b/elements/fwrk.cpp @@ -0,0 +1,53 @@ +#include "element.h" + +int update_FWRK(UPDATE_FUNC_ARGS) { + int r, rx, ry, np; + if ((parts[i].temp>400&&(9+parts[i].temp/40)>rand()%100000&&parts[i].life==0&&!pmap[y-1][x])||parts[i].ctype==PT_DUST) + { + np = sim->create_part(-1, x , y-1 , PT_FWRK); + if (np!=-1) + { + parts[np].vy = rand()%8-22; + parts[np].vx = rand()%20-rand()%20; + parts[np].life=rand()%15+25; + parts[np].dcolour = parts[i].dcolour; + sim->kill_part(i); + return 1; + } + } + if (parts[i].life>=45) + parts[i].life=0; + if ((parts[i].life<3&&parts[i].life>0)||(parts[i].vy>6&&parts[i].life>0)) + { + int q = (rand()%255+1); + int w = (rand()%255+1); + int e = (rand()%255+1); + for (rx=-1; rx<2; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=rand()%8) + { + if (!pmap[y+ry][x+rx]) + { + np = sim->create_part(-1, x+rx, y+ry , PT_DUST); + sim->pv[y/CELL][x/CELL] += 2.00f*CFDS; + if (np!=-1) + { + parts[np].vy = -(rand()%10-1); + parts[np].vx = ((rand()%2)*2-1)*rand()%(5+5)+(parts[i].vx)*2 ; + parts[np].life= rand()%37+18; + parts[np].tmp=q; + parts[np].flags=w; + parts[np].ctype=e; + parts[np].temp= rand()%20+6000; + parts[np].dcolour = parts[i].dcolour; + } + } + } + } + sim->kill_part(i); + return 1; + } + return 0; +} diff --git a/elements/gbmb.cpp b/elements/gbmb.cpp new file mode 100644 index 0000000..95afc4e --- /dev/null +++ b/elements/gbmb.cpp @@ -0,0 +1,26 @@ +#include "element.h" +int update_GBMB(UPDATE_FUNC_ARGS) { + int rx,ry,r; + if (parts[i].life<=0) + { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + { + r = pmap[y+ry][x+rx]; + if(!r) + continue; + if((r&0xFF)!=PT_BOMB && (r&0xFF)!=PT_GBMB && + (r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_DMND) + { + parts[i].life=60; + break; + } + } + } + if(parts[i].life>20) + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = 20; + if(parts[i].life<20 && parts[i].life>=1) + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = -80; + return 0; +} diff --git a/elements/glas.cpp b/elements/glas.cpp new file mode 100644 index 0000000..e8c0a6c --- /dev/null +++ b/elements/glas.cpp @@ -0,0 +1,11 @@ +#include "element.h" + +int update_GLAS(UPDATE_FUNC_ARGS) { + parts[i].pavg[0] = parts[i].pavg[1]; + parts[i].pavg[1] = sim->pv[y/CELL][x/CELL]; + if (parts[i].pavg[1]-parts[i].pavg[0] > 0.25f || parts[i].pavg[1]-parts[i].pavg[0] < -0.25f) + { + sim->part_change_type(i,x,y,PT_BGLA); + } + return 0; +} diff --git a/elements/glow.cpp b/elements/glow.cpp new file mode 100644 index 0000000..e83e2f4 --- /dev/null +++ b/elements/glow.cpp @@ -0,0 +1,28 @@ +#include "element.h" + +int update_GLOW(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%2000)) + { + parts[i].type = PT_NONE; + sim->part_change_type(r>>8,x+rx,y+ry,PT_DEUT); + parts[r>>8].life = 10; + } + } + parts[i].ctype = sim->pv[y/CELL][x/CELL]*16; + + parts[i].tmp = abs((int)((sim->vx[y/CELL][x/CELL]+sim->vy[y/CELL][x/CELL])*16.0f)) + abs((int)((parts[i].vx+parts[i].vy)*64.0f)); + //printf("%f %f\n", parts[i].vx, parts[i].vy); + if (parts[i].type==PT_NONE) { + sim->kill_part(i); + return 1; + } + return 0; +} diff --git a/elements/goo.cpp b/elements/goo.cpp new file mode 100644 index 0000000..c305182 --- /dev/null +++ b/elements/goo.cpp @@ -0,0 +1,13 @@ +#include "element.h" + +int update_GOO(UPDATE_FUNC_ARGS) { + if (!parts[i].life && sim->pv[y/CELL][x/CELL]>1.0f) + parts[i].life = rand()%80+300; + if (parts[i].life) + { + float advection = 0.1f; + parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; + parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; + } + return 0; +} diff --git a/elements/gpmp.cpp b/elements/gpmp.cpp new file mode 100644 index 0000000..dcde7a9 --- /dev/null +++ b/elements/gpmp.cpp @@ -0,0 +1,34 @@ +#include "element.h" + +int update_GPMP(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (parts[i].life==10) + { + if (parts[i].temp>=256.0+273.15) + parts[i].temp=256.0+273.15; + if (parts[i].temp<= -256.0+273.15) + parts[i].temp = -256.0+273.15; + + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = 0.2f*(parts[i].temp-273.15); + if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp-273.15)) + sim->gravmap[(y/CELL+1)*(XRES/CELL)+(x/CELL)] += 0.1f*((parts[i].temp-273.15)-sim->gravmap[(y/CELL+1)*(XRES/CELL)+(x/CELL)]); + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + return 0; +} diff --git a/elements/graphics_default.cpp b/elements/graphics_default.cpp new file mode 100644 index 0000000..1270977 --- /dev/null +++ b/elements/graphics_default.cpp @@ -0,0 +1,23 @@ +#include "element.h" + +int graphics_DEFAULT(GRAPHICS_FUNC_ARGS) +{ + int t = cpart->type; + //Property based defaults + if(ren->sim->ptypes[t].properties & PROP_RADIOACTIVE) *pixel_mode |= PMODE_GLOW; + if(ren->sim->ptypes[t].properties & TYPE_LIQUID) + { + *pixel_mode |= PMODE_BLUR; + } + if(ren->sim->ptypes[t].properties & TYPE_GAS) + { + *pixel_mode &= ~PMODE; + *pixel_mode |= FIRE_BLEND; + *firer = *colr/2; + *fireg = *colg/2; + *fireb = *colb/2; + *firea = 125; + *pixel_mode |= DECO_FIRE; + } + return 1; +} diff --git a/elements/h2.cpp b/elements/h2.cpp new file mode 100644 index 0000000..da39ad0 --- /dev/null +++ b/elements/h2.cpp @@ -0,0 +1,34 @@ +#include "element.h" + +int update_H2(UPDATE_FUNC_ARGS) +{ + int r,rx,ry,rt; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxpv[y/CELL][x/CELL] > 8.0f && rt == PT_DESL) // This will not work. DESL turns to fire above 5.0 pressure + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); + sim->part_change_type(i,x,y,PT_OIL); + } + if ((r&0xFF)==PT_FIRE) + { + parts[r>>8].temp=2473.15; + if(parts[r>>8].tmp&0x02) + parts[r>>8].temp=3473; + parts[r>>8].tmp |= 1; + } + if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM || (r&0xFF)==PT_LAVA) + { + sim->create_part(i,x,y,PT_FIRE); + parts[i].temp+=(rand()/(RAND_MAX/100)); + parts[i].tmp |= 1; + } + } + return 0; +} diff --git a/elements/hswc.cpp b/elements/hswc.cpp new file mode 100644 index 0000000..c727395 --- /dev/null +++ b/elements/hswc.cpp @@ -0,0 +1,26 @@ +#include "element.h" + +int update_HSWC(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (parts[i].life==10) + { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + return 0; +} diff --git a/elements/ice.cpp b/elements/ice.cpp new file mode 100644 index 0000000..aece17b --- /dev/null +++ b/elements/ice.cpp @@ -0,0 +1,23 @@ +#include "element.h" + +int update_ICEI(UPDATE_FUNC_ARGS) { //currently used for snow as well + int r, rx, ry; + if (parts[i].ctype==PT_FRZW)//get colder if it is from FRZW + { + parts[i].temp = restrict_flt(parts[i].temp-1.0f, MIN_TEMP, MAX_TEMP); + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_SLTW); + sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); + } + } + return 0; +} diff --git a/elements/ignt.cpp b/elements/ignt.cpp new file mode 100644 index 0000000..1d7ea64 --- /dev/null +++ b/elements/ignt.cpp @@ -0,0 +1,44 @@ +#include "element.h" + +int update_IGNT(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if(parts[i].tmp==0) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life==1)) + { + parts[i].tmp = 1; + } + } + } + else if(parts[i].life > 0) + { + if(rand()%3) + { + int nb = sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 1; + parts[nb].life = 30; + parts[nb].vx = rand()%20-10; + parts[nb].vy = rand()%20-10; + parts[nb].temp = restrict_flt(400.0f+parts[i].temp-273.15, MIN_TEMP, MAX_TEMP); + } + } + else + { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); + } + parts[i].life--; + } + return 0; +} diff --git a/elements/iron.cpp b/elements/iron.cpp new file mode 100644 index 0000000..b887cf8 --- /dev/null +++ b/elements/iron.cpp @@ -0,0 +1,25 @@ +#include "element.h" + +int update_IRON(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()/(RAND_MAX/700))) || + ((r&0xFF) == PT_SLTW && 30>(rand()/(RAND_MAX/2000))) || + ((r&0xFF) == PT_WATR && 5 >(rand()/(RAND_MAX/6000))) || + ((r&0xFF) == PT_O2 && 2 >(rand()/(RAND_MAX/500))) || + ((r&0xFF) == PT_LO2))&& + (!(parts[i].life)) + ) + { + sim->part_change_type(i,x,y,PT_BMTL); + parts[i].tmp=(rand()/(RAND_MAX/10))+20; + } + } + return 0; +} diff --git a/elements/isz.cpp b/elements/isz.cpp new file mode 100644 index 0000000..25446d2 --- /dev/null +++ b/elements/isz.cpp @@ -0,0 +1,14 @@ +#include "element.h" + +int update_ISZ(UPDATE_FUNC_ARGS) { // for both ISZS and ISOZ + float rr, rrr; + if (1>rand()%200 && ((int)(-4.0f*(sim->pv[y/CELL][x/CELL])))>(rand()%1000)) + { + sim->create_part(i, x, y, PT_PHOT); + rr = (rand()%228+128)/127.0f; + rrr = (rand()%360)*3.14159f/180.0f; + parts[i].vx = rr*cosf(rrr); + parts[i].vy = rr*sinf(rrr); + } + return 0; +} diff --git a/elements/lava.cpp b/elements/lava.cpp new file mode 100644 index 0000000..3d7827b --- /dev/null +++ b/elements/lava.cpp @@ -0,0 +1,19 @@ +#include "element.h" + +int graphics_LAVA(GRAPHICS_FUNC_ARGS) +{ + *colr = cpart->life * 2 + 0xE0; + *colg = cpart->life * 1 + 0x50; + *colb = cpart->life / 2 + 0x10; + if (*colr>255) *colr = 255; + if (*colg>192) *colg = 192; + if (*colb>128) *colb = 128; + *firea = 40; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + *pixel_mode |= FIRE_ADD; + *pixel_mode |= PMODE_BLUR; + //Returning 0 means dynamic, do not cache + return 0; +} diff --git a/elements/lcry.cpp b/elements/lcry.cpp new file mode 100644 index 0000000..546c2ca --- /dev/null +++ b/elements/lcry.cpp @@ -0,0 +1,61 @@ +#include "element.h" + +int update_LCRY(UPDATE_FUNC_ARGS) +{ + int r, rx, ry; + if(parts[i].tmp==1 || parts[i].tmp==0) + { + if(parts[i].tmp==1) + { + if(parts[i].life<=0) + parts[i].tmp = 0; + else + { + parts[i].life-=2; + if(parts[i].life < 0) + parts[i].life = 0; + parts[i].tmp2 = parts[i].life; + } + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].tmp == 3) + { + parts[r>>8].tmp = 1; + } + } + } + else if(parts[i].tmp==2 || parts[i].tmp==3) + { + if(parts[i].tmp==2) + { + if(parts[i].life>=10) + parts[i].tmp = 3; + else + { + parts[i].life+=2; + if(parts[i].life > 10) + parts[i].life = 10; + parts[i].tmp2 = parts[i].life; + } + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].tmp == 0) + { + parts[r>>8].tmp = 2; + } + } + } + return 0; +} diff --git a/elements/legacy.cpp b/elements/legacy.cpp new file mode 100644 index 0000000..dd58173 --- /dev/null +++ b/elements/legacy.cpp @@ -0,0 +1,120 @@ +#include "element.h" + +// Interactions which only occur when legacy_enable is on +int update_legacy_all(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt; + int t = parts[i].type; + if (!sim->legacy_enable) return 0; + if (t==PT_WTRV) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && + x+rx(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_WATR); + sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); + } + if (((r&0xFF)==PT_ICEI || (r&0xFF)==PT_SNOW) && 1>(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_WATR); + if (1>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); + } + } + } + else if (t==PT_WATR) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && + x+rx(rand()%10)) + { + sim->part_change_type(i,x,y,PT_WTRV); + } + } + } + else if (t==PT_SLTW) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && + x+rx(rand()%10)) + { + sim->part_change_type(i,x,y,PT_SALT); + sim->part_change_type(r>>8,x+rx,y+ry,PT_WTRV); + } + } + } + else if (t==PT_DSTW) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && + x+rx(rand()%10)) + { + sim->part_change_type(i,x,y,PT_WTRV); + } + } + } + else if (t==PT_ICEI) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_ICEI); + sim->part_change_type(r>>8,x+rx,y+ry,PT_ICEI); + } + } + } + else if (t==PT_SNOW) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_ICEI); + sim->part_change_type(r>>8,x+rx,y+ry,PT_ICEI); + } + if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW) && 15>(rand()%1000)) + sim->part_change_type(i,x,y,PT_WATR); + } + } + if (t==PT_WTRV && sim->pv[y/CELL][x/CELL]>4.0f) + sim->part_change_type(i,x,y,PT_DSTW); + if (t==PT_OIL && sim->pv[y/CELL][x/CELL]<-6.0f) + sim->part_change_type(i,x,y,PT_GAS); + if (t==PT_GAS && sim->pv[y/CELL][x/CELL]>6.0f) + sim->part_change_type(i,x,y,PT_OIL); + if (t==PT_DESL && sim->pv[y/CELL][x/CELL]>12.0f) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = rand()%50+120; + } + return 0; +} diff --git a/elements/ligh.cpp b/elements/ligh.cpp new file mode 100644 index 0000000..8108c4b --- /dev/null +++ b/elements/ligh.cpp @@ -0,0 +1,295 @@ +#include "element.h" + +#define LIGHTING_POWER 0.65 + +int LIGH_nearest_part(Simulation * sim, int ci, int max_d) +{ + int distance = (max_d!=-1)?max_d:MAX_DISTANCE; + int ndistance = 0; + int id = -1; + int i = 0; + int cx = (int)sim->parts[ci].x; + int cy = (int)sim->parts[ci].y; + for (i=0; i<=sim->parts_lastActiveIndex; i++) + { + if (sim->parts[i].type && sim->parts[i].life && i!=ci && sim->parts[i].type!=PT_LIGH && sim->parts[i].type!=PT_THDR && sim->parts[i].type!=PT_NEUT && sim->parts[i].type!=PT_PHOT) + { + ndistance = abs(cx-sim->parts[i].x)+abs(cy-sim->parts[i].y);// Faster but less accurate Older: sqrt(pow(cx-parts[i].x, 2)+pow(cy-parts[i].y, 2)); + if (ndistanceparts[i].x, y=sim->parts[i].y; + int r,rx,ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxpmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)==tp) + return r>>8; + } + return -1; +} + +void create_line_par(Simulation * sim, int x1, int y1, int x2, int y2, int c, int temp, int life, int tmp, int tmp2) +{ + int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; + float e, de; + if (c==WL_EHOLE || c==WL_ALLOWGAS || c==WL_ALLOWALLELEC || c==WL_ALLOWSOLID || c==WL_ALLOWAIR || c==WL_WALL || c==WL_DESTROYALL || c==WL_ALLOWLIQUID || c==WL_FAN || c==WL_STREAM || c==WL_DETECT || c==WL_EWALL || c==WL_WALLELEC) + return; // this function only for particles, no walls + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1create_part(-1, y, x, c); + else + p = sim->create_part(-1, x, y,c); + if (p!=-1) + { + sim->parts[p].life = life; + sim->parts[p].temp = temp; + sim->parts[p].tmp = tmp; + sim->parts[p].tmp2 = tmp2; + } + e += de; + if (e >= 0.5f) + { + y += sy; + e -= 1.0f; + } + } +} + +int update_LIGH(UPDATE_FUNC_ARGS) +{ + /* + * + * tmp2: + * -1 - part will be removed + * 0 - "branches" of the lightning + * 1 - bending + * 2 - branching + * 3 - transfer spark or make destruction + * 4 - first pixel + * + * life - "thickness" of lighting (but anyway one pixel) + * + * tmp - angle of lighting + * + */ + int r,rx,ry, multipler, powderful; + float angle, angle2=-1; + int pNear = 0; + powderful = powderful = parts[i].temp*(1+parts[i].life/40)*LIGHTING_POWER; + update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); + if (sim->aheat_enable) + { + sim->hv[y/CELL][x/CELL]+=powderful/50; + if (sim->hv[y/CELL][x/CELL]>MAX_TEMP) + sim->hv[y/CELL][x/CELL]=MAX_TEMP; + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxptypes[r&0xFF].properties&PROP_CONDUCTS) && parts[r>>8].life==0) + { + sim->create_part(r>>8,x+rx,y+ry,PT_SPRK); + } + sim->pv[y/CELL][x/CELL] += powderful/400; + if (sim->ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/1.5, MIN_TEMP, MAX_TEMP); + } + if ((r&0xFF)==PT_DEUT || (r&0xFF)==PT_PLUT) // start nuclear reactions + { + parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful, MIN_TEMP, MAX_TEMP); + sim->pv[y/CELL][x/CELL] +=powderful/35; + if (rand()%3==0) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_NEUT); + parts[r>>8].life = rand()%480+480; + parts[r>>8].vx=rand()%10-5; + parts[r>>8].vy=rand()%10-5; + } + } + if ((r&0xFF)==PT_COAL || (r&0xFF)==PT_BCOL) // ignite coal + { + if (parts[r>>8].life>100) { + parts[r>>8].life = 99; + } + } + if (sim->ptypes[r&0xFF].hconduct) + parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/10, MIN_TEMP, MAX_TEMP); + if (((r&0xFF)==PT_STKM && sim->player.elem!=PT_LIGH) || ((r&0xFF)==PT_STKM2 && sim->player2.elem!=PT_LIGH)) + { + parts[r>>8].life-=powderful/100; + } + } + } + if (parts[i].tmp2==3) + { + parts[i].tmp2=0; + return 1; + } + + if (parts[i].tmp2==-1) + { + sim->kill_part(i); + return 1; + } + if (parts[i].tmp2<=0 || parts[i].life<=1) + { + if (parts[i].tmp2>0) + parts[i].tmp2=0; + parts[i].tmp2--; + return 1; + } + if (parts[i].tmp2<=-2) + { + sim->kill_part(i); + return 1; + } + + angle2=-1; + + pNear = LIGH_nearest_part(sim, i, parts[i].life*2.5); + if (pNear!=-1) + { + int t=parts[pNear].type; + float n_angle; // angle to nearest part + rx=parts[pNear].x-x; + ry=parts[pNear].y-y; + if (rx*rx+ry*ry!=0) + n_angle = asin(-ry/sqrt(rx*rx+ry*ry)); + else + n_angle = 0; + if (n_angle<0) + n_angle+=M_PI*2; + if (parts[i].life<5 || fabs(n_angle-parts[i].tmp*M_PI/180)=360) + angle-=360; + if (parts[i].tmp2==2 && pNear==-1) + { + angle2=angle+100-rand()%200; + if (angle2<0) + angle2+=360; + if (angle2>=360) + angle-=360; + } + + multipler=parts[i].life*1.5+rand()%((int)(parts[i].life+1)); + rx=cos(angle*M_PI/180)*multipler; + ry=-sin(angle*M_PI/180)*multipler; + create_line_par(sim, x, y, x+rx, y+ry, PT_LIGH, parts[i].temp, parts[i].life, angle, 0); + + if (x+rx>=0 && y+ry>=0 && x+rx>8].tmp2=1+(rand()%200>parts[i].tmp2*parts[i].tmp2/10+60); + parts[r>>8].life=(int)(1.0*parts[i].life/1.5-rand()%2); + parts[r>>8].tmp=angle; + parts[r>>8].temp=parts[i].temp; + } + } + + if (angle2!=-1) + { + multipler=parts[i].life*1.5+rand()%((int)(parts[i].life+1)); + rx=cos(angle2*M_PI/180)*multipler; + ry=-sin(angle2*M_PI/180)*multipler; + create_line_par(sim, x, y, x+rx, y+ry, PT_LIGH, parts[i].temp, parts[i].life, angle2, 0); + + if (x+rx>=0 && y+ry>0 && x+rx>8].tmp2=1+(rand()%200>parts[i].tmp2*parts[i].tmp2/10+40); + parts[r>>8].life=(int)(1.0*parts[i].life/1.5-rand()%2); + parts[r>>8].tmp=angle; + parts[r>>8].temp=parts[i].temp; + } + } + } + + parts[i].tmp2=-1; + return 1; +} +int graphics_LIGH(GRAPHICS_FUNC_ARGS) +{ + *colr = 235; + *colg = 245; + *colb = 255; + *pixel_mode |= PMODE_GLOW; + return 1; +} diff --git a/elements/merc.cpp b/elements/merc.cpp new file mode 100644 index 0000000..2df113b --- /dev/null +++ b/elements/merc.cpp @@ -0,0 +1,70 @@ +#include "element.h" + +int update_MERC(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, np; + int maxtmp = ((10000/(parts[i].temp + 1))-1); + if ((10000%((int)parts[i].temp+1))>rand()%((int)parts[i].temp+1)) + maxtmp ++; + if (parts[i].tmp < maxtmp) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=maxtmp)) + continue; + if ((r&0xFF)==PT_MERC&&33>=rand()/(RAND_MAX/100)+1) + { + if ((parts[i].tmp + parts[r>>8].tmp + 1) <= maxtmp) + { + parts[i].tmp += parts[r>>8].tmp + 1; + sim->kill_part(r>>8); + } + } + } + } + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create deut + { + np = sim->create_part(-1,x+rx,y+ry,PT_MERC); + if (np<0) continue; + parts[i].tmp--; + parts[np].temp = parts[i].temp; + parts[np].tmp = 0; + } + } + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp)&&parts[i].tmp>0)//diffusion + { + int temp = parts[i].tmp - parts[r>>8].tmp; + if (temp ==1) + { + parts[r>>8].tmp ++; + parts[i].tmp --; + } + else if (temp>0) + { + parts[r>>8].tmp += temp/2; + parts[i].tmp -= temp/2; + } + } + } + } + return 0; +} diff --git a/elements/mort.cpp b/elements/mort.cpp new file mode 100644 index 0000000..bbb6264 --- /dev/null +++ b/elements/mort.cpp @@ -0,0 +1,6 @@ +#include "element.h" + +int update_MORT(UPDATE_FUNC_ARGS) { + sim->create_part(-1, x, y-1, PT_SMKE); + return 0; +} diff --git a/elements/nbhl.cpp b/elements/nbhl.cpp new file mode 100644 index 0000000..056313c --- /dev/null +++ b/elements/nbhl.cpp @@ -0,0 +1,6 @@ +#include "element.h" + +int update_NBHL(UPDATE_FUNC_ARGS) { + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] += 0.1f; + return 0; +} diff --git a/elements/neut.cpp b/elements/neut.cpp new file mode 100644 index 0000000..a48fc09 --- /dev/null +++ b/elements/neut.cpp @@ -0,0 +1,145 @@ +#include "element.h" + + +int create_n_parts(Simulation * sim, int n, int x, int y, float vx, float vy, float temp, int t)//testing a new deut create part +{ + int i, c; + n = (n/50); + if (n<1) { + n = 1; + } + if (n>340) { + n = 340; + } + if (x<0 || y<0 || x>=XRES || y>=YRES || t<0 || t>=PT_NUM) + return -1; + + for (c=0; cpfree == -1) + return -1; + i = sim->pfree; + sim->pfree = sim->parts[i].life; + if (i>sim->parts_lastActiveIndex) sim->parts_lastActiveIndex = i; + + sim->parts[i].x = (float)x; + sim->parts[i].y = (float)y; + sim->parts[i].type = t; + sim->parts[i].life = rand()%480+480; + sim->parts[i].vx = r*cosf(a); + sim->parts[i].vy = r*sinf(a); + sim->parts[i].ctype = 0; + sim->parts[i].temp = temp; + sim->parts[i].tmp = 0; + if (t!=PT_STKM&&t!=PT_STKM2 && t!=PT_PHOT && t!=PT_NEUT && !sim->pmap[y][x]) + sim->pmap[y][x] = t|(i<<8); + else if ((t==PT_PHOT||t==PT_NEUT) && !sim->photons[y][x]) + sim->photons[y][x] = t|(i<<8); + + sim->pv[y/CELL][x/CELL] += 6.0f * CFDS; + } + return 0; +} + +int update_NEUT(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt; + int pressureFactor = 3 + (int)sim->pv[y/CELL][x/CELL]; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) + { + if (33>rand()%100) + { + sim->create_part(r>>8, x+rx, y+ry, rand()%3 ? PT_LAVA : PT_URAN); + parts[r>>8].temp = MAX_TEMP; + if (parts[r>>8].type==PT_LAVA) { + parts[r>>8].tmp = 100; + parts[r>>8].ctype = PT_PLUT; + } + } + else + { + sim->create_part(r>>8, x+rx, y+ry, PT_NEUT); + parts[r>>8].vx = 0.25f*parts[r>>8].vx + parts[i].vx; + parts[r>>8].vy = 0.25f*parts[r>>8].vy + parts[i].vy; + } + sim->pv[y/CELL][x/CELL] += 10.0f * CFDS; //Used to be 2, some people said nukes weren't powerful enough + update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); + } +#ifdef SDEUT + else if ((r&0xFF)==PT_DEUT && (pressureFactor+1+(parts[r>>8].life/100))>(rand()%1000)) + { + create_n_parts(sim, parts[r>>8].life, x+rx, y+ry, parts[i].vx, parts[i].vy, restrict_flt(parts[r>>8].temp + parts[r>>8].life*500, MIN_TEMP, MAX_TEMP), PT_NEUT); + sim->kill_part(r>>8); + } +#else + else if ((r&0xFF)==PT_DEUT && (pressureFactor+1)>(rand()%1000)) + { + create_part(r>>8, x+rx, y+ry, PT_NEUT); + parts[r>>8].vx = 0.25f*parts[r>>8].vx + parts[i].vx; + parts[r>>8].vy = 0.25f*parts[r>>8].vy + parts[i].vy; + if (parts[r>>8].life>0) + { + parts[r>>8].life --; + parts[r>>8].temp = restrict_flt(parts[r>>8].temp + parts[r>>8].life*17, MIN_TEMP, MAX_TEMP); + pv[y/CELL][x/CELL] += 6.0f * CFDS; + } + else + sim.kill_part(r>>8); + } +#endif + else if ((r&0xFF)==PT_GUNP && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DUST); + else if ((r&0xFF)==PT_DYST && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_YEST); + else if ((r&0xFF)==PT_YEST) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DYST); + else if ((r&0xFF)==PT_WATR && 15>(rand()%100)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DSTW); + else if ((r&0xFF)==PT_PLEX && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_GOO); + else if ((r&0xFF)==PT_NITR && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DESL); + else if ((r&0xFF)==PT_PLNT && 5>(rand()%100)) + sim->create_part(r>>8, x+rx, y+ry, PT_WOOD); + else if ((r&0xFF)==PT_DESL && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_GAS); + else if ((r&0xFF)==PT_COAL && 5>(rand()%100)) + sim->create_part(r>>8, x+rx, y+ry, PT_WOOD); + else if ((r&0xFF)==PT_DUST && 5>(rand()%100)) + sim->part_change_type(r>>8, x+rx, y+ry, PT_FWRK); + else if ((r&0xFF)==PT_FWRK && 5>(rand()%100)) + parts[r>>8].ctype = PT_DUST; + else if ((r&0xFF)==PT_ACID && 5>(rand()%100)) + sim->create_part(r>>8, x+rx, y+ry, PT_ISOZ); + /*if(parts[r>>8].type>1 && parts[r>>8].type!=PT_NEUT && parts[r>>8].type-1!=PT_NEUT && parts[r>>8].type-1!=PT_STKM && + (ptypes[parts[r>>8].type-1].menusection==SC_LIQUID|| + ptypes[parts[r>>8].type-1].menusection==SC_EXPLOSIVE|| + ptypes[parts[r>>8].type-1].menusection==SC_GAS|| + ptypes[parts[r>>8].type-1].menusection==SC_POWDERS) && 15>(rand()%1000)) + parts[r>>8].type--;*/ + } + return 0; +} + +int graphics_NEUT(GRAPHICS_FUNC_ARGS) +{ + *firea = 120; + *firer = 10; + *fireg = 80; + *fireb = 120; + + *pixel_mode |= FIRE_ADD; + return 1; +} diff --git a/elements/newgraphics.cpp b/elements/newgraphics.cpp new file mode 100644 index 0000000..83da27b --- /dev/null +++ b/elements/newgraphics.cpp @@ -0,0 +1,541 @@ +#include "element.h" +#include "hmap.h" + +int graphics_QRTZ(GRAPHICS_FUNC_ARGS) //QRTZ and PQRT +{ + int t = cpart->type, z = cpart->tmp - 5;//speckles! + /*if (cpart->temp>(ptransitions[t].thv-800.0f))//hotglow for quartz + { + float frequency = 3.1415/(2*ptransitions[t].thv-(ptransitions[t].thv-800.0f)); + int q = (cpart->temp>ptransitions[t].thv)?ptransitions[t].thv-(ptransitions[t].thv-800.0f):cpart->temp-(ptransitions[t].thv-800.0f); + *colr += sin(frequency*q) * 226 + (z * 16); + *colg += sin(frequency*q*4.55 +3.14) * 34 + (z * 16); + *colb += sin(frequency*q*2.22 +3.14) * 64 + (z * 16); + } + else*/ + { + *colr += z * 16; + *colg += z * 16; + *colb += z * 16; + } + return 0; +} +int graphics_CLST(GRAPHICS_FUNC_ARGS) +{ + int z = cpart->tmp - 5;//speckles! + *colr += z * 16; + *colg += z * 16; + *colb += z * 16; + return 0; +} +int graphics_CBNW(GRAPHICS_FUNC_ARGS) +{ + int z = cpart->tmp2 - 20;//speckles! + *colr += z * 1; + *colg += z * 2; + *colb += z * 8; + return 0; +} +int graphics_SPNG(GRAPHICS_FUNC_ARGS) +{ + *colr -= cpart->life*15; + *colg -= cpart->life*15; + *colb -= cpart->life*15; + if (*colr<=50) + *colr = 50; + if (*colg<=50) + *colg = 50; + if (*colb<=20) + *colb = 20; + return 0; +} +int graphics_LIFE(GRAPHICS_FUNC_ARGS) +{ + pixel pc; + if (cpart->ctype==NGT_LOTE)//colors for life states + { + if (cpart->tmp==2) + pc = PIXRGB(255, 128, 0); + else if (cpart->tmp==1) + pc = PIXRGB(255, 255, 0); + else + pc = PIXRGB(255, 0, 0); + } + else if (cpart->ctype==NGT_FRG2)//colors for life states + { + if (cpart->tmp==2) + pc = PIXRGB(0, 100, 50); + else + pc = PIXRGB(0, 255, 90); + } + else if (cpart->ctype==NGT_STAR)//colors for life states + { + if (cpart->tmp==4) + pc = PIXRGB(0, 0, 128); + else if (cpart->tmp==3) + pc = PIXRGB(0, 0, 150); + else if (cpart->tmp==2) + pc = PIXRGB(0, 0, 190); + else if (cpart->tmp==1) + pc = PIXRGB(0, 0, 230); + else + pc = PIXRGB(0, 0, 70); + } + else if (cpart->ctype==NGT_FROG)//colors for life states + { + if (cpart->tmp==2) + pc = PIXRGB(0, 100, 0); + else + pc = PIXRGB(0, 255, 0); + } + else if (cpart->ctype==NGT_BRAN)//colors for life states + { + if (cpart->tmp==1) + pc = PIXRGB(150, 150, 0); + else + pc = PIXRGB(255, 255, 0); + } else { + //pc = gmenu[cpart->ctype].colour; + } + *colr = PIXR(pc); + *colg = PIXG(pc); + *colb = PIXB(pc); + return 0; +} +int graphics_DUST(GRAPHICS_FUNC_ARGS) +{ + if(cpart->life >= 1) + { + *colr = cpart->flags; + *colg = cpart->tmp; + *colb = cpart->ctype; + if (ren->decorations_enable && cpart->dcolour) + { + int a = (cpart->dcolour>>24)&0xFF; + *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; + *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; + *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; + } + *pixel_mode |= PMODE_GLOW; + /**firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb;*/ + } + return 0; +} +int graphics_GRAV(GRAPHICS_FUNC_ARGS) +{ + int GRAV_R, GRAV_B, GRAV_G, GRAV_R2, GRAV_B2, GRAV_G2; + *colr = 20; + *colg = 20; + *colb = 20; + if (cpart->vx>0) + { + *colr += (cpart->vx)*GRAV_R; + *colg += (cpart->vx)*GRAV_G; + *colb += (cpart->vx)*GRAV_B; + } + if (cpart->vy>0) + { + *colr += (cpart->vy)*GRAV_G; + *colg += (cpart->vy)*GRAV_B; + *colb += (cpart->vy)*GRAV_R; + + } + if (cpart->vx<0) + { + *colr -= (cpart->vx)*GRAV_B; + *colg -= (cpart->vx)*GRAV_R; + *colb -= (cpart->vx)*GRAV_G; + + } + if (cpart->vy<0) + { + *colr -= (cpart->vy)*GRAV_R2; + *colg -= (cpart->vy)*GRAV_G2; + *colb -= (cpart->vy)*GRAV_B2; + } + return 0; +} +int graphics_WIFI(GRAPHICS_FUNC_ARGS) +{ + float frequency = 0.0628; + int q = cpart->tmp; + *colr = sin(frequency*q + 0) * 127 + 128; + *colg = sin(frequency*q + 2) * 127 + 128; + *colb = sin(frequency*q + 4) * 127 + 128; + return 0; +} +int graphics_PRTI(GRAPHICS_FUNC_ARGS) +{ + *firea = 8; + *firer = 255; + *fireg = 0; + *fireb = 0; + *pixel_mode |= EFFECT_GRAVIN; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_ADD; + return 1; +} +int graphics_PRTO(GRAPHICS_FUNC_ARGS) +{ + *firea = 8; + *firer = 0; + *fireg = 0; + *fireb = 255; + *pixel_mode |= EFFECT_GRAVOUT; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_ADD; + return 1; +} +int graphics_BIZR(GRAPHICS_FUNC_ARGS) //BIZR, BIZRG, BIZRS +{ + int x = 0; + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + if(fabs(cpart->vx)+fabs(cpart->vy)>0) + { + *firea = 255; + *fireg = *colg/5 * fabs(cpart->vx)+fabs(cpart->vy); + *fireb = *colb/5 * fabs(cpart->vx)+fabs(cpart->vy); + *firer = *colr/5 * fabs(cpart->vx)+fabs(cpart->vy); + *pixel_mode |= FIRE_ADD; + } + return 0; +} +int graphics_INVS(GRAPHICS_FUNC_ARGS) +{ + //pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f + if(cpart->tmp) + { + *cola = 100; + *colr = 15; + *colg = 0; + *colb = 150; + *pixel_mode &= PMODE; + *pixel_mode |= PMODE_BLEND; + } + return 0; +} +int graphics_ACID(GRAPHICS_FUNC_ARGS) +{ + int s = cpart->life; + if (s>75) s = 75; //These two should not be here. + if (s<49) s = 49; + s = (s-49)*3; + if (s==0) s = 1; + *colr += s*4; + *colg += s*1; + *colb += s*2; + *pixel_mode |= PMODE_BLUR; + return 0; +} +int graphics_FILT(GRAPHICS_FUNC_ARGS) +{ + int x, temp_bin = (int)((cpart->temp-273.0f)*0.025f); + if (temp_bin < 0) temp_bin = 0; + if (temp_bin > 25) temp_bin = 25; + cpart->ctype = 0x1F << temp_bin; + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *cola = 127; + *colr *= x; + *colg *= x; + *colb *= x; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_BLEND; + return 0; +} +int graphics_BRAY(GRAPHICS_FUNC_ARGS) +{ + int x, trans = 255; + if(cpart->tmp==0) + { + trans = cpart->life * 7; + if (trans>255) trans = 255; + if (cpart->ctype) { + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + } + } + else if(cpart->tmp==1) + { + trans = cpart->life/4; + if (trans>255) trans = 255; + if (cpart->ctype) { + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + } + } + else if(cpart->tmp==2) + { + trans = cpart->life*100; + if (trans>255) trans = 255; + *colr = 255; + *colg = 150; + *colb = 50; + } + *cola = trans; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_BLEND; + return 0; +} +int graphics_SWCH(GRAPHICS_FUNC_ARGS) +{ + if(cpart->life >= 10) + { + *colr = 17; + *colg = 217; + *colb = 24; + *pixel_mode |= PMODE_GLOW; + } + return 0; +} +int graphics_THDR(GRAPHICS_FUNC_ARGS) +{ + *firea = 160; + *fireg = 192; + *fireb = 255; + *firer = 144; + *pixel_mode |= FIRE_ADD; + return 1; +} +int graphics_GLOW(GRAPHICS_FUNC_ARGS) +{ + *firer = restrict_flt(cpart->temp-(275.13f+32.0f), 0, 128)/50.0f; + *fireg = restrict_flt(cpart->ctype, 0, 128)/50.0f; + *fireb = restrict_flt(cpart->tmp, 0, 128)/50.0f; + + *colr = restrict_flt(64.0f+cpart->temp-(275.13f+32.0f), 0, 255); + *colg = restrict_flt(64.0f+cpart->ctype, 0, 255); + *colb = restrict_flt(64.0f+cpart->tmp, 0, 255); + + *pixel_mode |= FIRE_ADD; + return 0; +} +int graphics_LCRY(GRAPHICS_FUNC_ARGS) +{ + if(ren->decorations_enable && cpart->dcolour && cpart->dcolour&0xFF000000) + { + *colr = (cpart->dcolour>>16)&0xFF; + *colg = (cpart->dcolour>>8)&0xFF; + *colb = (cpart->dcolour)&0xFF; + + if(cpart->tmp2<10){ + *colr /= 10-cpart->tmp2; + *colg /= 10-cpart->tmp2; + *colb /= 10-cpart->tmp2; + } + + } + else + { + *colr = *colg = *colb = 0x50+((cpart->tmp2>10?10:cpart->tmp2)*10); + } + *pixel_mode |= NO_DECO; + return 0; + + /*int lifemod = ((cpart->tmp2>10?10:cpart->tmp2)*10); + *colr += lifemod; + *colg += lifemod; + *colb += lifemod; + if(decorations_enable && cpart->dcolour && cpart->dcolour&0xFF000000) + { + lifemod *= 2.5f; + if(lifemod < 40) + lifemod = 40; + *colr = (lifemod*((cpart->dcolour>>16)&0xFF) + (255-lifemod)**colr) >> 8; + *colg = (lifemod*((cpart->dcolour>>8)&0xFF) + (255-lifemod)**colg) >> 8; + *colb = (lifemod*((cpart->dcolour)&0xFF) + (255-lifemod)**colb) >> 8; + } + *pixel_mode |= NO_DECO; + return 0;*/ +} +int graphics_PCLN(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*10); + *colr += lifemod; + *colg += lifemod; + return 0; +} +int graphics_PBCN(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*10); + *colr += lifemod; + *colg += lifemod/2; + return 0; +} +int graphics_DLAY(GRAPHICS_FUNC_ARGS) +{ + int stage = (int)(((float)cpart->life/(cpart->temp-273.15))*100.0f); + *colr += stage; + *colg += stage; + *colb += stage; + return 0; +} +int graphics_HSWC(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*19); + *colr += lifemod; + return 0; +} +int graphics_PVOD(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*16); + *colr += lifemod; + return 0; +} +int graphics_STOR(GRAPHICS_FUNC_ARGS) +{ + if(cpart->tmp){ + *pixel_mode |= PMODE_GLOW; + *colr = 0x50; + *colg = 0xDF; + *colb = 0xDF; + } else { + *colr = 0x20; + *colg = 0xAF; + *colb = 0xAF; + } + return 0; +} +int graphics_PUMP(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*19); + *colb += lifemod; + return 0; +} +int graphics_GPMP(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*19); + *colg += lifemod; + *colb += lifemod; + return 0; +} +int graphics_HFLM(GRAPHICS_FUNC_ARGS) +{ + int caddress = restrict_flt(restrict_flt((float)((int)(cpart->life/2)), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = (unsigned char)hflm_data[caddress]; + *colg = (unsigned char)hflm_data[caddress+1]; + *colb = (unsigned char)hflm_data[caddress+2]; + + *firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + return 0; +} +int graphics_FIRW(GRAPHICS_FUNC_ARGS) +{ + if(cpart->tmp>=3) + { + int caddress = restrict_flt(restrict_flt((float)(cpart->tmp-4), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = (unsigned char)firw_data[caddress]; + *colg = (unsigned char)firw_data[caddress+1]; + *colb = (unsigned char)firw_data[caddress+2]; + + if (ren->decorations_enable && cpart->dcolour) + { + int a = (cpart->dcolour>>24)&0xFF; + *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; + *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; + *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; + } + + *firea = cpart->life*4; + if(*firea > 240) + *firea = 240; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + } + else if(cpart->tmp > 0) + { + *pixel_mode |= PMODE_GLOW; + } + return 0; +} +int graphics_GBMB(GRAPHICS_FUNC_ARGS) +{ + if (cpart->life <= 0) { + *pixel_mode |= PMODE_FLARE; + } + else + { + *pixel_mode |= PMODE_SPARK; + } + return 0; +} +int graphics_COAL(GRAPHICS_FUNC_ARGS) //Both COAL and Broken Coal +{ + *colr += (cpart->tmp2-295.15f)/3; + + if (*colr > 170) + *colr = 170; + if (*colr < *colg) + *colr = *colg; + + *colg = *colb = *colr; + + if((cpart->temp-295.15f) > 300.0f-200.0f) + { + float frequency = 3.1415/(2*300.0f-(300.0f-200.0f)); + int q = ((cpart->temp-295.15f)>300.0f)?300.0f-(300.0f-200.0f):(cpart->temp-295.15f)-(300.0f-200.0f); + + *colr += sin(frequency*q) * 226; + *colg += sin(frequency*q*4.55 +3.14) * 34; + *colb += sin(frequency*q*2.22 +3.14) * 64; + } + return 0; +} + diff --git a/elements/none.cpp b/elements/none.cpp new file mode 100644 index 0000000..50f301f --- /dev/null +++ b/elements/none.cpp @@ -0,0 +1,6 @@ +#include "element.h" + +int update_(UPDATE_FUNC_ARGS) { + + return 0; +} diff --git a/elements/nptct.cpp b/elements/nptct.cpp new file mode 100644 index 0000000..2d68a9b --- /dev/null +++ b/elements/nptct.cpp @@ -0,0 +1,7 @@ +#include "element.h" + +int update_NPTCT(UPDATE_FUNC_ARGS) { + if (parts[i].temp>295.0f) + parts[i].temp -= 2.5f; + return 0; +} diff --git a/elements/nwhl.cpp b/elements/nwhl.cpp new file mode 100644 index 0000000..f53b657 --- /dev/null +++ b/elements/nwhl.cpp @@ -0,0 +1,6 @@ +#include "element.h" + +int update_NWHL(UPDATE_FUNC_ARGS) { + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] -= 0.1f; + return 0; +} diff --git a/elements/pbcn.cpp b/elements/pbcn.cpp new file mode 100644 index 0000000..7e99397 --- /dev/null +++ b/elements/pbcn.cpp @@ -0,0 +1,83 @@ +#include "element.h" + +int update_PBCN(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (!parts[i].tmp2 && sim->pv[y/CELL][x/CELL]>4.0f) + parts[i].tmp2 = rand()%40+80; + if (parts[i].tmp2) + { + float advection = 0.1f; + parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; + parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; + parts[i].tmp2--; + if(!parts[i].tmp2){ + sim->kill_part(i); + return 1; + } + } + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_SPRK && + (r&0xFF)!=PT_NSCN && (r&0xFF)!=PT_PSCN && + (r&0xFF)!=PT_STKM && (r&0xFF)!=PT_STKM2 && + (r&0xFF)!=PT_PBCN && (r&0xFF)>8].ctype; + } + } + if (parts[i].life==10) + { + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x+rx, y+ry, parts[i].ctype); + if (r!=-1) { + parts[r].vx = rx*3; + parts[r].vy = ry*3; + } + } + } + } + else if (parts[i].ctype==PT_LIFE) {//create life a different way + for (rx=-1; rx<2; rx++) { + for (ry=-1; ry<2; ry++) { + sim->create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); + } + } + } else { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + } + return 0; +} diff --git a/elements/pcln.cpp b/elements/pcln.cpp new file mode 100644 index 0000000..cd1ed4f --- /dev/null +++ b/elements/pcln.cpp @@ -0,0 +1,73 @@ +#include "element.h" + +int update_PCLN(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN) + parts[i].life = 10; + else if (parts[r>>8].ctype==PT_NSCN) + parts[i].life = 9; + } + if ((r&0xFF)==PT_PCLN) + { + if (parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[i].life==0&&parts[r>>8].life==10) + parts[i].life = 10; + } + } + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_SPRK && + (r&0xFF)!=PT_NSCN && (r&0xFF)!=PT_PSCN && + (r&0xFF)!=PT_STKM && (r&0xFF)!=PT_STKM2 && + (r&0xFF)!=PT_PBCN && (r&0xFF)>8].ctype; + } + } + if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x+rx, y+ry, parts[i].ctype); + if (r!=-1) { + parts[r].vx = rx*3; + parts[r].vy = ry*3; + } + } + } + } + else if (parts[i].ctype==PT_LIFE) {//create life a different way + for (rx=-1; rx<2; rx++) { + for (ry=-1; ry<2; ry++) { + sim->create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); + } + } + } else { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + } + return 0; +} diff --git a/elements/phot.cpp b/elements/phot.cpp new file mode 100644 index 0000000..3ed6b5d --- /dev/null +++ b/elements/phot.cpp @@ -0,0 +1,84 @@ +#include "element.h" + +int update_PHOT(UPDATE_FUNC_ARGS) { + int r, rt, rx, ry; + float rr, rrr; + parts[i].pavg[0] = x; + parts[i].pavg[1] = y; + if (!parts[i].ctype) { + sim->kill_part(i); + return 1; + } + if (1>rand()%10) update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rx(rand()%2000)) + { + parts[i].vx *= 0.90; + parts[i].vy *= 0.90; + sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); + rrr = (rand()%360)*3.14159f/180.0f; + rr = (rand()%128+128)/127.0f; + parts[r>>8].vx = rr*cosf(rrr); + parts[r>>8].vy = rr*sinf(rrr); + sim->pv[y/CELL][x/CELL] -= 15.0f * CFDS; + } + if ((r&0xFF)==PT_ISZS && 5>(rand()%2000)) + { + parts[i].vx *= 0.90; + parts[i].vy *= 0.90; + sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); + rr = (rand()%228+128)/127.0f; + rrr = (rand()%360)*3.14159f/180.0f; + parts[r>>8].vx = rr*cosf(rrr); + parts[r>>8].vy = rr*sinf(rrr); + sim->pv[y/CELL][x/CELL] -= 15.0f * CFDS; + } + } + r = pmap[y][x]; + if((r&0xFF) == PT_QRTZ && r)// && parts[i].ctype==0x3FFFFFFF) + { + float a = (rand()%360)*3.14159f/180.0f; + parts[i].vx = 3.0f*cosf(a); + parts[i].vy = 3.0f*sinf(a); + if(parts[i].ctype == 0x3FFFFFFF) + parts[i].ctype = 0x1F<<(rand()%26); + parts[i].life++; //Delay death + } + //r = pmap[y][x]; + //rt = r&0xFF; + /*if (rt==PT_CLNE || rt==PT_PCLN || rt==PT_BCLN || rt==PT_PBCN) { + if (!parts[r>>8].ctype) + parts[r>>8].ctype = PT_PHOT; + }*/ + + return 0; +} + +int graphics_PHOT(GRAPHICS_FUNC_ARGS) +{ + int x = 0; + *colr = *colg = *colb = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + + *firea = 100; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode |= FIRE_ADD; + return 0; +} diff --git a/elements/pipe.cpp b/elements/pipe.cpp new file mode 100644 index 0000000..08432f5 --- /dev/null +++ b/elements/pipe.cpp @@ -0,0 +1,332 @@ +#include "element.h" + +signed char pos_1_rx[] = {-1,-1,-1, 0, 0, 1, 1, 1}; +signed char pos_1_ry[] = {-1, 0, 1,-1, 1,-1, 0, 1}; + +void pushParticle(Simulation * sim, int i, int count, int original) +{ + int rndstore, rnd, rx, ry, r, x, y, np, q, notctype=(((sim->parts[i].ctype)%3)+2); + if ((sim->parts[i].tmp&0xFF) == 0 || count >= 2)//don't push if there is nothing there, max speed of 2 per frame + return; + x = (int)(sim->parts[i].x+0.5f); + y = (int)(sim->parts[i].y+0.5f); + if( !(sim->parts[i].tmp&0x200) ) + { + //normal random push + rndstore = rand(); + // RAND_MAX is at least 32767 on all platforms i.e. pow(8,5)-1 + // so can go 5 cycles without regenerating rndstore + for (q=0; q<3; q++)//try to push twice + { + rnd = rndstore&7; + rndstore = rndstore>>3; + rx = pos_1_rx[rnd]; + ry = pos_1_ry[rnd]; + if (x+rx>=0 && y+ry>=0 && x+rxpmap[y+ry][x+rx]; + if (!r) + continue; + else if ((r&0xFF)==PT_PIPE && sim->parts[r>>8].ctype!=notctype && (sim->parts[r>>8].tmp&0xFF)==0) + { + sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); + sim->parts[r>>8].temp = sim->parts[i].temp; + sim->parts[r>>8].flags = sim->parts[i].flags; + sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; + sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; + if (r>>8 > original) + sim->parts[r>>8].tmp2 = 1;//skip particle push, normalizes speed + sim->parts[i].tmp &= ~0xFF; + count++; + pushParticle(sim, r>>8,count,original); + } + } + } + } + else //predefined 1 pixel thick pipe movement + { + int coords = 7 - ((sim->parts[i].tmp>>10)&7); + r = sim->pmap[y+ pos_1_ry[coords]][x+ pos_1_rx[coords]]; + if (!r) + { + } + else if ((r&0xFF)==PT_PIPE && sim->parts[r>>8].ctype!=notctype && (sim->parts[r>>8].tmp&0xFF)==0) + { + sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); + sim->parts[r>>8].temp = sim->parts[i].temp; + sim->parts[r>>8].flags = sim->parts[i].flags; + sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; + sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; + if (r>>8 > original) + sim->parts[r>>8].tmp2 = 1;//skip particle push, normalizes speed + sim->parts[i].tmp &= ~0xFF; + count++; + pushParticle(sim, r>>8,count,original); + } + + + } + return; +} + +int update_PIPE(UPDATE_FUNC_ARGS) { + int r, rx, ry, np; + int rnd, rndstore; + if (parts[i].ctype>=2 && parts[i].ctype<=4) + { + if (parts[i].life==3) + { + int lastneighbor = -1; + int neighborcount = 0; + int count = 0; + // make automatic pipe pattern + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==1) + { + parts[r>>8].ctype = (((parts[i].ctype)%3)+2);//reverse + parts[r>>8].life = 6; + if ( parts[i].tmp&0x100)//is a single pixel pipe + { + parts[r>>8].tmp |= 0x200;//will transfer to a single pixel pipe + parts[r>>8].tmp |= count<<10;//coords of where it came from + } + neighborcount ++; + lastneighbor = r>>8; + } + else if ((r&0xFF)==PT_PIPE&&parts[r>>8].ctype!=(((parts[i].ctype-1)%3)+2)) + { + neighborcount ++; + lastneighbor = r>>8; + } + count++; + } + if(neighborcount == 1) + parts[lastneighbor].tmp |= 0x100; + } + else + { + if (parts[i].tmp2 == 1)//skip particle push to prevent particle number being higher causeing speed up + { + parts[i].tmp2 = 0 ; + } + else + { + pushParticle(sim, i,0,i); + } + + if (nt)//there is something besides PIPE around current particle + { + rndstore = rand(); + rnd = rndstore&7; + rndstore = rndstore>>3; + rx = pos_1_rx[rnd]; + ry = pos_1_ry[rnd]; + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (surround_space && !r && (parts[i].tmp&0xFF)!=0) //creating at end + { + np = sim->create_part(-1,x+rx,y+ry,parts[i].tmp&0xFF); + if (np!=-1) + { + parts[np].temp = parts[i].temp;//pipe saves temp and life now + parts[np].life = parts[i].flags; + parts[np].tmp = parts[i].pavg[0]; + parts[np].ctype = parts[i].pavg[1]; + parts[i].tmp &= ~0xFF; + } + } + //try eating particle at entrance + else if ((parts[i].tmp&0xFF) == 0 && (sim->ptypes[r&0xFF].falldown!= 0 || sim->ptypes[r&0xFF].state == ST_GAS)) + { + if ((r&0xFF)==PT_SOAP) + sim->detach(r>>8); + parts[i].tmp = (parts[i].tmp&~0xFF) | parts[r>>8].type; + parts[i].temp = parts[r>>8].temp; + parts[i].flags = parts[r>>8].life; + parts[i].pavg[0] = parts[r>>8].tmp; + parts[i].pavg[1] = parts[r>>8].ctype; + sim->kill_part(r>>8); + } + else if ((parts[i].tmp&0xFF) == 0 && (r&0xFF)==PT_STOR && parts[r>>8].tmp && (sim->ptypes[parts[r>>8].tmp].falldown!= 0 || sim->ptypes[parts[r>>8].tmp].state == ST_GAS)) + { + parts[i].tmp = parts[r>>8].tmp; + parts[i].temp = parts[r>>8].temp; + parts[i].flags = parts[r>>8].flags; + parts[i].pavg[0] = parts[r>>8].pavg[0]; + parts[i].pavg[1] = parts[r>>8].pavg[1]; + parts[r>>8].tmp = 0; + parts[r>>8].life = 0; + } + } + } + } + } + else if (!parts[i].ctype && parts[i].life<=10) + { + if (parts[i].temp<272.15)//manual pipe colors + { + if (parts[i].temp>173.25&&parts[i].temp<273.15) + { + parts[i].ctype = 2; + parts[i].life = 0; + } + if (parts[i].temp>73.25&&parts[i].temp<=173.15) + { + parts[i].ctype = 3; + parts[i].life = 0; + } + if (parts[i].temp>=0&&parts[i].temp<=73.15) + { + parts[i].ctype = 4; + parts[i].life = 0; + } + } + else + { + // make a border + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + { + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_BRCK);//BRCK border, people didn't like DMND + } + } + if (parts[i].life<=1) + parts[i].ctype = 1; + } + } + else if (parts[i].ctype==1)//wait for empty space before starting to generate automatic pipe pattern + { + if (!parts[i].life) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=0 && y+ry>0 && x+rxtmp&0xFF)>0 && (cpart->tmp&0xFF)tmp&0xFF; + tpart.temp = cpart->temp; + tpart.life = cpart->flags; + tpart.tmp = cpart->pavg[0]; + tpart.ctype = cpart->pavg[1]; + t = tpart.type; + if (ren->graphicscache[t].isready) + { + *pixel_mode = ren->graphicscache[t].pixel_mode; + *colr = ren->graphicscache[t].colr; + *colg = ren->graphicscache[t].colg; + *colb = ren->graphicscache[t].colb; + *firea = ren->graphicscache[t].firea; + *firer = ren->graphicscache[t].firer; + *fireg = ren->graphicscache[t].fireg; + *fireb = ren->graphicscache[t].fireb; + } + else + { + *colr = PIXR(ren->sim->ptypes[t].pcolors); + *colg = PIXR(ren->sim->ptypes[t].pcolors); + *colb = PIXR(ren->sim->ptypes[t].pcolors); + if (ren->sim->ptypes[t].graphics_func) + { + (*(ren->sim->ptypes[t].graphics_func))(ren, &tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); + } + else + { + graphics_DEFAULT(ren, &tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); + } + } + //*colr = PIXR(ptypes[cpart->tmp&0xFF].pcolors); + //*colg = PIXG(ptypes[cpart->tmp&0xFF].pcolors); + //*colb = PIXB(ptypes[cpart->tmp&0xFF].pcolors); + } + else + { + if (cpart->ctype==2) + { + *colr = 50; + *colg = 1; + *colb = 1; + } + else if (cpart->ctype==3) + { + *colr = 1; + *colg = 50; + *colb = 1; + } + else if (cpart->ctype==4) + { + *colr = 1; + *colg = 1; + *colb = 50; + } + else if (cpart->temp<272.15&&cpart->ctype!=1) + { + if (cpart->temp>173.25&&cpart->temp<273.15) + { + *colr = 50; + *colg = 1; + *colb = 1; + } + if (cpart->temp>73.25&&cpart->temp<=173.15) + { + *colr = 1; + *colg = 50; + *colb = 1; + } + if (cpart->temp>=0&&cpart->temp<=73.15) + { + *colr = 1; + *colg = 1; + *colb = 50; + } + } + } + return 0; +} diff --git a/elements/plnt.cpp b/elements/plnt.cpp new file mode 100644 index 0000000..a44c8c2 --- /dev/null +++ b/elements/plnt.cpp @@ -0,0 +1,55 @@ +#include "element.h" + +int update_PLNT(UPDATE_FUNC_ARGS) { + int r, rx, ry, np; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) + { + np = sim->create_part(r>>8,x+rx,y+ry,PT_PLNT); + if (np<0) continue; + parts[np].life = 0; + } + else if ((r&0xFF)==PT_LAVA && 1>(rand()%250)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + else if (((r&0xFF)==PT_SMKE || (r&0xFF)==PT_CO2) && (1>rand()%250)) + { + sim->kill_part(r>>8); + parts[i].life = rand()%60 + 60; + } + else if ((r&0xFF)==PT_WOOD && (1>rand()%20) && abs(rx+ry)<=2 && sim->VINE_MODE) + { + int nnx = rand()%3 -1; + int nny = rand()%3 -1; + if (x+rx+nnx>=0 && y+ry+nny>0 && x+rx+nnxcreate_part(-1,x+rx+nnx,y+ry+nny,PT_VINE); + if (np<0) continue; + parts[np].temp = parts[i].temp; + } + } + } + if (parts[i].life==2) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_O2); + } + parts[i].life = 0; + } + return 0; +} diff --git a/elements/plsm.cpp b/elements/plsm.cpp new file mode 100644 index 0000000..c6f7c20 --- /dev/null +++ b/elements/plsm.cpp @@ -0,0 +1,20 @@ +#include "element.h" +#include "hmap.h" + +int graphics_PLSM(GRAPHICS_FUNC_ARGS) +{ + int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = (unsigned char)ren->plasma_data[caddress]; + *colg = (unsigned char)ren->plasma_data[caddress+1]; + *colb = (unsigned char)ren->plasma_data[caddress+2]; + + *firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_GLOW | PMODE_ADD; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + return 0; +} diff --git a/elements/plut.cpp b/elements/plut.cpp new file mode 100644 index 0000000..3e2820d --- /dev/null +++ b/elements/plut.cpp @@ -0,0 +1,9 @@ +#include "element.h" + +int update_PLUT(UPDATE_FUNC_ARGS) { + if (1>rand()%100 && ((int)(5.0f*sim->pv[y/CELL][x/CELL]))>(rand()%1000)) + { + sim->create_part(i, x, y, PT_NEUT); + } + return 0; +} diff --git a/elements/prti.cpp b/elements/prti.cpp new file mode 100644 index 0000000..df212d4 --- /dev/null +++ b/elements/prti.cpp @@ -0,0 +1,79 @@ +#include "element.h" +/*these are the count values of where the particle gets stored, depending on where it came from + 0 1 2 + 7 . 3 + 6 5 4 + PRTO does (count+4)%8, so that it will come out at the opposite place to where it came in + PRTO does +/-1 to the count, so it doesn't jam as easily +*/ +int portal_rx[8] = {-1, 0, 1, 1, 1, 0,-1,-1}; +int portal_ry[8] = {-1,-1,-1, 0, 1, 1, 1, 0}; + +int update_PRTI(UPDATE_FUNC_ARGS) { + int r, nnx, rx, ry, fe = 0; + int count =0; + parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); + if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; + else if (parts[i].tmp<0) parts[i].tmp = 0; + for (count=0; count<8; count++) + { + rx = portal_rx[count]; + ry = portal_ry[count]; + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].falldown== 0 && sim->ptypes[r&0xFF].state != ST_GAS && (r&0xFF)!=PT_SPRK)) + { + r = sim->photons[y+ry][x+rx]; + if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (sim->ptypes[r&0xFF].falldown== 0 && sim->ptypes[r&0xFF].state != ST_GAS && (r&0xFF)!=PT_SPRK)) + continue; + } + + if ((r&0xFF) == PT_SOAP) + sim->detach(r>>8); + + for ( nnx=0; nnx<80; nnx++) + if (!sim->portalp[parts[i].tmp][count][nnx].type) + { + sim->portalp[parts[i].tmp][count][nnx] = parts[r>>8]; + if ((r&0xFF)==PT_SPRK) + sim->part_change_type(r>>8,x+rx,y+ry,parts[r>>8].ctype); + else + sim->kill_part(r>>8); + fe = 1; + break; + } + } + } + + + if (fe) { + int orbd[4] = {0, 0, 0, 0}; //Orbital distances + int orbl[4] = {0, 0, 0, 0}; //Orbital locations + if (!parts[i].life) parts[i].life = rand(); + if (!parts[i].ctype) parts[i].ctype = rand(); + sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); + for (r = 0; r < 4; r++) { + if (orbd[r]>1) { + orbd[r] -= 12; + if (orbd[r]<1) { + orbd[r] = (rand()%128)+128; + orbl[r] = rand()%255; + } else { + orbl[r] += 2; + orbl[r] = orbl[r]%255; + } + } else { + orbd[r] = (rand()%128)+128; + orbl[r] = rand()%255; + } + } + sim->orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); + } else { + parts[i].life = 0; + parts[i].ctype = 0; + } + return 0; +} diff --git a/elements/prto.cpp b/elements/prto.cpp new file mode 100644 index 0000000..ee61abf --- /dev/null +++ b/elements/prto.cpp @@ -0,0 +1,88 @@ +#include "element.h" +/*these are the count values of where the particle gets stored, depending on where it came from + 0 1 2 + 7 . 3 + 6 5 4 + PRTO does (count+4)%8, so that it will come out at the opposite place to where it came in + PRTO does +/-1 to the count, so it doesn't jam as easily +*/ +int update_PRTO(UPDATE_FUNC_ARGS) { + int r, nnx, rx, ry, np, fe = 0; + int count = 0; + parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); + if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; + else if (parts[i].tmp<0) parts[i].tmp = 0; + for (count=0; count<8; count++) + { + rx = sim->portal_rx[count]; + ry = sim->portal_ry[count]; + if (x+rx>=0 && y+ry>0 && x+rxportalp[parts[i].tmp][randomness][nnx].type==PT_SPRK)// TODO: make it look better, spark creation + { + sim->create_part(-1,x+1,y,PT_SPRK); + sim->create_part(-1,x+1,y+1,PT_SPRK); + sim->create_part(-1,x+1,y-1,PT_SPRK); + sim->create_part(-1,x,y-1,PT_SPRK); + sim->create_part(-1,x,y+1,PT_SPRK); + sim->create_part(-1,x-1,y+1,PT_SPRK); + sim->create_part(-1,x-1,y,PT_SPRK); + sim->create_part(-1,x-1,y-1,PT_SPRK); + sim->portalp[parts[i].tmp][randomness][nnx] = sim->emptyparticle; + break; + } + else if (sim->portalp[parts[i].tmp][randomness][nnx].type) + { + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM) + sim->player.spwn = 0; + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM2) + sim->player2.spwn = 0; + np = sim->create_part(-1, x+rx, y+ry, sim->portalp[parts[i].tmp][randomness][nnx].type); + if (np<0) continue; + parts[np] = sim->portalp[parts[i].tmp][randomness][nnx]; + parts[np].x = x+rx; + parts[np].y = y+ry; + sim->portalp[parts[i].tmp][randomness][nnx] = sim->emptyparticle; + break; + } + } + } + } + } + if (fe) { + int orbd[4] = {0, 0, 0, 0}; //Orbital distances + int orbl[4] = {0, 0, 0, 0}; //Orbital locations + if (!parts[i].life) parts[i].life = rand(); + if (!parts[i].ctype) parts[i].life = rand(); + sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); + for (r = 0; r < 4; r++) { + if (orbd[r]<254) { + orbd[r] += 16; + if (orbd[r]>254) { + orbd[r] = 0; + orbl[r] = rand()%255; + } + //orbl[r] += 1; + //orbl[r] = orbl[r]%255; + } else { + orbd[r] = 0; + orbl[r] = rand()%255; + } + } + sim->orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); + } else { + parts[i].life = 0; + parts[i].ctype = 0; + } + return 0; +} diff --git a/elements/pump.cpp b/elements/pump.cpp new file mode 100644 index 0000000..8a7254e --- /dev/null +++ b/elements/pump.cpp @@ -0,0 +1,41 @@ +#include "element.h" + +int update_PUMP(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (parts[i].life==10) + { + if (parts[i].temp>=256.0+273.15) + parts[i].temp=256.0+273.15; + if (parts[i].temp<= -256.0+273.15) + parts[i].temp = -256.0+273.15; + + if (sim->pv[y/CELL][x/CELL]<(parts[i].temp-273.15)) + sim->pv[y/CELL][x/CELL] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL][x/CELL]); + if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp-273.15)) + sim->pv[y/CELL+1][x/CELL] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL+1][x/CELL]); + if (x+CELLpv[y/CELL][x/CELL+1] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL][x/CELL+1]); + if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL+1][x/CELL+1]); + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + return 0; +} diff --git a/elements/pvod.cpp b/elements/pvod.cpp new file mode 100644 index 0000000..e645d0a --- /dev/null +++ b/elements/pvod.cpp @@ -0,0 +1,30 @@ +#include "element.h" + +int update_PVOD(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN) + parts[i].life = 10; + else if (parts[r>>8].ctype==PT_NSCN) + parts[i].life = 9; + } + if ((r&0xFF)==PT_PVOD) + { + if (parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[i].life==0&&parts[r>>8].life==10) + parts[i].life = 10; + } + } + return 0; +} diff --git a/elements/pyro.cpp b/elements/pyro.cpp new file mode 100644 index 0000000..790e295 --- /dev/null +++ b/elements/pyro.cpp @@ -0,0 +1,129 @@ +#include "element.h" + +int update_PYRO(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, t = parts[i].type; + if (t==PT_PLSM&&parts[i].ctype == PT_NBLE&&parts[i].life <=1) + { + t = PT_NBLE; + sim->part_change_type(i,x,y,t); + parts[i].life = 0; + } + if(t==PT_FIRE && parts[i].life <=1) + { + if (parts[i].tmp==3){ + t = PT_DSTW; + sim->part_change_type(i,x,y,t); + parts[i].life = 0; + parts[i].ctype = PT_FIRE; + } + else if (parts[i].temp<625) + { + t = PT_SMKE; + sim->part_change_type(i,x,y,t); + parts[i].life = rand()%20+250; + } + } + if(t==PT_PLSM && parts[i].life <=1) + { + if (parts[i].tmp==3){ + t = PT_DSTW; + sim->part_change_type(i,x,y,t); + parts[i].life = 0; + parts[i].ctype = PT_FIRE; + } + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL] && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_STREAM) + continue; + rt = parts[r>>8].type; + if ((surround_space || sim->ptypes[rt].explosive) && + (t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL)) && + (t!=PT_PHOT || rt!=PT_INSL) && + (rt!=PT_SPNG || parts[r>>8].life==0) && + sim->ptypes[rt].flammable && (sim->ptypes[rt].flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000)) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); + parts[r>>8].temp = restrict_flt(sim->ptypes[PT_FIRE].heat + (sim->ptypes[rt].flammable/2), MIN_TEMP, MAX_TEMP); + parts[r>>8].life = rand()%80+180; + parts[r>>8].tmp = parts[r>>8].ctype = 0; + if (sim->ptypes[rt].explosive) + sim->pv[y/CELL][x/CELL] += 0.25f * CFDS; + } + } + if (sim->legacy_enable) update_legacy_PYRO(UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + +int update_legacy_PYRO(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, lpv, t = parts[i].type; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL] && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_STREAM) + continue; + rt = r&0xFF; + lpv = (int)sim->pv[(y+ry)/CELL][(x+rx)/CELL]; + if (lpv < 1) lpv = 1; + if (t!=PT_SPRK && sim->ptypes[rt].meltable && ((rt!=PT_RBDM && rt!=PT_LRBD) || t!=PT_SPRK) && ((t!=PT_FIRE&&t!=PT_PLSM) || (rt!=PT_METL && rt!=PT_IRON && rt!=PT_ETRD && rt!=PT_PSCN && rt!=PT_NSCN && rt!=PT_NTCT && rt!=PT_PTCT && rt!=PT_BMTL && rt!=PT_BRMT && rt!=PT_SALT && rt!=PT_INWR)) && + sim->ptypes[rt].meltable*lpv>(rand()%1000)) + { + if (t!=PT_LAVA || parts[i].life>0) + { + parts[r>>8].ctype = (rt==PT_BRMT)?PT_BMTL:parts[r>>8].type; + parts[r>>8].ctype = (parts[r>>8].ctype==PT_SAND)?PT_GLAS:parts[r>>8].ctype; + sim->part_change_type(r>>8,x+rx,y+ry,PT_LAVA); + parts[r>>8].life = rand()%120+240; + } + else + { + parts[i].life = 0; + t = parts[i].type = (parts[i].ctype)?parts[i].ctype:PT_STNE; + parts[i].ctype = PT_NONE;//rt; + sim->part_change_type(i,x,y,t); + return 1; + } + } + if (t!=PT_SPRK && (rt==PT_ICEI || rt==PT_SNOW)) + { + parts[r>>8].type = PT_WATR; + if (t==PT_FIRE) + { + sim->kill_part(i); + return 1; + } + if (t==PT_LAVA) + { + parts[i].life = 0; + t = parts[i].type = PT_STNE; + sim->part_change_type(i,x,y,t); + } + } + if (t!=PT_SPRK && (rt==PT_WATR || rt==PT_DSTW || rt==PT_SLTW)) + { + sim->kill_part(r>>8); + if (t==PT_FIRE) + { + sim->kill_part(i); + return 1; + } + if (t==PT_LAVA) + { + parts[i].life = 0; + t = parts[i].type = (parts[i].ctype)?parts[i].ctype:PT_STNE; + parts[i].ctype = PT_NONE; + sim->part_change_type(i,x,y,t); + } + } + } + return 0; +} diff --git a/elements/qrtz.cpp b/elements/qrtz.cpp new file mode 100644 index 0000000..7768765 --- /dev/null +++ b/elements/qrtz.cpp @@ -0,0 +1,94 @@ +#include "element.h" + +int update_QRTZ(UPDATE_FUNC_ARGS) { + int r, tmp, trade, rx, ry, np, t; + t = parts[i].type; + if (t == PT_QRTZ) + { + parts[i].pavg[0] = parts[i].pavg[1]; + parts[i].pavg[1] = sim->pv[y/CELL][x/CELL]; + if (parts[i].pavg[1]-parts[i].pavg[0] > 0.05*(parts[i].temp/3) || parts[i].pavg[1]-parts[i].pavg[0] < -0.05*(parts[i].temp/3)) + { + sim->part_change_type(i,x,y,PT_PQRT); + } + } + // absorb SLTW + if (parts[i].ctype!=-1) + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%2500)) + { + sim->kill_part(r>>8); + parts[i].ctype ++; + } + } + // grow if absorbed SLTW + if (parts[i].ctype>0) + { + for ( trade = 0; trade<5; trade ++) + { + rx = rand()%3-1; + ry = rand()%3-1; + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_QRTZ); + if (np>-1) + { + parts[np].tmp = parts[i].tmp; + parts[i].ctype--; + if (5>rand()%10) + { + parts[np].ctype=-1;//dead qrtz + } + else if (!parts[i].ctype && 1>rand()%15) + { + parts[i].ctype=-1; + } + + break; + } + } + } + } + } + // diffuse absorbed SLTW + if (parts[i].ctype>0) + { + for ( trade = 0; trade<9; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].ctype) && parts[r>>8].ctype>=0 )//diffusion + { + tmp = parts[i].ctype - parts[r>>8].ctype; + if (tmp ==1) + { + parts[r>>8].ctype ++; + parts[i].ctype --; + break; + } + if (tmp>0) + { + parts[r>>8].ctype += tmp/2; + parts[i].ctype -= tmp/2; + break; + } + } + } + } + } + return 0; +} diff --git a/elements/rime.cpp b/elements/rime.cpp new file mode 100644 index 0000000..617414b --- /dev/null +++ b/elements/rime.cpp @@ -0,0 +1,26 @@ +#include "element.h" + +int update_RIME(UPDATE_FUNC_ARGS) { + int r, rx, ry; + parts[i].vx = 0; + parts[i].vy = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxpart_change_type(i,x,y,PT_FOG); + parts[i].life = rand()%50 + 60; + } + else if ((r&0xFF)==PT_FOG&&parts[r>>8].life>0) + { + sim->part_change_type(i,x,y,PT_FOG); + parts[i].life = parts[r>>8].life; + } + } + return 0; +} diff --git a/elements/shld.cpp b/elements/shld.cpp new file mode 100644 index 0000000..cbe8306 --- /dev/null +++ b/elements/shld.cpp @@ -0,0 +1,162 @@ +#include "element.h" + +int update_SHLD1(UPDATE_FUNC_ARGS) { + int r, nnx, nny, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%200&&parts[i].life==0) + { + sim->part_change_type(i,x,y,PT_SHLD2); + parts[i].life = 7; + } + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + if (!pmap[y+ry+nny][x+rx+nnx]) + { + sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + //parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; + } + } + } + else if ((r&0xFF)==PT_SHLD3&&4>rand()%10) + { + sim->part_change_type(i,x,y,PT_SHLD2); + parts[i].life = 7; + } + } + return 0; +} + +int update_SHLD2(UPDATE_FUNC_ARGS) { + int r, nnx, nny, rx, ry, np; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx0) + sim->create_part(-1,x+rx,y+ry,PT_SHLD1); + if (!r) + continue; + else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) + { + if (25>rand()%200&&parts[i].life==0) + { + sim->part_change_type(i,x,y,PT_SHLD3); + parts[i].life = 7; + } + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + if (!pmap[y+ry+nny][x+rx+nnx]) + { + np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + } + } + } + else if ((r&0xFF)==PT_SHLD4&&4>rand()%10) + { + sim->part_change_type(i,x,y,PT_SHLD3); + parts[i].life = 7; + } + } + return 0; +} + +int update_SHLD3(UPDATE_FUNC_ARGS) { + int r, nnx, nny, rx, ry, np; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%2500) + { + np = sim->create_part(-1,x+rx,y+ry,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + sim->part_change_type(i,x,y,PT_SHLD2); + } + else + continue; + + } + if ((r&0xFF)==PT_SHLD1 && parts[i].life>3) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_SHLD2); + parts[r>>8].life=7; + } + else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) + { + if (18>rand()%3000&&parts[i].life==0) + { + sim->part_change_type(i,x,y,PT_SHLD4); + parts[i].life = 7; + } + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + + if (!pmap[y+ry+nny][x+rx+nnx]) + { + np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + } + } + } + } + return 0; +} + +int update_SHLD4(UPDATE_FUNC_ARGS) { + int r, nnx, nny, rx, ry, np; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%5500) + { + np = sim->create_part(-1,x+rx,y+ry,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + sim->part_change_type(i,x,y,PT_SHLD2); + } + else + continue; + + } + if ((r&0xFF)==PT_SHLD2 && parts[i].life>3) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_SHLD3); + parts[r>>8].life = 7; + } + else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + if (!pmap[y+ry+nny][x+rx+nnx]) + { + np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + } + } + } + return 0; +} diff --git a/elements/sing.cpp b/elements/sing.cpp new file mode 100644 index 0000000..fa6121c --- /dev/null +++ b/elements/sing.cpp @@ -0,0 +1,104 @@ +#include "element.h" + +int update_SING(UPDATE_FUNC_ARGS) { + int r, rx, ry, cry, crx, rad, nxi, nxj, nb, j, spawncount; + int singularity = -parts[i].life; + float angle, v; + + if (sim->pv[y/CELL][x/CELL]pv[y/CELL][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL]); + if (y+CELLpv[y/CELL+1][x/CELL]pv[y/CELL+1][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL+1][x/CELL]); + if (x+CELLpv[y/CELL][x/CELL+1] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL+1]); + if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.1f*(singularity-sim->pv[y/CELL+1][x/CELL+1]); + } + if (y+CELL>0 && sim->pv[y/CELL-1][x/CELL]pv[y/CELL-1][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL-1][x/CELL]); + if (x+CELL>0) + { + sim->pv[y/CELL][x/CELL-1] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL-1]); + if (y+CELL>0) + sim->pv[y/CELL-1][x/CELL-1] += 0.1f*(singularity-sim->pv[y/CELL-1][x/CELL-1]); + } + if (parts[i].life<1) { + //Pop! + for (rx=-2; rx<3; rx++) { + crx = (x/CELL)+rx; + for (ry=-2; ry<3; ry++) { + cry = (y/CELL)+ry; + if (cry > 0 && crx > 0 && crx < (XRES/CELL) && cry < (YRES/CELL)) { + sim->pv[cry][crx] += (float)parts[i].tmp; + } + } + } + spawncount = (parts[i].tmp>255)?255:parts[i].tmp; + if (spawncount>=1) + spawncount = spawncount/8; + spawncount = spawncount*spawncount*M_PI; + for (j=0;jcreate_part(-3, x, y, PT_PHOT); + break; + case 1: + nb = sim->create_part(-3, x, y, PT_NEUT); + break; + case 2: + nb = sim->create_part(-3, x, y, PT_ELEC); + break; + } + if (nb!=-1) { + parts[nb].life = (rand()%300); + parts[nb].temp = MAX_TEMP/2; + angle = rand()*2.0f*M_PI/RAND_MAX; + v = (float)(rand())*5.0f/RAND_MAX; + parts[nb].vx = v*cosf(angle); + parts[nb].vy = v*sinf(angle); + } + else if (sim->pfree==-1) + break;//if we've run out of particles, stop trying to create them - saves a lot of lag on "sing bomb" saves + } + sim->kill_part(i); + return 1; + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=rand()/(RAND_MAX/100)+1) + { + if ((r&0xFF)==PT_SING && parts[r>>8].life >10) + { + if (parts[i].life+parts[r>>8].life > 255) + continue; + parts[i].life += parts[r>>8].life; + } + else + { + if (parts[i].life+3 > 255) + { + if (parts[r>>8].type!=PT_SING && 1>rand()%100) + { + int np; + np = sim->create_part(r>>8,x+rx,y+ry,PT_SING); + parts[np].life = rand()%50+60; + } + continue; + } + parts[i].life += 3; + parts[i].tmp++; + } + parts[i].temp = restrict_flt(parts[r>>8].temp+parts[i].temp, MIN_TEMP, MAX_TEMP); + sim->kill_part(r>>8); + } + } + return 0; +} diff --git a/elements/sltw.cpp b/elements/sltw.cpp new file mode 100644 index 0000000..c965fd4 --- /dev/null +++ b/elements/sltw.cpp @@ -0,0 +1,30 @@ +#include "element.h" + +int update_SLTW(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%10000)) + sim->kill_part(r>>8); + if ((r&0xFF)==PT_PLNT&&5>(rand()%1000)) + sim->kill_part(r>>8); + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && !sim->legacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + } + return 0; +} diff --git a/elements/smke.cpp b/elements/smke.cpp new file mode 100644 index 0000000..d19bd0a --- /dev/null +++ b/elements/smke.cpp @@ -0,0 +1,18 @@ +#include "element.h" + +int graphics_SMKE(GRAPHICS_FUNC_ARGS) +{ + *colr = 55; + *colg = 55; + *colb = 55; + + *firea = 75; + *firer = 55; + *fireg = 55; + *fireb = 55; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_BLEND; + //Returning 1 means static, cache as we please + return 1; +} \ No newline at end of file diff --git a/elements/soap.cpp b/elements/soap.cpp new file mode 100644 index 0000000..0d31292 --- /dev/null +++ b/elements/soap.cpp @@ -0,0 +1,234 @@ +#include "element.h" + +int update_SOAP(UPDATE_FUNC_ARGS) +{ + int r, rx, ry, nr, ng, nb, na; + float tr, tg, tb, ta; + float blend; + + //0x01 - bubble on/off + //0x02 - first mate yes/no + //0x04 - "back" mate yes/no + + if ((parts[i].ctype&1) == 1) + { + if (parts[i].temp>0) + { + if (parts[i].life<=0) + { + if ((parts[i].ctype&6) != 6 && parts[i].ctype>1) + { + int target; + + target = i; + + while((parts[target].ctype&6) != 6 && parts[target].ctype>1) + { + if ((parts[target].ctype&2) == 2) + { + target = parts[target].tmp; + sim->detach(target); + } + + if ((parts[target].ctype&4) == 4) + { + target = parts[target].tmp2; + sim->detach(target); + } + } + } + + if ((parts[i].ctype&6) != 6) + parts[i].ctype = 0; + + if ((parts[i].ctype&6) == 6 && (parts[parts[i].tmp].ctype&6) == 6 && parts[parts[i].tmp].tmp == i) + sim->detach(i); + } + + parts[i].vy -= 0.1f; + + parts[i].vy *= 0.5f; + parts[i].vx *= 0.5f; + } + + if((parts[i].ctype&2) != 2) + { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type == PT_SOAP) && ((parts[r>>8].ctype&1) == 1) + && ((parts[r>>8].ctype&4) != 4)) + { + if ((parts[r>>8].ctype&2) == 2) + { + parts[i].tmp = r>>8; + parts[r>>8].tmp2 = i; + + parts[i].ctype |= 2; + parts[r>>8].ctype |= 4; + } + else + { + if ((parts[i].ctype&2) != 2) + { + parts[i].tmp = r>>8; + parts[r>>8].tmp2 = i; + + parts[i].ctype |= 2; + parts[r>>8].ctype |= 4; + } + } + } + } + } + else + { + if (parts[i].life<=0) + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL]) + continue; + + if (parts[i].temp>0) + { + if (sim->bmap[(y+ry)/CELL][(x+rx)/CELL] + || (r && sim->ptypes[r&0xFF].state != ST_GAS + && (r&0xFF) != PT_SOAP && (r&0xFF) != PT_GLAS) + || (parts[r>>8].ctype == 0 && (r&0xFF) == PT_SOAP + && (abs(parts[r>>8].vx)<2 || abs(parts[r>>8].vy)<2))) + { + sim->detach(i); + continue; + } + } + + if ((r&0xFF) == PT_SOAP && parts[r>>8].ctype == 1) + { + int buf; + + buf = parts[i].tmp; + + parts[i].tmp = r>>8; + parts[buf].tmp2 = r>>8; + parts[r>>8].tmp2 = i; + parts[r>>8].tmp = buf; + parts[r>>8].ctype = 7; + } + + if ((r&0xFF) == PT_SOAP && parts[r>>8].ctype == 7 && parts[i].tmp != r>>8 && parts[i].tmp2 != r>>8) + { + int buf; + + parts[parts[i].tmp].tmp2 = parts[r>>8].tmp2; + parts[parts[r>>8].tmp2].tmp = parts[i].tmp; + parts[r>>8].tmp2 = i; + parts[i].tmp = r>>8; + } + } + } + + if((parts[i].ctype&2) == 2) + { + float d, dx, dy; + + dx = parts[i].x - parts[parts[i].tmp].x; + dy = parts[i].y - parts[parts[i].tmp].y; + + d = 9/(pow(dx, 2)+pow(dy, 2)+9)-0.5; + + parts[parts[i].tmp].vx -= dx*d; + parts[parts[i].tmp].vy -= dy*d; + + parts[i].vx += dx*d; + parts[i].vy += dy*d; + + if (((parts[parts[i].tmp].ctype&2) == 2) && ((parts[parts[i].tmp].ctype&1) == 1) + && ((parts[parts[parts[i].tmp].tmp].ctype&2) == 2) && ((parts[parts[parts[i].tmp].tmp].ctype&1) == 1)) + { + int ii; + + ii = parts[parts[parts[i].tmp].tmp].tmp; + + dx = parts[ii].x - parts[parts[i].tmp].x; + dy = parts[ii].y - parts[parts[i].tmp].y; + + d = 81/(pow(dx, 2)+pow(dy, 2)+81)-0.5; + + parts[parts[i].tmp].vx -= dx*d*0.5f; + parts[parts[i].tmp].vy -= dy*d*0.5f; + + parts[ii].vx += dx*d*0.5f; + parts[ii].vy += dy*d*0.5f; + } + } + } + else + { + if (sim->pv[y/CELL][x/CELL]>0.5f || sim->pv[y/CELL][x/CELL]<(-0.5f)) + { + parts[i].ctype = 1; + parts[i].life = 10; + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].vx)/2; + ay = (parts[i].vy + parts[r>>8].vy)/2; + + parts[i].vx = ax; + parts[i].vy = ay; + parts[r>>8].vx = ax; + parts[r>>8].vy = ay; + } + } + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; + tg = (parts[r>>8].dcolour>>8)&0xFF; + tb = (parts[r>>8].dcolour)&0xFF; + ta = (parts[r>>8].dcolour>>24)&0xFF; + + nr = (tr*blend); + ng = (tg*blend); + nb = (tb*blend); + na = (ta*blend); + + parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; + } + } + + return 0; +} diff --git a/elements/spng.cpp b/elements/spng.cpp new file mode 100644 index 0000000..28b3e1b --- /dev/null +++ b/elements/spng.cpp @@ -0,0 +1,110 @@ +#include "element.h" + +int update_SPNG(UPDATE_FUNC_ARGS) { + int r, trade, rx, ry, tmp, np; + if (sim->pv[y/CELL][x/CELL]<=3 && sim->pv[y/CELL][x/CELL]>=-3&&parts[i].temp<=374.0f) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=rand()/(RAND_MAX/100)+1) + { + parts[i].life++; + sim->kill_part(r>>8); + } + } + } + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create water + { + np = sim->create_part(-1,x+rx,y+ry,PT_WATR); + if (np>-1) parts[i].life--; + } + } + for ( trade = 0; trade<9; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].life)&&parts[i].life>0)//diffusion + { + tmp = parts[i].life - parts[r>>8].life; + if (tmp ==1) + { + parts[r>>8].life ++; + parts[i].life --; + trade = 9; + } + else if (tmp>0) + { + parts[r>>8].life += tmp/2; + parts[i].life -= tmp/2; + trade = 9; + } + } + } + } + tmp = 0; + if (parts[i].life>0) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life>60) + parts[r>>8].life -= parts[r>>8].life/60; + else if (parts[r>>8].life>2) + parts[r>>8].life--; + } + } + } + if (tmp && parts[i].life>3) + parts[i].life -= parts[i].life/3; + if (tmp>1) + tmp = tmp/2; + if (tmp || parts[i].temp>=374) + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create steam + { + np = sim->create_part(-1,x+rx,y+ry,PT_WTRV); + if (np>-1) + { + parts[np].temp = parts[i].temp; + tmp--; + parts[i].life--; + parts[i].temp -= 20.0f; + } + } + } + if (tmp>0) + { + if (parts[i].life>tmp) + parts[i].life -= tmp; + else + parts[i].life = 0; + } + return 0; +} diff --git a/elements/sprk.cpp b/elements/sprk.cpp new file mode 100644 index 0000000..244e831 --- /dev/null +++ b/elements/sprk.cpp @@ -0,0 +1,230 @@ +#include "element.h" + +int update_SPRK(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, conduct_sprk, nearp, pavg, ct = parts[i].ctype; + update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); + + if (parts[i].life<=0) + { + if (ct==PT_WATR||ct==PT_SLTW||ct==PT_PSCN||ct==PT_NSCN||ct==PT_ETRD||ct==PT_INWR) + parts[i].temp = R_TEMP + 273.15f; + if (ct<=0 || ct>=PT_NUM) + ct = PT_METL; + sim->part_change_type(i,x,y,ct); + parts[i].ctype = PT_NONE; + parts[i].life = 4; + if (ct == PT_WATR) + parts[i].life = 64; + if (ct == PT_SLTW) + parts[i].life = 54; + if (ct == PT_SWCH) + parts[i].life = 14; + return 0; + } + if (ct==PT_SPRK) + { + sim->kill_part(i); + return 1; + } + else if (ct==PT_NTCT || ct==PT_PTCT) + { + update_NPTCT(UPDATE_FUNC_SUBCALL_ARGS); + } + else if (ct==PT_ETRD&&parts[i].life==1) + { + nearp = sim->nearest_part(i, PT_ETRD, -1); + if (nearp!=-1 && sim->parts_avg(i, nearp, PT_INSL)!=PT_INSL) + { + sim->create_line(x, y, (int)(parts[nearp].x+0.5f), (int)(parts[nearp].y+0.5f), 0, 0, PT_PLSM, 0); + sim->part_change_type(i,x,y,ct); + ct = parts[i].ctype = PT_NONE; + parts[i].life = 20; + sim->part_change_type(nearp,(int)(parts[nearp].x+0.5f),(int)(parts[nearp].y+0.5f),PT_SPRK); + parts[nearp].life = 9; + parts[nearp].ctype = PT_ETRD; + } + } + else if (ct==PT_NBLE&&parts[i].life<=1) + { + parts[i].life = rand()%150+50; + sim->part_change_type(i,x,y,PT_PLSM); + parts[i].ctype = PT_NBLE; + parts[i].temp = 3500; + sim->pv[y/CELL][x/CELL] += 1; + } + else if (ct==PT_TESC) // tesla coil code + { + if (parts[i].tmp>300) + parts[i].tmp=300; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+rx*2, y+ry*2, PT_LIGH); + if (p!=-1) + { + if(parts[i].tmp<=4) //Prevent Arithmetic errors with zero values + continue; + parts[p].life=rand()%(2+parts[i].tmp/15)+parts[i].tmp/7; + if (parts[i].life>60) + parts[i].life=60; + parts[p].temp=parts[p].life*parts[i].tmp/2.5; + parts[p].tmp2=1; + parts[p].tmp=acos(1.0*rx/sqrt(rx*rx+ry*ry))/M_PI*360; + parts[i].temp-=parts[i].tmp*2+parts[i].temp/5; // slight self-cooling + if (fabs(sim->pv[y/CELL][x/CELL])!=0.0f) + { + if (fabs(sim->pv[y/CELL][x/CELL])<=0.5f) + sim->pv[y/CELL][x/CELL]=0; + else + sim->pv[y/CELL][x/CELL]-=(sim->pv[y/CELL][x/CELL]>0)?0.5:-0.5; + } + } + } + } + } + else if (ct==PT_IRON) { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()/(RAND_MAX/1000))) || + ((r&0xFF) == PT_SLTW && 30>(rand()/(RAND_MAX/1000))) || + ((r&0xFF) == PT_WATR && 30>(rand()/(RAND_MAX/1000)))) + { + if (rand()part_change_type(r>>8,x+rx,y+ry,PT_O2); + else + sim->part_change_type(r>>8,x+rx,y+ry,PT_H2); + } + } + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + conduct_sprk = 1; + + + pavg = sim->parts_avg(r>>8, i,PT_INSL); + if ((rt==PT_SWCH||(rt==PT_SPRK&&parts[r>>8].ctype==PT_SWCH)) && pavg!=PT_INSL) // make sparked SWCH turn off correctly + { + if (rt==PT_SWCH&&ct==PT_PSCN&&parts[r>>8].life<10) { + parts[r>>8].life = 10; + } + if (ct==PT_NSCN) { + sim->part_change_type(r>>8,x+rx,y+ry,PT_SWCH); + parts[r>>8].ctype = PT_NONE; + parts[r>>8].life = 9; + } + } + else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_PUMP||rt==PT_GPMP||rt==PT_HSWC||rt==PT_PBCN)) // PROP_PTOGGLE, Maybe? We seem to use 2 different methods for handling actived elements, this one seems better. Yes, use this one for new elements, PCLN is different for compatibility with existing saves + { + if (ct==PT_PSCN) parts[r>>8].life = 10; + else if (ct==PT_NSCN && parts[r>>8].life>=10) parts[r>>8].life = 9; + } + else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_LCRY&&abs(rx)<2&&abs(ry)<2)) + { + if (ct==PT_PSCN && parts[r>>8].tmp == 0) parts[r>>8].tmp = 2; + else if (ct==PT_NSCN && parts[r>>8].tmp == 3) parts[r>>8].tmp = 1; + } + + + // ct = spark from material, rt = spark to material. Make conduct_sprk = 0 if conduction not allowed + + if (pavg == PT_INSL) conduct_sprk = 0; + if (!((sim->ptypes[rt].properties&PROP_CONDUCTS)||rt==PT_INST||rt==PT_QRTZ)) conduct_sprk = 0; + if (abs(rx)+abs(ry)>=4 &&ct!=PT_SWCH&&rt!=PT_SWCH) + conduct_sprk = 0; + + + if (ct==PT_METL && (rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR||(rt==PT_SPRK&&(parts[r>>8].ctype==PT_NTCT||parts[r>>8].ctype==PT_PTCT))) && pavg!=PT_INSL) + { + parts[r>>8].temp = 473.0f; + if (rt==PT_NTCT||rt==PT_PTCT) + conduct_sprk = 0; + } + if (ct==PT_NTCT && !(rt==PT_PSCN || rt==PT_NTCT || (rt==PT_NSCN&&parts[i].temp>373.0f))) + conduct_sprk = 0; + if (ct==PT_PTCT && !(rt==PT_PSCN || rt==PT_PTCT || (rt==PT_NSCN&&parts[i].temp<373.0f))) + conduct_sprk = 0; + if (ct==PT_INWR && !(rt==PT_NSCN || rt==PT_INWR || rt==PT_PSCN)) + conduct_sprk = 0; + if (ct==PT_NSCN && rt==PT_PSCN) + conduct_sprk = 0; + if (ct==PT_ETRD && !(rt==PT_METL||rt==PT_ETRD||rt==PT_BMTL||rt==PT_BRMT||rt==PT_LRBD||rt==PT_RBDM||rt==PT_PSCN||rt==PT_NSCN)) + conduct_sprk = 0; + if (ct==PT_INST&&rt!=PT_NSCN) conduct_sprk = 0; + if (ct==PT_SWCH && (rt==PT_PSCN||rt==PT_NSCN||rt==PT_WATR||rt==PT_SLTW||rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR)) + conduct_sprk = 0; + if (rt==PT_QRTZ && !((ct==PT_NSCN||ct==PT_METL||ct==PT_PSCN||ct==PT_QRTZ) && (parts[r>>8].temp<173.15||sim->pv[(y+ry)/CELL][(x+rx)/CELL]>8))) + conduct_sprk = 0; + if (rt==PT_NTCT && !(ct==PT_NSCN || ct==PT_NTCT || (ct==PT_PSCN&&parts[r>>8].temp>373.0f))) + conduct_sprk = 0; + if (rt==PT_PTCT && !(ct==PT_NSCN || ct==PT_PTCT || (ct==PT_PSCN&&parts[r>>8].temp<373.0f))) + conduct_sprk = 0; + if (rt==PT_INWR && !(ct==PT_NSCN || ct==PT_INWR || ct==PT_PSCN)) + conduct_sprk = 0; + if (rt==PT_INST&&ct!=PT_PSCN) + conduct_sprk = 0; + + if (conduct_sprk) { + if (rt==PT_WATR||rt==PT_SLTW) { + if (parts[r>>8].life==0 && (parts[i].life<2 || ((r>>8)part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + if (rt==PT_WATR) parts[r>>8].life = 6; + else parts[r>>8].life = 5; + parts[r>>8].ctype = rt; + } + } + else if (rt==PT_INST) { + if (parts[i].life>=3&&parts[r>>8].life==0) + { + sim->flood_parts(x+rx,y+ry,PT_SPRK,PT_INST,-1, 0);//spark the wire + } + } + else if (parts[r>>8].life==0 && (parts[i].life<3 || ((r>>8)>8].life = 4; + parts[r>>8].ctype = rt; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + if (parts[r>>8].temp+10.0f<673.0f&&!sim->legacy_enable&&(rt==PT_METL||rt==PT_BMTL||rt==PT_BRMT||rt==PT_PSCN||rt==PT_NSCN||rt==PT_ETRD||rt==PT_NBLE||rt==PT_IRON)) + parts[r>>8].temp = parts[r>>8].temp+10.0f; + } + else if (ct==PT_ETRD && parts[i].life==5) + { + sim->part_change_type(i,x,y,ct); + parts[i].ctype = PT_NONE; + parts[i].life = 20; + parts[r>>8].life = 4; + parts[r>>8].ctype = rt; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + } + } + } + return 0; +} + +int graphics_SPRK(GRAPHICS_FUNC_ARGS) +{ + *firea = 80; + + *firer = *colr = 170; + *fireg = *colg = 200; + *fireb = *colb = 220; + //*pixel_mode |= FIRE_ADD; + *pixel_mode |= FIRE_ADD; + return 1; +} diff --git a/elements/stkm.cpp b/elements/stkm.cpp new file mode 100644 index 0000000..322eba1 --- /dev/null +++ b/elements/stkm.cpp @@ -0,0 +1,488 @@ +#include "element.h" + +int update_SPAWN(UPDATE_FUNC_ARGS) { + if (!sim->player.spwn) + sim->create_part(-1, x, y, PT_STKM); + + return 0; +} + +int update_STKM(UPDATE_FUNC_ARGS) +{ + run_stickman(&sim->player, UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + +int graphics_STKM(GRAPHICS_FUNC_ARGS) +{ + /**pixel_mode = PSPEC_STICKMAN; + if ((int)sim->player.elemplayer.elem].pcolors); + *colg = PIXG(ptypes[sim->player.elem].pcolors); + *colb = PIXB(ptypes[sim->player.elem].pcolors); + } + else*/ + { + *colr = *colg = *colb = 255; + } + return 1; +} + +int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { + int r, rx, ry; + float pp, d; + float dt = 0.9;///(FPSB*FPSB); //Delta time in square + float gvx, gvy; + float gx, gy, dl, dr; + + if ((parts[i].ctype>0 && parts[i].ctypeptypes[parts[i].ctype].falldown>0) || parts[i].ctype==SPC_AIR || parts[i].ctype == PT_NEUT || parts[i].ctype == PT_PHOT || parts[i].ctype == PT_LIGH) + playerp->elem = parts[i].ctype; + playerp->frames++; + + //Tempirature handling + if (parts[i].temp<243) + parts[i].life -= 1; + if ((parts[i].temp<309.6f) && (parts[i].temp>=243)) + parts[i].temp += 1; + + //Death + if (parts[i].life<1 || (sim->pv[y/CELL][x/CELL]>=4.5f && playerp->elem != SPC_AIR) ) //If his HP is less that 0 or there is very big wind... + { + for (r=-2; r<=1; r++) + { + sim->create_part(-1, x+r, y-2, playerp->elem); + sim->create_part(-1, x+r+1, y+2, playerp->elem); + sim->create_part(-1, x-2, y+r+1, playerp->elem); + sim->create_part(-1, x+2, y+r, playerp->elem); + } + sim->kill_part(i); //Kill him + return 1; + } + + //Follow gravity + gvx = gvy = 0.0f; + switch (sim->gravityMode) + { + default: + case 0: + gvy = 1; + break; + case 1: + gvy = gvx = 0.0f; + break; + case 2: + { + float gravd; + gravd = 0.01f - hypotf((parts[i].x - XCNTR), (parts[i].y - YCNTR)); + gvx = ((float)(parts[i].x - XCNTR) / gravd); + gvy = ((float)(parts[i].y - YCNTR) / gravd); + } + } + + gvx += sim->gravx[((int)parts[i].y/CELL)*(XRES/CELL)+((int)parts[i].x/CELL)]; + gvy += sim->gravy[((int)parts[i].y/CELL)*(XRES/CELL)+((int)parts[i].x/CELL)]; + + parts[i].vx -= gvx*dt; //Head up! + parts[i].vy -= gvy*dt; + + //Verlet integration + pp = 2*playerp->legs[0]-playerp->legs[2]+playerp->accs[0]*dt*dt; + playerp->legs[2] = playerp->legs[0]; + playerp->legs[0] = pp; + pp = 2*playerp->legs[1]-playerp->legs[3]+playerp->accs[1]*dt*dt; + playerp->legs[3] = playerp->legs[1]; + playerp->legs[1] = pp; + + pp = 2*playerp->legs[4]-playerp->legs[6]+(playerp->accs[2]+gvx)*dt*dt; + playerp->legs[6] = playerp->legs[4]; + playerp->legs[4] = pp; + pp = 2*playerp->legs[5]-playerp->legs[7]+(playerp->accs[3]+gvy)*dt*dt; + playerp->legs[7] = playerp->legs[5]; + playerp->legs[5] = pp; + + pp = 2*playerp->legs[8]-playerp->legs[10]+playerp->accs[4]*dt*dt; + playerp->legs[10] = playerp->legs[8]; + playerp->legs[8] = pp; + pp = 2*playerp->legs[9]-playerp->legs[11]+playerp->accs[5]*dt*dt; + playerp->legs[11] = playerp->legs[9]; + playerp->legs[9] = pp; + + pp = 2*playerp->legs[12]-playerp->legs[14]+(playerp->accs[6]+gvx)*dt*dt; + playerp->legs[14] = playerp->legs[12]; + playerp->legs[12] = pp; + pp = 2*playerp->legs[13]-playerp->legs[15]+(playerp->accs[7]+gvy)*dt*dt; + playerp->legs[15] = playerp->legs[13]; + playerp->legs[13] = pp; + + //Setting accseleration to 0 + playerp->accs[0] = 0; + playerp->accs[1] = 0; + + playerp->accs[2] = 0; + playerp->accs[3] = 0; + + playerp->accs[4] = 0; + playerp->accs[5] = 0; + + playerp->accs[6] = 0; + playerp->accs[7] = 0; + + gx = (playerp->legs[4] + playerp->legs[12])/2 - gvy; + gy = (playerp->legs[5] + playerp->legs[13])/2 + gvx; + dl = pow(gx - playerp->legs[4], 2) + pow(gy - playerp->legs[5], 2); + dr = pow(gx - playerp->legs[12], 2) + pow(gy - playerp->legs[13], 2); + + //Go left + if (((int)(playerp->comm)&0x01) == 0x01) + { + if (dl>dr) + { + if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + playerp->accs[2] = -3*gvy-3*gvx; + playerp->accs[3] = 3*gvx-3*gvy; + playerp->accs[0] = -gvy; + playerp->accs[1] = gvx; + } + } + else + { + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + playerp->accs[6] = -3*gvy-3*gvx; + playerp->accs[7] = 3*gvx-3*gvy; + playerp->accs[0] = -gvy; + playerp->accs[1] = gvx; + } + } + } + + //Go right + if (((int)(playerp->comm)&0x02) == 0x02) + { + if (dleval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + playerp->accs[2] = 3*gvy-3*gvx; + playerp->accs[3] = -3*gvx-3*gvy; + playerp->accs[0] = gvy; + playerp->accs[1] = -gvx; + } + } + else + { + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + playerp->accs[6] = 3*gvy-3*gvx; + playerp->accs[7] = -3*gvx-3*gvy; + playerp->accs[0] = gvy; + playerp->accs[1] = -gvx; + } + } + } + + //Jump + if (((int)(playerp->comm)&0x04) == 0x04 && + (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL) || !sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL))) + { + parts[i].vy -= 4*gvy; + playerp->accs[3] -= gvy; + playerp->accs[7] -= gvy; + } + + //Charge detector wall if foot inside + if (sim->bmap[(int)(playerp->legs[5]+0.5)/CELL][(int)(playerp->legs[4]+0.5)/CELL]==WL_DETECT) + sim->set_emap((int)playerp->legs[4]/CELL, (int)playerp->legs[5]/CELL); + if (sim->bmap[(int)(playerp->legs[13]+0.5)/CELL][(int)(playerp->legs[12]+0.5)/CELL]==WL_DETECT) + sim->set_emap((int)(playerp->legs[12]+0.5)/CELL, (int)(playerp->legs[13]+0.5)/CELL); + + //Searching for particles near head + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; + + if (!r && !sim->bmap[(y+ry)/CELL][(x+rx)/CELL]) + continue; + + if (sim->ptypes[r&0xFF].falldown!=0 || sim->ptypes[r&0xFF].state == ST_GAS || (r&0xFF) == PT_NEUT || (r&0xFF) == PT_PHOT) + { + playerp->elem = r&0xFF; //Current element + } + if ((r&0xFF)==PT_TESC || (r&0xFF)==PT_LIGH) + playerp->elem = PT_LIGH; + if ((r&0xFF) == PT_PLNT && parts[i].life<100) //Plant gives him 5 HP + { + if (parts[i].life<=95) + parts[i].life += 5; + else + parts[i].life = 100; + sim->kill_part(r>>8); + } + + if ((r&0xFF) == PT_NEUT) + { + if (parts[i].life<=100) parts[i].life -= (102-parts[i].life)/2; + else parts[i].life *= 0.9f; + sim->kill_part(r>>8); + } + if (sim->bmap[(ry+y)/CELL][(rx+x)/CELL]==WL_FAN) + playerp->elem = SPC_AIR; + if ((r&0xFF)==PT_PRTI) + STKM_interact(sim, playerp, i, rx, ry); + if (!parts[i].type)//STKM_interact may kill STKM + return 1; + } + + //Head position + rx = x + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01); + ry = y - 3*(playerp->pcomm == 0); + + //Spawn + if (((int)(playerp->comm)&0x08) == 0x08) + { + ry -= 2*(rand()%2)+1; + r = pmap[ry][rx]; + if (sim->ptypes[r&0xFF].state == ST_SOLID) + { + sim->create_part(-1, rx, ry, PT_SPRK); + playerp->frames = 0; + } + else + { + int np = -1; + if (playerp->elem == SPC_AIR) + sim->create_parts(rx + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01), ry, 4, 4, SPC_AIR, 0); + else if (playerp->elem==PT_LIGH && playerp->frames<30)//limit lightning creation rate + np = -1; + else + np = sim->create_part(-1, rx, ry, playerp->elem); + if ( (np < NPART) && np>=0) + { + if (playerp->elem == PT_PHOT) + { + int random = abs(rand()%3-1)*3; + if (random==0) + { + sim->kill_part(np); + } + else + { + parts[np].vy = 0; + if (((int)playerp->pcomm)&(0x01|0x02)) + parts[np].vx = (((((int)playerp->pcomm)&0x02) == 0x02) - (((int)(playerp->pcomm)&0x01) == 0x01))*random; + else + parts[np].vx = random; + } + } + else if (playerp->elem == PT_LIGH) + { + float angle; + int power = 100; + if (gvx!=0 || gvy!=0) + angle = atan2(gvx, gvy)*180.0f/M_PI; + else + angle = rand()%360; + if (((int)playerp->comm)&0x01) + angle += 180; + if (angle>360) + angle-=360; + if (angle<0) + angle+=360; + parts[np].tmp = angle; + parts[np].life=rand()%(2+power/15)+power/7; + parts[np].temp=parts[np].life*power/2.5; + parts[np].tmp2=1; + } + else if (playerp->elem != SPC_AIR) + { + parts[np].vx -= -gvy*(5*((((int)playerp->pcomm)&0x02) == 0x02) - 5*(((int)(playerp->pcomm)&0x01) == 0x01)); + parts[np].vy -= gvx*(5*((((int)playerp->pcomm)&0x02) == 0x02) - 5*(((int)(playerp->pcomm)&0x01) == 0x01)); + parts[i].vx -= (sim->ptypes[(int)playerp->elem].weight*parts[np].vx)/1000; + } + playerp->frames = 0; + } + + } + } + + //Simulation of joints + d = 25/(pow((playerp->legs[0]-playerp->legs[4]), 2) + pow((playerp->legs[1]-playerp->legs[5]), 2)+25) - 0.5; //Fast distance + playerp->legs[4] -= (playerp->legs[0]-playerp->legs[4])*d; + playerp->legs[5] -= (playerp->legs[1]-playerp->legs[5])*d; + playerp->legs[0] += (playerp->legs[0]-playerp->legs[4])*d; + playerp->legs[1] += (playerp->legs[1]-playerp->legs[5])*d; + + d = 25/(pow((playerp->legs[8]-playerp->legs[12]), 2) + pow((playerp->legs[9]-playerp->legs[13]), 2)+25) - 0.5; + playerp->legs[12] -= (playerp->legs[8]-playerp->legs[12])*d; + playerp->legs[13] -= (playerp->legs[9]-playerp->legs[13])*d; + playerp->legs[8] += (playerp->legs[8]-playerp->legs[12])*d; + playerp->legs[9] += (playerp->legs[9]-playerp->legs[13])*d; + + d = 36/(pow((playerp->legs[0]-parts[i].x), 2) + pow((playerp->legs[1]-parts[i].y), 2)+36) - 0.5; + parts[i].vx -= (playerp->legs[0]-parts[i].x)*d; + parts[i].vy -= (playerp->legs[1]-parts[i].y)*d; + playerp->legs[0] += (playerp->legs[0]-parts[i].x)*d; + playerp->legs[1] += (playerp->legs[1]-parts[i].y)*d; + + d = 36/(pow((playerp->legs[8]-parts[i].x), 2) + pow((playerp->legs[9]-parts[i].y), 2)+36) - 0.5; + parts[i].vx -= (playerp->legs[8]-parts[i].x)*d; + parts[i].vy -= (playerp->legs[9]-parts[i].y)*d; + playerp->legs[8] += (playerp->legs[8]-parts[i].x)*d; + playerp->legs[9] += (playerp->legs[9]-parts[i].y)*d; + + if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + playerp->legs[4] = playerp->legs[6]; + playerp->legs[5] = playerp->legs[7]; + } + + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + playerp->legs[12] = playerp->legs[14]; + playerp->legs[13] = playerp->legs[15]; + } + + //This makes stick man "pop" from obstacles + if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + float t; + t = playerp->legs[4]; playerp->legs[4] = playerp->legs[6]; playerp->legs[6] = t; + t = playerp->legs[5]; playerp->legs[5] = playerp->legs[7]; playerp->legs[7] = t; + } + + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + float t; + t = playerp->legs[12]; playerp->legs[12] = playerp->legs[14]; playerp->legs[14] = t; + t = playerp->legs[13]; playerp->legs[13] = playerp->legs[15]; playerp->legs[15] = t; + } + + //Keeping legs distance + if ((pow((playerp->legs[4] - playerp->legs[12]), 2) + pow((playerp->legs[5]-playerp->legs[13]), 2))<16) + { + float tvx, tvy; + tvx = -gvy; + tvy = gvx; + + if (tvx || tvy) + { + playerp->accs[2] -= 0.2*tvx/hypot(tvx, tvy); + playerp->accs[3] -= 0.2*tvy/hypot(tvx, tvy); + + playerp->accs[6] += 0.2*tvx/hypot(tvx, tvy); + playerp->accs[7] += 0.2*tvy/hypot(tvx, tvy); + } + } + + if ((pow((playerp->legs[0] - playerp->legs[8]), 2) + pow((playerp->legs[1]-playerp->legs[9]), 2))<16) + { + float tvx, tvy; + tvx = -gvy; + tvy = gvx; + + if (tvx || tvy) + { + playerp->accs[0] -= 0.2*tvx/hypot(tvx, tvy); + playerp->accs[1] -= 0.2*tvy/hypot(tvx, tvy); + + playerp->accs[4] += 0.2*tvx/hypot(tvx, tvy); + playerp->accs[5] += 0.2*tvy/hypot(tvx, tvy); + } + } + + //If legs touch something + STKM_interact(sim, playerp, i, (int)(playerp->legs[4]+0.5), (int)(playerp->legs[5]+0.5)); + STKM_interact(sim, playerp, i, (int)(playerp->legs[12]+0.5), (int)(playerp->legs[13]+0.5)); + STKM_interact(sim, playerp, i, (int)(playerp->legs[4]+0.5), (int)playerp->legs[5]); + STKM_interact(sim, playerp, i, (int)(playerp->legs[12]+0.5), (int)playerp->legs[13]); + if (!parts[i].type) + return 1; + + parts[i].ctype = playerp->elem; + return 0; +} + +void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y) +{ + int r; + if (x<0 || y<0 || x>=XRES || y>=YRES || !sim->parts[i].type) + return; + r = sim->pmap[y][x]; + if (r) + { + if ((r&0xFF)==PT_SPRK && playerp->elem!=PT_LIGH) //If on charge + { + sim->parts[i].life -= (int)(rand()*20/RAND_MAX)+32; + } + + if (sim->ptypes[r&0xFF].hconduct && ((playerp->elem!=PT_LIGH && sim->parts[r>>8].temp>=323) || sim->parts[r>>8].temp<=243)) + { + sim->parts[i].life -= 2; + playerp->accs[3] -= 1; + } + + if (sim->ptypes[r&0xFF].properties&PROP_DEADLY) + switch (r&0xFF) + { + case PT_ACID: + sim->parts[i].life -= 5; + break; + default: + sim->parts[i].life -= 1; + break; + } + + if (sim->ptypes[r&0xFF].properties&PROP_RADIOACTIVE) + sim->parts[i].life -= 1; + + if ((r&0xFF)==PT_PRTI && sim->parts[i].type) + { + int nnx, count=1;//gives rx=0, ry=1 in update_PRTO + sim->parts[r>>8].tmp = (int)((sim->parts[r>>8].temp-73.15f)/100+1); + if (sim->parts[r>>8].tmp>=CHANNELS) sim->parts[r>>8].tmp = CHANNELS-1; + else if (sim->parts[r>>8].tmp<0) sim->parts[r>>8].tmp = 0; + for (nnx=0; nnx<80; nnx++) + if (!sim->portalp[sim->parts[r>>8].tmp][count][nnx].type) + { + sim->portalp[sim->parts[r>>8].tmp][count][nnx] = sim->parts[i]; + sim->kill_part(i); + playerp->spwn = 1;//stop SPWN creating a new STKM while he is in portal + break; + } + } + } +} + +void STKM_init_legs(Simulation * sim, playerst* playerp, int i) +{ + int x, y; + + x = (int)(sim->parts[i].x+0.5f); + y = (int)(sim->parts[i].y+0.5f); + + playerp->legs[0] = x-1; + playerp->legs[1] = y+6; + playerp->legs[2] = x-1; + playerp->legs[3] = y+6; + + playerp->legs[4] = x-3; + playerp->legs[5] = y+12; + playerp->legs[6] = x-3; + playerp->legs[7] = y+12; + + playerp->legs[8] = x+1; + playerp->legs[9] = y+6; + playerp->legs[10] = x+1; + playerp->legs[11] = y+6; + + playerp->legs[12] = x+3; + playerp->legs[13] = y+12; + playerp->legs[14] = x+3; + playerp->legs[15] = y+12; +} diff --git a/elements/stkm2.cpp b/elements/stkm2.cpp new file mode 100644 index 0000000..967bea2 --- /dev/null +++ b/elements/stkm2.cpp @@ -0,0 +1,29 @@ +#include "element.h" + +int update_SPAWN2(UPDATE_FUNC_ARGS) { + if (!sim->player2.spwn) + sim->create_part(-1, x, y, PT_STKM2); + + return 0; +} + +int update_STKM2(UPDATE_FUNC_ARGS) { + run_stickman(&sim->player2, UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + +int graphics_STKM2(GRAPHICS_FUNC_ARGS) +{ + /**pixel_mode = PSPEC_STICKMAN; + if ((int)sim->player2.elemplayer2.elem].pcolors); + *colg = PIXG(ptypes[sim->player2.elem].pcolors); + *colb = PIXB(ptypes[sim->player2.elem].pcolors); + } + else*/ + { + *colr = *colg = *colb = 255; + } + return 1; +} diff --git a/elements/stor.cpp b/elements/stor.cpp new file mode 100644 index 0000000..66eb072 --- /dev/null +++ b/elements/stor.cpp @@ -0,0 +1,43 @@ +#include "element.h" + +int update_STOR(UPDATE_FUNC_ARGS) { + int r, rx, ry, np, rx1, ry1; + if(parts[i].life && !parts[i].tmp) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8)>=NPART || !r) + continue; + if (!parts[i].tmp && !parts[i].life && (r&0xFF)!=PT_STOR && !(sim->ptypes[(r&0xFF)].properties&TYPE_SOLID) && (!parts[i].ctype || (r&0xFF)==parts[i].ctype)) + { + parts[i].tmp = parts[r>>8].type; + parts[i].temp = parts[r>>8].temp; + parts[i].flags = parts[r>>8].life; + parts[i].pavg[0] = parts[r>>8].tmp; + parts[i].pavg[1] = parts[r>>8].ctype; + sim->kill_part(r>>8); + } + if(parts[i].tmp && (r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN) + { + for(ry1 = 1; ry1 >= -1; ry1--){ + for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ // Oscilate the X starting at 0, 1, -1, 3, -5, etc (Though stop at -1) + np = sim->create_part(-1,x+rx1,y+ry1,parts[i].tmp); + if (np!=-1) + { + parts[np].temp = parts[i].temp; + parts[np].life = parts[i].flags; + parts[np].tmp = parts[i].pavg[0]; + parts[np].ctype = parts[i].pavg[1]; + parts[i].tmp = 0; + parts[i].life = 10; + break; + } + } + } + } + } + return 0; +} diff --git a/elements/swch.cpp b/elements/swch.cpp new file mode 100644 index 0000000..ee2c467 --- /dev/null +++ b/elements/swch.cpp @@ -0,0 +1,41 @@ +#include "element.h" + +int update_SWCH(UPDATE_FUNC_ARGS) { + int r, rt, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxparts_avg(i,r>>8,PT_INSL)!=PT_INSL) { + rt = r&0xFF; + if (rt==PT_SWCH) + { + if (parts[i].life>=10&&parts[r>>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[i].life==0&&parts[r>>8].life==10) + parts[i].life = 10; + } + else if (rt==PT_SPRK&&parts[i].life==10&&parts[r>>8].ctype!=PT_PSCN&&parts[r>>8].ctype!=PT_NSCN) { + sim->part_change_type(i,x,y,PT_SPRK); + parts[i].ctype = PT_SWCH; + parts[i].life = 4; + } + } + } + //turn off SWCH from two red BRAYS + if (parts[i].life==10 && (!(pmap[y-1][x-1]&0xFF) && ((pmap[y-1][x]&0xFF)==PT_BRAY&&parts[pmap[y-1][x]>>8].tmp==2) && !(pmap[y-1][x+1]&0xFF) && ((pmap[y][x+1]&0xFF)==PT_BRAY&&parts[pmap[y][x+1]>>8].tmp==2))) + { + parts[i].life = 9; + } + //turn on SWCH from two red BRAYS + else if (parts[i].life<=5 && (!(pmap[y-1][x-1]&0xFF) && (((pmap[y-1][x]&0xFF)==PT_BRAY&&parts[pmap[y-1][x]>>8].tmp==2) || ((pmap[y+1][x]&0xFF)==PT_BRAY&&parts[pmap[y+1][x]>>8].tmp==2)) && !(pmap[y-1][x+1]&0xFF) && (((pmap[y][x+1]&0xFF)==PT_BRAY&&parts[pmap[y][x+1]>>8].tmp==2) || ((pmap[y][x-1]&0xFF)==PT_BRAY&&parts[pmap[y][x-1]>>8].tmp==2)))) + { + parts[i].life = 14; + } + return 0; +} diff --git a/elements/thdr.cpp b/elements/thdr.cpp new file mode 100644 index 0000000..f7f95b4 --- /dev/null +++ b/elements/thdr.cpp @@ -0,0 +1,38 @@ +#include "element.h" + +int update_THDR(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties&PROP_CONDUCTS) && parts[r>>8].life==0 && !((r&0xFF)==PT_WATR||(r&0xFF)==PT_SLTW) && parts[r>>8].ctype!=PT_SPRK) + { + parts[i].type = PT_NONE; + parts[r>>8].ctype = parts[r>>8].type; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + parts[r>>8].life = 4; + } + else if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT&&(r&0xFF)) + { + sim->pv[y/CELL][x/CELL] += 100.0f; + if (sim->legacy_enable&&1>(rand()%200)) + { + parts[i].life = rand()%50+120; + sim->part_change_type(i,x,y,PT_FIRE); + } + else + { + parts[i].type = PT_NONE; + } + } + } + if (parts[i].type==PT_NONE) { + sim->kill_part(i); + return 1; + } + return 0; +} diff --git a/elements/thrm.cpp b/elements/thrm.cpp new file mode 100644 index 0000000..91939e6 --- /dev/null +++ b/elements/thrm.cpp @@ -0,0 +1,29 @@ +#include "element.h" + +int update_THRM(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) { + sim->part_change_type(i,x,y,PT_LAVA); + parts[i].ctype = PT_BMTL; + parts[i].temp = 3500.0f; + sim->pv[y/CELL][x/CELL] += 50.0f; + } else { + sim->part_change_type(i,x,y,PT_LAVA); + parts[i].life = 400; + parts[i].ctype = PT_THRM; + parts[i].temp = 3500.0f; + parts[i].tmp = 20; + } + } + } + return 0; +} diff --git a/elements/uran.cpp b/elements/uran.cpp new file mode 100644 index 0000000..a8b2a06 --- /dev/null +++ b/elements/uran.cpp @@ -0,0 +1,10 @@ +#include "element.h" + +int update_URAN(UPDATE_FUNC_ARGS) { + if (!sim->legacy_enable && sim->pv[y/CELL][x/CELL]>0.0f) + { + float atemp = parts[i].temp + (-MIN_TEMP); + parts[i].temp = restrict_flt((atemp*(1+(sim->pv[y/CELL][x/CELL]/2000)))+MIN_TEMP, MIN_TEMP, MAX_TEMP); + } + return 0; +} diff --git a/elements/vine.cpp b/elements/vine.cpp new file mode 100644 index 0000000..165d391 --- /dev/null +++ b/elements/vine.cpp @@ -0,0 +1,19 @@ +#include "element.h" + +int update_VINE(UPDATE_FUNC_ARGS) { + int r, np, rx =(rand()%3)-1, ry=(rand()%3)-1; + if (x+rx>=0 && y+ry>0 && x+rxrand()%15) + sim->part_change_type(i,x,y,PT_PLNT); + else if (!r) + { + np = sim->create_part(-1,x+rx,y+ry,PT_VINE); + if (np<0) return 0; + parts[np].temp = parts[i].temp; + sim->part_change_type(i,x,y,PT_PLNT); + } + } + return 0; +} diff --git a/elements/warp.cpp b/elements/warp.cpp new file mode 100644 index 0000000..ddc1b81 --- /dev/null +++ b/elements/warp.cpp @@ -0,0 +1,28 @@ +#include "element.h" + +int update_WARP(UPDATE_FUNC_ARGS) { + int trade, r, rx, ry; + for ( trade = 0; trade<5; trade ++) + { + rx = rand()%3-1; + ry = rand()%3-1; + if (x+rx>=0 && y+ry>0 && x+rx=rand()%200)) + { + parts[i].x = parts[r>>8].x; + parts[i].y = parts[r>>8].y; + parts[r>>8].x = x; + parts[r>>8].y = y; + parts[i].life += 4; + pmap[y][x] = r; + pmap[y+ry][x+rx] = (i<<8)|parts[i].type; + trade = 5; + } + } + } + return 0; +} diff --git a/elements/watr.cpp b/elements/watr.cpp new file mode 100644 index 0000000..09b66a9 --- /dev/null +++ b/elements/watr.cpp @@ -0,0 +1,36 @@ +#include "element.h" + +int update_WATR(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) + { + sim->part_change_type(i,x,y,PT_SLTW); + sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); + } + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + /*if ((r&0xFF)==PT_CNCT && 1>(rand()%500)) Concrete+Water to paste, not very popular + { + part_change_type(i,x,y,PT_PSTE); + sim.kill_part(r>>8); + }*/ + } + return 0; +} diff --git a/elements/wifi.cpp b/elements/wifi.cpp new file mode 100644 index 0000000..ee5e264 --- /dev/null +++ b/elements/wifi.cpp @@ -0,0 +1,35 @@ +#include "element.h" + +int update_WIFI(UPDATE_FUNC_ARGS) { + int r, rx, ry; + parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); + if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; + else if (parts[i].tmp<0) parts[i].tmp = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxwireless[parts[i].tmp][0]) + { + if (((r&0xFF)==PT_NSCN||(r&0xFF)==PT_PSCN||(r&0xFF)==PT_INWR)&&parts[r>>8].life==0 && sim->wireless[parts[i].tmp][0]) + { + parts[r>>8].ctype = r&0xFF; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + parts[r>>8].life = 4; + } + } + else + { + if ((r&0xFF)==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3) + { + sim->wireless[parts[i].tmp][0] = 1; + sim->wireless[parts[i].tmp][1] = 1; + //ISWIRE = 1; + } + } + } + return 0; +} diff --git a/elements/wire.cpp b/elements/wire.cpp new file mode 100644 index 0000000..49d3720 --- /dev/null +++ b/elements/wire.cpp @@ -0,0 +1,67 @@ +#include "element.h" + +int update_WIRE(UPDATE_FUNC_ARGS) { + int s,r,rx,ry,count; + /* + 0: wire + 1: spark head + 2: spark tail + + tmp is previous state, ctype is current state + */ + //parts[i].tmp=parts[i].ctype; + parts[i].ctype=0; + if(parts[i].tmp==1) + { + parts[i].ctype=2; + } + if(parts[i].tmp==2) + { + parts[i].ctype=0; + } + + count=0; + for(rx=-1; rx<2; rx++) + for(ry=-1; ry<2; ry++) + { + if(x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN){parts[i].ctype=1; parts[r>>8].life=0; return 0;} + else if((r&0xFF)==PT_NSCN && parts[i].tmp==1){sim->create_part(-1, x+rx, y+ry, PT_SPRK);} + else if((r&0xFF)==PT_WIRE && parts[r>>8].tmp==1 && !parts[i].tmp){count++;} + } + } + if(count==1 || count==2) + parts[i].ctype=1; + return 0; +} + +int graphics_WIRE(GRAPHICS_FUNC_ARGS) +{ + if (cpart->ctype==0) + { + *colr = 255; + *colg = 204; + *colb = 0; + return 0; + } + if (cpart->ctype==1) + { + *colr = 50; + *colg = 100; + *colb = 255; + //*pixel_mode |= PMODE_GLOW; + return 0; + } + if (cpart->ctype==2) + { + *colr = 255; + *colg = 100; + *colb = 50; + //*pixel_mode |= PMODE_GLOW; + return 0; + } +} diff --git a/elements/wtrv.cpp b/elements/wtrv.cpp new file mode 100644 index 0000000..de0eae4 --- /dev/null +++ b/elements/wtrv.cpp @@ -0,0 +1,21 @@ +#include "element.h" + +int update_WTRV(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxlegacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + } + if(parts[i].temp>1273&&parts[i].ctype==PT_FIRE) + parts[i].temp-=parts[i].temp/1000; + return 0; +} diff --git a/elements/yest.cpp b/elements/yest.cpp new file mode 100644 index 0000000..c6c7db6 --- /dev/null +++ b/elements/yest.cpp @@ -0,0 +1,21 @@ +#include "element.h" + +int update_YEST(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%30) && !sim->legacy_enable) + { + sim->part_change_type(i,x,y,PT_DYST); + } + } + if (parts[i].temp>303&&parts[i].temp<317) { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_YEST); + } + return 0; +} diff --git a/includes/Air.h b/includes/Air.h new file mode 100644 index 0000000..8e4dc25 --- /dev/null +++ b/includes/Air.h @@ -0,0 +1,33 @@ +#ifndef AIR_H +#define AIR_H +#include "Config.h" + +class Simulation; + +class Air +{ +public: + int airMode; + //Arrays from the simulation + unsigned char (*bmap)[XRES/CELL]; + unsigned char (*emap)[XRES/CELL]; + float (*fvx)[XRES/CELL]; + float (*fvy)[XRES/CELL]; + // + float vx[YRES/CELL][XRES/CELL]; + float ovx[YRES/CELL][XRES/CELL]; + float vy[YRES/CELL][XRES/CELL]; + float ovy[YRES/CELL][XRES/CELL]; + float pv[YRES/CELL][XRES/CELL]; + float opv[YRES/CELL][XRES/CELL]; + float hv[YRES/CELL][XRES/CELL]; + float ohv[YRES/CELL][XRES/CELL]; // Ambient Heat + unsigned char bmap_blockair[YRES/CELL][XRES/CELL]; + float kernel[9]; + void make_kernel(void); + void update_airh(void); + void update_air(void); + Air(); +}; + +#endif diff --git a/includes/Config.h b/includes/Config.h new file mode 100644 index 0000000..4cb2da3 --- /dev/null +++ b/includes/Config.h @@ -0,0 +1,146 @@ +/* + * Config.h + * + * Created on: Jan 5, 2012 + * Author: Simon + */ + +//#ifndef CONFIG_H_ +//#define CONFIG_H_ + + +#ifdef WIN32 +#define PATH_SEP "\\" +#else +#define PATH_SEP "/" +#endif + +//VersionInfoStart +#define SAVE_VERSION 71 +#define MINOR_VERSION 0 +#define BETA +#define BUILD_NUM 133 +//VersionInfoEnd + +#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter + +#define MTOS_EXPAND(str) #str +#define MTOS(str) MTOS_EXPAND(str) + +#define SERVER "powdertoy.co.uk" +#define SCRIPTSERVER "powdertoy.co.uk" + +#define LOCAL_SAVE_DIR "Saves" + +#define APPDATA_SUBDIR "\\HardWIRED" + +#define THUMB_CACHE_SIZE 256 + +#ifndef M_PI +#define M_PI 3.14159265f +#endif +#ifndef M_GRAV +#define M_GRAV 6.67300e-1 +#endif + +#define IMGCONNS 3 +#define TIMEOUT 100 +#define HTTP_TIMEOUT 10 + +#ifdef RENDERER +#define MENUSIZE 0 +#define BARSIZE 0 +#else +#define MENUSIZE 40 +#define BARSIZE 17 +#endif +#define XRES 612 +#define YRES 384 +#define NPART XRES*YRES + +#define XCNTR 306 +#define YCNTR 192 + +#define MAX_DISTANCE sqrt(pow(XRES, 2)+pow(YRES, 2)) + +#define GRAV_DIFF + +#define MAXSIGNS 16 +#define TAG_MAX 256 + +#define ZSIZE_D 16 +#define ZFACTOR_D 8 +extern unsigned char ZFACTOR; +extern unsigned char ZSIZE; + +#define CELL 4 +#define ISTP (CELL/2) +#define CFDS (4.0f/CELL) + +#define AIR_TSTEPP 0.3f +#define AIR_TSTEPV 0.4f +#define AIR_VADV 0.3f +#define AIR_VLOSS 0.999f +#define AIR_PLOSS 0.9999f + +#define GRID_X 5 +#define GRID_Y 4 +#define GRID_P 3 +#define GRID_S 6 +#define GRID_Z 3 + +#define CATALOGUE_X 4 +#define CATALOGUE_Y 3 +#define CATALOGUE_S 6 +#define CATALOGUE_Z 3 + +#define STAMP_MAX 240 + +#define SAVE_OPS + +#define NGOL 25 +#define NGOLALT 24 //NGOL should be 24, but use this var until I find out why + +#define CIRCLE_BRUSH 0 +#define SQUARE_BRUSH 1 +#define TRI_BRUSH 2 +#define BRUSH_NUM 3 + +#define SURF_RANGE 10 +#define NORMAL_MIN_EST 3 +#define NORMAL_INTERP 20 +#define NORMAL_FRAC 16 + +#define REFRACT 0x80000000 + +/* heavy flint glass, for awesome refraction/dispersion + this way you can make roof prisms easily */ +#define GLASS_IOR 1.9 +#define GLASS_DISP 0.07 + +#ifdef WIN32 +#define strcasecmp stricmp +#endif +#if defined(WIN32) && !defined(__GNUC__) +#define fmin min +#define fminf min +#define fmax max +#define fmaxf max +#endif + +#if defined(WIN32) && !defined(__GNUC__) +#define TPT_INLINE _inline +#else +#define TPT_INLINE inline +#endif + +#define SDEUT +//#define REALHEAT + +#define DEBUG_PARTS 0x0001 +#define DEBUG_PARTCOUNT 0x0002 +#define DEBUG_DRAWTOOL 0x0004 +#define DEBUG_PERFORMANCE_CALC 0x0008 +#define DEBUG_PERFORMANCE_FRAME 0x0010 + +//#endif /* CONFIG_H_ */ diff --git a/includes/Element.h b/includes/Element.h new file mode 100644 index 0000000..449bf51 --- /dev/null +++ b/includes/Element.h @@ -0,0 +1,14 @@ +#ifndef ELEMENT_H +#define ELEMENT_H +// This header should be included by all files in src/elements/ + +#include +#include "Simulation.h" +#include "Renderer.h" +#include "ElementFunctions.h" +//#include "powder.h" +#include "Gravity.h" +#include "Misc.h" +#include "ElementGraphics.h" + +#endif diff --git a/includes/ElementFunctions.h b/includes/ElementFunctions.h new file mode 100644 index 0000000..ef80b6f --- /dev/null +++ b/includes/ElementFunctions.h @@ -0,0 +1,168 @@ +/* + * ElementFunctions.h + * + * Created on: Jan 5, 2012 + * Author: Simon + */ + +#ifndef ELEMENTFUNCTIONS_H_ +#define ELEMENTFUNCTIONS_H_ +#include "Elements.h" + +int update_ACID(UPDATE_FUNC_ARGS); +int update_ANAR(UPDATE_FUNC_ARGS); +int update_AMTR(UPDATE_FUNC_ARGS); +int update_ARAY(UPDATE_FUNC_ARGS); +int update_BCLN(UPDATE_FUNC_ARGS); +int update_BCOL(UPDATE_FUNC_ARGS); +int update_BMTL(UPDATE_FUNC_ARGS); +int update_BRMT(UPDATE_FUNC_ARGS); +int update_BOMB(UPDATE_FUNC_ARGS); +int update_BOYL(UPDATE_FUNC_ARGS); +int update_BTRY(UPDATE_FUNC_ARGS); +int update_C5(UPDATE_FUNC_ARGS); +int update_CLNE(UPDATE_FUNC_ARGS); +int update_COAL(UPDATE_FUNC_ARGS); +int update_DEUT(UPDATE_FUNC_ARGS); +int update_DSTW(UPDATE_FUNC_ARGS); +int update_FOG(UPDATE_FUNC_ARGS); +int update_FRZW(UPDATE_FUNC_ARGS); +int update_FRZZ(UPDATE_FUNC_ARGS); +int update_FSEP(UPDATE_FUNC_ARGS); +int update_FUSE(UPDATE_FUNC_ARGS); +int update_FIRW(UPDATE_FUNC_ARGS); +int update_FWRK(UPDATE_FUNC_ARGS); +int update_GLAS(UPDATE_FUNC_ARGS); +int update_GLOW(UPDATE_FUNC_ARGS); +int update_GOO(UPDATE_FUNC_ARGS); +int update_HSWC(UPDATE_FUNC_ARGS); +int update_IRON(UPDATE_FUNC_ARGS); +int update_ICEI(UPDATE_FUNC_ARGS); +int update_ISZ(UPDATE_FUNC_ARGS); +int update_LCRY(UPDATE_FUNC_ARGS); +int update_MORT(UPDATE_FUNC_ARGS); +int update_NEUT(UPDATE_FUNC_ARGS); +int update_NPTCT(UPDATE_FUNC_ARGS); +int update_PCLN(UPDATE_FUNC_ARGS); +int update_PHOT(UPDATE_FUNC_ARGS); +int update_PIPE(UPDATE_FUNC_ARGS); +int update_PLNT(UPDATE_FUNC_ARGS); +int update_PLUT(UPDATE_FUNC_ARGS); +int update_PRTI(UPDATE_FUNC_ARGS); +int update_PRTO(UPDATE_FUNC_ARGS); +int update_PYRO(UPDATE_FUNC_ARGS); +int update_PUMP(UPDATE_FUNC_ARGS); +int update_QRTZ(UPDATE_FUNC_ARGS); +int update_RIME(UPDATE_FUNC_ARGS); +int update_SHLD1(UPDATE_FUNC_ARGS); +int update_SHLD2(UPDATE_FUNC_ARGS); +int update_SHLD3(UPDATE_FUNC_ARGS); +int update_SHLD4(UPDATE_FUNC_ARGS); +int update_SING(UPDATE_FUNC_ARGS); +int update_SLTW(UPDATE_FUNC_ARGS); +int update_SPAWN(UPDATE_FUNC_ARGS); +int update_SPAWN2(UPDATE_FUNC_ARGS); +int update_SPNG(UPDATE_FUNC_ARGS); +int update_SPRK(UPDATE_FUNC_ARGS); +int update_STKM(UPDATE_FUNC_ARGS); +int update_STKM2(UPDATE_FUNC_ARGS); +int update_SWCH(UPDATE_FUNC_ARGS); +int update_THDR(UPDATE_FUNC_ARGS); +int update_THRM(UPDATE_FUNC_ARGS); +int update_URAN(UPDATE_FUNC_ARGS); +int update_VINE(UPDATE_FUNC_ARGS); +int update_WARP(UPDATE_FUNC_ARGS); +int update_WATR(UPDATE_FUNC_ARGS); +int update_WIFI(UPDATE_FUNC_ARGS); +int update_WTRV(UPDATE_FUNC_ARGS); +int update_YEST(UPDATE_FUNC_ARGS); +int update_SOAP(UPDATE_FUNC_ARGS); +int update_O2(UPDATE_FUNC_ARGS); +int update_H2(UPDATE_FUNC_ARGS); +int update_NBHL(UPDATE_FUNC_ARGS); +int update_NWHL(UPDATE_FUNC_ARGS); +int update_MERC(UPDATE_FUNC_ARGS); +int update_PBCN(UPDATE_FUNC_ARGS); +int update_GPMP(UPDATE_FUNC_ARGS); +int update_CLST(UPDATE_FUNC_ARGS); +int update_DLAY(UPDATE_FUNC_ARGS); +int update_WIRE(UPDATE_FUNC_ARGS); +int update_GBMB(UPDATE_FUNC_ARGS); +int update_CO2(UPDATE_FUNC_ARGS); +int update_CBNW(UPDATE_FUNC_ARGS); +int update_STOR(UPDATE_FUNC_ARGS); +int update_BIZR(UPDATE_FUNC_ARGS); +int update_PVOD(UPDATE_FUNC_ARGS); +int update_CONV(UPDATE_FUNC_ARGS); +int update_CAUS(UPDATE_FUNC_ARGS); +int update_DEST(UPDATE_FUNC_ARGS); +int update_EMP(UPDATE_FUNC_ARGS); +int update_LIGH(UPDATE_FUNC_ARGS); +int update_FIGH(UPDATE_FUNC_ARGS); +int update_ELEC(UPDATE_FUNC_ARGS); +int update_ACEL(UPDATE_FUNC_ARGS); +int update_DCEL(UPDATE_FUNC_ARGS); +int update_BANG(UPDATE_FUNC_ARGS); +int update_IGNT(UPDATE_FUNC_ARGS); +int update_MISC(UPDATE_FUNC_ARGS); +int update_legacy_PYRO(UPDATE_FUNC_ARGS); +int update_legacy_all(UPDATE_FUNC_ARGS); +int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS); +void STKM_init_legs(Simulation * sim, playerst* playerp, int i); +void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y); + + +int graphics_FIRE(GRAPHICS_FUNC_ARGS); +int graphics_SMKE(GRAPHICS_FUNC_ARGS); +int graphics_PLSM(GRAPHICS_FUNC_ARGS); +int graphics_DEUT(GRAPHICS_FUNC_ARGS); +int graphics_PHOT(GRAPHICS_FUNC_ARGS); +int graphics_NEUT(GRAPHICS_FUNC_ARGS); +int graphics_LAVA(GRAPHICS_FUNC_ARGS); +int graphics_SPRK(GRAPHICS_FUNC_ARGS); +int graphics_QRTZ(GRAPHICS_FUNC_ARGS); +int graphics_CLST(GRAPHICS_FUNC_ARGS); +int graphics_CBNW(GRAPHICS_FUNC_ARGS); +int graphics_SPNG(GRAPHICS_FUNC_ARGS); +int graphics_LIFE(GRAPHICS_FUNC_ARGS); +int graphics_DUST(GRAPHICS_FUNC_ARGS); +int graphics_GRAV(GRAPHICS_FUNC_ARGS); +int graphics_WIFI(GRAPHICS_FUNC_ARGS); +int graphics_PRTI(GRAPHICS_FUNC_ARGS); +int graphics_PRTO(GRAPHICS_FUNC_ARGS); +int graphics_BIZR(GRAPHICS_FUNC_ARGS); +int graphics_PIPE(GRAPHICS_FUNC_ARGS); +int graphics_INVS(GRAPHICS_FUNC_ARGS); +int graphics_ACID(GRAPHICS_FUNC_ARGS); +int graphics_FILT(GRAPHICS_FUNC_ARGS); +int graphics_BRAY(GRAPHICS_FUNC_ARGS); +int graphics_SWCH(GRAPHICS_FUNC_ARGS); +int graphics_THDR(GRAPHICS_FUNC_ARGS); +int graphics_GLOW(GRAPHICS_FUNC_ARGS); +int graphics_LCRY(GRAPHICS_FUNC_ARGS); +int graphics_PCLN(GRAPHICS_FUNC_ARGS); +int graphics_PBCN(GRAPHICS_FUNC_ARGS); +int graphics_DLAY(GRAPHICS_FUNC_ARGS); +int graphics_HSWC(GRAPHICS_FUNC_ARGS); +int graphics_PVOD(GRAPHICS_FUNC_ARGS); +int graphics_STOR(GRAPHICS_FUNC_ARGS); +int graphics_PUMP(GRAPHICS_FUNC_ARGS); +int graphics_GPMP(GRAPHICS_FUNC_ARGS); +int graphics_HFLM(GRAPHICS_FUNC_ARGS); +int graphics_FIRW(GRAPHICS_FUNC_ARGS); +int graphics_BOMB(GRAPHICS_FUNC_ARGS); +int graphics_GBMB(GRAPHICS_FUNC_ARGS); +int graphics_COAL(GRAPHICS_FUNC_ARGS); +int graphics_STKM(GRAPHICS_FUNC_ARGS); +int graphics_STKM2(GRAPHICS_FUNC_ARGS); +int graphics_DEST(GRAPHICS_FUNC_ARGS); +int graphics_EMP(GRAPHICS_FUNC_ARGS); +int graphics_LIGH(GRAPHICS_FUNC_ARGS); +int graphics_FIGH(GRAPHICS_FUNC_ARGS); +int graphics_ELEC(GRAPHICS_FUNC_ARGS); +int graphics_WIRE(GRAPHICS_FUNC_ARGS); +int graphics_ACEL(GRAPHICS_FUNC_ARGS); +int graphics_DCEL(GRAPHICS_FUNC_ARGS); +int graphics_DEFAULT(GRAPHICS_FUNC_ARGS); + +#endif /* ELEMENTFUNCTIONS_H_ */ diff --git a/includes/ElementGraphics.h b/includes/ElementGraphics.h new file mode 100644 index 0000000..a880e71 --- /dev/null +++ b/includes/ElementGraphics.h @@ -0,0 +1,52 @@ +#ifndef PGRAPHICS_H +#define PGRAPHICS_H + +#define PMODE 0x00000FFF +#define PMODE_NONE 0x00000000 +#define PMODE_FLAT 0x00000001 +#define PMODE_BLOB 0x00000002 +#define PMODE_BLUR 0x00000004 +#define PMODE_GLOW 0x00000008 +#define PMODE_SPARK 0x00000010 +#define PMODE_FLARE 0x00000020 +#define PMODE_LFLARE 0x00000040 +#define PMODE_ADD 0x00000080 +#define PMODE_BLEND 0x00000100 +#define PSPEC_STICKMAN 0x00000200 + +#define OPTIONS 0x0000F000 +#define NO_DECO 0x00001000 +#define DECO_FIRE 0x00002000 + +#define FIREMODE 0x00FF0000 +#define FIRE_ADD 0x00010000 +#define FIRE_BLEND 0x00020000 + +#define EFFECT 0xFF000000 +#define EFFECT_GRAVIN 0x01000000 +#define EFFECT_GRAVOUT 0x02000000 + +#define RENDER_EFFE OPTIONS | PSPEC_STICKMAN | EFFECT | PMODE_SPARK | PMODE_FLARE | PMODE_LFLARE +#define RENDER_FIRE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND | FIREMODE +#define RENDER_GLOW OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_GLOW | PMODE_ADD | PMODE_BLEND +#define RENDER_BLUR OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLUR | PMODE_ADD | PMODE_BLEND +#define RENDER_BLOB OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLOB | PMODE_ADD | PMODE_BLEND +#define RENDER_BASC OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND +#define RENDER_NONE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT + +#define COLOUR_HEAT 0x00000001 +#define COLOUR_LIFE 0x00000002 +#define COLOUR_GRAD 0x00000004 + +#define COLOUR_DEFAULT 0x00000000 + +#define DISPLAY_AIRC 0x00000001 +#define DISPLAY_AIRP 0x00000002 +#define DISPLAY_AIRV 0x00000004 +#define DISPLAY_AIRH 0x00000008 +#define DISPLAY_AIR 0x0000000F +#define DISPLAY_WARP 0x00000010 +#define DISPLAY_PERS 0x00000020 +#define DISPLAY_EFFE 0x00000040 + +#endif diff --git a/includes/Elements.h b/includes/Elements.h new file mode 100644 index 0000000..204460c --- /dev/null +++ b/includes/Elements.h @@ -0,0 +1,280 @@ +/* + * Elements.h + * + * Created on: Jan 5, 2012 + * Author: Simon + */ + +//#ifndef ELEMENTS_H_ +//#define ELEMENTS_H_ + +//#include "Config.h" +//#include "Simulation.h" + +#define IPL -257.0f +#define IPH 257.0f +#define ITL MIN_TEMP-1 +#define ITH MAX_TEMP+1 +// no transition (PT_NONE means kill part) +#define NT -1 +// special transition - lava ctypes etc need extra code, which is only found and run if ST is given +#define ST PT_NUM + +#define R_TEMP 22 +#define MAX_TEMP 9999 +#define MIN_TEMP 0 +#define O_MAX_TEMP 3500 +#define O_MIN_TEMP -273 + +#define TYPE_PART 0x00001 //1 Powders +#define TYPE_LIQUID 0x00002 //2 Liquids +#define TYPE_SOLID 0x00004 //4 Solids +#define TYPE_GAS 0x00008 //8 Gasses (Includes plasma) +#define TYPE_ENERGY 0x00010 //16 Energy (Thunder, Light, Neutrons etc.) +#define PROP_CONDUCTS 0x00020 //32 Conducts electricity +#define PROP_BLACK 0x00040 //64 Absorbs Photons (not currently implemented or used, a photwl attribute might be better) +#define PROP_NEUTPENETRATE 0x00080 //128 Penetrated by neutrons +#define PROP_NEUTABSORB 0x00100 //256 Absorbs neutrons, reflect is default (not currently implemented or used) +#define PROP_NEUTPASS 0x00200 //512 Neutrons pass through, such as with glass +#define PROP_DEADLY 0x00400 //1024 Is deadly for stickman (not currently implemented or used) +#define PROP_HOT_GLOW 0x00800 //2048 Hot Metal Glow +#define PROP_LIFE 0x01000 //4096 Is a GoL type +#define PROP_RADIOACTIVE 0x02000 //8192 Radioactive +#define PROP_LIFE_DEC 0x04000 //2^14 Life decreases by one every frame if > zero +#define PROP_LIFE_KILL 0x08000 //2^15 Kill when life value is <= zero +#define PROP_LIFE_KILL_DEC 0x10000 //2^16 Kill when life value is decremented to <= zero +#define PROP_SPARKSETTLE 0x20000 //2^17 Allow Sparks/Embers to settle + +#define FLAG_STAGNANT 1 + +#define ST_NONE 0 +#define ST_SOLID 1 +#define ST_LIQUID 2 +#define ST_GAS 3 + +#define UPDATE_FUNC_ARGS Simulation* sim, int i, int x, int y, int surround_space, int nt, Particle *parts, int pmap[YRES][XRES] +// to call another update function with same arguments: +#define UPDATE_FUNC_SUBCALL_ARGS sim, i, x, y, surround_space, nt, parts, pmap + +#define GRAPHICS_FUNC_ARGS Renderer * ren, Particle *cpart, int nx, int ny, int *pixel_mode, int* cola, int *colr, int *colg, int *colb, int *firea, int *firer, int *fireg, int *fireb +#define GRAPHICS_FUNC_SUBCALL_ARGS ren, cpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb + +#define UI_WALLSTART 222 +#define UI_ACTUALSTART 122 +#define UI_WALLCOUNT 25 + +#define WL_WALLELEC 122 +#define WL_EWALL 123 +#define WL_DETECT 124 +#define WL_STREAM 125 +#define WL_SIGN 126 +#define WL_FAN 127 +#define WL_FANHELPER 255 +#define WL_ALLOWLIQUID 128 +#define WL_DESTROYALL 129 +#define WL_ERASE 130 +#define WL_WALL 131 +#define WL_ALLOWAIR 132 +#define WL_ALLOWSOLID 133 +#define WL_ALLOWALLELEC 134 +#define WL_EHOLE 135 + +#define SPC_AIR 236 +#define SPC_HEAT 237 +#define SPC_COOL 238 +#define SPC_VACUUM 239 +#define SPC_WIND 241 +#define SPC_PGRV 243 +#define SPC_NGRV 244 +#define SPC_PROP 246 + +#define WL_ALLOWGAS 140 +#define WL_GRAV 142 +#define WL_ALLOWENERGY 145 + +#define NGT_GOL 0 +#define NGT_HLIF 1 +#define NGT_ASIM 2 +#define NGT_2x2 3 +#define NGT_DANI 4 +#define NGT_AMOE 5 +#define NGT_MOVE 6 +#define NGT_PGOL 7 +#define NGT_DMOE 8 +#define NGT_34 9 +#define NGT_LLIF 10 +#define NGT_STAN 11 +#define NGT_SEED 12 +#define NGT_MAZE 13 +#define NGT_COAG 14 +#define NGT_WALL 15 +#define NGT_GNAR 16 +#define NGT_REPL 17 +#define NGT_MYST 18 +#define NGT_LOTE 19 +#define NGT_FRG2 20 +#define NGT_STAR 21 +#define NGT_FROG 22 +#define NGT_BRAN 23 + +#define PT_NONE 0 +#define PT_DUST 1 +#define PT_WATR 2 +#define PT_OIL 3 +#define PT_FIRE 4 +#define PT_STNE 5 +#define PT_LAVA 6 +#define PT_GUNP 7 +#define PT_NITR 8 +#define PT_CLNE 9 +#define PT_GAS 10 +#define PT_PLEX 11 +#define PT_GOO 12 +#define PT_ICEI 13 +#define PT_METL 14 +#define PT_SPRK 15 +#define PT_SNOW 16 +#define PT_WOOD 17 +#define PT_NEUT 18 +#define PT_PLUT 19 +#define PT_PLNT 20 +#define PT_ACID 21 +#define PT_VOID 22 +#define PT_WTRV 23 +#define PT_CNCT 24 +#define PT_DSTW 25 +#define PT_SALT 26 +#define PT_SLTW 27 +#define PT_DMND 28 +#define PT_BMTL 29 +#define PT_BRMT 30 +#define PT_PHOT 31 +#define PT_URAN 32 +#define PT_WAX 33 +#define PT_MWAX 34 +#define PT_PSCN 35 +#define PT_NSCN 36 +#define PT_LNTG 37 +#define PT_INSL 38 +#define PT_BHOL 39 +#define PT_WHOL 40 +#define PT_RBDM 41 +#define PT_LRBD 42 +#define PT_NTCT 43 +#define PT_SAND 44 +#define PT_GLAS 45 +#define PT_PTCT 46 +#define PT_BGLA 47 +#define PT_THDR 48 +#define PT_PLSM 49 +#define PT_ETRD 50 +#define PT_NICE 51 +#define PT_NBLE 52 +#define PT_BTRY 53 +#define PT_LCRY 54 +#define PT_STKM 55 +#define PT_SWCH 56 +#define PT_SMKE 57 +#define PT_DESL 58 +#define PT_COAL 59 +#define PT_LO2 60 +#define PT_O2 61 +#define PT_INWR 62 +#define PT_YEST 63 +#define PT_DYST 64 +#define PT_THRM 65 +#define PT_GLOW 66 +#define PT_BRCK 67 +#define PT_HFLM 68 +#define PT_FIRW 69 +#define PT_FUSE 70 +#define PT_FSEP 71 +#define PT_AMTR 72 +#define PT_BCOL 73 +#define PT_PCLN 74 +#define PT_HSWC 75 +#define PT_IRON 76 +#define PT_MORT 77 +#define PT_LIFE 78 +#define PT_DLAY 79 +#define PT_CO2 80 +#define PT_DRIC 81 +#define PT_CBNW 82 +#define PT_STOR 83 +#define PT_PVOD 84 +#define PT_CONV 85 +#define PT_CAUS 86 + +#define PT_LIGH 87 +#define PT_TESC 88 +#define PT_DEST 89 + +#define PT_SPNG 90 +#define PT_RIME 91 +#define PT_FOG 92 +#define PT_BCLN 93 +#define PT_LOVE 94 +#define PT_DEUT 95 +#define PT_WARP 96 +#define PT_PUMP 97 +#define PT_FWRK 98 +#define PT_PIPE 99 +#define PT_FRZZ 100 +#define PT_FRZW 101 +#define PT_GRAV 102 +#define PT_BIZR 103 +#define PT_BIZRG 104 +#define PT_BIZRS 105 +#define PT_INST 106 +#define PT_ISOZ 107 +#define PT_ISZS 108 +#define PT_PRTI 109 +#define PT_PRTO 110 +#define PT_PSTE 111 +#define PT_PSTS 112 +#define PT_ANAR 113 +#define PT_VINE 114 +#define PT_INVIS 115 +#define PT_EQUALVEL 116 //all particles equal their velocities +#define PT_SPAWN2 117 +#define PT_SPAWN 118 +#define PT_SHLD1 119 +#define PT_SHLD2 120 +#define PT_SHLD3 121 +#define PT_SHLD4 122 +#define PT_LOLZ 123 +#define PT_WIFI 124 +#define PT_FILT 125 +#define PT_ARAY 126 +#define PT_BRAY 127 +#define PT_STKM2 128 +#define PT_BOMB 129 +#define PT_C5 130 +#define PT_SING 131 +#define PT_QRTZ 132 +#define PT_PQRT 133 +#define PT_EMP 134 +#define PT_BREC 135 +#define PT_ELEC 136 +#define PT_ACEL 137 +#define PT_DCEL 138 +#define PT_BANG 139 +#define PT_IGNT 140 +#define PT_BOYL 141 + +#define OLD_PT_WIND 147 +#define PT_H2 148 +#define PT_SOAP 149 +#define PT_NBHL 150 +#define PT_NWHL 151 +#define PT_MERC 152 +#define PT_PBCN 153 +#define PT_GPMP 154 +#define PT_CLST 155 +#define PT_WIRE 156 +#define PT_GBMB 157 +#define PT_FIGH 158 +#define PT_NUM 159 + + +//#endif /* ELEMENTS_H_ */ diff --git a/includes/Graphics.h b/includes/Graphics.h new file mode 100644 index 0000000..6cd5b36 --- /dev/null +++ b/includes/Graphics.h @@ -0,0 +1,172 @@ +#ifndef GRAPHICS_H +#define GRAPHICS_H + +#include +#include +#include "Config.h" +//#include "powder.h" + +#ifdef PIX16 +#define PIXELSIZE 2 +#define PIXPACK(x) ((((x)>>8)&0xF800)|(((x)>>5)&0x07E0)|(((x)>>3)&0x001F)) +#define PIXRGB(r,g,b) ((((r)<<8)&0xF800)|(((g)<<3)&0x07E0)|(((b)>>3)&0x001F)) +#define PIXR(x) (((x)>>8)&0xF8) +#define PIXG(x) (((x)>>3)&0xFC) +#define PIXB(x) (((x)<<3)&0xF8) +#else +#define PIXELSIZE 4 +#ifdef PIX32BGR +#define PIXPACK(x) ((((x)>>16)&0x0000FF)|((x)&0x00FF00)|(((x)<<16)&0xFF0000)) +#define PIXRGB(r,g,b) (((b)<<16)|((g)<<8)|((r)))// (((b)<<16)|((g)<<8)|(r)) +#define PIXR(x) ((x)&0xFF) +#define PIXG(x) (((x)>>8)&0xFF) +#define PIXB(x) ((x)>>16) +#else +#ifdef PIX32BGRA +#define PIXPACK(x) ((((x)>>8)&0x0000FF00)|(((x)<<8)&0x00FF0000)|(((x)<<24)&0xFF000000)) +#define PIXRGB(r,g,b) (((b)<<24)|((g)<<16)|((r)<<8)) +#define PIXR(x) (((x)>>8)&0xFF) +#define PIXG(x) (((x)>>16)&0xFF) +#define PIXB(x) (((x)>>24)) +#elif defined(PIX32OGL) +#define PIXPACK(x) (0xFF000000|((x)&0xFFFFFF)) +#define PIXRGB(r,g,b) (0xFF000000|((r)<<16)|((g)<<8)|((b)))// (((b)<<16)|((g)<<8)|(r)) +#define PIXRGBA(r,g,b,a) (((a)<<24)|((r)<<16)|((g)<<8)|((b)))// (((b)<<16)|((g)<<8)|(r)) +#define PIXA(x) (((x)>>24)&0xFF) +#define PIXR(x) (((x)>>16)&0xFF) +#define PIXG(x) (((x)>>8)&0xFF) +#define PIXB(x) ((x)&0xFF) +#else +#define PIXPACK(x) (x) +#define PIXRGB(r,g,b) (((r)<<16)|((g)<<8)|(b)) +#define PIXR(x) ((x)>>16) +#define PIXG(x) (((x)>>8)&0xFF) +#define PIXB(x) ((x)&0xFF) +#endif +#endif +#endif + +#ifdef PIX16 +typedef unsigned short pixel; +#else +typedef unsigned int pixel; +#endif + +/*extern int emp_decor; + +extern unsigned int *render_modes; +extern unsigned int render_mode; +extern unsigned int colour_mode; +extern unsigned int *display_modes; +extern unsigned int display_mode; + +extern SDL_Surface *sdl_scrn; +extern int sdl_scale; + +extern int sandcolour_r; +extern int sandcolour_g; +extern int sandcolour_b; +extern int sandcolour_frame; + +extern unsigned char fire_r[YRES/CELL][XRES/CELL]; +extern unsigned char fire_g[YRES/CELL][XRES/CELL]; +extern unsigned char fire_b[YRES/CELL][XRES/CELL]; + +extern unsigned int fire_alpha[CELL*3][CELL*3]; +extern pixel *pers_bg; + +extern char * flm_data; +extern int flm_data_points; +extern pixel flm_data_colours[]; +extern float flm_data_pos[]; + +extern char * plasma_data; +extern int plasma_data_points; +extern pixel plasma_data_colours[]; +extern float plasma_data_pos[];*/ + +class Graphics +{ +public: + SDL_Surface * sdl_scrn; + pixel *vid; + pixel *render_packed_rgb(void *image, int width, int height, int cmp_size); + static char * generate_gradient(pixel * colours, float * points, int pointcount, int size); + void draw_other(); + void draw_rgba_image(unsigned char *data, int x, int y, float a); + static void *ptif_pack(pixel *src, int w, int h, int *result_size); + static pixel *ptif_unpack(void *datain, int size, int *w, int *h); + static pixel *resample_img_nn(pixel *src, int sw, int sh, int rw, int rh); + static pixel *resample_img(pixel *src, int sw, int sh, int rw, int rh); + static pixel *rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f); + //void render_gravlensing(pixel *src, pixel * dst); + //void sdl_blit_1(int x, int y, int w, int h, pixel *src, int pitch); + //void sdl_blit_2(int x, int y, int w, int h, pixel *src, int pitch); + //void sdl_blit(int x, int y, int w, int h, pixel *src, int pitch); + void drawblob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb); + void draw_tool(int b, int sl, int sr, unsigned pc, unsigned iswall); + //int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc); + //void draw_menu(pixel *vid_buf, int i, int hover); + void drawpixel(int x, int y, int r, int g, int b, int a); + int addchar(int x, int y, int c, int r, int g, int b, int a); + int drawchar(int x, int y, int c, int r, int g, int b, int a); + int drawtext(int x, int y, std::string &s, int r, int g, int b, int a); + int drawtext(int x, int y, const char *s, int r, int g, int b, int a); + int drawtext_outline(int x, int y, const char *s, int r, int g, int b, int a, int olr, int olg, int olb, int ola); + int drawtextwrap(int x, int y, int w, const char *s, int r, int g, int b, int a); + void drawrect(int x, int y, int w, int h, int r, int g, int b, int a); + void fillrect(int x, int y, int w, int h, int r, int g, int b, int a); + void clearrect(int x, int y, int w, int h); + void drawdots(int x, int y, int h, int r, int g, int b, int a); + static int textwidth(char *s); + int drawtextmax(int x, int y, int w, char *s, int r, int g, int b, int a); + static int textnwidth(char *s, int n); + static void textnpos(char *s, int n, int w, int *cx, int *cy); + static int textwidthx(char *s, int w); + static int textposxy(char *s, int width, int w, int h); + static int textwrapheight(char *s, int width); + void blendpixel(int x, int y, int r, int g, int b, int a); + void draw_icon(int x, int y, char ch, int flag); + //void draw_air(); + //void draw_grav_zones(pixel *vid); + //void draw_grav(pixel *vid); + void draw_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a); + void addpixel(int x, int y, int r, int g, int b, int a); + void xor_pixel(int x, int y); + void xor_line(int x1, int y1, int x2, int y2); + void xor_rect(int x, int y, int w, int h); + void blend_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a); + //void render_parts(pixel *vid); +// #ifdef OGLR +// void draw_parts_fbo(); +// #endif +// void draw_parts(); +// void draw_walls(pixel *vid); +// void create_decorations(int x, int y, int rx, int ry, int r, int g, int b, int click, int tool); +// void create_decoration(int x, int y, int r, int g, int b, int click, int tool); +// void line_decorations(int x1, int y1, int x2, int y2, int rx, int ry, int r, int g, int b, int click, int tool); +// void box_decorations(int x1, int y1, int x2, int y2, int r, int g, int b, int click, int tool); +// void draw_color_menu(pixel *vid_buf, int i, int hover); + void draw_wavelengths(int x, int y, int h, int wl); + void render_signs(); +// void render_fire(pixel *dst); +// void prepare_alpha(int size, float intensity); + void draw_image(pixel *img, int x, int y, int w, int h, int a); + static void dim_copy(pixel *dst, pixel *src); + static void dim_copy_pers(pixel *dst, pixel *src); + //void render_zoom(pixel *img); + //int render_thumb(void *thumb, int size, int bzip2, pixel *vid_buf, int px, int py, int scl); + //void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry); + //int sdl_open(void); + //int draw_debug_info(pixel* vid, int lm, int lx, int ly, int cx, int cy, int line_x, int line_y); + void Clear(); + void Blit(); + void AttachSDLSurface(SDL_Surface * surface); + #ifdef OGLR + void clearScreen(float alpha); + void ogl_blit(int x, int y, int w, int h, pixel *src, int pitch, int scale); + #endif + Graphics(); +}; + +#endif diff --git a/includes/Gravity.h b/includes/Gravity.h new file mode 100644 index 0000000..9f36240 --- /dev/null +++ b/includes/Gravity.h @@ -0,0 +1,108 @@ +#ifndef GRAVITY_H +#define GRAVITY_H + +#include +#include "Config.h" +#include "Simulation.h" + +class Simulation; + +struct mask_el { + char *shape; + char shapeout; + void *next; +}; +typedef struct mask_el mask_el; + + +/* + * float *gravmap = NULL;//Maps to be used by the main thread + float *gravp = NULL; + float *gravy = NULL; + float *gravx = NULL; + unsigned *gravmask = NULL; + + float *th_ogravmap = NULL;// Maps to be processed by the gravity thread + float *th_gravmap = NULL; + float *th_gravx = NULL; + float *th_gravy = NULL; + float *th_gravp = NULL; + + int th_gravchanged = 0; + + pthread_t gravthread; + pthread_mutex_t gravmutex; + pthread_cond_t gravcv; + int grav_ready = 0; + int gravthread_done = 0; + */ +class Gravity +{ +private: + unsigned *gravmask; + + float *th_ogravmap; + float *th_gravmap; + float *th_gravx; + float *th_gravy; + float *th_gravp; + + int th_gravchanged; + + pthread_t gravthread; + pthread_mutex_t gravmutex; + pthread_cond_t gravcv; + int grav_ready; + int gravthread_done; + + //Simulation * sim; +public: + float *gravmap; + float *gravp; + float *gravy; + float *gravx; + unsigned char (*bmap)[XRES/CELL]; + int ngrav_enable; + void grav_mask_r(int x, int y, char checkmap[YRES/CELL][XRES/CELL], char shape[YRES/CELL][XRES/CELL], char *shapeout); + void mask_free(mask_el *c_mask_el); + + void gravity_init(); + void gravity_cleanup(); + void gravity_update_async(); + + static void *update_grav_async_helper(void * context); + void update_grav_async(); + + void start_grav_async(); + void stop_grav_async(); + void update_grav(); + void gravity_mask(); + + void bilinear_interpolation(float *src, float *dst, int sw, int sh, int rw, int rh); + + #ifdef GRAVFFT + void grav_fft_init(); + void grav_fft_cleanup(); + #endif + + Gravity(); +}; + +/*extern int ngrav_enable; //Newtonian gravity +extern int gravwl_timeout; +extern int gravityMode;*/ + +/*float *gravmap;//Maps to be used by the main thread +float *gravp; +float *gravy; +float *gravx; +unsigned *gravmask; + +float *th_ogravmap;// Maps to be processed by the gravity thread +float *th_gravmap; +float *th_gravx; +float *th_gravy; +float *th_gravp;*/ + + +#endif diff --git a/includes/Misc.h b/includes/Misc.h new file mode 100644 index 0000000..c5a61ef --- /dev/null +++ b/includes/Misc.h @@ -0,0 +1,108 @@ +#ifndef UTILS_H +#define UTILS_H +#include +#include + +#if defined(WIN32) && !defined(__GNUC__) +#define x86_cpuid(func,af,bf,cf,df) \ + do {\ + __asm mov eax, func\ + __asm cpuid\ + __asm mov af, eax\ + __asm mov bf, ebx\ + __asm mov cf, ecx\ + __asm mov df, edx\ + } while(0) +#else +#define x86_cpuid(func,af,bf,cf,df) \ +__asm__ __volatile ("cpuid":\ + "=a" (af), "=b" (bf), "=c" (cf), "=d" (df) : "a" (func)); +#endif + +static char hex[] = "0123456789ABCDEF"; + +char *exe_name(void); + +//Signum function +int isign(float i); + +unsigned clamp_flt(float f, float min, float max); + +float restrict_flt(float f, float min, float max); + +char *mystrdup(char *s); + +struct strlist +{ + char *str; + struct strlist *next; +}; + +void strlist_add(struct strlist **list, char *str); + +int strlist_find(struct strlist **list, char *str); + +void strlist_free(struct strlist **list); + +void save_presets(int do_update); + +void clean_text(char *text, int vwidth); + +void load_presets(void); + +void save_string(FILE *f, char *str); + +int sregexp(const char *str, char *pattern); + +int load_string(FILE *f, char *str, int max); + +void strcaturl(char *dst, char *src); + +void strappend(char *dst, char *src); + +void *file_load(char *fn, int *size); + +void clipboard_push_text(char * text); + +char * clipboard_pull_text(); + +extern char *clipboard_text; + +int register_extension(); + +int cpu_check(void); + +void HSV_to_RGB(int h,int s,int v,int *r,int *g,int *b); + +void RGB_to_HSV(int r,int g,int b,int *h,int *s,int *v); + +void membwand(void * dest, void * src, size_t destsize, size_t srcsize); +// a b +// c d + +struct matrix2d { + float a,b,c,d; +}; +typedef struct matrix2d matrix2d; + +// column vector +struct vector2d { + float x,y; +}; +typedef struct vector2d vector2d; + +matrix2d m2d_multiply_m2d(matrix2d m1, matrix2d m2); +vector2d m2d_multiply_v2d(matrix2d m, vector2d v); +matrix2d m2d_multiply_float(matrix2d m, float s); +vector2d v2d_multiply_float(vector2d v, float s); + +vector2d v2d_add(vector2d v1, vector2d v2); +vector2d v2d_sub(vector2d v1, vector2d v2); + +matrix2d m2d_new(float me0, float me1, float me2, float me3); +vector2d v2d_new(float x, float y); + +extern vector2d v2d_zero; +extern matrix2d m2d_identity; + +#endif diff --git a/includes/Renderer.h b/includes/Renderer.h new file mode 100644 index 0000000..39c8c1a --- /dev/null +++ b/includes/Renderer.h @@ -0,0 +1,60 @@ +#ifndef RENDERER_H +#define RENDERER_H + +#include "Config.h" +#include "Simulation.h" +#include "Graphics.h" + +class Simulation; + +class Graphics; + +struct gcache_item +{ + int isready; + int pixel_mode; + int cola, colr, colg, colb; + int firea, firer, fireg, fireb; +}; +typedef struct gcache_item gcache_item; + +class Renderer +{ +public: + //TODO: Vectors! + unsigned int *render_modes; + unsigned int render_mode; + unsigned int colour_mode; + unsigned int *display_modes; + unsigned int display_mode; + // + unsigned char fire_r[YRES/CELL][XRES/CELL]; + unsigned char fire_g[YRES/CELL][XRES/CELL]; + unsigned char fire_b[YRES/CELL][XRES/CELL]; + unsigned int fire_alpha[CELL*3][CELL*3]; + char * flm_data; + char * plasma_data; + int emp_decor; + // + int decorations_enable; + Simulation * sim; + Graphics * g; + gcache_item *graphicscache; + // + void draw_walls(); + void render_signs(); + void render_gravlensing(); + void render_fire(); + void prepare_alpha(int size, float intensity); + void render_parts(); + void draw_grav_zones(); + void draw_air(); + void draw_grav(); + void draw_other(); + void init_display_modes(); + void get_sign_pos(int i, int *x0, int *y0, int *w, int *h); + void prepare_graphicscache(); + Renderer(Graphics * g, Simulation * sim); +}; + +#endif diff --git a/includes/Simulation.h b/includes/Simulation.h new file mode 100644 index 0000000..b3c51af --- /dev/null +++ b/includes/Simulation.h @@ -0,0 +1,241 @@ +/* + * Simulation.h + * + * Created on: Jan 2, 2012 + * Author: Simon + */ + +#ifndef SIMULATION_H_ +#define SIMULATION_H_ +#include +#include "Config.h" +#include "Renderer.h" +#include "Graphics.h" +#include "Elements.h" +#include "misc.h" + +#define CHANNELS ((int)(MAX_TEMP-73)/100+2) + +class Simulation; +class Renderer; +class Gravity; +class Air; + +struct Particle +{ + int type; + int life, ctype; + float x, y, vx, vy; + float temp; + float pavg[2]; + int flags; + int tmp; + int tmp2; + unsigned int dcolour; +}; +typedef struct Particle Particle; + +struct sign +{ + int x,y,ju; + char text[256]; +}; +typedef struct sign sign; + +struct part_type +{ + char *name; + pixel pcolors; + float advection; + float airdrag; + float airloss; + float loss; + float collision; + float gravity; + float diffusion; + float hotair; + int falldown; + int flammable; + int explosive; + int meltable; + int hardness; + int menu; + int enabled; + int weight; + int menusection; + float heat; + unsigned char hconduct; + char *descs; + char state; + unsigned int properties; + int (*update_func) (UPDATE_FUNC_ARGS); + int (*graphics_func) (GRAPHICS_FUNC_ARGS); +}; +typedef struct part_type part_type; + +struct part_transition +{ + float plv; // transition occurs if pv is lower than this + int plt; + float phv; // transition occurs if pv is higher than this + int pht; + float tlv; // transition occurs if t is lower than this + int tlt; + float thv; // transition occurs if t is higher than this + int tht; +}; +typedef struct part_transition part_transition; + +struct playerst +{ + char comm; //command cell + char pcomm; //previous command + int elem; //element power + float legs[16]; //legs' positions + float accs[8]; //accelerations + char spwn; //if stick man was spawned + unsigned int frames; //frames since last particle spawn - used when spawning LIGH +}; +typedef struct playerst playerst; + +struct wall_type +{ + pixel colour; + pixel eglow; // if emap set, add this to fire glow + int drawstyle; + const char *descs; +}; +typedef struct wall_type wall_type; + +struct gol_menu +{ + const char *name; + pixel colour; + int goltype; + const char *description; +}; +typedef struct gol_menu gol_menu; + +//#ifdef _cplusplus +class Simulation +{ +private: +public: + + Gravity * grav; + Air * air; + part_type ptypes[PT_NUM]; + part_transition ptransitions[PT_NUM]; + wall_type wtypes[UI_WALLCOUNT]; + gol_menu gmenu[NGOL]; + int goltype[NGOL]; + int grule[NGOL+1][10]; + playerst player; + playerst player2; + playerst fighters[256]; //255 is the maximum number of fighters + unsigned char fighcount; //Contains the number of fighters + int lighting_recreate; + int gravwl_timeout; + Particle portalp[CHANNELS][8][80]; + Particle emptyparticle; + int portal_rx[8]; + int portal_ry[8]; + int wireless[CHANNELS][2]; + char can_move[PT_NUM][PT_NUM]; + int parts_lastActiveIndex;// = NPART-1; + int pfree; + int NUM_PARTS; + int elementCount[PT_NUM]; + int ISWIRE; + sign * signs; + //Gol sim + int CGOL; + int ISGOL; + int GSPEED; + unsigned char gol[XRES][YRES]; + unsigned char gol2[XRES][YRES][NGOL+1]; + //Air sim + float (*vx)[XRES/CELL]; + float (*vy)[XRES/CELL]; + float (*pv)[XRES/CELL]; + float (*hv)[XRES/CELL]; + //Gravity sim + float *gravx;//gravx[(YRES/CELL) * (XRES/CELL)]; + float *gravy;//gravy[(YRES/CELL) * (XRES/CELL)]; + float *gravp;//gravp[(YRES/CELL) * (XRES/CELL)]; + float *gravmap;//gravmap[(YRES/CELL) * (XRES/CELL)]; + //Walls + unsigned char bmap[YRES/CELL][XRES/CELL]; + unsigned char emap[YRES/CELL][XRES/CELL]; + float fvx[YRES/CELL][XRES/CELL]; + float fvy[YRES/CELL][XRES/CELL]; + //Particles + Particle parts[NPART]; + int pmap[YRES][XRES]; + int photons[YRES][XRES]; + // + int gravityMode; + int airMode; + int ngrav_enable; + int legacy_enable; + int aheat_enable; + int VINE_MODE; + int water_equal_test; + int sys_pause; + int framerender; + int pretty_powder; + // + int sandcolour_r; + int sandcolour_g; + int sandcolour_b; //TODO: Make a single variable + //Stuff + int is_blocking(int t, int x, int y); + int is_boundary(int pt, int x, int y); + int find_next_boundary(int pt, int *x, int *y, int dm, int *em); + int pn_junction_sprk(int x, int y, int pt); + void photoelectric_effect(int nx, int ny); + unsigned direction_to_map(float dx, float dy, int t); + int do_move(int i, int x, int y, float nxf, float nyf); + int try_move(int i, int x, int y, int nx, int ny); + int eval_move(int pt, int nx, int ny, unsigned *rr); + void init_can_move(); + void create_cherenkov_photon(int pp); + void create_gain_photon(int pp); + void kill_part(int i); + int flood_prop(int x, int y, size_t propoffset, void * propvalue, int proptype); + int flood_prop_2(int x, int y, size_t propoffset, void * propvalue, int proptype, int parttype, char * bitmap); + int flood_water(int x, int y, int i, int originaly, int check); + void detach(int i); + void part_change_type(int i, int x, int y, int t); + int create_part_add_props(int p, int x, int y, int tv, int rx, int ry); + //int InCurrentBrush(int i, int j, int rx, int ry); + //int get_brush_flags(); + int create_part(int p, int x, int y, int t); + void delete_part(int x, int y, int flags); + int is_wire(int x, int y); + int is_wire_off(int x, int y); + void set_emap(int x, int y); + int parts_avg(int ci, int ni, int t); + void create_arc(int sx, int sy, int dx, int dy, int midpoints, int variance, int type, int flags); + int nearest_part(int ci, int t, int max_d); + void update_particles_i(int start, int inc); + void update_particles(); + void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert); + void clear_area(int area_x, int area_y, int area_w, int area_h); + void create_box(int x1, int y1, int x2, int y2, int c, int flags); + int flood_parts(int x, int y, int c, int cm, int bm, int flags); + int create_parts(int x, int y, int rx, int ry, int c, int flags); + void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags); + void *transform_save(void *odata, int *size, matrix2d transform, vector2d translate); + void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]); + void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]); + int get_wavelength_bin(int *wm); + int get_normal(int pt, int x, int y, float dx, float dy, float *nx, float *ny); + int get_normal_interp(int pt, float x0, float y0, float dx, float dy, float *nx, float *ny); + void clear_sim(); + void UpdateParticles(); + Simulation(); +}; +//#endif + +#endif /* SIMULATION_H_ */ diff --git a/includes/interface/Button.h b/includes/interface/Button.h new file mode 100644 index 0000000..1b2900e --- /dev/null +++ b/includes/interface/Button.h @@ -0,0 +1,42 @@ +/* + * Button.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef BUTTON_H_ +#define BUTTON_H_ + +#include + +#include "Component.h" + +namespace ui +{ + class Button : public Component + { + public: + Button(int x, int y, int width, int height, const std::string& buttonText); + + bool Toggleable; + + std::string ButtonText; + + virtual void OnMouseClick(int x, int y, unsigned int button); + virtual void OnMouseUnclick(int x, int y, unsigned int button); + virtual void OnMouseUp(int x, int y, unsigned int button); + + virtual void OnMouseEnter(int x, int y, int dx, int dy); + virtual void OnMouseLeave(int x, int y, int dx, int dy); + + virtual void Draw(void* userdata); + + inline bool GetState() { return state; } + virtual void DoAction(); //action of button what ever it may be + + protected: + bool isButtonDown, state, isMouseInside; + }; +} +#endif /* BUTTON_H_ */ diff --git a/includes/interface/Component.h b/includes/interface/Component.h new file mode 100644 index 0000000..a4d02db --- /dev/null +++ b/includes/interface/Component.h @@ -0,0 +1,53 @@ +/* + * Component.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef COMPONENT_H_ +#define COMPONENT_H_ + +namespace ui +{ + class State; + + class Component + { + public: + Component(int x, int y, int width, int height); + virtual ~Component(); + + inline void LocalizePoint(int& x, int& y) { x -= X; y -= Y; } //convert a global point (point on the state) to a point based on component's position + inline void GlobalizePoint(int& x, int& y) { x += X; y += Y; } //convert a local point based on component's position to a global point on the state + + bool Focused; + bool Visible; + bool Enabled; + int Width; + int Height; + int X; + int Y; + + virtual void Tick(float dt); + virtual void Draw(void* userdata); + + virtual void OnMouseEnter(int localx, int localy, int dx, int dy); + virtual void OnMouseLeave(int localx, int localy, int dx, int dy); + virtual void OnMouseMoved(int localx, int localy, int dx, int dy); + virtual void OnMouseMovedInside(int localx, int localy, int dx, int dy); + virtual void OnMouseHover(int localx, int localy); + virtual void OnMouseDown(int localx, int localy, unsigned int button); + virtual void OnMouseUp(int localx, int localy, unsigned int button); + virtual void OnMouseClick(int localx, int localy, unsigned int button); + virtual void OnMouseUnclick(int localx, int localy, unsigned int button); + virtual void OnMouseWheel(int localx, int localy, int d); + virtual void OnMouseWheelInside(int localx, int localy, int d); + virtual void OnMouseWheelFocused(int localx, int localy, int d); + virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + + State* Parent; + }; +} +#endif /* COMPONENT_H_ */ diff --git a/includes/interface/Panel.h b/includes/interface/Panel.h new file mode 100644 index 0000000..9549ff4 --- /dev/null +++ b/includes/interface/Panel.h @@ -0,0 +1,22 @@ +/* + * Panel.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef PANEL_H_ +#define PANEL_H_ + +#include "interface/Component.h" + +namespace ui { + +class Panel: public ui::Component { +public: + Panel(int x, int y, int width, int height); + virtual ~Panel(); +}; + +} /* namespace ui */ +#endif /* PANEL_H_ */ diff --git a/includes/interface/Sandbox.h b/includes/interface/Sandbox.h new file mode 100644 index 0000000..10d588f --- /dev/null +++ b/includes/interface/Sandbox.h @@ -0,0 +1,33 @@ +/* + * Sandbox.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef SANDBOX_H_ +#define SANDBOX_H_ + +#include "Component.h" +#include "Simulation.h" +#include "Renderer.h" + +namespace ui { + +class Sandbox: public ui::Component { +private: + bool isMouseDown; + Renderer * ren; + Simulation * sim; +public: + Sandbox(); + virtual void OnMouseMovedInside(int localx, int localy, int dx, int dy); + virtual void OnMouseDown(int localx, int localy, unsigned int button); + virtual void OnMouseUp(int localx, int localy, unsigned int button); + virtual void Draw(void* userdata); + virtual void Tick(float delta); + virtual ~Sandbox(); +}; + +} /* namespace ui */ +#endif /* SANDBOX_H_ */ diff --git a/includes/interface/State.h b/includes/interface/State.h new file mode 100644 index 0000000..00df199 --- /dev/null +++ b/includes/interface/State.h @@ -0,0 +1,61 @@ +/* + * State.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef STATE_H_ +#define STATE_H_ + +#include + +#include "interface/Component.h" + +namespace ui { + +class State +{ +public: + State(int w, int h); + virtual ~State(); + + bool AllowExclusiveDrawing; //false will not call draw on objects outside of bounds + + virtual void Tick(float dt); + virtual void Draw(void* userdata); + + virtual void OnMouseMove(int x, int y); + virtual void OnMouseDown(int x, int y, unsigned int button); + virtual void OnMouseUp(int x, int y, unsigned int button); + virtual void OnMouseWheel(int x, int y, int d); + virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + + virtual void Add(Component *child); + virtual void Remove(Component *child); + + inline bool IsFocused(Component* c) { return (c == focusedComponent_); } + inline int GetMouseX() { return mouseX; } + inline int GetMouseY() { return mouseY; } + inline int GetWidth() { return width; } + inline int GetHeight() { return height; } + +protected: + std::vector Components; + + int width; + int height; + + int mouseX; + int mouseY; + int mouseXP; + int mouseYP; + +private: + Component* focusedComponent_; + +}; + +} /* namespace ui */ +#endif /* STATE_H_ */ diff --git a/includes/interface/Window.h b/includes/interface/Window.h new file mode 100644 index 0000000..86a4bcd --- /dev/null +++ b/includes/interface/Window.h @@ -0,0 +1,22 @@ +/* + * Window.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef WINDOW_H_ +#define WINDOW_H_ + +#include "interface/State.h" + +namespace ui { + +class Window: public ui::State { +public: + Window(); + virtual ~Window(); +}; + +} /* namespace ui */ +#endif /* WINDOW_H_ */ diff --git a/src/Air.cpp b/src/Air.cpp new file mode 100644 index 0000000..2d8d1b5 --- /dev/null +++ b/src/Air.cpp @@ -0,0 +1,301 @@ +#include +#include "Config.h" +#include "Air.h" +//#include +//#include +#include "gravity.h" + +/*float kernel[9]; + +float vx[YRES/CELL][XRES/CELL], ovx[YRES/CELL][XRES/CELL]; +float vy[YRES/CELL][XRES/CELL], ovy[YRES/CELL][XRES/CELL]; +float pv[YRES/CELL][XRES/CELL], opv[YRES/CELL][XRES/CELL]; +unsigned char bmap_blockair[YRES/CELL][XRES/CELL]; + +float cb_vx[YRES/CELL][XRES/CELL]; +float cb_vy[YRES/CELL][XRES/CELL]; +float cb_pv[YRES/CELL][XRES/CELL]; +float cb_hv[YRES/CELL][XRES/CELL]; + +float fvx[YRES/CELL][XRES/CELL], fvy[YRES/CELL][XRES/CELL]; + +float hv[YRES/CELL][XRES/CELL], ohv[YRES/CELL][XRES/CELL]; // For Ambient Heat */ + +void Air::make_kernel(void) //used for velocity +{ + int i, j; + float s = 0.0f; + for (j=-1; j<2; j++) + for (i=-1; i<2; i++) + { + kernel[(i+1)+3*(j+1)] = expf(-2.0f*(i*i+j*j)); + s += kernel[(i+1)+3*(j+1)]; + } + s = 1.0f / s; + for (j=-1; j<2; j++) + for (i=-1; i<2; i++) + kernel[(i+1)+3*(j+1)] *= s; +} +void Air::update_airh(void) +{ + int x, y, i, j; + float dh, dx, dy, f, tx, ty; + for (i=0; i0 && y+j0 && x+i=2 && i=2 && j0) + vy[y][x] -= airdiff/5000.0f; + } + ohv[y][x] = dh; + } + } + memcpy(hv, ohv, sizeof(hv)); +} + +void Air::update_air(void) +{ + int x, y, i, j; + float dp, dx, dy, f, tx, ty; + + for (y=0; y0 && y+j0 && x+i=2 && i=2 && j 256.0f) dp = 256.0f; + if (dp < -256.0f) dp = -256.0f; + if (dx > 256.0f) dx = 256.0f; + if (dx < -256.0f) dx = -256.0f; + if (dy > 256.0f) dy = 256.0f; + if (dy < -256.0f) dy = -256.0f; + + + switch (airMode) + { + default: + case 0: //Default + break; + case 1: //0 Pressure + dp = 0.0f; + break; + case 2: //0 Velocity + dx = 0.0f; + dy = 0.0f; + break; + case 3: //0 Air + dx = 0.0f; + dy = 0.0f; + dp = 0.0f; + break; + case 4: //No Update + break; + } + + ovx[y][x] = dx; + ovy[y][x] = dy; + opv[y][x] = dp; + } + memcpy(vx, ovx, sizeof(vx)); + memcpy(vy, ovy, sizeof(vy)); + memcpy(pv, opv, sizeof(pv)); + } +} +Air::Air() +{ + //Simulation should do this. + make_kernel(); +} diff --git a/src/Graphics.cpp b/src/Graphics.cpp new file mode 100644 index 0000000..52fa4c9 --- /dev/null +++ b/src/Graphics.cpp @@ -0,0 +1,2359 @@ +#include +#include +#include +#include + +#if defined(OGLR) +#ifdef MACOSX +#include +#include +#include +#elif defined(WIN32) +#include +#include +#include +#else +#include +#include +#endif +#endif + +#include "Config.h" +#include "air.h" +#include "gravity.h" +//#include "powder.h" +#define INCLUDE_PSTRUCT +#include "Simulation.h" +#include "Graphics.h" +#include "ElementGraphics.h" +#define INCLUDE_FONTDATA +#include "font.h" +#include "misc.h" +#include "hmap.h" + +//unsigned cmode = CM_FIRE; +unsigned int *render_modes; +unsigned int render_mode; +unsigned int colour_mode; +unsigned int *display_modes; +unsigned int display_mode; + +//SDL_Surface *sdl_scrn; +int sdl_scale = 1; + +#ifdef OGLR +GLuint zoomTex, vidBuf, airBuf, fireAlpha, glowAlpha, blurAlpha, partsFboTex, partsFbo, partsTFX, partsTFY, airPV, airVY, airVX; +GLuint fireProg, airProg_Pressure, airProg_Velocity, airProg_Cracker, lensProg; +#endif + +/* +int emp_decor = 0; +int sandcolour_r = 0; +int sandcolour_g = 0; +int sandcolour_b = 0; +int sandcolour_frame = 0; + +unsigned char fire_r[YRES/CELL][XRES/CELL]; +unsigned char fire_g[YRES/CELL][XRES/CELL]; +unsigned char fire_b[YRES/CELL][XRES/CELL]; + +unsigned int fire_alpha[CELL*3][CELL*3]; +pixel *pers_bg; + +char * flm_data; +int flm_data_points = 4; +pixel flm_data_colours[] = {PIXPACK(0xAF9F0F), PIXPACK(0xDFBF6F), PIXPACK(0x60300F), PIXPACK(0x000000)}; +float flm_data_pos[] = {1.0f, 0.9f, 0.5f, 0.0f}; + +char * plasma_data; +int plasma_data_points = 5; +pixel plasma_data_colours[] = {PIXPACK(0xAFFFFF), PIXPACK(0xAFFFFF), PIXPACK(0x301060), PIXPACK(0x301040), PIXPACK(0x000000)}; +float plasma_data_pos[] = {1.0f, 0.9f, 0.5f, 0.25, 0.0f};*/ + +char * Graphics::generate_gradient(pixel * colours, float * points, int pointcount, int size) +{ + int cp, i, j; + pixel ptemp; + char * newdata = (char*)malloc(size * 3); + float poss, pose, temp; + memset(newdata, 0, size*3); + //Sort the Colours and Points + for (i = (pointcount - 1); i > 0; i--) + { + for (j = 1; j <= i; j++) + { + if (points[j-1] > points[j]) + { + temp = points[j-1]; + points[j-1] = points[j]; + points[j] = temp; + + ptemp = colours[j-1]; + colours[j-1] = colours[j]; + colours[j] = ptemp; + } + } + } + i = 0; + j = 1; + poss = points[i]; + pose = points[j]; + for (cp = 0; cp < size; cp++) + { + float cpos = (float)cp / (float)size, ccpos, cccpos; + if(cpos > pose && j+1 < pointcount) + { + poss = points[++i]; + pose = points[++j]; + } + ccpos = cpos - poss; + cccpos = ccpos / (pose - poss); + if(cccpos > 1.0f) + cccpos = 1.0f; + newdata[(cp*3)] = PIXR(colours[i])*(1.0f-cccpos) + PIXR(colours[j])*(cccpos); + newdata[(cp*3)+1] = PIXG(colours[i])*(1.0f-cccpos) + PIXG(colours[j])*(cccpos); + newdata[(cp*3)+2] = PIXB(colours[i])*(1.0f-cccpos) + PIXB(colours[j])*(cccpos); + } + return newdata; +} + +void *Graphics::ptif_pack(pixel *src, int w, int h, int *result_size){ + int i = 0, datalen = (w*h)*3, cx = 0, cy = 0; + unsigned char *red_chan = (unsigned char*)calloc(1, w*h); + unsigned char *green_chan = (unsigned char*)calloc(1, w*h); + unsigned char *blue_chan = (unsigned char*)calloc(1, w*h); + unsigned char *data = (unsigned char*)malloc(((w*h)*3)+8); + unsigned char *result = (unsigned char*)malloc(((w*h)*3)+8); + + for(cx = 0; cx>8; + result[6] = h; + result[7] = h>>8; + + i -= 8; + + if(BZ2_bzBuffToBuffCompress((char *)(result+8), (unsigned *)&i, (char *)data, datalen, 9, 0, 0) != 0){ + free(data); + free(result); + return NULL; + } + + *result_size = i+8; + free(data); + return result; +} + +pixel *Graphics::ptif_unpack(void *datain, int size, int *w, int *h){ + int width, height, i, cx, cy, resCode; + unsigned char *red_chan; + unsigned char *green_chan; + unsigned char *blue_chan; + unsigned char *data = (unsigned char*)datain; + unsigned char *undata; + pixel *result; + if(size<16){ + printf("Image empty\n"); + return NULL; + } + if(!(data[0]=='P' && data[1]=='T' && data[2]=='i')){ + printf("Image header invalid\n"); + return NULL; + } + width = data[4]|(data[5]<<8); + height = data[6]|(data[7]<<8); + + i = (width*height)*3; + undata = (unsigned char*)calloc(1, (width*height)*3); + red_chan = (unsigned char*)calloc(1, width*height); + green_chan = (unsigned char*)calloc(1, width*height); + blue_chan = (unsigned char *)calloc(1, width*height); + result = (pixel *)calloc(width*height, PIXELSIZE); + + resCode = BZ2_bzBuffToBuffDecompress((char *)undata, (unsigned *)&i, (char *)(data+8), size-8, 0, 0); + if (resCode){ + printf("Decompression failure, %d\n", resCode); + free(red_chan); + free(green_chan); + free(blue_chan); + free(undata); + free(result); + return NULL; + } + if(i != (width*height)*3){ + printf("Result buffer size mismatch, %d != %d\n", i, (width*height)*3); + free(red_chan); + free(green_chan); + free(blue_chan); + free(undata); + free(result); + return NULL; + } + memcpy(red_chan, undata, width*height); + memcpy(green_chan, undata+(width*height), width*height); + memcpy(blue_chan, undata+((width*height)*2), width*height); + + for(cx = 0; cx sw && rh > sh){ + float fx, fy, fyc, fxc; + double intp; + pixel tr, tl, br, bl; + q = (pixel *)malloc(rw*rh*PIXELSIZE); + //Bilinear interpolation for upscaling + for (y=0; y=sw) fxceil = sw-1; + if (fyceil>=sh) fyceil = sh-1; + tr = src[sw*(int)floor(fy)+fxceil]; + tl = src[sw*(int)floor(fy)+(int)floor(fx)]; + br = src[sw*fyceil+fxceil]; + bl = src[sw*fyceil+(int)floor(fx)]; + q[rw*y+x] = PIXRGB( + (int)(((((float)PIXR(tl))*(1.0f-fxc))+(((float)PIXR(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXR(bl))*(1.0f-fxc))+(((float)PIXR(br))*(fxc)))*(fyc)), + (int)(((((float)PIXG(tl))*(1.0f-fxc))+(((float)PIXG(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXG(bl))*(1.0f-fxc))+(((float)PIXG(br))*(fxc)))*(fyc)), + (int)(((((float)PIXB(tl))*(1.0f-fxc))+(((float)PIXB(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXB(bl))*(1.0f-fxc))+(((float)PIXB(br))*(fxc)))*(fyc)) + ); + } + } else { + //Stairstepping + float fx, fy, fyc, fxc; + double intp; + pixel tr, tl, br, bl; + int rrw = rw, rrh = rh; + pixel * oq; + oq = (pixel *)malloc(sw*sh*PIXELSIZE); + memcpy(oq, src, sw*sh*PIXELSIZE); + rw = sw; + rh = sh; + while(rrw != rw && rrh != rh){ + rw *= 0.7; + rh *= 0.7; + if(rw <= rrw || rh <= rrh){ + rw = rrw; + rh = rrh; + } + q = (pixel *)malloc(rw*rh*PIXELSIZE); + //Bilinear interpolation for upscaling + for (y=0; y=sw) fxceil = sw-1; + if (fyceil>=sh) fyceil = sh-1; + tr = oq[sw*(int)floor(fy)+fxceil]; + tl = oq[sw*(int)floor(fy)+(int)floor(fx)]; + br = oq[sw*fyceil+fxceil]; + bl = oq[sw*fyceil+(int)floor(fx)]; + q[rw*y+x] = PIXRGB( + (int)(((((float)PIXR(tl))*(1.0f-fxc))+(((float)PIXR(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXR(bl))*(1.0f-fxc))+(((float)PIXR(br))*(fxc)))*(fyc)), + (int)(((((float)PIXG(tl))*(1.0f-fxc))+(((float)PIXG(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXG(bl))*(1.0f-fxc))+(((float)PIXG(br))*(fxc)))*(fyc)), + (int)(((((float)PIXB(tl))*(1.0f-fxc))+(((float)PIXB(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXB(bl))*(1.0f-fxc))+(((float)PIXB(br))*(fxc)))*(fyc)) + ); + } + free(oq); + oq = q; + sw = rw; + sh = rh; + } + } + return q; +} + +pixel *Graphics::rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f) +{ + int i,j,x,y,w,h,r,g,b,c; + pixel p, *q; + w = (sw+f-1)/f; + h = (sh+f-1)/f; + q = (pixel *)malloc(w*h*PIXELSIZE); + for (y=0; y1) + { + r = (r+c/2)/c; + g = (g+c/2)/c; + b = (b+c/2)/c; + } + q[y*w+x] = PIXRGB(r, g, b); + } + *qw = w; + *qh = h; + return q; +} + +#ifdef OGLR +void clearScreen(float alpha) +{ + if(alpha > 0.999f) + { + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); + glClear(GL_COLOR_BUFFER_BIT); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + } + else + { + glBlendEquation(GL_FUNC_REVERSE_SUBTRACT); + glColor4f(1.0f, 1.0f, 1.0f, alpha); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); + glBegin(GL_QUADS); + glVertex2f(0, 0); + glVertex2f(XRES, 0); + glVertex2f(XRES, YRES); + glVertex2f(0, YRES); + glEnd(); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + glBlendEquation(GL_FUNC_ADD); + } + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); +} + +void clearScreenNP(float alpha) +{ + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); +} + +void ogl_blit(int x, int y, int w, int h, pixel *src, int pitch, int scale) +{ + + //glDrawPixels(w,h,GL_BGRA,GL_UNSIGNED_BYTE,src); //Why does this still think it's ABGR? + glEnable( GL_TEXTURE_2D ); + glBindTexture(GL_TEXTURE_2D, vidBuf); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES+BARSIZE, YRES+MENUSIZE, GL_BGRA, GL_UNSIGNED_BYTE, src); + glBegin(GL_QUADS); + glTexCoord2d(1, 0); + glVertex3f((XRES+BARSIZE)*sdl_scale, (YRES+MENUSIZE)*sdl_scale, 1.0); + glTexCoord2d(0, 0); + glVertex3f(0, (YRES+MENUSIZE)*sdl_scale, 1.0); + glTexCoord2d(0, 1); + glVertex3f(0, 0, 1.0); + glTexCoord2d(1, 1); + glVertex3f((XRES+BARSIZE)*sdl_scale, 0, 1.0); + glEnd(); + + glDisable( GL_TEXTURE_2D ); + glFlush(); + SDL_GL_SwapBuffers (); +} +#endif + +//an easy way to draw a blob +void Graphics::drawblob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb) +{ + blendpixel(x+1, y, cr, cg, cb, 112); + blendpixel(x-1, y, cr, cg, cb, 112); + blendpixel(x, y+1, cr, cg, cb, 112); + blendpixel(x, y-1, cr, cg, cb, 112); + + blendpixel(x+1, y-1, cr, cg, cb, 64); + blendpixel(x-1, y-1, cr, cg, cb, 64); + blendpixel(x+1, y+1, cr, cg, cb, 64); + blendpixel(x-1, y+1, cr, cg, cb, 64); +} + +//draws walls and elements for menu +/*int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc) +{ + int i, j, c; + pixel gc; + if (x > XRES-26 || x < 0) + return 26; + if ((b&0xFF) == PT_LIFE) + { + for (j=1; j<15; j++) + { + for (i=1; i<27; i++) + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + } + } + c = PIXB(pc) + 3*PIXG(pc) + 2*PIXR(pc); + if (c<544) + { + c = 255; + } + else + { + c = 0; + } + drawtext(vid_buf, x+14-textwidth((char *)gmenu[(b>>8)&0xFF].name)/2, y+4, (char *)gmenu[(b>>8)&0xFF].name, c, c, c, 255); + } + else if (b>=UI_WALLSTART) + { + int ds = 0; + if (b-UI_WALLSTART>=0 && b-UI_WALLSTART>1)); i<27; i+=2) + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + } + else if (ds==2) + { + for (j=1; j<15; j+=2) + for (i=1; i<27; i+=2) + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + } + else if (ds==3) + { + for (j=1; j<15; j++) + for (i=1; i<27; i++) + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + } + else if (ds==4) + { + for (j=1; j<15; j++) + for (i=1; i<27; i++) + if(i%CELL == j%CELL) + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + else if (i%CELL == (j%CELL)+1 || (i%CELL == 0 && j%CELL == CELL-1)) + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = gc; + else + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = PIXPACK(0x202020); + } + else + switch (b) + { + case WL_WALLELEC+100: + for (j=1; j<15; j++) + { + for (i=1; i<27; i++) + { + if (!(i%2) && !(j%2)) + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + } + else + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = PIXPACK(0x808080); + } + } + } + break; + case WL_EWALL+100: + for (j=1; j<15; j++) + { + for (i=1; i<6+j; i++) + { + if (!(i&j&1)) + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + } + } + for (; i<27; i++) + { + if (i&j&1) + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + } + } + } + break; + case WL_STREAM+100: + for (j=1; j<15; j++) + { + for (i=1; i<27; i++) + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = i==1||i==26||j==1||j==14 ? PIXPACK(0xA0A0A0) : PIXPACK(0x000000); + drawtext(vid_buf, x+4, y+3, "\x8D", 255, 255, 255, 255); + } + } + for (i=9; i<27; i++) + { + drawpixel(vid_buf, x+i, y+8+(int)(3.9f*cos(i*0.3f)), 255, 255, 255, 255); + } + break; + case WL_SIGN+100: + for (j=1; j<15; j++) + { + for (i=1; i<27; i++) + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = i==1||i==26||j==1||j==14 ? PIXPACK(0xA0A0A0) : PIXPACK(0x000000); + } + } + drawtext(vid_buf, x+9, y+3, "\xA1", 32, 64, 128, 255); + drawtext(vid_buf, x+9, y+3, "\xA0", 255, 255, 255, 255); + break; + case WL_ERASE+100: + for (j=1; j<15; j+=2) + { + for (i=1+(1&(j>>1)); i<13; i+=2) + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + } + } + for (j=1; j<15; j++) + { + for (i=14; i<27; i++) + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + } + } + break; + case SPC_AIR: + case SPC_HEAT: + case SPC_COOL: + case SPC_VACUUM: + case SPC_WIND: + case SPC_PGRV: + case SPC_NGRV: + case SPC_PROP: + for (j=1; j<15; j++) + for (i=1; i<27; i++) + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + c = PIXR(pc) + 3*PIXG(pc) + 2*PIXB(pc); + if (c<544) + { + c = 255; + } + else + { + c = 0; + } + if (b==SPC_AIR) + drawtext(vid_buf, x+14-textwidth("AIR")/2, y+4, "AIR", c, c, c, 255); + else if (b==SPC_HEAT) + drawtext(vid_buf, x+14-textwidth("HEAT")/2, y+4, "HEAT", c, c, c, 255); + else if (b==SPC_COOL) + drawtext(vid_buf, x+14-textwidth("COOL")/2, y+4, "COOL", c, c, c, 255); + else if (b==SPC_VACUUM) + drawtext(vid_buf, x+14-textwidth("VAC")/2, y+4, "VAC", c, c, c, 255); + else if (b==SPC_WIND) + drawtext(vid_buf, x+14-textwidth("WIND")/2, y+4, "WIND", c, c, c, 255); + else if (b==SPC_PGRV) + drawtext(vid_buf, x+14-textwidth("PGRV")/2, y+4, "PGRV", c, c, c, 255); + else if (b==SPC_NGRV) + drawtext(vid_buf, x+14-textwidth("NGRV")/2, y+4, "NGRV", c, c, c, 255); + else if (b==SPC_PROP) + drawtext(vid_buf, x+14-textwidth("PROP")/2, y+4, "PROP", c, c, c, 255); + break; + default: + for (j=1; j<15; j++) + for (i=1; i<27; i++) + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + } + if (b==WL_ERASE+100) + { + for (j=4; j<12; j++) + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+j+6)] = PIXPACK(0xFF0000); + vid_buf[(XRES+BARSIZE)*(y+j)+(x+j+7)] = PIXPACK(0xFF0000); + vid_buf[(XRES+BARSIZE)*(y+j)+(x-j+21)] = PIXPACK(0xFF0000); + vid_buf[(XRES+BARSIZE)*(y+j)+(x-j+22)] = PIXPACK(0xFF0000); + } + } + } + else + { + //x = 2+32*(b/2); + //y = YRES+2+20*(b%2); + for (j=1; j<15; j++) + { + for (i=1; i<27; i++) + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + } + } + if (b==0) + { + for (j=4; j<12; j++) + { + vid_buf[(XRES+BARSIZE)*(y+j)+(x+j+6)] = PIXPACK(0xFF0000); + vid_buf[(XRES+BARSIZE)*(y+j)+(x+j+7)] = PIXPACK(0xFF0000); + vid_buf[(XRES+BARSIZE)*(y+j)+(x-j+21)] = PIXPACK(0xFF0000); + vid_buf[(XRES+BARSIZE)*(y+j)+(x-j+22)] = PIXPACK(0xFF0000); + } + } + c = PIXB(ptypes[b].pcolors) + 3*PIXG(ptypes[b].pcolors) + 2*PIXR(ptypes[b].pcolors); + if (c<544) + { + c = 255; + } + else + { + c = 0; + } + drawtext(vid_buf, x+14-textwidth((char *)ptypes[b].name)/2, y+4, (char *)ptypes[b].name, c, c, c, 255); + } + return 26; +}*/ + +/*void draw_menu(pixel *vid_buf, int i, int hover) +{ + if (i==SEC&&SEC!=0) + drawrect(vid_buf, (XRES+BARSIZE)-16, (i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16), 14, 14, 0, 255, 255, 255); + else + drawrect(vid_buf, (XRES+BARSIZE)-16, (i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16), 14, 14, 255, 255, 255, 255); + if (hover==i) + { + fillrect(vid_buf, (XRES+BARSIZE)-16, (i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16), 14, 14, 255, 255, 255, 255); + drawtext(vid_buf, (XRES+BARSIZE)-13, (i*16)+YRES+MENUSIZE-14-(SC_TOTAL*16), msections[i].icon, 0, 0, 0, 255); + } + else + { + drawtext(vid_buf, (XRES+BARSIZE)-13, (i*16)+YRES+MENUSIZE-14-(SC_TOTAL*16), msections[i].icon, 255, 255, 255, 255); + } +}*/ + +/*void draw_color_menu(pixel *vid_buf, int i, int hover) +{ + drawrect(vid_buf, (XRES+BARSIZE)-16, (i*16)+YRES+MENUSIZE-16-(DECO_SECTIONS*16), 14, 14, 255, 255, 255, 255); + if (hover==i) + { + fillrect(vid_buf, (XRES+BARSIZE)-16, (i*16)+YRES+MENUSIZE-16-(DECO_SECTIONS*16), 14, 14, 255, 255, 255, 255); + drawtext(vid_buf, (XRES+BARSIZE)-13, (i*16)+YRES+MENUSIZE-14-(DECO_SECTIONS*16), colorsections[i].icon, 0, 0, 0, 255); + } + else + { + drawtext(vid_buf, (XRES+BARSIZE)-13, (i*16)+YRES+MENUSIZE-14-(DECO_SECTIONS*16), colorsections[i].icon, 255, 255, 255, 255); + } +}*/ + +//draws a pixel, identical to blendpixel(), except blendpixel has OpenGL support +TPT_INLINE void Graphics::drawpixel(int x, int y, int r, int g, int b, int a) +{ +#ifdef PIXALPHA + pixel t; + if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) + return; + if (a!=255) + { + t = vid[y*(XRES+BARSIZE)+x]; + r = (a*r + (255-a)*PIXR(t)) >> 8; + g = (a*g + (255-a)*PIXG(t)) >> 8; + b = (a*b + (255-a)*PIXB(t)) >> 8; + a = a > PIXA(t) ? a : PIXA(t); + } + vid[y*(XRES+BARSIZE)+x] = PIXRGBA(r,g,b,a); +#else + pixel t; + if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) + return; + if (a!=255) + { + t = vid[y*(XRES+BARSIZE)+x]; + r = (a*r + (255-a)*PIXR(t)) >> 8; + g = (a*g + (255-a)*PIXG(t)) >> 8; + b = (a*b + (255-a)*PIXB(t)) >> 8; + } + vid[y*(XRES+BARSIZE)+x] = PIXRGB(r,g,b); +#endif +} + +inline int Graphics::drawchar(int x, int y, int c, int r, int g, int b, int a) +{ + int i, j, w, bn = 0, ba = 0; + char *rp = font_data + font_ptrs[c]; + w = *(rp++); + for (j=0; j>= 2; + bn -= 2; + } + return x + w; +} + +inline int Graphics::addchar(int x, int y, int c, int r, int g, int b, int a) +{ + int i, j, w, bn = 0, ba = 0; + char *rp = font_data + font_ptrs[c]; + w = *(rp++); + for (j=0; j>= 2; + bn -= 2; + } + return x + w; +} + +int Graphics::drawtext(int x, int y, std::string &s, int r, int g, int b, int a) +{ + return drawtext(x, y, s.c_str(), r, g, b, a); +} + +int Graphics::drawtext(int x, int y, const char *s, int r, int g, int b, int a) +{ + int sx = x; + for (; *s; s++) + { + if (*s == '\n') + { + x = sx; + y += FONT_H+2; + } + else if (*s == '\b') + { + switch (s[1]) + { + case 'w': + r = g = b = 255; + break; + case 'g': + r = g = b = 192; + break; + case 'o': + r = 255; + g = 216; + b = 32; + break; + case 'r': + r = 255; + g = b = 0; + break; + case 'l': + r = 255; + g = b = 75; + break; + case 'b': + r = g = 0; + b = 255; + break; + case 't': + b = 255; + g = 170; + r = 32; + break; + } + s++; + } + else + x = drawchar(x, y, *(unsigned char *)s, r, g, b, a); + } + return x; +} + +//Draw text with an outline +int Graphics::drawtext_outline(int x, int y, const char *s, int r, int g, int b, int a, int olr, int olg, int olb, int ola) +{ + drawtext(x-1, y-1, s, olr, olg, olb, ola); + drawtext(x+1, y+1, s, olr, olg, olb, ola); + + drawtext(x-1, y+1, s, olr, olg, olb, ola); + drawtext(x+1, y-1, s, olr, olg, olb, ola); + + return drawtext(x, y, s, r, g, b, a); +} +int Graphics::drawtextwrap(int x, int y, int w, const char *s, int r, int g, int b, int a) +{ + int sx = x; + int rh = 12; + int rw = 0; + int cw = x; + int wordlen; + int charspace; + while (*s) + { + wordlen = strcspn(s," .,!?\n"); + charspace = textwidthx((char *)s, w-(x-cw)); + if (charspace=-1; s++) + { + if (*s == '\n') + { + x = sx; + rw = 0; + y += FONT_H+2; + } + else if (*s == '\b') + { + switch (s[1]) + { + case 'w': + r = g = b = 255; + break; + case 'g': + r = g = b = 192; + break; + case 'o': + r = 255; + g = 216; + b = 32; + break; + case 'r': + r = 255; + g = b = 0; + break; + case 'l': + r = 255; + g = b = 75; + break; + case 'b': + r = g = 0; + b = 255; + break; + case 't': + b = 255; + g = 170; + r = 32; + break; + } + s++; + } + else + { + + if (x-cw>=w) + { + x = sx; + rw = 0; + y+=FONT_H+2; + rh+=FONT_H+2; + } + x = drawchar(x, y, *(unsigned char *)s, r, g, b, a); + } + } + } + + return rh; +} + +//draws a rectange, (x,y) are the top left coords. +void Graphics::drawrect(int x, int y, int w, int h, int r, int g, int b, int a) +{ + int i; + for (i=0; i<=w; i++) + { + drawpixel(x+i, y, r, g, b, a); + drawpixel(x+i, y+h, r, g, b, a); + } + for (i=1; i=w && x+textwidth(s)>=w+5) + break; + x = drawchar(x, y, *(unsigned char *)s, r, g, b, a); + } + if (*s) + for (i=0; i<3; i++) + x = drawchar(x, y, '.', r, g, b, a); + return x; +} + +int Graphics::textnwidth(char *s, int n) +{ + int x = 0; + for (; *s; s++) + { + if (!n) + break; + x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + n--; + } + return x-1; +} +void Graphics::textnpos(char *s, int n, int w, int *cx, int *cy) +{ + int x = 0; + int y = 0; + int wordlen, charspace; + while (*s&&n) + { + wordlen = strcspn(s," .,!?\n"); + charspace = textwidthx(s, w-x); + if (charspace=-1; s++) + { + if (!n) { + break; + } + x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + if (x>=w) + { + x = 0; + y += FONT_H+2; + } + n--; + } + } + *cx = x-1; + *cy = y; +} + +int Graphics::textwidthx(char *s, int w) +{ + int x=0,n=0,cw; + for (; *s; s++) + { + cw = font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + if (x+(cw/2) >= w) + break; + x += cw; + n++; + } + return n; +} +int Graphics::textposxy(char *s, int width, int w, int h) +{ + int x=0,y=0,n=0,cw, wordlen, charspace; + while (*s) + { + wordlen = strcspn(s," .,!?\n"); + charspace = textwidthx(s, width-x); + if (charspace=-1; s++) + { + cw = font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + if ((x+(cw/2) >= w && y+6 >= h)||(y+6 >= h+FONT_H+2)) + return n++; + x += cw; + if (x>=width) { + x = 0; + y += FONT_H+2; + } + n++; + } + } + return n; +} +int Graphics::textwrapheight(char *s, int width) +{ + int x=0, height=FONT_H+2, cw; + int wordlen; + int charspace; + while (*s) + { + wordlen = strcspn(s," .,!?\n"); + charspace = textwidthx(s, width-x); + if (charspace=-1; s++) + { + if (*s == '\n') + { + x = 0; + height += FONT_H+2; + } + else if (*s == '\b') + { + s++; + } + else + { + cw = font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + if (x+cw>=width) + { + x = 0; + height += FONT_H+2; + } + x += cw; + } + } + } + return height; +} + +//the most used function for drawing a pixel, because it has OpenGL support, which is not fully implemented. +TPT_INLINE void Graphics::blendpixel(int x, int y, int r, int g, int b, int a) +{ +#ifdef PIXALPHA + pixel t; + if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) + return; + if (a!=255) + { + t = vid[y*(XRES+BARSIZE)+x]; + r = (a*r + (255-a)*PIXR(t)) >> 8; + g = (a*g + (255-a)*PIXG(t)) >> 8; + b = (a*b + (255-a)*PIXB(t)) >> 8; + a = a > PIXA(t) ? a : PIXA(t); + } + vid[y*(XRES+BARSIZE)+x] = PIXRGBA(r,g,b,a); +#else + pixel t; + if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) + return; + if (a!=255) + { + t = vid[y*(XRES+BARSIZE)+x]; + r = (a*r + (255-a)*PIXR(t)) >> 8; + g = (a*g + (255-a)*PIXG(t)) >> 8; + b = (a*b + (255-a)*PIXB(t)) >> 8; + } + vid[y*(XRES+BARSIZE)+x] = PIXRGB(r,g,b); +#endif +} + +void Graphics::draw_icon(int x, int y, char ch, int flag) +{ + char t[2]; + t[0] = ch; + t[1] = 0; + if (flag) + { + fillrect(x-1, y-1, 17, 17, 255, 255, 255, 255); + drawtext(x+3, y+2, t, 0, 0, 0, 255); + } + else + { + drawrect(x, y, 15, 15, 255, 255, 255, 255); + drawtext(x+3, y+2, t, 255, 255, 255, 255); + } +} + +void Graphics::draw_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a) //Draws a line +{ + int dx, dy, i, sx, sy, check, e, x, y; + + dx = abs(x1-x2); + dy = abs(y1-y2); + sx = isign(x2-x1); + sy = isign(y2-y1); + x = x1; + y = y1; + check = 0; + + if (dy>dx) + { + dx = dx+dy; + dy = dx-dy; + dx = dx-dy; + check = 1; + } + + e = (dy<<2)-dx; + for (i=0; i<=dx; i++) + { + if (x>=0 && y>=0 && x=0) + { + if (check==1) + x = x+sx; + else + y = y+sy; + e = e-(dx<<2); + } + if (check==1) + y = y+sy; + else + x = x+sx; + e = e+(dy<<2); + } +} + +//adds color to a pixel, does not overwrite. +void Graphics::addpixel(int x, int y, int r, int g, int b, int a) +{ + pixel t; + if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) + return; + t = vid[y*(XRES+BARSIZE)+x]; + r = (a*r + 255*PIXR(t)) >> 8; + g = (a*g + 255*PIXG(t)) >> 8; + b = (a*b + 255*PIXB(t)) >> 8; + if (r>255) + r = 255; + if (g>255) + g = 255; + if (b>255) + b = 255; + vid[y*(XRES+BARSIZE)+x] = PIXRGB(r,g,b); +} + +//draws one of two colors, so that it is always clearly visible +void Graphics::xor_pixel(int x, int y) +{ + int c; + if (x<0 || y<0 || x>=XRES || y>=YRES) + return; + c = vid[y*(XRES+BARSIZE)+x]; + c = PIXB(c) + 3*PIXG(c) + 2*PIXR(c); + if (c<512) + vid[y*(XRES+BARSIZE)+x] = PIXPACK(0xC0C0C0); + else + vid[y*(XRES+BARSIZE)+x] = PIXPACK(0x404040); +} + +//same as xor_pixel, but draws a line of it +void Graphics::xor_line(int x1, int y1, int x2, int y2) +{ + int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; + float e, de; + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1= 0.5f) + { + y += sy; + e -= 1.0f; + } + } +} + +//same as blend_pixel, but draws a line of it +void Graphics::blend_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a) +{ + int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; + float e, de; + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1= 0.5f) + { + y += sy; + e -= 1.0f; + } + } +} + +//same as xor_pixel, but draws a rectangle +void Graphics::xor_rect(int x, int y, int w, int h) +{ + int i; + for (i=0; i>i)&1) + { + // Need a spread of wavelengths to get a smooth spectrum, 5 bits seems to work reasonably well + if (i>2) tmp = 0x1F << (i-2); + else tmp = 0x1F >> (2-i); + cg = 0; + cb = 0; + cr = 0; + for (j=0; j<12; j++) { + cr += (tmp >> (j+18)) & 1; + cb += (tmp >> j) & 1; + } + for (j=0; j<13; j++) + cg += (tmp >> (j+9)) & 1; + tmp = 624/(cr+cg+cb+1); + cr *= tmp; + cg *= tmp; + cb *= tmp; + for (j=0; j255?255:cr,cg>255?255:cg,cb>255?255:cb,255); + } + } +} + +pixel *Graphics::render_packed_rgb(void *image, int width, int height, int cmp_size) +{ + unsigned char *tmp; + pixel *res; + int i; + + tmp = (unsigned char *)malloc(width*height*3); + if (!tmp) + return NULL; + res = (pixel *)malloc(width*height*PIXELSIZE); + if (!res) + { + free(tmp); + return NULL; + } + + i = width*height*3; + if (BZ2_bzBuffToBuffDecompress((char *)tmp, (unsigned *)&i, (char *)image, cmp_size, 0, 0)) + { + free(res); + free(tmp); + return NULL; + } + + for (i=0; i0) + r--; + if (g>0) + g--; + if (b>0) + b--; + dst[i] = PIXRGB(r,g,b); + } +} + +void Graphics::dim_copy_pers(pixel *dst, pixel *src) //for persistent view, reduces rgb slowly +{ + int i,r,g,b; + for (i=0; i<(XRES+BARSIZE)*YRES; i++) + { + r = PIXR(src[i]); + g = PIXG(src[i]); + b = PIXB(src[i]); + if (r>0) + r--; + if (g>0) + g--; + if (b>0) + b--; + dst[i] = PIXRGB(r,g,b); + } +} + +/*void render_zoom(pixel *img) //draws the zoom box +{ +#ifdef OGLR + int origBlendSrc, origBlendDst; + float zcx1, zcx0, zcy1, zcy0, yfactor, xfactor, i; //X-Factor is shit, btw + xfactor = 1.0f/(float)XRES; + yfactor = 1.0f/(float)YRES; + + zcx0 = (zoom_x)*xfactor; + zcx1 = (zoom_x+ZSIZE)*xfactor; + zcy0 = (zoom_y)*yfactor; + zcy1 = ((zoom_y+ZSIZE))*yfactor; + + glGetIntegerv(GL_BLEND_SRC, &origBlendSrc); + glGetIntegerv(GL_BLEND_DST, &origBlendDst); + glBlendFunc(GL_ONE, GL_ZERO); + + glEnable( GL_TEXTURE_2D ); + //glReadBuffer(GL_AUX0); + glBindTexture(GL_TEXTURE_2D, partsFboTex); + + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glBegin(GL_QUADS); + glTexCoord2d(zcx1, zcy1); + glVertex3f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 1.0); + glTexCoord2d(zcx0, zcy1); + glVertex3f(zoom_wx*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 1.0); + glTexCoord2d(zcx0, zcy0); + glVertex3f(zoom_wx*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 1.0); + glTexCoord2d(zcx1, zcy0); + glVertex3f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 1.0); + glEnd(); + glBindTexture(GL_TEXTURE_2D, 0); + glDisable( GL_TEXTURE_2D ); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + glLineWidth(sdl_scale); + glEnable(GL_LINE_SMOOTH); + glBegin(GL_LINES); + glColor4f(0.0f, 0.0f, 0.0f, 1.0f); + for(i = 0; i < ZSIZE; i++) + { + glVertex2f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR)+i*ZFACTOR)*sdl_scale); + glVertex2f(zoom_wx*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR)+i*ZFACTOR)*sdl_scale); + glVertex2f((zoom_wx+i*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale); + glVertex2f((zoom_wx+i*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale); + } + glEnd(); + + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glBegin(GL_LINE_STRIP); + glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); + glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 0); + glVertex3i((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 0); + glVertex3i((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); + glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); + glEnd(); + glDisable(GL_LINE_SMOOTH); + + glDisable(GL_LINE_SMOOTH); + + if(zoom_en) + { + glEnable(GL_COLOR_LOGIC_OP); + //glEnable(GL_LINE_SMOOTH); + glLogicOp(GL_XOR); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glBegin(GL_LINE_STRIP); + glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); + glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y+ZSIZE))*sdl_scale, 0); + glVertex3i((zoom_x+ZSIZE)*sdl_scale, (YRES+MENUSIZE-(zoom_y+ZSIZE))*sdl_scale, 0); + glVertex3i((zoom_x+ZSIZE)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); + glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); + glEnd(); + glDisable(GL_COLOR_LOGIC_OP); + } + glLineWidth(1); + glBlendFunc(origBlendSrc, origBlendDst); +#else + int x, y, i, j; + pixel pix; + drawrect(img, zoom_wx-2, zoom_wy-2, ZSIZE*ZFACTOR+2, ZSIZE*ZFACTOR+2, 192, 192, 192, 255); + drawrect(img, zoom_wx-1, zoom_wy-1, ZSIZE*ZFACTOR, ZSIZE*ZFACTOR, 0, 0, 0, 255); + clearrect(img, zoom_wx, zoom_wy, ZSIZE*ZFACTOR, ZSIZE*ZFACTOR); + for (j=0; jPT_NUM) + return 2; + if (c[5]!=CELL || c[6]!=XRES/CELL || c[7]!=YRES/CELL) + return 3; + i = XRES*YRES; + d = (unsigned char *)malloc(i); + if (!d) + return 1; + + if (BZ2_bzBuffToBuffDecompress((char *)d, (unsigned *)&i, (char *)(c+8), size-8, 0, 0)) + return 1; + size = i; + } + else + d = c; + + if (size < XRES*YRES) + { + if (bzip2) + free(d); + return 1; + } + + sy = 0; + for (y=0; y+scl<=YRES; y+=scl) + { + sx = 0; + for (x=0; x+scl<=XRES; x+=scl) + { + a = 0; + r = g = b = 0; + for (j=0; j=PT_NUM) + goto corrupt; + r += PIXR(ptypes[t].pcolors); + g += PIXG(ptypes[t].pcolors); + b += PIXB(ptypes[t].pcolors); + a ++; + } + } + if (a) + { + a = 256/a; + r = (r*a)>>8; + g = (g*a)>>8; + b = (b*a)>>8; + } + + drawpixel(vid_buf, px+sx, py+sy, r, g, b, 255); + sx++; + } + sy++; + } + + if (bzip2) + free(d); + return 0; + +corrupt: + if (bzip2) + free(d); + return 1; +}*/ + +//draws the cursor +/*void Graphics::render_cursor(pixel *vid, int x, int y, int t, int rx, int ry) +{ +#ifdef OGLR + int i; + if (trx || (j+1)>ry)) + { + xor_pixel(x+i, y+j, vid); + xor_pixel(x-i, y-j, vid); + if (i&&j)xor_pixel(x+i, y-j, vid); + if (i&&j)xor_pixel(x-i, y+j, vid); + } + } + else if (CURRENT_BRUSH==CIRCLE_BRUSH) + { + for (j=0; j<=ry; j++) + for (i=0; i<=rx; i++) + if (pow(i,2)*pow(ry,2)+pow(j,2)*pow(rx,2)<=pow(rx,2)*pow(ry,2) && + (pow(i+1,2)*pow(ry,2)+pow(j,2)*pow(rx,2)>pow(rx,2)*pow(ry,2) || + pow(i,2)*pow(ry,2)+pow(j+1,2)*pow(rx,2)>pow(rx,2)*pow(ry,2))) + { + xor_pixel(x+i, y+j, vid); + if (j) xor_pixel(x+i, y-j, vid); + if (i) xor_pixel(x-i, y+j, vid); + if (i&&j) xor_pixel(x-i, y-j, vid); + } + } + else if (CURRENT_BRUSH==TRI_BRUSH) + { + for (j=-ry; j<=ry; j++) + for (i=-rx; i<=0; i++) + if ((j <= ry ) && ( j >= (((-2.0*ry)/(rx))*i)-ry ) && (j+1>ry || ( j-1 < (((-2.0*ry)/(rx))*i)-ry )) ) + { + xor_pixel(x+i, y+j, vid); + if (i) xor_pixel(x-i, y+j, vid); + } + } + } + else //wall cursor + { + int tc; + c = (rx/CELL) * CELL; + x = (x/CELL) * CELL; + y = (y/CELL) * CELL; + + tc = !((c%(CELL*2))==0); + + x -= c/2; + y -= c/2; + + x += tc*(CELL/2); + y += tc*(CELL/2); + + for (i=0; iparts; + char infobuf[256]; + if(debug_flags & DEBUG_PERFORMANCE_FRAME || debug_flags & DEBUG_PERFORMANCE_CALC) + { + int t1, t2, x = 0, i = debug_perf_istart; + float partiavg = 0, frameavg = 0; + while(i != debug_perf_iend) + { + partiavg += abs(debug_perf_partitime[i]/100000); + frameavg += abs(debug_perf_frametime[i]/100000); + if(debug_flags & DEBUG_PERFORMANCE_CALC) + t1 = abs(debug_perf_partitime[i]/100000); + else + t1 = 0; + + if(debug_flags & DEBUG_PERFORMANCE_FRAME) + t2 = abs(debug_perf_frametime[i]/100000); + else + t2 = 0; + + if(t1 > YRES) + t1 = YRES; + if(t1+t2 > YRES) + t2 = YRES-t1; + + if(t1>0) + draw_line(vid, x, YRES, x, YRES-t1, 0, 255, 120, XRES+BARSIZE); + if(t2>0) + draw_line(vid, x, YRES-t1, x, YRES-(t1+t2), 255, 120, 0, XRES+BARSIZE); + + i++; + x++; + i %= DEBUG_PERF_FRAMECOUNT; + } + + if(debug_flags & DEBUG_PERFORMANCE_CALC) + t1 = abs(partiavg / x); + else + t1 = 0; + + if(debug_flags & DEBUG_PERFORMANCE_FRAME) + t2 = abs(frameavg / x); + else + t2 = 0; + + if(t1 > YRES) + t1 = YRES; + if(t1+t2 > YRES) + t2 = YRES-t1; + + if(t1>0) + fillrect(vid, x, YRES-t1-1, 5, t1+2, 0, 255, 0, 255); + if(t2>0) + fillrect(vid, x, (YRES-t1)-t2-1, 5, t2+1, 255, 0, 0, 255); + } + if(debug_flags & DEBUG_DRAWTOOL) + { + if(lm == 1) //Line tool + { + blend_line(vid, 0, line_y, XRES, line_y, 255, 255, 255, 120); + blend_line(vid, line_x, 0, line_x, YRES, 255, 255, 255, 120); + + blend_line(vid, 0, ly, XRES, ly, 255, 255, 255, 120); + blend_line(vid, lx, 0, lx, YRES, 255, 255, 255, 120); + + sprintf(infobuf, "%d x %d", lx, ly); + drawtext_outline(vid, lx+(lx>line_x?3:-textwidth(infobuf)-3), ly+(lyline_y?-10:3), infobuf, 255, 255, 255, 200, 0, 0, 0, 120); + + sprintf(infobuf, "%d", abs(line_x-lx)); + drawtext_outline(vid, (line_x+lx)/2-textwidth(infobuf)/2, line_y+(ly>line_y?-10:3), infobuf, 255, 255, 255, 200, 0, 0, 0, 120); + + sprintf(infobuf, "%d", abs(line_y-ly)); + drawtext_outline(vid, line_x+(lxparts_lastActiveIndex, NPART, (((float)sim->parts_lastActiveIndex)/((float)NPART))*100.0f); + for(i = 0; i < NPART; i++){ + if(parts[i].type){ + drawpixel(vid, x, y, 255, 255, 255, 180); + } else { + drawpixel(vid, x, y, 0, 0, 0, 180); + } + if(i == sim->parts_lastActiveIndex) + { + lpx = x; + lpy = y; + } + x++; + if(x>=XRES){ + y++; + x = 0; + } + } + draw_line(vid, 0, lpy, XRES, lpy, 0, 255, 120, XRES+BARSIZE); + draw_line(vid, lpx, 0, lpx, YRES, 0, 255, 120, XRES+BARSIZE); + drawpixel(vid, lpx, lpy, 255, 50, 50, 220); + + drawpixel(vid, lpx+1, lpy, 255, 50, 50, 120); + drawpixel(vid, lpx-1, lpy, 255, 50, 50, 120); + drawpixel(vid, lpx, lpy+1, 255, 50, 50, 120); + drawpixel(vid, lpx, lpy-1, 255, 50, 50, 120); + + fillrect(vid, 7, YRES-26, textwidth(infobuf)+5, 14, 0, 0, 0, 180); + drawtext(vid, 10, YRES-22, infobuf, 255, 255, 255, 255); + } +}*/ + +void Graphics::Clear() +{ + memset(vid, 0, PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE))); +} + +void Graphics::AttachSDLSurface(SDL_Surface * surface) +{ + sdl_scrn = surface; +} + +void Graphics::Blit() +{ + pixel * dst; + pixel * src = vid; + int j, x = 0, y = 0, w = XRES+BARSIZE, h = YRES+MENUSIZE, pitch = XRES+BARSIZE; + if (SDL_MUSTLOCK(sdl_scrn)) + if (SDL_LockSurface(sdl_scrn)<0) + return; + dst=(pixel *)sdl_scrn->pixels+y*sdl_scrn->pitch/PIXELSIZE+x; + for (j=0; jpitch/PIXELSIZE; + src+=pitch; + } + if (SDL_MUSTLOCK(sdl_scrn)) + SDL_UnlockSurface(sdl_scrn); + SDL_UpdateRect(sdl_scrn,0,0,0,0); +} + +Graphics::Graphics() +{ + vid = (pixel *)malloc(PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE))); +} diff --git a/src/Gravity.cpp b/src/Gravity.cpp new file mode 100644 index 0000000..cc20b2f --- /dev/null +++ b/src/Gravity.cpp @@ -0,0 +1,488 @@ +#include +#include +#include +#include "Config.h" +#include "Gravity.h" +//#include "powder.h" + +#ifdef GRAVFFT +#include +#endif + +void Gravity::bilinear_interpolation(float *src, float *dst, int sw, int sh, int rw, int rh) +{ + int y, x, fxceil, fyceil; + float fx, fy, fyc, fxc; + double intp; + float tr, tl, br, bl; + //Bilinear interpolation for upscaling + for (y=0; y=sw) fxceil = sw-1; + if (fyceil>=sh) fyceil = sh-1; + tr = src[sw*(int)floor(fy)+fxceil]; + tl = src[sw*(int)floor(fy)+(int)floor(fx)]; + br = src[sw*fyceil+fxceil]; + bl = src[sw*fyceil+(int)floor(fx)]; + dst[rw*y+x] = ((tl*(1.0f-fxc))+(tr*(fxc)))*(1.0f-fyc) + ((bl*(1.0f-fxc))+(br*(fxc)))*(fyc); + } +} + +void Gravity::gravity_init() +{ + //Allocate full size Gravmaps + th_ogravmap = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + th_gravmap = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + th_gravy = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + th_gravx = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + th_gravp = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + gravmap = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + gravy = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + gravx = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + gravp = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + gravmask = (unsigned int *)calloc((XRES/CELL)*(YRES/CELL), sizeof(unsigned)); +} + +void Gravity::gravity_cleanup() +{ +#ifdef GRAVFFT + grav_fft_cleanup(); +#endif +} + +void Gravity::gravity_update_async() +{ + int result; + if(ngrav_enable) + { + pthread_mutex_lock(&gravmutex); + result = grav_ready; + if(result) //Did the gravity thread finish? + { + //if (!sys_pause||framerender){ //Only update if not paused + //Switch the full size gravmaps, we don't really need the two above any more + float *tmpf; + + if(th_gravchanged) + { + #if !defined(GRAVFFT) && defined(GRAV_DIFF) + memcpy(gravy, th_gravy, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memcpy(gravx, th_gravx, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memcpy(gravp, th_gravp, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + #else + tmpf = gravy; + gravy = th_gravy; + th_gravy = tmpf; + + tmpf = gravx; + gravx = th_gravx; + th_gravx = tmpf; + + tmpf = gravp; + gravp = th_gravp; + th_gravp = tmpf; + #endif + } + + tmpf = gravmap; + gravmap = th_gravmap; + th_gravmap = tmpf; + + grav_ready = 0; //Tell the other thread that we're ready for it to continue + pthread_cond_signal(&gravcv); + //} + } + pthread_mutex_unlock(&gravmutex); + //Apply the gravity mask + membwand(gravy, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned)); + membwand(gravx, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned)); + memset(gravmap, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + } +} + +void *Gravity::update_grav_async_helper(void * context) +{ + ((Gravity *)context)->update_grav_async(); +} + +void Gravity::update_grav_async() +{ + int done = 0; + int thread_done = 0; + memset(th_ogravmap, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(th_gravmap, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(th_gravy, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(th_gravx, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(th_gravp, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + //memset(th_gravy, 0, XRES*YRES*sizeof(float)); + //memset(th_gravx, 0, XRES*YRES*sizeof(float)); + //memset(th_gravp, 0, XRES*YRES*sizeof(float)); +#ifdef GRAVFFT + grav_fft_init(); +#endif + while(!thread_done){ + if(!done){ + update_grav(); + done = 1; + pthread_mutex_lock(&gravmutex); + + grav_ready = done; + thread_done = gravthread_done; + + pthread_mutex_unlock(&gravmutex); + } else { + pthread_mutex_lock(&gravmutex); + pthread_cond_wait(&gravcv, &gravmutex); + + done = grav_ready; + thread_done = gravthread_done; + + pthread_mutex_unlock(&gravmutex); + } + } + pthread_exit(NULL); +} + +void Gravity::start_grav_async() +{ + if(!ngrav_enable){ + gravthread_done = 0; + grav_ready = 0; + pthread_mutex_init (&gravmutex, NULL); + pthread_cond_init(&gravcv, NULL); + pthread_create(&gravthread, NULL, &Gravity::update_grav_async_helper, this); //Start asynchronous gravity simulation + ngrav_enable = 1; + } + memset(gravy, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(gravx, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(gravp, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); +} + +void Gravity::stop_grav_async() +{ + if(ngrav_enable){ + pthread_mutex_lock(&gravmutex); + gravthread_done = 1; + pthread_cond_signal(&gravcv); + pthread_mutex_unlock(&gravmutex); + pthread_join(gravthread, NULL); + pthread_mutex_destroy(&gravmutex); //Destroy the mutex + ngrav_enable = 0; + } + //Clear the grav velocities + memset(gravy, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(gravx, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(gravp, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); +} + +#ifdef GRAVFFT +int grav_fft_status = 0; +float *th_ptgravx, *th_ptgravy, *th_gravmapbig, *th_gravxbig, *th_gravybig; +fftwf_complex *th_ptgravxt, *th_ptgravyt, *th_gravmapbigt, *th_gravxbigt, *th_gravybigt; +fftwf_plan plan_gravmap, plan_gravx_inverse, plan_gravy_inverse; + +void Gravity::grav_fft_init() +{ + int xblock2 = XRES/CELL*2; + int yblock2 = YRES/CELL*2; + int x, y, fft_tsize = (xblock2/2+1)*yblock2; + float distance, scaleFactor; + fftwf_plan plan_ptgravx, plan_ptgravy; + if (grav_fft_status) return; + + //use fftw malloc function to ensure arrays are aligned, to get better performance + th_ptgravx = fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_ptgravy = fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_ptgravxt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_ptgravyt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_gravmapbig = fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_gravmapbigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_gravxbig = fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_gravybig = fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_gravxbigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_gravybigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + + //select best algorithm, could use FFTW_PATIENT or FFTW_EXHAUSTIVE but that increases the time taken to plan, and I don't see much increase in execution speed + plan_ptgravx = fftwf_plan_dft_r2c_2d(yblock2, xblock2, th_ptgravx, th_ptgravxt, FFTW_MEASURE); + plan_ptgravy = fftwf_plan_dft_r2c_2d(yblock2, xblock2, th_ptgravy, th_ptgravyt, FFTW_MEASURE); + plan_gravmap = fftwf_plan_dft_r2c_2d(yblock2, xblock2, th_gravmapbig, th_gravmapbigt, FFTW_MEASURE); + plan_gravx_inverse = fftwf_plan_dft_c2r_2d(yblock2, xblock2, th_gravxbigt, th_gravxbig, FFTW_MEASURE); + plan_gravy_inverse = fftwf_plan_dft_c2r_2d(yblock2, xblock2, th_gravybigt, th_gravybig, FFTW_MEASURE); + + //(XRES/CELL)*(YRES/CELL)*4 is size of data array, scaling needed because FFTW calculates an unnormalized DFT + scaleFactor = -M_GRAV/((XRES/CELL)*(YRES/CELL)*4); + //calculate velocity map caused by a point mass + for (y=0; y 0.0001f || th_gravmap[i*(XRES/CELL)+j]<-0.0001f) //Only calculate with populated or changed cells. + { +#endif + for (y = 0; y < YRES / CELL; y++) { + for (x = 0; x < XRES / CELL; x++) { + if (x == j && y == i)//Ensure it doesn't calculate with itself + continue; + distance = sqrt(pow(j - x, 2) + pow(i - y, 2)); +#ifdef GRAV_DIFF + val = th_gravmap[i*(XRES/CELL)+j] - th_ogravmap[i*(XRES/CELL)+j]; +#else + val = th_gravmap[i*(XRES/CELL)+j]; +#endif + th_gravx[y*(XRES/CELL)+x] += M_GRAV * val * (j - x) / pow(distance, 3); + th_gravy[y*(XRES/CELL)+x] += M_GRAV * val * (i - y) / pow(distance, 3); + th_gravp[y*(XRES/CELL)+x] += M_GRAV * val / pow(distance, 2); + } + } + } + } + } +fin: + memcpy(th_ogravmap, th_gravmap, (XRES/CELL)*(YRES/CELL)*sizeof(float)); +} +#endif + + + +void Gravity::grav_mask_r(int x, int y, char checkmap[YRES/CELL][XRES/CELL], char shape[YRES/CELL][XRES/CELL], char *shapeout) +{ + if(x < 0 || x >= XRES/CELL || y < 0 || y >= YRES/CELL) + return; + if(x == 0 || y ==0 || y == (YRES/CELL)-1 || x == (XRES/CELL)-1) + *shapeout = 1; + checkmap[y][x] = 1; + shape[y][x] = 1; + if(x-1 >= 0 && !checkmap[y][x-1] && bmap[y][x-1]!=WL_GRAV) + grav_mask_r(x-1, y, checkmap, shape, shapeout); + if(y-1 >= 0 && !checkmap[y-1][x] && bmap[y-1][x]!=WL_GRAV) + grav_mask_r(x, y-1, checkmap, shape, shapeout); + if(x+1 < XRES/CELL && !checkmap[y][x+1] && bmap[y][x+1]!=WL_GRAV) + grav_mask_r(x+1, y, checkmap, shape, shapeout); + if(y+1 < YRES/CELL && !checkmap[y+1][x] && bmap[y+1][x]!=WL_GRAV) + grav_mask_r(x, y+1, checkmap, shape, shapeout); + return; +} +void Gravity::mask_free(mask_el *c_mask_el){ + if(c_mask_el==NULL) + return; + if(c_mask_el->next!=NULL) + mask_free((mask_el*)c_mask_el->next); + free(c_mask_el->shape); + free(c_mask_el); +} +void Gravity::gravity_mask() +{ + char checkmap[YRES/CELL][XRES/CELL]; + int x = 0, y = 0, i, j; + unsigned maskvalue; + mask_el *t_mask_el = NULL; + mask_el *c_mask_el = NULL; + if(!gravmask) + return; + memset(checkmap, 0, sizeof(checkmap)); + for(x = 0; x < XRES/CELL; x++) + { + for(y = 0; y < YRES/CELL; y++) + { + if(bmap[y][x]!=WL_GRAV && checkmap[y][x] == 0) + { + //Create a new shape + if(t_mask_el==NULL){ + t_mask_el = (mask_el *)malloc(sizeof(mask_el)); + t_mask_el->shape = (char *)malloc((XRES/CELL)*(YRES/CELL)); + memset(t_mask_el->shape, 0, (XRES/CELL)*(YRES/CELL)); + t_mask_el->shapeout = 0; + t_mask_el->next = NULL; + c_mask_el = t_mask_el; + } else { + c_mask_el->next = (mask_el *)malloc(sizeof(mask_el)); + c_mask_el = (mask_el *)c_mask_el->next; + c_mask_el->shape = (char *)malloc((XRES/CELL)*(YRES/CELL)); + memset(c_mask_el->shape, 0, (XRES/CELL)*(YRES/CELL)); + c_mask_el->shapeout = 0; + c_mask_el->next = NULL; + } + //Fill the shape + grav_mask_r(x, y, (char (*)[XRES/CELL])checkmap, (char (*)[XRES/CELL])c_mask_el->shape, (char*)&c_mask_el->shapeout); + } + } + } + c_mask_el = t_mask_el; + memset(gravmask, 0, (XRES/CELL)*(YRES/CELL)*sizeof(unsigned)); + while(c_mask_el!=NULL) + { + char *cshape = c_mask_el->shape; + for(x = 0; x < XRES/CELL; x++) + { + for(y = 0; y < YRES/CELL; y++) + { + if(cshape[y*(XRES/CELL)+x]){ + if(c_mask_el->shapeout) + maskvalue = 0xFFFFFFFF; + else + maskvalue = 0x00000000; + gravmask[y*(XRES/CELL)+x] = maskvalue; + } + } + } + c_mask_el = (mask_el*)c_mask_el->next; + } + mask_free(t_mask_el); +} + +Gravity::Gravity() +{ + gravity_init(); +} diff --git a/src/Misc.cpp b/src/Misc.cpp new file mode 100644 index 0000000..44770d1 --- /dev/null +++ b/src/Misc.cpp @@ -0,0 +1,664 @@ +#include +#include +#include +#include +#include +#include +#include "misc.h" +#include "Config.h" +//#include "interface.h" +//#include "graphics.h" +//#include "powder.h" +//#include +//#include +#if defined WIN32 +#include +#include +#include +#else +#include +#endif +#ifdef MACOSX +#include +#endif + +char *clipboard_text = NULL; + +char *exe_name(void) +{ +#if defined WIN32 + char *name= (char *)malloc(64); + DWORD max=64, res; + while ((res = GetModuleFileName(NULL, name, max)) >= max) + { +#elif defined MACOSX + char *fn=malloc(64),*name=malloc(PATH_MAX); + uint32_t max=64, res; + if (_NSGetExecutablePath(fn, &max) != 0) + { + fn = realloc(fn, max); + _NSGetExecutablePath(fn, &max); + } + if (realpath(fn, name) == NULL) + { + free(fn); + free(name); + return NULL; + } + res = 1; +#else + char fn[64], *name=malloc(64); + size_t max=64, res; + sprintf(fn, "/proc/self/exe"); + memset(name, 0, max); + while ((res = readlink(fn, name, max)) >= max-1) + { +#endif +#ifndef MACOSX + max *= 2; + name = (char *)realloc(name, max); + memset(name, 0, max); + } +#endif + if (res <= 0) + { + free(name); + return NULL; + } + return name; +} + +//Signum function +int isign(float i) //TODO: INline or macro +{ + if (i<0) + return -1; + if (i>0) + return 1; + return 0; +} + +unsigned clamp_flt(float f, float min, float max) //TODO: Also inline/macro +{ + if (fmax) + return 255; + return (int)(255.0f*(f-min)/(max-min)); +} + +float restrict_flt(float f, float min, float max) //TODO Inline or macro or something +{ + if (fmax) + return max; + return f; +} + +char *mystrdup(char *s) +{ + char *x; + if (s) + { + x = (char*)malloc(strlen(s)+1); + strcpy(x, s); + return x; + } + return s; +} + +void strlist_add(struct strlist **list, char *str) +{ + struct strlist *item = (struct strlist*)malloc(sizeof(struct strlist)); + item->str = mystrdup(str); + item->next = *list; + *list = item; +} + +int strlist_find(struct strlist **list, char *str) +{ + struct strlist *item; + for (item=*list; item; item=item->next) + if (!strcmp(item->str, str)) + return 1; + return 0; +} + +void strlist_free(struct strlist **list) +{ + struct strlist *item; + while (*list) + { + item = *list; + *list = (*list)->next; + free(item); + } +} + +void clean_text(char *text, int vwidth) +{ + int i = 0; + if(strlen(text)*10 > vwidth){ + text[vwidth/10] = 0; + } + for(i = 0; i < strlen(text); i++){ + if(! (text[i]>=' ' && text[i]<127)){ + text[i] = ' '; + } + } +} + +int sregexp(const char *str, char *pattern) +{ + int result; + regex_t patternc; + if (regcomp(&patternc, pattern, 0)!=0) + return 1; + result = regexec(&patternc, str, 0, NULL, 0); + regfree(&patternc); + return result; +} + +void save_string(FILE *f, char *str) +{ + int li = strlen(str); + unsigned char lb[2]; + lb[0] = li; + lb[1] = li >> 8; + fwrite(lb, 2, 1, f); + fwrite(str, li, 1, f); +} + +int load_string(FILE *f, char *str, int max) +{ + int li; + unsigned char lb[2]; + fread(lb, 2, 1, f); + li = lb[0] | (lb[1] << 8); + if (li > max) + { + str[0] = 0; + return 1; + } + fread(str, li, 1, f); + str[li] = 0; + return 0; +} + +void strcaturl(char *dst, char *src) +{ + char *d; + unsigned char *s; + + for (d=dst; *d; d++) ; + + for (s=(unsigned char *)src; *s; s++) + { + if ((*s>='0' && *s<='9') || + (*s>='a' && *s<='z') || + (*s>='A' && *s<='Z')) + *(d++) = *s; + else + { + *(d++) = '%'; + *(d++) = hex[*s>>4]; + *(d++) = hex[*s&15]; + } + } + *d = 0; +} + +void strappend(char *dst, char *src) +{ + char *d; + unsigned char *s; + + for (d=dst; *d; d++) ; + + for (s=(unsigned char *)src; *s; s++) + { + *(d++) = *s; + } + *d = 0; +} + +void *file_load(char *fn, int *size) +{ + FILE *f = fopen(fn, "rb"); + void *s; + + if (!f) + return NULL; + fseek(f, 0, SEEK_END); + *size = ftell(f); + fseek(f, 0, SEEK_SET); + s = malloc(*size); + if (!s) + { + fclose(f); + return NULL; + } + fread(s, *size, 1, f); + fclose(f); + return s; +} + +int cpu_check(void) +{ +#ifdef MACOSX + return 0; +#else +#ifdef X86 + unsigned af,bf,cf,df; + x86_cpuid(0, af, bf, cf, df); + if (bf==0x68747541 && cf==0x444D4163 && df==0x69746E65) + amd = 1; + x86_cpuid(1, af, bf, cf, df); +#ifdef X86_SSE + if (!(df&(1<<25))) + return 1; +#endif +#ifdef X86_SSE2 + if (!(df&(1<<26))) + return 1; +#endif +#ifdef X86_SSE3 + if (!(cf&1)) + return 1; +#endif +#endif +#endif + return 0; +} + +matrix2d m2d_multiply_m2d(matrix2d m1, matrix2d m2) +{ + matrix2d result = { + m1.a*m2.a+m1.b*m2.c, m1.a*m2.b+m1.b*m2.d, + m1.c*m2.a+m1.d*m2.c, m1.c*m2.b+m1.d*m2.d + }; + return result; +} +vector2d m2d_multiply_v2d(matrix2d m, vector2d v) +{ + vector2d result = { + m.a*v.x+m.b*v.y, + m.c*v.x+m.d*v.y + }; + return result; +} +matrix2d m2d_multiply_float(matrix2d m, float s) +{ + matrix2d result = { + m.a*s, m.b*s, + m.c*s, m.d*s, + }; + return result; +} + +vector2d v2d_multiply_float(vector2d v, float s) +{ + vector2d result = { + v.x*s, + v.y*s + }; + return result; +} + +vector2d v2d_add(vector2d v1, vector2d v2) +{ + vector2d result = { + v1.x+v2.x, + v1.y+v2.y + }; + return result; +} +vector2d v2d_sub(vector2d v1, vector2d v2) +{ + vector2d result = { + v1.x-v2.x, + v1.y-v2.y + }; + return result; +} + +matrix2d m2d_new(float me0, float me1, float me2, float me3) +{ + matrix2d result = {me0,me1,me2,me3}; + return result; +} +vector2d v2d_new(float x, float y) +{ + vector2d result = {x, y}; + return result; +} + +void clipboard_push_text(char * text) +{ +#ifdef MACOSX + PasteboardRef newclipboard; + + if (PasteboardCreate(kPasteboardClipboard, &newclipboard)!=noErr) return; + if (PasteboardClear(newclipboard)!=noErr) return; + PasteboardSynchronize(newclipboard); + + CFDataRef data = CFDataCreate(kCFAllocatorDefault, text, strlen(text)); + PasteboardPutItemFlavor(newclipboard, (PasteboardItemID)1, CFSTR("com.apple.traditional-mac-plain-text"), data, 0); +#elif defined WIN32 + if (OpenClipboard(NULL)) + { + HGLOBAL cbuffer; + char * glbuffer; + + EmptyClipboard(); + + cbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(text)+1); + glbuffer = (char*)GlobalLock(cbuffer); + + strcpy(glbuffer, text); + + GlobalUnlock(cbuffer); + SetClipboardData(CF_TEXT, cbuffer); + CloseClipboard(); + } +#elif (defined(LIN32) || defined(LIN64)) && defined(SDL_VIDEO_DRIVER_X11) + if (clipboard_text!=NULL) { + free(clipboard_text); + clipboard_text = NULL; + } + clipboard_text = mystrdup(text); + sdl_wminfo.info.x11.lock_func(); + XSetSelectionOwner(sdl_wminfo.info.x11.display, XA_CLIPBOARD, sdl_wminfo.info.x11.window, CurrentTime); + XFlush(sdl_wminfo.info.x11.display); + sdl_wminfo.info.x11.unlock_func(); +#else + printf("Not implemented: put text on clipboard \"%s\"\n", text); +#endif +} + +char * clipboard_pull_text() +{ +#ifdef MACOSX +#elif defined WIN32 + if (OpenClipboard(NULL)) + { + HANDLE cbuffer; + char * glbuffer; + + cbuffer = GetClipboardData(CF_TEXT); + glbuffer = (char*)GlobalLock(cbuffer); + GlobalUnlock(cbuffer); + CloseClipboard(); + if(glbuffer!=NULL){ + return mystrdup(glbuffer); + } else { + return ""; + } + } +#elif (defined(LIN32) || defined(LIN64)) && defined(SDL_VIDEO_DRIVER_X11) +#else + printf("Not implemented: get text from clipboard\n"); + return ""; +#endif +} + +int register_extension() +{ +#if defined WIN32 + int returnval; + LONG rresult; + HKEY newkey; + char *currentfilename = exe_name(); + char *iconname = NULL; + char *opencommand = NULL; + //char AppDataPath[MAX_PATH]; + char *AppDataPath = NULL; + iconname = (char*)malloc(strlen(currentfilename)+6); + sprintf(iconname, "%s,-102", currentfilename); + + //Create Roaming application data folder + /*if(!SUCCEEDED(SHGetFolderPath(NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE, NULL, 0, AppDataPath))) + { + returnval = 0; + goto finalise; + }*/ + + //AppDataPath = _getcwd(NULL, 0); + + //Move Game executable into application data folder + //TODO: Implement + + opencommand = (char*)malloc(strlen(currentfilename)+53+strlen(AppDataPath)); + /*if((strlen(AppDataPath)+strlen(APPDATA_SUBDIR "\\Powder Toy"))\n" +" \n" +" \n" +" Powder Toy save\n" +" \n" +" \n" +" \n" +"\n"; + f = fopen("powdertoy-save.xml", "wb"); + if (!f) + return 0; + fwrite(mimedata, 1, strlen(mimedata), f); + fclose(f); + + char *desktopfiledata_tmp = +"[Desktop Entry]\n" +"Type=Application\n" +"Name=Powder Toy\n" +"Comment=Physics sandbox game\n" +"MimeType=application/vnd.powdertoy.save;\n" +"NoDisplay=true\n"; + char *desktopfiledata = malloc(strlen(desktopfiledata_tmp)+strlen(currentfilename)+100); + strcpy(desktopfiledata, desktopfiledata_tmp); + strappend(desktopfiledata, "Exec="); + strappend(desktopfiledata, currentfilename); + strappend(desktopfiledata, " open %f\n"); + f = fopen("powdertoy-tpt.desktop", "wb"); + if (!f) + return 0; + fwrite(desktopfiledata, 1, strlen(desktopfiledata), f); + fclose(f); + system("xdg-mime install powdertoy-save.xml"); + system("xdg-desktop-menu install powdertoy-tpt.desktop"); + f = fopen("powdertoy-save-32.png", "wb"); + if (!f) + return 0; + fwrite(icon_doc_32_png, 1, sizeof(icon_doc_32_png), f); + fclose(f); + f = fopen("powdertoy-save-16.png", "wb"); + if (!f) + return 0; + fwrite(icon_doc_16_png, 1, sizeof(icon_doc_16_png), f); + fclose(f); + system("xdg-icon-resource install --noupdate --context mimetypes --size 32 powdertoy-save-32.png application-vnd.powdertoy.save"); + system("xdg-icon-resource install --noupdate --context mimetypes --size 16 powdertoy-save-16.png application-vnd.powdertoy.save"); + system("xdg-icon-resource forceupdate"); + system("xdg-mime default powdertoy-tpt.desktop application/vnd.powdertoy.save"); + unlink("powdertoy-save-32.png"); + unlink("powdertoy-save-16.png"); + unlink("powdertoy-save.xml"); + unlink("powdertoy-tpt.desktop"); + return 1; +#elif defined MACOSX + return 0; +#endif +} + +void HSV_to_RGB(int h,int s,int v,int *r,int *g,int *b)//convert 0-255(0-360 for H) HSV values to 0-255 RGB +{ + float hh, ss, vv, c, x; + int m; + hh = h/60.0f;//normalize values + ss = s/255.0f; + vv = v/255.0f; + c = vv * ss; + x = c * ( 1 - fabs(fmod(hh,2.0) -1) ); + if(hh<1){ + *r = (int)(c*255.0); + *g = (int)(x*255.0); + *b = 0; + } + else if(hh<2){ + *r = (int)(x*255.0); + *g = (int)(c*255.0); + *b = 0; + } + else if(hh<3){ + *r = 0; + *g = (int)(c*255.0); + *b = (int)(x*255.0); + } + else if(hh<4){ + *r = 0; + *g = (int)(x*255.0); + *b = (int)(c*255.0); + } + else if(hh<5){ + *r = (int)(x*255.0); + *g = 0; + *b = (int)(c*255.0); + } + else if(hh<6){ + *r = (int)(c*255.0); + *g = 0; + *b = (int)(x*255.0); + } + m = (int)((vv-c)*255.0); + *r += m; + *g += m; + *b += m; +} + +void RGB_to_HSV(int r,int g,int b,int *h,int *s,int *v)//convert 0-255 RGB values to 0-255(0-360 for H) HSV +{ + float rr, gg, bb, a,x,c,d; + rr = r/255.0f;//normalize values + gg = g/255.0f; + bb = b/255.0f; + a = fmin(rr,gg); + a = fmin(a,bb); + x = fmax(rr,gg); + x = fmax(x,bb); + if (a==x)//greyscale + { + *h = 0; + *s = 0; + *v = (int)(a*255.0); + } + else + { + c = (rr==a) ? gg-bb : ((bb==a) ? rr-gg : bb-rr); + d = (rr==a) ? 3 : ((bb==a) ? 1 : 5); + *h = (int)(60.0*(d - c/(x - a))); + *s = (int)(255.0*((x - a)/x)); + *v = (int)(255.0*x); + } +} + +void membwand(void * destv, void * srcv, size_t destsize, size_t srcsize) +{ + size_t i; + unsigned char * dest = (unsigned char*)destv; + unsigned char * src = (unsigned char*)srcv; + for(i = 0; i < destsize; i++){ + dest[i] = dest[i] & src[i%srcsize]; + } +} +vector2d v2d_zero = {0,0}; +matrix2d m2d_identity = {1,0,0,1}; diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp new file mode 100644 index 0000000..d634cce --- /dev/null +++ b/src/PowderToy.cpp @@ -0,0 +1,95 @@ + +#include +#include +#include "Config.h" +#include "Simulation.h" +#include "Renderer.h" +#include "Graphics.h" +#include "Air.h" + +#include "interface/Window.h" +#include "interface/Button.h" +#include "interface/Sandbox.h" + +SDL_Surface * SDLOpen() +{ + if (SDL_Init(SDL_INIT_VIDEO)<0) + { + fprintf(stderr, "Initializing SDL: %s\n", SDL_GetError()); + return 0; + } + atexit(SDL_Quit); + return SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_SWSURFACE); +} + +int SDLPoll(SDL_Event * event) +{ + while (SDL_PollEvent(event)) + { + switch (event->type) + { + case SDL_QUIT: + return 1; + } + } + return 0; +} + +int main(int argc, char * argv[]) +{ + int mouseX, mouseY, mouseButton, lastMouseButton; + + //Renderer * ren; + Graphics * g = new Graphics(); + g->AttachSDLSurface(SDLOpen()); + //Simulation * sim = new Simulation(); + //ren = new Renderer(g, sim); + + ui::Window * window = new ui::Window(); + ui::Sandbox * sandbox = new ui::Sandbox(); + ui::Button * button = new ui::Button(100, 100, 100, 100, "poP"); + window->Add(sandbox); + window->Add(button); + + SDL_Event event; + while(!SDLPoll(&event)) + { + mouseButton = SDL_GetMouseState(&mouseX, &mouseY); + switch(event.type) + { + case SDL_KEYDOWN: + break; + case SDL_KEYUP: + break; + case SDL_MOUSEMOTION: + window->OnMouseMove(event.motion.x, event.motion.y); + break; + case SDL_MOUSEBUTTONDOWN: + window->OnMouseDown(event.motion.x, event.motion.y, event.button.button); + break; + case SDL_MOUSEBUTTONUP: + window->OnMouseUp(event.motion.x, event.motion.y, event.button.button); + break; + } + window->Tick(1.0f); + window->Draw(g); + /*sim->update_particles(); + sim->air->update_air(); + mouseButton = SDL_GetMouseState(&mouseX, &mouseY); + if(mouseButton) + { + sim->create_parts(mouseX, mouseY, 4, 4, (rand()%4)+1, 0); + } + if(mouseButton==4 && !lastMouseButton) + { + sim->sys_pause = !sim->sys_pause; + } + //ren->render_parts(); + //ren->render_fire(); + + + ren->g->clearrect(0, 0, XRES+BARSIZE, YRES+MENUSIZE);*/ + g->Blit(); + g->Clear(); + } +} diff --git a/src/Renderer.cpp b/src/Renderer.cpp new file mode 100644 index 0000000..c1bbf3c --- /dev/null +++ b/src/Renderer.cpp @@ -0,0 +1,1692 @@ +/* + * Renderer.cpp + * + * Created on: Jan 7, 2012 + * Author: Simon + */ + +#include +#include "Config.h" +#include "Renderer.h" +#include "Graphics.h" +#include "Elements.h" +#include "ElementFunctions.h" +#include "ElementGraphics.h" +#include "Air.h" +extern "C" +{ +#include "hmap.h" +} + +void Renderer::draw_walls() +{ + int x, y, i, j, cr, cg, cb; + unsigned char wt; + pixel pc; + pixel gc; + unsigned char (*bmap)[XRES/CELL] = sim->bmap; + unsigned char (*emap)[XRES/CELL] = sim->emap; + wall_type *wtypes = sim->wtypes; + pixel * vid = g->vid; + + for (y=0; y=UI_WALLCOUNT) + continue; + pc = wtypes[wt].colour; + gc = wtypes[wt].eglow; + + // standard wall patterns + if (wtypes[wt].drawstyle==1) + { + for (j=0; j>1)&1; i>1)&1; idrawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); + } + else if (wtypes[wt].drawstyle==2) + { + for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); + } + else if (wtypes[wt].drawstyle==3) + { + for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); + } + else if (wtypes[wt].drawstyle==4) + { + for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); + else if (i == j+1 || (i == 0 && j == CELL-1)) + g->drawblob((x*CELL+i), (y*CELL+j), PIXR(gc), PIXG(gc), PIXB(gc)); + else + g->drawblob((x*CELL+i), (y*CELL+j), 0x20, 0x20, 0x20); + } + if (bmap[y][x]==WL_EWALL) + { + if (emap[y][x]) + { + for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80); + } + else + { + for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80); + } + } + else if (bmap[y][x]==WL_WALLELEC) + { + for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); + else + g->drawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80); + } + } + else if (bmap[y][x]==WL_EHOLE) + { + if (emap[y][x]) + { + for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), 0x24, 0x24, 0x24); + for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), 0x24, 0x24, 0x24); + } + } + } + if (wtypes[wt].eglow && emap[y][x]) + { + // glow if electrified + pc = wtypes[wt].eglow; + cr = fire_r[y][x] + PIXR(pc); + if (cr > 255) cr = 255; + fire_r[y][x] = cr; + cg = fire_g[y][x] + PIXG(pc); + if (cg > 255) cg = 255; + fire_g[y][x] = cg; + cb = fire_b[y][x] + PIXB(pc); + if (cb > 255) cb = 255; + fire_b[y][x] = cb; + + } + } +} + +void Renderer::get_sign_pos(int i, int *x0, int *y0, int *w, int *h) +{ + sign *signs = sim->signs; + //Changing width if sign have special content + if (strcmp(signs[i].text, "{p}")==0) + *w = Graphics::textwidth("Pressure: -000.00"); + + if (strcmp(signs[i].text, "{t}")==0) + *w = Graphics::textwidth("Temp: 0000.00"); + + if (sregexp(signs[i].text, "^{c:[0-9]*|.*}$")==0) + { + int sldr, startm; + char buff[256]; + memset(buff, 0, sizeof(buff)); + for (sldr=3; signs[i].text[sldr-1] != '|'; sldr++) + startm = sldr + 1; + + sldr = startm; + while (signs[i].text[sldr] != '}') + { + buff[sldr - startm] = signs[i].text[sldr]; + sldr++; + } + *w = Graphics::textwidth(buff) + 5; + } + + //Ususal width + if (strcmp(signs[i].text, "{p}") && strcmp(signs[i].text, "{t}") && sregexp(signs[i].text, "^{c:[0-9]*|.*}$")) + *w = Graphics::textwidth(signs[i].text) + 5; + *h = 14; + *x0 = (signs[i].ju == 2) ? signs[i].x - *w : + (signs[i].ju == 1) ? signs[i].x - *w/2 : signs[i].x; + *y0 = (signs[i].y > 18) ? signs[i].y - 18 : signs[i].y + 4; +} + +void Renderer::render_signs() +{ + int i, j, x, y, w, h, dx, dy,mx,my,b=1,bq; + sign *signs = sim->signs; + for (i=0; iclearrect(x, y, w, h); + g->drawrect(x, y, w, h, 192, 192, 192, 255); + + //Displaying special information + if (strcmp(signs[i].text, "{p}")==0) + { + sprintf(buff, "Pressure: %3.2f", sim->pv[signs[i].y/CELL][signs[i].x/CELL]); //...pressure + g->drawtext(x+3, y+3, buff, 255, 255, 255, 255); + } + if (strcmp(signs[i].text, "{t}")==0) + { + if (sim->pmap[signs[i].y][signs[i].x]) + sprintf(buff, "Temp: %4.2f", sim->parts[sim->pmap[signs[i].y][signs[i].x]>>8].temp-273.15); //...tempirature + else + sprintf(buff, "Temp: 0.00"); //...tempirature + g->drawtext(x+3, y+3, buff, 255, 255, 255, 255); + } + + if (sregexp(signs[i].text, "^{c:[0-9]*|.*}$")==0) + { + int sldr, startm; + memset(buff, 0, sizeof(buff)); + for (sldr=3; signs[i].text[sldr-1] != '|'; sldr++) + startm = sldr + 1; + sldr = startm; + while (signs[i].text[sldr] != '}') + { + buff[sldr - startm] = signs[i].text[sldr]; + sldr++; + } + g->drawtext(x+3, y+3, buff, 0, 191, 255, 255); + } + + //Usual text + if (strcmp(signs[i].text, "{p}") && strcmp(signs[i].text, "{t}") && sregexp(signs[i].text, "^{c:[0-9]*|.*}$")) + g->drawtext(x+3, y+3, signs[i].text, 255, 255, 255, 255); + + x = signs[i].x; + y = signs[i].y; + dx = 1 - signs[i].ju; + dy = (signs[i].y > 18) ? -1 : 1; + for (j=0; j<4; j++) + { + g->drawpixel(x, y, 192, 192, 192, 255); + x+=dx; + y+=dy; + } + /*if (MSIGN==i) + { + bq = b; + b = SDL_GetMouseState(&mx, &my); + mx /= sdl_scale; + my /= sdl_scale; + signs[i].x = mx; + signs[i].y = my; + }*/ + } +} + +void Renderer::render_gravlensing() +{ + int nx, ny, rx, ry, gx, gy, bx, by, co; + int r, g, b; + pixel t; + pixel *src = this->g->vid; + pixel *dst = this->g->vid; + for(nx = 0; nx < XRES; nx++) + { + for(ny = 0; ny < YRES; ny++) + { + co = (ny/CELL)*(XRES/CELL)+(nx/CELL); + rx = (int)(nx-sim->gravx[co]*0.75f+0.5f); + ry = (int)(ny-sim->gravy[co]*0.75f+0.5f); + gx = (int)(nx-sim->gravx[co]*0.875f+0.5f); + gy = (int)(ny-sim->gravy[co]*0.875f+0.5f); + bx = (int)(nx-sim->gravx[co]+0.5f); + by = (int)(ny-sim->gravy[co]+0.5f); + if(rx > 0 && rx < XRES && ry > 0 && ry < YRES && gx > 0 && gx < XRES && gy > 0 && gy < YRES && bx > 0 && bx < XRES && by > 0 && by < YRES) + { + t = dst[ny*(XRES+BARSIZE)+nx]; + r = PIXR(src[ry*(XRES+BARSIZE)+rx]) + PIXR(t); + g = PIXG(src[gy*(XRES+BARSIZE)+gx]) + PIXG(t); + b = PIXB(src[by*(XRES+BARSIZE)+bx]) + PIXB(t); + if (r>255) + r = 255; + if (g>255) + g = 255; + if (b>255) + b = 255; + dst[ny*(XRES+BARSIZE)+nx] = PIXRGB(r,g,b); + // addpixel(dst, nx, ny, PIXR(src[ry*(XRES+BARSIZE)+rx]), PIXG(src[gy*(XRES+BARSIZE)+gx]), PIXB(src[by*(XRES+BARSIZE)+bx]), 255); + } + + /*rx = nx+(gravxf[(ny*XRES)+nx]*0.5f); + ry = ny+(gravyf[(ny*XRES)+nx]*0.5f); + gx = nx+(gravxf[(ny*XRES)+nx]*0.75f); + gy = ny+(gravyf[(ny*XRES)+nx]*0.75f); + bx = nx+(gravxf[(ny*XRES)+nx]); + by = ny+(gravyf[(ny*XRES)+nx]); + if(rx > 0 && rx < XRES && ry > 0 && ry < YRES && gravp[ny/CELL][nx/CELL]*0.5f > -8.0f) + addpixel(dst, rx, ry, PIXR(src[ry*(XRES+BARSIZE)+rx]), 0, 0, 255); + if(gx > 0 && gx < XRES && gy > 0 && gy < YRES && gravp[ny/CELL][nx/CELL]*0.75f > -8.0f) + addpixel(dst, gx, gy, 0, PIXG(src[ry*(XRES+BARSIZE)+rx]), 0, 255); + if(bx > 0 && bx < XRES && by > 0 && by < YRES && gravp[ny/CELL][nx/CELL] > -8.0f) + addpixel(dst, bx, by, 0, 0, PIXB(src[ry*(XRES+BARSIZE)+rx]), 255);*/ + } + } +} + +void Renderer::render_fire() +{ + int i,j,x,y,r,g,b,nx,ny; + for (j=0; jg->addpixel(i*CELL+x, j*CELL+y, r, g, b, fire_alpha[y+CELL][x+CELL]); + r *= 8; + g *= 8; + b *= 8; + for (y=-1; y<2; y++) + for (x=-1; x<2; x++) + if ((x || y) && i+x>=0 && j+y>=0 && i+x4 ? r-4 : 0; + fire_g[j][i] = g>4 ? g-4 : 0; + fire_b[j][i] = b>4 ? b-4 : 0; + } +} + +void Renderer::prepare_alpha(int size, float intensity) +{ + //TODO: implement size + int x,y,i,j,c; + float multiplier = 255.0f*intensity; + float temp[CELL*3][CELL*3]; + float fire_alphaf[CELL*3][CELL*3]; + float glow_alphaf[11][11]; + float blur_alphaf[7][7]; + memset(temp, 0, sizeof(temp)); + for (x=0; x 7) + continue; + glow_alphaf[c+x][c-y] += 0.02f; + glow_alphaf[c-x][c+y] += 0.02f; + glow_alphaf[c+x][c+y] += 0.02f; + glow_alphaf[c-x][c-y] += 0.02f; + } + } + + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, glowAlpha); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 11, 11, GL_ALPHA, GL_FLOAT, glow_alphaf); + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + + c = 3; + + for (x=-3; x<4; x++) + { + for (y=-3; y<4; y++) + { + if (abs(x)+abs(y) <2 && !(abs(x)==2||abs(y)==2)) + blur_alphaf[c+x][c-y] = 0.11f; + if (abs(x)+abs(y) <=3 && abs(x)+abs(y)) + blur_alphaf[c+x][c-y] = 0.08f; + if (abs(x)+abs(y) == 2) + blur_alphaf[c+x][c-y] = 0.04f; + } + } + + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, blurAlpha); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 7, 7, GL_ALPHA, GL_FLOAT, blur_alphaf); + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); +#endif +} + +void Renderer::render_parts() +{ + int deca, decr, decg, decb, cola, colr, colg, colb, firea, firer, fireg, fireb, pixel_mode, q, i, t, nx, ny, x, y, caddress; + int orbd[4] = {0, 0, 0, 0}, orbl[4] = {0, 0, 0, 0}; + float gradv, flicker, fnx, fny; + Particle * parts = sim->parts; + part_transition *ptransitions = sim->ptransitions; + part_type *ptypes = sim->ptypes; +#ifdef OGLR + int cfireV = 0, cfireC = 0, cfire = 0; + int csmokeV = 0, csmokeC = 0, csmoke = 0; + int cblobV = 0, cblobC = 0, cblob = 0; + int cblurV = 0, cblurC = 0, cblur = 0; + int cglowV = 0, cglowC = 0, cglow = 0; + int cflatV = 0, cflatC = 0, cflat = 0; + int caddV = 0, caddC = 0, cadd = 0; + int clineV = 0, clineC = 0, cline = 0; + GLuint origBlendSrc, origBlendDst; + + glGetIntegerv(GL_BLEND_SRC, &origBlendSrc); + glGetIntegerv(GL_BLEND_DST, &origBlendDst); + //Render to the particle FBO + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); +#else + /*if (GRID_MODE)//draws the grid + { + for (ny=0; nyparts_lastActiveIndex; i++) { + if (sim->parts[i].type) { + t = sim->parts[i].type; + + nx = (int)(sim->parts[i].x+0.5f); + ny = (int)(sim->parts[i].y+0.5f); + fnx = sim->parts[i].x; + fny = sim->parts[i].y; + + if((sim->photons[ny][nx]&0xFF) && !(ptypes[t].properties & TYPE_ENERGY)) + continue; + + //Defaults + pixel_mode = 0 | PMODE_FLAT; + cola = 255; + colr = PIXR(ptypes[t].pcolors); + colg = PIXG(ptypes[t].pcolors); + colb = PIXB(ptypes[t].pcolors); + firea = 0; + + deca = (sim->parts[i].dcolour>>24)&0xFF; + decr = (sim->parts[i].dcolour>>16)&0xFF; + decg = (sim->parts[i].dcolour>>8)&0xFF; + decb = (sim->parts[i].dcolour)&0xFF; + + /*if(display_mode == RENDER_NONE) + { + if(decorations_enable) + { + colr = (deca*decr + (255-deca)*colr) >> 8; + colg = (deca*decg + (255-deca)*colg) >> 8; + colb = (deca*decb + (255-deca)*colb) >> 8; + } +#ifdef OGLR + flatV[cflatV++] = nx; + flatV[cflatV++] = ny; + flatC[cflatC++] = ((float)colr)/255.0f; + flatC[cflatC++] = ((float)colg)/255.0f; + flatC[cflatC++] = ((float)colb)/255.0f; + flatC[cflatC++] = 1.0f; + cflat++; +#else + vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(colr,colg,colb); +#endif + } + else*/ + { + if (graphicscache[t].isready) + { + pixel_mode = graphicscache[t].pixel_mode; + cola = graphicscache[t].cola; + colr = graphicscache[t].colr; + colg = graphicscache[t].colg; + colb = graphicscache[t].colb; + firea = graphicscache[t].firea; + firer = graphicscache[t].firer; + fireg = graphicscache[t].fireg; + fireb = graphicscache[t].fireb; + } + else + { + if (ptypes[t].graphics_func) + { + if ((*(ptypes[t].graphics_func))(this, &(sim->parts[i]), nx, ny, &pixel_mode, &cola, &colr, &colg, &colb, &firea, &firer, &fireg, &fireb)) //That's a lot of args, a struct might be better + { + graphicscache[t].isready = 1; + graphicscache[t].pixel_mode = pixel_mode; + graphicscache[t].cola = cola; + graphicscache[t].colr = colr; + graphicscache[t].colg = colg; + graphicscache[t].colb = colb; + graphicscache[t].firea = firea; + graphicscache[t].firer = firer; + graphicscache[t].fireg = fireg; + graphicscache[t].fireb = fireb; + } + } + else + { + if(graphics_DEFAULT(this, &(sim->parts[i]), nx, ny, &pixel_mode, &cola, &colr, &colg, &colb, &firea, &firer, &fireg, &fireb)) + { + graphicscache[t].isready = 1; + graphicscache[t].pixel_mode = pixel_mode; + graphicscache[t].cola = cola; + graphicscache[t].colr = colr; + graphicscache[t].colg = colg; + graphicscache[t].colb = colb; + graphicscache[t].firea = firea; + graphicscache[t].firer = firer; + graphicscache[t].fireg = fireg; + graphicscache[t].fireb = fireb; + } + } + } + if((ptypes[t].properties & PROP_HOT_GLOW) && sim->parts[i].temp>(ptransitions[t].thv-800.0f)) + { + gradv = 3.1415/(2*ptransitions[t].thv-(ptransitions[t].thv-800.0f)); + caddress = (sim->parts[i].temp>ptransitions[t].thv)?ptransitions[t].thv-(ptransitions[t].thv-800.0f):sim->parts[i].temp-(ptransitions[t].thv-800.0f); + colr += sin(gradv*caddress) * 226;; + colg += sin(gradv*caddress*4.55 +3.14) * 34; + colb += sin(gradv*caddress*2.22 +3.14) * 64; + } + + if((pixel_mode & FIRE_ADD) && !(render_mode & FIRE_ADD)) + pixel_mode |= PMODE_GLOW; + if((pixel_mode & FIRE_BLEND) && !(render_mode & FIRE_BLEND)) + pixel_mode |= PMODE_BLUR; + if((pixel_mode & PMODE_BLUR) && !(render_mode & PMODE_BLUR)) + pixel_mode |= PMODE_FLAT; + if((pixel_mode & PMODE_GLOW) && !(render_mode & PMODE_GLOW)) + pixel_mode |= PMODE_FLAT; + if (render_mode & PMODE_BLOB) + pixel_mode |= PMODE_BLOB; + + pixel_mode &= render_mode; + + //Alter colour based on display mode + if(colour_mode & COLOUR_HEAT) + { + caddress = restrict_flt((int)( restrict_flt((float)(sim->parts[i].temp+(-MIN_TEMP)), 0.0f, MAX_TEMP+(-MIN_TEMP)) / ((MAX_TEMP+(-MIN_TEMP))/1024) ) *3, 0.0f, (1024.0f*3)-3); + firea = 255; + firer = colr = (unsigned char)color_data[caddress]; + fireg = colg = (unsigned char)color_data[caddress+1]; + fireb = colb = (unsigned char)color_data[caddress+2]; + cola = 255; + if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; + } + else if(colour_mode & COLOUR_LIFE) + { + gradv = 0.4f; + if (!(sim->parts[i].life<5)) + q = sqrt(sim->parts[i].life); + else + q = sim->parts[i].life; + colr = colg = colb = sin(gradv*q) * 100 + 128; + cola = 255; + if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; + } + else if (colour_mode & COLOUR_GRAD) + { + float frequency = 0.05; + int q = sim->parts[i].temp-40; + colr = sin(frequency*q) * 16 + colr; + colg = sin(frequency*q) * 16 + colg; + colb = sin(frequency*q) * 16 + colb; + if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; + } + + //Apply decoration colour + if(!colour_mode) + { + if(!(pixel_mode & NO_DECO) && decorations_enable) + { + colr = (deca*decr + (255-deca)*colr) >> 8; + colg = (deca*decg + (255-deca)*colg) >> 8; + colb = (deca*decb + (255-deca)*colb) >> 8; + } + + if((pixel_mode & DECO_FIRE) && decorations_enable) + { + firer = (deca*decr + (255-deca)*firer) >> 8; + fireg = (deca*decg + (255-deca)*fireg) >> 8; + fireb = (deca*decb + (255-deca)*fireb) >> 8; + } + } + + #ifndef OGLR + //All colours are now set, check ranges + if(colr>255) colr = 255; + else if(colr<0) colr = 0; + if(colg>255) colg = 255; + else if(colg<0) colg = 0; + if(colb>255) colb = 255; + else if(colb<0) colb = 0; + if(cola>255) cola = 255; + else if(cola<0) cola = 0; + #endif + + //Pixel rendering + if(pixel_mode & PSPEC_STICKMAN) + { + char buff[20]; //Buffer for HP + int s; + int legr, legg, legb; + playerst *cplayer; + if(t==PT_STKM) + cplayer = &sim->player; + else if(t==PT_STKM2) + cplayer = &sim->player2; + else if(t==PT_FIGH) + cplayer = &sim->fighters[(unsigned char)sim->parts[i].tmp]; + else + continue; + +/* if (mousex>(nx-3) && mousex<(nx+3) && mousey<(ny+3) && mousey>(ny-3)) //If mous is in the head + { + sprintf(buff, "%3d", sim->parts[i].life); //Show HP + g->drawtext(mousex-8-2*(sim->parts[i].life<100)-2*(sim->parts[i].life<10), mousey-12, buff, 255, 255, 255, 255); + }*/ + + if (colour_mode!=COLOUR_HEAT) + { + if (cplayer->elemelem].pcolors); + colg = PIXG(ptypes[cplayer->elem].pcolors); + colb = PIXB(ptypes[cplayer->elem].pcolors); + } + else + { + colr = 0x80; + colg = 0x80; + colb = 0xFF; + } + } +#ifdef OGLR + glColor4f(((float)colr)/255.0f, ((float)colg)/255.0f, ((float)colb)/255.0f, 1.0f); + glBegin(GL_LINE_STRIP); + if(t==PT_FIGH) + { + glVertex2f(fnx, fny+2); + glVertex2f(fnx+2, fny); + glVertex2f(fnx, fny-2); + glVertex2f(fnx-2, fny); + glVertex2f(fnx, fny+2); + } + else + { + glVertex2f(fnx-2, fny-2); + glVertex2f(fnx+2, fny-2); + glVertex2f(fnx+2, fny+2); + glVertex2f(fnx-2, fny+2); + glVertex2f(fnx-2, fny-2); + } + glEnd(); + glBegin(GL_LINES); + + if (colour_mode!=COLOUR_HEAT) + { + if (t==PT_STKM2) + glColor4f(100.0f/255.0f, 100.0f/255.0f, 1.0f, 1.0f); + else + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + } + + glVertex2f(nx, ny+3); + glVertex2f(cplayer->legs[0], cplayer->legs[1]); + + glVertex2f(cplayer->legs[0], cplayer->legs[1]); + glVertex2f(cplayer->legs[4], cplayer->legs[5]); + + glVertex2f(nx, ny+3); + glVertex2f(cplayer->legs[8], cplayer->legs[9]); + + glVertex2f(cplayer->legs[8], cplayer->legs[9]); + glVertex2f(cplayer->legs[12], cplayer->legs[13]); + glEnd(); +#else + s = XRES+BARSIZE; + + if (t==PT_STKM2) + { + legr = 100; + legg = 100; + legb = 255; + } + else + { + legr = 255; + legg = 255; + legb = 255; + } + + if (colour_mode==COLOUR_HEAT) + { + legr = colr; + legg = colg; + legb = colb; + } + + //head + if(t==PT_FIGH) + { + g->draw_line(nx, ny+2, nx+2, ny, colr, colg, colb, s); + g->draw_line(nx+2, ny, nx, ny-2, colr, colg, colb, s); + g->draw_line(nx, ny-2, nx-2, ny, colr, colg, colb, s); + g->draw_line(nx-2, ny, nx, ny+2, colr, colg, colb, s); + } + else + { + g->draw_line(nx-2, ny+2, nx+2, ny+2, colr, colg, colb, s); + g->draw_line(nx-2, ny-2, nx+2, ny-2, colr, colg, colb, s); + g->draw_line(nx-2, ny-2, nx-2, ny+2, colr, colg, colb, s); + g->draw_line(nx+2, ny-2, nx+2, ny+2, colr, colg, colb, s); + } + //legs + g->draw_line(nx, ny+3, cplayer->legs[0], cplayer->legs[1], legr, legg, legb, s); + g->draw_line(cplayer->legs[0], cplayer->legs[1], cplayer->legs[4], cplayer->legs[5], legr, legg, legb, s); + g->draw_line(nx, ny+3, cplayer->legs[8], cplayer->legs[9], legr, legg, legb, s); + g->draw_line(cplayer->legs[8], cplayer->legs[9], cplayer->legs[12], cplayer->legs[13], legr, legg, legb, s); +#endif + } + if(pixel_mode & PMODE_FLAT) + { +#ifdef OGLR + flatV[cflatV++] = nx; + flatV[cflatV++] = ny; + flatC[cflatC++] = ((float)colr)/255.0f; + flatC[cflatC++] = ((float)colg)/255.0f; + flatC[cflatC++] = ((float)colb)/255.0f; + flatC[cflatC++] = 1.0f; + cflat++; +#else + g->vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(colr,colg,colb); +#endif + } + if(pixel_mode & PMODE_BLEND) + { +#ifdef OGLR + flatV[cflatV++] = nx; + flatV[cflatV++] = ny; + flatC[cflatC++] = ((float)colr)/255.0f; + flatC[cflatC++] = ((float)colg)/255.0f; + flatC[cflatC++] = ((float)colb)/255.0f; + flatC[cflatC++] = ((float)cola)/255.0f; + cflat++; +#else + g->blendpixel(nx, ny, colr, colg, colb, cola); +#endif + } + if(pixel_mode & PMODE_ADD) + { +#ifdef OGLR + addV[caddV++] = nx; + addV[caddV++] = ny; + addC[caddC++] = ((float)colr)/255.0f; + addC[caddC++] = ((float)colg)/255.0f; + addC[caddC++] = ((float)colb)/255.0f; + addC[caddC++] = ((float)cola)/255.0f; + cadd++; +#else + g->addpixel(nx, ny, colr, colg, colb, cola); +#endif + } + if(pixel_mode & PMODE_BLOB) + { +#ifdef OGLR + blobV[cblobV++] = nx; + blobV[cblobV++] = ny; + blobC[cblobC++] = ((float)colr)/255.0f; + blobC[cblobC++] = ((float)colg)/255.0f; + blobC[cblobC++] = ((float)colb)/255.0f; + blobC[cblobC++] = 1.0f; + cblob++; +#else + g->vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(colr,colg,colb); + + g->blendpixel(nx+1, ny, colr, colg, colb, 223); + g->blendpixel(nx-1, ny, colr, colg, colb, 223); + g->blendpixel(nx, ny+1, colr, colg, colb, 223); + g->blendpixel(nx, ny-1, colr, colg, colb, 223); + + g->blendpixel(nx+1, ny-1, colr, colg, colb, 112); + g->blendpixel(nx-1, ny-1, colr, colg, colb, 112); + g->blendpixel(nx+1, ny+1, colr, colg, colb, 112); + g->blendpixel(nx-1, ny+1, colr, colg, colb, 112); +#endif + } + if(pixel_mode & PMODE_GLOW) + { +#ifdef OGLR + glowV[cglowV++] = nx; + glowV[cglowV++] = ny; + glowC[cglowC++] = ((float)colr)/255.0f; + glowC[cglowC++] = ((float)colg)/255.0f; + glowC[cglowC++] = ((float)colb)/255.0f; + glowC[cglowC++] = 1.0f; + cglow++; +#else + g->addpixel(nx, ny, colr, colg, colb, 192); + g->addpixel(nx+1, ny, colr, colg, colb, 96); + g->addpixel(nx-1, ny, colr, colg, colb, 96); + g->addpixel(nx, ny+1, colr, colg, colb, 96); + g->addpixel(nx, ny-1, colr, colg, colb, 96); + + for (x = 1; x < 6; x++) { + g->addpixel(nx, ny-x, colr, colg, colb, 5); + g->addpixel(nx, ny+x, colr, colg, colb, 5); + g->addpixel(nx-x, ny, colr, colg, colb, 5); + g->addpixel(nx+x, ny, colr, colg, colb, 5); + for (y = 1; y < 6; y++) { + if(x + y > 7) + continue; + g->addpixel(nx+x, ny-y, colr, colg, colb, 5); + g->addpixel(nx-x, ny+y, colr, colg, colb, 5); + g->addpixel(nx+x, ny+y, colr, colg, colb, 5); + g->addpixel(nx-x, ny-y, colr, colg, colb, 5); + } + } +#endif + } + if(pixel_mode & PMODE_BLUR) + { +#ifdef OGLR + blurV[cblurV++] = nx; + blurV[cblurV++] = ny; + blurC[cblurC++] = ((float)colr)/255.0f; + blurC[cblurC++] = ((float)colg)/255.0f; + blurC[cblurC++] = ((float)colb)/255.0f; + blurC[cblurC++] = 1.0f; + cblur++; +#else + for (x=-3; x<4; x++) + { + for (y=-3; y<4; y++) + { + if (abs(x)+abs(y) <2 && !(abs(x)==2||abs(y)==2)) + g->blendpixel(x+nx, y+ny, colr, colg, colb, 30); + if (abs(x)+abs(y) <=3 && abs(x)+abs(y)) + g->blendpixel(x+nx, y+ny, colr, colg, colb, 20); + if (abs(x)+abs(y) == 2) + g->blendpixel(x+nx, y+ny, colr, colg, colb, 10); + } + } +#endif + } + if(pixel_mode & PMODE_SPARK) + { + flicker = rand()%20; +#ifdef OGLR + //Oh god, this is awful + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx-5; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 1.0f - ((float)flicker)/30; + lineV[clineV++] = fnx; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx+5; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx; + lineV[clineV++] = fny-5; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 1.0f - ((float)flicker)/30; + lineV[clineV++] = fnx; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx; + lineV[clineV++] = fny+5; + cline++; +#else + gradv = 4*sim->parts[i].life + flicker; + for (x = 0; gradv>0.5; x++) { + g->addpixel(nx+x, ny, colr, colg, colb, gradv); + g->addpixel(nx-x, ny, colr, colg, colb, gradv); + + g->addpixel(nx, ny+x, colr, colg, colb, gradv); + g->addpixel(nx, ny-x, colr, colg, colb, gradv); + gradv = gradv/1.5f; + } +#endif + } + if(pixel_mode & PMODE_FLARE) + { + flicker = rand()%20; +#ifdef OGLR + //Oh god, this is awful + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx-10; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 1.0f - ((float)flicker)/40; + lineV[clineV++] = fnx; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx+10; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx; + lineV[clineV++] = fny-10; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 1.0f - ((float)flicker)/30; + lineV[clineV++] = fnx; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx; + lineV[clineV++] = fny+10; + cline++; +#else + gradv = flicker + fabs(parts[i].vx)*17 + fabs(sim->parts[i].vy)*17; + g->blendpixel(nx, ny, colr, colg, colb, (gradv*4)>255?255:(gradv*4) ); + g->blendpixel(nx+1, ny, colr, colg, colb, (gradv*2)>255?255:(gradv*2) ); + g->blendpixel(nx-1, ny, colr, colg, colb, (gradv*2)>255?255:(gradv*2) ); + g->blendpixel(nx, ny+1, colr, colg, colb, (gradv*2)>255?255:(gradv*2) ); + g->blendpixel(nx, ny-1, colr, colg, colb, (gradv*2)>255?255:(gradv*2) ); + if (gradv>255) gradv=255; + g->blendpixel(nx+1, ny-1, colr, colg, colb, gradv); + g->blendpixel(nx-1, ny-1, colr, colg, colb, gradv); + g->blendpixel(nx+1, ny+1, colr, colg, colb, gradv); + g->blendpixel(nx-1, ny+1, colr, colg, colb, gradv); + for (x = 1; gradv>0.5; x++) { + g->addpixel(nx+x, ny, colr, colg, colb, gradv); + g->addpixel(nx-x, ny, colr, colg, colb, gradv); + g->addpixel(nx, ny+x, colr, colg, colb, gradv); + g->addpixel(nx, ny-x, colr, colg, colb, gradv); + gradv = gradv/1.2f; + } +#endif + } + if(pixel_mode & PMODE_LFLARE) + { + flicker = rand()%20; +#ifdef OGLR + //Oh god, this is awful + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx-70; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 1.0f - ((float)flicker)/30; + lineV[clineV++] = fnx; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx+70; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx; + lineV[clineV++] = fny-70; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 1.0f - ((float)flicker)/50; + lineV[clineV++] = fnx; + lineV[clineV++] = fny; + cline++; + + lineC[clineC++] = ((float)colr)/255.0f; + lineC[clineC++] = ((float)colg)/255.0f; + lineC[clineC++] = ((float)colb)/255.0f; + lineC[clineC++] = 0.0f; + lineV[clineV++] = fnx; + lineV[clineV++] = fny+70; + cline++; +#else + gradv = flicker + fabs(parts[i].vx)*17 + fabs(parts[i].vy)*17; + g->blendpixel(nx, ny, colr, colg, colb, (gradv*4)>255?255:(gradv*4) ); + g->blendpixel(nx+1, ny, colr, colg, colb, (gradv*2)>255?255:(gradv*2) ); + g->blendpixel(nx-1, ny, colr, colg, colb, (gradv*2)>255?255:(gradv*2) ); + g->blendpixel(nx, ny+1, colr, colg, colb, (gradv*2)>255?255:(gradv*2) ); + g->blendpixel(nx, ny-1, colr, colg, colb, (gradv*2)>255?255:(gradv*2) ); + if (gradv>255) gradv=255; + g->blendpixel(nx+1, ny-1, colr, colg, colb, gradv); + g->blendpixel(nx-1, ny-1, colr, colg, colb, gradv); + g->blendpixel(nx+1, ny+1, colr, colg, colb, gradv); + g->blendpixel(nx-1, ny+1, colr, colg, colb, gradv); + for (x = 1; gradv>0.5; x++) { + g->addpixel(nx+x, ny, colr, colg, colb, gradv); + g->addpixel(nx-x, ny, colr, colg, colb, gradv); + g->addpixel(nx, ny+x, colr, colg, colb, gradv); + g->addpixel(nx, ny-x, colr, colg, colb, gradv); + gradv = gradv/1.01f; + } +#endif + } + if (pixel_mode & EFFECT_GRAVIN) + { + int nxo = 0; + int nyo = 0; + int r; + int fire_rv = 0; + float drad = 0.0f; + float ddist = 0.0f; + sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); + for (r = 0; r < 4; r++) { + ddist = ((float)orbd[r])/16.0f; + drad = (M_PI * ((float)orbl[r]) / 180.0f)*1.41f; + nxo = ddist*cos(drad); + nyo = ddist*sin(drad); + if (ny+nyo>0 && ny+nyo0 && nx+nxoaddpixel(nx+nxo, ny+nyo, colr, colg, colb, 255-orbd[r]); + } + } + if (pixel_mode & EFFECT_GRAVOUT) + { + int nxo = 0; + int nyo = 0; + int r; + int fire_bv = 0; + float drad = 0.0f; + float ddist = 0.0f; + sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); + for (r = 0; r < 4; r++) { + ddist = ((float)orbd[r])/16.0f; + drad = (M_PI * ((float)orbl[r]) / 180.0f)*1.41f; + nxo = ddist*cos(drad); + nyo = ddist*sin(drad); + if (ny+nyo>0 && ny+nyo0 && nx+nxoaddpixel(nx+nxo, ny+nyo, colr, colg, colb, 255-orbd[r]); + } + } + //Fire effects + if(firea && (pixel_mode & FIRE_BLEND)) + { +#ifdef OGLR + smokeV[csmokeV++] = nx; + smokeV[csmokeV++] = ny; + smokeC[csmokeC++] = ((float)firer)/255.0f; + smokeC[csmokeC++] = ((float)fireg)/255.0f; + smokeC[csmokeC++] = ((float)fireb)/255.0f; + smokeC[csmokeC++] = ((float)firea)/255.0f; + csmoke++; +#else + firea /= 2; + fire_r[ny/CELL][nx/CELL] = (firea*firer + (255-firea)*fire_r[ny/CELL][nx/CELL]) >> 8; + fire_g[ny/CELL][nx/CELL] = (firea*fireg + (255-firea)*fire_g[ny/CELL][nx/CELL]) >> 8; + fire_b[ny/CELL][nx/CELL] = (firea*fireb + (255-firea)*fire_b[ny/CELL][nx/CELL]) >> 8; +#endif + } + if(firea && (pixel_mode & FIRE_ADD)) + { +#ifdef OGLR + fireV[cfireV++] = nx; + fireV[cfireV++] = ny; + fireC[cfireC++] = ((float)firer)/255.0f; + fireC[cfireC++] = ((float)fireg)/255.0f; + fireC[cfireC++] = ((float)fireb)/255.0f; + fireC[cfireC++] = ((float)firea)/255.0f; + cfire++; +#else + firea /= 8; + firer = ((firea*firer) >> 8) + fire_r[ny/CELL][nx/CELL]; + fireg = ((firea*fireg) >> 8) + fire_g[ny/CELL][nx/CELL]; + fireb = ((firea*fireb) >> 8) + fire_b[ny/CELL][nx/CELL]; + + if(firer>255) + firer = 255; + if(fireg>255) + fireg = 255; + if(fireb>255) + fireb = 255; + + fire_r[ny/CELL][nx/CELL] = firer; + fire_g[ny/CELL][nx/CELL] = fireg; + fire_b[ny/CELL][nx/CELL] = fireb; +#endif + } + } + } + } +#ifdef OGLR + + //Go into array mode + glEnableClientState(GL_COLOR_ARRAY); + glEnableClientState(GL_VERTEX_ARRAY); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + if(cflat) + { + // -- BEGIN FLAT -- // + //Set point size (size of fire texture) + glPointSize(1.0f); + + glColorPointer(4, GL_FLOAT, 0, &flatC[0]); + glVertexPointer(2, GL_INT, 0, &flatV[0]); + + glDrawArrays(GL_POINTS, 0, cflat); + + //Clear some stuff we set + // -- END FLAT -- // + } + + if(cblob) + { + // -- BEGIN BLOB -- // + glEnable( GL_POINT_SMOOTH ); //Blobs! + glPointSize(2.5f); + + glColorPointer(4, GL_FLOAT, 0, &blobC[0]); + glVertexPointer(2, GL_INT, 0, &blobV[0]); + + glDrawArrays(GL_POINTS, 0, cblob); + + //Clear some stuff we set + glDisable( GL_POINT_SMOOTH ); + // -- END BLOB -- // + } + + if(cglow || cblur) + { + // -- BEGIN GLOW -- // + //Start and prepare fire program + glEnable(GL_TEXTURE_2D); + glUseProgram(fireProg); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, glowAlpha); + glUniform1i(glGetUniformLocation(fireProg, "fireAlpha"), 0); + + glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT); + + //Make sure we can use texture coords on points + glEnable(GL_POINT_SPRITE); + glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); + glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE); + + //Set point size (size of fire texture) + glPointSize(11.0f); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + if(cglow) + { + glColorPointer(4, GL_FLOAT, 0, &glowC[0]); + glVertexPointer(2, GL_INT, 0, &glowV[0]); + + glDrawArrays(GL_POINTS, 0, cglow); + } + + glPointSize(7.0f); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + if(cblur) + { + glBindTexture(GL_TEXTURE_2D, blurAlpha); + + glColorPointer(4, GL_FLOAT, 0, &blurC[0]); + glVertexPointer(2, GL_INT, 0, &blurV[0]); + + glDrawArrays(GL_POINTS, 0, cblur); + } + + //Clear some stuff we set + glDisable(GL_POINT_SPRITE); + glDisable(GL_VERTEX_PROGRAM_POINT_SIZE); + glUseProgram(0); + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + // -- END GLOW -- // + } + + if(cadd) + { + // -- BEGIN ADD -- // + //Set point size (size of fire texture) + glPointSize(1.0f); + + glColorPointer(4, GL_FLOAT, 0, &addC[0]); + glVertexPointer(2, GL_INT, 0, &addV[0]); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + glDrawArrays(GL_POINTS, 0, cadd); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + //Clear some stuff we set + // -- END ADD -- // + } + + if(cline) + { + // -- BEGIN LINES -- // + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + glEnable( GL_LINE_SMOOTH ); + glColorPointer(4, GL_FLOAT, 0, &lineC[0]); + glVertexPointer(2, GL_FLOAT, 0, &lineV[0]); + + glDrawArrays(GL_LINE_STRIP, 0, cline); + + //Clear some stuff we set + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glDisable(GL_LINE_SMOOTH); + // -- END LINES -- // + } + + if(cfire || csmoke) + { + // -- BEGIN FIRE -- // + //Start and prepare fire program + glEnable(GL_TEXTURE_2D); + glUseProgram(fireProg); + //glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, fireAlpha); + glUniform1i(glGetUniformLocation(fireProg, "fireAlpha"), 0); + + //Make sure we can use texture coords on points + glEnable(GL_POINT_SPRITE); + glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); + glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE); + + //Set point size (size of fire texture) + glPointSize(CELL*3); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + if(cfire) + { + glColorPointer(4, GL_FLOAT, 0, &fireC[0]); + glVertexPointer(2, GL_INT, 0, &fireV[0]); + + glDrawArrays(GL_POINTS, 0, cfire); + } + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + if(csmoke) + { + glColorPointer(4, GL_FLOAT, 0, &smokeC[0]); + glVertexPointer(2, GL_INT, 0, &smokeV[0]); + + glDrawArrays(GL_POINTS, 0, csmoke); + } + + //Clear some stuff we set + glDisable(GL_POINT_SPRITE); + glDisable(GL_VERTEX_PROGRAM_POINT_SIZE); + glUseProgram(0); + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + // -- END FIRE -- // + } + + glDisableClientState(GL_COLOR_ARRAY); + glDisableClientState(GL_VERTEX_ARRAY); + + //Reset FBO + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + + //Drawing the FBO onto the screen sounds like a cool idea now + + glBlendFunc(origBlendSrc, origBlendDst); +#endif +} + +void Renderer::prepare_graphicscache() +{ + graphicscache = (gcache_item *)malloc(sizeof(gcache_item)*PT_NUM); + memset(graphicscache, 0, sizeof(gcache_item)*PT_NUM); +} + +void Renderer::draw_other() // EMP effect +{ + int i, j; + //if (emp_decor>0 && !sys_pause) emp_decor-=emp_decor/25+2; TODO: Render should render only, do not change simulation state + if (emp_decor>40) emp_decor=40; + if (emp_decor<0) emp_decor = 0; + if (!(display_mode & DISPLAY_EFFE)) // no in nothing mode + return; + if (emp_decor>0) + { +#ifdef OGLR + float femp_decor = ((float)emp_decor)/255.0f; + /*int r=emp_decor*2.5, g=100+emp_decor*1.5, b=255; + int a=(1.0*emp_decor/110)*255; + if (r>255) r=255; + if (g>255) g=255; + if (b>255) g=255; + if (a>255) a=255;*/ + glBegin(GL_QUADS); + glColor4f(femp_decor*2.5f, 0.4f+femp_decor*1.5f, 1.0f+femp_decor*1.5f, femp_decor/0.44f); + glVertex2f(0, MENUSIZE); + glVertex2f(XRES, MENUSIZE); + glVertex2f(XRES, YRES+MENUSIZE); + glVertex2f(0, YRES+MENUSIZE); + glEnd(); +#else + int r=emp_decor*2.5, g=100+emp_decor*1.5, b=255; + int a=(1.0*emp_decor/110)*255; + if (r>255) r=255; + if (g>255) g=255; + if (b>255) g=255; + if (a>255) a=255; + for (j=0; jg->drawpixel(i, j, r, g, b, a); + } +#endif + } +} + +void Renderer::draw_grav() +{ + int x, y, i, ca; + float nx, ny, dist; + + for (y=0; ygravx[ca]) <= 0.001f && fabsf(sim->gravy[ca]) <= 0.001f) + continue; + nx = x*CELL; + ny = y*CELL; + dist = fabsf(sim->gravy[ca])+fabsf(sim->gravx[ca]); + for(i = 0; i < 4; i++) + { + nx -= sim->gravx[ca]*0.5f; + ny -= sim->gravy[ca]*0.5f; + g->addpixel((int)(nx+0.5f), (int)(ny+0.5f), 255, 255, 255, (int)(dist*20.0f)); + } + } + } +} + +void Renderer::draw_air() +{ +#ifndef OGLR + int x, y, i, j; + float (*pv)[XRES/CELL] = sim->air->pv; + float (*hv)[XRES/CELL] = sim->air->hv; + float (*vx)[XRES/CELL] = sim->air->vx; + float (*vy)[XRES/CELL] = sim->air->vy; + pixel c; + for (y=0; y 0.0f) + c = PIXRGB(clamp_flt(pv[y][x], 0.0f, 8.0f), 0, 0);//positive pressure is red! + else + c = PIXRGB(0, 0, clamp_flt(-pv[y][x], 0.0f, 8.0f));//negative pressure is blue! + } + else if (display_mode & DISPLAY_AIRV) + { + c = PIXRGB(clamp_flt(fabsf(vx[y][x]), 0.0f, 8.0f),//vx adds red + clamp_flt(pv[y][x], 0.0f, 8.0f),//pressure adds green + clamp_flt(fabsf(vy[y][x]), 0.0f, 8.0f));//vy adds blue + } + else if (display_mode & DISPLAY_AIRH) + { + float ttemp = hv[y][x]+(-MIN_TEMP); + int caddress = restrict_flt((int)( restrict_flt(ttemp, 0.0f, MAX_TEMP+(-MIN_TEMP)) / ((MAX_TEMP+(-MIN_TEMP))/1024) ) *3, 0.0f, (1024.0f*3)-3); + c = PIXRGB((int)((unsigned char)color_data[caddress]*0.7f), (int)((unsigned char)color_data[caddress+1]*0.7f), (int)((unsigned char)color_data[caddress+2]*0.7f)); + //c = PIXRGB(clamp_flt(fabsf(vx[y][x]), 0.0f, 8.0f),//vx adds red + // clamp_flt(hv[y][x], 0.0f, 1600.0f),//heat adds green + // clamp_flt(fabsf(vy[y][x]), 0.0f, 8.0f));//vy adds blue + } + else if (display_mode & DISPLAY_AIRC) + { + int r; + int g; + int b; + // velocity adds grey + r = clamp_flt(fabsf(vx[y][x]), 0.0f, 24.0f) + clamp_flt(fabsf(vy[y][x]), 0.0f, 20.0f); + g = clamp_flt(fabsf(vx[y][x]), 0.0f, 20.0f) + clamp_flt(fabsf(vy[y][x]), 0.0f, 24.0f); + b = clamp_flt(fabsf(vx[y][x]), 0.0f, 24.0f) + clamp_flt(fabsf(vy[y][x]), 0.0f, 20.0f); + if (pv[y][x] > 0.0f) + { + r += clamp_flt(pv[y][x], 0.0f, 16.0f);//pressure adds red! + if (r>255) + r=255; + if (g>255) + g=255; + if (b>255) + b=255; + c = PIXRGB(r, g, b); + } + else + { + b += clamp_flt(-pv[y][x], 0.0f, 16.0f);//pressure adds blue! + if (r>255) + r=255; + if (g>255) + g=255; + if (b>255) + b=255; + c = PIXRGB(r, g, b); + } + } + for (j=0; jvid[(x*CELL+i) + (y*CELL+j)*(XRES+BARSIZE)] = c; + } +#else + GLuint airProg; + if(display_mode & DISPLAY_AIRC) + { + airProg = airProg_Cracker; + } + else if(display_mode & DISPLAY_AIRV) + { + airProg = airProg_Velocity; + } + else if(display_mode & DISPLAY_AIRP) + { + airProg = airProg_Pressure; + } + else + { + return; + } + + glEnable( GL_TEXTURE_2D ); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); + + glUseProgram(airProg); + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, airVX); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_RED, GL_FLOAT, vx); + glUniform1i(glGetUniformLocation(airProg, "airX"), 0); + glActiveTexture(GL_TEXTURE1); + glBindTexture(GL_TEXTURE_2D, airVY); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_GREEN, GL_FLOAT, vy); + glUniform1i(glGetUniformLocation(airProg, "airY"), 1); + glActiveTexture(GL_TEXTURE2); + glBindTexture(GL_TEXTURE_2D, airPV); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_BLUE, GL_FLOAT, pv); + glUniform1i(glGetUniformLocation(airProg, "airP"), 2); + glActiveTexture(GL_TEXTURE0); + + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glBegin(GL_QUADS); + glTexCoord2d(1, 1); + glVertex3f(XRES*sdl_scale, YRES*sdl_scale, 1.0); + glTexCoord2d(0, 1); + glVertex3f(0, YRES*sdl_scale, 1.0); + glTexCoord2d(0, 0); + glVertex3f(0, 0, 1.0); + glTexCoord2d(1, 0); + glVertex3f(XRES*sdl_scale, 0, 1.0); + glEnd(); + + glUseProgram(0); + glBindTexture(GL_TEXTURE_2D, 0); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + glDisable( GL_TEXTURE_2D ); +#endif +} + +void Renderer::draw_grav_zones() +{ + int x, y, i, j; + for (y=0; ygravmask[y*(XRES/CELL)+x]) + { + for (j=0; jdrawpixel(x*CELL+i, y*CELL+j, 255, 200, 0, 120); + else + g->drawpixel(x*CELL+i, y*CELL+j, 32, 32, 32, 120); + } + } + } +} + +void Renderer::init_display_modes() +{ + int i; + colour_mode = COLOUR_DEFAULT; + display_modes = (unsigned int*)calloc(1, sizeof(unsigned int)); + render_modes = (unsigned int*)calloc(2, sizeof(unsigned int)); + + display_modes[0] = 0; + render_modes[0] = RENDER_FIRE; + render_modes[1] = 0; + + display_mode = 0; + i = 0; + while(display_modes[i]) + { + display_mode |= display_modes[i]; + i++; + } + render_mode = 0; + i = 0; + while(render_modes[i]) + { + render_mode |= render_modes[i]; + i++; + } +} + +Renderer::Renderer(Graphics * g, Simulation * sim) +{ + this->g = g; + this->sim = sim; + + prepare_alpha(CELL, 1.0f); + init_display_modes(); + prepare_graphicscache(); + + int flm_data_points = 4; + pixel flm_data_colours[] = {PIXPACK(0xAF9F0F), PIXPACK(0xDFBF6F), PIXPACK(0x60300F), PIXPACK(0x000000)}; + float flm_data_pos[] = {1.0f, 0.9f, 0.5f, 0.0f}; + + int plasma_data_points = 5; + pixel plasma_data_colours[] = {PIXPACK(0xAFFFFF), PIXPACK(0xAFFFFF), PIXPACK(0x301060), PIXPACK(0x301040), PIXPACK(0x000000)}; + float plasma_data_pos[] = {1.0f, 0.9f, 0.5f, 0.25, 0.0f}; + + flm_data = Graphics::generate_gradient(flm_data_colours, flm_data_pos, flm_data_points, 200); + plasma_data = Graphics::generate_gradient(plasma_data_colours, plasma_data_pos, plasma_data_points, 200); +} diff --git a/src/Simulation.cpp b/src/Simulation.cpp new file mode 100644 index 0000000..7ec5c4e --- /dev/null +++ b/src/Simulation.cpp @@ -0,0 +1,3591 @@ +#include +#include +#define _cplusplus +#include "Config.h" +#include "Simulation.h" +#include "Elements.h" +#include "ElementFunctions.h" +#include "Air.h" +#include "Gravity.h" +//#include "powder.h" + +void Simulation::clear_area(int area_x, int area_y, int area_w, int area_h) +{ + int cx = 0; + int cy = 0; + for (cy=0; cyx2) + { + i = x2; + x2 = x1; + x1 = i; + } + if (y1>y2) + { + j = y2; + y2 = y1; + y1 = j; + } + for (j=y1; j<=y2; j++) + for (i=x1; i<=x2; i++) + create_parts(i, j, 0, 0, c, flags); +} + +int Simulation::flood_prop_2(int x, int y, size_t propoffset, void * propvalue, int proptype, int parttype, char * bitmap) +{ + int x1, x2, i, dy = 1; + x1 = x2 = x; + while (x1>=CELL) + { + if ((pmap[y][x1-1]&0xFF)!=parttype || bitmap[(y*XRES)+x1-1]) + { + break; + } + x1--; + } + while (x2>8; + if(proptype==2){ + *((float*)(((char*)&parts[i])+propoffset)) = *((float*)propvalue); + } else if(proptype==0) { + *((int*)(((char*)&parts[i])+propoffset)) = *((int*)propvalue); + } else if(proptype==1) { + *((char*)(((char*)&parts[i])+propoffset)) = *((char*)propvalue); + } + bitmap[(y*XRES)+x] = 1; + } + if (y>=CELL+dy) + for (x=x1; x<=x2; x++) + if ((pmap[y-dy][x]&0xFF)==parttype && !bitmap[((y-dy)*XRES)+x]) + if (!flood_prop_2(x, y-dy, propoffset, propvalue, proptype, parttype, bitmap)) + return 0; + if (y=CELL) + { + if ((pmap[y][x1-1]&0xFF)!=cm || bmap[y/CELL][(x1-1)/CELL]!=bm) + { + break; + } + x1--; + } + while (x2=CELL+dy && x1==x2 && + ((pmap[y-1][x1-1]&0xFF)==PT_INST||(pmap[y-1][x1-1]&0xFF)==PT_SPRK) && ((pmap[y-1][x1]&0xFF)==PT_INST||(pmap[y-1][x1]&0xFF)==PT_SPRK) && ((pmap[y-1][x1+1]&0xFF)==PT_INST || (pmap[y-1][x1+1]&0xFF)==PT_SPRK) && + (pmap[y-2][x1-1]&0xFF)!=PT_INST && ((pmap[y-2][x1]&0xFF)==PT_INST ||(pmap[y-2][x1]&0xFF)==PT_SPRK) && (pmap[y-2][x1+1]&0xFF)!=PT_INST) + flood_parts(x1, y-2, fullc, cm, bm, flags); + else if (y>=CELL+dy) + for (x=x1; x<=x2; x++) + if ((pmap[y-1][x]&0xFF)!=PT_SPRK) + { + if (x==x1 || x==x2 || y>=YRES-CELL-1 || + (pmap[y-1][x-1]&0xFF)==PT_INST || (pmap[y-1][x+1]&0xFF)==PT_INST || + (pmap[y+1][x-1]&0xFF)==PT_INST || ((pmap[y+1][x]&0xFF)!=PT_INST&&(pmap[y+1][x]&0xFF)!=PT_SPRK) || (pmap[y+1][x+1]&0xFF)==PT_INST) + flood_parts(x, y-dy, fullc, cm, bm, flags); + + } + + if (y=CELL+dy) + for (x=x1; x<=x2; x++) + if ((pmap[y-dy][x]&0xFF)==cm && bmap[(y-dy)/CELL][x/CELL]==bm) + if (!flood_parts(x, y-dy, fullc, cm, bm, flags)) + return 0; + if (y=CELL) + { + if ((ptypes[(pmap[y][x1-1]&0xFF)].falldown)!=2) + { + break; + } + x1--; + } + while (x2>8].tmp2 = !check;//flag it as checked, maybe shouldn't use .tmp2 + //check above, maybe around other sides too? + if ( ((y-1) > originaly) && !pmap[y-1][x] && eval_move(parts[i].type, x, y-1, NULL)) + { + int oldx = (int)(parts[i].x + 0.5f); + int oldy = (int)(parts[i].y + 0.5f); + pmap[y-1][x] = pmap[oldy][oldx]; + pmap[oldy][oldx] = 0; + parts[i].x = x; + parts[i].y = y-1; + return 0; + } + } + // fill children + + if (y>=CELL+1) + for (x=x1; x<=x2; x++) + if ((ptypes[(pmap[y-1][x]&0xFF)].falldown)==2 && parts[pmap[y-1][x]>>8].tmp2 == check) + if (!flood_water(x, y-1, i, originaly, check)) + return 0; + if (y>8].tmp2 == check) + if (!flood_water(x, y+1, i, originaly, check)) + return 0; + return 1; +} + +//wrapper around create_part to create TESC with correct tmp value +int Simulation::create_part_add_props(int p, int x, int y, int tv, int rx, int ry) +{ + p=create_part(p, x, y, tv); + if (tv==PT_TESC) + { + parts[p].tmp=rx*4+ry*4+7; + if (parts[p].tmp>300) + parts[p].tmp=300; + } + return p; +} + +//this creates particles from a brush, don't use if you want to create one particle +int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags) +{ + int i, j, r, f = 0, u, v, oy, ox, b = 0, dw = 0, stemp = 0, p;//n; + + int wall = c - 100; + if (c==SPC_WIND || c==PT_FIGH) + return 0; + + //if(c==SPC_PROP){ + // prop_edit_ui(vid_buf, x, y); + // return 0; + //} + for (r=UI_ACTUALSTART; r<=UI_ACTUALSTART+UI_WALLCOUNT; r++) + { + if (wall==r) + { + if (c == SPC_AIR || c == SPC_HEAT || c == SPC_COOL || c == SPC_VACUUM || c == SPC_PGRV || c == SPC_NGRV || wall == WL_SIGN) + break; + if (wall == WL_ERASE) + b = 0; + else + b = wall; + dw = 1; + } + } + if (c == WL_FANHELPER) + { + b = WL_FANHELPER; + dw = 1; + } + if (wall == WL_GRAV) + { + gravwl_timeout = 60; + } + if (c==PT_LIGH) + { + if (lighting_recreate>0 && rx+ry>0) + return 0; + p=create_part(-2, x, y, c); + if (p!=-1) + { + parts[p].life=rx+ry; + if (parts[p].life>55) + parts[p].life=55; + parts[p].temp=parts[p].life*150; // temperature of the lighting shows the power of the lighting + lighting_recreate+=parts[p].life/2+1; + return 1; + } + else return 0; + } + + if (dw==1) + { + ry = ry/CELL; + rx = rx/CELL; + x = x/CELL; + y = y/CELL; + x -= rx/2; + y -= ry/2; + for (ox=x; ox<=x+rx; ox++) + { + for (oy=y; oy<=y+rx; oy++) + { + if (ox>=0&&ox=0&&oy=0 && i+u=0 && j+v=XRES || y+j>=YRES) + continue; + //if (!REPLACE_MODE) + create_part(-2, x+i, y+j, c); + /*else if ((pmap[y+j][x+i]&0xFF)==SLALT&&SLALT!=0) + create_part(-2, x+i, y+j, c);*/ + } + return 1; + } + + /*if (flags&BRUSH_REPLACEMODE) + { + if (rx==0&&ry==0) + { + if ((pmap[y][x]&0xFF)==SLALT || SLALT==0) + { + if ((pmap[y][x])) + { + delete_part(x, y, 0); + if (c!=0) + create_part_add_props(-2, x, y, c, rx, ry); + } + } + } + else + for (j=-ry; j<=ry; j++) + for (i=-rx; i<=rx; i++) + if (InCurrentBrush(i ,j ,rx ,ry)) + { + if ( x+i<0 || y+j<0 || x+i>=XRES || y+j>=YRES) + continue; + if ((pmap[y+j][x+i]&0xFF)!=SLALT&&SLALT!=0) + continue; + if ((pmap[y+j][x+i])) + { + delete_part(x+i, y+j, 0); + if (c!=0) + create_part_add_props(-2, x+i, y+j, c, rx, ry); + } + } + return 1; + + }*/ + //else, no special modes, draw element like normal. + if (rx==0&&ry==0)//workaround for 1pixel brush/floodfill crashing. todo: find a better fix later. + { + if (create_part_add_props(-2, x, y, c, rx, ry)==-1) + f = 1; + } + else + for (j=-ry; j<=ry; j++) + for (i=-rx; i<=rx; i++) + //if (InCurrentBrush(i ,j ,rx ,ry)) + if (create_part_add_props(-2, x+i, y+j, c, rx, ry)==-1) + f = 1; + return !f; +} +/*int Simulation::InCurrentBrush(int i, int j, int rx, int ry) +{ + switch(CURRENT_BRUSH) + { + case CIRCLE_BRUSH: + return (pow(i,2)*pow(ry,2)+pow(j,2)*pow(rx,2)<=pow(rx,2)*pow(ry,2)); + break; + case SQUARE_BRUSH: + return (i*j<=ry*rx); + break; + case TRI_BRUSH: + return (j <= ry ) && ( j >= (((-2.0*ry)/rx)*i) -ry) && ( j >= (((-2.0*ry)/(-rx))*i)-ry ) ; + break; + } + return 0; +} +int Simulation::get_brush_flags() +{ + int flags = 0; + if (REPLACE_MODE) + flags |= BRUSH_REPLACEMODE; + if (sdl_mod & KMOD_CAPS) + flags |= BRUSH_SPECIFIC_DELETE; + if ((sdl_mod & KMOD_LALT) && (sdl_mod & (KMOD_CTRL))) + flags |= BRUSH_SPECIFIC_DELETE; + return flags; +}*/ +void Simulation::create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags) +{ + int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; + float e, de; + if (c==SPC_PROP) + return; + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1= 0.5f) + { + y += sy; + if ((c==WL_EHOLE+100 || c==WL_ALLOWGAS+100 || c==WL_ALLOWENERGY+100 || c==WL_ALLOWALLELEC+100 || c==WL_ALLOWSOLID+100 || c==WL_ALLOWAIR+100 || c==WL_WALL+100 || c==WL_DESTROYALL+100 || c==WL_ALLOWLIQUID+100 || c==WL_FAN+100 || c==WL_STREAM+100 || c==WL_DETECT+100 || c==WL_EWALL+100 || c==WL_WALLELEC+100 || !(rx+ry)) + && ((y1=y2))) + { + if (cp) + create_parts(y, x, rx, ry, c, flags); + else + create_parts(x, y, rx, ry, c, flags); + } + e -= 1.0f; + } + } +} + +void *Simulation::transform_save(void *odata, int *size, matrix2d transform, vector2d translate) +{ + void *ndata; + unsigned char (*bmapo)[XRES/CELL] = (unsigned char (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(unsigned char)); + unsigned char (*bmapn)[XRES/CELL] = (unsigned char (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(unsigned char)); + Particle *partst = (Particle *)calloc(sizeof(Particle), NPART); + sign *signst = (sign *)calloc(MAXSIGNS, sizeof(sign)); + unsigned (*pmapt)[XRES] = (unsigned (*)[XRES])calloc(YRES*XRES, sizeof(unsigned)); + float (*fvxo)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*fvyo)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*fvxn)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*fvyn)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + int i, x, y, nx, ny, w, h, nw, nh; + vector2d pos, tmp, ctl, cbr; + vector2d cornerso[4]; + unsigned char *odatac = (unsigned char *)odata; + //*if (parse_save(odata, *size, 0, 0, 0, bmapo, fvxo, fvyo, signst, partst, pmapt)) TODO: IMPLEMENT + { + free(bmapo); + free(bmapn); + free(partst); + free(signst); + free(pmapt); + free(fvxo); + free(fvyo); + free(fvxn); + free(fvyn); + return odata; + } + w = odatac[6]*CELL; + h = odatac[7]*CELL; + // undo any translation caused by rotation + cornerso[0] = v2d_new(0,0); + cornerso[1] = v2d_new(w-1,0); + cornerso[2] = v2d_new(0,h-1); + cornerso[3] = v2d_new(w-1,h-1); + for (i=0; i<4; i++) + { + tmp = m2d_multiply_v2d(transform,cornerso[i]); + if (i==0) ctl = cbr = tmp; // top left, bottom right corner + if (tmp.xcbr.x) cbr.x = tmp.x; + if (tmp.y>cbr.y) cbr.y = tmp.y; + } + // casting as int doesn't quite do what we want with negative numbers, so use floor() + tmp = v2d_new(floor(ctl.x+0.5f),floor(ctl.y+0.5f)); + translate = v2d_sub(translate,tmp); + nw = floor(cbr.x+0.5f)-floor(ctl.x+0.5f)+1; + nh = floor(cbr.y+0.5f)-floor(ctl.y+0.5f)+1; + if (nw>XRES) nw = XRES; + if (nh>YRES) nh = YRES; + // rotate and translate signs, parts, walls + for (i=0; i=nw || ny<0 || ny>=nh) + { + signst[i].text[0] = 0; + continue; + } + signst[i].x = nx; + signst[i].y = ny; + } + for (i=0; i=nw || ny<0 || ny>=nh) + { + partst[i].type = PT_NONE; + continue; + } + partst[i].x = nx; + partst[i].y = ny; + } + for (y=0; y=nw || ny<0 || ny>=nh) + continue; + if (bmapo[y][x]) + { + bmapn[ny][nx] = bmapo[y][x]; + if (bmapo[y][x]==WL_FAN) + { + fvxn[ny][nx] = fvxo[y][x]; + fvyn[ny][nx] = fvyo[y][x]; + } + } + } + //ndata = build_save(size,0,0,nw,nh,bmapn,fvxn,fvyn,signst,partst); TODO: IMPLEMENT + free(bmapo); + free(bmapn); + free(partst); + free(signst); + free(pmapt); + free(fvxo); + free(fvyo); + free(fvxn); + free(fvyn); + return ndata; +} + +void Simulation::orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]) +{ + resblock1[0] = (block1&0x000000FF); + resblock1[1] = (block1&0x0000FF00)>>8; + resblock1[2] = (block1&0x00FF0000)>>16; + resblock1[3] = (block1&0xFF000000)>>24; + + resblock2[0] = (block2&0x000000FF); + resblock2[1] = (block2&0x0000FF00)>>8; + resblock2[2] = (block2&0x00FF0000)>>16; + resblock2[3] = (block2&0xFF000000)>>24; +} + +void Simulation::orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]) +{ + int block1tmp = 0; + int block2tmp = 0; + + block1tmp = (resblock1[0]&0xFF); + block1tmp |= (resblock1[1]&0xFF)<<8; + block1tmp |= (resblock1[2]&0xFF)<<16; + block1tmp |= (resblock1[3]&0xFF)<<24; + + block2tmp = (resblock2[0]&0xFF); + block2tmp |= (resblock2[1]&0xFF)<<8; + block2tmp |= (resblock2[2]&0xFF)<<16; + block2tmp |= (resblock2[3]&0xFF)<<24; + + *block1 = block1tmp; + *block2 = block2tmp; +} + +inline int Simulation::is_wire(int x, int y) +{ + return bmap[y][x]==WL_DETECT || bmap[y][x]==WL_EWALL || bmap[y][x]==WL_ALLOWLIQUID || bmap[y][x]==WL_WALLELEC || bmap[y][x]==WL_ALLOWALLELEC || bmap[y][x]==WL_EHOLE; +} + +inline int Simulation::is_wire_off(int x, int y) +{ + return (bmap[y][x]==WL_DETECT || bmap[y][x]==WL_EWALL || bmap[y][x]==WL_ALLOWLIQUID || bmap[y][x]==WL_WALLELEC || bmap[y][x]==WL_ALLOWALLELEC || bmap[y][x]==WL_EHOLE) && emap[y][x]<8; +} + +int Simulation::get_wavelength_bin(int *wm) +{ + int i, w0=30, wM=0; + + if (!*wm) + return -1; + + for (i=0; i<30; i++) + if (*wm & (1< wM) + wM = i; + } + + if (wM-w0 < 5) + return (wM+w0)/2; + + i = rand() % (wM-w0-3); + i += w0; + + *wm &= 0x1F << i; + return i + 2; +} + +void Simulation::set_emap(int x, int y) +{ + int x1, x2; + + if (!is_wire_off(x, y)) + return; + + // go left as far as possible + x1 = x2 = x; + while (x1>0) + { + if (!is_wire_off(x1-1, y)) + break; + x1--; + } + while (x21 && x1==x2 && + is_wire(x1-1, y-1) && is_wire(x1, y-1) && is_wire(x1+1, y-1) && + !is_wire(x1-1, y-2) && is_wire(x1, y-2) && !is_wire(x1+1, y-2)) + set_emap(x1, y-2); + else if (y>0) + for (x=x1; x<=x2; x++) + if (is_wire_off(x, y-1)) + { + if (x==x1 || x==x2 || y>=YRES/CELL-1 || + is_wire(x-1, y-1) || is_wire(x+1, y-1) || + is_wire(x-1, y+1) || !is_wire(x, y+1) || is_wire(x+1, y+1)) + set_emap(x, y-1); + } + + if (y>8].type; + else + return PT_NONE; + } + else + { + int pmr2 = pmap[(int)((parts[ci].y + parts[ni].y)/2+0.5f)][(int)((parts[ci].x + parts[ni].x)/2+0.5f)];//seems to be more accurate. + if (pmr2) + { + if (parts[pmr2>>8].type==t) + return t; + } + else + return PT_NONE; + } + return PT_NONE; +} + + +int Simulation::nearest_part(int ci, int t, int max_d) +{ + int distance = (max_d!=-1)?max_d:MAX_DISTANCE; + int ndistance = 0; + int id = -1; + int i = 0; + int cx = (int)parts[ci].x; + int cy = (int)parts[ci].y; + for (i=0; i<=parts_lastActiveIndex; i++) + { + if ((parts[i].type==t||(t==-1&&parts[i].type))&&!parts[i].life&&i!=ci) + { + ndistance = abs(cx-parts[i].x)+abs(cy-parts[i].y);// Faster but less accurate Older: sqrt(pow(cx-parts[i].x, 2)+pow(cy-parts[i].y, 2)); + if (ndistance=XRES || ny>=YRES) + return 0; + + r = pmap[ny][nx]; + if (r) + r = (r&~0xFF) | parts[r>>8].type; + if (rr) + *rr = r; + if (pt>=PT_NUM || (r&0xFF)>=PT_NUM) + return 0; + result = can_move[pt][r&0xFF]; + if (result==3) + { + if ((pt==PT_PHOT || pt==PT_ELEC) && (r&0xFF)==PT_LCRY) + result = (parts[r>>8].life > 5)? 2 : 0; + if ((r&0xFF)==PT_INVIS) + { + if (pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f) result = 2; + else result = 0; + } + if ((r&0xFF)==PT_PVOD) + { + if (parts[r>>8].life == 10) result = 1; + else result = 0; + } + } + if (bmap[ny/CELL][nx/CELL]) + { + if (bmap[ny/CELL][nx/CELL]==WL_ALLOWGAS && !(ptypes[pt].properties&TYPE_GAS))// && ptypes[pt].falldown!=0 && pt!=PT_FIRE && pt!=PT_SMKE) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_ALLOWENERGY && !(ptypes[pt].properties&TYPE_ENERGY))// && ptypes[pt].falldown!=0 && pt!=PT_FIRE && pt!=PT_SMKE) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_ALLOWLIQUID && ptypes[pt].falldown!=2) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_ALLOWSOLID && ptypes[pt].falldown!=1) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_ALLOWAIR || bmap[ny/CELL][nx/CELL]==WL_WALL || bmap[ny/CELL][nx/CELL]==WL_WALLELEC) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_EWALL && !emap[ny/CELL][nx/CELL]) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_EHOLE && !emap[ny/CELL][nx/CELL]) + return 2; + } + return result; +} + +int Simulation::try_move(int i, int x, int y, int nx, int ny) +{ + unsigned r, e; + + if (x==nx && y==ny) + return 1; + if (nx<0 || ny<0 || nx>=XRES || ny>=YRES) + return 1; + + e = eval_move(parts[i].type, nx, ny, &r); + + if ((r&0xFF)==PT_BOMB && parts[i].type==PT_BOMB && parts[i].tmp == 1) + e = 2; + + /* half-silvered mirror */ + if (!e && parts[i].type==PT_PHOT && + (((r&0xFF)==PT_BMTL && rand()>8].temp = parts[i].temp; + + if ((r & 0xFF) < PT_NUM && ptypes[r&0xFF].hconduct && ((r&0xFF)!=PT_HSWC||parts[r>>8].life==10) && (r&0xFF)!=PT_FILT) + parts[i].temp = parts[r>>8].temp = restrict_flt((parts[r>>8].temp+parts[i].temp)/2, MIN_TEMP, MAX_TEMP); + } + if ((parts[i].type==PT_NEUT || parts[i].type==PT_ELEC) && ((r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN || (r&0xFF)==PT_BCLN || (r&0xFF)==PT_PBCN)) { + if (!parts[r>>8].ctype) + parts[r>>8].ctype = parts[i].type; + } + if ((r&0xFF)==PT_PRTI && (parts[i].type==PT_PHOT || parts[i].type==PT_NEUT || parts[i].type==PT_ELEC)) + { + int nnx, count; + for (count=0; count<8; count++) + { + if (isign(x-nx)==isign(portal_rx[count]) && isign(y-ny)==isign(portal_ry[count])) + break; + } + count = count%8; + parts[r>>8].tmp = (int)((parts[r>>8].temp-73.15f)/100+1); + if (parts[r>>8].tmp>=CHANNELS) parts[r>>8].tmp = CHANNELS-1; + else if (parts[r>>8].tmp<0) parts[r>>8].tmp = 0; + for ( nnx=0; nnx<80; nnx++) + if (!portalp[parts[r>>8].tmp][count][nnx].type) + { + portalp[parts[r>>8].tmp][count][nnx] = parts[i]; + parts[i].type=PT_NONE; + break; + } + } + return 0; + } + + if (e == 2) //if occupy same space + { + if (parts[i].type == PT_PHOT && (r&0xFF)==PT_GLOW && !parts[r>>8].life) + if (rand() < RAND_MAX/30) + { + parts[r>>8].life = 120; + create_gain_photon(i); + } + if (parts[i].type == PT_PHOT && (r&0xFF)==PT_FILT) + { + int temp_bin = (int)((parts[r>>8].temp-273.0f)*0.025f); + if (temp_bin < 0) temp_bin = 0; + if (temp_bin > 25) temp_bin = 25; + if(!parts[r>>8].tmp){ + parts[i].ctype = 0x1F << temp_bin; //Assign Colour + } else if(parts[r>>8].tmp==1){ + parts[i].ctype &= 0x1F << temp_bin; //Filter Colour + } else if(parts[r>>8].tmp==2){ + parts[i].ctype |= 0x1F << temp_bin; //Add Colour + } else if(parts[r>>8].tmp==3){ + parts[i].ctype &= ~(0x1F << temp_bin); //Subtract Colour + } + } + if (parts[i].type == PT_NEUT && (r&0xFF)==PT_GLAS) { + if (rand() < RAND_MAX/10) + create_cherenkov_photon(i); + } + if (parts[i].type == PT_PHOT && (r&0xFF)==PT_INVIS && pv[ny/CELL][nx/CELL]<=4.0f && pv[ny/CELL][nx/CELL]>=-4.0f) { + part_change_type(i,x,y,PT_NEUT); + parts[i].ctype = 0; + } + if ((parts[i].type==PT_BIZR||parts[i].type==PT_BIZRG) && (r&0xFF)==PT_FILT) + { + int temp_bin = (int)((parts[r>>8].temp-273.0f)*0.025f); + if (temp_bin < 0) temp_bin = 0; + if (temp_bin > 25) temp_bin = 25; + parts[i].ctype = 0x1F << temp_bin; + } + return 1; + } + //else e=1 , we are trying to swap the particles, return 0 no swap/move, 1 is still overlap/move, because the swap takes place later + + if ((r&0xFF)==PT_VOID || (r&0xFF)==PT_PVOD) //this is where void eats particles + { + if (parts[i].type == PT_STKM) + { + player.spwn = 0; + } + if (parts[i].type == PT_STKM2) + { + player2.spwn = 0; + } + if (parts[i].type == PT_FIGH) + { + fighters[(unsigned char)parts[i].tmp].spwn = 0; + fighcount--; + } + parts[i].type=PT_NONE; + return 0; + } + if ((r&0xFF)==PT_BHOL || (r&0xFF)==PT_NBHL) //this is where blackhole eats particles + { + if (parts[i].type == PT_STKM) + { + player.spwn = 0; + } + if (parts[i].type == PT_STKM2) + { + player2.spwn = 0; + } + if (parts[i].type == PT_FIGH) + { + fighters[(unsigned char)parts[i].tmp].spwn = 0; + fighcount--; + } + parts[i].type=PT_NONE; + if (!legacy_enable) + { + parts[r>>8].temp = restrict_flt(parts[r>>8].temp+parts[i].temp/2, MIN_TEMP, MAX_TEMP);//3.0f; + } + + return 0; + } + if (((r&0xFF)==PT_WHOL||(r&0xFF)==PT_NWHL) && parts[i].type==PT_ANAR) //whitehole eats anar + { + parts[i].type=PT_NONE; + if (!legacy_enable) + { + parts[r>>8].temp = restrict_flt(parts[r>>8].temp- (MAX_TEMP-parts[i].temp)/2, MIN_TEMP, MAX_TEMP); + } + + return 0; + } + + if (parts[i].type==PT_CNCT && y0) + return 0; + + e = r >> 8; //e is now the particle number at r (pmap[ny][nx]) + if (r)//the swap part, if we make it this far, swap + { + if (parts[i].type==PT_NEUT) { + // target material is NEUTPENETRATE, meaning it gets moved around when neutron passes + unsigned s = pmap[y][x]; + if (!(ptypes[s&0xFF].properties&PROP_NEUTPENETRATE)) + return 1; // if the element currently underneath neutron isn't NEUTPENETRATE, don't move anything except the neutron + // if nothing is currently underneath neutron, only move target particle + if (s) + { + pmap[ny][nx] = (s&~(0xFF))|parts[s>>8].type; + parts[s>>8].x = nx; + parts[s>>8].y = ny; + } + else pmap[ny][nx] = 0; + parts[e].x = x; + parts[e].y = y; + pmap[y][x] = (e<<8)|parts[e].type; + return 1; + } + + if ((pmap[ny][nx]>>8)==e) pmap[ny][nx] = 0; + parts[e].x += x-nx; + parts[e].y += y-ny; + pmap[(int)(parts[e].y+0.5f)][(int)(parts[e].x+0.5f)] = (e<<8)|parts[e].type; + } + return 1; +} + +// try to move particle, and if successful update pmap and parts[i].x,y +int Simulation::do_move(int i, int x, int y, float nxf, float nyf) +{ + int nx = (int)(nxf+0.5f), ny = (int)(nyf+0.5f); + int result = try_move(i, x, y, nx, ny); + if (result) + { + int t = parts[i].type; + parts[i].x = nxf; + parts[i].y = nyf; + if (ny!=y || nx!=x) + { + if ((pmap[y][x]>>8)==i) pmap[y][x] = 0; + else if ((photons[y][x]>>8)==i) photons[y][x] = 0; + if (nx=XRES-CELL || ny=YRES-CELL)//kill_part if particle is out of bounds + { + kill_part(i); + return -1; + } + if (t==PT_PHOT||t==PT_NEUT||t==PT_ELEC) + photons[ny][nx] = t|(i<<8); + else if (t) + pmap[ny][nx] = t|(i<<8); + } + } + return result; +} + +int Simulation::pn_junction_sprk(int x, int y, int pt) +{ + unsigned r = pmap[y][x]; + if ((r & 0xFF) != pt) + return 0; + r >>= 8; + if (parts[r].type != pt) + return 0; + if (parts[r].life != 0) + return 0; + + parts[r].ctype = pt; + part_change_type(r,x,y,PT_SPRK); + parts[r].life = 4; + return 1; +} + +void Simulation::photoelectric_effect(int nx, int ny)//create sparks from PHOT when hitting PSCN and NSCN +{ + unsigned r = pmap[ny][nx]; + + if ((r&0xFF) == PT_PSCN) { + if ((pmap[ny][nx-1] & 0xFF) == PT_NSCN || + (pmap[ny][nx+1] & 0xFF) == PT_NSCN || + (pmap[ny-1][nx] & 0xFF) == PT_NSCN || + (pmap[ny+1][nx] & 0xFF) == PT_NSCN) + pn_junction_sprk(nx, ny, PT_PSCN); + } +} + +unsigned Simulation::direction_to_map(float dx, float dy, int t) +{ + // TODO: + // Adding extra directions causes some inaccuracies. + // Not adding them causes problems with some diagonal surfaces (photons absorbed instead of reflected). + // For now, don't add them. + // Solution may involve more intelligent setting of initial i0 value in find_next_boundary? + // or rewriting normal/boundary finding code + + return (dx >= 0) | + (((dx + dy) >= 0) << 1) | /* 567 */ + ((dy >= 0) << 2) | /* 4+0 */ + (((dy - dx) >= 0) << 3) | /* 321 */ + ((dx <= 0) << 4) | + (((dx + dy) <= 0) << 5) | + ((dy <= 0) << 6) | + (((dy - dx) <= 0) << 7); + /* + return (dx >= -0.001) | + (((dx + dy) >= -0.001) << 1) | // 567 + ((dy >= -0.001) << 2) | // 4+0 + (((dy - dx) >= -0.001) << 3) | // 321 + ((dx <= 0.001) << 4) | + (((dx + dy) <= 0.001) << 5) | + ((dy <= 0.001) << 6) | + (((dy - dx) <= 0.001) << 7); + }*/ +} + +int Simulation::is_blocking(int t, int x, int y) +{ + if (t & REFRACT) { + if (x<0 || y<0 || x>=XRES || y>=YRES) + return 0; + if ((pmap[y][x] & 0xFF) == PT_GLAS) + return 1; + return 0; + } + + return !eval_move(t, x, y, NULL); +} + +int Simulation::is_boundary(int pt, int x, int y) +{ + if (!is_blocking(pt,x,y)) + return 0; + if (is_blocking(pt,x,y-1) && is_blocking(pt,x,y+1) && is_blocking(pt,x-1,y) && is_blocking(pt,x+1,y)) + return 0; + return 1; +} + +int Simulation::find_next_boundary(int pt, int *x, int *y, int dm, int *em) +{ + static int dx[8] = {1,1,0,-1,-1,-1,0,1}; + static int dy[8] = {0,1,1,1,0,-1,-1,-1}; + static int de[8] = {0x83,0x07,0x0E,0x1C,0x38,0x70,0xE0,0xC1}; + int i, ii, i0; + + if (*x <= 0 || *x >= XRES-1 || *y <= 0 || *y >= YRES-1) + return 0; + + if (*em != -1) { + i0 = *em; + dm &= de[i0]; + } else + i0 = 0; + + for (ii=0; ii<8; ii++) { + i = (ii + i0) & 7; + if ((dm & (1 << i)) && is_boundary(pt, *x+dx[i], *y+dy[i])) { + *x += dx[i]; + *y += dy[i]; + *em = i; + return 1; + } + } + + return 0; +} + +int Simulation::get_normal(int pt, int x, int y, float dx, float dy, float *nx, float *ny) +{ + int ldm, rdm, lm, rm; + int lx, ly, lv, rx, ry, rv; + int i, j; + float r, ex, ey; + + if (!dx && !dy) + return 0; + + if (!is_boundary(pt, x, y)) + return 0; + + ldm = direction_to_map(-dy, dx, pt); + rdm = direction_to_map(dy, -dx, pt); + lx = rx = x; + ly = ry = y; + lv = rv = 1; + lm = rm = -1; + + j = 0; + for (i=0; i= NORMAL_INTERP) + return 0; + + if (pt == PT_PHOT) + photoelectric_effect(x, y); + + return get_normal(pt, x, y, dx, dy, nx, ny); +} + +//For soap only +void Simulation::detach(int i) +{ + if ((parts[i].ctype&2) == 2) + { + if ((parts[parts[i].tmp].ctype&4) == 4) + parts[parts[i].tmp].ctype ^= 4; + } + + if ((parts[i].ctype&4) == 4) + { + if ((parts[parts[i].tmp2].ctype&2) == 2) + parts[parts[i].tmp2].ctype ^= 2; + } + + parts[i].ctype = 0; +} + +void Simulation::kill_part(int i)//kills particle number i +{ + int x, y; + + if(elementCount[parts[i].type] && parts[i].type) + elementCount[parts[i].type]--; + x = (int)(parts[i].x+0.5f); + y = (int)(parts[i].y+0.5f); + if (parts[i].type == PT_STKM) + { + player.spwn = 0; + } + if (parts[i].type == PT_STKM2) + { + player2.spwn = 0; + } + if (parts[i].type == PT_FIGH) + { + fighters[(unsigned char)parts[i].tmp].spwn = 0; + fighcount--; + } + if (parts[i].type == PT_SOAP) + { + detach(i); + } + if (x>=0 && y>=0 && x>8)==i) + pmap[y][x] = 0; + else if ((photons[y][x]>>8)==i) + photons[y][x] = 0; + } + + parts[i].type = PT_NONE; + parts[i].life = pfree; + pfree = i; +} + +void Simulation::part_change_type(int i, int x, int y, int t)//changes the type of particle number i, to t. This also changes pmap at the same time. +{ + if (x<0 || y<0 || x>=XRES || y>=YRES || i>=NPART || t<0 || t>=PT_NUM) + return; + if (!ptypes[t].enabled) + t = PT_NONE; + + if (parts[i].type == PT_STKM) + player.spwn = 0; + + if (parts[i].type == PT_STKM2) + player2.spwn = 0; + + if (parts[i].type == PT_FIGH) + { + fighters[(unsigned char)parts[i].tmp].spwn = 0; + fighcount--; + } + + parts[i].type = t; + if (t==PT_PHOT || t==PT_NEUT || t==PT_ELEC) + { + photons[y][x] = t|(i<<8); + if ((pmap[y][x]>>8)==i) + pmap[y][x] = 0; + } + else + { + pmap[y][x] = t|(i<<8); + if ((photons[y][x]>>8)==i) + photons[y][x] = 0; + } +} + +int Simulation::create_part(int p, int x, int y, int tv)//the function for creating a particle, use p=-1 for creating a new particle, -2 is from a brush, or a particle number to replace a particle. +{ + int i; + + int t = tv & 0xFF; + int v = (tv >> 8) & 0xFF; + + if (x<0 || y<0 || x>=XRES || y>=YRES || ((t<0 || t>=PT_NUM)&&t!=SPC_HEAT&&t!=SPC_COOL&&t!=SPC_AIR&&t!=SPC_VACUUM&&t!=SPC_PGRV&&t!=SPC_NGRV)) + return -1; + if (t>=0 && t>8].temp>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 0.1f, MIN_TEMP, MAX_TEMP); + } else if ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL))) { + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 50.0f, MIN_TEMP, MAX_TEMP); + } else { + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 4.0f, MIN_TEMP, MAX_TEMP); + } + } + if (t==SPC_COOL&&parts[pmap[y][x]>>8].temp>MIN_TEMP) + { + if ((pmap[y][x]&0xFF)==PT_PUMP || (pmap[y][x]&0xFF)==PT_GPMP) { + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 0.1f, MIN_TEMP, MAX_TEMP); + } else if ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL))) { + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 50.0f, MIN_TEMP, MAX_TEMP); + } else { + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 4.0f, MIN_TEMP, MAX_TEMP); + } + } + return pmap[y][x]>>8; + } + else + { + return -1; + } + }*/ + if (t==SPC_AIR) + { + pv[y/CELL][x/CELL] += 0.03f; + if (y+CELL>8].ctype=PT_DUST; + } + if (!((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS))) + return -1; + if (parts[pmap[y][x]>>8].life!=0) + return -1; + parts[pmap[y][x]>>8].type = PT_SPRK; + parts[pmap[y][x]>>8].life = 4; + parts[pmap[y][x]>>8].ctype = pmap[y][x]&0xFF; + pmap[y][x] = (pmap[y][x]&~0xFF) | PT_SPRK; + return pmap[y][x]>>8; + } + if (t==PT_SPAWN&&elementCount[PT_SPAWN]) + return -1; + if (t==PT_SPAWN2&&elementCount[PT_SPAWN2]) + return -1; + if (p==-1)//creating from anything but brush + { + if (pmap[y][x] || (bmap[y/CELL][x/CELL] && !eval_move(t, x, y, NULL))) + { + if ((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2) + { + if (t!=PT_STKM&&t!=PT_STKM2&&t!=PT_FIGH) + { + return -1; + } + } + } + if (pfree == -1) + return -1; + i = pfree; + pfree = parts[i].life; + } + else if (p==-2)//creating from brush + { + if (pmap[y][x]) + { + if (( + ((pmap[y][x]&0xFF)==PT_STOR&&!(ptypes[t].properties&TYPE_SOLID))|| + (pmap[y][x]&0xFF)==PT_CLNE|| + (pmap[y][x]&0xFF)==PT_BCLN|| + (pmap[y][x]&0xFF)==PT_CONV|| + ((pmap[y][x]&0xFF)==PT_PCLN&&t!=PT_PSCN&&t!=PT_NSCN)|| + ((pmap[y][x]&0xFF)==PT_PBCN&&t!=PT_PSCN&&t!=PT_NSCN) + )&&( + t!=PT_CLNE&&t!=PT_PCLN&& + t!=PT_BCLN&&t!=PT_STKM&& + t!=PT_STKM2&&t!=PT_PBCN&& + t!=PT_STOR&&t!=PT_FIGH) + ) + { + parts[pmap[y][x]>>8].ctype = t; + if (t==PT_LIFE && v>8].tmp = v; + } + return -1; + } + if (photons[y][x] && (t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)) + return -1; + if (pfree == -1) + return -1; + i = pfree; + pfree = parts[i].life; + } + else if (p==-3)//skip pmap checks, e.g. for sing explosion + { + if (pfree == -1) + return -1; + i = pfree; + pfree = parts[i].life; + } + else + { + int oldX = (int)(parts[p].x+0.5f); + int oldY = (int)(parts[p].y+0.5f); + if ((pmap[oldY][oldX]>>8)==p) + pmap[oldY][oldX] = 0; + if ((photons[oldY][oldX]>>8)==p) + photons[oldY][oldX] = 0; + i = p; + } + + if (i>parts_lastActiveIndex) parts_lastActiveIndex = i; + + parts[i].dcolour = 0; + if (t==PT_GLAS) + { + parts[i].pavg[1] = pv[y/CELL][x/CELL]; + } + else if (t==PT_QRTZ) + { + parts[i].pavg[1] = pv[y/CELL][x/CELL]; + } + else + { + parts[i].pavg[0] = 0.0f; + parts[i].pavg[1] = 0.0f; + } + if (t!=PT_STKM&&t!=PT_STKM2&&t!=PT_FIGH)//set everything to default values first, except for stickman. + { + parts[i].x = (float)x; + parts[i].y = (float)y; + parts[i].type = t; + parts[i].vx = 0; + parts[i].vy = 0; + parts[i].life = 0; + parts[i].ctype = 0; + parts[i].temp = ptypes[t].heat; + parts[i].tmp = 0; + parts[i].tmp2 = 0; + } + if (t==PT_LIGH && p==-2) + { + switch (gravityMode) + { + default: + case 0: + parts[i].tmp= 270+rand()%40-20; + break; + case 1: + parts[i].tmp = rand()%360; + break; + case 2: + parts[i].tmp = atan2(x-XCNTR, y-YCNTR)*(180.0f/M_PI)+90; + break; + } + parts[i].tmp2 = 4; + } + if (t==PT_SOAP) + { + parts[i].tmp = -1; + parts[i].tmp2 = -1; + } + //now set various properties that we want at spawn. + if (t==PT_ACID || t==PT_CAUS) + { + parts[i].life = 75; + } + /*Testing + if(t==PT_WOOD){ + parts[i].life = 150; + } + End Testing*/ + if (t==PT_WARP) { + parts[i].life = rand()%95+70; + } + if (t==PT_FUSE) { + parts[i].life = 50; + parts[i].tmp = 50; + } + /*if (ptypes[t].properties&PROP_LIFE) { + int r; + for (r = 0; r255 ? 255 : (colr<0 ? 0 : colr); + colg = colg>255 ? 255 : (colg<0 ? 0 : colg); + colb = colb>255 ? 255 : (colb<0 ? 0 : colb); + parts[i].dcolour = 0xFF000000 | (colr<<16) | (colg<<8) | colb; + } + elementCount[t]++; + return i; +} + +void Simulation::create_gain_photon(int pp)//photons from PHOT going through GLOW +{ + float xx, yy; + int i, lr, temp_bin, nx, ny; + + if (pfree == -1) + return; + i = pfree; + + lr = rand() % 2; + + if (lr) { + xx = parts[pp].x - 0.3*parts[pp].vy; + yy = parts[pp].y + 0.3*parts[pp].vx; + } else { + xx = parts[pp].x + 0.3*parts[pp].vy; + yy = parts[pp].y - 0.3*parts[pp].vx; + } + + nx = (int)(xx + 0.5f); + ny = (int)(yy + 0.5f); + + if (nx<0 || ny<0 || nx>=XRES || ny>=YRES) + return; + + if ((pmap[ny][nx] & 0xFF) != PT_GLOW) + return; + + pfree = parts[i].life; + if (i>parts_lastActiveIndex) parts_lastActiveIndex = i; + + parts[i].type = PT_PHOT; + parts[i].life = 680; + parts[i].x = xx; + parts[i].y = yy; + parts[i].vx = parts[pp].vx; + parts[i].vy = parts[pp].vy; + parts[i].temp = parts[pmap[ny][nx] >> 8].temp; + parts[i].tmp = 0; + parts[i].pavg[0] = parts[i].pavg[1] = 0.0f; + photons[ny][nx] = PT_PHOT|(i<<8); + + temp_bin = (int)((parts[i].temp-273.0f)*0.25f); + if (temp_bin < 0) temp_bin = 0; + if (temp_bin > 25) temp_bin = 25; + parts[i].ctype = 0x1F << temp_bin; +} + +void Simulation::create_cherenkov_photon(int pp)//photons from NEUT going through GLAS +{ + int i, lr, nx, ny; + float r, eff_ior; + + if (pfree == -1) + return; + i = pfree; + + nx = (int)(parts[pp].x + 0.5f); + ny = (int)(parts[pp].y + 0.5f); + if ((pmap[ny][nx] & 0xFF) != PT_GLAS) + return; + + if (hypotf(parts[pp].vx, parts[pp].vy) < 1.44f) + return; + + pfree = parts[i].life; + if (i>parts_lastActiveIndex) parts_lastActiveIndex = i; + + lr = rand() % 2; + + parts[i].type = PT_PHOT; + parts[i].ctype = 0x00000F80; + parts[i].life = 680; + parts[i].x = parts[pp].x; + parts[i].y = parts[pp].y; + parts[i].temp = parts[pmap[ny][nx] >> 8].temp; + parts[i].tmp = 0; + parts[i].pavg[0] = parts[i].pavg[1] = 0.0f; + photons[ny][nx] = PT_PHOT|(i<<8); + + if (lr) { + parts[i].vx = parts[pp].vx - 2.5f*parts[pp].vy; + parts[i].vy = parts[pp].vy + 2.5f*parts[pp].vx; + } else { + parts[i].vx = parts[pp].vx + 2.5f*parts[pp].vy; + parts[i].vy = parts[pp].vy - 2.5f*parts[pp].vx; + } + + /* photons have speed of light. no discussion. */ + r = 1.269 / hypotf(parts[i].vx, parts[i].vy); + parts[i].vx *= r; + parts[i].vy *= r; +} + +void Simulation::delete_part(int x, int y, int flags)//calls kill_part with the particle located at x,y +{ + unsigned i; + + if (x<0 || y<0 || x>=XRES || y>=YRES) + return; + if (photons[y][x]) { + i = photons[y][x]; + } else { + i = pmap[y][x]; + } + + if (!i) + return; + kill_part(i>>8); +} + +void Simulation::update_particles_i(int start, int inc) +{ + int i, j, x, y, t, nx, ny, r, surround_space, s, lt, rt, nt, nnx, nny, q, golnum, goldelete, z, neighbors, createdsomething; + float mv, dx, dy, ix, iy, lx, ly, nrx, nry, dp, ctemph, ctempl, gravtot; + int fin_x, fin_y, clear_x, clear_y, stagnant; + float fin_xf, fin_yf, clear_xf, clear_yf; + float nn, ct1, ct2, swappage; + float pt = R_TEMP; + float c_heat = 0.0f; + int h_count = 0; + int starti = (start*-1); + int surround[8]; + int surround_hconduct[8]; + int lighting_ok=1; + float pGravX, pGravY, pGravD; + + if (sys_pause&&lighting_recreate>0) + { + for (i=0; i<=parts_lastActiveIndex; i++) + { + if (parts[i].type==PT_LIGH && parts[i].tmp2>0) + { + lighting_ok=0; + break; + } + } + } + + if (lighting_ok) + lighting_recreate--; + + if (lighting_recreate<0) + lighting_recreate=1; + + if (lighting_recreate>21) + lighting_recreate=21; + + if (sys_pause&&!framerender)//do nothing if paused + return; + + //wire! + if(elementCount[PT_WIRE] > 0) + { + for (nx=0; nx>8].type==PT_WIRE) + parts[r>>8].tmp=parts[r>>8].ctype; + } + } + } + //game of life! + if (elementCount[PT_LIFE]>0&&++CGOL>=GSPEED)//GSPEED is frames per generation + { + int createdsomething = 0; + CGOL=0; + ISGOL=0; + for (nx=CELL; nx>8].type==PT_LIFE/* && parts[r>>8].ctype==golnum-1*/) + { + golnum = parts[r>>8].ctype+1; + if (golnum<=0 || golnum>NGOLALT) { + parts[r>>8].type = PT_NONE; + continue; + } + if (parts[r>>8].tmp == grule[golnum][9]-1) { + gol[nx][ny] = golnum; + for ( nnx=-1; nnx<2; nnx++) + { + for ( nny=-1; nny<2; nny++)//it will count itself as its own neighbor, which is needed, but will have 1 extra for delete check + { + rt = pmap[((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL]; + if (!rt || (rt&0xFF)==PT_LIFE) + { + gol2[((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL][((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][golnum] ++; + gol2[((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL][((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][0] ++; + } + } + } + } else { + parts[r>>8].tmp --; + if (parts[r>>8].tmp<=0) + parts[r>>8].type = PT_NONE;//using kill_part makes it not work + } + } + //} + } + } + } + for (nx=CELL; nx=2&&gol2[nx][ny][golnum]>=(goldelete%2)+goldelete/2) + { + if (create_part(-1, nx, ny, PT_LIFE|((golnum-1)<<8))) + createdsomething = 1; + } + else if (gol[nx][ny]==golnum&&(grule[golnum][goldelete-1]==0||grule[golnum][goldelete-1]==2))//subtract 1 because it counted itself + { + if (parts[r>>8].tmp==grule[golnum][9]-1) + parts[r>>8].tmp --; + } + if (r && parts[r>>8].tmp<=0) + parts[r>>8].type = PT_NONE;//using kill_part makes it not work + } + for ( z = 0; z<=NGOL; z++) + gol2[nx][ny][z] = 0;//this improves performance A LOT compared to the memset, i was getting ~23 more fps with this. + } + } + //memset(gol2, 0, sizeof(gol2)); + } + if (ISWIRE==1)//wifi channel reseting + { + for ( q = 0; q<(int)(MAX_TEMP-73.15f)/100+2; q++) + if (!wireless[q][1]) + { + wireless[q][0] = 0; + } + else + wireless[q][1] = 0; + } + //the main particle loop function, goes over all particles. + for (i=0; i<=parts_lastActiveIndex; i++) + if (parts[i].type) + { + lx = parts[i].x; + ly = parts[i].y; + t = parts[i].type; + if (t<0 || t>=PT_NUM) + { + kill_part(i); + continue; + } + //printf("parts[%d].type: %d\n", i, parts[i].type); + + if (parts[i].life>0 && (ptypes[t].properties&PROP_LIFE_DEC)) + { + // automatically decrease life + parts[i].life--; + if (parts[i].life<=0 && (ptypes[t].properties&(PROP_LIFE_KILL_DEC|PROP_LIFE_KILL))) + { + // kill on change to no life + kill_part(i); + continue; + } + } + else if (parts[i].life<=0 && (ptypes[t].properties&PROP_LIFE_KILL)) + { + // kill if no life + kill_part(i); + continue; + } + + x = (int)(parts[i].x+0.5f); + y = (int)(parts[i].y+0.5f); + + //this kills any particle out of the screen, or in a wall where it isn't supposed to go + if (x=XRES-CELL || y>=YRES-CELL || + (bmap[y/CELL][x/CELL] && + (bmap[y/CELL][x/CELL]==WL_WALL || + bmap[y/CELL][x/CELL]==WL_WALLELEC || + bmap[y/CELL][x/CELL]==WL_ALLOWAIR || + (bmap[y/CELL][x/CELL]==WL_DESTROYALL) || + (bmap[y/CELL][x/CELL]==WL_ALLOWLIQUID && ptypes[t].falldown!=2) || + (bmap[y/CELL][x/CELL]==WL_ALLOWSOLID && ptypes[t].falldown!=1) || + (bmap[y/CELL][x/CELL]==WL_ALLOWGAS && !(ptypes[t].properties&TYPE_GAS)) || //&& ptypes[t].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE && parts[i].type!=PT_HFLM) || + (bmap[y/CELL][x/CELL]==WL_ALLOWENERGY && !(ptypes[t].properties&TYPE_ENERGY)) || + (bmap[y/CELL][x/CELL]==WL_DETECT && (t==PT_METL || t==PT_SPRK)) || + (bmap[y/CELL][x/CELL]==WL_EWALL && !emap[y/CELL][x/CELL])) && (t!=PT_STKM) && (t!=PT_STKM2) && (t!=PT_FIGH))) + { + kill_part(i); + continue; + } + if (bmap[y/CELL][x/CELL]==WL_DETECT && emap[y/CELL][x/CELL]<8) + set_emap(x/CELL, y/CELL); + + //adding to velocity from the particle's velocity + vx[y/CELL][x/CELL] = vx[y/CELL][x/CELL]*ptypes[t].airloss + ptypes[t].airdrag*parts[i].vx; + vy[y/CELL][x/CELL] = vy[y/CELL][x/CELL]*ptypes[t].airloss + ptypes[t].airdrag*parts[i].vy; + + if (t==PT_GAS||t==PT_NBLE) + { + if (pv[y/CELL][x/CELL]<3.5f) + pv[y/CELL][x/CELL] += ptypes[t].hotair*(3.5f-pv[y/CELL][x/CELL]); + if (y+CELL= 0 && y-2 < YRES && (ptypes[t].properties&TYPE_LIQUID)) {//some heat convection for liquids + r = pmap[y-2][x]; + if (!(!r || parts[i].type != (r&0xFF))) { + if (parts[i].temp>parts[r>>8].temp) { + swappage = parts[i].temp; + parts[i].temp = parts[r>>8].temp; + parts[r>>8].temp = swappage; + } + } + } + + //heat transfer code + h_count = 0; +#ifdef REALHEAT + if (t&&(t!=PT_HSWC||parts[i].life==10)) + { + float c_Cm = 0.0f; +#else + if (t&&(t!=PT_HSWC||parts[i].life==10)&&ptypes[t].hconduct>(rand()%250)) + { + float c_Cm = 0.0f; +#endif + if (aheat_enable) + { + c_heat = (hv[y/CELL][x/CELL]-parts[i].temp)*0.04; + c_heat = restrict_flt(c_heat, -MAX_TEMP+MIN_TEMP, MAX_TEMP-MIN_TEMP); + parts[i].temp += c_heat; + hv[y/CELL][x/CELL] -= c_heat; + } + c_heat = 0.0f; + for (j=0; j<8; j++) + { + surround_hconduct[j] = i; + r = surround[j]; + if (!r) + continue; + rt = r&0xFF; + if (rt&&ptypes[rt].hconduct&&(rt!=PT_HSWC||parts[r>>8].life==10) + &&(t!=PT_FILT||(rt!=PT_BRAY&&rt!=PT_BIZR&&rt!=PT_BIZRG)) + &&(rt!=PT_FILT||(t!=PT_BRAY&&t!=PT_PHOT&&t!=PT_BIZR&&t!=PT_BIZRG))) + { + surround_hconduct[j] = r>>8; +#ifdef REALHEAT + c_heat += parts[r>>8].temp*96.645/ptypes[rt].hconduct*fabs(ptypes[rt].weight); + c_Cm += 96.645/ptypes[rt].hconduct*fabs(ptypes[rt].weight); +#else + c_heat += parts[r>>8].temp; +#endif + h_count++; + } + } +#ifdef REALHEAT + if (t == PT_PHOT) + pt = (c_heat+parts[i].temp*96.645)/(c_Cm+96.645); + else + pt = (c_heat+parts[i].temp*96.645/ptypes[t].hconduct*fabs(ptypes[t].weight))/(c_Cm+96.645/ptypes[t].hconduct*fabs(ptypes[t].weight)); + +#else + pt = (c_heat+parts[i].temp)/(h_count+1); +#endif + pt = parts[i].temp = restrict_flt(pt, MIN_TEMP, MAX_TEMP); + for (j=0; j<8; j++) + { + parts[surround_hconduct[j]].temp = pt; + } + + ctemph = ctempl = pt; + // change boiling point with pressure + if ((ptypes[t].state==ST_LIQUID && ptransitions[t].tht>-1 && ptransitions[t].tht-1 && ptransitions[t].tltptransitions[t].thv&&ptransitions[t].tht>-1) { + // particle type change due to high temperature + if (ptransitions[t].tht!=PT_NUM) + t = ptransitions[t].tht; + else if (t==PT_ICEI) { + if (parts[i].ctype>0&&parts[i].ctype274.0f) t = PT_WATR; + else s = 0; + } + else if (t==PT_SLTW) { + if (1>rand()%6) t = PT_SALT; + else t = PT_WTRV; + } + else s = 0; + } else if (ctempl-1) { + // particle type change due to low temperature + if (ptransitions[t].tlt!=PT_NUM) + t = ptransitions[t].tlt; + else if (t==PT_WTRV) { + if (pt<273.0f) t = PT_RIME; + else t = PT_DSTW; + } + else if (t==PT_LAVA) { + if (parts[i].ctype>0 && parts[i].ctype=ptransitions[PT_BMTL].thv) s = 0; + else if (ptransitions[parts[i].ctype].tht==PT_LAVA) { + if (pt>=ptransitions[parts[i].ctype].thv) s = 0; + } + else if (pt>=973.0f) s = 0; // freezing point for lava with any other (not listed in ptransitions as turning into lava) ctype + if (s) { + t = parts[i].ctype; + parts[i].ctype = PT_NONE; + if (t==PT_THRM) { + parts[i].tmp = 0; + t = PT_BMTL; + } + if (t==PT_PLUT) + { + parts[i].tmp = 0; + t = PT_LAVA; + } + } + } + else if (pt<973.0f) t = PT_STNE; + else s = 0; + } + else s = 0; + } + else s = 0; + if (s) { // particle type change occurred + if (t==PT_ICEI||t==PT_LAVA) + parts[i].ctype = parts[i].type; + if (!(t==PT_ICEI&&parts[i].ctype==PT_FRZW)) parts[i].life = 0; + if (ptypes[t].state==ST_GAS&&ptypes[parts[i].type].state!=ST_GAS) + pv[y/CELL][x/CELL] += 0.50f; + part_change_type(i,x,y,t); + if (t==PT_FIRE||t==PT_PLSM||t==PT_HFLM) + parts[i].life = rand()%50+120; + if (t==PT_LAVA) { + if (parts[i].ctype==PT_BRMT) parts[i].ctype = PT_BMTL; + else if (parts[i].ctype==PT_SAND) parts[i].ctype = PT_GLAS; + else if (parts[i].ctype==PT_BGLA) parts[i].ctype = PT_GLAS; + else if (parts[i].ctype==PT_PQRT) parts[i].ctype = PT_QRTZ; + parts[i].life = rand()%120+240; + } + if (t==PT_NONE) { + kill_part(i); + goto killed; + } + } + + pt = parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); + if (t==PT_LAVA) { + parts[i].life = restrict_flt((parts[i].temp-700)/7, 0.0f, 400.0f); + if (parts[i].ctype==PT_THRM&&parts[i].tmp>0) + { + parts[i].tmp--; + parts[i].temp = 3500; + } + if (parts[i].ctype==PT_PLUT&&parts[i].tmp>0) + { + parts[i].tmp--; + parts[i].temp = MAX_TEMP; + } + } + } + } + + if (t==PT_LIFE) + { + parts[i].temp = restrict_flt(parts[i].temp-50.0f, MIN_TEMP, MAX_TEMP); + //ISGOL=1;//means there is a life particle on screen + } + if (t==PT_WIRE) + { + //wire_placed = 1; + } + //spark updates from walls + if ((ptypes[t].properties&PROP_CONDUCTS) || t==PT_SPRK) + { + nx = x % CELL; + if (nx == 0) + nx = x/CELL - 1; + else if (nx == CELL-1) + nx = x/CELL + 1; + else + nx = x/CELL; + ny = y % CELL; + if (ny == 0) + ny = y/CELL - 1; + else if (ny == CELL-1) + ny = y/CELL + 1; + else + ny = y/CELL; + if (nx>=0 && ny>=0 && nx2.5f) + { + parts[i].life = rand()%80+180; + parts[i].temp = restrict_flt(ptypes[PT_FIRE].heat + (ptypes[t].flammable/2), MIN_TEMP, MAX_TEMP); + t = PT_FIRE; + part_change_type(i,x,y,t); + pv[y/CELL][x/CELL] += 0.25f * CFDS; + } + + + s = 1; + gravtot = fabs(gravy[(y/CELL)*(XRES/CELL)+(x/CELL)])+fabs(gravx[(y/CELL)*(XRES/CELL)+(x/CELL)]); + if (pv[y/CELL][x/CELL]>ptransitions[t].phv&&ptransitions[t].pht>-1) { + // particle type change due to high pressure + if (ptransitions[t].pht!=PT_NUM) + t = ptransitions[t].pht; + else if (t==PT_BMTL) { + if (pv[y/CELL][x/CELL]>2.5f) + t = PT_BRMT; + else if (pv[y/CELL][x/CELL]>1.0f && parts[i].tmp==1) + t = PT_BRMT; + else s = 0; + } + else s = 0; + } else if (pv[y/CELL][x/CELL]-1) { + // particle type change due to low pressure + if (ptransitions[t].plt!=PT_NUM) + t = ptransitions[t].plt; + else s = 0; + } else if (gravtot>(ptransitions[t].phv/4.0f)&&ptransitions[t].pht>-1) { + // particle type change due to high gravity + if (ptransitions[t].pht!=PT_NUM) + t = ptransitions[t].pht; + else if (t==PT_BMTL) { + if (gravtot>0.625f) + t = PT_BRMT; + else if (gravtot>0.25f && parts[i].tmp==1) + t = PT_BRMT; + else s = 0; + } + else s = 0; + } else s = 0; + if (s) { // particle type change occurred + parts[i].life = 0; + part_change_type(i,x,y,t); + if (t==PT_FIRE) + parts[i].life = rand()%50+120; + if (t==PT_NONE) { + kill_part(i); + goto killed; + } + } + + //call the particle update function, if there is one +#ifdef LUACONSOLE + if (ptypes[t].update_func && lua_el_mode[t] != 2) +#else + if (ptypes[t].update_func) +#endif + { + if ((*(ptypes[t].update_func))(this, i,x,y,surround_space,nt, parts, pmap)) + continue; + } +#ifdef LUACONSOLE + if(lua_el_mode[t]) + { + if(luacon_part_update(t,i,x,y,surround_space,nt)) + continue; + } +#endif + if (legacy_enable)//if heat sim is off + update_legacy_all(this, i,x,y,surround_space,nt, parts, pmap); + +killed: + if (parts[i].type == PT_NONE)//if its dead, skip to next particle + continue; + + if (!parts[i].vx&&!parts[i].vy)//if its not moving, skip to next particle, movement code it next + continue; + +#if defined(WIN32) && !defined(__GNUC__) + mv = max(fabsf(parts[i].vx), fabsf(parts[i].vy)); +#else + mv = fmaxf(fabsf(parts[i].vx), fabsf(parts[i].vy)); +#endif + if (mv < ISTP) + { + clear_x = x; + clear_y = y; + clear_xf = parts[i].x; + clear_yf = parts[i].y; + fin_xf = clear_xf + parts[i].vx; + fin_yf = clear_yf + parts[i].vy; + fin_x = (int)(fin_xf+0.5f); + fin_y = (int)(fin_yf+0.5f); + } + else + { + // interpolate to see if there is anything in the way + dx = parts[i].vx*ISTP/mv; + dy = parts[i].vy*ISTP/mv; + fin_xf = parts[i].x; + fin_yf = parts[i].y; + while (1) + { + mv -= ISTP; + fin_xf += dx; + fin_yf += dy; + fin_x = (int)(fin_xf+0.5f); + fin_y = (int)(fin_yf+0.5f); + if (mv <= 0.0f) + { + // nothing found + fin_xf = parts[i].x + parts[i].vx; + fin_yf = parts[i].y + parts[i].vy; + fin_x = (int)(fin_xf+0.5f); + fin_y = (int)(fin_yf+0.5f); + clear_xf = fin_xf-dx; + clear_yf = fin_yf-dy; + clear_x = (int)(clear_xf+0.5f); + clear_y = (int)(clear_yf+0.5f); + break; + } + if (fin_x=XRES-CELL || fin_y>=YRES-CELL || pmap[fin_y][fin_x] || (bmap[fin_y/CELL][fin_x/CELL] && (bmap[fin_y/CELL][fin_x/CELL]==WL_DESTROYALL || bmap[fin_y/CELL][fin_x/CELL]==WL_DETECT || !eval_move(t,fin_x,fin_y,NULL)))) + { + // found an obstacle + clear_xf = fin_xf-dx; + clear_yf = fin_yf-dy; + clear_x = (int)(clear_xf+0.5f); + clear_y = (int)(clear_yf+0.5f); + break; + } + + } + } + + stagnant = parts[i].flags & FLAG_STAGNANT; + parts[i].flags &= ~FLAG_STAGNANT; + + if ((t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)) { + if (t == PT_PHOT) { + rt = pmap[fin_y][fin_x] & 0xFF; + lt = pmap[y][x] & 0xFF; + + r = eval_move(PT_PHOT, fin_x, fin_y, NULL); + if (((rt==PT_GLAS && lt!=PT_GLAS) || (rt!=PT_GLAS && lt==PT_GLAS)) && r) { + if (!get_normal_interp(REFRACT|t, parts[i].x, parts[i].y, parts[i].vx, parts[i].vy, &nrx, &nry)) { + kill_part(i); + continue; + } + + r = get_wavelength_bin(&parts[i].ctype); + if (r == -1) { + kill_part(i); + continue; + } + nn = GLASS_IOR - GLASS_DISP*(r-15)/15.0f; + nn *= nn; + nrx = -nrx; + nry = -nry; + if (rt==PT_GLAS && lt!=PT_GLAS) + nn = 1.0f/nn; + ct1 = parts[i].vx*nrx + parts[i].vy*nry; + ct2 = 1.0f - (nn*nn)*(1.0f-(ct1*ct1)); + if (ct2 < 0.0f) { + // total internal reflection + parts[i].vx -= 2.0f*ct1*nrx; + parts[i].vy -= 2.0f*ct1*nry; + fin_xf = parts[i].x; + fin_yf = parts[i].y; + fin_x = x; + fin_y = y; + } else { + // refraction + ct2 = sqrtf(ct2); + ct2 = ct2 - nn*ct1; + parts[i].vx = nn*parts[i].vx + ct2*nrx; + parts[i].vy = nn*parts[i].vy + ct2*nry; + } + } + } + if (stagnant)//FLAG_STAGNANT set, was reflected on previous frame + { + // cast coords as int then back to float for compatibility with existing saves + if (!do_move(i, x, y, (float)fin_x, (float)fin_y)) { + kill_part(i); + continue; + } + } + else if (!do_move(i, x, y, fin_xf, fin_yf)) + { + // reflection + parts[i].flags |= FLAG_STAGNANT; + if (t==PT_NEUT && 100>(rand()%1000)) + { + kill_part(i); + continue; + } + r = pmap[fin_y][fin_x]; + + if ((r & 0xFF) == PT_PIPE && !(parts[r>>8].tmp&0xFF)) + { + parts[r>>8].tmp = (parts[r>>8].tmp&~0xFF) | parts[i].type; + parts[r>>8].temp = parts[i].temp; + parts[r>>8].flags = parts[i].life; + parts[r>>8].pavg[0] = parts[i].tmp; + parts[r>>8].pavg[1] = parts[i].ctype; + kill_part(i); + continue; + } + + // this should be replaced with a particle type attribute ("photwl" or something) + if ((r & 0xFF) == PT_PSCN) parts[i].ctype = 0x00000000; + if ((r & 0xFF) == PT_NSCN) parts[i].ctype = 0x00000000; + if ((r & 0xFF) == PT_SPRK) parts[i].ctype = 0x00000000; + if ((r & 0xFF) == PT_COAL) parts[i].ctype = 0x00000000; + if ((r & 0xFF) == PT_BCOL) parts[i].ctype = 0x00000000; + if ((r & 0xFF) == PT_PLEX) parts[i].ctype &= 0x1F00003E; + if ((r & 0xFF) == PT_NITR) parts[i].ctype &= 0x0007C000; + if ((r & 0xFF) == PT_NBLE) parts[i].ctype &= 0x3FFF8000; + if ((r & 0xFF) == PT_LAVA) parts[i].ctype &= 0x3FF00000; + if ((r & 0xFF) == PT_ACID) parts[i].ctype &= 0x1FE001FE; + if ((r & 0xFF) == PT_DUST) parts[i].ctype &= 0x3FFFFFC0; + if ((r & 0xFF) == PT_SNOW) parts[i].ctype &= 0x03FFFFFF; + if ((r & 0xFF) == PT_GOO) parts[i].ctype &= 0x3FFAAA00; + if ((r & 0xFF) == PT_PLNT) parts[i].ctype &= 0x0007C000; + if ((r & 0xFF) == PT_PLUT) parts[i].ctype &= 0x001FCE00; + if ((r & 0xFF) == PT_URAN) parts[i].ctype &= 0x003FC000; + + if (get_normal_interp(t, parts[i].x, parts[i].y, parts[i].vx, parts[i].vy, &nrx, &nry)) { + dp = nrx*parts[i].vx + nry*parts[i].vy; + parts[i].vx -= 2.0f*dp*nrx; + parts[i].vy -= 2.0f*dp*nry; + // leave the actual movement until next frame so that reflection of fast particles and refraction happen correctly + } else { + if (t!=PT_NEUT) + kill_part(i); + continue; + } + if (!parts[i].ctype&&t!=PT_NEUT&&t!=PT_ELEC) { + kill_part(i); + continue; + } + } + } + else if (ptypes[t].falldown==0) + { + // gasses and solids (but not powders) + if (!do_move(i, x, y, fin_xf, fin_yf)) + { + // can't move there, so bounce off + // TODO + if (fin_x>x+ISTP) fin_x=x+ISTP; + if (fin_xy+ISTP) fin_y=y+ISTP; + if (fin_y= rand()%400)//checking stagnant is cool, but then it doesn't update when you change it later. + { + if (!flood_water(x,y,i,y, parts[i].tmp2)) + goto movedone; + } + // liquids and powders + if (!do_move(i, x, y, fin_xf, fin_yf)) + { + if (fin_x!=x && do_move(i, x, y, fin_xf, clear_yf)) + { + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + } + else if (fin_y!=y && do_move(i, x, y, clear_xf, fin_yf)) + { + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + } + else + { + s = 1; + r = (rand()%2)*2-1; + if ((clear_x!=x || clear_y!=y || nt || surround_space) && + (fabsf(parts[i].vx)>0.01f || fabsf(parts[i].vy)>0.01f)) + { + // allow diagonal movement if target position is blocked + // but no point trying this if particle is stuck in a block of identical particles + dx = parts[i].vx - parts[i].vy*r; + dy = parts[i].vy + parts[i].vx*r; + if (fabsf(dy)>fabsf(dx)) + mv = fabsf(dy); + else + mv = fabsf(dx); + dx /= mv; + dy /= mv; + if (do_move(i, x, y, clear_xf+dx, clear_yf+dy)) + { + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + goto movedone; + } + swappage = dx; + dx = dy*r; + dy = -swappage*r; + if (do_move(i, x, y, clear_xf+dx, clear_yf+dy)) + { + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + goto movedone; + } + } + if (ptypes[t].falldown>1 && !ngrav_enable && gravityMode==0 && parts[i].vy>fabsf(parts[i].vx)) + { + s = 0; + // stagnant is true if FLAG_STAGNANT was set for this particle in previous frame + if (!stagnant || nt) //nt is if there is an something else besides the current particle type, around the particle + rt = 30;//slight less water lag, although it changes how it moves a lot + else + rt = 10; + for (j=clear_x+r; j>=0 && j>=clear_x-rt && j0) + r = 1; + else + r = -1; + if (s==1) + for (j=ny+r; j>=0 && j=ny-rt && j1 && fabsf(pGravX*parts[i].vx+pGravY*parts[i].vy)>fabsf(pGravY*parts[i].vx-pGravX*parts[i].vy)) + { + float nxf, nyf, prev_pGravX, prev_pGravY, ptGrav = ptypes[t].gravity; + s = 0; + // stagnant is true if FLAG_STAGNANT was set for this particle in previous frame + if (!stagnant || nt) //nt is if there is an something else besides the current particle type, around the particle + rt = 30;//slight less water lag, although it changes how it moves a lot + else + rt = 10; + nxf = clear_xf; + nyf = clear_yf; + for (j=0;jfabsf(pGravX)) + mv = fabsf(pGravY); + else + mv = fabsf(pGravX); + if (mv<0.0001f) break; + pGravX /= mv; + pGravY /= mv; + if (j) + { + nxf += r*(pGravY*2.0f-prev_pGravY); + nyf += -r*(pGravX*2.0f-prev_pGravX); + } + else + { + nxf += r*pGravY; + nyf += -r*pGravX; + } + prev_pGravX = pGravX; + prev_pGravY = pGravY; + nx = (int)(nxf+0.5f); + ny = (int)(nyf+0.5f); + if (nx<0 || ny<0 || nx>=XRES || ny >=YRES) + break; + if ((pmap[ny][nx]&0xFF)!=t || bmap[ny/CELL][nx/CELL]) + { + s = do_move(i, x, y, nxf, nyf); + if (s) + { + nx = (int)(parts[i].x+0.5f); + ny = (int)(parts[i].y+0.5f); + break; + } + if (bmap[ny/CELL][nx/CELL]!=WL_STREAM) + break; + } + } + if (s==1) + { + clear_x = nx; + clear_y = ny; + for (j=0;jfabsf(pGravX)) + mv = fabsf(pGravY); + else + mv = fabsf(pGravX); + if (mv<0.0001f) break; + pGravX /= mv; + pGravY /= mv; + nxf += pGravX; + nyf += pGravY; + nx = (int)(nxf+0.5f); + ny = (int)(nyf+0.5f); + if (nx<0 || ny<0 || nx>=XRES || ny>=YRES) + break; + if ((pmap[ny][nx]&0xFF)!=t || bmap[ny/CELL][nx/CELL]) + { + s = do_move(i, clear_x, clear_y, nxf, nyf); + if (s || bmap[ny/CELL][nx/CELL]!=WL_STREAM) + break; + } + } + } + else if (s==-1) {} // particle is out of bounds + else if ((clear_x!=x||clear_y!=y) && do_move(i, x, y, clear_xf, clear_yf)) {} + else parts[i].flags |= FLAG_STAGNANT; + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + } + else + { + // if interpolation was done, try moving to last clear position + if ((clear_x!=x||clear_y!=y) && do_move(i, x, y, clear_xf, clear_yf)) {} + else parts[i].flags |= FLAG_STAGNANT; + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + } + } + } + } +movedone: + continue; + } +} + +void Simulation::update_particles()//doesn't update the particles themselves, but some other things +{ + int i, j, x, y, t, nx, ny, r, cr,cg,cb, l = -1; + float lx, ly; + int lastPartUsed = 0; + int lastPartUnused = -1; +#ifdef MT + int pt = 0, pc = 0; + pthread_t *InterThreads; +#endif + + memset(pmap, 0, sizeof(pmap)); + memset(photons, 0, sizeof(photons)); + NUM_PARTS = 0; + for (i=0; i<=parts_lastActiveIndex; i++)//the particle loop that resets the pmap/photon maps every frame, to update them. + { + if (parts[i].type) + { + t = parts[i].type; + x = (int)(parts[i].x+0.5f); + y = (int)(parts[i].y+0.5f); + if (x>=0 && y>=0 && x=NPART-1) pfree = -1; + else pfree = parts_lastActiveIndex+1; + } + else + { + if (parts_lastActiveIndex>=NPART-1) parts[lastPartUnused].life = -1; + else parts[lastPartUnused].life = parts_lastActiveIndex+1; + } + parts_lastActiveIndex = lastPartUsed; + if (!sys_pause||framerender) + { + for (y=0; y=XRES || ny<0 || ny>=YRES) + break; + addpixel(vid, nx, ny, 255, 255, 255, 64); + i = nx/CELL; + j = ny/CELL; + lx += vx[j][i]*0.125f; + ly += vy[j][i]*0.125f; + if (bmap[j][i]==WL_STREAM && i!=x && j!=y) + break; + } + drawtext(vid, x*CELL, y*CELL-2, "\x8D", 255, 255, 255, 128); + } +*/ +} + +Simulation::Simulation() +{ + //Create and attach gravity simulation + grav = new Gravity(); + //Give air sim references to our data + grav->bmap = bmap; + //Gravity sim gives us maps to use + gravx = grav->gravx; + gravy = grav->gravy; + gravp = grav->gravp; + gravmap = grav->gravmap; + + //Create and attach air simulation + air = new Air(); + //Give air sim references to our data + air->bmap = bmap; + air->emap = emap; + air->fvx = fvx; + air->fvy = fvy; + //Air sim gives us maps to use + vx = air->vx; + vy = air->vy; + pv = air->pv; + hv = air->hv; + + //ptypes[0] = {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, 0, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}; + //ptypes[1] = {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, 0, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}; + //ptypes[2] = {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, 0, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}; + +#define SC_WALL 0 +#define SC_ELEC 1 +#define SC_POWERED 2 +#define SC_EXPLOSIVE 3 +#define SC_GAS 4 +#define SC_LIQUID 5 +#define SC_POWDERS 6 +#define SC_SOLIDS 7 +#define SC_NUCLEAR 8 +#define SC_SPECIAL 9 +#define SC_LIFE 10 +#define SC_TOOL 11 +#define SC_CRACKER 13 +#define SC_CRACKER2 14 +#define SC_TOTAL 12 + + part_type ptypest[PT_NUM] = + { + //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description + {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}, + {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}, + {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}, + {"OIL", PIXPACK(0x404010), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 20, 0, 0, 5, 1, 1, 20, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Flammable.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"FIRE", PIXPACK(0xFF1000), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, R_TEMP+400.0f+273.15f, 88, "Ignites flammable materials. Heats air.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_FIRE}, + {"STNE", PIXPACK(0xA0A0A0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Heavy particles. Meltable.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"LAVA", PIXPACK(0xE05010), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.0003f * CFDS, 2, 0, 0, 0, 2, 1, 1, 45, SC_LIQUID, R_TEMP+1500.0f+273.15f, 60, "Heavy liquid. Ignites flammable materials. Solidifies when cold.", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC, &update_PYRO, &graphics_LAVA}, + {"GUN", PIXPACK(0xC0C0D0), 0.7f, 0.02f * CFDS, 0.94f, 0.80f, -0.1f, 0.1f, 0.00f, 0.000f * CFDS, 1, 600, 1, 0, 10, 1, 1, 85, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 97, "Light dust. Explosive.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"NITR", PIXPACK(0x20E010), 0.5f, 0.02f * CFDS, 0.92f, 0.97f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 2, 1000, 2, 0, 3, 1, 1, 23, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 50, "Liquid. Pressure sensitive explosive.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"CLNE", PIXPACK(0xFFD010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Solid. Duplicates any particles it touches.", ST_SOLID, TYPE_SOLID, &update_CLNE, NULL}, + {"GAS", PIXPACK(0xE0FF20), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 600, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Gas. Diffuses. Flammable. Liquefies under pressure.", ST_GAS, TYPE_GAS, NULL, NULL}, + {"C-4", PIXPACK(0xD080E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 2, 50, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Solid. Pressure sensitive explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, NULL, NULL}, + {"GOO", PIXPACK(0x804000), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 75, "Solid. Deforms and disappears under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GOO, NULL}, + {"ICE", PIXPACK(0xA0C0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP-50.0f+273.15f, 46, "Solid. Freezes water. Crushes under pressure. Cools down air.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ICEI, NULL}, + {"METL", PIXPACK(0x404060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Conducts electricity. Meltable.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, + {"SPRK", PIXPACK(0xFFFF80), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electricity. Conducted by metal and water.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SPRK, &graphics_SPRK}, + {"SNOW", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f, -0.00005f* CFDS,1, 0, 0, 0, 20, 1, 1, 50, SC_POWDERS, R_TEMP-30.0f+273.15f, 46, "Light particles.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_ICEI, NULL}, + {"WOOD", PIXPACK(0xC0A040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 15, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Solid. Flammable.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, NULL, NULL}, + {"NEUT", PIXPACK(0x20E0FF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 60, "Neutrons. Interact with matter in odd ways.", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_NEUT, &graphics_NEUT}, + {"PLUT", PIXPACK(0x407020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 251, "Heavy particles. Fissile. Generates neutrons under pressure.", ST_SOLID, TYPE_PART|PROP_NEUTPENETRATE|PROP_RADIOACTIVE, &update_PLUT, NULL}, + {"PLNT", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 65, "Plant, drinks water and grows.", ST_SOLID, TYPE_SOLID|PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_PLNT, NULL}, + {"ACID", PIXPACK(0xED55FF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 40, 0, 0, 1, 1, 1, 10, SC_LIQUID, R_TEMP+0.0f +273.15f, 34, "Dissolves almost everything.", ST_LIQUID, TYPE_LIQUID|PROP_DEADLY, &update_ACID, &graphics_ACID}, + {"VOID", PIXPACK(0x790B0B), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Hole, will drain away any particles.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"WTRV", PIXPACK(0xA0A0FF), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, -0.1f, 0.75f, 0.0003f * CFDS, 0, 0, 0, 0, 4, 1, 1, 1, SC_GAS, R_TEMP+100.0f+273.15f, 48, "Steam, heats up air, produced from hot water.", ST_GAS, TYPE_GAS, &update_WTRV, NULL}, + {"CNCT", PIXPACK(0xC0C0C0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 100, "Concrete, stronger than stone.", ST_SOLID, TYPE_PART|PROP_HOT_GLOW, NULL, NULL}, + {"DSTW", PIXPACK(0x1020C0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 23, "Distilled water, does not conduct electricity.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_DSTW, NULL}, + {"SALT", PIXPACK(0xFFFFFF), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 75, SC_POWDERS, R_TEMP+0.0f +273.15f, 110, "Salt, dissolves in water.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"SLTW", PIXPACK(0x4050F0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP+0.0f +273.15f, 75, "Saltwater, conducts electricity, difficult to freeze.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_SLTW, NULL}, + {"DMND", PIXPACK(0xCCFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 186, "Diamond. Indestructible.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"BMTL", PIXPACK(0x505070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Breakable metal.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_BMTL, NULL}, + {"BRMT", PIXPACK(0x705060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken metal.", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_BRMT, NULL}, + {"PHOT", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+900.0f+273.15f, 251, "Photons. Travel in straight lines.", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_PHOT, &graphics_PHOT}, + {"URAN", PIXPACK(0x707020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_NUCLEAR, R_TEMP+30.0f+273.15f, 251, "Heavy particles. Generates heat under pressure.", ST_SOLID, TYPE_PART | PROP_RADIOACTIVE, &update_URAN, NULL}, + {"WAX", PIXPACK(0xF0F0BB), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 44, "Wax. Melts at moderately high temperatures.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"MWAX", PIXPACK(0xE0E0AA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 5, 0, 0, 2, 1, 1, 25, SC_LIQUID, R_TEMP+28.0f+273.15f, 44, "Liquid Wax.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"PSCN", PIXPACK(0x805050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "P-Type Silicon, Will transfer current to any conductor.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"NSCN", PIXPACK(0x505080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "N-Type Silicon, Will not transfer current to P-Type Silicon.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"LN2", PIXPACK(0x80A0DF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 1, 30, SC_LIQUID, 70.15f, 70, "Liquid Nitrogen. Very cold.", ST_SOLID, TYPE_LIQUID, NULL, NULL}, + {"INSL", PIXPACK(0x9EA3B6), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 7, 0, 0, 10, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Insulator, does not conduct heat or electricity.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"VACU", PIXPACK(0x303030), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, -0.01f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+70.0f+273.15f, 255, "Vacuum, sucks in other particles and heats up.", ST_NONE, TYPE_SOLID, NULL, NULL}, + {"VENT", PIXPACK(0xEFEFEF), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.010f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP-16.0f+273.15f, 255, "Air vent, creates pressure and pushes other particles away.", ST_NONE, TYPE_SOLID, NULL, NULL}, + {"RBDM", PIXPACK(0xCCCCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 1, 50, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 240, "Rubidium, explosive, especially on contact with water, low melting point", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"LRBD", PIXPACK(0xAAAAAA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 1000, 1, 0, 2, 1, 1, 45, SC_EXPLOSIVE, R_TEMP+45.0f+273.15f, 170, "Liquid Rubidium.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"NTCT", PIXPACK(0x505040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when hot (More than 100C)", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NPTCT, NULL}, + {"SAND", PIXPACK(0xFFD090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Sand, Heavy particles. Meltable.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"GLAS", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 150, "Solid. Meltable. Shatters under pressure", ST_SOLID, TYPE_SOLID | PROP_NEUTPASS | PROP_HOT_GLOW | PROP_SPARKSETTLE, &update_GLAS, NULL}, + {"PTCT", PIXPACK(0x405050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when cold (Less than 100C)", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NPTCT, NULL}, + {"BGLA", PIXPACK(0x606060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Glass, Heavy particles. Meltable. Bagels.", ST_SOLID, TYPE_PART | PROP_HOT_GLOW, NULL, NULL}, + {"THDR", PIXPACK(0xFFFFA0), 0.0f, 0.00f * CFDS, 1.0f, 0.30f, -0.99f, 0.6f, 0.62f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_EXPLOSIVE, 9000.0f +273.15f, 1, "Lightning! Very hot, inflicts damage upon most materials, transfers current to metals.", ST_NONE, TYPE_ENERGY, &update_THDR, &graphics_THDR}, + {"PLSM", PIXPACK(0xBB99FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.30f, 0.001f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, 10000.0f +273.15f, 5, "Plasma, extremely hot.", ST_NONE, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_PLSM}, + {"ETRD", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)", ST_NONE, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"NICE", PIXPACK(0xC0E0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 35.0f, 46, "Nitrogen Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"NBLE", PIXPACK(0xEB4917), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 106, "Noble Gas. Diffuses. Conductive. Ionizes into plasma when introduced to electricity", ST_GAS, TYPE_GAS|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"BTRY", PIXPACK(0x858505), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Generates Electricity.", ST_SOLID, TYPE_SOLID, &update_BTRY, NULL}, + {"LCRY", PIXPACK(0x505050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)", ST_SOLID, TYPE_SOLID, &update_LCRY, &graphics_LCRY}, + {"STKM", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM, &graphics_STKM}, + {"SWCH", PIXPACK(0x103B11), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Only conducts when switched on. (PSCN switches on, NSCN switches off)", ST_SOLID, TYPE_SOLID, &update_SWCH, &graphics_SWCH}, + {"SMKE", PIXPACK(0x222222), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+320.0f+273.15f, 88, "Smoke", ST_SOLID, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_SMKE}, + {"DESL", PIXPACK(0x440000), 1.0f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.0f, 0.0f * CFDS, 2, 2, 0, 0, 5, 1, 1, 15, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Explodes under high pressure and temperatures", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"COAL", PIXPACK(0x222222), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly.", ST_SOLID, TYPE_SOLID, &update_COAL, &graphics_COAL}, + {"LOXY", PIXPACK(0x80A0EF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 5000, 0, 0, 0, 1, 1, 30, SC_LIQUID, 80.0f, 70, "Liquid Oxygen. Very cold. Reacts with fire", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"OXYG", PIXPACK(0x80A0FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 3.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Gas. Ignites easily.", ST_GAS, TYPE_GAS, &update_O2, NULL}, + {"INWR", PIXPACK(0x544141), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Insulated Wire. Doesn't conduct to metal or semiconductors.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"YEST", PIXPACK(0xEEE0C0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 15, 0, 0, 30, 1, 1, 80, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Yeast, grows when warm (~37C).", ST_SOLID, TYPE_PART, &update_YEST, NULL}, + {"DYST", PIXPACK(0xBBB0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 20, 0, 0, 30, 0, 1, 80, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Dead Yeast.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"THRM", PIXPACK(0xA08090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 211, "Thermite. Burns at extremely high temperature.", ST_SOLID, TYPE_PART, &update_THRM, NULL}, + {"GLOW", PIXPACK(0x445464), 0.3f, 0.02f * CFDS, 0.98f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 2, 1, 1, 40, SC_LIQUID, R_TEMP+20.0f+273.15f, 44, "Glow, Glows under pressure", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC, &update_GLOW, &graphics_GLOW}, + {"BRCK", PIXPACK(0x808080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Brick, breakable building material.", ST_SOLID, TYPE_SOLID|PROP_HOT_GLOW, NULL, NULL}, + {"CFLM", PIXPACK(0x8080FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.0005f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, 0.0f, 88, "Sub-zero flame.", ST_LIQUID, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, NULL, &graphics_HFLM}, + {"FIRW", PIXPACK(0xFFA040), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, -0.99f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 55, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 70, "Fireworks!", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_FIRW, &graphics_FIRW}, + {"FUSE", PIXPACK(0x0A5706), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly. Ignites at somewhat high temperatures and electricity.", ST_SOLID, TYPE_SOLID, &update_FUSE, NULL}, + {"FSEP", PIXPACK(0x63AD5F), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 70, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Fuse Powder. See FUSE.", ST_SOLID, TYPE_PART, &update_FSEP, NULL}, + {"AMTR", PIXPACK(0x808080), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.00f, 0.10f, 1.00f, 0.0000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Anti-Matter, Destroys a majority of particles", ST_NONE, TYPE_PART, &update_AMTR, NULL}, //Maybe TYPE_ENERGY? + {"BCOL", PIXPACK(0x333333), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Coal. Heavy particles. See COAL", ST_SOLID, TYPE_PART, &update_BCOL, NULL}, + {"PCLN", PIXPACK(0x3B3B0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, duplicates any particles it touches.", ST_NONE, TYPE_SOLID, &update_PCLN, &graphics_PCLN}, + {"HSWC", PIXPACK(0x3B0A0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Heat switch. Conducts Heat only when activated", ST_NONE, TYPE_SOLID, &update_HSWC, &graphics_HSWC}, + {"IRON", PIXPACK(0x707070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 50, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Rusts with salt, can be used for electrolysis of WATR", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_IRON, NULL}, + {"MORT", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_CRACKER2, R_TEMP+4.0f +273.15f, 60, "Steam Train.", ST_NONE, TYPE_PART, &update_MORT, NULL}, + {"LIFE", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 1, 100, SC_LIFE, 9000.0f, 40, "Game Of Life! B3/S23", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, &graphics_LIFE}, + {"DLAY", PIXPACK(0x753590), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, 4.0f+273.15f, 0, "Conducts with temperature-dependent delay. (use HEAT/COOL).", ST_SOLID, TYPE_SOLID, &update_DLAY, &graphics_DLAY}, + {"CO2", PIXPACK(0x666666), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.1f, 1.0f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+273.15f, 88, "Carbon Dioxide", ST_GAS, TYPE_GAS, &update_CO2, NULL}, + {"DRIC", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 172.65f, 2, "Dry Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"BUBW", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Carbonated water. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_CBNW, &graphics_CBNW}, + {"STOR", PIXPACK(0x50DFDF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. Stores a single particle, releases when charged with PSCN, also passes to PIPE", ST_NONE, TYPE_SOLID, &update_STOR, &graphics_STOR}, + {"PVOD", PIXPACK(0x792020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, destroys entering particles", ST_NONE, TYPE_SOLID, &update_PVOD, &graphics_PVOD}, + {"CONV", PIXPACK(0x0AAB0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Solid. Converts whatever touches it into its ctype.", ST_NONE, TYPE_SOLID, &update_CONV, NULL}, + {"CAUS", PIXPACK(0x80FFA0), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 1.50f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Caustic Gas, acts like Acid", ST_GAS, TYPE_GAS|PROP_DEADLY, &update_CAUS, NULL}, + {"LIGH", PIXPACK(0xFFFFC0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "More realistic lightning. Set pen size to set the size of the lightning.", ST_SOLID, TYPE_SOLID, &update_LIGH, &graphics_LIGH}, + {"TESC", PIXPACK(0x707040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Tesla coil!", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, + {"DEST", PIXPACK(0xFF3311), -0.05f, 0.00f * CFDS, 0.95f, 0.95f, -0.1f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 101, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 150, "More destructive Bomb.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_DEST, &graphics_DEST}, + {"SPNG", PIXPACK(0xFFBE30), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 1, 30, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "A sponge, absorbs water.", ST_SOLID, TYPE_SOLID, &update_SPNG, &graphics_SPNG}, + {"RIME", PIXPACK(0xCCCCCC), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 100, SC_CRACKER2, 243.15f, 100, "Not quite Ice", ST_SOLID, TYPE_SOLID, &update_RIME, NULL}, + {"FOG", PIXPACK(0xAAAAAA), 0.8f, 0.00f * CFDS, 0.4f, 0.70f, -0.1f, 0.0f, 0.99f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 1, SC_CRACKER2, 243.15f, 100, "Not quite Steam", ST_GAS, TYPE_GAS|PROP_LIFE_DEC, &update_FOG, NULL}, + {"BCLN", PIXPACK(0xFFD040), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Breakable Clone.", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_BCLN, NULL}, + {"LOVE", PIXPACK(0xFF30FF), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_CRACKER2, 373.0f, 40, "Love...", ST_GAS, TYPE_SOLID, &update_MISC, NULL}, + {"DEUT", PIXPACK(0x00153F), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 31, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 251, "Deuterium oxide. Volume changes with temp, radioactive with neutrons.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_DEUT, &graphics_DEUT}, + {"WARP", PIXPACK(0x000000), 0.8f, 0.00f * CFDS, 0.9f, 0.70f, -0.1f, 0.0f, 3.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 1, SC_NUCLEAR, R_TEMP +273.15f, 100, "Displaces other elements.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_WARP, NULL}, + {"PUMP", PIXPACK(0x0A0A3B), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 1, 100, SC_POWERED, 273.15f, 0, "Changes pressure to its temp when activated. (use HEAT/COOL).", ST_SOLID, TYPE_SOLID, &update_PUMP, &graphics_PUMP}, + {"FWRK", PIXPACK(0x666666), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 1, 1, 1, 97, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 100, "First fireworks made, activated by heat/neutrons.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_FWRK, NULL}, + {"PIPE", PIXPACK(0x444444), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, 273.15f, 0, "Moves elements around, read FAQ on website for help.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_PIPE, &graphics_PIPE}, + {"FRZZ", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f, -0.00005f* CFDS,1, 0, 0, 0, 20, 1, 1, 50, SC_POWDERS, 90.0f, 46, "FREEZE", ST_SOLID, TYPE_PART, &update_FRZZ, NULL}, + {"FRZW", PIXPACK(0x1020C0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_CRACKER2, 120.0f, 29, "FREEZE WATER", ST_LIQUID, TYPE_LIQUID||PROP_LIFE_DEC, &update_FRZW, NULL}, + {"GRAV", PIXPACK(0xFFE0A0), 0.7f, 0.00f * CFDS, 1.00f, 1.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Changes colour based on velocity.", ST_SOLID, TYPE_PART, &update_MISC, &graphics_GRAV}, + {"BIZR", PIXPACK(0x00FF77), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP+0.0f +273.15f, 29, "Bizarre... contradicts the normal state changes.", ST_LIQUID, TYPE_LIQUID, &update_BIZR, &graphics_BIZR}, + {"BIZG", PIXPACK(0x00FFBB), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 2.75f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_CRACKER2, R_TEMP-200.0f+273.15f, 42, "Bizarre gas", ST_GAS, TYPE_GAS, &update_BIZR, &graphics_BIZR}, + {"BIZS", PIXPACK(0x00E455), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_CRACKER2, R_TEMP+300.0f+273.15f, 251, "Bizarre solid", ST_SOLID, TYPE_SOLID, &update_BIZR, &graphics_BIZR}, + {"INST", PIXPACK(0x404039), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Instantly conducts, PSCN to charge, NSCN to take.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, NULL, NULL}, + {"ISOZ", PIXPACK(0xAA30D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 1, 24, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 29, "Radioactive liquid", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_ISZ, NULL}, + {"ISZS", PIXPACK(0x662089), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0007f* CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_NUCLEAR, 140.00f, 251, "Solid form of ISOZ, slowly decays.", ST_SOLID, TYPE_SOLID, &update_ISZ, NULL}, + {"PRTI", PIXPACK(0xEB5917), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.005f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Portal IN. Things go in here, now with channels (same as WIFI)", ST_SOLID, TYPE_SOLID, &update_PRTI, &graphics_PRTI}, + {"PRTO", PIXPACK(0x0020EB), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.005f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Portal OUT. Things come out here, now with channels (same as WIFI)", ST_SOLID, TYPE_SOLID, &update_PRTO, &graphics_PRTO}, + {"PSTE", PIXPACK(0xAA99AA), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 31, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Colloid, Hardens under pressure", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"PSTS", PIXPACK(0x776677), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 20, 0, 1, 100, SC_CRACKER, R_TEMP-2.0f +273.15f, 29, "Solid form of PSTE, temporary", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"ANAR", PIXPACK(0xFFFFEE), -0.7f, -0.02f * CFDS, 0.96f, 0.80f, 0.1f, -0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Behaves opposite gravity", ST_SOLID, TYPE_PART, &update_ANAR, NULL}, + {"VINE", PIXPACK(0x079A00), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 65, "Vine, grows", ST_SOLID, TYPE_SOLID, &update_VINE, NULL}, + {"INVS", PIXPACK(0x00CCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 15, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Invisible to everything while under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPASS, NULL, &graphics_INVS}, + {"EQVE", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 0, 1, 85, SC_CRACKER2, R_TEMP+0.0f +273.15f, 70, "Shared velocity test", ST_SOLID, TYPE_PART, NULL, NULL}, + {"SPWN2", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "STK2 spawn point", ST_SOLID, TYPE_SOLID, &update_SPAWN2, NULL}, + {"SPWN", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "STKM spawn point", ST_SOLID, TYPE_SOLID, &update_SPAWN, NULL}, + {"SHLD", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "Shield, spark it to grow", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD1, NULL}, + {"SHD2", PIXPACK(0x777777), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 2", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD2, NULL}, + {"SHD3", PIXPACK(0x444444), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 3", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD3, NULL}, + {"SHD4", PIXPACK(0x212121), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 4", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD4, NULL}, + {"LOLZ", PIXPACK(0x569212), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_CRACKER2, 373.0f, 40, "Lolz", ST_GAS, TYPE_SOLID, &update_MISC, NULL}, + {"WIFI", PIXPACK(0x40A060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 2, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Wireless transmitter, color coded.", ST_SOLID, TYPE_SOLID, &update_WIFI, &graphics_WIFI}, + {"FILT", PIXPACK(0x000056), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Filter for photons, changes the color.", ST_SOLID, TYPE_SOLID, NULL, &graphics_FILT}, + {"ARAY", PIXPACK(0xFFBB00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Ray Emitter. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ARAY, NULL}, + {"BRAY", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 0, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Ray Point. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, NULL, &graphics_BRAY}, + {"STK2", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM2, &graphics_STKM2}, + {"BOMB", PIXPACK(0xFFF288), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Bomb.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC|PROP_SPARKSETTLE, &update_BOMB, &graphics_BOMB}, + {"C-5", PIXPACK(0x2050E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Cold explosive", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_C5, NULL}, + {"SING", PIXPACK(0x242424), 0.7f, 0.36f * CFDS, 0.96f, 0.80f, 0.1f, 0.12f, 0.00f, -0.001f * CFDS, 1, 0, 0, 0, 0, 1, 1, 86, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Singularity", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_SING, NULL}, + {"QRTZ", PIXPACK(0xAADDDD), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 3, "Quartz, breakable mineral. Conducts but becomes brittle at lower temperatures.", ST_SOLID, TYPE_SOLID|PROP_HOT_GLOW|PROP_LIFE_DEC, &update_QRTZ, &graphics_QRTZ}, + {"PQRT", PIXPACK(0x88BBBB), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.27f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 3, "Broken quartz.", ST_SOLID, TYPE_PART| PROP_HOT_GLOW, &update_QRTZ, &graphics_QRTZ}, + {"EMP", PIXPACK(0x66AAFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 3, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 121, "Breaks activated electronics.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_EMP, &graphics_EMP}, + {"BREL", PIXPACK(0x707060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.18f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken electronics", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, + {"ELEC", PIXPACK(0xDFEFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+200.0f+273.15f, 251, "Electrons", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_ELEC, &graphics_ELEC}, + {"ACEL", PIXPACK(0x0099CC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Accelerator", ST_NONE, TYPE_SOLID, &update_ACEL, &graphics_ACEL}, + {"DCEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Decelerator", ST_NONE, TYPE_SOLID, &update_DCEL, &graphics_DCEL}, + {"TNT", PIXPACK(0xC05050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_BANG, NULL}, + {"IGNC", PIXPACK(0xC0B050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Ignition cord.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL, &update_IGNT, NULL}, + {"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL}, + /*FREE*/{"LOTE", PIXPACK(0xFF0000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Behaves kinda like Living on the Edge S3458/B37/4", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"FRG2", PIXPACK(0x00FF00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Frogs rule S124/B3/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"STAR", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Star Wars rule S3456/B278/6", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"FROG", PIXPACK(0x00AA00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Frogs S12/B34/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"BRAN", PIXPACK(0xCCCC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Brian 6 S6/B246/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"WIND", PIXPACK(0x101010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_SPECIAL, 0.0f, 40, "", ST_NONE, ST_NONE, NULL, NULL}, + {"HYGN", PIXPACK(0x5070FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.10f, 0.00f, 3.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 251, "Combines with O2 to make WATR", ST_GAS, TYPE_GAS, &update_H2, NULL}, + {"SOAP", PIXPACK(0xF5F5DC), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Soap. Creates bubbles.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_SOAP, NULL}, + {"BHOL", PIXPACK(0x202020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "Black hole (Requires newtonian gravity)", ST_SOLID, TYPE_SOLID, &update_NBHL, NULL}, + {"WHOL", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "White hole (Requires newtonian gravity)", ST_SOLID, TYPE_SOLID, &update_NWHL, NULL}, + {"MERC", PIXPACK(0x736B6D), 0.4f, 0.04f * CFDS, 0.94f, 0.80f, 0.0f, 0.3f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 91, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Mercury. Volume changes with temperature, Conductive.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_NEUTABSORB|PROP_LIFE_DEC, &update_MERC, NULL}, + {"PBCN", PIXPACK(0x3B1D0A), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Powered breakable clone", ST_NONE, TYPE_SOLID, &update_PBCN, &graphics_PBCN}, + {"GPMP", PIXPACK(0x0A3B3B), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, 0.0f +273.15f, 0, "Changes gravity to its temp when activated. (use HEAT/COOL).", ST_NONE, TYPE_SOLID, &update_GPMP, &graphics_GPMP}, + {"CLST", PIXPACK(0xE4A4A4), 0.7f, 0.02f * CFDS, 0.94f, 0.95f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Clay dust. Produces paste when mixed with water.", ST_SOLID, TYPE_PART, &update_CLST, &graphics_CLST}, + {"WIRE", PIXPACK(0xFFCC00), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 250, "WireWorld wires.",ST_SOLID,TYPE_SOLID,&update_WIRE, &graphics_WIRE}, + {"GBMB", PIXPACK(0x1144BB), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Sticks to first object it touches then produces strong gravity push.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GBMB, &graphics_GBMB}, + {"FIGH", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Fighter. Tries to kill stickmen.", ST_NONE, 0, &update_FIGH, &graphics_FIGH}, + //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description + }; + memcpy(ptypes, ptypest, sizeof(part_type)*PT_NUM); + +#define IPL -257.0f +#define IPH 257.0f +#define ITL MIN_TEMP-1 +#define ITH MAX_TEMP+1 +// no transition (PT_NONE means kill part) +#define NT -1 +// special transition - lava ctypes etc need extra code, which is only found and run if ST is given +#define ST PT_NUM +part_transition ptransitionst[PT_NUM] = +{ // if low pressure if high pressure if low temperature if high temperature + // Name plv plt phv pht tlv tlt thv tht + /* NONE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DUST */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WATR */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, + /* OIL */ {IPL, NT, IPH, NT, ITL, NT, 333.0f, PT_GAS}, + /* FIRE */ {IPL, NT, IPH, NT, ITL, NT, 2773.0f,PT_PLSM}, + /* STNE */ {IPL, NT, IPH, NT, ITL, NT, 983.0f, PT_LAVA}, + /* LAVA */ {IPL, NT, IPH, NT, 2573.15f,ST, ITH, NT}, // 2573.15f is highest melt pt of possible ctypes + /* GUN */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* NITR */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* CLNE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GAS */ {IPL, NT, 6.0f, PT_OIL, ITL, NT, 573.0f, PT_FIRE}, + /* C-4 */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* GOO */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ICE */ {IPL, NT, 0.8f, PT_SNOW, ITL, NT, 233.0f, ST}, + /* METL */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_LAVA}, + /* SPRK */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SNOW */ {IPL, NT, IPH, NT, ITL, NT, 273.0f, PT_WATR}, + /* WOOD */ {IPL, NT, IPH, NT, ITL, NT, 873.0f, PT_FIRE}, + /* NEUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PLUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PLNT */ {IPL, NT, IPH, NT, ITL, NT, 573.0f, PT_FIRE}, + /* ACID */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VOID */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WTRV */ {IPL, NT, IPH, NT, 371.0f, ST, ITH, NT}, + /* CNCT */ {IPL, NT, IPH, NT, ITL, NT, 1123.0f,PT_LAVA}, + /* DSTW */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, + /* SALT */ {IPL, NT, IPH, NT, ITL, NT, 1173.0f,PT_LAVA}, + /* SLTW */ {IPL, NT, IPH, NT, 233.0f, PT_ICEI, 483.0f, ST}, + /* DMND */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BMTL */ {IPL, NT, 1.0f, ST, ITL, NT, 1273.0f,PT_LAVA}, + /* BRMT */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_LAVA}, + /* PHOT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* URAN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WAX */ {IPL, NT, IPH, NT, ITL, NT, 319.0f, PT_MWAX}, + /* MWAX */ {IPL, NT, IPH, NT, 318.0f, PT_WAX, 673.0f, PT_FIRE}, + /* PSCN */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* NSCN */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* LN2 */ {IPL, NT, IPH, NT, 63.0f, PT_NICE, 77.0f, PT_NONE}, + /* INSL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VACU */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VENT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* RBDM */ {IPL, NT, IPH, NT, ITL, NT, 312.0f, PT_LRBD}, + /* LRBD */ {IPL, NT, IPH, NT, 311.0f, PT_RBDM, 961.0f, PT_FIRE}, + /* NTCT */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* SAND */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, + /* GLAS */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, + /* PTCT */ {IPL, NT, IPH, NT, ITL, NT, 1414.0f,PT_LAVA}, + /* BGLA */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, + /* THDR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PLSM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ETRD */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* NICE */ {IPL, NT, IPH, NT, ITL, NT, 63.1f, PT_LNTG}, + /* NBLE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BTRY */ {IPL, NT, IPH, NT, ITL, NT, 2273.0f,PT_PLSM}, + /* LCRY */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_BGLA}, + /* STKM */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, + /* SWCH */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SMKE */ {IPL, NT, IPH, NT, ITL, NT, 625.0f, PT_FIRE}, + /* DESL */ {IPL, NT, 5.0f, PT_FIRE, ITL, NT, 335.0f, PT_FIRE}, + /* COAL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* LO2 */ {IPL, NT, IPH, NT, ITL, NT, 90.1f, PT_O2}, + /* O2 */ {IPL, NT, IPH, NT, 90.0f, PT_LO2, ITH, NT}, + /* INWR */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* YEST */ {IPL, NT, IPH, NT, ITL, NT, 373.0f, PT_DYST}, + /* DYST */ {IPL, NT, IPH, NT, ITL, NT, 473.0f, PT_DUST}, + /* THRM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GLOW */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BRCK */ {IPL, NT, 8.8f, PT_STNE, ITL, NT, 1223.0f,PT_LAVA}, + /* CFLM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FIRW */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FUSE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FSEP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* AMTR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BCOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PCLN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* HSWC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* IRON */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* MORT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* LIFE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DLAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* CO2 */ {IPL, NT, IPH, NT, 194.65f,PT_DRIC, ITH, NT}, + /* DRIC */ {IPL, NT, IPH, NT, ITL, NT, 195.65f,PT_CO2}, + /* CBNW */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, + /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SPNG */ {IPL, NT, IPH, NT, ITL, NT, 2730.0f,PT_FIRE}, + /* RIME */ {IPL, NT, IPH, NT, ITL, NT, 273.15f,PT_WATR}, + /* FOG */ {IPL, NT, IPH, NT, ITL, NT, 373.15f,PT_WTRV}, + /* BCLN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* LOVE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DEUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WARP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PUMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FWRK */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PIPE */ {IPL, NT, 10.0f, PT_BRMT, ITL, NT, ITH, NT}, + /* FRZZ */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FRZW */ {IPL, NT, IPH, NT, ITL, NT, 53.0f, PT_ICEI}, + /* GRAV */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BIZR */ {IPL, NT, IPH, NT, 100.0f, PT_BIZRG, 400.0f, PT_BIZRS}, + /* BIZRG*/ {IPL, NT, IPH, NT, ITL, NT, 100.0f, PT_BIZR},//, 400.0f, PT_BIZRS}, + /* BIZRS*/ {IPL, NT, IPH, NT, 400.0f, PT_BIZR, ITH, NT},// 100.0f, PT_BIZRG}, + /* INST */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ISOZ */ {IPL, NT, IPH, NT, 160.0f, PT_ISZS, ITH, NT}, + /* ISZS */ {IPL, NT, IPH, NT, ITL, NT, 300.0f, PT_ISOZ}, + /* PRTI */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PRTO */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PSTE */ {IPL, NT, 0.5f, PT_PSTS, ITL, NT, 747.0f, PT_BRCK}, + /* PSTS */ {0.5f, PT_PSTE, IPH, NT, ITL, NT, ITH, NT}, + /* ANAR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VINE */ {IPL, NT, IPH, NT, ITL, NT, 573.0f, PT_FIRE}, + /* INVS */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* EQVE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SPWN2*/ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SPAWN*/ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SHLD1*/ {IPL, NT, 7.0f, PT_NONE, ITL, NT, ITH, NT}, + /* SHLD2*/ {IPL, NT, 15.0f, PT_NONE, ITL, NT, ITH, NT}, + /* SHLD3*/ {IPL, NT, 25.0f, PT_NONE, ITL, NT, ITH, NT}, + /* SHLD4*/ {IPL, NT, 40.0f, PT_NONE, ITL, NT, ITH, NT}, + /* LOlZ */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WIFI */ {IPL, NT, 15.0f, PT_BRMT, ITL, NT, ITH, NT}, + /* FILT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ARAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BRAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* STKM2*/ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, + /* BOMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* C-5 */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SING */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* QRTZ */ {IPL, NT, IPH, NT, ITL, NT, 2573.15f,PT_LAVA}, + /* PQRT */ {IPL, NT, IPH, NT, ITL, NT, 2573.15f,PT_LAVA}, + /* EMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BREL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ELEC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ACEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DCEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* TNT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* IGNP */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* BOYL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WIND */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* H2 */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SOAP */ {IPL, NT, IPH, NT, ITL, NT, ITL, NT}, + /* NBHL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* NWHL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* MERC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PBCN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GPMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* CLST */ {IPL, NT, IPH, NT, ITL, NT, 1256.0f, PT_LAVA}, + /* WIRE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GBMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FIGH */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, +}; +#undef IPL +#undef IPH +#undef ITL +#undef ITH +#undef NT +#undef ST*/ + memcpy(ptransitions, ptransitionst, sizeof(part_transition) * PT_NUM); + init_can_move(); + clear_sim(); +} diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp new file mode 100644 index 0000000..a357c36 --- /dev/null +++ b/src/interface/Button.cpp @@ -0,0 +1,127 @@ +/* + * Button.cpp + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#include + +#include "interface/Button.h" +#include "Graphics.h" + +namespace ui { + +Button::Button(int x, int y, int width, int height, const std::string& buttonText): + Component(x, y, width, height), + Toggleable(false), + ButtonText(buttonText), + isMouseInside(false), + isButtonDown(false), + state(false) +{ + +} + +void Button::Draw(void* userdata) +{ + Graphics * g = reinterpret_cast(userdata); + //TODO: Cache text location, that way we don't have the text alignment code here + if(isButtonDown) + { + g->fillrect(X, Y, Width, Height, 255, 255, 255, 255); + g->drawtext(X+(Width-Graphics::textwidth((char *)ButtonText.c_str()))/2, Y+(Height-10)/2, ButtonText, 0, 0, 0, 255); + } + else + { + if(isMouseInside) + g->fillrect(X, Y, Width, Height, 20, 20, 20, 255); + g->drawrect(X, Y, Width, Height, 255, 255, 255, 255); + g->drawtext(X+(Width-Graphics::textwidth((char *)ButtonText.c_str()))/2, Y+(Height-10)/2, ButtonText, 255, 255, 255, 255); + } + /*sf::RenderWindow* rw = reinterpret_cast(userdata); //it better be a RenderWindow or so help your god + + //Draw component here + sf::Text textGraphic(ButtonText); + textGraphic.SetCharacterSize(11); + if(isButtonDown) + textGraphic.SetColor(sf::Color::Black); + else + textGraphic.SetColor(sf::Color::White); + sf::FloatRect tempRect = textGraphic.GetRect(); + textGraphic.SetPosition(ceil(X + Width/2 - tempRect.Width/2), ceil(Y + Height/2 - tempRect.Height/2)); + + if(isMouseInside) + { + if(isButtonDown) + rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::White, 2.f, sf::Color::Black)); + else + rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::Black, 2.f, sf::Color::White)); + } + else + { + if(isButtonDown) + rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::White, 2.f, sf::Color::Black)); + else + rw->Draw(sf::Shape::Rectangle(X+1, Y+1, Width-2, Width-2, sf::Color::Black, 1.f, sf::Color::White)); + } + + rw->Draw(textGraphic);*/ +} + +void Button::OnMouseUnclick(int x, int y, unsigned int button) +{ + if(button != 1) + { + return; //left click only! + } + + if(isButtonDown) + { + if(state) + { + state = false; + } + else + { + if(Toggleable) + { + state = true; + } + DoAction(); + } + } + + isButtonDown = false; +} + +void Button::OnMouseUp(int x, int y, unsigned int button) //mouse unclick is called before this +{ + if(button != 1) return; //left click only! + + isButtonDown = false; +} + +void Button::OnMouseClick(int x, int y, unsigned int button) +{ + if(button != 1) return; //left click only! + + isButtonDown = true; +} + +void Button::OnMouseEnter(int x, int y, int dx, int dy) +{ + isMouseInside = true; +} + +void Button::OnMouseLeave(int x, int y, int dx, int dy) +{ + isMouseInside = false; +} + +void Button::DoAction() +{ + std::cout << "Do action!"<create_parts(localx, localy, 20, 20, 1, 0); + } +} + +void Sandbox::OnMouseDown(int localx, int localy, unsigned int button) +{ + isMouseDown = true; +} + +void Sandbox::OnMouseUp(int localx, int localy, unsigned int button) +{ + isMouseDown = false; +} + +void Sandbox::Draw(void* userdata) +{ + Graphics * g = reinterpret_cast(userdata); + if(!ren) + ren = new Renderer(g, sim); + ren->render_parts(); +} + +void Sandbox::Tick(float delta) +{ + sim->update_particles(); +} + +Sandbox::~Sandbox() { + // TODO Auto-generated destructor stub +} + +} /* namespace ui */ diff --git a/src/interface/State.cpp b/src/interface/State.cpp new file mode 100644 index 0000000..e069e8f --- /dev/null +++ b/src/interface/State.cpp @@ -0,0 +1,232 @@ +/* + * State.cpp + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#include +#include +#include + +#include "interface/State.h" + +namespace ui { + +State::State(int w, int h) : + mouseX(0), + mouseY(0), + mouseXP(0), + mouseYP(0), + width(w), + height(h) +{ +} + +State::~State() +{ + //Components.~vector(); // just in case // devnote : Nope.jpg Nate :3 -frankbro +} + +void State::Add(Component* child) +{ + Components.push_back(child); + child->Parent = this; +} + +void State::Remove(Component* child) +{ + for(int i = 0; i < Components.size(); i++) + if(Components[i] == child) + { + Components.erase(Components.begin() + i); + break; + } +} + +void State::Draw(void* userdata) +{ + //draw + for(int i = 0; i < Components.size(); i++) + { + if(Components[i]->Visible) + { + if(AllowExclusiveDrawing) + { + Components[i]->Draw(userdata); + } + else if( + Components[i]->X + Components[i]->Width >= 0 && + Components[i]->Y + Components[i]->Height >= 0 && + Components[i]->X < width && + Components[i]->Y < height ) + { + Components[i]->Draw(userdata); + } + } + } +} + +void State::Tick(float dt) +{ + //on mouse hover + for(int i = 0; i < Components.size(); i++) + if( mouseX >= Components[i]->X && + mouseY >= Components[i]->Y && + mouseX < Components[i]->X + Components[i]->Width && + mouseY < Components[i]->Y + Components[i]->Height ) + { + if(Components[i]->Enabled) + { + Components[i]->OnMouseHover(mouseX, mouseY); + } + break; + } + + //tick + for(int i = 0; i < Components.size(); i++) + Components[i]->Tick(dt); +} + +void State::OnKeyPress(int key, bool shift, bool ctrl, bool alt) +{ + //on key press + if(focusedComponent_ != NULL) + if(focusedComponent_->Enabled) + focusedComponent_->OnKeyPress(key, shift, ctrl, alt); +} + +void State::OnKeyRelease(int key, bool shift, bool ctrl, bool alt) +{ + //on key unpress + if(focusedComponent_ != NULL) + if(focusedComponent_->Enabled) + focusedComponent_->OnKeyRelease(key, shift, ctrl, alt); +} + +void State::OnMouseDown(int x, int y, unsigned int button) +{ + //on mouse click + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) + { + Components[i]->OnMouseClick(x - Components[i]->X, y - Components[i]->Y, button); + this->focusedComponent_ = Components[i]; //set this component as the focused component + break; + } + + //on mouse down + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + Components[i]->OnMouseDown(x - Components[i]->X, y - Components[i]->Y, button); +} + +void State::OnMouseMove(int x, int y) +{ + //update mouse coords + mouseX = x; + mouseY = y; + + //on mouse move (if true, and inside) + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + { + int localX = x - Components[i]->X; + int localY = y - Components[i]->Y; + int localXP = mouseXP - Components[i]->X; + int localYP = mouseYP - Components[i]->Y; + int dx = x - mouseXP; + int dy = x - mouseYP; + + Components[i]->OnMouseMoved(localX, localY, dx, dy); + + //is the mouse inside + if(localX >= 0 && + localY >= 0 && + localX < Components[i]->Width && + localY < Components[i]->Height ) + { + //was the mouse outside last tick? + if(localXP < 0 || + localXP >= Components[i]->Width || + localYP < 0 || + localYP >= Components[i]->Height ) + { + Components[i]->OnMouseEnter(localX, localY, dx, dy); + } + + Components[i]->OnMouseMovedInside(localX, localY, dx, dy); + + break; //found the top-most component under mouse, break that shit + } + //not inside, let's see if it used to be inside last tick + else if (localXP >= 0 && + localYP >= 0 && + localXP < Components[i]->Width && + localYP < Components[i]->Height ) + { + Components[i]->OnMouseLeave(localX, localY, x - mouseXP, y - mouseYP); + } + } + else //is locked + { + int localX = x - Components[i]->X; + int localY = y - Components[i]->Y; + + //is the mouse inside + if(localX >= 0 && + localY >= 0 && + localX < Components[i]->Width && + localY < Components[i]->Height ) + { + break; //it's the top-most component under the mouse, we don't want to go under it. + } + } + // end of for loop here + + //set the previous mouse coords + mouseXP = x; + mouseYP = y; +} + +void State::OnMouseUp(int x, int y, unsigned int button) +{ + //on mouse unclick + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) + { + Components[i]->OnMouseUnclick(x - Components[i]->X, y - Components[i]->Y, button); + break; + } + + //on mouse up + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + Components[i]->OnMouseUp(x - Components[i]->X, y - Components[i]->Y, button); +} + +void State::OnMouseWheel(int x, int y, int d) +{ + //focused mouse wheel + if(focusedComponent_ != NULL) + focusedComponent_->OnMouseWheelFocused(x - focusedComponent_->X, y - focusedComponent_->Y, d); + + //mouse wheel inside + for(int i = Components.size() - 1; i > -1 ; i--) + if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) + { + if(Components[i]->Enabled) + Components[i]->OnMouseWheelInside(x - Components[i]->X, y - Components[i]->Y, d); + break; //found top-most component under mouse + } + + //on mouse wheel + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + Components[i]->OnMouseWheel(x - Components[i]->X, y - Components[i]->Y, d); +} + + +} /* namespace ui */ diff --git a/src/interface/Window.cpp b/src/interface/Window.cpp new file mode 100644 index 0000000..624bf9a --- /dev/null +++ b/src/interface/Window.cpp @@ -0,0 +1,23 @@ +/* + * Window.cpp + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#include "interface/Window.h" + +namespace ui { + +Window::Window(): + State(width, height) +{ + // TODO Auto-generated constructor stub + +} + +Window::~Window() { + // TODO Auto-generated destructor stub +} + +} /* namespace ui */ -- cgit v0.9.2-21-gd62e From d7d0398f23bb13d940563f104aa31f3496a3ea2d Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 8 Jan 2012 18:22:57 +0000 Subject: Whoops, remove object files diff --git a/build/obj/core/.empty b/build/obj/core/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/build/obj/core/Air.powder.exe.o b/build/obj/core/Air.powder.exe.o deleted file mode 100644 index 45cc899..0000000 Binary files a/build/obj/core/Air.powder.exe.o and /dev/null differ diff --git a/build/obj/core/Graphics.powder.exe.o b/build/obj/core/Graphics.powder.exe.o deleted file mode 100644 index eb6dcd3..0000000 Binary files a/build/obj/core/Graphics.powder.exe.o and /dev/null differ diff --git a/build/obj/core/Gravity.powder.exe.o b/build/obj/core/Gravity.powder.exe.o deleted file mode 100644 index 00d22eb..0000000 Binary files a/build/obj/core/Gravity.powder.exe.o and /dev/null differ diff --git a/build/obj/core/Misc.powder.exe.o b/build/obj/core/Misc.powder.exe.o deleted file mode 100644 index 2eac711..0000000 Binary files a/build/obj/core/Misc.powder.exe.o and /dev/null differ diff --git a/build/obj/core/PowderToy.powder.exe.o b/build/obj/core/PowderToy.powder.exe.o deleted file mode 100644 index 8bf89c1..0000000 Binary files a/build/obj/core/PowderToy.powder.exe.o and /dev/null differ diff --git a/build/obj/core/Renderer.powder.exe.o b/build/obj/core/Renderer.powder.exe.o deleted file mode 100644 index c0af1b2..0000000 Binary files a/build/obj/core/Renderer.powder.exe.o and /dev/null differ diff --git a/build/obj/core/Simulation.powder.exe.o b/build/obj/core/Simulation.powder.exe.o deleted file mode 100644 index 91d1729..0000000 Binary files a/build/obj/core/Simulation.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/.empty b/build/obj/elements/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/build/obj/elements/O2.powder.exe.o b/build/obj/elements/O2.powder.exe.o deleted file mode 100644 index 8b898ce..0000000 Binary files a/build/obj/elements/O2.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/acel.powder.exe.o b/build/obj/elements/acel.powder.exe.o deleted file mode 100644 index fe67a50..0000000 Binary files a/build/obj/elements/acel.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/acid.powder.exe.o b/build/obj/elements/acid.powder.exe.o deleted file mode 100644 index 64f5ba6..0000000 Binary files a/build/obj/elements/acid.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/amtr.powder.exe.o b/build/obj/elements/amtr.powder.exe.o deleted file mode 100644 index c39bbd2..0000000 Binary files a/build/obj/elements/amtr.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/anar.powder.exe.o b/build/obj/elements/anar.powder.exe.o deleted file mode 100644 index c74d1f4..0000000 Binary files a/build/obj/elements/anar.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/aray.powder.exe.o b/build/obj/elements/aray.powder.exe.o deleted file mode 100644 index 4ef850e..0000000 Binary files a/build/obj/elements/aray.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/bang.powder.exe.o b/build/obj/elements/bang.powder.exe.o deleted file mode 100644 index fd2febe..0000000 Binary files a/build/obj/elements/bang.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/bcln.powder.exe.o b/build/obj/elements/bcln.powder.exe.o deleted file mode 100644 index 428e241..0000000 Binary files a/build/obj/elements/bcln.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/bcol.powder.exe.o b/build/obj/elements/bcol.powder.exe.o deleted file mode 100644 index 0555394..0000000 Binary files a/build/obj/elements/bcol.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/bizr.powder.exe.o b/build/obj/elements/bizr.powder.exe.o deleted file mode 100644 index 0be86ad..0000000 Binary files a/build/obj/elements/bizr.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/bmtl.powder.exe.o b/build/obj/elements/bmtl.powder.exe.o deleted file mode 100644 index ab1031f..0000000 Binary files a/build/obj/elements/bmtl.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/bomb.powder.exe.o b/build/obj/elements/bomb.powder.exe.o deleted file mode 100644 index 0cbfcee..0000000 Binary files a/build/obj/elements/bomb.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/boyl.powder.exe.o b/build/obj/elements/boyl.powder.exe.o deleted file mode 100644 index 68d06cc..0000000 Binary files a/build/obj/elements/boyl.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/brmt.powder.exe.o b/build/obj/elements/brmt.powder.exe.o deleted file mode 100644 index 69e2e72..0000000 Binary files a/build/obj/elements/brmt.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/btry.powder.exe.o b/build/obj/elements/btry.powder.exe.o deleted file mode 100644 index abca955..0000000 Binary files a/build/obj/elements/btry.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/c5.powder.exe.o b/build/obj/elements/c5.powder.exe.o deleted file mode 100644 index 8a98c7b..0000000 Binary files a/build/obj/elements/c5.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/caus.powder.exe.o b/build/obj/elements/caus.powder.exe.o deleted file mode 100644 index 672ec2d..0000000 Binary files a/build/obj/elements/caus.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/cbnw.powder.exe.o b/build/obj/elements/cbnw.powder.exe.o deleted file mode 100644 index 7b2e0be..0000000 Binary files a/build/obj/elements/cbnw.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/clne.powder.exe.o b/build/obj/elements/clne.powder.exe.o deleted file mode 100644 index 9a05ad2..0000000 Binary files a/build/obj/elements/clne.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/clst.powder.exe.o b/build/obj/elements/clst.powder.exe.o deleted file mode 100644 index d815446..0000000 Binary files a/build/obj/elements/clst.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/co2.powder.exe.o b/build/obj/elements/co2.powder.exe.o deleted file mode 100644 index dfffcbc..0000000 Binary files a/build/obj/elements/co2.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/coal.powder.exe.o b/build/obj/elements/coal.powder.exe.o deleted file mode 100644 index eedd71e..0000000 Binary files a/build/obj/elements/coal.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/conv.powder.exe.o b/build/obj/elements/conv.powder.exe.o deleted file mode 100644 index 41e02a4..0000000 Binary files a/build/obj/elements/conv.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/dest.powder.exe.o b/build/obj/elements/dest.powder.exe.o deleted file mode 100644 index 36c5af9..0000000 Binary files a/build/obj/elements/dest.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/deut.powder.exe.o b/build/obj/elements/deut.powder.exe.o deleted file mode 100644 index a87fe12..0000000 Binary files a/build/obj/elements/deut.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/dlay.powder.exe.o b/build/obj/elements/dlay.powder.exe.o deleted file mode 100644 index 4b82d63..0000000 Binary files a/build/obj/elements/dlay.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/dstw.powder.exe.o b/build/obj/elements/dstw.powder.exe.o deleted file mode 100644 index f095dfd..0000000 Binary files a/build/obj/elements/dstw.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/elec.powder.exe.o b/build/obj/elements/elec.powder.exe.o deleted file mode 100644 index bb1b175..0000000 Binary files a/build/obj/elements/elec.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/elementmisc.powder.exe.o b/build/obj/elements/elementmisc.powder.exe.o deleted file mode 100644 index 00ccf05..0000000 Binary files a/build/obj/elements/elementmisc.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/emp.powder.exe.o b/build/obj/elements/emp.powder.exe.o deleted file mode 100644 index 4b05c3d..0000000 Binary files a/build/obj/elements/emp.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/figh.powder.exe.o b/build/obj/elements/figh.powder.exe.o deleted file mode 100644 index 2791d30..0000000 Binary files a/build/obj/elements/figh.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/fire.powder.exe.o b/build/obj/elements/fire.powder.exe.o deleted file mode 100644 index 61fa33a..0000000 Binary files a/build/obj/elements/fire.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/firw.powder.exe.o b/build/obj/elements/firw.powder.exe.o deleted file mode 100644 index 49952c1..0000000 Binary files a/build/obj/elements/firw.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/fog.powder.exe.o b/build/obj/elements/fog.powder.exe.o deleted file mode 100644 index 28a55ae..0000000 Binary files a/build/obj/elements/fog.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/frzw.powder.exe.o b/build/obj/elements/frzw.powder.exe.o deleted file mode 100644 index 5ef27b8..0000000 Binary files a/build/obj/elements/frzw.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/frzz.powder.exe.o b/build/obj/elements/frzz.powder.exe.o deleted file mode 100644 index f02b65e..0000000 Binary files a/build/obj/elements/frzz.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/fsep.powder.exe.o b/build/obj/elements/fsep.powder.exe.o deleted file mode 100644 index a00227a..0000000 Binary files a/build/obj/elements/fsep.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/fuse.powder.exe.o b/build/obj/elements/fuse.powder.exe.o deleted file mode 100644 index c2f2ca7..0000000 Binary files a/build/obj/elements/fuse.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/fwrk.powder.exe.o b/build/obj/elements/fwrk.powder.exe.o deleted file mode 100644 index 06b974d..0000000 Binary files a/build/obj/elements/fwrk.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/gbmb.powder.exe.o b/build/obj/elements/gbmb.powder.exe.o deleted file mode 100644 index de55e3e..0000000 Binary files a/build/obj/elements/gbmb.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/glas.powder.exe.o b/build/obj/elements/glas.powder.exe.o deleted file mode 100644 index c272d35..0000000 Binary files a/build/obj/elements/glas.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/glow.powder.exe.o b/build/obj/elements/glow.powder.exe.o deleted file mode 100644 index e1155f5..0000000 Binary files a/build/obj/elements/glow.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/goo.powder.exe.o b/build/obj/elements/goo.powder.exe.o deleted file mode 100644 index 7f88f27..0000000 Binary files a/build/obj/elements/goo.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/gpmp.powder.exe.o b/build/obj/elements/gpmp.powder.exe.o deleted file mode 100644 index 2dff2b2..0000000 Binary files a/build/obj/elements/gpmp.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/graphics_default.powder.exe.o b/build/obj/elements/graphics_default.powder.exe.o deleted file mode 100644 index 7137bfd..0000000 Binary files a/build/obj/elements/graphics_default.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/h2.powder.exe.o b/build/obj/elements/h2.powder.exe.o deleted file mode 100644 index 5d277a0..0000000 Binary files a/build/obj/elements/h2.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/hswc.powder.exe.o b/build/obj/elements/hswc.powder.exe.o deleted file mode 100644 index b5d9ef9..0000000 Binary files a/build/obj/elements/hswc.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/ice.powder.exe.o b/build/obj/elements/ice.powder.exe.o deleted file mode 100644 index 5802d05..0000000 Binary files a/build/obj/elements/ice.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/ignt.powder.exe.o b/build/obj/elements/ignt.powder.exe.o deleted file mode 100644 index fcf3e55..0000000 Binary files a/build/obj/elements/ignt.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/iron.powder.exe.o b/build/obj/elements/iron.powder.exe.o deleted file mode 100644 index 37654eb..0000000 Binary files a/build/obj/elements/iron.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/isz.powder.exe.o b/build/obj/elements/isz.powder.exe.o deleted file mode 100644 index 2a2817f..0000000 Binary files a/build/obj/elements/isz.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/lava.powder.exe.o b/build/obj/elements/lava.powder.exe.o deleted file mode 100644 index cfd929a..0000000 Binary files a/build/obj/elements/lava.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/lcry.powder.exe.o b/build/obj/elements/lcry.powder.exe.o deleted file mode 100644 index c052782..0000000 Binary files a/build/obj/elements/lcry.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/legacy.powder.exe.o b/build/obj/elements/legacy.powder.exe.o deleted file mode 100644 index 1ceb9e9..0000000 Binary files a/build/obj/elements/legacy.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/ligh.powder.exe.o b/build/obj/elements/ligh.powder.exe.o deleted file mode 100644 index 0be626d..0000000 Binary files a/build/obj/elements/ligh.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/merc.powder.exe.o b/build/obj/elements/merc.powder.exe.o deleted file mode 100644 index 424df1a..0000000 Binary files a/build/obj/elements/merc.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/mort.powder.exe.o b/build/obj/elements/mort.powder.exe.o deleted file mode 100644 index e59cb7d..0000000 Binary files a/build/obj/elements/mort.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/nbhl.powder.exe.o b/build/obj/elements/nbhl.powder.exe.o deleted file mode 100644 index a26a886..0000000 Binary files a/build/obj/elements/nbhl.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/neut.powder.exe.o b/build/obj/elements/neut.powder.exe.o deleted file mode 100644 index c57bc49..0000000 Binary files a/build/obj/elements/neut.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/newgraphics.powder.exe.o b/build/obj/elements/newgraphics.powder.exe.o deleted file mode 100644 index 323ce79..0000000 Binary files a/build/obj/elements/newgraphics.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/none.powder.exe.o b/build/obj/elements/none.powder.exe.o deleted file mode 100644 index 532e45c..0000000 Binary files a/build/obj/elements/none.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/nptct.powder.exe.o b/build/obj/elements/nptct.powder.exe.o deleted file mode 100644 index 59f7364..0000000 Binary files a/build/obj/elements/nptct.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/nwhl.powder.exe.o b/build/obj/elements/nwhl.powder.exe.o deleted file mode 100644 index 52b8ba6..0000000 Binary files a/build/obj/elements/nwhl.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/pbcn.powder.exe.o b/build/obj/elements/pbcn.powder.exe.o deleted file mode 100644 index 8c4ed04..0000000 Binary files a/build/obj/elements/pbcn.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/pcln.powder.exe.o b/build/obj/elements/pcln.powder.exe.o deleted file mode 100644 index 2c249b2..0000000 Binary files a/build/obj/elements/pcln.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/phot.powder.exe.o b/build/obj/elements/phot.powder.exe.o deleted file mode 100644 index c351d15..0000000 Binary files a/build/obj/elements/phot.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/pipe.powder.exe.o b/build/obj/elements/pipe.powder.exe.o deleted file mode 100644 index ab908dd..0000000 Binary files a/build/obj/elements/pipe.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/plnt.powder.exe.o b/build/obj/elements/plnt.powder.exe.o deleted file mode 100644 index 6f4e94a..0000000 Binary files a/build/obj/elements/plnt.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/plsm.powder.exe.o b/build/obj/elements/plsm.powder.exe.o deleted file mode 100644 index 0c6065b..0000000 Binary files a/build/obj/elements/plsm.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/plut.powder.exe.o b/build/obj/elements/plut.powder.exe.o deleted file mode 100644 index af9e9a1..0000000 Binary files a/build/obj/elements/plut.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/prti.powder.exe.o b/build/obj/elements/prti.powder.exe.o deleted file mode 100644 index 5c915f9..0000000 Binary files a/build/obj/elements/prti.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/prto.powder.exe.o b/build/obj/elements/prto.powder.exe.o deleted file mode 100644 index ff3e595..0000000 Binary files a/build/obj/elements/prto.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/pump.powder.exe.o b/build/obj/elements/pump.powder.exe.o deleted file mode 100644 index 3399a80..0000000 Binary files a/build/obj/elements/pump.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/pvod.powder.exe.o b/build/obj/elements/pvod.powder.exe.o deleted file mode 100644 index 24c9f8c..0000000 Binary files a/build/obj/elements/pvod.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/pyro.powder.exe.o b/build/obj/elements/pyro.powder.exe.o deleted file mode 100644 index d685a7a..0000000 Binary files a/build/obj/elements/pyro.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/qrtz.powder.exe.o b/build/obj/elements/qrtz.powder.exe.o deleted file mode 100644 index 013439c..0000000 Binary files a/build/obj/elements/qrtz.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/rime.powder.exe.o b/build/obj/elements/rime.powder.exe.o deleted file mode 100644 index 0419eb1..0000000 Binary files a/build/obj/elements/rime.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/shld.powder.exe.o b/build/obj/elements/shld.powder.exe.o deleted file mode 100644 index d8a9d1e..0000000 Binary files a/build/obj/elements/shld.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/sing.powder.exe.o b/build/obj/elements/sing.powder.exe.o deleted file mode 100644 index fa2b314..0000000 Binary files a/build/obj/elements/sing.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/sltw.powder.exe.o b/build/obj/elements/sltw.powder.exe.o deleted file mode 100644 index 8b26948..0000000 Binary files a/build/obj/elements/sltw.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/smke.powder.exe.o b/build/obj/elements/smke.powder.exe.o deleted file mode 100644 index 4d0f886..0000000 Binary files a/build/obj/elements/smke.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/soap.powder.exe.o b/build/obj/elements/soap.powder.exe.o deleted file mode 100644 index 6ebe797..0000000 Binary files a/build/obj/elements/soap.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/spng.powder.exe.o b/build/obj/elements/spng.powder.exe.o deleted file mode 100644 index 88a9263..0000000 Binary files a/build/obj/elements/spng.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/sprk.powder.exe.o b/build/obj/elements/sprk.powder.exe.o deleted file mode 100644 index bbc39a6..0000000 Binary files a/build/obj/elements/sprk.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/stkm.powder.exe.o b/build/obj/elements/stkm.powder.exe.o deleted file mode 100644 index 660ad89..0000000 Binary files a/build/obj/elements/stkm.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/stkm2.powder.exe.o b/build/obj/elements/stkm2.powder.exe.o deleted file mode 100644 index 98701ba..0000000 Binary files a/build/obj/elements/stkm2.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/stor.powder.exe.o b/build/obj/elements/stor.powder.exe.o deleted file mode 100644 index db5d620..0000000 Binary files a/build/obj/elements/stor.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/swch.powder.exe.o b/build/obj/elements/swch.powder.exe.o deleted file mode 100644 index d31ce3d..0000000 Binary files a/build/obj/elements/swch.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/thdr.powder.exe.o b/build/obj/elements/thdr.powder.exe.o deleted file mode 100644 index 964258b..0000000 Binary files a/build/obj/elements/thdr.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/thrm.powder.exe.o b/build/obj/elements/thrm.powder.exe.o deleted file mode 100644 index a864a91..0000000 Binary files a/build/obj/elements/thrm.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/uran.powder.exe.o b/build/obj/elements/uran.powder.exe.o deleted file mode 100644 index d47932d..0000000 Binary files a/build/obj/elements/uran.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/vine.powder.exe.o b/build/obj/elements/vine.powder.exe.o deleted file mode 100644 index c4d23fc..0000000 Binary files a/build/obj/elements/vine.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/warp.powder.exe.o b/build/obj/elements/warp.powder.exe.o deleted file mode 100644 index ba61bcc..0000000 Binary files a/build/obj/elements/warp.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/watr.powder.exe.o b/build/obj/elements/watr.powder.exe.o deleted file mode 100644 index e255680..0000000 Binary files a/build/obj/elements/watr.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/wifi.powder.exe.o b/build/obj/elements/wifi.powder.exe.o deleted file mode 100644 index 6f2cc7a..0000000 Binary files a/build/obj/elements/wifi.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/wire.powder.exe.o b/build/obj/elements/wire.powder.exe.o deleted file mode 100644 index 29051ec..0000000 Binary files a/build/obj/elements/wire.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/wtrv.powder.exe.o b/build/obj/elements/wtrv.powder.exe.o deleted file mode 100644 index f1e7e08..0000000 Binary files a/build/obj/elements/wtrv.powder.exe.o and /dev/null differ diff --git a/build/obj/elements/yest.powder.exe.o b/build/obj/elements/yest.powder.exe.o deleted file mode 100644 index 399c2a3..0000000 Binary files a/build/obj/elements/yest.powder.exe.o and /dev/null differ diff --git a/build/obj/ui/.empty b/build/obj/ui/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/build/obj/ui/Button.powder.exe.o b/build/obj/ui/Button.powder.exe.o deleted file mode 100644 index e0a85bb..0000000 Binary files a/build/obj/ui/Button.powder.exe.o and /dev/null differ diff --git a/build/obj/ui/Component.powder.exe.o b/build/obj/ui/Component.powder.exe.o deleted file mode 100644 index ea9e192..0000000 Binary files a/build/obj/ui/Component.powder.exe.o and /dev/null differ diff --git a/build/obj/ui/Panel.powder.exe.o b/build/obj/ui/Panel.powder.exe.o deleted file mode 100644 index cec5084..0000000 Binary files a/build/obj/ui/Panel.powder.exe.o and /dev/null differ diff --git a/build/obj/ui/Sandbox.powder.exe.o b/build/obj/ui/Sandbox.powder.exe.o deleted file mode 100644 index f50bd5d..0000000 Binary files a/build/obj/ui/Sandbox.powder.exe.o and /dev/null differ diff --git a/build/obj/ui/State.powder.exe.o b/build/obj/ui/State.powder.exe.o deleted file mode 100644 index 4572157..0000000 Binary files a/build/obj/ui/State.powder.exe.o and /dev/null differ diff --git a/build/obj/ui/Window.powder.exe.o b/build/obj/ui/Window.powder.exe.o deleted file mode 100644 index 2daad32..0000000 Binary files a/build/obj/ui/Window.powder.exe.o and /dev/null differ diff --git a/build/powder.exe b/build/powder.exe deleted file mode 100644 index d9e07ce..0000000 Binary files a/build/powder.exe and /dev/null differ -- cgit v0.9.2-21-gd62e From 0bb8538cefd86b0d50a6ee15cd1768c92c62869a Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 8 Jan 2012 18:24:39 +0000 Subject: Build folder structure diff --git a/build/obj/core/.empty b/build/obj/core/.empty new file mode 100644 index 0000000..e69de29 diff --git a/build/obj/elements/.empty b/build/obj/elements/.empty new file mode 100644 index 0000000..e69de29 diff --git a/build/obj/ui/.empty b/build/obj/ui/.empty new file mode 100644 index 0000000..e69de29 -- cgit v0.9.2-21-gd62e From d31d290bf9205999e7a849e5974241f2fd615259 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 10 Jan 2012 22:16:42 +0000 Subject: Gitignore, Updated makefile and QT Creator project diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd12740 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.o +*.exe +*.user +*.dll +*.a +*.la \ No newline at end of file diff --git a/Makefile b/Makefile index 65a9605..c6373f3 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,9 @@ CPPC := g++ CPPC_WIN := i686-w64-mingw32-gcc WIN_RES := i686-w64-mingw32-windres +all: build/powder.exe +powder.exe: build/powder.exe + build/powder.exe: $(EL_PREREQ) $(CORE_PREREQ) $(UI_PREREQ) $(CPPC) $(CFLAGS) $(LDFLAGS) $(EXTRA_OBJS) $(EL_PREREQ) $(CORE_PREREQ) $(UI_PREREQ) $(LFLAGS) -o $@ -ggdb build/obj/ui/%.powder.exe.o: src/interface/%.cpp $(HEADERS) diff --git a/PowderToy++.config b/PowderToy++.config new file mode 100644 index 0000000..8cec188 --- /dev/null +++ b/PowderToy++.config @@ -0,0 +1 @@ +// ADD PREDEFINED MACROS HERE! diff --git a/PowderToy++.creator b/PowderToy++.creator new file mode 100644 index 0000000..e94cbbd --- /dev/null +++ b/PowderToy++.creator @@ -0,0 +1 @@ +[General] diff --git a/PowderToy++.files b/PowderToy++.files new file mode 100644 index 0000000..0827b34 --- /dev/null +++ b/PowderToy++.files @@ -0,0 +1,135 @@ +C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/font.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/hmap.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/icon.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/icondoc.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/images.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/Shaders.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/acel.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/acid.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/amtr.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/anar.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/aray.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bang.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bcln.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bcol.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bizr.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bmtl.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bomb.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/boyl.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/brmt.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/btry.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/c5.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/caus.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/cbnw.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/clne.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/clst.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/co2.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/coal.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/conv.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/dest.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/deut.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/dlay.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/dstw.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/elec.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/elementmisc.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/emp.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/figh.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/fire.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/firw.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/fog.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/frzw.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/frzz.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/fsep.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/fuse.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/fwrk.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/gbmb.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/glas.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/glow.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/goo.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/gpmp.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/graphics_default.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/h2.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/hswc.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/ice.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/ignt.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/iron.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/isz.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/lava.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/lcry.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/legacy.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/ligh.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/merc.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/mort.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/nbhl.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/neut.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/newgraphics.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/none.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/nptct.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/nwhl.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/O2.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pbcn.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pcln.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/phot.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pipe.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/plnt.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/plsm.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/plut.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/prti.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/prto.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pump.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pvod.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pyro.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/qrtz.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/rime.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/shld.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/sing.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/sltw.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/smke.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/soap.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/spng.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/sprk.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/stkm.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/stkm2.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/stor.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/swch.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/thdr.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/thrm.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/uran.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/vine.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/warp.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/watr.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/wifi.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/wire.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/wtrv.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/yest.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/Button.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/Component.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/Panel.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/Sandbox.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/State.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/Window.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Air.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Config.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Element.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/ElementFunctions.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/ElementGraphics.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Elements.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Graphics.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Gravity.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Misc.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Renderer.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Simulation.h +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Button.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Component.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Panel.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Sandbox.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/State.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Window.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Air.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Graphics.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Gravity.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Misc.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/PowderToy.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Renderer.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Simulation.cpp +C:/Users/Simon/Projects/FacialTurd-PowderToypp/Changelog.txt \ No newline at end of file diff --git a/PowderToy++.includes b/PowderToy++.includes new file mode 100644 index 0000000..5f65989 --- /dev/null +++ b/PowderToy++.includes @@ -0,0 +1,3 @@ +C:/Users/Simon/Projects/FacialTurd-PowderToypp/data +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes +C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface \ No newline at end of file -- cgit v0.9.2-21-gd62e From 2eb09c1daac8199532694167f418146fa57e7735 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 10 Jan 2012 23:18:37 +0000 Subject: Project changed, ControlFactory (Creates large UI structures such as menus, dialoges...) GameSession (Session information, such as filename, reference to simulation diff --git a/PowderToy++.files b/PowderToy++.files index 0827b34..a6f35ab 100644 --- a/PowderToy++.files +++ b/PowderToy++.files @@ -132,4 +132,8 @@ C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Misc.cpp C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/PowderToy.cpp C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Renderer.cpp C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Simulation.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/Changelog.txt \ No newline at end of file +C:/Users/Simon/Projects/FacialTurd-PowderToypp/Changelog.txt +src/interface/ControlFactory.cpp +includes/interface/ControlFactory.h +src/GameSession.cpp +includes/GameSession.h diff --git a/includes/GameSession.h b/includes/GameSession.h new file mode 100644 index 0000000..8417e0c --- /dev/null +++ b/includes/GameSession.h @@ -0,0 +1,10 @@ +#ifndef GAMESESSION_H +#define GAMESESSION_H + +class GameSession +{ +public: + GameSession(); +}; + +#endif // GAMESESSION_H diff --git a/includes/interface/ControlFactory.h b/includes/interface/ControlFactory.h new file mode 100644 index 0000000..8bfd780 --- /dev/null +++ b/includes/interface/ControlFactory.h @@ -0,0 +1,15 @@ +#ifndef CONTROLFACTORY_H +#define CONTROLFACTORY_H + +#include "Panel.h" +#include "Window.h" +#include "GameSession.h" + +class ControlFactory +{ +public: + static ui::Panel * MainMenu(GameSession * session, int x, int y, int width, int height); + +}; + +#endif // CONTROLFACTORY_H diff --git a/src/GameSession.cpp b/src/GameSession.cpp new file mode 100644 index 0000000..364f268 --- /dev/null +++ b/src/GameSession.cpp @@ -0,0 +1,6 @@ +#include "GameSession.h" + +GameSession::GameSession() +{ + //Boop +} diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index d634cce..973aaa3 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -10,6 +10,9 @@ #include "interface/Window.h" #include "interface/Button.h" #include "interface/Sandbox.h" +#include "interface/Panel.h" +#include "interface/ControlFactory.h" +#include "GameSession.h" SDL_Surface * SDLOpen() { @@ -45,11 +48,13 @@ int main(int argc, char * argv[]) //Simulation * sim = new Simulation(); //ren = new Renderer(g, sim); + GameSession * gameSession = new GameSession(); ui::Window * window = new ui::Window(); ui::Sandbox * sandbox = new ui::Sandbox(); ui::Button * button = new ui::Button(100, 100, 100, 100, "poP"); window->Add(sandbox); window->Add(button); + window->Add(ControlFactory::MainMenu(gameSession, 0, 0, 200, 200)); SDL_Event event; while(!SDLPoll(&event)) diff --git a/src/interface/ControlFactory.cpp b/src/interface/ControlFactory.cpp new file mode 100644 index 0000000..300ceba --- /dev/null +++ b/src/interface/ControlFactory.cpp @@ -0,0 +1,11 @@ +#include "interface/ControlFactory.h" +#include "interface/Button.h" +#include "interface/Panel.h" +#include "interface/Window.h" + +ui::Panel * ControlFactory::MainMenu(GameSession * session, int x, int y, int width, int height) +{ + ui::Panel * mainMenu = new ui::Panel(x, y, width, height); + //mainMenu->Add(new ui::Button(0, 0, 20, 20, "Turd")); + return mainMenu; +} -- cgit v0.9.2-21-gd62e From fc2f52099c0bbb2412046252bf7b5e4113bbe8e4 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 11 Jan 2012 22:59:45 +0000 Subject: More stuff, started console diff --git a/PowderToy++.files b/PowderToy++.files index a6f35ab..62d6e2a 100644 --- a/PowderToy++.files +++ b/PowderToy++.files @@ -137,3 +137,5 @@ src/interface/ControlFactory.cpp includes/interface/ControlFactory.h src/GameSession.cpp includes/GameSession.h +src/Console.cpp +includes/Console.h diff --git a/includes/Console.h b/includes/Console.h new file mode 100644 index 0000000..806c4db --- /dev/null +++ b/includes/Console.h @@ -0,0 +1,44 @@ +#ifndef CONSOLE_H +#define CONSOLE_H + +#include +#include + +#include "interface/Sandbox.h" +#include "Simulation.h" + +class ConsoleCommand +{ +private: + std::string * command; + int returnStatus; + std::string * error; +public: + void SetCommand(std::string * command); + void SetError(std::string * error); + std::string * GetCommand(); + std::string * GetError(); + ConsoleCommand(); + ConsoleCommand(std::string * command, int returnStatus, std::string * error = new std::string("")); +}; + +class Console +{ +private: + std::vector * previousCommands; + std::string * lastError; + ui::Sandbox * sandbox; + Simulation * sim; +public: + virtual void Tick(float * dt); + int ParseType(std::string * type); + virtual void ConsoleShown(); + virtual void ConsoleHidden(); + virtual int ProcessCommand(std::string * command); + virtual std::string * GetLastError(); + virtual std::vector * GetPreviousCommands(); + Console(ui::Sandbox * sandbox); + virtual ~Console(); +}; + +#endif // CONSOLE_H diff --git a/includes/interface/Sandbox.h b/includes/interface/Sandbox.h index 10d588f..32a0471 100644 --- a/includes/interface/Sandbox.h +++ b/includes/interface/Sandbox.h @@ -16,11 +16,14 @@ namespace ui { class Sandbox: public ui::Component { private: + int lastCoordX, lastCoordY; + int activeElement; bool isMouseDown; Renderer * ren; Simulation * sim; public: Sandbox(); + virtual Simulation * GetSimulation(); virtual void OnMouseMovedInside(int localx, int localy, int dx, int dy); virtual void OnMouseDown(int localx, int localy, unsigned int button); virtual void OnMouseUp(int localx, int localy, unsigned int button); diff --git a/src/Console.cpp b/src/Console.cpp new file mode 100644 index 0000000..6bf8ce6 --- /dev/null +++ b/src/Console.cpp @@ -0,0 +1,68 @@ + +#include +#include "Console.h" + +int Console::ParseType(std::string * type) +{ + char * txt = (char *)type->c_str(); + int i = -1; + // alternative names for some elements + if (*type == "C4") i = PT_PLEX; + else if (*type == "C5") i = PT_C5; + else if (*type == "NONE") i = PT_NONE; + if (i>=0 && iptypes[i].enabled) + { + (*lastError) = ""; + return i; + } + for (i=1; iptypes[i].name)==0 && sim->ptypes[i].enabled) + { + (*lastError) = ""; + return i; + } + } + (*lastError) = "Particle type not recognised"; + return -1; +} + +void Console::Tick(float * dt) +{ + +} + +void Console::ConsoleShown() +{ + +} + +void Console::ConsoleHidden() +{ + +} + +int Console::ProcessCommand(std::string * command) +{ + +} + +std::string * Console::GetLastError() +{ + return lastError; +} + +std::vector * Console::GetPreviousCommands() +{ + +} + +Console::Console(ui::Sandbox * sandbox) +{ + this->sandbox = sandbox; + sim = sandbox->GetSimulation(); +} + +Console::~Console() +{ + +} diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 973aaa3..49dac73 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -54,12 +54,12 @@ int main(int argc, char * argv[]) ui::Button * button = new ui::Button(100, 100, 100, 100, "poP"); window->Add(sandbox); window->Add(button); - window->Add(ControlFactory::MainMenu(gameSession, 0, 0, 200, 200)); + //window->Add(ControlFactory::MainMenu(gameSession, 0, 0, 200, 200)); SDL_Event event; while(!SDLPoll(&event)) { - mouseButton = SDL_GetMouseState(&mouseX, &mouseY); + //mouseButton = SDL_GetMouseState(&mouseX, &mouseY); switch(event.type) { case SDL_KEYDOWN: diff --git a/src/Renderer.cpp b/src/Renderer.cpp index c1bbf3c..67f9348 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -489,9 +489,14 @@ void Renderer::render_parts() int deca, decr, decg, decb, cola, colr, colg, colb, firea, firer, fireg, fireb, pixel_mode, q, i, t, nx, ny, x, y, caddress; int orbd[4] = {0, 0, 0, 0}, orbl[4] = {0, 0, 0, 0}; float gradv, flicker, fnx, fny; - Particle * parts = sim->parts; - part_transition *ptransitions = sim->ptransitions; - part_type *ptypes = sim->ptypes; + Particle * parts; + part_transition *ptransitions; + part_type *ptypes; + if(!sim) + return; + parts = sim->parts; + ptransitions = sim->ptransitions; + ptypes = sim->ptypes; #ifdef OGLR int cfireV = 0, cfireC = 0, cfire = 0; int csmokeV = 0, csmokeC = 0, csmoke = 0; @@ -1670,7 +1675,9 @@ void Renderer::init_display_modes() } } -Renderer::Renderer(Graphics * g, Simulation * sim) +Renderer::Renderer(Graphics * g, Simulation * sim): + sim(NULL), + g(NULL) { this->g = g; this->sim = sim; diff --git a/src/Simulation.cpp b/src/Simulation.cpp index 7ec5c4e..a1a785a 100644 --- a/src/Simulation.cpp +++ b/src/Simulation.cpp @@ -3119,6 +3119,8 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu pthread_t *InterThreads; #endif + air->update_air(); + memset(pmap, 0, sizeof(pmap)); memset(photons, 0, sizeof(photons)); NUM_PARTS = 0; diff --git a/src/interface/Sandbox.cpp b/src/interface/Sandbox.cpp index c33571a..5e29bae 100644 --- a/src/interface/Sandbox.cpp +++ b/src/interface/Sandbox.cpp @@ -5,35 +5,54 @@ * Author: Simon */ +#include + #include "Config.h" #include "interface/Sandbox.h" #include "interface/Component.h" #include "Renderer.h" +#include "Simulation.h" namespace ui { Sandbox::Sandbox(): - Component(0, 0, XRES, YRES) + Component(0, 0, XRES, YRES), + ren(NULL), + isMouseDown(false), + activeElement(1) { sim = new Simulation(); } +Simulation * Sandbox::GetSimulation() +{ + return sim; +} + void Sandbox::OnMouseMovedInside(int localx, int localy, int dx, int dy) { if(isMouseDown) { - sim->create_parts(localx, localy, 20, 20, 1, 0); + sim->create_line(lastCoordX, lastCoordY, localx, localy, 2, 2, activeElement, 0); + lastCoordX = localx; + lastCoordY = localy; } } void Sandbox::OnMouseDown(int localx, int localy, unsigned int button) { + sim->create_line(localx, localy, localx, localy, 2, 2, activeElement, 0); + lastCoordX = localx; + lastCoordY = localy; isMouseDown = true; } void Sandbox::OnMouseUp(int localx, int localy, unsigned int button) { + sim->create_line(lastCoordX, lastCoordY, localx, localy, 2, 2, activeElement, 0); + lastCoordX = localx; + lastCoordY = localy; isMouseDown = false; } diff --git a/src/interface/State.cpp b/src/interface/State.cpp index e069e8f..2828751 100644 --- a/src/interface/State.cpp +++ b/src/interface/State.cpp @@ -13,13 +13,14 @@ namespace ui { -State::State(int w, int h) : - mouseX(0), - mouseY(0), - mouseXP(0), - mouseYP(0), - width(w), - height(h) +State::State(int w, int h): + mouseX(0), + mouseY(0), + mouseXP(0), + mouseYP(0), + width(w), + height(h), + Components() { } -- cgit v0.9.2-21-gd62e From 2c9295007a287dc01ff63fcf7b3da141f7474e37 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 14 Jan 2012 18:51:24 +0000 Subject: Various things, also IEF UI diff --git a/Makefile b/Makefile index c6373f3..4e345b4 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,8 @@ UI_SOURCES := $(wildcard src/interface/*.cpp) UI_OBJS := $(patsubst src/interface/%.cpp,build/obj/ui/%.o,$(UI_SOURCES)) UI_PREREQ := $(patsubst build/obj/ui/%.o,build/obj/ui/%.powder.exe.o,$(UI_OBJS)) -CFLAGS := -Iincludes/ -Idata/ -DWIN32 -OFLAGS := -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -fkeep-inline-functions +CFLAGS := -Iincludes/ -Idata/ -DWIN32 -DWINCONSOLE +OFLAGS := #-O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -fkeep-inline-functions LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 # -mwindows CFLAGS += $(OFLAGS) diff --git a/PowderToy++.files b/PowderToy++.files index 62d6e2a..f4bdd2f 100644 --- a/PowderToy++.files +++ b/PowderToy++.files @@ -124,7 +124,6 @@ C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Component.cpp C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Panel.cpp C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Sandbox.cpp C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/State.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Window.cpp C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Air.cpp C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Graphics.cpp C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Gravity.cpp @@ -139,3 +138,16 @@ src/GameSession.cpp includes/GameSession.h src/Console.cpp includes/Console.h +includes/interface/Engine.h +includes/interface/Platform.h +src/interface/State.cpp +src/interface/Sandbox.cpp +src/interface/Panel.cpp +src/interface/Engine.cpp +src/interface/ControlFactory.cpp +src/interface/Component.cpp +src/interface/Button.cpp +includes/interface/Point.h +includes/Singleton.h +src/interface/Label.cpp +includes/interface/Label.h diff --git a/includes/Console.h b/includes/Console.h index 806c4db..657f935 100644 --- a/includes/Console.h +++ b/includes/Console.h @@ -12,29 +12,33 @@ class ConsoleCommand private: std::string * command; int returnStatus; - std::string * error; + std::string * returnString; public: void SetCommand(std::string * command); void SetError(std::string * error); std::string * GetCommand(); std::string * GetError(); ConsoleCommand(); - ConsoleCommand(std::string * command, int returnStatus, std::string * error = new std::string("")); + ConsoleCommand(std::string * command, int returnStatus, std::string * returnString = new std::string("")); }; class Console { private: + bool sound_enable; + bool file_script; std::vector * previousCommands; std::string * lastError; ui::Sandbox * sandbox; Simulation * sim; public: virtual void Tick(float * dt); - int ParseType(std::string * type); + int ParseType(char * txt); + int ParsePartref(char * txt); + int ParseCoords(char * coords, int *x, int *y); virtual void ConsoleShown(); virtual void ConsoleHidden(); - virtual int ProcessCommand(std::string * command); + virtual int ProcessCommand(char * console); virtual std::string * GetLastError(); virtual std::vector * GetPreviousCommands(); Console(ui::Sandbox * sandbox); diff --git a/includes/Singleton.h b/includes/Singleton.h new file mode 100644 index 0000000..6b2214e --- /dev/null +++ b/includes/Singleton.h @@ -0,0 +1,16 @@ +#ifndef SINGLETON_H +#define SINGLETON_H + +template + +class Singleton +{ +public: + static T& Ref() + { + static T instance; + return instance; + } +}; + +#endif // SINGLETON_H diff --git a/includes/interface.old/Button.h b/includes/interface.old/Button.h new file mode 100644 index 0000000..1b2900e --- /dev/null +++ b/includes/interface.old/Button.h @@ -0,0 +1,42 @@ +/* + * Button.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef BUTTON_H_ +#define BUTTON_H_ + +#include + +#include "Component.h" + +namespace ui +{ + class Button : public Component + { + public: + Button(int x, int y, int width, int height, const std::string& buttonText); + + bool Toggleable; + + std::string ButtonText; + + virtual void OnMouseClick(int x, int y, unsigned int button); + virtual void OnMouseUnclick(int x, int y, unsigned int button); + virtual void OnMouseUp(int x, int y, unsigned int button); + + virtual void OnMouseEnter(int x, int y, int dx, int dy); + virtual void OnMouseLeave(int x, int y, int dx, int dy); + + virtual void Draw(void* userdata); + + inline bool GetState() { return state; } + virtual void DoAction(); //action of button what ever it may be + + protected: + bool isButtonDown, state, isMouseInside; + }; +} +#endif /* BUTTON_H_ */ diff --git a/includes/interface.old/Component.h b/includes/interface.old/Component.h new file mode 100644 index 0000000..a4d02db --- /dev/null +++ b/includes/interface.old/Component.h @@ -0,0 +1,53 @@ +/* + * Component.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef COMPONENT_H_ +#define COMPONENT_H_ + +namespace ui +{ + class State; + + class Component + { + public: + Component(int x, int y, int width, int height); + virtual ~Component(); + + inline void LocalizePoint(int& x, int& y) { x -= X; y -= Y; } //convert a global point (point on the state) to a point based on component's position + inline void GlobalizePoint(int& x, int& y) { x += X; y += Y; } //convert a local point based on component's position to a global point on the state + + bool Focused; + bool Visible; + bool Enabled; + int Width; + int Height; + int X; + int Y; + + virtual void Tick(float dt); + virtual void Draw(void* userdata); + + virtual void OnMouseEnter(int localx, int localy, int dx, int dy); + virtual void OnMouseLeave(int localx, int localy, int dx, int dy); + virtual void OnMouseMoved(int localx, int localy, int dx, int dy); + virtual void OnMouseMovedInside(int localx, int localy, int dx, int dy); + virtual void OnMouseHover(int localx, int localy); + virtual void OnMouseDown(int localx, int localy, unsigned int button); + virtual void OnMouseUp(int localx, int localy, unsigned int button); + virtual void OnMouseClick(int localx, int localy, unsigned int button); + virtual void OnMouseUnclick(int localx, int localy, unsigned int button); + virtual void OnMouseWheel(int localx, int localy, int d); + virtual void OnMouseWheelInside(int localx, int localy, int d); + virtual void OnMouseWheelFocused(int localx, int localy, int d); + virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + + State* Parent; + }; +} +#endif /* COMPONENT_H_ */ diff --git a/includes/interface.old/ControlFactory.h b/includes/interface.old/ControlFactory.h new file mode 100644 index 0000000..8bfd780 --- /dev/null +++ b/includes/interface.old/ControlFactory.h @@ -0,0 +1,15 @@ +#ifndef CONTROLFACTORY_H +#define CONTROLFACTORY_H + +#include "Panel.h" +#include "Window.h" +#include "GameSession.h" + +class ControlFactory +{ +public: + static ui::Panel * MainMenu(GameSession * session, int x, int y, int width, int height); + +}; + +#endif // CONTROLFACTORY_H diff --git a/includes/interface.old/Panel.h b/includes/interface.old/Panel.h new file mode 100644 index 0000000..9549ff4 --- /dev/null +++ b/includes/interface.old/Panel.h @@ -0,0 +1,22 @@ +/* + * Panel.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef PANEL_H_ +#define PANEL_H_ + +#include "interface/Component.h" + +namespace ui { + +class Panel: public ui::Component { +public: + Panel(int x, int y, int width, int height); + virtual ~Panel(); +}; + +} /* namespace ui */ +#endif /* PANEL_H_ */ diff --git a/includes/interface.old/Sandbox.h b/includes/interface.old/Sandbox.h new file mode 100644 index 0000000..32a0471 --- /dev/null +++ b/includes/interface.old/Sandbox.h @@ -0,0 +1,36 @@ +/* + * Sandbox.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef SANDBOX_H_ +#define SANDBOX_H_ + +#include "Component.h" +#include "Simulation.h" +#include "Renderer.h" + +namespace ui { + +class Sandbox: public ui::Component { +private: + int lastCoordX, lastCoordY; + int activeElement; + bool isMouseDown; + Renderer * ren; + Simulation * sim; +public: + Sandbox(); + virtual Simulation * GetSimulation(); + virtual void OnMouseMovedInside(int localx, int localy, int dx, int dy); + virtual void OnMouseDown(int localx, int localy, unsigned int button); + virtual void OnMouseUp(int localx, int localy, unsigned int button); + virtual void Draw(void* userdata); + virtual void Tick(float delta); + virtual ~Sandbox(); +}; + +} /* namespace ui */ +#endif /* SANDBOX_H_ */ diff --git a/includes/interface.old/State.h b/includes/interface.old/State.h new file mode 100644 index 0000000..00df199 --- /dev/null +++ b/includes/interface.old/State.h @@ -0,0 +1,61 @@ +/* + * State.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef STATE_H_ +#define STATE_H_ + +#include + +#include "interface/Component.h" + +namespace ui { + +class State +{ +public: + State(int w, int h); + virtual ~State(); + + bool AllowExclusiveDrawing; //false will not call draw on objects outside of bounds + + virtual void Tick(float dt); + virtual void Draw(void* userdata); + + virtual void OnMouseMove(int x, int y); + virtual void OnMouseDown(int x, int y, unsigned int button); + virtual void OnMouseUp(int x, int y, unsigned int button); + virtual void OnMouseWheel(int x, int y, int d); + virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + + virtual void Add(Component *child); + virtual void Remove(Component *child); + + inline bool IsFocused(Component* c) { return (c == focusedComponent_); } + inline int GetMouseX() { return mouseX; } + inline int GetMouseY() { return mouseY; } + inline int GetWidth() { return width; } + inline int GetHeight() { return height; } + +protected: + std::vector Components; + + int width; + int height; + + int mouseX; + int mouseY; + int mouseXP; + int mouseYP; + +private: + Component* focusedComponent_; + +}; + +} /* namespace ui */ +#endif /* STATE_H_ */ diff --git a/includes/interface.old/Window.h b/includes/interface.old/Window.h new file mode 100644 index 0000000..86a4bcd --- /dev/null +++ b/includes/interface.old/Window.h @@ -0,0 +1,22 @@ +/* + * Window.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef WINDOW_H_ +#define WINDOW_H_ + +#include "interface/State.h" + +namespace ui { + +class Window: public ui::State { +public: + Window(); + virtual ~Window(); +}; + +} /* namespace ui */ +#endif /* WINDOW_H_ */ diff --git a/includes/interface/Button.h b/includes/interface/Button.h index 1b2900e..86688cf 100644 --- a/includes/interface/Button.h +++ b/includes/interface/Button.h @@ -17,7 +17,12 @@ namespace ui class Button : public Component { public: - Button(int x, int y, int width, int height, const std::string& buttonText); + Button(State* parent_state, std::string buttonText); + + Button(Point position, Point size, std::string buttonText); + + Button(std::string buttonText); + virtual ~Button(); bool Toggleable; @@ -25,12 +30,12 @@ namespace ui virtual void OnMouseClick(int x, int y, unsigned int button); virtual void OnMouseUnclick(int x, int y, unsigned int button); - virtual void OnMouseUp(int x, int y, unsigned int button); + //virtual void OnMouseUp(int x, int y, unsigned int button); - virtual void OnMouseEnter(int x, int y, int dx, int dy); - virtual void OnMouseLeave(int x, int y, int dx, int dy); + virtual void OnMouseEnter(int x, int y); + virtual void OnMouseLeave(int x, int y); - virtual void Draw(void* userdata); + virtual void Draw(const Point& screenPos); inline bool GetState() { return state; } virtual void DoAction(); //action of button what ever it may be diff --git a/includes/interface/Component.h b/includes/interface/Component.h index a4d02db..5759c08 100644 --- a/includes/interface/Component.h +++ b/includes/interface/Component.h @@ -1,53 +1,204 @@ -/* - * Component.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ +#pragma once -#ifndef COMPONENT_H_ -#define COMPONENT_H_ +#include "Point.h" +#include "State.h" +#include "Platform.h" namespace ui { - class State; - - class Component + class State; + class Panel; + + /* class Component + * + * An interactive UI component that can be added to a state or an XComponent*. + * *See sys::XComponent + */ + class Component { public: - Component(int x, int y, int width, int height); + Component(State* parent_state); + Component(Point position, Point size); + Component(); virtual ~Component(); + + void* UserData; + inline State* const GetParentState() const { return parentstate_; } + bool IsFocused() const; - inline void LocalizePoint(int& x, int& y) { x -= X; y -= Y; } //convert a global point (point on the state) to a point based on component's position - inline void GlobalizePoint(int& x, int& y) { x += X; y += Y; } //convert a local point based on component's position to a global point on the state - - bool Focused; + Point Position; + Point Size; + bool Locked; bool Visible; - bool Enabled; - int Width; - int Height; - int X; - int Y; - virtual void Tick(float dt); - virtual void Draw(void* userdata); + /* See the parent of this component. + * If new_parent is NULL, this component will have no parent. (THIS DOES NOT delete THE COMPONENT. See XComponent::RemoveChild) + */ + void SetParentState(State* state); + void SetParent(Panel* new_parent); + + //Get the parent component. + inline Panel* const GetParent() const { return _parent; } + + //UI functions: + /* + void Tick(float dt); + void Draw(const Point& screenPos); + + void OnMouseHover(int localx, int localy); + void OnMouseMoved(int localx, int localy, int dx, int dy); + void OnMouseMovedInside(int localx, int localy, int dx, int dy); + void OnMouseEnter(int localx, int localy); + void OnMouseLeave(int localx, int localy); + void OnMouseDown(int x, int y, unsigned int button); + void OnMouseUp(int x, int y, unsigned int button); + void OnMouseClick(int localx, int localy, unsigned int button); + void OnMouseUnclick(int localx, int localy, unsigned int button); + void OnMouseWheel(int localx, int localy, int d); + void OnMouseWheelInside(int localx, int localy, int d); + void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + */ - virtual void OnMouseEnter(int localx, int localy, int dx, int dy); - virtual void OnMouseLeave(int localx, int localy, int dx, int dy); + /// + // Called: Every tick. + // Params: + // dt: The change in time. + /// + virtual void Tick(float dt); + + /// + // Called: When ready to draw. + // Params: + // None + /// + virtual void Draw(const Point& screenPos); + + + + + /// + // Called: When the mouse is currently hovering over the item. (Called every tick) + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + /// + virtual void OnMouseHover(int localx, int localy); + + /// + // Called: When the mouse moves. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + // dx: Mouse X delta. + // dy: Mouse Y delta. + /// virtual void OnMouseMoved(int localx, int localy, int dx, int dy); + + /// + // Called: When the mouse moves. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + // dx: Mouse X delta. + // dy: Mouse Y delta. + /// virtual void OnMouseMovedInside(int localx, int localy, int dx, int dy); - virtual void OnMouseHover(int localx, int localy); - virtual void OnMouseDown(int localx, int localy, unsigned int button); - virtual void OnMouseUp(int localx, int localy, unsigned int button); - virtual void OnMouseClick(int localx, int localy, unsigned int button); - virtual void OnMouseUnclick(int localx, int localy, unsigned int button); + + /// + // Called: When the mouse moves on top of the item. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + // dx: Mouse X delta. + // dy: Mouse Y delta. + /// + virtual void OnMouseEnter(int localx, int localy); + + /// + // Called: When the mouse leaves the item. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + /// + virtual void OnMouseLeave(int localx, int localy); + + /// + // Called: When a mouse button is pressed. + // Params: + // x: X position of the mouse. + // y: Y position of the mouse. + // button: The button that is being held down. + /// + virtual void OnMouseDown(int x, int y, unsigned button); + + /// + // Called: When a mouse button is released. + // Params: + // x: X position of the mouse. + // y: Y position of the mouse. + // button: The button that is being released. + /// + virtual void OnMouseUp(int x, int y, unsigned button); + + /// + // Called: When a mouse button is pressed on top of the item. + // Params: + // x: X position of the mouse. + // y: Y position of the mouse. + // button: The button that is being held down. + /// + virtual void OnMouseClick(int localx, int localy, unsigned button); + + /// + // Called: When a mouse button is released on top of the item. + // Params: + // x: X position of the mouse. + // y: Y position of the mouse. + // button: The button that is being released. + /// + virtual void OnMouseUnclick(int localx, int localy, unsigned button); + + /// + // Called: When the mouse wheel moves/changes. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + // d: The mouse wheel movement value. + /// virtual void OnMouseWheel(int localx, int localy, int d); + + /// + // Called: When the mouse wheel moves/changes on top of the item. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + // d: The mouse wheel movement value. + /// virtual void OnMouseWheelInside(int localx, int localy, int d); - virtual void OnMouseWheelFocused(int localx, int localy, int d); + + /// + // Called: When a key is pressed. + // Params: + // key: The value of the key that is being pressed. + // shift: Shift key is down. + // ctrl: Control key is down. + // alt: Alternate key is down. + /// virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + + /// + // Called: When a key is released. + // Params: + // key: The value of the key that is being released. + // shift: Shift key is released. + // ctrl: Control key is released. + // alt: Alternate key is released. + /// virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); - State* Parent; + private: + State* parentstate_; + Panel* _parent; }; } -#endif /* COMPONENT_H_ */ diff --git a/includes/interface/ControlFactory.h b/includes/interface/ControlFactory.h index 8bfd780..ba5f43b 100644 --- a/includes/interface/ControlFactory.h +++ b/includes/interface/ControlFactory.h @@ -2,7 +2,7 @@ #define CONTROLFACTORY_H #include "Panel.h" -#include "Window.h" +#include "Engine.h" #include "GameSession.h" class ControlFactory diff --git a/includes/interface/Engine.h b/includes/interface/Engine.h new file mode 100644 index 0000000..682a09d --- /dev/null +++ b/includes/interface/Engine.h @@ -0,0 +1,64 @@ +#pragma once + +#include +#include "Singleton.h" +#include "Platform.h" +#include "State.h" +#include "Graphics.h" + +namespace ui +{ + class State; + + /* class Engine + * + * Controls the User Interface. + * Send user inputs to the Engine and the appropriate controls and components will interact. + */ + class Engine: public Singleton + { + public: + Engine(); + ~Engine(); + + void onMouseMove(int x, int y); + void onMouseClick(int x, int y, unsigned button); + void onMouseUnclick(int x, int y, unsigned button); + void onMouseWheel(int x, int y, int delta); + void onKeyPress(int key, bool shift, bool ctrl, bool alt); + void onKeyRelease(int key, bool shift, bool ctrl, bool alt); + void onResize(int newWidth, int newHeight); + void onClose(); + + void Begin(int width, int height, SDL_Surface * surface); + inline bool Running() { return running_; } + void Exit(); + + void Tick(float dt); + void Draw(); + + inline int GetMouseX() { return mousex_; } + inline int GetMouseY() { return mousey_; } + inline int GetWidth() { return width_; } + inline int GetHeight() { return height_; } + + inline void SetSize(int width, int height); + + void SetState(State* state); + inline State* GetState() { return state_; } + Graphics * g; + private: + State* statequeued_; + State* state_; + + bool running_; + + int mousex_; + int mousey_; + int mousexp_; + int mouseyp_; + int width_; + int height_; + }; + +} diff --git a/includes/interface/Label.h b/includes/interface/Label.h new file mode 100644 index 0000000..2168956 --- /dev/null +++ b/includes/interface/Label.h @@ -0,0 +1,26 @@ +#ifndef LABEL_H +#define LABEL_H + +#include + +#include "Component.h" + +namespace ui +{ + class Label : public Component + { + public: + Label(State* parent_state, std::string labelText); + + Label(Point position, Point size, std::string labelText); + + Label(std::string labelText); + virtual ~Label(); + + std::string LabelText; + + virtual void Draw(const Point& screenPos); + }; +} + +#endif // LABEL_H diff --git a/includes/interface/Panel.h b/includes/interface/Panel.h index 9549ff4..7c9adab 100644 --- a/includes/interface/Panel.h +++ b/includes/interface/Panel.h @@ -1,22 +1,136 @@ -/* - * Panel.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef PANEL_H_ -#define PANEL_H_ +#pragma once +#include +//#include "Platform.h" +#include "interface/Point.h" +#include "interface/State.h" #include "interface/Component.h" -namespace ui { +namespace ui +{ + /* class XComponent + * + * An eXtension of the Component class. + * Adds the ability to have child components. + * + * See sys::Component + */ +class Component; + class Panel : public Component + { + public: + friend class Component; -class Panel: public ui::Component { -public: - Panel(int x, int y, int width, int height); - virtual ~Panel(); -}; + Panel(State* parent_state); + Panel(Point position, Point size); + Panel(); + virtual ~Panel(); + + /* Add a child component. + * Similar to XComponent::SetParent + * + * If the component is already parented, then this will become the new parent. + */ + void AddChild(Component* c); + + // Remove child from component. This DOES NOT free the component from memory. + void RemoveChild(Component* c); + + // Remove child from component. This WILL free the component from memory unless told otherwise. + void RemoveChild(unsigned idx, bool freeMem = true); + + //Grab the number of children this component owns. + int GetChildCount(); + + //Get child of this component by index. + Component* GetChild(unsigned idx); + + void Tick(float dt); + void Draw(const Point& screenPos); + + void OnMouseHover(int localx, int localy); + void OnMouseMoved(int localx, int localy, int dx, int dy); + void OnMouseMovedInside(int localx, int localy, int dx, int dy); + void OnMouseEnter(int localx, int localy); + void OnMouseLeave(int localx, int localy); + void OnMouseDown(int x, int y, unsigned button); + void OnMouseUp(int x, int y, unsigned button); + void OnMouseClick(int localx, int localy, unsigned button); + void OnMouseUnclick(int localx, int localy, unsigned button); + void OnMouseWheel(int localx, int localy, int d); + void OnMouseWheelInside(int localx, int localy, int d); + void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + + protected: + // child components + std::vector children; + + //UI functions: + /* + void XTick(float dt); + void XDraw(const Point& screenPos); + + void XOnMouseHover(int localx, int localy); + void XOnMouseMoved(int localx, int localy, int dx, int dy); + void XOnMouseMovedInside(int localx, int localy, int dx, int dy); + void XOnMouseEnter(int localx, int localy); + void XOnMouseLeave(int localx, int localy); + void XOnMouseDown(int x, int y, unsigned int button); + void XOnMouseUp(int x, int y, unsigned int button); + void XOnMouseClick(int localx, int localy, unsigned int button); + void XOnMouseUnclick(int localx, int localy, unsigned int button); + void XOnMouseWheel(int localx, int localy, int d); + void XOnMouseWheelInside(int localx, int localy, int d); + void XOnKeyPress(int key, bool shift, bool ctrl, bool alt); + void XOnKeyRelease(int key, bool shift, bool ctrl, bool alt); + */ + + // Overridable. Called by XComponent::Tick() + virtual void XTick(float dt); + + // Overridable. Called by XComponent::Draw() + virtual void XDraw(const Point& screenPos); + + + // Overridable. Called by XComponent::XOnMouseHover() + virtual void XOnMouseHover(int localx, int localy); + + // Overridable. Called by XComponent::OnMouseMoved() + virtual void XOnMouseMoved(int localx, int localy, int dx, int dy); + + // Overridable. Called by XComponent::OnMouseMovedInside() + virtual void XOnMouseMovedInside(int localx, int localy, int dx, int dy); + + // Overridable. Called by XComponent::OnMouseEnter() + virtual void XOnMouseEnter(int localx, int localy); + + // Overridable. Called by XComponent::OnMouseLeave() + virtual void XOnMouseLeave(int localx, int localy); + + // Overridable. Called by XComponent::OnMouseDown() + virtual void XOnMouseDown(int x, int y, unsigned button); + + // Overridable. Called by XComponent::OnMouseUp() + virtual void XOnMouseUp(int x, int y, unsigned button); + + // Overridable. Called by XComponent::OnMouseClick() + virtual void XOnMouseClick(int localx, int localy, unsigned button); + + // Overridable. Called by XComponent::OnMouseUnclick() + virtual void XOnMouseUnclick(int localx, int localy, unsigned button); + + // Overridable. Called by XComponent::OnMouseWheel() + virtual void XOnMouseWheel(int localx, int localy, int d); + + // Overridable. Called by XComponent::OnMouseWheelInside() + virtual void XOnMouseWheelInside(int localx, int localy, int d); + + // Overridable. Called by XComponent::OnKeyPress() + virtual void XOnKeyPress(int key, bool shift, bool ctrl, bool alt); + + // Overridable. Called by XComponent::OnKeyRelease() + virtual void XOnKeyRelease(int key, bool shift, bool ctrl, bool alt); + }; -} /* namespace ui */ -#endif /* PANEL_H_ */ +} diff --git a/includes/interface/Platform.h b/includes/interface/Platform.h new file mode 100644 index 0000000..c57dca6 --- /dev/null +++ b/includes/interface/Platform.h @@ -0,0 +1,108 @@ +#pragma once + + +/* ***** Platform-ness ***** */ + +#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32_LEAN_AND_MEAN) +# define IEF_PLATFORM_WIN32 +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +#elif defined(linux) || defined(_linux) || defined(__linux) +# define IEF_PLATFORM_LINUX + +#elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh) +# define IEF_PLATFORM_MACOSX + +//#elif defined(__FreeBSD__) || define(__FreeBSD_kernel__) +//# define IEF_PLATFORM_FREEBSD + +#else +# error Operating System not supported. +#endif + + +/* ***** Endian-ness ***** */ + +#if defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || (defined(__MIPS__) && defined(__MISPEB__)) || defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || defined(__sparc__) || defined(__hppa__) +# define IEF_ENDIAN_BIG + +#else +# define IEF_ENDIAN_LITTLE +#endif + + +/* ***** Debug-ness ***** */ + +#if !defined(NDEBUG) || defined(_DEBUG) +# define IEF_DEBUG +#endif + + +/* ***** Primitive Types ***** */ + +#ifndef NULL +# define NULL 0 +#endif + +#include +namespace sys +{ + +#if UCHAR_MAX == 0xFF //char + typedef signed char s8; + typedef unsigned char u8; +#else +# error No 8-Bit Integer supported. +#endif +#if USHRT_MAX == 0xFFFF //short + typedef signed short s16; + typedef unsigned short u16; +#elif UINT_MAX == 0xFFFF + typedef signed int s16; + typedef unsigned int u16; +#elif ULONG_MAX == 0xFFFF + typedef signed long s16; + typedef unsigned long u16; + #else + # error No 16-Bit Integer supported. + #endif + #if USHRT_MAX == 0xFFFFFFFF //int + typedef signed short s32; + typedef unsigned short u32; +#elif UINT_MAX == 0xFFFFFFFF + typedef signed int s32; + typedef unsigned int u32; +#elif ULONG_MAX == 0xFFFFFFFF + typedef signed long s32; + typedef unsigned long u32; + #else + # error No 32-Bit Integer supported. + #endif +#if UINT_MAX == 0xFFFFFFFFFFFFFFFF //long + typedef signed int s64; + typedef unsigned int u64; +#elif ULONG_MAX == 0xFFFFFFFFFFFFFFFF + typedef signed long s64; + typedef unsigned long u64; +#elif ULLONG_MAX == 0xFFFFFFFFFFFFFFFF + typedef signed long long s64; + typedef unsigned long long u64; +#else +# pragma message("Warning: 64-bit not supported. s64 and u64 defined as 32-bit.") + typedef s32 s64; + typedef u32 u64; +#endif +//floating +typedef float f32; +typedef double f64; +//misc +typedef u8 byte; +typedef u8 ubyte; +typedef s8 sbyte; +typedef s64 llong; +typedef s64 sllong; +typedef u64 ullong; +typedef char* cstring; + +} //namespace sys diff --git a/includes/interface/Point.h b/includes/interface/Point.h new file mode 100644 index 0000000..0d0250c --- /dev/null +++ b/includes/interface/Point.h @@ -0,0 +1,136 @@ +#pragma once +#include "Platform.h" + +namespace ui +{ + +//Lightweight 2D Int32/Float32 Point struct for UI +struct Point +{ +#if ENABLE_FLOAT_UI +# define POINT_T float +#else +# define POINT_T int +#endif + + POINT_T X; + POINT_T Y; + + Point(POINT_T x, POINT_T y) + : X(x) + , Y(y) + { + } + + inline Point operator - () const + { + return Point(-X, -Y); + } + + inline Point operator + (const Point& v) const + { + return Point(X + v.X, Y + v.Y); + } + + inline Point operator - (const Point& v) const + { + return Point(X - v.X, Y - v.Y); + } + + inline Point operator * (const Point& v) const + { + return Point(X * v.X, Y * v.Y); + } + + inline Point operator * (int v) const + { + return Point(X * static_cast(v), Y * static_cast(v)); + } + + inline Point operator * (float v) const + { + return Point(X * static_cast(v), Y * static_cast(v)); + } + + inline Point operator / (const Point& v) const + { + return Point(X / v.X, Y / v.Y); + } + + inline Point operator / (int v) const + { + return Point(X / static_cast(v), Y / static_cast(v)); + } + + inline Point operator / (float v) const + { + return Point(X / static_cast(v), Y / static_cast(v)); + } + + inline void operator += (const Point& v) + { + X += v.X; + Y += v.Y; + } + + inline void operator -= (const Point& v) + { + X -= v.X; + Y -= v.Y; + } + + inline void operator *= (const Point& v) + { + X *= v.X; + Y *= v.Y; + } + + inline void operator *= (int v) + { + X *= static_cast(v); + Y *= static_cast(v); + } + + inline void operator *= (float v) + { + X *= static_cast(v); + Y *= static_cast(v); + } + + inline void operator /= (const Point& v) + { + X /= v.X; + Y /= v.Y; + } + + inline void operator /= (int v) + { + X /= static_cast(v); + Y /= static_cast(v); + } + + inline void operator /= (float v) + { + X /= static_cast(v); + Y /= static_cast(v); + } + + inline bool operator == (const Point& v) const + { + return (X == v.X && Y == v.Y); + } + + inline bool operator != (const Point& v) const + { + return (X != v.X || Y != v.Y); + } + + inline void operator = (const Point& v) + { + X = v.X; + Y = v.Y; + } + +}; + +} diff --git a/includes/interface/Sandbox.h b/includes/interface/Sandbox.h index 32a0471..f4daa87 100644 --- a/includes/interface/Sandbox.h +++ b/includes/interface/Sandbox.h @@ -8,6 +8,8 @@ #ifndef SANDBOX_H_ #define SANDBOX_H_ +#include +#include "Point.h" #include "Component.h" #include "Simulation.h" #include "Renderer.h" @@ -18,16 +20,17 @@ class Sandbox: public ui::Component { private: int lastCoordX, lastCoordY; int activeElement; + std::queue pointQueue; bool isMouseDown; Renderer * ren; Simulation * sim; public: Sandbox(); virtual Simulation * GetSimulation(); - virtual void OnMouseMovedInside(int localx, int localy, int dx, int dy); - virtual void OnMouseDown(int localx, int localy, unsigned int button); - virtual void OnMouseUp(int localx, int localy, unsigned int button); - virtual void Draw(void* userdata); + virtual void OnMouseMoved(int localx, int localy, int dx, int dy); + virtual void OnMouseClick(int localx, int localy, unsigned int button); + virtual void OnMouseUnclick(int localx, int localy, unsigned int button); + virtual void Draw(const Point& screenPos); virtual void Tick(float delta); virtual ~Sandbox(); }; diff --git a/includes/interface/State.h b/includes/interface/State.h index 00df199..75e969d 100644 --- a/includes/interface/State.h +++ b/includes/interface/State.h @@ -1,61 +1,77 @@ -/* - * State.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef STATE_H_ -#define STATE_H_ +#pragma once #include -#include "interface/Component.h" - -namespace ui { +#include "Engine.h" +#include "Component.h" +#include "Platform.h" -class State +namespace ui { -public: - State(int w, int h); - virtual ~State(); - - bool AllowExclusiveDrawing; //false will not call draw on objects outside of bounds - - virtual void Tick(float dt); - virtual void Draw(void* userdata); - - virtual void OnMouseMove(int x, int y); - virtual void OnMouseDown(int x, int y, unsigned int button); - virtual void OnMouseUp(int x, int y, unsigned int button); - virtual void OnMouseWheel(int x, int y, int d); - virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); - virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); - - virtual void Add(Component *child); - virtual void Remove(Component *child); - - inline bool IsFocused(Component* c) { return (c == focusedComponent_); } - inline int GetMouseX() { return mouseX; } - inline int GetMouseY() { return mouseY; } - inline int GetWidth() { return width; } - inline int GetHeight() { return height; } - -protected: - std::vector Components; - - int width; - int height; - - int mouseX; - int mouseY; - int mouseXP; - int mouseYP; - -private: - Component* focusedComponent_; - -}; - -} /* namespace ui */ -#endif /* STATE_H_ */ + class Engine; + class Component; + + /* class State + * + * A UI state. Contains all components. + */ + class State + { + public: + State(); + virtual ~State(); + + bool AllowExclusiveDrawing; //false will not call draw on objects outside of bounds + + // Add Component to state + void AddComponent(Component* c); + + // Get the number of components this state has. + unsigned GetComponentCount(); + + // Get component by index. (See GetComponentCount()) + Component* GetComponent(unsigned idx); + + // Remove a component from state. NOTE: This DOES NOT free component from memory. + void RemoveComponent(Component* c); + + // Remove a component from state. NOTE: This WILL free component from memory. + void RemoveComponent(unsigned idx); + + void DoInitialized(); + void DoExit(); + void DoTick(float dt); + void DoDraw(); + + void DoMouseMove(int x, int y, int dx, int dy); + void DoMouseDown(int x, int y, unsigned button); + void DoMouseUp(int x, int y, unsigned button); + void DoMouseWheel(int x, int y, int d); + void DoKeyPress(int key, bool shift, bool ctrl, bool alt); + void DoKeyRelease(int key, bool shift, bool ctrl, bool alt); + + bool IsFocused(const Component* c) const; + void FocusComponent(Component* c); + + void* UserData; + + protected: + virtual void OnInitialized() {} + virtual void OnExit() {} + virtual void OnTick(float dt) {} + virtual void OnDraw() {} + + virtual void OnMouseMove(int x, int y, int dx, int dy) {} + virtual void OnMouseDown(int x, int y, unsigned button) {} + virtual void OnMouseUp(int x, int y, unsigned button) {} + virtual void OnMouseWheel(int x, int y, int d) {} + virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt) {} + virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {} + + private: + std::vector Components; + Component* focusedComponent_; + + }; + +} diff --git a/includes/interface/Window.h b/includes/interface/Window.h deleted file mode 100644 index 86a4bcd..0000000 --- a/includes/interface/Window.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Window.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef WINDOW_H_ -#define WINDOW_H_ - -#include "interface/State.h" - -namespace ui { - -class Window: public ui::State { -public: - Window(); - virtual ~Window(); -}; - -} /* namespace ui */ -#endif /* WINDOW_H_ */ diff --git a/src/Console.cpp b/src/Console.cpp index 6bf8ce6..f861fd1 100644 --- a/src/Console.cpp +++ b/src/Console.cpp @@ -1,29 +1,21 @@ #include +#include #include "Console.h" -int Console::ParseType(std::string * type) +int Console::ParsePartref(char * txt) { - char * txt = (char *)type->c_str(); - int i = -1; - // alternative names for some elements - if (*type == "C4") i = PT_PLEX; - else if (*type == "C5") i = PT_C5; - else if (*type == "NONE") i = PT_NONE; - if (i>=0 && iptypes[i].enabled) - { - (*lastError) = ""; - return i; - } - for (i=1; iptypes[i].name)==0 && sim->ptypes[i].enabled) - { - (*lastError) = ""; - return i; - } - } - (*lastError) = "Particle type not recognised"; - return -1; + +} + +int Console::ParseCoords(char * coords, int *x, int *y) +{ + +} + +int Console::ParseType(char * txt) +{ + } void Console::Tick(float * dt) @@ -41,7 +33,7 @@ void Console::ConsoleHidden() } -int Console::ProcessCommand(std::string * command) +int Console::ProcessCommand(char * console) { } diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 49dac73..7ede4d5 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -1,32 +1,52 @@ #include #include +#include +#include +#include #include "Config.h" #include "Simulation.h" #include "Renderer.h" #include "Graphics.h" #include "Air.h" -#include "interface/Window.h" +#include "interface/Engine.h" #include "interface/Button.h" #include "interface/Sandbox.h" #include "interface/Panel.h" #include "interface/ControlFactory.h" +#include "interface/Point.h" +#include "interface/Label.h" #include "GameSession.h" +using namespace std; + SDL_Surface * SDLOpen() { +#if defined(WIN32) && defined(WINCONSOLE) + FILE * console = fopen("CON", "w" ); +#endif if (SDL_Init(SDL_INIT_VIDEO)<0) { fprintf(stderr, "Initializing SDL: %s\n", SDL_GetError()); return 0; } +#if defined(WIN32) && defined(WINCONSOLE) + //On Windows, SDL redirects stdout to stdout.txt, which can be annoying when debugging, here we redirect back to the console + if (console) + { + freopen("CON", "w", stdout); + freopen("con", "w", stderr); + fclose(console); + } +#endif atexit(SDL_Quit); return SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_SWSURFACE); } int SDLPoll(SDL_Event * event) { + event->type = 0; while (SDL_PollEvent(event)) { switch (event->type) @@ -40,20 +60,24 @@ int SDLPoll(SDL_Event * event) int main(int argc, char * argv[]) { - int mouseX, mouseY, mouseButton, lastMouseButton; + int elapsedTime = 0, currentTime = 0, lastTime = 0, currentFrame = 0; + float fps, fpsLimit, delta; //Renderer * ren; - Graphics * g = new Graphics(); - g->AttachSDLSurface(SDLOpen()); //Simulation * sim = new Simulation(); //ren = new Renderer(g, sim); GameSession * gameSession = new GameSession(); - ui::Window * window = new ui::Window(); + ui::Engine * engine = &ui::Engine::Ref();//new ui::Engine(); + ui::State * engineState = new ui::State(); ui::Sandbox * sandbox = new ui::Sandbox(); - ui::Button * button = new ui::Button(100, 100, 100, 100, "poP"); - window->Add(sandbox); - window->Add(button); + ui::Button * button = new ui::Button(ui::Point(100, 100), ui::Point(100, 100), std::string("poP")); + ui::Label * fpsLabel = new ui::Label(ui::Point(2, 2), ui::Point(200, 14), std::string("FPS: 0")); + engine->Begin(XRES, YRES, SDLOpen()); + engine->SetState(engineState); + engineState->AddComponent(fpsLabel); + engineState->AddComponent(sandbox); + engineState->AddComponent(button); //window->Add(ControlFactory::MainMenu(gameSession, 0, 0, 200, 200)); SDL_Event event; @@ -67,34 +91,32 @@ int main(int argc, char * argv[]) case SDL_KEYUP: break; case SDL_MOUSEMOTION: - window->OnMouseMove(event.motion.x, event.motion.y); + engine->onMouseMove(event.motion.x, event.motion.y); break; case SDL_MOUSEBUTTONDOWN: - window->OnMouseDown(event.motion.x, event.motion.y, event.button.button); + engine->onMouseClick(event.motion.x, event.motion.y, event.button.button); break; case SDL_MOUSEBUTTONUP: - window->OnMouseUp(event.motion.x, event.motion.y, event.button.button); + engine->onMouseUnclick(event.motion.x, event.motion.y, event.button.button); break; } - window->Tick(1.0f); - window->Draw(g); - /*sim->update_particles(); - sim->air->update_air(); - mouseButton = SDL_GetMouseState(&mouseX, &mouseY); - if(mouseButton) - { - sim->create_parts(mouseX, mouseY, 4, 4, (rand()%4)+1, 0); - } - if(mouseButton==4 && !lastMouseButton) - { - sim->sys_pause = !sim->sys_pause; - } - //ren->render_parts(); - //ren->render_fire(); + fpsLabel->LabelText = ""; + stringstream fpsText; + fpsText << "FPS: " << fps; + fpsLabel->LabelText = fpsText.str(); + engine->Tick(delta); + engine->Draw(); - ren->g->clearrect(0, 0, XRES+BARSIZE, YRES+MENUSIZE);*/ - g->Blit(); - g->Clear(); + currentFrame++; + currentTime = SDL_GetTicks(); + elapsedTime = currentTime - lastTime; + if(elapsedTime>=1000) + { + fps = (((float)currentFrame)/((float)elapsedTime))*1000.0f; + currentFrame = 0; + lastTime = currentTime; + delta = 60.0f/fps; + } } } diff --git a/src/interface.old/Button.cpp b/src/interface.old/Button.cpp new file mode 100644 index 0000000..a357c36 --- /dev/null +++ b/src/interface.old/Button.cpp @@ -0,0 +1,127 @@ +/* + * Button.cpp + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#include + +#include "interface/Button.h" +#include "Graphics.h" + +namespace ui { + +Button::Button(int x, int y, int width, int height, const std::string& buttonText): + Component(x, y, width, height), + Toggleable(false), + ButtonText(buttonText), + isMouseInside(false), + isButtonDown(false), + state(false) +{ + +} + +void Button::Draw(void* userdata) +{ + Graphics * g = reinterpret_cast(userdata); + //TODO: Cache text location, that way we don't have the text alignment code here + if(isButtonDown) + { + g->fillrect(X, Y, Width, Height, 255, 255, 255, 255); + g->drawtext(X+(Width-Graphics::textwidth((char *)ButtonText.c_str()))/2, Y+(Height-10)/2, ButtonText, 0, 0, 0, 255); + } + else + { + if(isMouseInside) + g->fillrect(X, Y, Width, Height, 20, 20, 20, 255); + g->drawrect(X, Y, Width, Height, 255, 255, 255, 255); + g->drawtext(X+(Width-Graphics::textwidth((char *)ButtonText.c_str()))/2, Y+(Height-10)/2, ButtonText, 255, 255, 255, 255); + } + /*sf::RenderWindow* rw = reinterpret_cast(userdata); //it better be a RenderWindow or so help your god + + //Draw component here + sf::Text textGraphic(ButtonText); + textGraphic.SetCharacterSize(11); + if(isButtonDown) + textGraphic.SetColor(sf::Color::Black); + else + textGraphic.SetColor(sf::Color::White); + sf::FloatRect tempRect = textGraphic.GetRect(); + textGraphic.SetPosition(ceil(X + Width/2 - tempRect.Width/2), ceil(Y + Height/2 - tempRect.Height/2)); + + if(isMouseInside) + { + if(isButtonDown) + rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::White, 2.f, sf::Color::Black)); + else + rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::Black, 2.f, sf::Color::White)); + } + else + { + if(isButtonDown) + rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::White, 2.f, sf::Color::Black)); + else + rw->Draw(sf::Shape::Rectangle(X+1, Y+1, Width-2, Width-2, sf::Color::Black, 1.f, sf::Color::White)); + } + + rw->Draw(textGraphic);*/ +} + +void Button::OnMouseUnclick(int x, int y, unsigned int button) +{ + if(button != 1) + { + return; //left click only! + } + + if(isButtonDown) + { + if(state) + { + state = false; + } + else + { + if(Toggleable) + { + state = true; + } + DoAction(); + } + } + + isButtonDown = false; +} + +void Button::OnMouseUp(int x, int y, unsigned int button) //mouse unclick is called before this +{ + if(button != 1) return; //left click only! + + isButtonDown = false; +} + +void Button::OnMouseClick(int x, int y, unsigned int button) +{ + if(button != 1) return; //left click only! + + isButtonDown = true; +} + +void Button::OnMouseEnter(int x, int y, int dx, int dy) +{ + isMouseInside = true; +} + +void Button::OnMouseLeave(int x, int y, int dx, int dy) +{ + isMouseInside = false; +} + +void Button::DoAction() +{ + std::cout << "Do action!"<Add(new ui::Button(0, 0, 20, 20, "Turd")); + return mainMenu; +} diff --git a/src/interface.old/Panel.cpp b/src/interface.old/Panel.cpp new file mode 100644 index 0000000..164bfa3 --- /dev/null +++ b/src/interface.old/Panel.cpp @@ -0,0 +1,23 @@ +/* + * Panel.cpp + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#include "interface/Panel.h" + +namespace ui { + +Panel::Panel(int x, int y, int width, int height): + Component(x, y, width, height) +{ + // TODO Auto-generated constructor stub + +} + +Panel::~Panel() { + // TODO Auto-generated destructor stub +} + +} /* namespace ui */ diff --git a/src/interface.old/Sandbox.cpp b/src/interface.old/Sandbox.cpp new file mode 100644 index 0000000..5e29bae --- /dev/null +++ b/src/interface.old/Sandbox.cpp @@ -0,0 +1,76 @@ +/* + * Sandbox.cpp + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#include + +#include "Config.h" + +#include "interface/Sandbox.h" +#include "interface/Component.h" +#include "Renderer.h" +#include "Simulation.h" + +namespace ui { + +Sandbox::Sandbox(): + Component(0, 0, XRES, YRES), + ren(NULL), + isMouseDown(false), + activeElement(1) +{ + sim = new Simulation(); +} + +Simulation * Sandbox::GetSimulation() +{ + return sim; +} + +void Sandbox::OnMouseMovedInside(int localx, int localy, int dx, int dy) +{ + if(isMouseDown) + { + sim->create_line(lastCoordX, lastCoordY, localx, localy, 2, 2, activeElement, 0); + lastCoordX = localx; + lastCoordY = localy; + } +} + +void Sandbox::OnMouseDown(int localx, int localy, unsigned int button) +{ + sim->create_line(localx, localy, localx, localy, 2, 2, activeElement, 0); + lastCoordX = localx; + lastCoordY = localy; + isMouseDown = true; +} + +void Sandbox::OnMouseUp(int localx, int localy, unsigned int button) +{ + sim->create_line(lastCoordX, lastCoordY, localx, localy, 2, 2, activeElement, 0); + lastCoordX = localx; + lastCoordY = localy; + isMouseDown = false; +} + +void Sandbox::Draw(void* userdata) +{ + Graphics * g = reinterpret_cast(userdata); + if(!ren) + ren = new Renderer(g, sim); + ren->render_parts(); +} + +void Sandbox::Tick(float delta) +{ + sim->update_particles(); +} + +Sandbox::~Sandbox() { + // TODO Auto-generated destructor stub +} + +} /* namespace ui */ diff --git a/src/interface.old/State.cpp b/src/interface.old/State.cpp new file mode 100644 index 0000000..2828751 --- /dev/null +++ b/src/interface.old/State.cpp @@ -0,0 +1,233 @@ +/* + * State.cpp + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#include +#include +#include + +#include "interface/State.h" + +namespace ui { + +State::State(int w, int h): + mouseX(0), + mouseY(0), + mouseXP(0), + mouseYP(0), + width(w), + height(h), + Components() +{ +} + +State::~State() +{ + //Components.~vector(); // just in case // devnote : Nope.jpg Nate :3 -frankbro +} + +void State::Add(Component* child) +{ + Components.push_back(child); + child->Parent = this; +} + +void State::Remove(Component* child) +{ + for(int i = 0; i < Components.size(); i++) + if(Components[i] == child) + { + Components.erase(Components.begin() + i); + break; + } +} + +void State::Draw(void* userdata) +{ + //draw + for(int i = 0; i < Components.size(); i++) + { + if(Components[i]->Visible) + { + if(AllowExclusiveDrawing) + { + Components[i]->Draw(userdata); + } + else if( + Components[i]->X + Components[i]->Width >= 0 && + Components[i]->Y + Components[i]->Height >= 0 && + Components[i]->X < width && + Components[i]->Y < height ) + { + Components[i]->Draw(userdata); + } + } + } +} + +void State::Tick(float dt) +{ + //on mouse hover + for(int i = 0; i < Components.size(); i++) + if( mouseX >= Components[i]->X && + mouseY >= Components[i]->Y && + mouseX < Components[i]->X + Components[i]->Width && + mouseY < Components[i]->Y + Components[i]->Height ) + { + if(Components[i]->Enabled) + { + Components[i]->OnMouseHover(mouseX, mouseY); + } + break; + } + + //tick + for(int i = 0; i < Components.size(); i++) + Components[i]->Tick(dt); +} + +void State::OnKeyPress(int key, bool shift, bool ctrl, bool alt) +{ + //on key press + if(focusedComponent_ != NULL) + if(focusedComponent_->Enabled) + focusedComponent_->OnKeyPress(key, shift, ctrl, alt); +} + +void State::OnKeyRelease(int key, bool shift, bool ctrl, bool alt) +{ + //on key unpress + if(focusedComponent_ != NULL) + if(focusedComponent_->Enabled) + focusedComponent_->OnKeyRelease(key, shift, ctrl, alt); +} + +void State::OnMouseDown(int x, int y, unsigned int button) +{ + //on mouse click + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) + { + Components[i]->OnMouseClick(x - Components[i]->X, y - Components[i]->Y, button); + this->focusedComponent_ = Components[i]; //set this component as the focused component + break; + } + + //on mouse down + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + Components[i]->OnMouseDown(x - Components[i]->X, y - Components[i]->Y, button); +} + +void State::OnMouseMove(int x, int y) +{ + //update mouse coords + mouseX = x; + mouseY = y; + + //on mouse move (if true, and inside) + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + { + int localX = x - Components[i]->X; + int localY = y - Components[i]->Y; + int localXP = mouseXP - Components[i]->X; + int localYP = mouseYP - Components[i]->Y; + int dx = x - mouseXP; + int dy = x - mouseYP; + + Components[i]->OnMouseMoved(localX, localY, dx, dy); + + //is the mouse inside + if(localX >= 0 && + localY >= 0 && + localX < Components[i]->Width && + localY < Components[i]->Height ) + { + //was the mouse outside last tick? + if(localXP < 0 || + localXP >= Components[i]->Width || + localYP < 0 || + localYP >= Components[i]->Height ) + { + Components[i]->OnMouseEnter(localX, localY, dx, dy); + } + + Components[i]->OnMouseMovedInside(localX, localY, dx, dy); + + break; //found the top-most component under mouse, break that shit + } + //not inside, let's see if it used to be inside last tick + else if (localXP >= 0 && + localYP >= 0 && + localXP < Components[i]->Width && + localYP < Components[i]->Height ) + { + Components[i]->OnMouseLeave(localX, localY, x - mouseXP, y - mouseYP); + } + } + else //is locked + { + int localX = x - Components[i]->X; + int localY = y - Components[i]->Y; + + //is the mouse inside + if(localX >= 0 && + localY >= 0 && + localX < Components[i]->Width && + localY < Components[i]->Height ) + { + break; //it's the top-most component under the mouse, we don't want to go under it. + } + } + // end of for loop here + + //set the previous mouse coords + mouseXP = x; + mouseYP = y; +} + +void State::OnMouseUp(int x, int y, unsigned int button) +{ + //on mouse unclick + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) + { + Components[i]->OnMouseUnclick(x - Components[i]->X, y - Components[i]->Y, button); + break; + } + + //on mouse up + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + Components[i]->OnMouseUp(x - Components[i]->X, y - Components[i]->Y, button); +} + +void State::OnMouseWheel(int x, int y, int d) +{ + //focused mouse wheel + if(focusedComponent_ != NULL) + focusedComponent_->OnMouseWheelFocused(x - focusedComponent_->X, y - focusedComponent_->Y, d); + + //mouse wheel inside + for(int i = Components.size() - 1; i > -1 ; i--) + if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) + { + if(Components[i]->Enabled) + Components[i]->OnMouseWheelInside(x - Components[i]->X, y - Components[i]->Y, d); + break; //found top-most component under mouse + } + + //on mouse wheel + for(int i = Components.size() - 1; i > -1 ; i--) + if(Components[i]->Enabled) + Components[i]->OnMouseWheel(x - Components[i]->X, y - Components[i]->Y, d); +} + + +} /* namespace ui */ diff --git a/src/interface.old/Window.cpp b/src/interface.old/Window.cpp new file mode 100644 index 0000000..624bf9a --- /dev/null +++ b/src/interface.old/Window.cpp @@ -0,0 +1,23 @@ +/* + * Window.cpp + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#include "interface/Window.h" + +namespace ui { + +Window::Window(): + State(width, height) +{ + // TODO Auto-generated constructor stub + +} + +Window::~Window() { + // TODO Auto-generated destructor stub +} + +} /* namespace ui */ diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index a357c36..e34f66c 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -12,32 +12,49 @@ namespace ui { -Button::Button(int x, int y, int width, int height, const std::string& buttonText): - Component(x, y, width, height), - Toggleable(false), - ButtonText(buttonText), - isMouseInside(false), - isButtonDown(false), - state(false) +Button::Button(State* parent_state, std::string buttonText): + Component(parent_state), + ButtonText(buttonText), + isMouseInside(false), + isButtonDown(false) { } -void Button::Draw(void* userdata) +Button::Button(Point position, Point size, std::string buttonText): + Component(position, size), + ButtonText(buttonText), + isMouseInside(false), + isButtonDown(false) { - Graphics * g = reinterpret_cast(userdata); + +} + +Button::Button(std::string buttonText): + Component(), + ButtonText(buttonText), + isMouseInside(false), + isButtonDown(false) +{ + +} + +void Button::Draw(const Point& screenPos) +{ + Graphics * g = ui::Engine::Ref().g; + // = reinterpret_cast(userdata); //TODO: Cache text location, that way we don't have the text alignment code here if(isButtonDown) { - g->fillrect(X, Y, Width, Height, 255, 255, 255, 255); - g->drawtext(X+(Width-Graphics::textwidth((char *)ButtonText.c_str()))/2, Y+(Height-10)/2, ButtonText, 0, 0, 0, 255); + g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); + g->drawtext(Position.X+(Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2, Position.Y+(Size.Y-10)/2, ButtonText, 0, 0, 0, 255); } else { if(isMouseInside) - g->fillrect(X, Y, Width, Height, 20, 20, 20, 255); - g->drawrect(X, Y, Width, Height, 255, 255, 255, 255); - g->drawtext(X+(Width-Graphics::textwidth((char *)ButtonText.c_str()))/2, Y+(Height-10)/2, ButtonText, 255, 255, 255, 255); + g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 20, 20, 20, 255); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); + g->drawtext(Position.X+(Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2, Position.Y+(Size.Y-10)/2, ButtonText, 255, 255, 255, 255); } /*sf::RenderWindow* rw = reinterpret_cast(userdata); //it better be a RenderWindow or so help your god @@ -71,6 +88,7 @@ void Button::Draw(void* userdata) void Button::OnMouseUnclick(int x, int y, unsigned int button) { + std::cout << "Unclick!" << std::endl; if(button != 1) { return; //left click only! @@ -78,44 +96,35 @@ void Button::OnMouseUnclick(int x, int y, unsigned int button) if(isButtonDown) { - if(state) - { - state = false; - } - else - { - if(Toggleable) - { - state = true; - } - DoAction(); - } + DoAction(); } isButtonDown = false; } -void Button::OnMouseUp(int x, int y, unsigned int button) //mouse unclick is called before this -{ - if(button != 1) return; //left click only! +//void Button::OnMouseUp(int x, int y, unsigned int button) //mouse unclick is called before this +//{ + // if(button != 1) return; //left click only! - isButtonDown = false; -} +// isButtonDown = false; +//} void Button::OnMouseClick(int x, int y, unsigned int button) { + std::cout << "Click!" << std::endl; if(button != 1) return; //left click only! - isButtonDown = true; } -void Button::OnMouseEnter(int x, int y, int dx, int dy) +void Button::OnMouseEnter(int x, int y) { + std::cout << "Enter!"<IsFocused(this); } -void Component::OnKeyPress(int key, bool shift, bool ctrl, bool alt) +void Component::SetParentState(State* state) { + parentstate_ = state; } -void Component::OnKeyRelease(int key, bool shift, bool ctrl, bool alt) +void Component::SetParent(Panel* new_parent) +{ + if(new_parent == NULL) + { + if(_parent != NULL) + { + // remove from current parent and send component to parent state + for(int i = 0; i < _parent->GetChildCount(); ++i) + { + if(_parent->GetChild(i) == this) + { + // remove ourself from parent component + _parent->RemoveChild(i, false); + + // add ourself to the parent state + GetParentState()->AddComponent(this); + + //done in this loop. + break; + } + } + } + } + else + { + // remove from parent state (if in parent state) and place in new parent + GetParentState()->RemoveComponent(this); + new_parent->children.push_back(this); + } + this->_parent = new_parent; +} + +// ***** OVERRIDEABLES ***** +// Kept empty. + +void Component::Draw(const Point& screenPos) { } -void Component::OnMouseEnter(int localx, int localy, int dx, int dy) +void Component::Tick(float dt) { } -void Component::OnMouseLeave(int localx, int localy, int dx, int dy) +void Component::OnKeyPress(int key, bool shift, bool ctrl, bool alt) { } -void Component::OnMouseClick(int localx, int localy, unsigned int button) +void Component::OnKeyRelease(int key, bool shift, bool ctrl, bool alt) { } -void Component::OnMouseUnclick(int localx, int localy, unsigned int button) +void Component::OnMouseClick(int localx, int localy, unsigned button) { } -void Component::OnMouseDown(int localx, int localy, unsigned int button) +void Component::OnMouseDown(int x, int y, unsigned button) { } @@ -71,7 +121,19 @@ void Component::OnMouseMovedInside(int localx, int localy, int dx, int dy) { } -void Component::OnMouseUp(int localx, int localy, unsigned int button) +void Component::OnMouseEnter(int localx, int localy) +{ +} + +void Component::OnMouseLeave(int localx, int localy) +{ +} + +void Component::OnMouseUnclick(int localx, int localy, unsigned button) +{ +} + +void Component::OnMouseUp(int x, int y, unsigned button) { } @@ -83,7 +145,7 @@ void Component::OnMouseWheelInside(int localx, int localy, int d) { } -void Component::OnMouseWheelFocused(int localx, int localy, int d) +Component::~Component() { + } -} /* namespace ui */ diff --git a/src/interface/ControlFactory.cpp b/src/interface/ControlFactory.cpp index 300ceba..25822cd 100644 --- a/src/interface/ControlFactory.cpp +++ b/src/interface/ControlFactory.cpp @@ -1,11 +1,12 @@ +#include "interface/Point.h" #include "interface/ControlFactory.h" #include "interface/Button.h" #include "interface/Panel.h" -#include "interface/Window.h" +#include "interface/Engine.h" ui::Panel * ControlFactory::MainMenu(GameSession * session, int x, int y, int width, int height) { - ui::Panel * mainMenu = new ui::Panel(x, y, width, height); + ui::Panel * mainMenu = new ui::Panel(ui::Point(x, y), ui::Point(width, height)); //mainMenu->Add(new ui::Button(0, 0, 20, 20, "Turd")); return mainMenu; } diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp new file mode 100644 index 0000000..4468561 --- /dev/null +++ b/src/interface/Engine.cpp @@ -0,0 +1,138 @@ +#include "interface/Platform.h" +#include "interface/Engine.h" +#include "interface/State.h" +#include "Graphics.h" + +using namespace ui; + +Engine::Engine() +: + g(NULL), +state_(NULL), +statequeued_(NULL), +mousex_(0), +mousey_(0), +mousexp_(0), +mouseyp_(0) +{ +} + +Engine::~Engine() +{ + if(state_ != NULL) + delete state_; +} + +void Engine::Begin(int width, int height, SDL_Surface * surface) +{ + g = new Graphics(); + g->AttachSDLSurface(surface); + //engine is now ready + running_ = true; + + width_ = width; + height_ = height; +} + +void Engine::Exit() +{ + running_ = false; +} + +void Engine::SetState(State * state) +{ + if(state_) //queue if currently in a state + statequeued_ = state; + else + { + state_ = state; + if(state_) + state_->DoInitialized(); + } +} + +void Engine::SetSize(int width, int height) +{ + width_ = width; + height_ = height; +} + +void Engine::Tick(float dt) +{ + if(state_ != NULL) + state_->DoTick(dt); + + if(statequeued_ != NULL) + { + if(state_ != NULL) + { + state_->DoExit(); + delete state_; + state_ = NULL; + } + state_ = statequeued_; + statequeued_ = NULL; + + if(state_ != NULL) + state_->DoInitialized(); + } +} + +void Engine::Draw() +{ + if(state_) + state_->DoDraw(); + g->Blit(); + g->Clear(); +} + +void Engine::onKeyPress(int key, bool shift, bool ctrl, bool alt) +{ + if(state_) + state_->DoKeyPress(key, shift, ctrl, alt); +} + +void Engine::onKeyRelease(int key, bool shift, bool ctrl, bool alt) +{ + if(state_) + state_->DoKeyRelease(key, shift, ctrl, alt); +} + +void Engine::onMouseClick(int x, int y, unsigned button) +{ + if(state_) + state_->DoMouseDown(x, y, button); +} + +void Engine::onMouseUnclick(int x, int y, unsigned button) +{ + if(state_) + state_->DoMouseUp(x, y, button); +} + +void Engine::onMouseMove(int x, int y) +{ + mousex_ = x; + mousey_ = y; + if(state_) + state_->DoMouseMove(x, y, mousex_ - mousexp_, mousey_ - mouseyp_); + mousexp_ = x; + mouseyp_ = y; +} + +void Engine::onMouseWheel(int x, int y, int delta) +{ + if(state_) + state_->DoMouseWheel(x, y, delta); +} + +void Engine::onResize(int newWidth, int newHeight) +{ + SetSize(newWidth, newHeight); +} + +void Engine::onClose() +{ + if(state_) + state_->DoExit(); +} diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp new file mode 100644 index 0000000..3a5ea85 --- /dev/null +++ b/src/interface/Label.cpp @@ -0,0 +1,38 @@ +#include +#include "interface/Point.h" +#include "interface/Label.h" + +using namespace ui; + +Label::Label(State* parent_state, std::string labelText): + Component(parent_state), + LabelText(labelText) +{ + +} + +Label::Label(Point position, Point size, std::string labelText): + Component(position, size), + LabelText(labelText) +{ + +} + +Label::Label(std::string labelText): + Component(), + LabelText(labelText) +{ + +} + +Label::~Label() +{ + +} + + +void Label::Draw(const Point& screenPos) +{ + Graphics * g = ui::Engine::Ref().g; + g->drawtext(Position.X+(Size.X-Graphics::textwidth((char *)LabelText.c_str()))/2, Position.Y+(Size.Y-10)/2, LabelText, 255, 255, 255, 255); +} diff --git a/src/interface/Panel.cpp b/src/interface/Panel.cpp index 164bfa3..e44663a 100644 --- a/src/interface/Panel.cpp +++ b/src/interface/Panel.cpp @@ -1,23 +1,392 @@ -/* - * Panel.cpp - * - * Created on: Jan 8, 2012 - * Author: Simon - */ +#pragma once +#include +//#include "Platform.h" #include "interface/Panel.h" -namespace ui { +#include "interface/Point.h" +#include "interface/State.h" +#include "interface/Component.h" -Panel::Panel(int x, int y, int width, int height): - Component(x, y, width, height) +using namespace ui; + +Panel::Panel(State* parent_state): + Component(parent_state) +{ + +} + +Panel::Panel(Point position, Point size): + Component(position, size) +{ + +} + +Panel::Panel(): + Component() +{ + +} + +Panel::~Panel() +{ + for(unsigned i = 0; i < children.size(); ++i) + { + if( children[i] ) + delete children[i]; + } +} + +void Panel::AddChild(Component* c) +{ + c->SetParent(this); +} + +int Panel::GetChildCount() +{ + return children.size(); +} + +Component* Panel::GetChild(unsigned idx) +{ + return children[idx]; +} + +void Panel::RemoveChild(Component* c) +{ + for(int i = 0; i < children.size(); ++i) + { + if(children[i] == c) + { + //remove child from parent. Does not free memory + children.erase(children.begin() + i); + break; + } + } +} + +void Panel::RemoveChild(unsigned idx, bool freeMem) +{ + if(freeMem) + delete children[idx]; + + children.erase(children.begin() + idx); +} + +void Panel::Draw(const Point& screenPos) +{ + // draw ourself first + XDraw(screenPos); + + // attempt to draw all children + for(int i = 0; i < children.size(); ++i) + { + // the component must be visible + if(children[i]->Visible) + { + if(GetParentState()->AllowExclusiveDrawing) + { + //who cares if the component is off the screen? draw anyway. + Point scrpos = screenPos + children[i]->Position; + children[i]->Draw(scrpos); + } + else + { + //check if the component is in the screen, draw if it is + if( children[i]->Position.X + children[i]->Size.X >= 0 && + children[i]->Position.Y + children[i]->Size.Y >= 0 && + children[i]->Position.X < ui::Engine::Ref().GetWidth() && + children[i]->Position.Y < ui::Engine::Ref().GetHeight() ) + { + Point scrpos = screenPos + children[i]->Position; + children[i]->Draw(scrpos); + } + } + } + } +} + +void Panel::Tick(float dt) +{ + // tick ourself first + XTick(dt); + + // tick our children + for(unsigned i = 0; i < children.size(); ++i) + children[i]->Tick(dt); +} + +void Panel::OnKeyPress(int key, bool shift, bool ctrl, bool alt) +{ + XOnKeyPress(key, shift, ctrl, alt); +} + +void Panel::OnKeyRelease(int key, bool shift, bool ctrl, bool alt) +{ + XOnKeyRelease(key, shift, ctrl, alt); +} + +void Panel::OnMouseClick(int localx, int localy, unsigned button) +{ + bool childclicked = false; + + //check if clicked a child + for(int i = children.size()-1; i >= 0 ; --i) + { + //child must be unlocked + if(!children[i]->Locked) + { + //is mouse inside? + if( localx >= children[i]->Position.X && + localy >= children[i]->Position.Y && + localx < children[i]->Position.X + children[i]->Size.X && + localy < children[i]->Position.Y + children[i]->Size.Y ) + { + childclicked = true; + GetParentState()->FocusComponent(children[i]); + children[i]->OnMouseClick(localx - children[i]->Position.X, localy - children[i]->Position.Y, button); + break; + } + } + } + + //if a child wasn't clicked, send click to ourself + if(!childclicked) + { + XOnMouseClick(localx, localy, button); + GetParentState()->FocusComponent(this); + } +} + +void Panel::OnMouseDown(int x, int y, unsigned button) +{ + XOnMouseDown(x, y, button); + for(int i = 0; i < children.size(); ++i) + { + if(!children[i]->Locked) + children[i]->OnMouseDown(x, y, button); + } +} + +void Panel::OnMouseHover(int localx, int localy) +{ + // check if hovering on children + for(int i = children.size() - 1; i >= 0; --i) + { + if(!children[i]->Locked) + { + if( localx >= children[i]->Position.X && + localy >= children[i]->Position.Y && + localx < children[i]->Position.X + children[i]->Size.X && + localy < children[i]->Position.Y + children[i]->Size.Y ) + { + children[i]->OnMouseHover(localx - children[i]->Position.X, localy - children[i]->Position.Y); + break; + } + } + } + + // always allow hover on parent (?) + XOnMouseHover(localx, localy); +} + +void Panel::OnMouseMoved(int localx, int localy, int dx, int dy) +{ + XOnMouseMoved(localx, localy, dx, dy); + for(int i = 0; i < children.size(); ++i) + { + if(!children[i]->Locked) + children[i]->OnMouseMoved(localx - children[i]->Position.X, localy - children[i]->Position.Y, dx, dy); + } +} + +void Panel::OnMouseMovedInside(int localx, int localy, int dx, int dy) +{ + for(int i = 0; i < children.size(); ++i) + { + if(!children[i]->Locked) + { + Point local (localx - children[i]->Position.X, localy - children[i]->Position.Y) + , prevlocal (local.X - dx, local.Y - dy); + + // mouse currently inside? + if( local.X >= 0 && + local.Y >= 0 && + local.X < children[i]->Size.X && + local.Y < children[i]->Size.Y ) + { + children[i]->OnMouseMovedInside(localx - children[i]->Position.X, localy - children[i]->Position.Y, dx, dy); + + // was the mouse outside? + if(!(prevlocal.X >= 0 && + prevlocal.Y >= 0 && + prevlocal.X < children[i]->Size.X && + prevlocal.Y < children[i]->Size.Y ) ) + { + children[i]->OnMouseEnter(local.X, local.Y); + } + } + // if not currently inside + else + { + // was the mouse inside? + if( prevlocal.X >= 0 && + prevlocal.Y >= 0 && + prevlocal.X < children[i]->Size.X && + prevlocal.Y < children[i]->Size.Y ) + { + children[i]->OnMouseLeave(local.X, local.Y); + } + + } + } + } + + // always allow hover on parent (?) + XOnMouseMovedInside(localx, localy, dx, dy); +} + +void Panel::OnMouseEnter(int localx, int localy) +{ + XOnMouseEnter(localx, localy); +} + +void Panel::OnMouseLeave(int localx, int localy) +{ + XOnMouseLeave(localx, localy); +} + +void Panel::OnMouseUnclick(int localx, int localy, unsigned button) +{ + bool childunclicked = false; + + //check if clicked a child + for(int i = children.size()-1; i >= 0 ; --i) + { + //child must be unlocked + if(!children[i]->Locked) + { + //is mouse inside? + if( localx >= children[i]->Position.X && + localy >= children[i]->Position.Y && + localx < children[i]->Position.X + children[i]->Size.X && + localy < children[i]->Position.Y + children[i]->Size.Y ) + { + childunclicked = true; + children[i]->OnMouseUnclick(localx - children[i]->Position.X, localy - children[i]->Position.Y, button); + break; + } + } + } + + //if a child wasn't clicked, send click to ourself + if(!childunclicked) + { + XOnMouseUnclick(localx, localy, button); + } +} + +void Panel::OnMouseUp(int x, int y, unsigned button) +{ + XOnMouseUp(x, y, button); + for(int i = 0; i < children.size(); ++i) + { + if(!children[i]->Locked) + children[i]->OnMouseUp(x, y, button); + } +} + +void Panel::OnMouseWheel(int localx, int localy, int d) +{ + XOnMouseWheel(localx, localy, d); + for(int i = 0; i < children.size(); ++i) + { + if(!children[i]->Locked) + children[i]->OnMouseWheel(localx - children[i]->Position.X, localy - children[i]->Position.Y, d); + } +} + +void Panel::OnMouseWheelInside(int localx, int localy, int d) +{ + XOnMouseWheelInside(localx, localy, d); + //check if clicked a child + for(int i = children.size()-1; i >= 0 ; --i) + { + //child must be unlocked + if(!children[i]->Locked) + { + //is mouse inside? + if( localx >= children[i]->Position.X && + localy >= children[i]->Position.Y && + localx < children[i]->Position.X + children[i]->Size.X && + localy < children[i]->Position.Y + children[i]->Size.Y ) + { + children[i]->OnMouseWheelInside(localx - children[i]->Position.X, localy - children[i]->Position.Y, d); + break; + } + } + } +} + +// ***** OVERRIDEABLES ***** +// Kept empty. + +void Panel::XDraw(const Point& screenPos) +{ +} + +void Panel::XTick(float dt) +{ +} + +void Panel::XOnKeyPress(int key, bool shift, bool ctrl, bool alt) +{ +} + +void Panel::XOnKeyRelease(int key, bool shift, bool ctrl, bool alt) { - // TODO Auto-generated constructor stub +} + +void Panel::XOnMouseClick(int localx, int localy, unsigned button) +{ +} +void Panel::XOnMouseDown(int x, int y, unsigned button) +{ +} + +void Panel::XOnMouseHover(int localx, int localy) +{ } -Panel::~Panel() { - // TODO Auto-generated destructor stub +void Panel::XOnMouseMoved(int localx, int localy, int dx, int dy) +{ +} + +void Panel::XOnMouseMovedInside(int localx, int localy, int dx, int dy) +{ +} + +void Panel::XOnMouseEnter(int localx, int localy) +{ } -} /* namespace ui */ +void Panel::XOnMouseLeave(int localx, int localy) +{ +} + +void Panel::XOnMouseUnclick(int localx, int localy, unsigned button) +{ +} + +void Panel::XOnMouseUp(int x, int y, unsigned button) +{ +} + +void Panel::XOnMouseWheel(int localx, int localy, int d) +{ +} + +void Panel::XOnMouseWheelInside(int localx, int localy, int d) +{ +} diff --git a/src/interface/Sandbox.cpp b/src/interface/Sandbox.cpp index 5e29bae..a9f1d9c 100644 --- a/src/interface/Sandbox.cpp +++ b/src/interface/Sandbox.cpp @@ -6,9 +6,11 @@ */ #include +#include #include "Config.h" +#include "interface/Point.h" #include "interface/Sandbox.h" #include "interface/Component.h" #include "Renderer.h" @@ -17,7 +19,8 @@ namespace ui { Sandbox::Sandbox(): - Component(0, 0, XRES, YRES), + Component(Point(0, 0), Point(XRES, YRES)), + pointQueue(std::queue()), ren(NULL), isMouseDown(false), activeElement(1) @@ -30,35 +33,33 @@ Simulation * Sandbox::GetSimulation() return sim; } -void Sandbox::OnMouseMovedInside(int localx, int localy, int dx, int dy) +void Sandbox::OnMouseMoved(int localx, int localy, int dx, int dy) { if(isMouseDown) { - sim->create_line(lastCoordX, lastCoordY, localx, localy, 2, 2, activeElement, 0); - lastCoordX = localx; - lastCoordY = localy; + pointQueue.push(new Point(localx-dx, localy-dy)); + pointQueue.push(new Point(localx, localy)); } } -void Sandbox::OnMouseDown(int localx, int localy, unsigned int button) +void Sandbox::OnMouseClick(int localx, int localy, unsigned int button) { - sim->create_line(localx, localy, localx, localy, 2, 2, activeElement, 0); - lastCoordX = localx; - lastCoordY = localy; isMouseDown = true; + pointQueue.push(new Point(localx, localy)); } -void Sandbox::OnMouseUp(int localx, int localy, unsigned int button) +void Sandbox::OnMouseUnclick(int localx, int localy, unsigned int button) { - sim->create_line(lastCoordX, lastCoordY, localx, localy, 2, 2, activeElement, 0); - lastCoordX = localx; - lastCoordY = localy; - isMouseDown = false; + if(isMouseDown) + { + isMouseDown = false; + pointQueue.push(new Point(localx, localy)); + } } -void Sandbox::Draw(void* userdata) +void Sandbox::Draw(const Point& screenPos) { - Graphics * g = reinterpret_cast(userdata); + Graphics * g = ui::Engine::Ref().g; if(!ren) ren = new Renderer(g, sim); ren->render_parts(); @@ -66,7 +67,32 @@ void Sandbox::Draw(void* userdata) void Sandbox::Tick(float delta) { + if(!pointQueue.empty()) + { + Point * sPoint = NULL; + while(!pointQueue.empty()) + { + Point * fPoint = pointQueue.front(); + pointQueue.pop(); + if(sPoint) + { + sim->create_line(fPoint->X, fPoint->Y, sPoint->X, sPoint->Y, 2, 2, activeElement, 0); + delete sPoint; + sPoint = fPoint; + } + else + { + sim->create_parts(fPoint->X, fPoint->Y, 2, 2, activeElement, 0); + } + if(sPoint) + delete sPoint; + sPoint = fPoint; + } + if(sPoint) + delete sPoint; + } sim->update_particles(); + sim->sys_pause = 1; } Sandbox::~Sandbox() { diff --git a/src/interface/State.cpp b/src/interface/State.cpp index 2828751..665e2e8 100644 --- a/src/interface/State.cpp +++ b/src/interface/State.cpp @@ -1,233 +1,291 @@ -/* - * State.cpp - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - #include -#include -#include - +#include "interface/Component.h" +#include "interface/Engine.h" #include "interface/State.h" +//#include "Platform.h" -namespace ui { +using namespace ui; -State::State(int w, int h): - mouseX(0), - mouseY(0), - mouseXP(0), - mouseYP(0), - width(w), - height(h), - Components() +State::State() +: UserData(NULL) +, focusedComponent_(NULL) { } State::~State() { - //Components.~vector(); // just in case // devnote : Nope.jpg Nate :3 -frankbro + for(unsigned i = 0, sz = Components.size(); i < sz; ++i) + if( Components[i] ) + delete Components[i]; +} + +void State::AddComponent(Component* c) +{ + // TODO: do a check if component was already added? + if(c->GetParentState()==NULL) + { + c->SetParentState(this); + Components.push_back(c); + } + else + { + //Component already has a state, don't sad it + } +} + +unsigned State::GetComponentCount() +{ + return Components.size(); +} + +Component* State::GetComponent(unsigned idx) +{ + return Components[idx]; +} + +void State::RemoveComponent(Component* c) +{ + // remove component WITHOUT freeing it. + for(unsigned i = 0; i < Components.size(); ++i) + { + // find the appropriate component index + if(Components[i] == c) + { + Components.erase(Components.begin() + i); + + // we're done + return; + } + } +} + +void State::RemoveComponent(unsigned idx) +{ + // free component and remove it. + delete Components[idx]; + Components.erase(Components.begin() + idx); } -void State::Add(Component* child) +bool State::IsFocused(const Component* c) const { - Components.push_back(child); - child->Parent = this; + return c == focusedComponent_; } -void State::Remove(Component* child) +void State::FocusComponent(Component* c) { - for(int i = 0; i < Components.size(); i++) - if(Components[i] == child) - { - Components.erase(Components.begin() + i); - break; - } + this->focusedComponent_ = c; } -void State::Draw(void* userdata) +void State::DoExit() { - //draw - for(int i = 0; i < Components.size(); i++) - { - if(Components[i]->Visible) - { - if(AllowExclusiveDrawing) - { - Components[i]->Draw(userdata); - } - else if( - Components[i]->X + Components[i]->Width >= 0 && - Components[i]->Y + Components[i]->Height >= 0 && - Components[i]->X < width && - Components[i]->Y < height ) - { - Components[i]->Draw(userdata); - } - } - } + + OnExit(); } -void State::Tick(float dt) +void State::DoInitialized() +{ + + OnInitialized(); +} + +void State::DoDraw() +{ + //draw + for(int i = 0, sz = Components.size(); i < sz; ++i) + if(Components[i]->Visible) + { + if(AllowExclusiveDrawing) + { + Point scrpos(Components[i]->Position.X, Components[i]->Position.Y); + Components[i]->Draw(scrpos); + } + else + { + if( Components[i]->Position.X + Components[i]->Size.X >= 0 && + Components[i]->Position.Y + Components[i]->Size.Y >= 0 && + Components[i]->Position.X < ui::Engine::Ref().GetWidth() && + Components[i]->Position.Y < ui::Engine::Ref().GetHeight() ) + { + Point scrpos(Components[i]->Position.X, Components[i]->Position.Y); + Components[i]->Draw( Point(scrpos) ); + } + } + } + + OnDraw(); +} + +void State::DoTick(float dt) { //on mouse hover - for(int i = 0; i < Components.size(); i++) - if( mouseX >= Components[i]->X && - mouseY >= Components[i]->Y && - mouseX < Components[i]->X + Components[i]->Width && - mouseY < Components[i]->Y + Components[i]->Height ) - { - if(Components[i]->Enabled) - { - Components[i]->OnMouseHover(mouseX, mouseY); - } + for(int i = Components.size() - 1; i >= 0; --i) + { + if(!Components[i]->Locked && + ui::Engine::Ref().GetMouseX() >= Components[i]->Position.X && + ui::Engine::Ref().GetMouseY() >= Components[i]->Position.Y && + ui::Engine::Ref().GetMouseX() < Components[i]->Position.X + Components[i]->Size.X && + ui::Engine::Ref().GetMouseY() < Components[i]->Position.Y + Components[i]->Size.Y ) + { + Components[i]->OnMouseHover(ui::Engine::Ref().GetMouseX() - Components[i]->Position.X, ui::Engine::Ref().GetMouseY() - Components[i]->Position.Y); break; } - + } + //tick - for(int i = 0; i < Components.size(); i++) + for(int i = 0, sz = Components.size(); i < sz; ++i) + { Components[i]->Tick(dt); + } + + OnTick(dt); } -void State::OnKeyPress(int key, bool shift, bool ctrl, bool alt) +void State::DoKeyPress(int key, bool shift, bool ctrl, bool alt) { //on key press if(focusedComponent_ != NULL) - if(focusedComponent_->Enabled) + { + if(!focusedComponent_->Locked) focusedComponent_->OnKeyPress(key, shift, ctrl, alt); + } + + OnKeyPress(key, shift, ctrl, alt); } -void State::OnKeyRelease(int key, bool shift, bool ctrl, bool alt) +void State::DoKeyRelease(int key, bool shift, bool ctrl, bool alt) { //on key unpress if(focusedComponent_ != NULL) - if(focusedComponent_->Enabled) + { + if(!focusedComponent_->Locked) focusedComponent_->OnKeyRelease(key, shift, ctrl, alt); + } + + OnKeyRelease(key, shift, ctrl, alt); } -void State::OnMouseDown(int x, int y, unsigned int button) +void State::DoMouseDown(int x, int y, unsigned button) { //on mouse click - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) - if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) + bool clickState = false; + for(int i = Components.size() - 1; i > -1 ; --i) + { + if(!Components[i]->Locked) + { + if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) { - Components[i]->OnMouseClick(x - Components[i]->X, y - Components[i]->Y, button); - this->focusedComponent_ = Components[i]; //set this component as the focused component + FocusComponent(Components[i]); + Components[i]->OnMouseClick(x - Components[i]->Position.X, y - Components[i]->Position.Y, button); + clickState = true; break; } + } + } + + if(!clickState) + FocusComponent(NULL); //on mouse down - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) - Components[i]->OnMouseDown(x - Components[i]->X, y - Components[i]->Y, button); + for(int i = Components.size() - 1; i > -1 ; --i) + { + if(!Components[i]->Locked) + Components[i]->OnMouseDown(x, y, button); + } + + OnMouseDown(x, y, button); } -void State::OnMouseMove(int x, int y) +void State::DoMouseMove(int x, int y, int dx, int dy) { - //update mouse coords - mouseX = x; - mouseY = y; - //on mouse move (if true, and inside) - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) + for(int i = Components.size() - 1; i > -1 ; --i) + { + if(!Components[i]->Locked) { - int localX = x - Components[i]->X; - int localY = y - Components[i]->Y; - int localXP = mouseXP - Components[i]->X; - int localYP = mouseYP - Components[i]->Y; - int dx = x - mouseXP; - int dy = x - mouseYP; - - Components[i]->OnMouseMoved(localX, localY, dx, dy); - - //is the mouse inside - if(localX >= 0 && - localY >= 0 && - localX < Components[i]->Width && - localY < Components[i]->Height ) - { - //was the mouse outside last tick? - if(localXP < 0 || - localXP >= Components[i]->Width || - localYP < 0 || - localYP >= Components[i]->Height ) - { - Components[i]->OnMouseEnter(localX, localY, dx, dy); - } - - Components[i]->OnMouseMovedInside(localX, localY, dx, dy); - - break; //found the top-most component under mouse, break that shit - } - //not inside, let's see if it used to be inside last tick - else if (localXP >= 0 && - localYP >= 0 && - localXP < Components[i]->Width && - localYP < Components[i]->Height ) - { - Components[i]->OnMouseLeave(localX, localY, x - mouseXP, y - mouseYP); - } - } - else //is locked - { - int localX = x - Components[i]->X; - int localY = y - Components[i]->Y; - - //is the mouse inside - if(localX >= 0 && - localY >= 0 && - localX < Components[i]->Width && - localY < Components[i]->Height ) - { - break; //it's the top-most component under the mouse, we don't want to go under it. - } + Point local (x - Components[i]->Position.X, y - Components[i]->Position.Y) + , a (local.X - dx, local.Y - dy); + + Components[i]->OnMouseMoved(local.X, local.Y, dx, dy); + + if(local.X >= 0 && + local.Y >= 0 && + local.X < Components[i]->Size.X && + local.Y < Components[i]->Size.Y ) + { + Components[i]->OnMouseMovedInside(local.X, local.Y, dx, dy); + + // entering? + if(!( + a.X >= 0 && + a.Y >= 0 && + a.X < Components[i]->Size.X && + a.Y < Components[i]->Size.Y )) + { + Components[i]->OnMouseEnter(local.X, local.Y); + } + } + else + { + // leaving? + if( a.X >= 0 && + a.Y >= 0 && + a.X < Components[i]->Size.X && + a.Y < Components[i]->Size.Y ) + { + Components[i]->OnMouseLeave(local.X, local.Y); + } + + } } - // end of for loop here + } - //set the previous mouse coords - mouseXP = x; - mouseYP = y; + OnMouseMove(x, y, dx, dy); } -void State::OnMouseUp(int x, int y, unsigned int button) +void State::DoMouseUp(int x, int y, unsigned button) { //on mouse unclick - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) - if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) + for(int i = Components.size() - 1; i >= 0 ; --i) + { + if(!Components[i]->Locked) + { + if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) { - Components[i]->OnMouseUnclick(x - Components[i]->X, y - Components[i]->Y, button); + Components[i]->OnMouseUnclick(x - Components[i]->Position.X, y - Components[i]->Position.Y, button); break; } + } + } //on mouse up - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) - Components[i]->OnMouseUp(x - Components[i]->X, y - Components[i]->Y, button); + for(int i = Components.size() - 1; i >= 0 ; --i) + { + if(!Components[i]->Locked) + Components[i]->OnMouseUp(x, y, button); + } + + OnMouseUp(x, y, button); } -void State::OnMouseWheel(int x, int y, int d) +void State::DoMouseWheel(int x, int y, int d) { - //focused mouse wheel - if(focusedComponent_ != NULL) - focusedComponent_->OnMouseWheelFocused(x - focusedComponent_->X, y - focusedComponent_->Y, d); - - //mouse wheel inside - for(int i = Components.size() - 1; i > -1 ; i--) - if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) + //on mouse wheel focused + for(int i = Components.size() - 1; i >= 0 ; --i) + { + if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) { - if(Components[i]->Enabled) - Components[i]->OnMouseWheelInside(x - Components[i]->X, y - Components[i]->Y, d); - break; //found top-most component under mouse + if(!Components[i]->Locked) + Components[i]->OnMouseWheelInside(x - Components[i]->Position.X, y - Components[i]->Position.Y, d); + break; } - + } + //on mouse wheel - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) - Components[i]->OnMouseWheel(x - Components[i]->X, y - Components[i]->Y, d); -} - + for(int i = Components.size() - 1; i >= 0 ; --i) + { + if(!Components[i]->Locked) + Components[i]->OnMouseWheel(x - Components[i]->Position.X, y - Components[i]->Position.Y, d); + } -} /* namespace ui */ + OnMouseWheel(x, y, d); +} diff --git a/src/interface/Window.cpp b/src/interface/Window.cpp deleted file mode 100644 index 624bf9a..0000000 --- a/src/interface/Window.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Window.cpp - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#include "interface/Window.h" - -namespace ui { - -Window::Window(): - State(width, height) -{ - // TODO Auto-generated constructor stub - -} - -Window::~Window() { - // TODO Auto-generated destructor stub -} - -} /* namespace ui */ -- cgit v0.9.2-21-gd62e From 2511afec8bfaa0582928406b37e8b579fa267e4f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 15 Jan 2012 19:35:40 +0000 Subject: More stuff, better events and starting on interface diff --git a/PowderToy++.files b/PowderToy++.files index f4bdd2f..bcc42cd 100644 --- a/PowderToy++.files +++ b/PowderToy++.files @@ -134,7 +134,6 @@ C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Simulation.cpp C:/Users/Simon/Projects/FacialTurd-PowderToypp/Changelog.txt src/interface/ControlFactory.cpp includes/interface/ControlFactory.h -src/GameSession.cpp includes/GameSession.h src/Console.cpp includes/Console.h @@ -151,3 +150,5 @@ includes/interface/Point.h includes/Singleton.h src/interface/Label.cpp includes/interface/Label.h +includes/Global.h +src/Global.cpp diff --git a/includes/Global.h b/includes/Global.h new file mode 100644 index 0000000..8e94255 --- /dev/null +++ b/includes/Global.h @@ -0,0 +1,14 @@ +#ifndef GAMESESSION_H +#define GAMESESSION_H + +#include "Singleton.h" +#include "Graphics.h" + +class Global : public Singleton +{ +public: + Graphics * g; + Global(); +}; + +#endif // GAMESESSION_H diff --git a/includes/interface/Button.h b/includes/interface/Button.h index 86688cf..9046ea1 100644 --- a/includes/interface/Button.h +++ b/includes/interface/Button.h @@ -39,9 +39,13 @@ namespace ui inline bool GetState() { return state; } virtual void DoAction(); //action of button what ever it may be + void SetTogglable(bool isTogglable); + bool GetTogglable(); + inline bool GetToggleState(); + inline void SetToggleState(bool state); protected: - bool isButtonDown, state, isMouseInside; + bool isButtonDown, state, isMouseInside, isTogglable, toggle; }; } #endif /* BUTTON_H_ */ diff --git a/includes/interface/ControlFactory.h b/includes/interface/ControlFactory.h index ba5f43b..0f8ad61 100644 --- a/includes/interface/ControlFactory.h +++ b/includes/interface/ControlFactory.h @@ -3,12 +3,11 @@ #include "Panel.h" #include "Engine.h" -#include "GameSession.h" class ControlFactory { public: - static ui::Panel * MainMenu(GameSession * session, int x, int y, int width, int height); + static ui::Panel * MainMenu(int x, int y, int width, int height); }; diff --git a/includes/interface/Engine.h b/includes/interface/Engine.h index 682a09d..6136fb4 100644 --- a/includes/interface/Engine.h +++ b/includes/interface/Engine.h @@ -30,7 +30,7 @@ namespace ui void onResize(int newWidth, int newHeight); void onClose(); - void Begin(int width, int height, SDL_Surface * surface); + void Begin(int width, int height); inline bool Running() { return running_; } void Exit(); @@ -46,7 +46,7 @@ namespace ui void SetState(State* state); inline State* GetState() { return state_; } - Graphics * g; + float FpsLimit; private: State* statequeued_; State* state_; diff --git a/includes/interface/Sandbox.h b/includes/interface/Sandbox.h index f4daa87..fb4a668 100644 --- a/includes/interface/Sandbox.h +++ b/includes/interface/Sandbox.h @@ -29,7 +29,7 @@ public: virtual Simulation * GetSimulation(); virtual void OnMouseMoved(int localx, int localy, int dx, int dy); virtual void OnMouseClick(int localx, int localy, unsigned int button); - virtual void OnMouseUnclick(int localx, int localy, unsigned int button); + virtual void OnMouseUp(int localx, int localy, unsigned int button); virtual void Draw(const Point& screenPos); virtual void Tick(float delta); virtual ~Sandbox(); diff --git a/src/Global.cpp b/src/Global.cpp new file mode 100644 index 0000000..7bf28f0 --- /dev/null +++ b/src/Global.cpp @@ -0,0 +1,5 @@ +#include "Global.h" + +Global::Global(){ + +} diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 7ede4d5..1e9630c 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -5,6 +5,7 @@ #include #include #include "Config.h" +#include "Global.h" #include "Simulation.h" #include "Renderer.h" #include "Graphics.h" @@ -17,7 +18,6 @@ #include "interface/ControlFactory.h" #include "interface/Point.h" #include "interface/Label.h" -#include "GameSession.h" using namespace std; @@ -44,9 +44,8 @@ SDL_Surface * SDLOpen() return SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_SWSURFACE); } -int SDLPoll(SDL_Event * event) +/*int SDLPoll(SDL_Event * event) { - event->type = 0; while (SDL_PollEvent(event)) { switch (event->type) @@ -56,50 +55,60 @@ int SDLPoll(SDL_Event * event) } } return 0; -} +}*/ int main(int argc, char * argv[]) { int elapsedTime = 0, currentTime = 0, lastTime = 0, currentFrame = 0; - float fps, fpsLimit, delta; + float fps = 0, fpsLimit = 30, delta = 1.0f; //Renderer * ren; //Simulation * sim = new Simulation(); //ren = new Renderer(g, sim); - GameSession * gameSession = new GameSession(); + Global::Ref().g = new Graphics(); + Global::Ref().g->AttachSDLSurface(SDLOpen()); + ui::Engine * engine = &ui::Engine::Ref();//new ui::Engine(); ui::State * engineState = new ui::State(); ui::Sandbox * sandbox = new ui::Sandbox(); ui::Button * button = new ui::Button(ui::Point(100, 100), ui::Point(100, 100), std::string("poP")); ui::Label * fpsLabel = new ui::Label(ui::Point(2, 2), ui::Point(200, 14), std::string("FPS: 0")); - engine->Begin(XRES, YRES, SDLOpen()); + engine->Begin(XRES, YRES); engine->SetState(engineState); engineState->AddComponent(fpsLabel); engineState->AddComponent(sandbox); engineState->AddComponent(button); - //window->Add(ControlFactory::MainMenu(gameSession, 0, 0, 200, 200)); + engineState->AddComponent(ControlFactory::MainMenu(0, YRES+MENUSIZE-17, XRES+BARSIZE, 16)); SDL_Event event; - while(!SDLPoll(&event)) + while(engine->Running()) { - //mouseButton = SDL_GetMouseState(&mouseX, &mouseY); - switch(event.type) + event.type = 0; + while (SDL_PollEvent(&event)) { - case SDL_KEYDOWN: - break; - case SDL_KEYUP: - break; - case SDL_MOUSEMOTION: - engine->onMouseMove(event.motion.x, event.motion.y); - break; - case SDL_MOUSEBUTTONDOWN: - engine->onMouseClick(event.motion.x, event.motion.y, event.button.button); - break; - case SDL_MOUSEBUTTONUP: - engine->onMouseUnclick(event.motion.x, event.motion.y, event.button.button); - break; + switch (event.type) + { + case SDL_QUIT: + engine->Exit(); + break; + case SDL_KEYDOWN: + break; + case SDL_KEYUP: + break; + case SDL_MOUSEMOTION: + engine->onMouseMove(event.motion.x, event.motion.y); + break; + case SDL_MOUSEBUTTONDOWN: + engine->onMouseClick(event.motion.x, event.motion.y, event.button.button); + break; + case SDL_MOUSEBUTTONUP: + engine->onMouseUnclick(event.motion.x, event.motion.y, event.button.button); + break; + } + event.type = 0; //Clear last event } + //mouseButton = SDL_GetMouseState(&mouseX, &mouseY); fpsLabel->LabelText = ""; stringstream fpsText; fpsText << "FPS: " << fps; @@ -111,6 +120,15 @@ int main(int argc, char * argv[]) currentFrame++; currentTime = SDL_GetTicks(); elapsedTime = currentTime - lastTime; + if((currentFrame>2 || elapsedTime > 1000*2/ui::Engine::Ref().FpsLimit) && elapsedTime && currentFrame*1000/elapsedTime > ui::Engine::Ref().FpsLimit) + { + while (currentFrame*1000/elapsedTime > ui::Engine::Ref().FpsLimit) + { + SDL_Delay(1); + currentTime = SDL_GetTicks(); + elapsedTime = currentTime-lastTime; + } + } if(elapsedTime>=1000) { fps = (((float)currentFrame)/((float)elapsedTime))*1000.0f; diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index e34f66c..6ea9854 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -9,6 +9,7 @@ #include "interface/Button.h" #include "Graphics.h" +#include "Global.h" namespace ui { @@ -16,7 +17,8 @@ Button::Button(State* parent_state, std::string buttonText): Component(parent_state), ButtonText(buttonText), isMouseInside(false), - isButtonDown(false) + isButtonDown(false), + isTogglable(false) { } @@ -25,7 +27,8 @@ Button::Button(Point position, Point size, std::string buttonText): Component(position, size), ButtonText(buttonText), isMouseInside(false), - isButtonDown(false) + isButtonDown(false), + isTogglable(false) { } @@ -34,17 +37,42 @@ Button::Button(std::string buttonText): Component(), ButtonText(buttonText), isMouseInside(false), - isButtonDown(false) + isButtonDown(false), + isTogglable(false) { } +void Button::SetTogglable(bool togglable) +{ + toggle = false; + isTogglable = togglable; +} + +bool Button::GetTogglable() +{ + return isTogglable; +} + +inline bool Button::GetToggleState() +{ + return toggle; +} + +inline void Button::SetToggleState(bool state) +{ + toggle = state; +} + + + void Button::Draw(const Point& screenPos) { - Graphics * g = ui::Engine::Ref().g; + Graphics * g = Global::Ref().g; + Point Position = screenPos; // = reinterpret_cast(userdata); //TODO: Cache text location, that way we don't have the text alignment code here - if(isButtonDown) + if(isButtonDown || (isTogglable && toggle)) { g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); g->drawtext(Position.X+(Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2, Position.Y+(Size.Y-10)/2, ButtonText, 0, 0, 0, 255); @@ -111,20 +139,21 @@ void Button::OnMouseUnclick(int x, int y, unsigned int button) void Button::OnMouseClick(int x, int y, unsigned int button) { - std::cout << "Click!" << std::endl; if(button != 1) return; //left click only! + if(isTogglable) + { + toggle = !toggle; + } isButtonDown = true; } void Button::OnMouseEnter(int x, int y) { - std::cout << "Enter!"<RemoveComponent(this); + if(GetParentState()) + GetParentState()->RemoveComponent(this); new_parent->children.push_back(this); } this->_parent = new_parent; diff --git a/src/interface/ControlFactory.cpp b/src/interface/ControlFactory.cpp index 25822cd..372ed31 100644 --- a/src/interface/ControlFactory.cpp +++ b/src/interface/ControlFactory.cpp @@ -4,9 +4,56 @@ #include "interface/Panel.h" #include "interface/Engine.h" -ui::Panel * ControlFactory::MainMenu(GameSession * session, int x, int y, int width, int height) +ui::Panel * ControlFactory::MainMenu(int x, int y, int width, int height) { + int currentX = 1; + width -= 2; + ui::Button * tempButton; ui::Panel * mainMenu = new ui::Panel(ui::Point(x, y), ui::Point(width, height)); - //mainMenu->Add(new ui::Button(0, 0, 20, 20, "Turd")); + + tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\x81"); + mainMenu->AddChild(tempButton); //Open + currentX += 18; + + tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\x91"); + mainMenu->AddChild(tempButton); //Reload + currentX += 18; + + tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(width/4, height-2), "\x82 [Save]"); //Save + mainMenu->AddChild(tempButton); + currentX += tempButton->Size.X+2; + + tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\xCB"); + mainMenu->AddChild(tempButton); //Vote Up + currentX += 16; + tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\xCA"); + mainMenu->AddChild(tempButton); //Vote Down + currentX += 18; + + tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(width - currentX - (4 * 18) - (width / 5), height-2), "[Tags]"); //Tags + currentX += tempButton->Size.X+2; + mainMenu->AddChild(tempButton); + + tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\xCF"); + mainMenu->AddChild(tempButton); //Settings + currentX += 18; + + tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\x92"); + mainMenu->AddChild(tempButton); //Clear + currentX += 18; + + tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(width - currentX - (2 * 18), height-2), "\x84 [Login]"); //Login + currentX += tempButton->Size.X+2; + mainMenu->AddChild(tempButton); + + tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\xD8"); + mainMenu->AddChild(tempButton); //Render options + currentX += 18; + + tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\x90"); //Pause + tempButton->SetTogglable(true); + mainMenu->AddChild(tempButton); + currentX += 18; + return mainMenu; } diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 4468561..25f2038 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -1,3 +1,7 @@ +#include + +#include "Config.h" +#include "Global.h" #include "interface/Platform.h" #include "interface/Engine.h" #include "interface/State.h" @@ -5,15 +9,14 @@ using namespace ui; -Engine::Engine() -: - g(NULL), -state_(NULL), -statequeued_(NULL), -mousex_(0), -mousey_(0), -mousexp_(0), -mouseyp_(0) +Engine::Engine(): + state_(NULL), + statequeued_(NULL), + mousex_(0), + mousey_(0), + mousexp_(0), + mouseyp_(0), + FpsLimit(60.0f) { } @@ -23,10 +26,8 @@ Engine::~Engine() delete state_; } -void Engine::Begin(int width, int height, SDL_Surface * surface) +void Engine::Begin(int width, int height) { - g = new Graphics(); - g->AttachSDLSurface(surface); //engine is now ready running_ = true; @@ -82,8 +83,8 @@ void Engine::Draw() { if(state_) state_->DoDraw(); - g->Blit(); - g->Clear(); + Global::Ref().g->Blit(); + Global::Ref().g->Clear(); } void Engine::onKeyPress(int key, bool shift, bool ctrl, bool alt) @@ -115,7 +116,9 @@ void Engine::onMouseMove(int x, int y) mousex_ = x; mousey_ = y; if(state_) + { state_->DoMouseMove(x, y, mousex_ - mousexp_, mousey_ - mouseyp_); + } mousexp_ = x; mouseyp_ = y; } diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp index 3a5ea85..c77b6bf 100644 --- a/src/interface/Label.cpp +++ b/src/interface/Label.cpp @@ -1,4 +1,6 @@ #include +#include "Config.h" +#include "Global.h" #include "interface/Point.h" #include "interface/Label.h" @@ -33,6 +35,6 @@ Label::~Label() void Label::Draw(const Point& screenPos) { - Graphics * g = ui::Engine::Ref().g; + Graphics * g = Global::Ref().g; g->drawtext(Position.X+(Size.X-Graphics::textwidth((char *)LabelText.c_str()))/2, Position.Y+(Size.Y-10)/2, LabelText, 255, 255, 255, 255); } diff --git a/src/interface/Sandbox.cpp b/src/interface/Sandbox.cpp index a9f1d9c..a9760e7 100644 --- a/src/interface/Sandbox.cpp +++ b/src/interface/Sandbox.cpp @@ -9,6 +9,7 @@ #include #include "Config.h" +#include "Global.h" #include "interface/Point.h" #include "interface/Sandbox.h" @@ -48,7 +49,7 @@ void Sandbox::OnMouseClick(int localx, int localy, unsigned int button) pointQueue.push(new Point(localx, localy)); } -void Sandbox::OnMouseUnclick(int localx, int localy, unsigned int button) +void Sandbox::OnMouseUp(int localx, int localy, unsigned int button) { if(isMouseDown) { @@ -59,7 +60,7 @@ void Sandbox::OnMouseUnclick(int localx, int localy, unsigned int button) void Sandbox::Draw(const Point& screenPos) { - Graphics * g = ui::Engine::Ref().g; + Graphics * g = Global::Ref().g; if(!ren) ren = new Renderer(g, sim); ren->render_parts(); @@ -76,16 +77,13 @@ void Sandbox::Tick(float delta) pointQueue.pop(); if(sPoint) { - sim->create_line(fPoint->X, fPoint->Y, sPoint->X, sPoint->Y, 2, 2, activeElement, 0); + sim->create_line(fPoint->X, fPoint->Y, sPoint->X, sPoint->Y, 1, 1, activeElement, 0); delete sPoint; - sPoint = fPoint; } else { - sim->create_parts(fPoint->X, fPoint->Y, 2, 2, activeElement, 0); + sim->create_parts(fPoint->X, fPoint->Y, 1, 1, activeElement, 0); } - if(sPoint) - delete sPoint; sPoint = fPoint; } if(sPoint) -- cgit v0.9.2-21-gd62e From 6273089bf486bf46ad325d72c7290ebb272bd3d8 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 15 Jan 2012 22:33:34 +0000 Subject: Fix inline functions diff --git a/Makefile b/Makefile index 4e345b4..7bbac6d 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ UI_OBJS := $(patsubst src/interface/%.cpp,build/obj/ui/%.o,$(UI_SOURCES)) UI_PREREQ := $(patsubst build/obj/ui/%.o,build/obj/ui/%.powder.exe.o,$(UI_OBJS)) CFLAGS := -Iincludes/ -Idata/ -DWIN32 -DWINCONSOLE -OFLAGS := #-O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -fkeep-inline-functions +OFLAGS := -fkeep-inline-functions #-O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 # -mwindows CFLAGS += $(OFLAGS) -- cgit v0.9.2-21-gd62e From 4a60b97c700c2f1843b7e99313554cb89fb5da4e Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Jan 2012 20:46:06 +0000 Subject: Some minor changes diff --git a/Makefile b/Makefile index 7bbac6d..4d20bfc 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,12 @@ -HEADERS := $(wildcard includes/*.h) +HEADERS := $(wildcard src/*.h) $(wildcard src/*/*.h) -OLD_SOURCES := $(wildcard src/*.c) -OLD_OBJS := $(patsubst src/%.c,build/obj/%.o,$(OLD_SOURCES)) +SOURCES := $(wildcard src/*.cpp) $(wildcard src/*/*.cpp) +OBJS += $(patsubst src/%.cpp,build/obj/powder.exe/%.o,$(SOURCES)) -EL_SOURCES := $(wildcard elements/*.cpp) -EL_OBJS := $(patsubst elements/%.cpp,build/obj/elements/%.o,$(EL_SOURCES)) -EL_PREREQ := $(patsubst build/obj/elements/%.o,build/obj/elements/%.powder.exe.o,$(EL_OBJS)) +FOLDERS := $(sort $(dir $(OBJS))) -CORE_SOURCES := $(wildcard src/*.cpp) -CORE_OBJS := $(patsubst src/%.cpp,build/obj/core/%.o,$(CORE_SOURCES)) -CORE_PREREQ := $(patsubst build/obj/core/%.o,build/obj/core/%.powder.exe.o,$(CORE_OBJS)) - -UI_SOURCES := $(wildcard src/interface/*.cpp) -UI_OBJS := $(patsubst src/interface/%.cpp,build/obj/ui/%.o,$(UI_SOURCES)) -UI_PREREQ := $(patsubst build/obj/ui/%.o,build/obj/ui/%.powder.exe.o,$(UI_OBJS)) - -CFLAGS := -Iincludes/ -Idata/ -DWIN32 -DWINCONSOLE -OFLAGS := -fkeep-inline-functions #-O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations +CFLAGS := -Wno-deprecated -Wno-deprecated-declarations -Isrc/ -Idata/ -DWIN32 -DWINCONSOLE +OFLAGS := -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -msse2 -fkeep-inline-functions LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 # -mwindows CFLAGS += $(OFLAGS) @@ -28,14 +18,15 @@ WIN_RES := i686-w64-mingw32-windres all: build/powder.exe powder.exe: build/powder.exe -build/powder.exe: $(EL_PREREQ) $(CORE_PREREQ) $(UI_PREREQ) - $(CPPC) $(CFLAGS) $(LDFLAGS) $(EXTRA_OBJS) $(EL_PREREQ) $(CORE_PREREQ) $(UI_PREREQ) $(LFLAGS) -o $@ -ggdb -build/obj/ui/%.powder.exe.o: src/interface/%.cpp $(HEADERS) - $(CPPC) -c $(CFLAGS) -o $@ $< -ggdb -build/obj/elements/%.powder.exe.o: elements/%.cpp $(HEADERS) - $(CPPC) -c $(CFLAGS) -o $@ $< -ggdb -build/obj/core/%.powder.exe.o: src/%.cpp $(HEADERS) + +build/powder.exe: buildpaths $(OBJS) + echo $(OBJS) + $(CPPC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LFLAGS) -o $@ -ggdb +build/obj/powder.exe/%.o: src/%.cpp $(HEADERS) $(CPPC) -c $(CFLAGS) -o $@ $< -ggdb +buildpaths: + $(shell mkdir build/obj/powder.exe/) + $(shell mkdir $(FOLDERS)) clean: rm build/obj/core/*.o diff --git a/PowderToy++.files b/PowderToy++.files index bcc42cd..5a30285 100644 --- a/PowderToy++.files +++ b/PowderToy++.files @@ -152,3 +152,159 @@ src/interface/Label.cpp includes/interface/Label.h includes/Global.h src/Global.cpp +src/search/SearchModel.h +src/search/SearchModel.cpp +src/search/Save.h +src/search/SearchView.h +src/search/SearchView.cpp +src/search/SearchController.h +src/search/SearchController.cpp +src/game/GameController.h +src/game/GameController.cpp +src/game/GameModel.h +src/game/GameModel.cpp +src/interface/Window.h +src/interface/Window.cpp +src/game/GameView.h +src/game/GameView.cpp +src/Singleton.h +src/Simulation.h +src/Renderer.h +src/Misc.h +src/Gravity.h +src/Graphics.h +src/Global.h +src/Elements.h +src/ElementGraphics.h +src/ElementFunctions.h +src/Element.h +src/Console.h +src/Config.h +src/Air.h +src/Simulation.cpp +src/Renderer.cpp +src/PowderToy.cpp +src/Misc.cpp +src/Gravity.cpp +src/Graphics.cpp +src/Global.cpp +src/Console.cpp +src/Air.cpp +src/elements/yest.cpp +src/elements/wtrv.cpp +src/elements/wire.cpp +src/elements/wifi.cpp +src/elements/watr.cpp +src/elements/warp.cpp +src/elements/vine.cpp +src/elements/uran.cpp +src/elements/thrm.cpp +src/elements/thdr.cpp +src/elements/swch.cpp +src/elements/stor.cpp +src/elements/stkm2.cpp +src/elements/stkm.cpp +src/elements/sprk.cpp +src/elements/spng.cpp +src/elements/soap.cpp +src/elements/smke.cpp +src/elements/sltw.cpp +src/elements/sing.cpp +src/elements/shld.cpp +src/elements/rime.cpp +src/elements/qrtz.cpp +src/elements/pyro.cpp +src/elements/pvod.cpp +src/elements/pump.cpp +src/elements/prto.cpp +src/elements/prti.cpp +src/elements/plut.cpp +src/elements/plsm.cpp +src/elements/plnt.cpp +src/elements/pipe.cpp +src/elements/phot.cpp +src/elements/pcln.cpp +src/elements/pbcn.cpp +src/elements/O2.cpp +src/elements/nwhl.cpp +src/elements/nptct.cpp +src/elements/none.cpp +src/elements/newgraphics.cpp +src/elements/neut.cpp +src/elements/nbhl.cpp +src/elements/mort.cpp +src/elements/merc.cpp +src/elements/ligh.cpp +src/elements/legacy.cpp +src/elements/lcry.cpp +src/elements/lava.cpp +src/elements/isz.cpp +src/elements/iron.cpp +src/elements/ignt.cpp +src/elements/ice.cpp +src/elements/hswc.cpp +src/elements/h2.cpp +src/elements/graphics_default.cpp +src/elements/gpmp.cpp +src/elements/goo.cpp +src/elements/glow.cpp +src/elements/glas.cpp +src/elements/gbmb.cpp +src/elements/fwrk.cpp +src/elements/fuse.cpp +src/elements/fsep.cpp +src/elements/frzz.cpp +src/elements/frzw.cpp +src/elements/fog.cpp +src/elements/firw.cpp +src/elements/fire.cpp +src/elements/figh.cpp +src/elements/emp.cpp +src/elements/elementmisc.cpp +src/elements/elec.cpp +src/elements/dstw.cpp +src/elements/dlay.cpp +src/elements/deut.cpp +src/elements/dest.cpp +src/elements/conv.cpp +src/elements/coal.cpp +src/elements/co2.cpp +src/elements/clst.cpp +src/elements/clne.cpp +src/elements/cbnw.cpp +src/elements/caus.cpp +src/elements/c5.cpp +src/elements/btry.cpp +src/elements/brmt.cpp +src/elements/boyl.cpp +src/elements/bomb.cpp +src/elements/bmtl.cpp +src/elements/bizr.cpp +src/elements/bcol.cpp +src/elements/bcln.cpp +src/elements/bang.cpp +src/elements/aray.cpp +src/elements/anar.cpp +src/elements/amtr.cpp +src/elements/acid.cpp +src/elements/acel.cpp +src/interface/Window.h +src/interface/State.h +src/interface/Sandbox.h +src/interface/Point.h +src/interface/Platform.h +src/interface/Panel.h +src/interface/Label.h +src/interface/Engine.h +src/interface/ControlFactory.h +src/interface/Component.h +src/interface/Button.h +src/interface/Window.cpp +src/interface/State.cpp +src/interface/Sandbox.cpp +src/interface/Panel.cpp +src/interface/Label.cpp +src/interface/Engine.cpp +src/interface/ControlFactory.cpp +src/interface/Component.cpp +src/interface/Button.cpp diff --git a/build/obj/core/.empty b/build/obj/core/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/build/obj/elements/.empty b/build/obj/elements/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/build/obj/ui/.empty b/build/obj/ui/.empty deleted file mode 100644 index e69de29..0000000 diff --git a/elements/O2.cpp b/elements/O2.cpp deleted file mode 100644 index 78b4229..0000000 --- a/elements/O2.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "element.h" - -int update_O2(UPDATE_FUNC_ARGS) -{ - int r,rx,ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>=0 && x+rx>8].temp+=(rand()/(RAND_MAX/100)); - if(parts[r>>8].tmp&0x01) - parts[r>>8].temp=3473; - parts[r>>8].tmp |= 2; - } - if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM) - { - sim->create_part(i,x,y,PT_FIRE); - parts[i].temp+=(rand()/(RAND_MAX/100)); - parts[i].tmp |= 2; - } - - } - return 0; -} diff --git a/elements/acel.cpp b/elements/acel.cpp deleted file mode 100644 index 7ab9684..0000000 --- a/elements/acel.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "element.h" - -int update_ACEL(UPDATE_FUNC_ARGS) { - int r, rx, ry; - parts[i].tmp = 0; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; - if ((r>>8)>=NPART || !r) - continue; - if(sim->ptypes[r&0xFF].properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) - { - parts[r>>8].vx *= 1.1f; - parts[r>>8].vy *= 1.1f; - parts[i].tmp = 1; - } - } - return 0; -} - -int graphics_ACEL(GRAPHICS_FUNC_ARGS) -{ - if(cpart->tmp) - *pixel_mode |= PMODE_GLOW; - return 0; -} -int update_DCEL(UPDATE_FUNC_ARGS) { - int r, rx, ry; - parts[i].tmp = 0; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; - if ((r>>8)>=NPART || !r) - continue; - if(sim->ptypes[r&0xFF].properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) - { - parts[r>>8].vx *= 0.9f; - parts[r>>8].vy *= 0.9f; - parts[i].tmp = 1; - } - } - return 0; -} - -int graphics_DCEL(GRAPHICS_FUNC_ARGS) -{ - if(cpart->tmp) - *pixel_mode |= PMODE_GLOW; - return 0; -} diff --git a/elements/acid.cpp b/elements/acid.cpp deleted file mode 100644 index 3a72b9d..0000000 --- a/elements/acid.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include "element.h" - -int update_ACID(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, np; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxpart_change_type(i,x,y,PT_FIRE); - sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); - parts[i].life = 4; - parts[r>>8].life = 4; - } - else if ((r&0xFF)==PT_WTRV) - { - if(!(rand()%250)) - { - sim->part_change_type(i, x, y, PT_CAUS); - parts[i].life = (rand()%50)+25; - sim->kill_part(r>>8); - } - } - else if (((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && sim->ptypes[r&0xFF].hardness>(rand()%1000))&&parts[i].life>=50) - { - if (sim->parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid - { - float newtemp = ((60.0f-(float)sim->ptypes[r&0xFF].hardness))*7.0f; - if(newtemp < 0){ - newtemp = 0; - } - parts[i].temp += newtemp; - parts[i].life--; - sim->kill_part(r>>8); - } - } - else if (parts[i].life<=50) - { - sim->kill_part(i); - return 1; - } - } - } - for ( trade = 0; trade<2; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rx>8)>=NPART || !r) - continue; - if ((r&0xFF)==PT_ACID&&(parts[i].life>parts[r>>8].life)&&parts[i].life>0)//diffusion - { - int temp = parts[i].life - parts[r>>8].life; - if (temp ==1) - { - parts[r>>8].life ++; - parts[i].life --; - } - else if (temp>0) - { - parts[r>>8].life += temp/2; - parts[i].life -= temp/2; - } - } - } - } - return 0; -} diff --git a/elements/amtr.cpp b/elements/amtr.cpp deleted file mode 100644 index d119cc9..0000000 --- a/elements/amtr.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "element.h" - -int update_AMTR(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxkill_part(i); - return 1; - } - if (10>(rand()/(RAND_MAX/100))) - sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); - else - sim->kill_part(r>>8); - sim->pv[y/CELL][x/CELL] -= 2.0f; - } - } - return 0; -} diff --git a/elements/anar.cpp b/elements/anar.cpp deleted file mode 100644 index 83eaf5a..0000000 --- a/elements/anar.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "element.h" - -int update_ANAR(UPDATE_FUNC_ARGS) { - int r, rx, ry; - - //if (parts[i].temp >= 0.23) - // parts[i].temp --; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%22) - { - sim->part_change_type(i,x,y,PT_HFLM); - parts[i].life = rand()%150+50; - parts[r>>8].temp = parts[i].temp = 0; - sim->pv[y/CELL][x/CELL] -= 0.5; - } - } - } - return 0; -} diff --git a/elements/aray.cpp b/elements/aray.cpp deleted file mode 100644 index 65b0d53..0000000 --- a/elements/aray.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include "element.h" - -int update_ARAY(UPDATE_FUNC_ARGS) { - int r, nxx, nyy, docontinue, nxi, nyi, rx, ry, nr, ry1, rx1; - if (parts[i].life==0) { - int colored =0; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN)?1:0; - int nostop = (parts[r>>8].ctype==PT_INST)?1:0; - for (docontinue = 1, nxx = 0, nyy = 0, nxi = rx*-1, nyi = ry*-1; docontinue; nyy+=nyi, nxx+=nxi) { - if (!(x+nxi+nxx= 0 && y+nyi+nyy >= 0)) { - break; - } - r = pmap[y+nyi+nyy][x+nxi+nxx]; - if (!r) { - int nr = sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_BRAY); - if (nr!=-1) { - if (destroy) {//if it came from PSCN - parts[nr].tmp = 2; - parts[nr].life = 2; - } else - parts[nr].ctype = colored; - parts[nr].temp = parts[i].temp; - } - } else if (!destroy) { - if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==0) {//if it hits another BRAY that isn't red - if (nyy!=0 || nxx!=0) { - parts[r>>8].life = 1020;//makes it last a while - parts[r>>8].tmp = 1; - if (!parts[r>>8].ctype)//and colors it if it isn't already - parts[r>>8].ctype = colored; - } - docontinue = 0;//then stop it - } else if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==1) {//if it hits one that already was a long life, reset it - parts[r>>8].life = 1020; - //docontinue = 1; - } else if ((r&0xFF)==PT_FILT) {//get color if passed through FILT - colored = parts[r>>8].ctype; - //this if prevents BRAY from stopping on certain materials - } else if ((r&0xFF)!=PT_STOR && (r&0xFF)!=PT_INWR && (r&0xFF)!=PT_ARAY && (r&0xFF)!=PT_WIFI && !((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { - if (nyy!=0 || nxx!=0) { - sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK); - } - //if (!(nostop && (ptypes[r&0xFF].properties&PROP_CONDUCTS))) { - if (!(nostop && parts[r>>8].ctype >= 0 && parts[r>>8].ctype < PT_NUM && (sim->ptypes[parts[r>>8].ctype].properties&PROP_CONDUCTS))) { - docontinue = 0; - } else { - docontinue = 1; - } - } else if((r&0xFF)==PT_STOR) { - if(parts[r>>8].tmp) - { - //Cause STOR to release - for(ry1 = 1; ry1 >= -1; ry1--){ - for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ - int np = sim->create_part(-1, x+nxi+nxx+rx1, y+nyi+nyy+ry1, parts[r>>8].tmp); - if (np!=-1) - { - parts[np].temp = parts[r>>8].temp; - parts[np].life = parts[r>>8].flags; - parts[np].tmp = parts[r>>8].pavg[0]; - parts[np].ctype = parts[r>>8].pavg[1]; - parts[r>>8].tmp = 0; - parts[r>>8].life = 10; - break; - } - } - } - } - else - { - parts[r>>8].life = 10; - } - } - } else if (destroy) { - if ((r&0xFF)==PT_BRAY) { - parts[r>>8].life = 1; - docontinue = 1; - //this if prevents red BRAY from stopping on certain materials - } else if ((r&0xFF)==PT_STOR || (r&0xFF)==PT_INWR || (r&0xFF)==PT_ARAY || (r&0xFF)==PT_WIFI || (r&0xFF)==PT_FILT || ((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { - if((r&0xFF)==PT_STOR) - { - parts[r>>8].tmp = 0; - parts[r>>8].life = 0; - } - docontinue = 1; - } else { - docontinue = 0; - } - } - } - } - //parts[i].life = 4; - } - } - return 0; -} diff --git a/elements/bang.cpp b/elements/bang.cpp deleted file mode 100644 index 658a567..0000000 --- a/elements/bang.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include "element.h" - -int update_BANG(UPDATE_FUNC_ARGS) { - int r, rx, ry, nb; - if(parts[i].tmp==0) - { - if(parts[i].temp>=673.0f) - parts[i].tmp = 1; - else - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxflood_prop(x, y, offsetof(Particle, tmp), &tempvalue, 0); - } - else if(parts[i].tmp==2) - { - parts[i].tmp = 3; - } - else if(parts[i].tmp>=3) - { - float otemp = parts[i].temp-275.13f; - //Explode!! - sim->pv[y/CELL][x/CELL] += 0.5f; - parts[i].tmp = 0; - if(!(rand()%3)) - { - if(!(rand()%2)) - { - sim->create_part(i, x, y, PT_FIRE); - parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); - } - else - { - sim->create_part(i, x, y, PT_SMKE); - parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); - } - } - else - { - if(!(rand()%15)) - { - sim->create_part(i, x, y, PT_BOMB); - parts[i].tmp = 1; - parts[i].life = 50; - parts[i].temp = restrict_flt((MAX_TEMP/3)+otemp, MIN_TEMP, MAX_TEMP); - parts[i].vx = rand()%20-10; - parts[i].vy = rand()%20-10; - } - else - { - sim->kill_part(i); - } - } - return 1; - } - return 0; -} diff --git a/elements/bcln.cpp b/elements/bcln.cpp deleted file mode 100644 index 8c00f95..0000000 --- a/elements/bcln.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "element.h" - -int update_BCLN(UPDATE_FUNC_ARGS) { - if (!parts[i].life && sim->pv[y/CELL][x/CELL]>4.0f) - parts[i].life = rand()%40+80; - if (parts[i].life) - { - float advection = 0.1f; - parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; - parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; - } - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) - { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && - (r&0xFF)!=PT_STKM2 && (r&0xFF)!=PT_PBCN && - (r&0xFF)>8].ctype; - } - } - } - else { - if (parts[i].ctype==PT_LIFE) sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); - else sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); - } - return 0; -} diff --git a/elements/bcol.cpp b/elements/bcol.cpp deleted file mode 100644 index d941508..0000000 --- a/elements/bcol.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include "element.h" - -int update_BCOL(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, temp; - if (parts[i].life<=0) { - sim->create_part(i, x, y, PT_FIRE); - return 1; - } else if (parts[i].life < 100) { - parts[i].life--; - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); - } - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) - { - if (parts[i].life>100) { - parts[i].life = 99; - } - } - if ((r&0xFF)==PT_LAVA && 1>(rand()%500)) - { - if (parts[r>>8].ctype == PT_IRON) { - parts[r>>8].ctype = PT_METL; - sim->kill_part(i); - return 1; - } - } - } - /*if(100-parts[i].life > parts[i].tmp2) - parts[i].tmp2 = 100-parts[i].life; - if(parts[i].tmp2 < 0) parts[i].tmp2 = 0; - for ( trade = 0; trade<4; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion - { - int temp = parts[i].tmp2 - parts[r>>8].tmp2; - if(temp < 10) - continue; - if (temp ==1) - { - parts[r>>8].tmp2 ++; - parts[i].tmp2 --; - } - else if (temp>0) - { - parts[r>>8].tmp2 += temp/2; - parts[i].tmp2 -= temp/2; - } - } - } - }*/ - if(parts[i].temp > parts[i].tmp2) - parts[i].tmp2 = parts[i].temp; - return 0; -} diff --git a/elements/bizr.cpp b/elements/bizr.cpp deleted file mode 100644 index 538b87f..0000000 --- a/elements/bizr.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "element.h" - -//Used by ALL 3 BIZR states -int update_BIZR(UPDATE_FUNC_ARGS) { - int r, rx, ry, nr, ng, nb, na; - float tr, tg, tb, ta, mr, mg, mb, ma; - float blend; - if(parts[i].dcolour){ - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; - tg = (parts[r>>8].dcolour>>8)&0xFF; - tb = (parts[r>>8].dcolour)&0xFF; - ta = (parts[r>>8].dcolour>>24)&0xFF; - - mr = (parts[i].dcolour>>16)&0xFF; - mg = (parts[i].dcolour>>8)&0xFF; - mb = (parts[i].dcolour)&0xFF; - ma = (parts[i].dcolour>>24)&0xFF; - - nr = (tr*blend) + (mr*(1-blend)); - ng = (tg*blend) + (mg*(1-blend)); - nb = (tb*blend) + (mb*(1-blend)); - na = (ta*blend) + (ma*(1-blend)); - - parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; - } - } - } - if(((r = sim->photons[y][x])&0xFF)==PT_PHOT || ((r = pmap[y][x])&0xFF)==PT_PHOT) - { - sim->part_change_type(r>>8, x, y, PT_ELEC); - parts[r>>8].ctype = 0; - } - return 0; -} diff --git a/elements/bmtl.cpp b/elements/bmtl.cpp deleted file mode 100644 index a3dc4b8..0000000 --- a/elements/bmtl.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "element.h" - -int update_BMTL(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, tempFactor; - if (parts[i].tmp>1) - { - parts[i].tmp--; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type; - if ((rt==PT_METL || rt==PT_IRON) && 1>(rand()/(RAND_MAX/100))) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_BMTL); - parts[r>>8].tmp=(parts[i].tmp<=7)?parts[i].tmp=1:parts[i].tmp-(rand()%5);//rand()/(RAND_MAX/300)+100; - } - } - } - else if (parts[i].tmp==1 && 1>rand()%1000) - { - parts[i].tmp = 0; - sim->part_change_type(i,x,y,PT_BRMT); - } - return 0; -} diff --git a/elements/bomb.cpp b/elements/bomb.cpp deleted file mode 100644 index b2e9e7d..0000000 --- a/elements/bomb.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include "element.h" - -int update_BOMB(UPDATE_FUNC_ARGS) { - int r, rx, ry, nb; - //Spark is used so much now that it should be a seperate element. - if (parts[i].tmp==1) { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties & (TYPE_SOLID | TYPE_PART | TYPE_LIQUID) && !(sim->ptypes[r&0xFF].properties & PROP_SPARKSETTLE)) { - sim->kill_part(i); - return 1; - } - } - } else if (parts[i].tmp==0) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+nxi, y+nxj, PT_BOMB); - if (nb!=-1) { - parts[nb].tmp = 1; - parts[nb].life = 50; - parts[nb].temp = MAX_TEMP; - parts[nb].vx = rand()%20-10; - parts[nb].vy = rand()%20-10; - } - } - for (nxj=-rad; nxj<=rad; nxj++) - for (nxi=-rad; nxi<=rad; nxi++) - if ((pow(nxi,2))/(pow(rad,2))+(pow(nxj,2))/(pow(rad,2))<=1) - if ((pmap[y+nxj][x+nxi]&0xFF)!=PT_DMND && (pmap[y+nxj][x+nxi]&0xFF)!=PT_CLNE && (pmap[y+nxj][x+nxi]&0xFF)!=PT_PCLN && (pmap[y+nxj][x+nxi]&0xFF)!=PT_BCLN) { - sim->delete_part(x+nxi, y+nxj, 0);//it SHOULD kill anything but the exceptions above, doesn't seem to always work - sim->pv[(y+nxj)/CELL][(x+nxi)/CELL] += 0.1f; - nb = sim->create_part(-1, x+nxi, y+nxj, PT_BOMB); - if (nb!=-1) { - parts[nb].tmp = 2; - parts[nb].life = 2; - parts[nb].temp = MAX_TEMP; - } - } - //create_parts(x, y, 9, 9, PT_BOMB); - //create_parts(x, y, 8, 8, PT_NONE); - sim->kill_part(i); - return 1; - } - } - } - return 0; -} -int graphics_BOMB(GRAPHICS_FUNC_ARGS) -{ - if (cpart->tmp==0) { - //Normal bomb - *pixel_mode |= PMODE_FLARE; - } - else if(cpart->tmp==2) - { - //Flash - *pixel_mode = PMODE_FLAT | FIRE_ADD; - *colr = *colg = *colb = *firer = *fireg = *fireb = *firea = 255; - } - else - { - //Flying spark - *pixel_mode = PMODE_SPARK | PMODE_ADD; - *cola = 4*cpart->life; - } - return 0; -} diff --git a/elements/boyl.cpp b/elements/boyl.cpp deleted file mode 100644 index e4ee6d2..0000000 --- a/elements/boyl.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "element.h" - -int update_BOYL(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (sim->pv[y/CELL][x/CELL]<(parts[i].temp/100)) - sim->pv[y/CELL][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL]); - if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp/100)) - sim->pv[y/CELL+1][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL+1][x/CELL]); - if (x+CELLpv[y/CELL][x/CELL+1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL+1]); - if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL+1][x/CELL+1]); - } - if (y-CELL>=0 && sim->pv[y/CELL-1][x/CELL]<(parts[i].temp/100)) - sim->pv[y/CELL-1][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL-1][x/CELL]); - if (x-CELL>=0) - { - sim->pv[y/CELL][x/CELL-1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL-1]); - if (y-CELL>=0) - sim->pv[y/CELL-1][x/CELL-1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL-1][x/CELL-1]); - } - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && - x+rxrand()%30) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_FOG); - } - else if ((r&0xFF)==PT_O2 && 1>rand()%9) - { - sim->kill_part(r>>8); - sim->part_change_type(i,x,y,PT_WATR); - sim->pv[y/CELL][x/CELL] += 4.0; - } - } - return 0; -} diff --git a/elements/brmt.cpp b/elements/brmt.cpp deleted file mode 100644 index c23bd99..0000000 --- a/elements/brmt.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "element.h" - -int update_BRMT(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, tempFactor; - if (parts[i].temp > (250.0f+273.15f)) - { - printf("%f\n", (250.0f+273.15f)-parts[i].temp); - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type; - tempFactor = 1000 - (((250.0f+273.15f)-parts[i].temp)*2); - if(tempFactor < 2) - tempFactor = 2; - if ((rt==PT_BREC) && 1 > (rand()%tempFactor)) - { - if(rand()%2) - { - sim->create_part(r>>8, x+rx, y+ry, PT_THRM); - } - else - { sim->create_part(i, x, y, PT_THRM); - } - return 1; - //part_change_type(r>>8,x+rx,y+ry,PT_BMTL); - //parts[r>>8].tmp=(parts[i].tmp<=7)?parts[i].tmp=1:parts[i].tmp-(rand()%5);//rand()/(RAND_MAX/300)+100; - } - } - } - return 0; -} diff --git a/elements/btry.cpp b/elements/btry.cpp deleted file mode 100644 index 3f11003..0000000 --- a/elements/btry.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "element.h" - -int update_BTRY(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type; - if (sim->parts_avg(i,r>>8,PT_INSL) != PT_INSL) - { - if ((sim->ptypes[rt].properties&PROP_CONDUCTS) && !(rt==PT_WATR||rt==PT_SLTW||rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR) && parts[r>>8].life==0 && abs(rx)+abs(ry) < 4) - { - parts[r>>8].life = 4; - parts[r>>8].ctype = rt; - sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - } - } - } - return 0; -} diff --git a/elements/c5.cpp b/elements/c5.cpp deleted file mode 100644 index 412245f..0000000 --- a/elements/c5.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "element.h" - -int update_C5(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].temp<100)||(r&0xFF)==PT_HFLM) - { - if (1>rand()%6) - { - sim->part_change_type(i,x,y,PT_HFLM); - parts[r>>8].temp = parts[i].temp = 0; - parts[i].life = rand()%150+50; - sim->pv[y/CELL][x/CELL] += 1.5; - } - } - } - return 0; -} diff --git a/elements/caus.cpp b/elements/caus.cpp deleted file mode 100644 index 2ec268e..0000000 --- a/elements/caus.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "element.h" - -int update_CAUS(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, np; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].hardness>(rand()%1000))&&parts[i].life>=50) - { - if (sim->parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid - { - float newtemp = ((60.0f-(float)sim->ptypes[r&0xFF].hardness))*7.0f; - if(newtemp < 0){ - newtemp = 0; - } - parts[i].temp += newtemp; - parts[i].life--; - sim->kill_part(r>>8); - } - } - else if (parts[i].life<=50) - { - sim->kill_part(i); - return 1; - } - } - } - return 0; -} diff --git a/elements/cbnw.cpp b/elements/cbnw.cpp deleted file mode 100644 index cf0c13e..0000000 --- a/elements/cbnw.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include "element.h" - -int update_CBNW(UPDATE_FUNC_ARGS) { - int r, rx, ry, oldt; - oldt = parts[i].tmp; - if (sim->pv[y/CELL][x/CELL]<=3) - { - if(20>(rand()%80000)) - { - sim->part_change_type(i,x,y,PT_CO2); - parts[i].ctype = 5; - sim->pv[y/CELL][x/CELL] += 0.5f; - } - else if(sim->pv[y/CELL][x/CELL]<=-0.5) - { - sim->part_change_type(i,x,y,PT_CO2); - parts[i].ctype = 5; - sim->pv[y/CELL][x/CELL] += 0.5f; - } - } - if (parts[i].tmp>0) - parts[i].tmp--; - if(!(rand()%200)) - { - parts[i].tmp2 = rand()%40; - } else if(parts[i].tmp2!=20) { - parts[i].tmp2 -= (parts[i].tmp2>20)?1:-1; - } - if(oldt==1) - { - //Explode - if(rand()%4) - { - sim->part_change_type(i,x,y,PT_CO2); - parts[i].ctype = 5; - sim->pv[y/CELL][x/CELL] += 0.2f; - } - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties&TYPE_PART) && parts[i].tmp == 0 && 1>(rand()%250)) - { - //Start explode - parts[i].tmp = rand()%25;//(rand()%100)+50; - } - else if((sim->ptypes[r&0xFF].properties&TYPE_SOLID) && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_GLAS && parts[i].tmp == 0 && (2-sim->pv[y/CELL][x/CELL])>(rand()%20000)) - { - if(rand()%2) - { - sim->part_change_type(i,x,y,PT_CO2); - parts[i].ctype = 5; - sim->pv[y/CELL][x/CELL] += 0.2f; - } - } - if ((r&0xFF)==PT_CBNW) - { - if(!parts[i].tmp && parts[r>>8].tmp) - { - parts[i].tmp = parts[r>>8].tmp; - if((r>>8)>i) //If the other particle hasn't been life updated - parts[i].tmp--; - } - else if(parts[i].tmp && !parts[r>>8].tmp) - { - parts[r>>8].tmp = parts[i].tmp; - if((r>>8)>i) //If the other particle hasn't been life updated - parts[r>>8].tmp++; - } - } - if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - } - if ((r&0xFF)==PT_FIRE){ - sim->kill_part(r>>8); - if(1>(rand()%150)){ - sim->kill_part(i); - return 1; - } - } - } - return 0; -} diff --git a/elements/clne.cpp b/elements/clne.cpp deleted file mode 100644 index 13b25b9..0000000 --- a/elements/clne.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "element.h" - -int update_CLNE(UPDATE_FUNC_ARGS) { - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) - { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && - (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && - (r&0xFF)>8].ctype; - } - } - } - else { - if (parts[i].ctype==PT_LIFE) sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); - else sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); - } - return 0; -} diff --git a/elements/clst.cpp b/elements/clst.cpp deleted file mode 100644 index 2c31d87..0000000 --- a/elements/clst.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "element.h" - -int update_CLST(UPDATE_FUNC_ARGS) { - int r, rx, ry; - float cxy; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%1500)) - { - sim->part_change_type(i,x,y,PT_PSTS); - sim->kill_part(r>>8); - } - if ((r&0xFF)==PT_NITR) - { - sim->create_part(i, x, y, PT_BANG); - sim->create_part(r>>8, x+rx, y+ry, PT_BANG); - } - if ((r&0xFF)==PT_CLST) - { - if(parts[i].temp <195) - cxy = 0.05; - if(parts[i].temp >= 195 && parts[i].temp <295) - cxy = 0.015; - if(parts[i].temp >= 295 && parts[i].temp <350) - cxy = 0.01; - if(parts[i].temp > 350) - cxy = 0.005; - parts[i].vx += cxy*rx; - parts[i].vy += cxy*ry;//These two can be set not to calculate over 350 later. They do virtually nothing over 0.005. - } - } - return 0; -} diff --git a/elements/co2.cpp b/elements/co2.cpp deleted file mode 100644 index 5a3bbf5..0000000 --- a/elements/co2.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "element.h" - -int update_CO2(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%40000)&&parts[i].ctype==5) - { - parts[i].ctype = 0; - sim->create_part(-3, x, y, PT_WATR); - } - if ((r>>8)>=NPART || !r) - continue; - if ((r&0xFF)==PT_FIRE){ - sim->kill_part(r>>8); - if(1>(rand()%150)){ - sim->kill_part(i); - return 1; - } - } - if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW) && 1>(rand()%250)) - { - sim->part_change_type(i,x,y,PT_CBNW); - sim->kill_part(r>>8); - } - } - return 0; -} diff --git a/elements/coal.cpp b/elements/coal.cpp deleted file mode 100644 index 256aa69..0000000 --- a/elements/coal.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include "element.h" - -int update_COAL(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, temp; - if (parts[i].life<=0) { - sim->create_part(i, x, y, PT_FIRE); - return 1; - } else if (parts[i].life < 100) { - parts[i].life--; - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); - } - if ((sim->pv[y/CELL][x/CELL] > 4.3f)&&parts[i].tmp>40) - parts[i].tmp=39; - else if (parts[i].tmp<40&&parts[i].tmp>0) - parts[i].tmp--; - else if (parts[i].tmp<=0) { - sim->create_part(i, x, y, PT_BCOL); - return 1; - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) - { - if (parts[i].life>100) { - parts[i].life = 99; - } - } - if ((r&0xFF)==PT_LAVA && 1>(rand()%500)) - { - if (parts[r>>8].ctype == PT_IRON) { - parts[r>>8].ctype = PT_METL; - sim->kill_part(i); - return 1; - } - } - } - /*if(100-parts[i].life > parts[i].tmp2) - parts[i].tmp2 = 100-parts[i].life; - if(parts[i].tmp2 < 0) parts[i].tmp2 = 0; - for ( trade = 0; trade<4; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion - { - int temp = parts[i].tmp2 - parts[r>>8].tmp2; - if(temp < 10) - continue; - if (temp ==1) - { - parts[r>>8].tmp2 ++; - parts[i].tmp2 --; - } - else if (temp>0) - { - parts[r>>8].tmp2 += temp/2; - parts[i].tmp2 -= temp/2; - } - } - } - }*/ - if(parts[i].temp > parts[i].tmp2) - parts[i].tmp2 = parts[i].temp; - return 0; -} diff --git a/elements/conv.cpp b/elements/conv.cpp deleted file mode 100644 index ce4ee48..0000000 --- a/elements/conv.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "element.h" - -int update_CONV(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && - (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && - (r&0xFF)!=PT_CONV && (r&0xFF)>8].ctype; - } - } - } - else if(parts[i].ctype>0 && parts[i].ctype=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if((r&0xFF)!=PT_CONV && (r&0xFF)!=parts[i].ctype) - { - if (parts[i].ctype==PT_LIFE) sim->create_part(r>>8, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); - else sim->create_part(r>>8, x+rx, y+ry, parts[i].ctype); - } - } - } - return 0; -} diff --git a/elements/dest.cpp b/elements/dest.cpp deleted file mode 100644 index 014fad4..0000000 --- a/elements/dest.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "element.h" - -int update_DEST(UPDATE_FUNC_ARGS) { - int r,rx,ry,topv; - rx=rand()%5-2; - ry=rand()%5-2; - - r = pmap[y+ry][x+rx]; - if (!r || (r&0xFF)==PT_DEST || (r&0xFF)==PT_DMND) - return 0; - - if (parts[i].life<=0 || parts[i].life>37) - { - parts[i].life=30+rand()%20; - parts[i].temp+=20000; - sim->pv[y/CELL][x/CELL]+=60.0f; - } - parts[i].temp+=10000; - if ((r&0xFF)==PT_PLUT || (r&0xFF)==PT_DEUT) - { - sim->pv[y/CELL][x/CELL]+=20.0f; - parts[i].temp+=18000; - if (rand()%2==0) - { - float orig_temp = parts[r>>8].temp; - sim->create_part(r>>8, x+rx, y+ry, PT_NEUT); - parts[r>>8].temp = restrict_flt(orig_temp+40000.0f, MIN_TEMP, MAX_TEMP); - sim->pv[y/CELL][x/CELL] += 10.0f; - parts[i].life-=4; - } - } - else if ((r&0xFF)==PT_INSL) - { - sim->create_part(r>>8, x+rx, y+ry, PT_PLSM); - } - else if (rand()%3==0) - { - sim->kill_part(r>>8); - parts[i].life -= 4*((sim->ptypes[r&0xFF].properties&TYPE_SOLID)?3:1); - if (parts[i].life<=0) - parts[i].life=1; - parts[i].temp+=10000; - } - else - { - if (sim->ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+10000.0f, MIN_TEMP, MAX_TEMP); - } - topv=sim->pv[y/CELL][x/CELL]/9+parts[r>>8].temp/900; - if (topv>40.0f) - topv=40.0f; - sim->pv[y/CELL][x/CELL]+=40.0f+topv; - parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); - return 0; -} -int graphics_DEST(GRAPHICS_FUNC_ARGS) -{ - if(cpart->life) - { - *pixel_mode |= PMODE_LFLARE; - } - else - { - *pixel_mode |= PMODE_SPARK; - } - return 0; -} diff --git a/elements/deut.cpp b/elements/deut.cpp deleted file mode 100644 index 03de364..0000000 --- a/elements/deut.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include "element.h" - -int update_DEUT(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, np; - int maxlife = ((10000/(parts[i].temp + 1))-1); - if ((10000%((int)parts[i].temp+1))>rand()%((int)parts[i].temp+1)) - maxlife ++; - if (parts[i].life < maxlife) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=maxlife)) - continue; - if ((r&0xFF)==PT_DEUT&&33>=rand()/(RAND_MAX/100)+1) - { - if ((parts[i].life + parts[r>>8].life + 1) <= maxlife) - { - parts[i].life += parts[r>>8].life + 1; - sim->kill_part(r>>8); - } - } - } - } - else - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create deut - { - np = sim->create_part(-1,x+rx,y+ry,PT_DEUT); - if (np<0) continue; - parts[i].life--; - parts[np].temp = parts[i].temp; - parts[np].life = 0; - } - } - for ( trade = 0; trade<4; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].life)&&parts[i].life>0)//diffusion - { - int temp = parts[i].life - parts[r>>8].life; - if (temp ==1) - { - parts[r>>8].life ++; - parts[i].life --; - } - else if (temp>0) - { - parts[r>>8].life += temp/2; - parts[i].life -= temp/2; - } - } - } - } - return 0; -} - -int graphics_DEUT(GRAPHICS_FUNC_ARGS) -{ - if(cpart->life>=700) - { - *colr += cpart->life*1; - *colg += cpart->life*2; - *colb += cpart->life*3; - *pixel_mode |= PMODE_GLOW; - } - else - { - *colr += cpart->life*1; - *colg += cpart->life*2; - *colb += cpart->life*3; - *pixel_mode |= PMODE_BLUR; - } - return 0; -} diff --git a/elements/dlay.cpp b/elements/dlay.cpp deleted file mode 100644 index 4643b30..0000000 --- a/elements/dlay.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include "element.h" - -int update_DLAY(UPDATE_FUNC_ARGS) { - int r, rx, ry, oldl; - oldl = parts[i].life; - if (parts[i].life>0) - parts[i].life--; - //if (parts[i].life==1) - //{ - if (parts[i].temp>=256.0+273.15) - parts[i].temp=256.0+273.15; - if (parts[i].temp<= -256.0+273.15) - parts[i].temp = -256.0+273.15; - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN) - { - parts[i].life = (int)(parts[i].temp-273.15); - } - else if ((r&0xFF)==PT_DLAY) - { - if(!parts[i].life && parts[r>>8].life) - { - parts[i].life = parts[r>>8].life; - if((r>>8)>i) //If the other particle hasn't been life updated - parts[i].life--; - } - else if(parts[i].life && !parts[r>>8].life) - { - parts[r>>8].life = parts[i].life; - if((r>>8)>i) //If the other particle hasn't been life updated - parts[r>>8].life++; - } - } - else if((r&0xFF)==PT_NSCN && oldl==1) - { - sim->create_part(-1, x+rx, y+ry, PT_SPRK); - } - } - //} - return 0; -} diff --git a/elements/dstw.cpp b/elements/dstw.cpp deleted file mode 100644 index 03ae7dd..0000000 --- a/elements/dstw.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "element.h" - -int update_DSTW(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) - { - sim->part_change_type(i,x,y,PT_SLTW); - sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); - } - if (((r&0xFF)==PT_WATR||(r&0xFF)==PT_SLTW) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_WATR); - } - if ((r&0xFF)==PT_SLTW && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_SLTW); - } - if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>12.0f) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - } - if ((r&0xFF)==PT_FIRE){ - sim->kill_part(r>>8); - if(1>(rand()%150)){ - sim->kill_part(i); - return 1; - } - } - } - return 0; -} diff --git a/elements/elec.cpp b/elements/elec.cpp deleted file mode 100644 index 6b06f8f..0000000 --- a/elements/elec.cpp +++ /dev/null @@ -1,101 +0,0 @@ -#include "element.h" - -int update_ELEC(UPDATE_FUNC_ARGS) { - int r, rt, rx, ry, nb, rrx, rry; - float rr, rrr; - parts[i].pavg[0] = x; - parts[i].pavg[1] = y; - if(pmap[y][x]==PT_GLOW) - { - sim->part_change_type(i, x, y, PT_PHOT); - } - for (rx=-2; rx<=2; rx++) - for (ry=-2; ry<=2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)==PT_GLAS) - { - //fire_r[y/CELL][x/CELL] += rand()%200; //D: Doesn't work with OpenGL, also shouldn't be here TODO: FIX THIS SHIT - //fire_g[y/CELL][x/CELL] += rand()%200; - //fire_b[y/CELL][x/CELL] += rand()%200; - for (rrx=-1; rrx<=1; rrx++) - { - for (rry=-1; rry<=1; rry++) - { - if (x+rx+rrx>=0 && y+ry+rry>=0 && x+rx+rrxcreate_part(-1, x+rx+rrx, y+ry+rry, PT_BOMB); - if (nb!=-1) { - parts[nb].tmp = 1; - parts[nb].life = 50; - parts[nb].temp = 400.0f; - parts[nb].vx = rand()%20-10; - parts[nb].vy = rand()%20-10; - } - } - } - } - sim->kill_part(i); - return 1; - } - if ((r&0xFF)==PT_LCRY) - { - parts[r>>8].tmp2 = 5+rand()%5; - } - if ((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_CBNW) - { - if(rand()%2) - { - sim->create_part(r>>8, x+rx, y+ry, PT_H2); - sim->part_change_type(i, x, y, PT_O2); - parts[i].life = 0; - parts[i].ctype = 0; - return 1; - } - else - { - sim->create_part(r>>8, x+rx, y+ry, PT_O2); - sim->part_change_type(i, x, y, PT_H2); - parts[i].life = 0; - parts[i].ctype = 0; - return 1; - } - } - if ((r&0xFF)==PT_NEUT) - { - sim->part_change_type(r>>8, x+rx, y+ry, PT_H2); - parts[r>>8].life = 0; - parts[r>>8].ctype = 0; - } - if ((r&0xFF)==PT_DEUT) - { - if(parts[r>>8].life < 6000) - parts[r>>8].life += 1; - parts[r>>8].temp = 0; - parts[i].temp = 0; - sim->kill_part(i); - return 1; - } - if (sim->ptypes[r&0xFF].properties & PROP_CONDUCTS) - { - sim->create_part(-1, x+rx, y+ry, PT_SPRK); - sim->kill_part(i); - return 1; - } - } - return 0; -} - -int graphics_ELEC(GRAPHICS_FUNC_ARGS) -{ - *firea = 70; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode |= FIRE_ADD; - return 0; -} diff --git a/elements/elementmisc.cpp b/elements/elementmisc.cpp deleted file mode 100644 index a169e80..0000000 --- a/elements/elementmisc.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "element.h" - -int update_MISC(UPDATE_FUNC_ARGS) { - /*int t = parts[i].type; - if (t==PT_LOVE) - ISLOVE=1; - else if (t==PT_LOLZ) - ISLOLZ=1; - else if (t==PT_GRAV) - ISGRAV=1;*/ - return 0; -} diff --git a/elements/emp.cpp b/elements/emp.cpp deleted file mode 100644 index a187196..0000000 --- a/elements/emp.cpp +++ /dev/null @@ -1,128 +0,0 @@ -#include "element.h" - -int update_EMP(UPDATE_FUNC_ARGS) { - int r,rx,ry,ok=0,t,n,nx,ny; - if (parts[i].life) - return 0; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>=0 && x+rx40) - // emp_decor=40; - for (r=0; r<=sim->parts_lastActiveIndex; r++) - { - t=parts[r].type; - rx=parts[r].x; - ry=parts[r].y; - if (t==PT_SPRK || (t==PT_SWCH && parts[r].life!=0 && parts[r].life!=10) || (t==PT_WIRE && parts[r].ctype>0)) - { - int is_elec=0; - if ((parts[r].ctype==PT_PSCN || parts[r].ctype==PT_NSCN || parts[r].ctype==PT_PTCT || - parts[r].ctype==PT_NTCT || parts[r].ctype==PT_INST || parts[r].ctype==PT_SWCH) || t==PT_WIRE || t==PT_SWCH) - { - is_elec=1; - if (sim->ptypes[parts[r].type].hconduct && rand()%100==0) - parts[r].temp = restrict_flt(parts[r].temp+3000.0f, MIN_TEMP, MAX_TEMP); - if (rand()%80==0) - sim->part_change_type(r, rx, ry, PT_BREC); - else if (rand()%120==0) - sim->part_change_type(r, rx, ry, PT_NTCT); - } - - for (nx=-2; nx<3; nx++) - for (ny=-2; ny<3; ny++) - if (rx+nx>=0 && ry+ny>=0 && rx+nx>8, rx+nx, ry+ny, PT_PLSM); - parts[n>>8].life=rand()%100+70; - parts[n>>8].temp+=3000; - }*/ - - //Some elements should only be affected by wire/swch, or by a spark on inst/semiconductor - //So not affected by spark on metl, watr etc - if (is_elec) - { - if (((n&0xFF)==PT_METL || (n&0xFF)==PT_BMTL) && rand()%280==0) - { - parts[n>>8].temp = restrict_flt(parts[n>>8].temp+3000.0f, MIN_TEMP, MAX_TEMP); - } - if ((n&0xFF)==PT_BMTL && rand()%160==0) - { - sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BMTL);//TODO: Redundant, was this meant to be BRMT or something? - parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); - } - if ((n&0xFF)==PT_METL && rand()%300==0) - { - sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BMTL); - } - if ((n&0xFF)==PT_WIFI && rand()%8==0) - { - //Randomise channel - parts[n>>8].temp = rand()%MAX_TEMP; - } - if ((n&0xFF)==PT_WIFI && rand()%16==0) - { - sim->create_part(n>>8, rx+nx, ry+ny, PT_BREC); - parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); - } - } - if ((n&0xFF)==PT_SWCH && rand()%100==0) - { - sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BREC); - } - if ((n&0xFF)==PT_SWCH && rand()%100==0) - { - parts[n>>8].temp = restrict_flt(parts[n>>8].temp+2000.0f, MIN_TEMP, MAX_TEMP); - } - if ((n&0xFF)==PT_ARAY && rand()%60==0) - { - sim->create_part(n>>8, rx+nx, ry+ny, PT_BREC); - parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); - } - if (t==PT_DLAY && rand()%70==0) - { - //Randomise delay - parts[n>>8].temp = (rand()%256) + 273.15f; - } - } - } - } - return 0; -} -int graphics_EMP(GRAPHICS_FUNC_ARGS) -{ - if(cpart->life) - { - *colr = cpart->life*1.5; - *colg = cpart->life*1.5; - *colb = 200-(cpart->life); - if (*colr>255) - *colr = 255; - if (*colg>255) - *colg = 255; - if (*colb>255) - *colb = 255; - if (*colb<=0) - *colb = 0; - } - return 0; -} diff --git a/elements/figh.cpp b/elements/figh.cpp deleted file mode 100644 index 8b18871..0000000 --- a/elements/figh.cpp +++ /dev/null @@ -1,105 +0,0 @@ -#include "element.h" - -int update_FIGH(UPDATE_FUNC_ARGS) -{ - playerst* figh = &sim->fighters[(unsigned char)parts[i].tmp]; - - float tarx, tary; - - parts[i].tmp2 = 0; //0 - stay in place, 1 - seek a stick man - - //Set target cords - if (sim->player.spwn) - { - if (sim->player2.spwn) - if ((pow(sim->player.legs[2]-x, 2) + pow(sim->player.legs[3]-y, 2))<= - (pow(sim->player2.legs[2]-x, 2) + pow(sim->player2.legs[3]-y, 2))) - { - tarx = sim->player.legs[2]; - tary = sim->player.legs[3]; - } - else - { - tarx = sim->player2.legs[2]; - tary = sim->player2.legs[3]; - } - else - { - tarx = sim->player.legs[2]; - tary = sim->player.legs[3]; - } - - parts[i].tmp2 = 1; - } - else - if (sim->player2.spwn) - { - tarx = sim->player2.legs[2]; - tary = sim->player2.legs[3]; - - parts[i].tmp2 = 1; - } - - switch (parts[i].tmp2) - { - case 1: - if ((pow(tarx-x, 2) + pow(tary-y, 2))<600) - { - if (figh->elem == PT_LIGH || figh->elem == PT_NEUT - || (sim->ptypes[figh->elem].properties&(PROP_DEADLY|PROP_RADIOACTIVE)) - || sim->ptypes[figh->elem].heat>=323 || sim->ptypes[figh->elem].heat<=243) - figh->comm = (int)figh->comm | 0x08; - } - else - if (tarxeval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+6, NULL)) - figh->comm = 0x01; - else - figh->comm = 0x02; - - if (!sim->eval_move(PT_DUST, figh->legs[4]-4, figh->legs[5]-1, NULL) - || !sim->eval_move(PT_DUST, figh->legs[12]-4, figh->legs[13]-1, NULL) - || sim->eval_move(PT_DUST, 2*figh->legs[4]-figh->legs[6], figh->legs[5]+5, NULL)) - figh->comm = (int)figh->comm | 0x04; - } - else - { - if (!sim->eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+6, NULL)) - figh->comm = 0x02; - else - figh->comm = 0x01; - - if (!sim->eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL) - || !sim->eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL) - || sim->eval_move(PT_DUST, 2*figh->legs[12]-figh->legs[14], figh->legs[13]+5, NULL)) - figh->comm = (int)figh->comm | 0x04; - } - break; - default: - figh->comm = 0; - break; - } - - figh->pcomm = figh->comm; - - run_stickman(figh, UPDATE_FUNC_SUBCALL_ARGS); - return 0; -} - -int graphics_FIGH(GRAPHICS_FUNC_ARGS) -{ - playerst * cplayer;// = &sim->fighters[(unsigned char)cpart->tmp]; - *pixel_mode = PSPEC_STICKMAN; - /*if (cplayer->elemptypes[cplayer->elem].pcolors); - *colg = PIXG(sim->ptypes[cplayer->elem].pcolors); - *colb = PIXB(sim->ptypes[cplayer->elem].pcolors); - } - else*/ - { - *colr = *colg = *colb = 255; - } - return 1; -} diff --git a/elements/fire.cpp b/elements/fire.cpp deleted file mode 100644 index 1f9c0c2..0000000 --- a/elements/fire.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "element.h" - -int graphics_FIRE(GRAPHICS_FUNC_ARGS) -{ - int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); - *colr = (unsigned char)ren->flm_data[caddress]; - *colg = (unsigned char)ren->flm_data[caddress+1]; - *colb = (unsigned char)ren->flm_data[caddress+2]; - - *firea = 255; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel - *pixel_mode |= FIRE_ADD; - //Returning 0 means dynamic, do not cache - return 0; -} diff --git a/elements/firw.cpp b/elements/firw.cpp deleted file mode 100644 index 74605b0..0000000 --- a/elements/firw.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "element.h" - -int update_FIRW(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, np; - if (parts[i].tmp==0) { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type; - if (rt==PT_FIRE||rt==PT_PLSM||rt==PT_THDR) - { - parts[i].tmp = 1; - parts[i].life = rand()%50+60; - } - } - } - else if (parts[i].tmp==1) { - if (parts[i].life==0) { - parts[i].tmp=2; - } else { - float newVel = parts[i].life/25; - parts[i].flags = parts[i].flags&0xFFFFFFFE; - /* TODO: - if ((pmap[(int)(ly-newVel)][(int)lx]&0xFF)==PT_NONE && ly-newVel>0) { - parts[i].vy = -newVel; - ly-=newVel; - iy-=newVel; - }*/ - parts[i].vy = -newVel; - } - } - else if (parts[i].tmp==2) { - int col = rand()%200+4; - int tmul; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+rx, y+ry, PT_FIRW); - if (np>-1) - { - parts[np].vx = (rand()%3-1)*tmul; - parts[np].vy = (rand()%3-1)*tmul; - parts[np].tmp = col; - parts[np].life = rand()%100+100; - parts[np].temp = 6000.0f; - parts[np].dcolour = parts[i].dcolour; - } - } - sim->pv[y/CELL][x/CELL] += 20; - sim->kill_part(i); - return 1; - } else if (parts[i].tmp>=3) { - if (parts[i].life<=0) { - sim->kill_part(i); - return 1; - } - } - return 0; -} diff --git a/elements/fog.cpp b/elements/fog.cpp deleted file mode 100644 index 28952e9..0000000 --- a/elements/fog.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "element.h" - -int update_FOG(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].state==ST_SOLID&&5>=rand()%50&&parts[i].life==0&&!((r&0xFF)==PT_CLNE||(r&0xFF)==PT_PCLN)) // TODO: should this also exclude BCLN? - { - sim->part_change_type(i,x,y,PT_RIME); - } - if ((r&0xFF)==PT_SPRK) - { - parts[i].life += rand()%20; - } - } - return 0; -} diff --git a/elements/frzw.cpp b/elements/frzw.cpp deleted file mode 100644 index 932bccb..0000000 --- a/elements/frzw.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "element.h" - -int update_FRZW(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%70) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_FRZW); - } - } - if (parts[i].life==0&&13>rand()%2500) - { - sim->part_change_type(i,x,y,PT_ICEI); - parts[i].ctype=PT_FRZW; - parts[i].temp = restrict_flt(parts[i].temp-200.0f, MIN_TEMP, MAX_TEMP); - } - else if ((100-(parts[i].life))>rand()%50000) - { - sim->part_change_type(i,x,y,PT_ICEI); - parts[i].ctype=PT_FRZW; - parts[i].temp = restrict_flt(parts[i].temp-200.0f, MIN_TEMP, MAX_TEMP); - } - return 0; -} diff --git a/elements/frzz.cpp b/elements/frzz.cpp deleted file mode 100644 index 8e09c1d..0000000 --- a/elements/frzz.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "element.h" - -int update_FRZZ(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%100) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_FRZW); - parts[r>>8].life = 100; - parts[i].type = PT_NONE; - } - - } - if (parts[i].type==PT_NONE) { - sim->kill_part(i); - return 1; - } - return 0; -} diff --git a/elements/fsep.cpp b/elements/fsep.cpp deleted file mode 100644 index 3db5ba5..0000000 --- a/elements/fsep.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "element.h" - -int update_FSEP(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life<=0) { - r = sim->create_part(i, x, y, PT_PLSM); - if (r!=-1) - parts[r].life = 50; - return 1; - } else if (parts[i].life < 40) { - parts[i].life--; - if ((rand()%10)==0) { - r = sim->create_part(-1, (rx=x+rand()%3-1), (ry=y+rand()%3-1), PT_PLSM); - if (r!=-1) - parts[r].life = 50; - } - } - else { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=(273.15+400.0f))) && 1>(rand()%15)) - { - if (parts[i].life>40) { - parts[i].life = 39; - } - } - } - } - return 0; -} diff --git a/elements/fuse.cpp b/elements/fuse.cpp deleted file mode 100644 index e1db1ff..0000000 --- a/elements/fuse.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "element.h" - -int update_FUSE(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life<=0) { - r = sim->create_part(i, x, y, PT_PLSM); - if (r!=-1) - parts[r].life = 50; - return 1; - } else if (parts[i].life < 40) { - parts[i].life--; - if ((rand()%100)==0) { - r = sim->create_part(-1, (rx=x+rand()%3-1), (ry=y+rand()%3-1), PT_PLSM); - if (r!=-1) - parts[r].life = 50; - } - } - if ((sim->pv[y/CELL][x/CELL] > 2.7f)&&parts[i].tmp>40) - parts[i].tmp=39; - else if (parts[i].tmp<40&&parts[i].tmp>0) - parts[i].tmp--; - else if (parts[i].tmp<=0) { - sim->create_part(i, x, y, PT_FSEP); - return 1; - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=(273.15+700.0f)) && 1>(rand()%20))) - { - if (parts[i].life>40) { - parts[i].life = 39; - } - } - } - return 0; -} diff --git a/elements/fwrk.cpp b/elements/fwrk.cpp deleted file mode 100644 index d217ad9..0000000 --- a/elements/fwrk.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "element.h" - -int update_FWRK(UPDATE_FUNC_ARGS) { - int r, rx, ry, np; - if ((parts[i].temp>400&&(9+parts[i].temp/40)>rand()%100000&&parts[i].life==0&&!pmap[y-1][x])||parts[i].ctype==PT_DUST) - { - np = sim->create_part(-1, x , y-1 , PT_FWRK); - if (np!=-1) - { - parts[np].vy = rand()%8-22; - parts[np].vx = rand()%20-rand()%20; - parts[np].life=rand()%15+25; - parts[np].dcolour = parts[i].dcolour; - sim->kill_part(i); - return 1; - } - } - if (parts[i].life>=45) - parts[i].life=0; - if ((parts[i].life<3&&parts[i].life>0)||(parts[i].vy>6&&parts[i].life>0)) - { - int q = (rand()%255+1); - int w = (rand()%255+1); - int e = (rand()%255+1); - for (rx=-1; rx<2; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=rand()%8) - { - if (!pmap[y+ry][x+rx]) - { - np = sim->create_part(-1, x+rx, y+ry , PT_DUST); - sim->pv[y/CELL][x/CELL] += 2.00f*CFDS; - if (np!=-1) - { - parts[np].vy = -(rand()%10-1); - parts[np].vx = ((rand()%2)*2-1)*rand()%(5+5)+(parts[i].vx)*2 ; - parts[np].life= rand()%37+18; - parts[np].tmp=q; - parts[np].flags=w; - parts[np].ctype=e; - parts[np].temp= rand()%20+6000; - parts[np].dcolour = parts[i].dcolour; - } - } - } - } - sim->kill_part(i); - return 1; - } - return 0; -} diff --git a/elements/gbmb.cpp b/elements/gbmb.cpp deleted file mode 100644 index 95afc4e..0000000 --- a/elements/gbmb.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "element.h" -int update_GBMB(UPDATE_FUNC_ARGS) { - int rx,ry,r; - if (parts[i].life<=0) - { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - { - r = pmap[y+ry][x+rx]; - if(!r) - continue; - if((r&0xFF)!=PT_BOMB && (r&0xFF)!=PT_GBMB && - (r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_DMND) - { - parts[i].life=60; - break; - } - } - } - if(parts[i].life>20) - sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = 20; - if(parts[i].life<20 && parts[i].life>=1) - sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = -80; - return 0; -} diff --git a/elements/glas.cpp b/elements/glas.cpp deleted file mode 100644 index e8c0a6c..0000000 --- a/elements/glas.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "element.h" - -int update_GLAS(UPDATE_FUNC_ARGS) { - parts[i].pavg[0] = parts[i].pavg[1]; - parts[i].pavg[1] = sim->pv[y/CELL][x/CELL]; - if (parts[i].pavg[1]-parts[i].pavg[0] > 0.25f || parts[i].pavg[1]-parts[i].pavg[0] < -0.25f) - { - sim->part_change_type(i,x,y,PT_BGLA); - } - return 0; -} diff --git a/elements/glow.cpp b/elements/glow.cpp deleted file mode 100644 index e83e2f4..0000000 --- a/elements/glow.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "element.h" - -int update_GLOW(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%2000)) - { - parts[i].type = PT_NONE; - sim->part_change_type(r>>8,x+rx,y+ry,PT_DEUT); - parts[r>>8].life = 10; - } - } - parts[i].ctype = sim->pv[y/CELL][x/CELL]*16; - - parts[i].tmp = abs((int)((sim->vx[y/CELL][x/CELL]+sim->vy[y/CELL][x/CELL])*16.0f)) + abs((int)((parts[i].vx+parts[i].vy)*64.0f)); - //printf("%f %f\n", parts[i].vx, parts[i].vy); - if (parts[i].type==PT_NONE) { - sim->kill_part(i); - return 1; - } - return 0; -} diff --git a/elements/goo.cpp b/elements/goo.cpp deleted file mode 100644 index c305182..0000000 --- a/elements/goo.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "element.h" - -int update_GOO(UPDATE_FUNC_ARGS) { - if (!parts[i].life && sim->pv[y/CELL][x/CELL]>1.0f) - parts[i].life = rand()%80+300; - if (parts[i].life) - { - float advection = 0.1f; - parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; - parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; - } - return 0; -} diff --git a/elements/gpmp.cpp b/elements/gpmp.cpp deleted file mode 100644 index dcde7a9..0000000 --- a/elements/gpmp.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "element.h" - -int update_GPMP(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - if (parts[i].life==10) - { - if (parts[i].temp>=256.0+273.15) - parts[i].temp=256.0+273.15; - if (parts[i].temp<= -256.0+273.15) - parts[i].temp = -256.0+273.15; - - sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = 0.2f*(parts[i].temp-273.15); - if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp-273.15)) - sim->gravmap[(y/CELL+1)*(XRES/CELL)+(x/CELL)] += 0.1f*((parts[i].temp-273.15)-sim->gravmap[(y/CELL+1)*(XRES/CELL)+(x/CELL)]); - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[r>>8].life==0) - parts[r>>8].life = 10; - } - } - } - return 0; -} diff --git a/elements/graphics_default.cpp b/elements/graphics_default.cpp deleted file mode 100644 index 1270977..0000000 --- a/elements/graphics_default.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "element.h" - -int graphics_DEFAULT(GRAPHICS_FUNC_ARGS) -{ - int t = cpart->type; - //Property based defaults - if(ren->sim->ptypes[t].properties & PROP_RADIOACTIVE) *pixel_mode |= PMODE_GLOW; - if(ren->sim->ptypes[t].properties & TYPE_LIQUID) - { - *pixel_mode |= PMODE_BLUR; - } - if(ren->sim->ptypes[t].properties & TYPE_GAS) - { - *pixel_mode &= ~PMODE; - *pixel_mode |= FIRE_BLEND; - *firer = *colr/2; - *fireg = *colg/2; - *fireb = *colb/2; - *firea = 125; - *pixel_mode |= DECO_FIRE; - } - return 1; -} diff --git a/elements/h2.cpp b/elements/h2.cpp deleted file mode 100644 index da39ad0..0000000 --- a/elements/h2.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "element.h" - -int update_H2(UPDATE_FUNC_ARGS) -{ - int r,rx,ry,rt; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxpv[y/CELL][x/CELL] > 8.0f && rt == PT_DESL) // This will not work. DESL turns to fire above 5.0 pressure - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); - sim->part_change_type(i,x,y,PT_OIL); - } - if ((r&0xFF)==PT_FIRE) - { - parts[r>>8].temp=2473.15; - if(parts[r>>8].tmp&0x02) - parts[r>>8].temp=3473; - parts[r>>8].tmp |= 1; - } - if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM || (r&0xFF)==PT_LAVA) - { - sim->create_part(i,x,y,PT_FIRE); - parts[i].temp+=(rand()/(RAND_MAX/100)); - parts[i].tmp |= 1; - } - } - return 0; -} diff --git a/elements/hswc.cpp b/elements/hswc.cpp deleted file mode 100644 index c727395..0000000 --- a/elements/hswc.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "element.h" - -int update_HSWC(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - if (parts[i].life==10) - { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[r>>8].life==0) - parts[r>>8].life = 10; - } - } - } - return 0; -} diff --git a/elements/ice.cpp b/elements/ice.cpp deleted file mode 100644 index aece17b..0000000 --- a/elements/ice.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "element.h" - -int update_ICEI(UPDATE_FUNC_ARGS) { //currently used for snow as well - int r, rx, ry; - if (parts[i].ctype==PT_FRZW)//get colder if it is from FRZW - { - parts[i].temp = restrict_flt(parts[i].temp-1.0f, MIN_TEMP, MAX_TEMP); - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) - { - sim->part_change_type(i,x,y,PT_SLTW); - sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); - } - } - return 0; -} diff --git a/elements/ignt.cpp b/elements/ignt.cpp deleted file mode 100644 index 1d7ea64..0000000 --- a/elements/ignt.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "element.h" - -int update_IGNT(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if(parts[i].tmp==0) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life==1)) - { - parts[i].tmp = 1; - } - } - } - else if(parts[i].life > 0) - { - if(rand()%3) - { - int nb = sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_BOMB); - if (nb!=-1) { - parts[nb].tmp = 1; - parts[nb].life = 30; - parts[nb].vx = rand()%20-10; - parts[nb].vy = rand()%20-10; - parts[nb].temp = restrict_flt(400.0f+parts[i].temp-273.15, MIN_TEMP, MAX_TEMP); - } - } - else - { - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); - } - parts[i].life--; - } - return 0; -} diff --git a/elements/iron.cpp b/elements/iron.cpp deleted file mode 100644 index b887cf8..0000000 --- a/elements/iron.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "element.h" - -int update_IRON(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()/(RAND_MAX/700))) || - ((r&0xFF) == PT_SLTW && 30>(rand()/(RAND_MAX/2000))) || - ((r&0xFF) == PT_WATR && 5 >(rand()/(RAND_MAX/6000))) || - ((r&0xFF) == PT_O2 && 2 >(rand()/(RAND_MAX/500))) || - ((r&0xFF) == PT_LO2))&& - (!(parts[i].life)) - ) - { - sim->part_change_type(i,x,y,PT_BMTL); - parts[i].tmp=(rand()/(RAND_MAX/10))+20; - } - } - return 0; -} diff --git a/elements/isz.cpp b/elements/isz.cpp deleted file mode 100644 index 25446d2..0000000 --- a/elements/isz.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "element.h" - -int update_ISZ(UPDATE_FUNC_ARGS) { // for both ISZS and ISOZ - float rr, rrr; - if (1>rand()%200 && ((int)(-4.0f*(sim->pv[y/CELL][x/CELL])))>(rand()%1000)) - { - sim->create_part(i, x, y, PT_PHOT); - rr = (rand()%228+128)/127.0f; - rrr = (rand()%360)*3.14159f/180.0f; - parts[i].vx = rr*cosf(rrr); - parts[i].vy = rr*sinf(rrr); - } - return 0; -} diff --git a/elements/lava.cpp b/elements/lava.cpp deleted file mode 100644 index 3d7827b..0000000 --- a/elements/lava.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "element.h" - -int graphics_LAVA(GRAPHICS_FUNC_ARGS) -{ - *colr = cpart->life * 2 + 0xE0; - *colg = cpart->life * 1 + 0x50; - *colb = cpart->life / 2 + 0x10; - if (*colr>255) *colr = 255; - if (*colg>192) *colg = 192; - if (*colb>128) *colb = 128; - *firea = 40; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - *pixel_mode |= FIRE_ADD; - *pixel_mode |= PMODE_BLUR; - //Returning 0 means dynamic, do not cache - return 0; -} diff --git a/elements/lcry.cpp b/elements/lcry.cpp deleted file mode 100644 index 546c2ca..0000000 --- a/elements/lcry.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "element.h" - -int update_LCRY(UPDATE_FUNC_ARGS) -{ - int r, rx, ry; - if(parts[i].tmp==1 || parts[i].tmp==0) - { - if(parts[i].tmp==1) - { - if(parts[i].life<=0) - parts[i].tmp = 0; - else - { - parts[i].life-=2; - if(parts[i].life < 0) - parts[i].life = 0; - parts[i].tmp2 = parts[i].life; - } - } - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].tmp == 3) - { - parts[r>>8].tmp = 1; - } - } - } - else if(parts[i].tmp==2 || parts[i].tmp==3) - { - if(parts[i].tmp==2) - { - if(parts[i].life>=10) - parts[i].tmp = 3; - else - { - parts[i].life+=2; - if(parts[i].life > 10) - parts[i].life = 10; - parts[i].tmp2 = parts[i].life; - } - } - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].tmp == 0) - { - parts[r>>8].tmp = 2; - } - } - } - return 0; -} diff --git a/elements/legacy.cpp b/elements/legacy.cpp deleted file mode 100644 index dd58173..0000000 --- a/elements/legacy.cpp +++ /dev/null @@ -1,120 +0,0 @@ -#include "element.h" - -// Interactions which only occur when legacy_enable is on -int update_legacy_all(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt; - int t = parts[i].type; - if (!sim->legacy_enable) return 0; - if (t==PT_WTRV) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && - x+rx(rand()%1000)) - { - sim->part_change_type(i,x,y,PT_WATR); - sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); - } - if (((r&0xFF)==PT_ICEI || (r&0xFF)==PT_SNOW) && 1>(rand()%1000)) - { - sim->part_change_type(i,x,y,PT_WATR); - if (1>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); - } - } - } - else if (t==PT_WATR) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && - x+rx(rand()%10)) - { - sim->part_change_type(i,x,y,PT_WTRV); - } - } - } - else if (t==PT_SLTW) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && - x+rx(rand()%10)) - { - sim->part_change_type(i,x,y,PT_SALT); - sim->part_change_type(r>>8,x+rx,y+ry,PT_WTRV); - } - } - } - else if (t==PT_DSTW) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && - x+rx(rand()%10)) - { - sim->part_change_type(i,x,y,PT_WTRV); - } - } - } - else if (t==PT_ICEI) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) - { - sim->part_change_type(i,x,y,PT_ICEI); - sim->part_change_type(r>>8,x+rx,y+ry,PT_ICEI); - } - } - } - else if (t==PT_SNOW) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) - { - sim->part_change_type(i,x,y,PT_ICEI); - sim->part_change_type(r>>8,x+rx,y+ry,PT_ICEI); - } - if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW) && 15>(rand()%1000)) - sim->part_change_type(i,x,y,PT_WATR); - } - } - if (t==PT_WTRV && sim->pv[y/CELL][x/CELL]>4.0f) - sim->part_change_type(i,x,y,PT_DSTW); - if (t==PT_OIL && sim->pv[y/CELL][x/CELL]<-6.0f) - sim->part_change_type(i,x,y,PT_GAS); - if (t==PT_GAS && sim->pv[y/CELL][x/CELL]>6.0f) - sim->part_change_type(i,x,y,PT_OIL); - if (t==PT_DESL && sim->pv[y/CELL][x/CELL]>12.0f) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = rand()%50+120; - } - return 0; -} diff --git a/elements/ligh.cpp b/elements/ligh.cpp deleted file mode 100644 index 8108c4b..0000000 --- a/elements/ligh.cpp +++ /dev/null @@ -1,295 +0,0 @@ -#include "element.h" - -#define LIGHTING_POWER 0.65 - -int LIGH_nearest_part(Simulation * sim, int ci, int max_d) -{ - int distance = (max_d!=-1)?max_d:MAX_DISTANCE; - int ndistance = 0; - int id = -1; - int i = 0; - int cx = (int)sim->parts[ci].x; - int cy = (int)sim->parts[ci].y; - for (i=0; i<=sim->parts_lastActiveIndex; i++) - { - if (sim->parts[i].type && sim->parts[i].life && i!=ci && sim->parts[i].type!=PT_LIGH && sim->parts[i].type!=PT_THDR && sim->parts[i].type!=PT_NEUT && sim->parts[i].type!=PT_PHOT) - { - ndistance = abs(cx-sim->parts[i].x)+abs(cy-sim->parts[i].y);// Faster but less accurate Older: sqrt(pow(cx-parts[i].x, 2)+pow(cy-parts[i].y, 2)); - if (ndistanceparts[i].x, y=sim->parts[i].y; - int r,rx,ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxpmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)==tp) - return r>>8; - } - return -1; -} - -void create_line_par(Simulation * sim, int x1, int y1, int x2, int y2, int c, int temp, int life, int tmp, int tmp2) -{ - int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; - float e, de; - if (c==WL_EHOLE || c==WL_ALLOWGAS || c==WL_ALLOWALLELEC || c==WL_ALLOWSOLID || c==WL_ALLOWAIR || c==WL_WALL || c==WL_DESTROYALL || c==WL_ALLOWLIQUID || c==WL_FAN || c==WL_STREAM || c==WL_DETECT || c==WL_EWALL || c==WL_WALLELEC) - return; // this function only for particles, no walls - if (cp) - { - y = x1; - x1 = y1; - y1 = y; - y = x2; - x2 = y2; - y2 = y; - } - if (x1 > x2) - { - y = x1; - x1 = x2; - x2 = y; - y = y1; - y1 = y2; - y2 = y; - } - dx = x2 - x1; - dy = abs(y2 - y1); - e = 0.0f; - if (dx) - de = dy/(float)dx; - else - de = 0.0f; - y = y1; - sy = (y1create_part(-1, y, x, c); - else - p = sim->create_part(-1, x, y,c); - if (p!=-1) - { - sim->parts[p].life = life; - sim->parts[p].temp = temp; - sim->parts[p].tmp = tmp; - sim->parts[p].tmp2 = tmp2; - } - e += de; - if (e >= 0.5f) - { - y += sy; - e -= 1.0f; - } - } -} - -int update_LIGH(UPDATE_FUNC_ARGS) -{ - /* - * - * tmp2: - * -1 - part will be removed - * 0 - "branches" of the lightning - * 1 - bending - * 2 - branching - * 3 - transfer spark or make destruction - * 4 - first pixel - * - * life - "thickness" of lighting (but anyway one pixel) - * - * tmp - angle of lighting - * - */ - int r,rx,ry, multipler, powderful; - float angle, angle2=-1; - int pNear = 0; - powderful = powderful = parts[i].temp*(1+parts[i].life/40)*LIGHTING_POWER; - update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); - if (sim->aheat_enable) - { - sim->hv[y/CELL][x/CELL]+=powderful/50; - if (sim->hv[y/CELL][x/CELL]>MAX_TEMP) - sim->hv[y/CELL][x/CELL]=MAX_TEMP; - } - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxptypes[r&0xFF].properties&PROP_CONDUCTS) && parts[r>>8].life==0) - { - sim->create_part(r>>8,x+rx,y+ry,PT_SPRK); - } - sim->pv[y/CELL][x/CELL] += powderful/400; - if (sim->ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/1.5, MIN_TEMP, MAX_TEMP); - } - if ((r&0xFF)==PT_DEUT || (r&0xFF)==PT_PLUT) // start nuclear reactions - { - parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful, MIN_TEMP, MAX_TEMP); - sim->pv[y/CELL][x/CELL] +=powderful/35; - if (rand()%3==0) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_NEUT); - parts[r>>8].life = rand()%480+480; - parts[r>>8].vx=rand()%10-5; - parts[r>>8].vy=rand()%10-5; - } - } - if ((r&0xFF)==PT_COAL || (r&0xFF)==PT_BCOL) // ignite coal - { - if (parts[r>>8].life>100) { - parts[r>>8].life = 99; - } - } - if (sim->ptypes[r&0xFF].hconduct) - parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/10, MIN_TEMP, MAX_TEMP); - if (((r&0xFF)==PT_STKM && sim->player.elem!=PT_LIGH) || ((r&0xFF)==PT_STKM2 && sim->player2.elem!=PT_LIGH)) - { - parts[r>>8].life-=powderful/100; - } - } - } - if (parts[i].tmp2==3) - { - parts[i].tmp2=0; - return 1; - } - - if (parts[i].tmp2==-1) - { - sim->kill_part(i); - return 1; - } - if (parts[i].tmp2<=0 || parts[i].life<=1) - { - if (parts[i].tmp2>0) - parts[i].tmp2=0; - parts[i].tmp2--; - return 1; - } - if (parts[i].tmp2<=-2) - { - sim->kill_part(i); - return 1; - } - - angle2=-1; - - pNear = LIGH_nearest_part(sim, i, parts[i].life*2.5); - if (pNear!=-1) - { - int t=parts[pNear].type; - float n_angle; // angle to nearest part - rx=parts[pNear].x-x; - ry=parts[pNear].y-y; - if (rx*rx+ry*ry!=0) - n_angle = asin(-ry/sqrt(rx*rx+ry*ry)); - else - n_angle = 0; - if (n_angle<0) - n_angle+=M_PI*2; - if (parts[i].life<5 || fabs(n_angle-parts[i].tmp*M_PI/180)=360) - angle-=360; - if (parts[i].tmp2==2 && pNear==-1) - { - angle2=angle+100-rand()%200; - if (angle2<0) - angle2+=360; - if (angle2>=360) - angle-=360; - } - - multipler=parts[i].life*1.5+rand()%((int)(parts[i].life+1)); - rx=cos(angle*M_PI/180)*multipler; - ry=-sin(angle*M_PI/180)*multipler; - create_line_par(sim, x, y, x+rx, y+ry, PT_LIGH, parts[i].temp, parts[i].life, angle, 0); - - if (x+rx>=0 && y+ry>=0 && x+rx>8].tmp2=1+(rand()%200>parts[i].tmp2*parts[i].tmp2/10+60); - parts[r>>8].life=(int)(1.0*parts[i].life/1.5-rand()%2); - parts[r>>8].tmp=angle; - parts[r>>8].temp=parts[i].temp; - } - } - - if (angle2!=-1) - { - multipler=parts[i].life*1.5+rand()%((int)(parts[i].life+1)); - rx=cos(angle2*M_PI/180)*multipler; - ry=-sin(angle2*M_PI/180)*multipler; - create_line_par(sim, x, y, x+rx, y+ry, PT_LIGH, parts[i].temp, parts[i].life, angle2, 0); - - if (x+rx>=0 && y+ry>0 && x+rx>8].tmp2=1+(rand()%200>parts[i].tmp2*parts[i].tmp2/10+40); - parts[r>>8].life=(int)(1.0*parts[i].life/1.5-rand()%2); - parts[r>>8].tmp=angle; - parts[r>>8].temp=parts[i].temp; - } - } - } - - parts[i].tmp2=-1; - return 1; -} -int graphics_LIGH(GRAPHICS_FUNC_ARGS) -{ - *colr = 235; - *colg = 245; - *colb = 255; - *pixel_mode |= PMODE_GLOW; - return 1; -} diff --git a/elements/merc.cpp b/elements/merc.cpp deleted file mode 100644 index 2df113b..0000000 --- a/elements/merc.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include "element.h" - -int update_MERC(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, np; - int maxtmp = ((10000/(parts[i].temp + 1))-1); - if ((10000%((int)parts[i].temp+1))>rand()%((int)parts[i].temp+1)) - maxtmp ++; - if (parts[i].tmp < maxtmp) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=maxtmp)) - continue; - if ((r&0xFF)==PT_MERC&&33>=rand()/(RAND_MAX/100)+1) - { - if ((parts[i].tmp + parts[r>>8].tmp + 1) <= maxtmp) - { - parts[i].tmp += parts[r>>8].tmp + 1; - sim->kill_part(r>>8); - } - } - } - } - else - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create deut - { - np = sim->create_part(-1,x+rx,y+ry,PT_MERC); - if (np<0) continue; - parts[i].tmp--; - parts[np].temp = parts[i].temp; - parts[np].tmp = 0; - } - } - for ( trade = 0; trade<4; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp)&&parts[i].tmp>0)//diffusion - { - int temp = parts[i].tmp - parts[r>>8].tmp; - if (temp ==1) - { - parts[r>>8].tmp ++; - parts[i].tmp --; - } - else if (temp>0) - { - parts[r>>8].tmp += temp/2; - parts[i].tmp -= temp/2; - } - } - } - } - return 0; -} diff --git a/elements/mort.cpp b/elements/mort.cpp deleted file mode 100644 index bbb6264..0000000 --- a/elements/mort.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "element.h" - -int update_MORT(UPDATE_FUNC_ARGS) { - sim->create_part(-1, x, y-1, PT_SMKE); - return 0; -} diff --git a/elements/nbhl.cpp b/elements/nbhl.cpp deleted file mode 100644 index 056313c..0000000 --- a/elements/nbhl.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "element.h" - -int update_NBHL(UPDATE_FUNC_ARGS) { - sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] += 0.1f; - return 0; -} diff --git a/elements/neut.cpp b/elements/neut.cpp deleted file mode 100644 index a48fc09..0000000 --- a/elements/neut.cpp +++ /dev/null @@ -1,145 +0,0 @@ -#include "element.h" - - -int create_n_parts(Simulation * sim, int n, int x, int y, float vx, float vy, float temp, int t)//testing a new deut create part -{ - int i, c; - n = (n/50); - if (n<1) { - n = 1; - } - if (n>340) { - n = 340; - } - if (x<0 || y<0 || x>=XRES || y>=YRES || t<0 || t>=PT_NUM) - return -1; - - for (c=0; cpfree == -1) - return -1; - i = sim->pfree; - sim->pfree = sim->parts[i].life; - if (i>sim->parts_lastActiveIndex) sim->parts_lastActiveIndex = i; - - sim->parts[i].x = (float)x; - sim->parts[i].y = (float)y; - sim->parts[i].type = t; - sim->parts[i].life = rand()%480+480; - sim->parts[i].vx = r*cosf(a); - sim->parts[i].vy = r*sinf(a); - sim->parts[i].ctype = 0; - sim->parts[i].temp = temp; - sim->parts[i].tmp = 0; - if (t!=PT_STKM&&t!=PT_STKM2 && t!=PT_PHOT && t!=PT_NEUT && !sim->pmap[y][x]) - sim->pmap[y][x] = t|(i<<8); - else if ((t==PT_PHOT||t==PT_NEUT) && !sim->photons[y][x]) - sim->photons[y][x] = t|(i<<8); - - sim->pv[y/CELL][x/CELL] += 6.0f * CFDS; - } - return 0; -} - -int update_NEUT(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt; - int pressureFactor = 3 + (int)sim->pv[y/CELL][x/CELL]; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) - { - if (33>rand()%100) - { - sim->create_part(r>>8, x+rx, y+ry, rand()%3 ? PT_LAVA : PT_URAN); - parts[r>>8].temp = MAX_TEMP; - if (parts[r>>8].type==PT_LAVA) { - parts[r>>8].tmp = 100; - parts[r>>8].ctype = PT_PLUT; - } - } - else - { - sim->create_part(r>>8, x+rx, y+ry, PT_NEUT); - parts[r>>8].vx = 0.25f*parts[r>>8].vx + parts[i].vx; - parts[r>>8].vy = 0.25f*parts[r>>8].vy + parts[i].vy; - } - sim->pv[y/CELL][x/CELL] += 10.0f * CFDS; //Used to be 2, some people said nukes weren't powerful enough - update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); - } -#ifdef SDEUT - else if ((r&0xFF)==PT_DEUT && (pressureFactor+1+(parts[r>>8].life/100))>(rand()%1000)) - { - create_n_parts(sim, parts[r>>8].life, x+rx, y+ry, parts[i].vx, parts[i].vy, restrict_flt(parts[r>>8].temp + parts[r>>8].life*500, MIN_TEMP, MAX_TEMP), PT_NEUT); - sim->kill_part(r>>8); - } -#else - else if ((r&0xFF)==PT_DEUT && (pressureFactor+1)>(rand()%1000)) - { - create_part(r>>8, x+rx, y+ry, PT_NEUT); - parts[r>>8].vx = 0.25f*parts[r>>8].vx + parts[i].vx; - parts[r>>8].vy = 0.25f*parts[r>>8].vy + parts[i].vy; - if (parts[r>>8].life>0) - { - parts[r>>8].life --; - parts[r>>8].temp = restrict_flt(parts[r>>8].temp + parts[r>>8].life*17, MIN_TEMP, MAX_TEMP); - pv[y/CELL][x/CELL] += 6.0f * CFDS; - } - else - sim.kill_part(r>>8); - } -#endif - else if ((r&0xFF)==PT_GUNP && 15>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_DUST); - else if ((r&0xFF)==PT_DYST && 15>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_YEST); - else if ((r&0xFF)==PT_YEST) - sim->part_change_type(r>>8,x+rx,y+ry,PT_DYST); - else if ((r&0xFF)==PT_WATR && 15>(rand()%100)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_DSTW); - else if ((r&0xFF)==PT_PLEX && 15>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_GOO); - else if ((r&0xFF)==PT_NITR && 15>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_DESL); - else if ((r&0xFF)==PT_PLNT && 5>(rand()%100)) - sim->create_part(r>>8, x+rx, y+ry, PT_WOOD); - else if ((r&0xFF)==PT_DESL && 15>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_GAS); - else if ((r&0xFF)==PT_COAL && 5>(rand()%100)) - sim->create_part(r>>8, x+rx, y+ry, PT_WOOD); - else if ((r&0xFF)==PT_DUST && 5>(rand()%100)) - sim->part_change_type(r>>8, x+rx, y+ry, PT_FWRK); - else if ((r&0xFF)==PT_FWRK && 5>(rand()%100)) - parts[r>>8].ctype = PT_DUST; - else if ((r&0xFF)==PT_ACID && 5>(rand()%100)) - sim->create_part(r>>8, x+rx, y+ry, PT_ISOZ); - /*if(parts[r>>8].type>1 && parts[r>>8].type!=PT_NEUT && parts[r>>8].type-1!=PT_NEUT && parts[r>>8].type-1!=PT_STKM && - (ptypes[parts[r>>8].type-1].menusection==SC_LIQUID|| - ptypes[parts[r>>8].type-1].menusection==SC_EXPLOSIVE|| - ptypes[parts[r>>8].type-1].menusection==SC_GAS|| - ptypes[parts[r>>8].type-1].menusection==SC_POWDERS) && 15>(rand()%1000)) - parts[r>>8].type--;*/ - } - return 0; -} - -int graphics_NEUT(GRAPHICS_FUNC_ARGS) -{ - *firea = 120; - *firer = 10; - *fireg = 80; - *fireb = 120; - - *pixel_mode |= FIRE_ADD; - return 1; -} diff --git a/elements/newgraphics.cpp b/elements/newgraphics.cpp deleted file mode 100644 index 83da27b..0000000 --- a/elements/newgraphics.cpp +++ /dev/null @@ -1,541 +0,0 @@ -#include "element.h" -#include "hmap.h" - -int graphics_QRTZ(GRAPHICS_FUNC_ARGS) //QRTZ and PQRT -{ - int t = cpart->type, z = cpart->tmp - 5;//speckles! - /*if (cpart->temp>(ptransitions[t].thv-800.0f))//hotglow for quartz - { - float frequency = 3.1415/(2*ptransitions[t].thv-(ptransitions[t].thv-800.0f)); - int q = (cpart->temp>ptransitions[t].thv)?ptransitions[t].thv-(ptransitions[t].thv-800.0f):cpart->temp-(ptransitions[t].thv-800.0f); - *colr += sin(frequency*q) * 226 + (z * 16); - *colg += sin(frequency*q*4.55 +3.14) * 34 + (z * 16); - *colb += sin(frequency*q*2.22 +3.14) * 64 + (z * 16); - } - else*/ - { - *colr += z * 16; - *colg += z * 16; - *colb += z * 16; - } - return 0; -} -int graphics_CLST(GRAPHICS_FUNC_ARGS) -{ - int z = cpart->tmp - 5;//speckles! - *colr += z * 16; - *colg += z * 16; - *colb += z * 16; - return 0; -} -int graphics_CBNW(GRAPHICS_FUNC_ARGS) -{ - int z = cpart->tmp2 - 20;//speckles! - *colr += z * 1; - *colg += z * 2; - *colb += z * 8; - return 0; -} -int graphics_SPNG(GRAPHICS_FUNC_ARGS) -{ - *colr -= cpart->life*15; - *colg -= cpart->life*15; - *colb -= cpart->life*15; - if (*colr<=50) - *colr = 50; - if (*colg<=50) - *colg = 50; - if (*colb<=20) - *colb = 20; - return 0; -} -int graphics_LIFE(GRAPHICS_FUNC_ARGS) -{ - pixel pc; - if (cpart->ctype==NGT_LOTE)//colors for life states - { - if (cpart->tmp==2) - pc = PIXRGB(255, 128, 0); - else if (cpart->tmp==1) - pc = PIXRGB(255, 255, 0); - else - pc = PIXRGB(255, 0, 0); - } - else if (cpart->ctype==NGT_FRG2)//colors for life states - { - if (cpart->tmp==2) - pc = PIXRGB(0, 100, 50); - else - pc = PIXRGB(0, 255, 90); - } - else if (cpart->ctype==NGT_STAR)//colors for life states - { - if (cpart->tmp==4) - pc = PIXRGB(0, 0, 128); - else if (cpart->tmp==3) - pc = PIXRGB(0, 0, 150); - else if (cpart->tmp==2) - pc = PIXRGB(0, 0, 190); - else if (cpart->tmp==1) - pc = PIXRGB(0, 0, 230); - else - pc = PIXRGB(0, 0, 70); - } - else if (cpart->ctype==NGT_FROG)//colors for life states - { - if (cpart->tmp==2) - pc = PIXRGB(0, 100, 0); - else - pc = PIXRGB(0, 255, 0); - } - else if (cpart->ctype==NGT_BRAN)//colors for life states - { - if (cpart->tmp==1) - pc = PIXRGB(150, 150, 0); - else - pc = PIXRGB(255, 255, 0); - } else { - //pc = gmenu[cpart->ctype].colour; - } - *colr = PIXR(pc); - *colg = PIXG(pc); - *colb = PIXB(pc); - return 0; -} -int graphics_DUST(GRAPHICS_FUNC_ARGS) -{ - if(cpart->life >= 1) - { - *colr = cpart->flags; - *colg = cpart->tmp; - *colb = cpart->ctype; - if (ren->decorations_enable && cpart->dcolour) - { - int a = (cpart->dcolour>>24)&0xFF; - *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; - *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; - *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; - } - *pixel_mode |= PMODE_GLOW; - /**firea = 255; - *firer = *colr; - *fireg = *colg; - *fireb = *colb;*/ - } - return 0; -} -int graphics_GRAV(GRAPHICS_FUNC_ARGS) -{ - int GRAV_R, GRAV_B, GRAV_G, GRAV_R2, GRAV_B2, GRAV_G2; - *colr = 20; - *colg = 20; - *colb = 20; - if (cpart->vx>0) - { - *colr += (cpart->vx)*GRAV_R; - *colg += (cpart->vx)*GRAV_G; - *colb += (cpart->vx)*GRAV_B; - } - if (cpart->vy>0) - { - *colr += (cpart->vy)*GRAV_G; - *colg += (cpart->vy)*GRAV_B; - *colb += (cpart->vy)*GRAV_R; - - } - if (cpart->vx<0) - { - *colr -= (cpart->vx)*GRAV_B; - *colg -= (cpart->vx)*GRAV_R; - *colb -= (cpart->vx)*GRAV_G; - - } - if (cpart->vy<0) - { - *colr -= (cpart->vy)*GRAV_R2; - *colg -= (cpart->vy)*GRAV_G2; - *colb -= (cpart->vy)*GRAV_B2; - } - return 0; -} -int graphics_WIFI(GRAPHICS_FUNC_ARGS) -{ - float frequency = 0.0628; - int q = cpart->tmp; - *colr = sin(frequency*q + 0) * 127 + 128; - *colg = sin(frequency*q + 2) * 127 + 128; - *colb = sin(frequency*q + 4) * 127 + 128; - return 0; -} -int graphics_PRTI(GRAPHICS_FUNC_ARGS) -{ - *firea = 8; - *firer = 255; - *fireg = 0; - *fireb = 0; - *pixel_mode |= EFFECT_GRAVIN; - *pixel_mode &= ~PMODE; - *pixel_mode |= PMODE_ADD; - return 1; -} -int graphics_PRTO(GRAPHICS_FUNC_ARGS) -{ - *firea = 8; - *firer = 0; - *fireg = 0; - *fireb = 255; - *pixel_mode |= EFFECT_GRAVOUT; - *pixel_mode &= ~PMODE; - *pixel_mode |= PMODE_ADD; - return 1; -} -int graphics_BIZR(GRAPHICS_FUNC_ARGS) //BIZR, BIZRG, BIZRS -{ - int x = 0; - *colg = 0; - *colb = 0; - *colr = 0; - for (x=0; x<12; x++) { - *colr += (cpart->ctype >> (x+18)) & 1; - *colb += (cpart->ctype >> x) & 1; - } - for (x=0; x<12; x++) - *colg += (cpart->ctype >> (x+9)) & 1; - x = 624/(*colr+*colg+*colb+1); - *colr *= x; - *colg *= x; - *colb *= x; - if(fabs(cpart->vx)+fabs(cpart->vy)>0) - { - *firea = 255; - *fireg = *colg/5 * fabs(cpart->vx)+fabs(cpart->vy); - *fireb = *colb/5 * fabs(cpart->vx)+fabs(cpart->vy); - *firer = *colr/5 * fabs(cpart->vx)+fabs(cpart->vy); - *pixel_mode |= FIRE_ADD; - } - return 0; -} -int graphics_INVS(GRAPHICS_FUNC_ARGS) -{ - //pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f - if(cpart->tmp) - { - *cola = 100; - *colr = 15; - *colg = 0; - *colb = 150; - *pixel_mode &= PMODE; - *pixel_mode |= PMODE_BLEND; - } - return 0; -} -int graphics_ACID(GRAPHICS_FUNC_ARGS) -{ - int s = cpart->life; - if (s>75) s = 75; //These two should not be here. - if (s<49) s = 49; - s = (s-49)*3; - if (s==0) s = 1; - *colr += s*4; - *colg += s*1; - *colb += s*2; - *pixel_mode |= PMODE_BLUR; - return 0; -} -int graphics_FILT(GRAPHICS_FUNC_ARGS) -{ - int x, temp_bin = (int)((cpart->temp-273.0f)*0.025f); - if (temp_bin < 0) temp_bin = 0; - if (temp_bin > 25) temp_bin = 25; - cpart->ctype = 0x1F << temp_bin; - *colg = 0; - *colb = 0; - *colr = 0; - for (x=0; x<12; x++) { - *colr += (cpart->ctype >> (x+18)) & 1; - *colb += (cpart->ctype >> x) & 1; - } - for (x=0; x<12; x++) - *colg += (cpart->ctype >> (x+9)) & 1; - x = 624/(*colr+*colg+*colb+1); - *cola = 127; - *colr *= x; - *colg *= x; - *colb *= x; - *pixel_mode &= ~PMODE; - *pixel_mode |= PMODE_BLEND; - return 0; -} -int graphics_BRAY(GRAPHICS_FUNC_ARGS) -{ - int x, trans = 255; - if(cpart->tmp==0) - { - trans = cpart->life * 7; - if (trans>255) trans = 255; - if (cpart->ctype) { - *colg = 0; - *colb = 0; - *colr = 0; - for (x=0; x<12; x++) { - *colr += (cpart->ctype >> (x+18)) & 1; - *colb += (cpart->ctype >> x) & 1; - } - for (x=0; x<12; x++) - *colg += (cpart->ctype >> (x+9)) & 1; - x = 624/(*colr+*colg+*colb+1); - *colr *= x; - *colg *= x; - *colb *= x; - } - } - else if(cpart->tmp==1) - { - trans = cpart->life/4; - if (trans>255) trans = 255; - if (cpart->ctype) { - *colg = 0; - *colb = 0; - *colr = 0; - for (x=0; x<12; x++) { - *colr += (cpart->ctype >> (x+18)) & 1; - *colb += (cpart->ctype >> x) & 1; - } - for (x=0; x<12; x++) - *colg += (cpart->ctype >> (x+9)) & 1; - x = 624/(*colr+*colg+*colb+1); - *colr *= x; - *colg *= x; - *colb *= x; - } - } - else if(cpart->tmp==2) - { - trans = cpart->life*100; - if (trans>255) trans = 255; - *colr = 255; - *colg = 150; - *colb = 50; - } - *cola = trans; - *pixel_mode &= ~PMODE; - *pixel_mode |= PMODE_BLEND; - return 0; -} -int graphics_SWCH(GRAPHICS_FUNC_ARGS) -{ - if(cpart->life >= 10) - { - *colr = 17; - *colg = 217; - *colb = 24; - *pixel_mode |= PMODE_GLOW; - } - return 0; -} -int graphics_THDR(GRAPHICS_FUNC_ARGS) -{ - *firea = 160; - *fireg = 192; - *fireb = 255; - *firer = 144; - *pixel_mode |= FIRE_ADD; - return 1; -} -int graphics_GLOW(GRAPHICS_FUNC_ARGS) -{ - *firer = restrict_flt(cpart->temp-(275.13f+32.0f), 0, 128)/50.0f; - *fireg = restrict_flt(cpart->ctype, 0, 128)/50.0f; - *fireb = restrict_flt(cpart->tmp, 0, 128)/50.0f; - - *colr = restrict_flt(64.0f+cpart->temp-(275.13f+32.0f), 0, 255); - *colg = restrict_flt(64.0f+cpart->ctype, 0, 255); - *colb = restrict_flt(64.0f+cpart->tmp, 0, 255); - - *pixel_mode |= FIRE_ADD; - return 0; -} -int graphics_LCRY(GRAPHICS_FUNC_ARGS) -{ - if(ren->decorations_enable && cpart->dcolour && cpart->dcolour&0xFF000000) - { - *colr = (cpart->dcolour>>16)&0xFF; - *colg = (cpart->dcolour>>8)&0xFF; - *colb = (cpart->dcolour)&0xFF; - - if(cpart->tmp2<10){ - *colr /= 10-cpart->tmp2; - *colg /= 10-cpart->tmp2; - *colb /= 10-cpart->tmp2; - } - - } - else - { - *colr = *colg = *colb = 0x50+((cpart->tmp2>10?10:cpart->tmp2)*10); - } - *pixel_mode |= NO_DECO; - return 0; - - /*int lifemod = ((cpart->tmp2>10?10:cpart->tmp2)*10); - *colr += lifemod; - *colg += lifemod; - *colb += lifemod; - if(decorations_enable && cpart->dcolour && cpart->dcolour&0xFF000000) - { - lifemod *= 2.5f; - if(lifemod < 40) - lifemod = 40; - *colr = (lifemod*((cpart->dcolour>>16)&0xFF) + (255-lifemod)**colr) >> 8; - *colg = (lifemod*((cpart->dcolour>>8)&0xFF) + (255-lifemod)**colg) >> 8; - *colb = (lifemod*((cpart->dcolour)&0xFF) + (255-lifemod)**colb) >> 8; - } - *pixel_mode |= NO_DECO; - return 0;*/ -} -int graphics_PCLN(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*10); - *colr += lifemod; - *colg += lifemod; - return 0; -} -int graphics_PBCN(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*10); - *colr += lifemod; - *colg += lifemod/2; - return 0; -} -int graphics_DLAY(GRAPHICS_FUNC_ARGS) -{ - int stage = (int)(((float)cpart->life/(cpart->temp-273.15))*100.0f); - *colr += stage; - *colg += stage; - *colb += stage; - return 0; -} -int graphics_HSWC(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*19); - *colr += lifemod; - return 0; -} -int graphics_PVOD(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*16); - *colr += lifemod; - return 0; -} -int graphics_STOR(GRAPHICS_FUNC_ARGS) -{ - if(cpart->tmp){ - *pixel_mode |= PMODE_GLOW; - *colr = 0x50; - *colg = 0xDF; - *colb = 0xDF; - } else { - *colr = 0x20; - *colg = 0xAF; - *colb = 0xAF; - } - return 0; -} -int graphics_PUMP(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*19); - *colb += lifemod; - return 0; -} -int graphics_GPMP(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*19); - *colg += lifemod; - *colb += lifemod; - return 0; -} -int graphics_HFLM(GRAPHICS_FUNC_ARGS) -{ - int caddress = restrict_flt(restrict_flt((float)((int)(cpart->life/2)), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); - *colr = (unsigned char)hflm_data[caddress]; - *colg = (unsigned char)hflm_data[caddress+1]; - *colb = (unsigned char)hflm_data[caddress+2]; - - *firea = 255; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel - *pixel_mode |= FIRE_ADD; - //Returning 0 means dynamic, do not cache - return 0; -} -int graphics_FIRW(GRAPHICS_FUNC_ARGS) -{ - if(cpart->tmp>=3) - { - int caddress = restrict_flt(restrict_flt((float)(cpart->tmp-4), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); - *colr = (unsigned char)firw_data[caddress]; - *colg = (unsigned char)firw_data[caddress+1]; - *colb = (unsigned char)firw_data[caddress+2]; - - if (ren->decorations_enable && cpart->dcolour) - { - int a = (cpart->dcolour>>24)&0xFF; - *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; - *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; - *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; - } - - *firea = cpart->life*4; - if(*firea > 240) - *firea = 240; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel - *pixel_mode |= FIRE_ADD; - //Returning 0 means dynamic, do not cache - } - else if(cpart->tmp > 0) - { - *pixel_mode |= PMODE_GLOW; - } - return 0; -} -int graphics_GBMB(GRAPHICS_FUNC_ARGS) -{ - if (cpart->life <= 0) { - *pixel_mode |= PMODE_FLARE; - } - else - { - *pixel_mode |= PMODE_SPARK; - } - return 0; -} -int graphics_COAL(GRAPHICS_FUNC_ARGS) //Both COAL and Broken Coal -{ - *colr += (cpart->tmp2-295.15f)/3; - - if (*colr > 170) - *colr = 170; - if (*colr < *colg) - *colr = *colg; - - *colg = *colb = *colr; - - if((cpart->temp-295.15f) > 300.0f-200.0f) - { - float frequency = 3.1415/(2*300.0f-(300.0f-200.0f)); - int q = ((cpart->temp-295.15f)>300.0f)?300.0f-(300.0f-200.0f):(cpart->temp-295.15f)-(300.0f-200.0f); - - *colr += sin(frequency*q) * 226; - *colg += sin(frequency*q*4.55 +3.14) * 34; - *colb += sin(frequency*q*2.22 +3.14) * 64; - } - return 0; -} - diff --git a/elements/none.cpp b/elements/none.cpp deleted file mode 100644 index 50f301f..0000000 --- a/elements/none.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "element.h" - -int update_(UPDATE_FUNC_ARGS) { - - return 0; -} diff --git a/elements/nptct.cpp b/elements/nptct.cpp deleted file mode 100644 index 2d68a9b..0000000 --- a/elements/nptct.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "element.h" - -int update_NPTCT(UPDATE_FUNC_ARGS) { - if (parts[i].temp>295.0f) - parts[i].temp -= 2.5f; - return 0; -} diff --git a/elements/nwhl.cpp b/elements/nwhl.cpp deleted file mode 100644 index f53b657..0000000 --- a/elements/nwhl.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "element.h" - -int update_NWHL(UPDATE_FUNC_ARGS) { - sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] -= 0.1f; - return 0; -} diff --git a/elements/pbcn.cpp b/elements/pbcn.cpp deleted file mode 100644 index 7e99397..0000000 --- a/elements/pbcn.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include "element.h" - -int update_PBCN(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - if (!parts[i].tmp2 && sim->pv[y/CELL][x/CELL]>4.0f) - parts[i].tmp2 = rand()%40+80; - if (parts[i].tmp2) - { - float advection = 0.1f; - parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; - parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; - parts[i].tmp2--; - if(!parts[i].tmp2){ - sim->kill_part(i); - return 1; - } - } - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_SPRK && - (r&0xFF)!=PT_NSCN && (r&0xFF)!=PT_PSCN && - (r&0xFF)!=PT_STKM && (r&0xFF)!=PT_STKM2 && - (r&0xFF)!=PT_PBCN && (r&0xFF)>8].ctype; - } - } - if (parts[i].life==10) - { - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[r>>8].life==0) - parts[r>>8].life = 10; - } - } - } - if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x+rx, y+ry, parts[i].ctype); - if (r!=-1) { - parts[r].vx = rx*3; - parts[r].vy = ry*3; - } - } - } - } - else if (parts[i].ctype==PT_LIFE) {//create life a different way - for (rx=-1; rx<2; rx++) { - for (ry=-1; ry<2; ry++) { - sim->create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); - } - } - } else { - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); - } - } - return 0; -} diff --git a/elements/pcln.cpp b/elements/pcln.cpp deleted file mode 100644 index cd1ed4f..0000000 --- a/elements/pcln.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include "element.h" - -int update_PCLN(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN) - parts[i].life = 10; - else if (parts[r>>8].ctype==PT_NSCN) - parts[i].life = 9; - } - if ((r&0xFF)==PT_PCLN) - { - if (parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[i].life==0&&parts[r>>8].life==10) - parts[i].life = 10; - } - } - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_SPRK && - (r&0xFF)!=PT_NSCN && (r&0xFF)!=PT_PSCN && - (r&0xFF)!=PT_STKM && (r&0xFF)!=PT_STKM2 && - (r&0xFF)!=PT_PBCN && (r&0xFF)>8].ctype; - } - } - if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x+rx, y+ry, parts[i].ctype); - if (r!=-1) { - parts[r].vx = rx*3; - parts[r].vy = ry*3; - } - } - } - } - else if (parts[i].ctype==PT_LIFE) {//create life a different way - for (rx=-1; rx<2; rx++) { - for (ry=-1; ry<2; ry++) { - sim->create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); - } - } - } else { - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); - } - } - return 0; -} diff --git a/elements/phot.cpp b/elements/phot.cpp deleted file mode 100644 index 3ed6b5d..0000000 --- a/elements/phot.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include "element.h" - -int update_PHOT(UPDATE_FUNC_ARGS) { - int r, rt, rx, ry; - float rr, rrr; - parts[i].pavg[0] = x; - parts[i].pavg[1] = y; - if (!parts[i].ctype) { - sim->kill_part(i); - return 1; - } - if (1>rand()%10) update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rx(rand()%2000)) - { - parts[i].vx *= 0.90; - parts[i].vy *= 0.90; - sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); - rrr = (rand()%360)*3.14159f/180.0f; - rr = (rand()%128+128)/127.0f; - parts[r>>8].vx = rr*cosf(rrr); - parts[r>>8].vy = rr*sinf(rrr); - sim->pv[y/CELL][x/CELL] -= 15.0f * CFDS; - } - if ((r&0xFF)==PT_ISZS && 5>(rand()%2000)) - { - parts[i].vx *= 0.90; - parts[i].vy *= 0.90; - sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); - rr = (rand()%228+128)/127.0f; - rrr = (rand()%360)*3.14159f/180.0f; - parts[r>>8].vx = rr*cosf(rrr); - parts[r>>8].vy = rr*sinf(rrr); - sim->pv[y/CELL][x/CELL] -= 15.0f * CFDS; - } - } - r = pmap[y][x]; - if((r&0xFF) == PT_QRTZ && r)// && parts[i].ctype==0x3FFFFFFF) - { - float a = (rand()%360)*3.14159f/180.0f; - parts[i].vx = 3.0f*cosf(a); - parts[i].vy = 3.0f*sinf(a); - if(parts[i].ctype == 0x3FFFFFFF) - parts[i].ctype = 0x1F<<(rand()%26); - parts[i].life++; //Delay death - } - //r = pmap[y][x]; - //rt = r&0xFF; - /*if (rt==PT_CLNE || rt==PT_PCLN || rt==PT_BCLN || rt==PT_PBCN) { - if (!parts[r>>8].ctype) - parts[r>>8].ctype = PT_PHOT; - }*/ - - return 0; -} - -int graphics_PHOT(GRAPHICS_FUNC_ARGS) -{ - int x = 0; - *colr = *colg = *colb = 0; - for (x=0; x<12; x++) { - *colr += (cpart->ctype >> (x+18)) & 1; - *colb += (cpart->ctype >> x) & 1; - } - for (x=0; x<12; x++) - *colg += (cpart->ctype >> (x+9)) & 1; - x = 624/(*colr+*colg+*colb+1); - *colr *= x; - *colg *= x; - *colb *= x; - - *firea = 100; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode |= FIRE_ADD; - return 0; -} diff --git a/elements/pipe.cpp b/elements/pipe.cpp deleted file mode 100644 index 08432f5..0000000 --- a/elements/pipe.cpp +++ /dev/null @@ -1,332 +0,0 @@ -#include "element.h" - -signed char pos_1_rx[] = {-1,-1,-1, 0, 0, 1, 1, 1}; -signed char pos_1_ry[] = {-1, 0, 1,-1, 1,-1, 0, 1}; - -void pushParticle(Simulation * sim, int i, int count, int original) -{ - int rndstore, rnd, rx, ry, r, x, y, np, q, notctype=(((sim->parts[i].ctype)%3)+2); - if ((sim->parts[i].tmp&0xFF) == 0 || count >= 2)//don't push if there is nothing there, max speed of 2 per frame - return; - x = (int)(sim->parts[i].x+0.5f); - y = (int)(sim->parts[i].y+0.5f); - if( !(sim->parts[i].tmp&0x200) ) - { - //normal random push - rndstore = rand(); - // RAND_MAX is at least 32767 on all platforms i.e. pow(8,5)-1 - // so can go 5 cycles without regenerating rndstore - for (q=0; q<3; q++)//try to push twice - { - rnd = rndstore&7; - rndstore = rndstore>>3; - rx = pos_1_rx[rnd]; - ry = pos_1_ry[rnd]; - if (x+rx>=0 && y+ry>=0 && x+rxpmap[y+ry][x+rx]; - if (!r) - continue; - else if ((r&0xFF)==PT_PIPE && sim->parts[r>>8].ctype!=notctype && (sim->parts[r>>8].tmp&0xFF)==0) - { - sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); - sim->parts[r>>8].temp = sim->parts[i].temp; - sim->parts[r>>8].flags = sim->parts[i].flags; - sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; - sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; - if (r>>8 > original) - sim->parts[r>>8].tmp2 = 1;//skip particle push, normalizes speed - sim->parts[i].tmp &= ~0xFF; - count++; - pushParticle(sim, r>>8,count,original); - } - } - } - } - else //predefined 1 pixel thick pipe movement - { - int coords = 7 - ((sim->parts[i].tmp>>10)&7); - r = sim->pmap[y+ pos_1_ry[coords]][x+ pos_1_rx[coords]]; - if (!r) - { - } - else if ((r&0xFF)==PT_PIPE && sim->parts[r>>8].ctype!=notctype && (sim->parts[r>>8].tmp&0xFF)==0) - { - sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); - sim->parts[r>>8].temp = sim->parts[i].temp; - sim->parts[r>>8].flags = sim->parts[i].flags; - sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; - sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; - if (r>>8 > original) - sim->parts[r>>8].tmp2 = 1;//skip particle push, normalizes speed - sim->parts[i].tmp &= ~0xFF; - count++; - pushParticle(sim, r>>8,count,original); - } - - - } - return; -} - -int update_PIPE(UPDATE_FUNC_ARGS) { - int r, rx, ry, np; - int rnd, rndstore; - if (parts[i].ctype>=2 && parts[i].ctype<=4) - { - if (parts[i].life==3) - { - int lastneighbor = -1; - int neighborcount = 0; - int count = 0; - // make automatic pipe pattern - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==1) - { - parts[r>>8].ctype = (((parts[i].ctype)%3)+2);//reverse - parts[r>>8].life = 6; - if ( parts[i].tmp&0x100)//is a single pixel pipe - { - parts[r>>8].tmp |= 0x200;//will transfer to a single pixel pipe - parts[r>>8].tmp |= count<<10;//coords of where it came from - } - neighborcount ++; - lastneighbor = r>>8; - } - else if ((r&0xFF)==PT_PIPE&&parts[r>>8].ctype!=(((parts[i].ctype-1)%3)+2)) - { - neighborcount ++; - lastneighbor = r>>8; - } - count++; - } - if(neighborcount == 1) - parts[lastneighbor].tmp |= 0x100; - } - else - { - if (parts[i].tmp2 == 1)//skip particle push to prevent particle number being higher causeing speed up - { - parts[i].tmp2 = 0 ; - } - else - { - pushParticle(sim, i,0,i); - } - - if (nt)//there is something besides PIPE around current particle - { - rndstore = rand(); - rnd = rndstore&7; - rndstore = rndstore>>3; - rx = pos_1_rx[rnd]; - ry = pos_1_ry[rnd]; - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (surround_space && !r && (parts[i].tmp&0xFF)!=0) //creating at end - { - np = sim->create_part(-1,x+rx,y+ry,parts[i].tmp&0xFF); - if (np!=-1) - { - parts[np].temp = parts[i].temp;//pipe saves temp and life now - parts[np].life = parts[i].flags; - parts[np].tmp = parts[i].pavg[0]; - parts[np].ctype = parts[i].pavg[1]; - parts[i].tmp &= ~0xFF; - } - } - //try eating particle at entrance - else if ((parts[i].tmp&0xFF) == 0 && (sim->ptypes[r&0xFF].falldown!= 0 || sim->ptypes[r&0xFF].state == ST_GAS)) - { - if ((r&0xFF)==PT_SOAP) - sim->detach(r>>8); - parts[i].tmp = (parts[i].tmp&~0xFF) | parts[r>>8].type; - parts[i].temp = parts[r>>8].temp; - parts[i].flags = parts[r>>8].life; - parts[i].pavg[0] = parts[r>>8].tmp; - parts[i].pavg[1] = parts[r>>8].ctype; - sim->kill_part(r>>8); - } - else if ((parts[i].tmp&0xFF) == 0 && (r&0xFF)==PT_STOR && parts[r>>8].tmp && (sim->ptypes[parts[r>>8].tmp].falldown!= 0 || sim->ptypes[parts[r>>8].tmp].state == ST_GAS)) - { - parts[i].tmp = parts[r>>8].tmp; - parts[i].temp = parts[r>>8].temp; - parts[i].flags = parts[r>>8].flags; - parts[i].pavg[0] = parts[r>>8].pavg[0]; - parts[i].pavg[1] = parts[r>>8].pavg[1]; - parts[r>>8].tmp = 0; - parts[r>>8].life = 0; - } - } - } - } - } - else if (!parts[i].ctype && parts[i].life<=10) - { - if (parts[i].temp<272.15)//manual pipe colors - { - if (parts[i].temp>173.25&&parts[i].temp<273.15) - { - parts[i].ctype = 2; - parts[i].life = 0; - } - if (parts[i].temp>73.25&&parts[i].temp<=173.15) - { - parts[i].ctype = 3; - parts[i].life = 0; - } - if (parts[i].temp>=0&&parts[i].temp<=73.15) - { - parts[i].ctype = 4; - parts[i].life = 0; - } - } - else - { - // make a border - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - { - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_BRCK);//BRCK border, people didn't like DMND - } - } - if (parts[i].life<=1) - parts[i].ctype = 1; - } - } - else if (parts[i].ctype==1)//wait for empty space before starting to generate automatic pipe pattern - { - if (!parts[i].life) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=0 && y+ry>0 && x+rxtmp&0xFF)>0 && (cpart->tmp&0xFF)tmp&0xFF; - tpart.temp = cpart->temp; - tpart.life = cpart->flags; - tpart.tmp = cpart->pavg[0]; - tpart.ctype = cpart->pavg[1]; - t = tpart.type; - if (ren->graphicscache[t].isready) - { - *pixel_mode = ren->graphicscache[t].pixel_mode; - *colr = ren->graphicscache[t].colr; - *colg = ren->graphicscache[t].colg; - *colb = ren->graphicscache[t].colb; - *firea = ren->graphicscache[t].firea; - *firer = ren->graphicscache[t].firer; - *fireg = ren->graphicscache[t].fireg; - *fireb = ren->graphicscache[t].fireb; - } - else - { - *colr = PIXR(ren->sim->ptypes[t].pcolors); - *colg = PIXR(ren->sim->ptypes[t].pcolors); - *colb = PIXR(ren->sim->ptypes[t].pcolors); - if (ren->sim->ptypes[t].graphics_func) - { - (*(ren->sim->ptypes[t].graphics_func))(ren, &tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); - } - else - { - graphics_DEFAULT(ren, &tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); - } - } - //*colr = PIXR(ptypes[cpart->tmp&0xFF].pcolors); - //*colg = PIXG(ptypes[cpart->tmp&0xFF].pcolors); - //*colb = PIXB(ptypes[cpart->tmp&0xFF].pcolors); - } - else - { - if (cpart->ctype==2) - { - *colr = 50; - *colg = 1; - *colb = 1; - } - else if (cpart->ctype==3) - { - *colr = 1; - *colg = 50; - *colb = 1; - } - else if (cpart->ctype==4) - { - *colr = 1; - *colg = 1; - *colb = 50; - } - else if (cpart->temp<272.15&&cpart->ctype!=1) - { - if (cpart->temp>173.25&&cpart->temp<273.15) - { - *colr = 50; - *colg = 1; - *colb = 1; - } - if (cpart->temp>73.25&&cpart->temp<=173.15) - { - *colr = 1; - *colg = 50; - *colb = 1; - } - if (cpart->temp>=0&&cpart->temp<=73.15) - { - *colr = 1; - *colg = 1; - *colb = 50; - } - } - } - return 0; -} diff --git a/elements/plnt.cpp b/elements/plnt.cpp deleted file mode 100644 index a44c8c2..0000000 --- a/elements/plnt.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "element.h" - -int update_PLNT(UPDATE_FUNC_ARGS) { - int r, rx, ry, np; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) - { - np = sim->create_part(r>>8,x+rx,y+ry,PT_PLNT); - if (np<0) continue; - parts[np].life = 0; - } - else if ((r&0xFF)==PT_LAVA && 1>(rand()%250)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - } - else if (((r&0xFF)==PT_SMKE || (r&0xFF)==PT_CO2) && (1>rand()%250)) - { - sim->kill_part(r>>8); - parts[i].life = rand()%60 + 60; - } - else if ((r&0xFF)==PT_WOOD && (1>rand()%20) && abs(rx+ry)<=2 && sim->VINE_MODE) - { - int nnx = rand()%3 -1; - int nny = rand()%3 -1; - if (x+rx+nnx>=0 && y+ry+nny>0 && x+rx+nnxcreate_part(-1,x+rx+nnx,y+ry+nny,PT_VINE); - if (np<0) continue; - parts[np].temp = parts[i].temp; - } - } - } - if (parts[i].life==2) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_O2); - } - parts[i].life = 0; - } - return 0; -} diff --git a/elements/plsm.cpp b/elements/plsm.cpp deleted file mode 100644 index c6f7c20..0000000 --- a/elements/plsm.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "element.h" -#include "hmap.h" - -int graphics_PLSM(GRAPHICS_FUNC_ARGS) -{ - int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); - *colr = (unsigned char)ren->plasma_data[caddress]; - *colg = (unsigned char)ren->plasma_data[caddress+1]; - *colb = (unsigned char)ren->plasma_data[caddress+2]; - - *firea = 255; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode = PMODE_GLOW | PMODE_ADD; //Clear default, don't draw pixel - *pixel_mode |= FIRE_ADD; - //Returning 0 means dynamic, do not cache - return 0; -} diff --git a/elements/plut.cpp b/elements/plut.cpp deleted file mode 100644 index 3e2820d..0000000 --- a/elements/plut.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "element.h" - -int update_PLUT(UPDATE_FUNC_ARGS) { - if (1>rand()%100 && ((int)(5.0f*sim->pv[y/CELL][x/CELL]))>(rand()%1000)) - { - sim->create_part(i, x, y, PT_NEUT); - } - return 0; -} diff --git a/elements/prti.cpp b/elements/prti.cpp deleted file mode 100644 index df212d4..0000000 --- a/elements/prti.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include "element.h" -/*these are the count values of where the particle gets stored, depending on where it came from - 0 1 2 - 7 . 3 - 6 5 4 - PRTO does (count+4)%8, so that it will come out at the opposite place to where it came in - PRTO does +/-1 to the count, so it doesn't jam as easily -*/ -int portal_rx[8] = {-1, 0, 1, 1, 1, 0,-1,-1}; -int portal_ry[8] = {-1,-1,-1, 0, 1, 1, 1, 0}; - -int update_PRTI(UPDATE_FUNC_ARGS) { - int r, nnx, rx, ry, fe = 0; - int count =0; - parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); - if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; - else if (parts[i].tmp<0) parts[i].tmp = 0; - for (count=0; count<8; count++) - { - rx = portal_rx[count]; - ry = portal_ry[count]; - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].falldown== 0 && sim->ptypes[r&0xFF].state != ST_GAS && (r&0xFF)!=PT_SPRK)) - { - r = sim->photons[y+ry][x+rx]; - if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (sim->ptypes[r&0xFF].falldown== 0 && sim->ptypes[r&0xFF].state != ST_GAS && (r&0xFF)!=PT_SPRK)) - continue; - } - - if ((r&0xFF) == PT_SOAP) - sim->detach(r>>8); - - for ( nnx=0; nnx<80; nnx++) - if (!sim->portalp[parts[i].tmp][count][nnx].type) - { - sim->portalp[parts[i].tmp][count][nnx] = parts[r>>8]; - if ((r&0xFF)==PT_SPRK) - sim->part_change_type(r>>8,x+rx,y+ry,parts[r>>8].ctype); - else - sim->kill_part(r>>8); - fe = 1; - break; - } - } - } - - - if (fe) { - int orbd[4] = {0, 0, 0, 0}; //Orbital distances - int orbl[4] = {0, 0, 0, 0}; //Orbital locations - if (!parts[i].life) parts[i].life = rand(); - if (!parts[i].ctype) parts[i].ctype = rand(); - sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); - for (r = 0; r < 4; r++) { - if (orbd[r]>1) { - orbd[r] -= 12; - if (orbd[r]<1) { - orbd[r] = (rand()%128)+128; - orbl[r] = rand()%255; - } else { - orbl[r] += 2; - orbl[r] = orbl[r]%255; - } - } else { - orbd[r] = (rand()%128)+128; - orbl[r] = rand()%255; - } - } - sim->orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); - } else { - parts[i].life = 0; - parts[i].ctype = 0; - } - return 0; -} diff --git a/elements/prto.cpp b/elements/prto.cpp deleted file mode 100644 index ee61abf..0000000 --- a/elements/prto.cpp +++ /dev/null @@ -1,88 +0,0 @@ -#include "element.h" -/*these are the count values of where the particle gets stored, depending on where it came from - 0 1 2 - 7 . 3 - 6 5 4 - PRTO does (count+4)%8, so that it will come out at the opposite place to where it came in - PRTO does +/-1 to the count, so it doesn't jam as easily -*/ -int update_PRTO(UPDATE_FUNC_ARGS) { - int r, nnx, rx, ry, np, fe = 0; - int count = 0; - parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); - if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; - else if (parts[i].tmp<0) parts[i].tmp = 0; - for (count=0; count<8; count++) - { - rx = sim->portal_rx[count]; - ry = sim->portal_ry[count]; - if (x+rx>=0 && y+ry>0 && x+rxportalp[parts[i].tmp][randomness][nnx].type==PT_SPRK)// TODO: make it look better, spark creation - { - sim->create_part(-1,x+1,y,PT_SPRK); - sim->create_part(-1,x+1,y+1,PT_SPRK); - sim->create_part(-1,x+1,y-1,PT_SPRK); - sim->create_part(-1,x,y-1,PT_SPRK); - sim->create_part(-1,x,y+1,PT_SPRK); - sim->create_part(-1,x-1,y+1,PT_SPRK); - sim->create_part(-1,x-1,y,PT_SPRK); - sim->create_part(-1,x-1,y-1,PT_SPRK); - sim->portalp[parts[i].tmp][randomness][nnx] = sim->emptyparticle; - break; - } - else if (sim->portalp[parts[i].tmp][randomness][nnx].type) - { - if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM) - sim->player.spwn = 0; - if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM2) - sim->player2.spwn = 0; - np = sim->create_part(-1, x+rx, y+ry, sim->portalp[parts[i].tmp][randomness][nnx].type); - if (np<0) continue; - parts[np] = sim->portalp[parts[i].tmp][randomness][nnx]; - parts[np].x = x+rx; - parts[np].y = y+ry; - sim->portalp[parts[i].tmp][randomness][nnx] = sim->emptyparticle; - break; - } - } - } - } - } - if (fe) { - int orbd[4] = {0, 0, 0, 0}; //Orbital distances - int orbl[4] = {0, 0, 0, 0}; //Orbital locations - if (!parts[i].life) parts[i].life = rand(); - if (!parts[i].ctype) parts[i].life = rand(); - sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); - for (r = 0; r < 4; r++) { - if (orbd[r]<254) { - orbd[r] += 16; - if (orbd[r]>254) { - orbd[r] = 0; - orbl[r] = rand()%255; - } - //orbl[r] += 1; - //orbl[r] = orbl[r]%255; - } else { - orbd[r] = 0; - orbl[r] = rand()%255; - } - } - sim->orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); - } else { - parts[i].life = 0; - parts[i].ctype = 0; - } - return 0; -} diff --git a/elements/pump.cpp b/elements/pump.cpp deleted file mode 100644 index 8a7254e..0000000 --- a/elements/pump.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "element.h" - -int update_PUMP(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - if (parts[i].life==10) - { - if (parts[i].temp>=256.0+273.15) - parts[i].temp=256.0+273.15; - if (parts[i].temp<= -256.0+273.15) - parts[i].temp = -256.0+273.15; - - if (sim->pv[y/CELL][x/CELL]<(parts[i].temp-273.15)) - sim->pv[y/CELL][x/CELL] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL][x/CELL]); - if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp-273.15)) - sim->pv[y/CELL+1][x/CELL] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL+1][x/CELL]); - if (x+CELLpv[y/CELL][x/CELL+1] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL][x/CELL+1]); - if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL+1][x/CELL+1]); - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[r>>8].life==0) - parts[r>>8].life = 10; - } - } - } - return 0; -} diff --git a/elements/pvod.cpp b/elements/pvod.cpp deleted file mode 100644 index e645d0a..0000000 --- a/elements/pvod.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "element.h" - -int update_PVOD(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN) - parts[i].life = 10; - else if (parts[r>>8].ctype==PT_NSCN) - parts[i].life = 9; - } - if ((r&0xFF)==PT_PVOD) - { - if (parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[i].life==0&&parts[r>>8].life==10) - parts[i].life = 10; - } - } - return 0; -} diff --git a/elements/pyro.cpp b/elements/pyro.cpp deleted file mode 100644 index 790e295..0000000 --- a/elements/pyro.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include "element.h" - -int update_PYRO(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, t = parts[i].type; - if (t==PT_PLSM&&parts[i].ctype == PT_NBLE&&parts[i].life <=1) - { - t = PT_NBLE; - sim->part_change_type(i,x,y,t); - parts[i].life = 0; - } - if(t==PT_FIRE && parts[i].life <=1) - { - if (parts[i].tmp==3){ - t = PT_DSTW; - sim->part_change_type(i,x,y,t); - parts[i].life = 0; - parts[i].ctype = PT_FIRE; - } - else if (parts[i].temp<625) - { - t = PT_SMKE; - sim->part_change_type(i,x,y,t); - parts[i].life = rand()%20+250; - } - } - if(t==PT_PLSM && parts[i].life <=1) - { - if (parts[i].tmp==3){ - t = PT_DSTW; - sim->part_change_type(i,x,y,t); - parts[i].life = 0; - parts[i].ctype = PT_FIRE; - } - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL] && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_STREAM) - continue; - rt = parts[r>>8].type; - if ((surround_space || sim->ptypes[rt].explosive) && - (t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL)) && - (t!=PT_PHOT || rt!=PT_INSL) && - (rt!=PT_SPNG || parts[r>>8].life==0) && - sim->ptypes[rt].flammable && (sim->ptypes[rt].flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000)) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); - parts[r>>8].temp = restrict_flt(sim->ptypes[PT_FIRE].heat + (sim->ptypes[rt].flammable/2), MIN_TEMP, MAX_TEMP); - parts[r>>8].life = rand()%80+180; - parts[r>>8].tmp = parts[r>>8].ctype = 0; - if (sim->ptypes[rt].explosive) - sim->pv[y/CELL][x/CELL] += 0.25f * CFDS; - } - } - if (sim->legacy_enable) update_legacy_PYRO(UPDATE_FUNC_SUBCALL_ARGS); - return 0; -} - -int update_legacy_PYRO(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, lpv, t = parts[i].type; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL] && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_STREAM) - continue; - rt = r&0xFF; - lpv = (int)sim->pv[(y+ry)/CELL][(x+rx)/CELL]; - if (lpv < 1) lpv = 1; - if (t!=PT_SPRK && sim->ptypes[rt].meltable && ((rt!=PT_RBDM && rt!=PT_LRBD) || t!=PT_SPRK) && ((t!=PT_FIRE&&t!=PT_PLSM) || (rt!=PT_METL && rt!=PT_IRON && rt!=PT_ETRD && rt!=PT_PSCN && rt!=PT_NSCN && rt!=PT_NTCT && rt!=PT_PTCT && rt!=PT_BMTL && rt!=PT_BRMT && rt!=PT_SALT && rt!=PT_INWR)) && - sim->ptypes[rt].meltable*lpv>(rand()%1000)) - { - if (t!=PT_LAVA || parts[i].life>0) - { - parts[r>>8].ctype = (rt==PT_BRMT)?PT_BMTL:parts[r>>8].type; - parts[r>>8].ctype = (parts[r>>8].ctype==PT_SAND)?PT_GLAS:parts[r>>8].ctype; - sim->part_change_type(r>>8,x+rx,y+ry,PT_LAVA); - parts[r>>8].life = rand()%120+240; - } - else - { - parts[i].life = 0; - t = parts[i].type = (parts[i].ctype)?parts[i].ctype:PT_STNE; - parts[i].ctype = PT_NONE;//rt; - sim->part_change_type(i,x,y,t); - return 1; - } - } - if (t!=PT_SPRK && (rt==PT_ICEI || rt==PT_SNOW)) - { - parts[r>>8].type = PT_WATR; - if (t==PT_FIRE) - { - sim->kill_part(i); - return 1; - } - if (t==PT_LAVA) - { - parts[i].life = 0; - t = parts[i].type = PT_STNE; - sim->part_change_type(i,x,y,t); - } - } - if (t!=PT_SPRK && (rt==PT_WATR || rt==PT_DSTW || rt==PT_SLTW)) - { - sim->kill_part(r>>8); - if (t==PT_FIRE) - { - sim->kill_part(i); - return 1; - } - if (t==PT_LAVA) - { - parts[i].life = 0; - t = parts[i].type = (parts[i].ctype)?parts[i].ctype:PT_STNE; - parts[i].ctype = PT_NONE; - sim->part_change_type(i,x,y,t); - } - } - } - return 0; -} diff --git a/elements/qrtz.cpp b/elements/qrtz.cpp deleted file mode 100644 index 7768765..0000000 --- a/elements/qrtz.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include "element.h" - -int update_QRTZ(UPDATE_FUNC_ARGS) { - int r, tmp, trade, rx, ry, np, t; - t = parts[i].type; - if (t == PT_QRTZ) - { - parts[i].pavg[0] = parts[i].pavg[1]; - parts[i].pavg[1] = sim->pv[y/CELL][x/CELL]; - if (parts[i].pavg[1]-parts[i].pavg[0] > 0.05*(parts[i].temp/3) || parts[i].pavg[1]-parts[i].pavg[0] < -0.05*(parts[i].temp/3)) - { - sim->part_change_type(i,x,y,PT_PQRT); - } - } - // absorb SLTW - if (parts[i].ctype!=-1) - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%2500)) - { - sim->kill_part(r>>8); - parts[i].ctype ++; - } - } - // grow if absorbed SLTW - if (parts[i].ctype>0) - { - for ( trade = 0; trade<5; trade ++) - { - rx = rand()%3-1; - ry = rand()%3-1; - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_QRTZ); - if (np>-1) - { - parts[np].tmp = parts[i].tmp; - parts[i].ctype--; - if (5>rand()%10) - { - parts[np].ctype=-1;//dead qrtz - } - else if (!parts[i].ctype && 1>rand()%15) - { - parts[i].ctype=-1; - } - - break; - } - } - } - } - } - // diffuse absorbed SLTW - if (parts[i].ctype>0) - { - for ( trade = 0; trade<9; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].ctype) && parts[r>>8].ctype>=0 )//diffusion - { - tmp = parts[i].ctype - parts[r>>8].ctype; - if (tmp ==1) - { - parts[r>>8].ctype ++; - parts[i].ctype --; - break; - } - if (tmp>0) - { - parts[r>>8].ctype += tmp/2; - parts[i].ctype -= tmp/2; - break; - } - } - } - } - } - return 0; -} diff --git a/elements/rime.cpp b/elements/rime.cpp deleted file mode 100644 index 617414b..0000000 --- a/elements/rime.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "element.h" - -int update_RIME(UPDATE_FUNC_ARGS) { - int r, rx, ry; - parts[i].vx = 0; - parts[i].vy = 0; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxpart_change_type(i,x,y,PT_FOG); - parts[i].life = rand()%50 + 60; - } - else if ((r&0xFF)==PT_FOG&&parts[r>>8].life>0) - { - sim->part_change_type(i,x,y,PT_FOG); - parts[i].life = parts[r>>8].life; - } - } - return 0; -} diff --git a/elements/shld.cpp b/elements/shld.cpp deleted file mode 100644 index cbe8306..0000000 --- a/elements/shld.cpp +++ /dev/null @@ -1,162 +0,0 @@ -#include "element.h" - -int update_SHLD1(UPDATE_FUNC_ARGS) { - int r, nnx, nny, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%200&&parts[i].life==0) - { - sim->part_change_type(i,x,y,PT_SHLD2); - parts[i].life = 7; - } - for ( nnx=-1; nnx<2; nnx++) - for ( nny=-1; nny<2; nny++) - { - if (!pmap[y+ry+nny][x+rx+nnx]) - { - sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); - //parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; - } - } - } - else if ((r&0xFF)==PT_SHLD3&&4>rand()%10) - { - sim->part_change_type(i,x,y,PT_SHLD2); - parts[i].life = 7; - } - } - return 0; -} - -int update_SHLD2(UPDATE_FUNC_ARGS) { - int r, nnx, nny, rx, ry, np; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx0) - sim->create_part(-1,x+rx,y+ry,PT_SHLD1); - if (!r) - continue; - else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) - { - if (25>rand()%200&&parts[i].life==0) - { - sim->part_change_type(i,x,y,PT_SHLD3); - parts[i].life = 7; - } - for ( nnx=-1; nnx<2; nnx++) - for ( nny=-1; nny<2; nny++) - { - if (!pmap[y+ry+nny][x+rx+nnx]) - { - np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); - if (np<0) continue; - parts[np].life=7; - } - } - } - else if ((r&0xFF)==PT_SHLD4&&4>rand()%10) - { - sim->part_change_type(i,x,y,PT_SHLD3); - parts[i].life = 7; - } - } - return 0; -} - -int update_SHLD3(UPDATE_FUNC_ARGS) { - int r, nnx, nny, rx, ry, np; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%2500) - { - np = sim->create_part(-1,x+rx,y+ry,PT_SHLD1); - if (np<0) continue; - parts[np].life=7; - sim->part_change_type(i,x,y,PT_SHLD2); - } - else - continue; - - } - if ((r&0xFF)==PT_SHLD1 && parts[i].life>3) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_SHLD2); - parts[r>>8].life=7; - } - else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) - { - if (18>rand()%3000&&parts[i].life==0) - { - sim->part_change_type(i,x,y,PT_SHLD4); - parts[i].life = 7; - } - for ( nnx=-1; nnx<2; nnx++) - for ( nny=-1; nny<2; nny++) - { - - if (!pmap[y+ry+nny][x+rx+nnx]) - { - np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); - if (np<0) continue; - parts[np].life=7; - } - } - } - } - return 0; -} - -int update_SHLD4(UPDATE_FUNC_ARGS) { - int r, nnx, nny, rx, ry, np; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%5500) - { - np = sim->create_part(-1,x+rx,y+ry,PT_SHLD1); - if (np<0) continue; - parts[np].life=7; - sim->part_change_type(i,x,y,PT_SHLD2); - } - else - continue; - - } - if ((r&0xFF)==PT_SHLD2 && parts[i].life>3) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_SHLD3); - parts[r>>8].life = 7; - } - else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) - for ( nnx=-1; nnx<2; nnx++) - for ( nny=-1; nny<2; nny++) - { - if (!pmap[y+ry+nny][x+rx+nnx]) - { - np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); - if (np<0) continue; - parts[np].life=7; - } - } - } - return 0; -} diff --git a/elements/sing.cpp b/elements/sing.cpp deleted file mode 100644 index fa6121c..0000000 --- a/elements/sing.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include "element.h" - -int update_SING(UPDATE_FUNC_ARGS) { - int r, rx, ry, cry, crx, rad, nxi, nxj, nb, j, spawncount; - int singularity = -parts[i].life; - float angle, v; - - if (sim->pv[y/CELL][x/CELL]pv[y/CELL][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL]); - if (y+CELLpv[y/CELL+1][x/CELL]pv[y/CELL+1][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL+1][x/CELL]); - if (x+CELLpv[y/CELL][x/CELL+1] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL+1]); - if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.1f*(singularity-sim->pv[y/CELL+1][x/CELL+1]); - } - if (y+CELL>0 && sim->pv[y/CELL-1][x/CELL]pv[y/CELL-1][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL-1][x/CELL]); - if (x+CELL>0) - { - sim->pv[y/CELL][x/CELL-1] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL-1]); - if (y+CELL>0) - sim->pv[y/CELL-1][x/CELL-1] += 0.1f*(singularity-sim->pv[y/CELL-1][x/CELL-1]); - } - if (parts[i].life<1) { - //Pop! - for (rx=-2; rx<3; rx++) { - crx = (x/CELL)+rx; - for (ry=-2; ry<3; ry++) { - cry = (y/CELL)+ry; - if (cry > 0 && crx > 0 && crx < (XRES/CELL) && cry < (YRES/CELL)) { - sim->pv[cry][crx] += (float)parts[i].tmp; - } - } - } - spawncount = (parts[i].tmp>255)?255:parts[i].tmp; - if (spawncount>=1) - spawncount = spawncount/8; - spawncount = spawncount*spawncount*M_PI; - for (j=0;jcreate_part(-3, x, y, PT_PHOT); - break; - case 1: - nb = sim->create_part(-3, x, y, PT_NEUT); - break; - case 2: - nb = sim->create_part(-3, x, y, PT_ELEC); - break; - } - if (nb!=-1) { - parts[nb].life = (rand()%300); - parts[nb].temp = MAX_TEMP/2; - angle = rand()*2.0f*M_PI/RAND_MAX; - v = (float)(rand())*5.0f/RAND_MAX; - parts[nb].vx = v*cosf(angle); - parts[nb].vy = v*sinf(angle); - } - else if (sim->pfree==-1) - break;//if we've run out of particles, stop trying to create them - saves a lot of lag on "sing bomb" saves - } - sim->kill_part(i); - return 1; - } - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=rand()/(RAND_MAX/100)+1) - { - if ((r&0xFF)==PT_SING && parts[r>>8].life >10) - { - if (parts[i].life+parts[r>>8].life > 255) - continue; - parts[i].life += parts[r>>8].life; - } - else - { - if (parts[i].life+3 > 255) - { - if (parts[r>>8].type!=PT_SING && 1>rand()%100) - { - int np; - np = sim->create_part(r>>8,x+rx,y+ry,PT_SING); - parts[np].life = rand()%50+60; - } - continue; - } - parts[i].life += 3; - parts[i].tmp++; - } - parts[i].temp = restrict_flt(parts[r>>8].temp+parts[i].temp, MIN_TEMP, MAX_TEMP); - sim->kill_part(r>>8); - } - } - return 0; -} diff --git a/elements/sltw.cpp b/elements/sltw.cpp deleted file mode 100644 index c965fd4..0000000 --- a/elements/sltw.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "element.h" - -int update_SLTW(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%10000)) - sim->kill_part(r>>8); - if ((r&0xFF)==PT_PLNT&&5>(rand()%1000)) - sim->kill_part(r>>8); - if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && !sim->legacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - } - if ((r&0xFF)==PT_FIRE){ - sim->kill_part(r>>8); - if(1>(rand()%150)){ - sim->kill_part(i); - return 1; - } - } - } - return 0; -} diff --git a/elements/smke.cpp b/elements/smke.cpp deleted file mode 100644 index d19bd0a..0000000 --- a/elements/smke.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "element.h" - -int graphics_SMKE(GRAPHICS_FUNC_ARGS) -{ - *colr = 55; - *colg = 55; - *colb = 55; - - *firea = 75; - *firer = 55; - *fireg = 55; - *fireb = 55; - - *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel - *pixel_mode |= FIRE_BLEND; - //Returning 1 means static, cache as we please - return 1; -} \ No newline at end of file diff --git a/elements/soap.cpp b/elements/soap.cpp deleted file mode 100644 index 0d31292..0000000 --- a/elements/soap.cpp +++ /dev/null @@ -1,234 +0,0 @@ -#include "element.h" - -int update_SOAP(UPDATE_FUNC_ARGS) -{ - int r, rx, ry, nr, ng, nb, na; - float tr, tg, tb, ta; - float blend; - - //0x01 - bubble on/off - //0x02 - first mate yes/no - //0x04 - "back" mate yes/no - - if ((parts[i].ctype&1) == 1) - { - if (parts[i].temp>0) - { - if (parts[i].life<=0) - { - if ((parts[i].ctype&6) != 6 && parts[i].ctype>1) - { - int target; - - target = i; - - while((parts[target].ctype&6) != 6 && parts[target].ctype>1) - { - if ((parts[target].ctype&2) == 2) - { - target = parts[target].tmp; - sim->detach(target); - } - - if ((parts[target].ctype&4) == 4) - { - target = parts[target].tmp2; - sim->detach(target); - } - } - } - - if ((parts[i].ctype&6) != 6) - parts[i].ctype = 0; - - if ((parts[i].ctype&6) == 6 && (parts[parts[i].tmp].ctype&6) == 6 && parts[parts[i].tmp].tmp == i) - sim->detach(i); - } - - parts[i].vy -= 0.1f; - - parts[i].vy *= 0.5f; - parts[i].vx *= 0.5f; - } - - if((parts[i].ctype&2) != 2) - { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type == PT_SOAP) && ((parts[r>>8].ctype&1) == 1) - && ((parts[r>>8].ctype&4) != 4)) - { - if ((parts[r>>8].ctype&2) == 2) - { - parts[i].tmp = r>>8; - parts[r>>8].tmp2 = i; - - parts[i].ctype |= 2; - parts[r>>8].ctype |= 4; - } - else - { - if ((parts[i].ctype&2) != 2) - { - parts[i].tmp = r>>8; - parts[r>>8].tmp2 = i; - - parts[i].ctype |= 2; - parts[r>>8].ctype |= 4; - } - } - } - } - } - else - { - if (parts[i].life<=0) - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL]) - continue; - - if (parts[i].temp>0) - { - if (sim->bmap[(y+ry)/CELL][(x+rx)/CELL] - || (r && sim->ptypes[r&0xFF].state != ST_GAS - && (r&0xFF) != PT_SOAP && (r&0xFF) != PT_GLAS) - || (parts[r>>8].ctype == 0 && (r&0xFF) == PT_SOAP - && (abs(parts[r>>8].vx)<2 || abs(parts[r>>8].vy)<2))) - { - sim->detach(i); - continue; - } - } - - if ((r&0xFF) == PT_SOAP && parts[r>>8].ctype == 1) - { - int buf; - - buf = parts[i].tmp; - - parts[i].tmp = r>>8; - parts[buf].tmp2 = r>>8; - parts[r>>8].tmp2 = i; - parts[r>>8].tmp = buf; - parts[r>>8].ctype = 7; - } - - if ((r&0xFF) == PT_SOAP && parts[r>>8].ctype == 7 && parts[i].tmp != r>>8 && parts[i].tmp2 != r>>8) - { - int buf; - - parts[parts[i].tmp].tmp2 = parts[r>>8].tmp2; - parts[parts[r>>8].tmp2].tmp = parts[i].tmp; - parts[r>>8].tmp2 = i; - parts[i].tmp = r>>8; - } - } - } - - if((parts[i].ctype&2) == 2) - { - float d, dx, dy; - - dx = parts[i].x - parts[parts[i].tmp].x; - dy = parts[i].y - parts[parts[i].tmp].y; - - d = 9/(pow(dx, 2)+pow(dy, 2)+9)-0.5; - - parts[parts[i].tmp].vx -= dx*d; - parts[parts[i].tmp].vy -= dy*d; - - parts[i].vx += dx*d; - parts[i].vy += dy*d; - - if (((parts[parts[i].tmp].ctype&2) == 2) && ((parts[parts[i].tmp].ctype&1) == 1) - && ((parts[parts[parts[i].tmp].tmp].ctype&2) == 2) && ((parts[parts[parts[i].tmp].tmp].ctype&1) == 1)) - { - int ii; - - ii = parts[parts[parts[i].tmp].tmp].tmp; - - dx = parts[ii].x - parts[parts[i].tmp].x; - dy = parts[ii].y - parts[parts[i].tmp].y; - - d = 81/(pow(dx, 2)+pow(dy, 2)+81)-0.5; - - parts[parts[i].tmp].vx -= dx*d*0.5f; - parts[parts[i].tmp].vy -= dy*d*0.5f; - - parts[ii].vx += dx*d*0.5f; - parts[ii].vy += dy*d*0.5f; - } - } - } - else - { - if (sim->pv[y/CELL][x/CELL]>0.5f || sim->pv[y/CELL][x/CELL]<(-0.5f)) - { - parts[i].ctype = 1; - parts[i].life = 10; - } - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].vx)/2; - ay = (parts[i].vy + parts[r>>8].vy)/2; - - parts[i].vx = ax; - parts[i].vy = ay; - parts[r>>8].vx = ax; - parts[r>>8].vy = ay; - } - } - } - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; - tg = (parts[r>>8].dcolour>>8)&0xFF; - tb = (parts[r>>8].dcolour)&0xFF; - ta = (parts[r>>8].dcolour>>24)&0xFF; - - nr = (tr*blend); - ng = (tg*blend); - nb = (tb*blend); - na = (ta*blend); - - parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; - } - } - - return 0; -} diff --git a/elements/spng.cpp b/elements/spng.cpp deleted file mode 100644 index 28b3e1b..0000000 --- a/elements/spng.cpp +++ /dev/null @@ -1,110 +0,0 @@ -#include "element.h" - -int update_SPNG(UPDATE_FUNC_ARGS) { - int r, trade, rx, ry, tmp, np; - if (sim->pv[y/CELL][x/CELL]<=3 && sim->pv[y/CELL][x/CELL]>=-3&&parts[i].temp<=374.0f) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=rand()/(RAND_MAX/100)+1) - { - parts[i].life++; - sim->kill_part(r>>8); - } - } - } - else - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create water - { - np = sim->create_part(-1,x+rx,y+ry,PT_WATR); - if (np>-1) parts[i].life--; - } - } - for ( trade = 0; trade<9; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].life)&&parts[i].life>0)//diffusion - { - tmp = parts[i].life - parts[r>>8].life; - if (tmp ==1) - { - parts[r>>8].life ++; - parts[i].life --; - trade = 9; - } - else if (tmp>0) - { - parts[r>>8].life += tmp/2; - parts[i].life -= tmp/2; - trade = 9; - } - } - } - } - tmp = 0; - if (parts[i].life>0) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life>60) - parts[r>>8].life -= parts[r>>8].life/60; - else if (parts[r>>8].life>2) - parts[r>>8].life--; - } - } - } - if (tmp && parts[i].life>3) - parts[i].life -= parts[i].life/3; - if (tmp>1) - tmp = tmp/2; - if (tmp || parts[i].temp>=374) - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create steam - { - np = sim->create_part(-1,x+rx,y+ry,PT_WTRV); - if (np>-1) - { - parts[np].temp = parts[i].temp; - tmp--; - parts[i].life--; - parts[i].temp -= 20.0f; - } - } - } - if (tmp>0) - { - if (parts[i].life>tmp) - parts[i].life -= tmp; - else - parts[i].life = 0; - } - return 0; -} diff --git a/elements/sprk.cpp b/elements/sprk.cpp deleted file mode 100644 index 244e831..0000000 --- a/elements/sprk.cpp +++ /dev/null @@ -1,230 +0,0 @@ -#include "element.h" - -int update_SPRK(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, conduct_sprk, nearp, pavg, ct = parts[i].ctype; - update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); - - if (parts[i].life<=0) - { - if (ct==PT_WATR||ct==PT_SLTW||ct==PT_PSCN||ct==PT_NSCN||ct==PT_ETRD||ct==PT_INWR) - parts[i].temp = R_TEMP + 273.15f; - if (ct<=0 || ct>=PT_NUM) - ct = PT_METL; - sim->part_change_type(i,x,y,ct); - parts[i].ctype = PT_NONE; - parts[i].life = 4; - if (ct == PT_WATR) - parts[i].life = 64; - if (ct == PT_SLTW) - parts[i].life = 54; - if (ct == PT_SWCH) - parts[i].life = 14; - return 0; - } - if (ct==PT_SPRK) - { - sim->kill_part(i); - return 1; - } - else if (ct==PT_NTCT || ct==PT_PTCT) - { - update_NPTCT(UPDATE_FUNC_SUBCALL_ARGS); - } - else if (ct==PT_ETRD&&parts[i].life==1) - { - nearp = sim->nearest_part(i, PT_ETRD, -1); - if (nearp!=-1 && sim->parts_avg(i, nearp, PT_INSL)!=PT_INSL) - { - sim->create_line(x, y, (int)(parts[nearp].x+0.5f), (int)(parts[nearp].y+0.5f), 0, 0, PT_PLSM, 0); - sim->part_change_type(i,x,y,ct); - ct = parts[i].ctype = PT_NONE; - parts[i].life = 20; - sim->part_change_type(nearp,(int)(parts[nearp].x+0.5f),(int)(parts[nearp].y+0.5f),PT_SPRK); - parts[nearp].life = 9; - parts[nearp].ctype = PT_ETRD; - } - } - else if (ct==PT_NBLE&&parts[i].life<=1) - { - parts[i].life = rand()%150+50; - sim->part_change_type(i,x,y,PT_PLSM); - parts[i].ctype = PT_NBLE; - parts[i].temp = 3500; - sim->pv[y/CELL][x/CELL] += 1; - } - else if (ct==PT_TESC) // tesla coil code - { - if (parts[i].tmp>300) - parts[i].tmp=300; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+rx*2, y+ry*2, PT_LIGH); - if (p!=-1) - { - if(parts[i].tmp<=4) //Prevent Arithmetic errors with zero values - continue; - parts[p].life=rand()%(2+parts[i].tmp/15)+parts[i].tmp/7; - if (parts[i].life>60) - parts[i].life=60; - parts[p].temp=parts[p].life*parts[i].tmp/2.5; - parts[p].tmp2=1; - parts[p].tmp=acos(1.0*rx/sqrt(rx*rx+ry*ry))/M_PI*360; - parts[i].temp-=parts[i].tmp*2+parts[i].temp/5; // slight self-cooling - if (fabs(sim->pv[y/CELL][x/CELL])!=0.0f) - { - if (fabs(sim->pv[y/CELL][x/CELL])<=0.5f) - sim->pv[y/CELL][x/CELL]=0; - else - sim->pv[y/CELL][x/CELL]-=(sim->pv[y/CELL][x/CELL]>0)?0.5:-0.5; - } - } - } - } - } - else if (ct==PT_IRON) { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()/(RAND_MAX/1000))) || - ((r&0xFF) == PT_SLTW && 30>(rand()/(RAND_MAX/1000))) || - ((r&0xFF) == PT_WATR && 30>(rand()/(RAND_MAX/1000)))) - { - if (rand()part_change_type(r>>8,x+rx,y+ry,PT_O2); - else - sim->part_change_type(r>>8,x+rx,y+ry,PT_H2); - } - } - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type; - conduct_sprk = 1; - - - pavg = sim->parts_avg(r>>8, i,PT_INSL); - if ((rt==PT_SWCH||(rt==PT_SPRK&&parts[r>>8].ctype==PT_SWCH)) && pavg!=PT_INSL) // make sparked SWCH turn off correctly - { - if (rt==PT_SWCH&&ct==PT_PSCN&&parts[r>>8].life<10) { - parts[r>>8].life = 10; - } - if (ct==PT_NSCN) { - sim->part_change_type(r>>8,x+rx,y+ry,PT_SWCH); - parts[r>>8].ctype = PT_NONE; - parts[r>>8].life = 9; - } - } - else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_PUMP||rt==PT_GPMP||rt==PT_HSWC||rt==PT_PBCN)) // PROP_PTOGGLE, Maybe? We seem to use 2 different methods for handling actived elements, this one seems better. Yes, use this one for new elements, PCLN is different for compatibility with existing saves - { - if (ct==PT_PSCN) parts[r>>8].life = 10; - else if (ct==PT_NSCN && parts[r>>8].life>=10) parts[r>>8].life = 9; - } - else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_LCRY&&abs(rx)<2&&abs(ry)<2)) - { - if (ct==PT_PSCN && parts[r>>8].tmp == 0) parts[r>>8].tmp = 2; - else if (ct==PT_NSCN && parts[r>>8].tmp == 3) parts[r>>8].tmp = 1; - } - - - // ct = spark from material, rt = spark to material. Make conduct_sprk = 0 if conduction not allowed - - if (pavg == PT_INSL) conduct_sprk = 0; - if (!((sim->ptypes[rt].properties&PROP_CONDUCTS)||rt==PT_INST||rt==PT_QRTZ)) conduct_sprk = 0; - if (abs(rx)+abs(ry)>=4 &&ct!=PT_SWCH&&rt!=PT_SWCH) - conduct_sprk = 0; - - - if (ct==PT_METL && (rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR||(rt==PT_SPRK&&(parts[r>>8].ctype==PT_NTCT||parts[r>>8].ctype==PT_PTCT))) && pavg!=PT_INSL) - { - parts[r>>8].temp = 473.0f; - if (rt==PT_NTCT||rt==PT_PTCT) - conduct_sprk = 0; - } - if (ct==PT_NTCT && !(rt==PT_PSCN || rt==PT_NTCT || (rt==PT_NSCN&&parts[i].temp>373.0f))) - conduct_sprk = 0; - if (ct==PT_PTCT && !(rt==PT_PSCN || rt==PT_PTCT || (rt==PT_NSCN&&parts[i].temp<373.0f))) - conduct_sprk = 0; - if (ct==PT_INWR && !(rt==PT_NSCN || rt==PT_INWR || rt==PT_PSCN)) - conduct_sprk = 0; - if (ct==PT_NSCN && rt==PT_PSCN) - conduct_sprk = 0; - if (ct==PT_ETRD && !(rt==PT_METL||rt==PT_ETRD||rt==PT_BMTL||rt==PT_BRMT||rt==PT_LRBD||rt==PT_RBDM||rt==PT_PSCN||rt==PT_NSCN)) - conduct_sprk = 0; - if (ct==PT_INST&&rt!=PT_NSCN) conduct_sprk = 0; - if (ct==PT_SWCH && (rt==PT_PSCN||rt==PT_NSCN||rt==PT_WATR||rt==PT_SLTW||rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR)) - conduct_sprk = 0; - if (rt==PT_QRTZ && !((ct==PT_NSCN||ct==PT_METL||ct==PT_PSCN||ct==PT_QRTZ) && (parts[r>>8].temp<173.15||sim->pv[(y+ry)/CELL][(x+rx)/CELL]>8))) - conduct_sprk = 0; - if (rt==PT_NTCT && !(ct==PT_NSCN || ct==PT_NTCT || (ct==PT_PSCN&&parts[r>>8].temp>373.0f))) - conduct_sprk = 0; - if (rt==PT_PTCT && !(ct==PT_NSCN || ct==PT_PTCT || (ct==PT_PSCN&&parts[r>>8].temp<373.0f))) - conduct_sprk = 0; - if (rt==PT_INWR && !(ct==PT_NSCN || ct==PT_INWR || ct==PT_PSCN)) - conduct_sprk = 0; - if (rt==PT_INST&&ct!=PT_PSCN) - conduct_sprk = 0; - - if (conduct_sprk) { - if (rt==PT_WATR||rt==PT_SLTW) { - if (parts[r>>8].life==0 && (parts[i].life<2 || ((r>>8)part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - if (rt==PT_WATR) parts[r>>8].life = 6; - else parts[r>>8].life = 5; - parts[r>>8].ctype = rt; - } - } - else if (rt==PT_INST) { - if (parts[i].life>=3&&parts[r>>8].life==0) - { - sim->flood_parts(x+rx,y+ry,PT_SPRK,PT_INST,-1, 0);//spark the wire - } - } - else if (parts[r>>8].life==0 && (parts[i].life<3 || ((r>>8)>8].life = 4; - parts[r>>8].ctype = rt; - sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - if (parts[r>>8].temp+10.0f<673.0f&&!sim->legacy_enable&&(rt==PT_METL||rt==PT_BMTL||rt==PT_BRMT||rt==PT_PSCN||rt==PT_NSCN||rt==PT_ETRD||rt==PT_NBLE||rt==PT_IRON)) - parts[r>>8].temp = parts[r>>8].temp+10.0f; - } - else if (ct==PT_ETRD && parts[i].life==5) - { - sim->part_change_type(i,x,y,ct); - parts[i].ctype = PT_NONE; - parts[i].life = 20; - parts[r>>8].life = 4; - parts[r>>8].ctype = rt; - sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - } - } - } - return 0; -} - -int graphics_SPRK(GRAPHICS_FUNC_ARGS) -{ - *firea = 80; - - *firer = *colr = 170; - *fireg = *colg = 200; - *fireb = *colb = 220; - //*pixel_mode |= FIRE_ADD; - *pixel_mode |= FIRE_ADD; - return 1; -} diff --git a/elements/stkm.cpp b/elements/stkm.cpp deleted file mode 100644 index 322eba1..0000000 --- a/elements/stkm.cpp +++ /dev/null @@ -1,488 +0,0 @@ -#include "element.h" - -int update_SPAWN(UPDATE_FUNC_ARGS) { - if (!sim->player.spwn) - sim->create_part(-1, x, y, PT_STKM); - - return 0; -} - -int update_STKM(UPDATE_FUNC_ARGS) -{ - run_stickman(&sim->player, UPDATE_FUNC_SUBCALL_ARGS); - return 0; -} - -int graphics_STKM(GRAPHICS_FUNC_ARGS) -{ - /**pixel_mode = PSPEC_STICKMAN; - if ((int)sim->player.elemplayer.elem].pcolors); - *colg = PIXG(ptypes[sim->player.elem].pcolors); - *colb = PIXB(ptypes[sim->player.elem].pcolors); - } - else*/ - { - *colr = *colg = *colb = 255; - } - return 1; -} - -int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { - int r, rx, ry; - float pp, d; - float dt = 0.9;///(FPSB*FPSB); //Delta time in square - float gvx, gvy; - float gx, gy, dl, dr; - - if ((parts[i].ctype>0 && parts[i].ctypeptypes[parts[i].ctype].falldown>0) || parts[i].ctype==SPC_AIR || parts[i].ctype == PT_NEUT || parts[i].ctype == PT_PHOT || parts[i].ctype == PT_LIGH) - playerp->elem = parts[i].ctype; - playerp->frames++; - - //Tempirature handling - if (parts[i].temp<243) - parts[i].life -= 1; - if ((parts[i].temp<309.6f) && (parts[i].temp>=243)) - parts[i].temp += 1; - - //Death - if (parts[i].life<1 || (sim->pv[y/CELL][x/CELL]>=4.5f && playerp->elem != SPC_AIR) ) //If his HP is less that 0 or there is very big wind... - { - for (r=-2; r<=1; r++) - { - sim->create_part(-1, x+r, y-2, playerp->elem); - sim->create_part(-1, x+r+1, y+2, playerp->elem); - sim->create_part(-1, x-2, y+r+1, playerp->elem); - sim->create_part(-1, x+2, y+r, playerp->elem); - } - sim->kill_part(i); //Kill him - return 1; - } - - //Follow gravity - gvx = gvy = 0.0f; - switch (sim->gravityMode) - { - default: - case 0: - gvy = 1; - break; - case 1: - gvy = gvx = 0.0f; - break; - case 2: - { - float gravd; - gravd = 0.01f - hypotf((parts[i].x - XCNTR), (parts[i].y - YCNTR)); - gvx = ((float)(parts[i].x - XCNTR) / gravd); - gvy = ((float)(parts[i].y - YCNTR) / gravd); - } - } - - gvx += sim->gravx[((int)parts[i].y/CELL)*(XRES/CELL)+((int)parts[i].x/CELL)]; - gvy += sim->gravy[((int)parts[i].y/CELL)*(XRES/CELL)+((int)parts[i].x/CELL)]; - - parts[i].vx -= gvx*dt; //Head up! - parts[i].vy -= gvy*dt; - - //Verlet integration - pp = 2*playerp->legs[0]-playerp->legs[2]+playerp->accs[0]*dt*dt; - playerp->legs[2] = playerp->legs[0]; - playerp->legs[0] = pp; - pp = 2*playerp->legs[1]-playerp->legs[3]+playerp->accs[1]*dt*dt; - playerp->legs[3] = playerp->legs[1]; - playerp->legs[1] = pp; - - pp = 2*playerp->legs[4]-playerp->legs[6]+(playerp->accs[2]+gvx)*dt*dt; - playerp->legs[6] = playerp->legs[4]; - playerp->legs[4] = pp; - pp = 2*playerp->legs[5]-playerp->legs[7]+(playerp->accs[3]+gvy)*dt*dt; - playerp->legs[7] = playerp->legs[5]; - playerp->legs[5] = pp; - - pp = 2*playerp->legs[8]-playerp->legs[10]+playerp->accs[4]*dt*dt; - playerp->legs[10] = playerp->legs[8]; - playerp->legs[8] = pp; - pp = 2*playerp->legs[9]-playerp->legs[11]+playerp->accs[5]*dt*dt; - playerp->legs[11] = playerp->legs[9]; - playerp->legs[9] = pp; - - pp = 2*playerp->legs[12]-playerp->legs[14]+(playerp->accs[6]+gvx)*dt*dt; - playerp->legs[14] = playerp->legs[12]; - playerp->legs[12] = pp; - pp = 2*playerp->legs[13]-playerp->legs[15]+(playerp->accs[7]+gvy)*dt*dt; - playerp->legs[15] = playerp->legs[13]; - playerp->legs[13] = pp; - - //Setting accseleration to 0 - playerp->accs[0] = 0; - playerp->accs[1] = 0; - - playerp->accs[2] = 0; - playerp->accs[3] = 0; - - playerp->accs[4] = 0; - playerp->accs[5] = 0; - - playerp->accs[6] = 0; - playerp->accs[7] = 0; - - gx = (playerp->legs[4] + playerp->legs[12])/2 - gvy; - gy = (playerp->legs[5] + playerp->legs[13])/2 + gvx; - dl = pow(gx - playerp->legs[4], 2) + pow(gy - playerp->legs[5], 2); - dr = pow(gx - playerp->legs[12], 2) + pow(gy - playerp->legs[13], 2); - - //Go left - if (((int)(playerp->comm)&0x01) == 0x01) - { - if (dl>dr) - { - if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) - { - playerp->accs[2] = -3*gvy-3*gvx; - playerp->accs[3] = 3*gvx-3*gvy; - playerp->accs[0] = -gvy; - playerp->accs[1] = gvx; - } - } - else - { - if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) - { - playerp->accs[6] = -3*gvy-3*gvx; - playerp->accs[7] = 3*gvx-3*gvy; - playerp->accs[0] = -gvy; - playerp->accs[1] = gvx; - } - } - } - - //Go right - if (((int)(playerp->comm)&0x02) == 0x02) - { - if (dleval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) - { - playerp->accs[2] = 3*gvy-3*gvx; - playerp->accs[3] = -3*gvx-3*gvy; - playerp->accs[0] = gvy; - playerp->accs[1] = -gvx; - } - } - else - { - if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) - { - playerp->accs[6] = 3*gvy-3*gvx; - playerp->accs[7] = -3*gvx-3*gvy; - playerp->accs[0] = gvy; - playerp->accs[1] = -gvx; - } - } - } - - //Jump - if (((int)(playerp->comm)&0x04) == 0x04 && - (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL) || !sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL))) - { - parts[i].vy -= 4*gvy; - playerp->accs[3] -= gvy; - playerp->accs[7] -= gvy; - } - - //Charge detector wall if foot inside - if (sim->bmap[(int)(playerp->legs[5]+0.5)/CELL][(int)(playerp->legs[4]+0.5)/CELL]==WL_DETECT) - sim->set_emap((int)playerp->legs[4]/CELL, (int)playerp->legs[5]/CELL); - if (sim->bmap[(int)(playerp->legs[13]+0.5)/CELL][(int)(playerp->legs[12]+0.5)/CELL]==WL_DETECT) - sim->set_emap((int)(playerp->legs[12]+0.5)/CELL, (int)(playerp->legs[13]+0.5)/CELL); - - //Searching for particles near head - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; - - if (!r && !sim->bmap[(y+ry)/CELL][(x+rx)/CELL]) - continue; - - if (sim->ptypes[r&0xFF].falldown!=0 || sim->ptypes[r&0xFF].state == ST_GAS || (r&0xFF) == PT_NEUT || (r&0xFF) == PT_PHOT) - { - playerp->elem = r&0xFF; //Current element - } - if ((r&0xFF)==PT_TESC || (r&0xFF)==PT_LIGH) - playerp->elem = PT_LIGH; - if ((r&0xFF) == PT_PLNT && parts[i].life<100) //Plant gives him 5 HP - { - if (parts[i].life<=95) - parts[i].life += 5; - else - parts[i].life = 100; - sim->kill_part(r>>8); - } - - if ((r&0xFF) == PT_NEUT) - { - if (parts[i].life<=100) parts[i].life -= (102-parts[i].life)/2; - else parts[i].life *= 0.9f; - sim->kill_part(r>>8); - } - if (sim->bmap[(ry+y)/CELL][(rx+x)/CELL]==WL_FAN) - playerp->elem = SPC_AIR; - if ((r&0xFF)==PT_PRTI) - STKM_interact(sim, playerp, i, rx, ry); - if (!parts[i].type)//STKM_interact may kill STKM - return 1; - } - - //Head position - rx = x + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01); - ry = y - 3*(playerp->pcomm == 0); - - //Spawn - if (((int)(playerp->comm)&0x08) == 0x08) - { - ry -= 2*(rand()%2)+1; - r = pmap[ry][rx]; - if (sim->ptypes[r&0xFF].state == ST_SOLID) - { - sim->create_part(-1, rx, ry, PT_SPRK); - playerp->frames = 0; - } - else - { - int np = -1; - if (playerp->elem == SPC_AIR) - sim->create_parts(rx + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01), ry, 4, 4, SPC_AIR, 0); - else if (playerp->elem==PT_LIGH && playerp->frames<30)//limit lightning creation rate - np = -1; - else - np = sim->create_part(-1, rx, ry, playerp->elem); - if ( (np < NPART) && np>=0) - { - if (playerp->elem == PT_PHOT) - { - int random = abs(rand()%3-1)*3; - if (random==0) - { - sim->kill_part(np); - } - else - { - parts[np].vy = 0; - if (((int)playerp->pcomm)&(0x01|0x02)) - parts[np].vx = (((((int)playerp->pcomm)&0x02) == 0x02) - (((int)(playerp->pcomm)&0x01) == 0x01))*random; - else - parts[np].vx = random; - } - } - else if (playerp->elem == PT_LIGH) - { - float angle; - int power = 100; - if (gvx!=0 || gvy!=0) - angle = atan2(gvx, gvy)*180.0f/M_PI; - else - angle = rand()%360; - if (((int)playerp->comm)&0x01) - angle += 180; - if (angle>360) - angle-=360; - if (angle<0) - angle+=360; - parts[np].tmp = angle; - parts[np].life=rand()%(2+power/15)+power/7; - parts[np].temp=parts[np].life*power/2.5; - parts[np].tmp2=1; - } - else if (playerp->elem != SPC_AIR) - { - parts[np].vx -= -gvy*(5*((((int)playerp->pcomm)&0x02) == 0x02) - 5*(((int)(playerp->pcomm)&0x01) == 0x01)); - parts[np].vy -= gvx*(5*((((int)playerp->pcomm)&0x02) == 0x02) - 5*(((int)(playerp->pcomm)&0x01) == 0x01)); - parts[i].vx -= (sim->ptypes[(int)playerp->elem].weight*parts[np].vx)/1000; - } - playerp->frames = 0; - } - - } - } - - //Simulation of joints - d = 25/(pow((playerp->legs[0]-playerp->legs[4]), 2) + pow((playerp->legs[1]-playerp->legs[5]), 2)+25) - 0.5; //Fast distance - playerp->legs[4] -= (playerp->legs[0]-playerp->legs[4])*d; - playerp->legs[5] -= (playerp->legs[1]-playerp->legs[5])*d; - playerp->legs[0] += (playerp->legs[0]-playerp->legs[4])*d; - playerp->legs[1] += (playerp->legs[1]-playerp->legs[5])*d; - - d = 25/(pow((playerp->legs[8]-playerp->legs[12]), 2) + pow((playerp->legs[9]-playerp->legs[13]), 2)+25) - 0.5; - playerp->legs[12] -= (playerp->legs[8]-playerp->legs[12])*d; - playerp->legs[13] -= (playerp->legs[9]-playerp->legs[13])*d; - playerp->legs[8] += (playerp->legs[8]-playerp->legs[12])*d; - playerp->legs[9] += (playerp->legs[9]-playerp->legs[13])*d; - - d = 36/(pow((playerp->legs[0]-parts[i].x), 2) + pow((playerp->legs[1]-parts[i].y), 2)+36) - 0.5; - parts[i].vx -= (playerp->legs[0]-parts[i].x)*d; - parts[i].vy -= (playerp->legs[1]-parts[i].y)*d; - playerp->legs[0] += (playerp->legs[0]-parts[i].x)*d; - playerp->legs[1] += (playerp->legs[1]-parts[i].y)*d; - - d = 36/(pow((playerp->legs[8]-parts[i].x), 2) + pow((playerp->legs[9]-parts[i].y), 2)+36) - 0.5; - parts[i].vx -= (playerp->legs[8]-parts[i].x)*d; - parts[i].vy -= (playerp->legs[9]-parts[i].y)*d; - playerp->legs[8] += (playerp->legs[8]-parts[i].x)*d; - playerp->legs[9] += (playerp->legs[9]-parts[i].y)*d; - - if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) - { - playerp->legs[4] = playerp->legs[6]; - playerp->legs[5] = playerp->legs[7]; - } - - if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) - { - playerp->legs[12] = playerp->legs[14]; - playerp->legs[13] = playerp->legs[15]; - } - - //This makes stick man "pop" from obstacles - if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) - { - float t; - t = playerp->legs[4]; playerp->legs[4] = playerp->legs[6]; playerp->legs[6] = t; - t = playerp->legs[5]; playerp->legs[5] = playerp->legs[7]; playerp->legs[7] = t; - } - - if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) - { - float t; - t = playerp->legs[12]; playerp->legs[12] = playerp->legs[14]; playerp->legs[14] = t; - t = playerp->legs[13]; playerp->legs[13] = playerp->legs[15]; playerp->legs[15] = t; - } - - //Keeping legs distance - if ((pow((playerp->legs[4] - playerp->legs[12]), 2) + pow((playerp->legs[5]-playerp->legs[13]), 2))<16) - { - float tvx, tvy; - tvx = -gvy; - tvy = gvx; - - if (tvx || tvy) - { - playerp->accs[2] -= 0.2*tvx/hypot(tvx, tvy); - playerp->accs[3] -= 0.2*tvy/hypot(tvx, tvy); - - playerp->accs[6] += 0.2*tvx/hypot(tvx, tvy); - playerp->accs[7] += 0.2*tvy/hypot(tvx, tvy); - } - } - - if ((pow((playerp->legs[0] - playerp->legs[8]), 2) + pow((playerp->legs[1]-playerp->legs[9]), 2))<16) - { - float tvx, tvy; - tvx = -gvy; - tvy = gvx; - - if (tvx || tvy) - { - playerp->accs[0] -= 0.2*tvx/hypot(tvx, tvy); - playerp->accs[1] -= 0.2*tvy/hypot(tvx, tvy); - - playerp->accs[4] += 0.2*tvx/hypot(tvx, tvy); - playerp->accs[5] += 0.2*tvy/hypot(tvx, tvy); - } - } - - //If legs touch something - STKM_interact(sim, playerp, i, (int)(playerp->legs[4]+0.5), (int)(playerp->legs[5]+0.5)); - STKM_interact(sim, playerp, i, (int)(playerp->legs[12]+0.5), (int)(playerp->legs[13]+0.5)); - STKM_interact(sim, playerp, i, (int)(playerp->legs[4]+0.5), (int)playerp->legs[5]); - STKM_interact(sim, playerp, i, (int)(playerp->legs[12]+0.5), (int)playerp->legs[13]); - if (!parts[i].type) - return 1; - - parts[i].ctype = playerp->elem; - return 0; -} - -void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y) -{ - int r; - if (x<0 || y<0 || x>=XRES || y>=YRES || !sim->parts[i].type) - return; - r = sim->pmap[y][x]; - if (r) - { - if ((r&0xFF)==PT_SPRK && playerp->elem!=PT_LIGH) //If on charge - { - sim->parts[i].life -= (int)(rand()*20/RAND_MAX)+32; - } - - if (sim->ptypes[r&0xFF].hconduct && ((playerp->elem!=PT_LIGH && sim->parts[r>>8].temp>=323) || sim->parts[r>>8].temp<=243)) - { - sim->parts[i].life -= 2; - playerp->accs[3] -= 1; - } - - if (sim->ptypes[r&0xFF].properties&PROP_DEADLY) - switch (r&0xFF) - { - case PT_ACID: - sim->parts[i].life -= 5; - break; - default: - sim->parts[i].life -= 1; - break; - } - - if (sim->ptypes[r&0xFF].properties&PROP_RADIOACTIVE) - sim->parts[i].life -= 1; - - if ((r&0xFF)==PT_PRTI && sim->parts[i].type) - { - int nnx, count=1;//gives rx=0, ry=1 in update_PRTO - sim->parts[r>>8].tmp = (int)((sim->parts[r>>8].temp-73.15f)/100+1); - if (sim->parts[r>>8].tmp>=CHANNELS) sim->parts[r>>8].tmp = CHANNELS-1; - else if (sim->parts[r>>8].tmp<0) sim->parts[r>>8].tmp = 0; - for (nnx=0; nnx<80; nnx++) - if (!sim->portalp[sim->parts[r>>8].tmp][count][nnx].type) - { - sim->portalp[sim->parts[r>>8].tmp][count][nnx] = sim->parts[i]; - sim->kill_part(i); - playerp->spwn = 1;//stop SPWN creating a new STKM while he is in portal - break; - } - } - } -} - -void STKM_init_legs(Simulation * sim, playerst* playerp, int i) -{ - int x, y; - - x = (int)(sim->parts[i].x+0.5f); - y = (int)(sim->parts[i].y+0.5f); - - playerp->legs[0] = x-1; - playerp->legs[1] = y+6; - playerp->legs[2] = x-1; - playerp->legs[3] = y+6; - - playerp->legs[4] = x-3; - playerp->legs[5] = y+12; - playerp->legs[6] = x-3; - playerp->legs[7] = y+12; - - playerp->legs[8] = x+1; - playerp->legs[9] = y+6; - playerp->legs[10] = x+1; - playerp->legs[11] = y+6; - - playerp->legs[12] = x+3; - playerp->legs[13] = y+12; - playerp->legs[14] = x+3; - playerp->legs[15] = y+12; -} diff --git a/elements/stkm2.cpp b/elements/stkm2.cpp deleted file mode 100644 index 967bea2..0000000 --- a/elements/stkm2.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "element.h" - -int update_SPAWN2(UPDATE_FUNC_ARGS) { - if (!sim->player2.spwn) - sim->create_part(-1, x, y, PT_STKM2); - - return 0; -} - -int update_STKM2(UPDATE_FUNC_ARGS) { - run_stickman(&sim->player2, UPDATE_FUNC_SUBCALL_ARGS); - return 0; -} - -int graphics_STKM2(GRAPHICS_FUNC_ARGS) -{ - /**pixel_mode = PSPEC_STICKMAN; - if ((int)sim->player2.elemplayer2.elem].pcolors); - *colg = PIXG(ptypes[sim->player2.elem].pcolors); - *colb = PIXB(ptypes[sim->player2.elem].pcolors); - } - else*/ - { - *colr = *colg = *colb = 255; - } - return 1; -} diff --git a/elements/stor.cpp b/elements/stor.cpp deleted file mode 100644 index 66eb072..0000000 --- a/elements/stor.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "element.h" - -int update_STOR(UPDATE_FUNC_ARGS) { - int r, rx, ry, np, rx1, ry1; - if(parts[i].life && !parts[i].tmp) - parts[i].life--; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8)>=NPART || !r) - continue; - if (!parts[i].tmp && !parts[i].life && (r&0xFF)!=PT_STOR && !(sim->ptypes[(r&0xFF)].properties&TYPE_SOLID) && (!parts[i].ctype || (r&0xFF)==parts[i].ctype)) - { - parts[i].tmp = parts[r>>8].type; - parts[i].temp = parts[r>>8].temp; - parts[i].flags = parts[r>>8].life; - parts[i].pavg[0] = parts[r>>8].tmp; - parts[i].pavg[1] = parts[r>>8].ctype; - sim->kill_part(r>>8); - } - if(parts[i].tmp && (r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN) - { - for(ry1 = 1; ry1 >= -1; ry1--){ - for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ // Oscilate the X starting at 0, 1, -1, 3, -5, etc (Though stop at -1) - np = sim->create_part(-1,x+rx1,y+ry1,parts[i].tmp); - if (np!=-1) - { - parts[np].temp = parts[i].temp; - parts[np].life = parts[i].flags; - parts[np].tmp = parts[i].pavg[0]; - parts[np].ctype = parts[i].pavg[1]; - parts[i].tmp = 0; - parts[i].life = 10; - break; - } - } - } - } - } - return 0; -} diff --git a/elements/swch.cpp b/elements/swch.cpp deleted file mode 100644 index ee2c467..0000000 --- a/elements/swch.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "element.h" - -int update_SWCH(UPDATE_FUNC_ARGS) { - int r, rt, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxparts_avg(i,r>>8,PT_INSL)!=PT_INSL) { - rt = r&0xFF; - if (rt==PT_SWCH) - { - if (parts[i].life>=10&&parts[r>>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[i].life==0&&parts[r>>8].life==10) - parts[i].life = 10; - } - else if (rt==PT_SPRK&&parts[i].life==10&&parts[r>>8].ctype!=PT_PSCN&&parts[r>>8].ctype!=PT_NSCN) { - sim->part_change_type(i,x,y,PT_SPRK); - parts[i].ctype = PT_SWCH; - parts[i].life = 4; - } - } - } - //turn off SWCH from two red BRAYS - if (parts[i].life==10 && (!(pmap[y-1][x-1]&0xFF) && ((pmap[y-1][x]&0xFF)==PT_BRAY&&parts[pmap[y-1][x]>>8].tmp==2) && !(pmap[y-1][x+1]&0xFF) && ((pmap[y][x+1]&0xFF)==PT_BRAY&&parts[pmap[y][x+1]>>8].tmp==2))) - { - parts[i].life = 9; - } - //turn on SWCH from two red BRAYS - else if (parts[i].life<=5 && (!(pmap[y-1][x-1]&0xFF) && (((pmap[y-1][x]&0xFF)==PT_BRAY&&parts[pmap[y-1][x]>>8].tmp==2) || ((pmap[y+1][x]&0xFF)==PT_BRAY&&parts[pmap[y+1][x]>>8].tmp==2)) && !(pmap[y-1][x+1]&0xFF) && (((pmap[y][x+1]&0xFF)==PT_BRAY&&parts[pmap[y][x+1]>>8].tmp==2) || ((pmap[y][x-1]&0xFF)==PT_BRAY&&parts[pmap[y][x-1]>>8].tmp==2)))) - { - parts[i].life = 14; - } - return 0; -} diff --git a/elements/thdr.cpp b/elements/thdr.cpp deleted file mode 100644 index f7f95b4..0000000 --- a/elements/thdr.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "element.h" - -int update_THDR(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties&PROP_CONDUCTS) && parts[r>>8].life==0 && !((r&0xFF)==PT_WATR||(r&0xFF)==PT_SLTW) && parts[r>>8].ctype!=PT_SPRK) - { - parts[i].type = PT_NONE; - parts[r>>8].ctype = parts[r>>8].type; - sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - parts[r>>8].life = 4; - } - else if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT&&(r&0xFF)) - { - sim->pv[y/CELL][x/CELL] += 100.0f; - if (sim->legacy_enable&&1>(rand()%200)) - { - parts[i].life = rand()%50+120; - sim->part_change_type(i,x,y,PT_FIRE); - } - else - { - parts[i].type = PT_NONE; - } - } - } - if (parts[i].type==PT_NONE) { - sim->kill_part(i); - return 1; - } - return 0; -} diff --git a/elements/thrm.cpp b/elements/thrm.cpp deleted file mode 100644 index 91939e6..0000000 --- a/elements/thrm.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "element.h" - -int update_THRM(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) { - sim->part_change_type(i,x,y,PT_LAVA); - parts[i].ctype = PT_BMTL; - parts[i].temp = 3500.0f; - sim->pv[y/CELL][x/CELL] += 50.0f; - } else { - sim->part_change_type(i,x,y,PT_LAVA); - parts[i].life = 400; - parts[i].ctype = PT_THRM; - parts[i].temp = 3500.0f; - parts[i].tmp = 20; - } - } - } - return 0; -} diff --git a/elements/uran.cpp b/elements/uran.cpp deleted file mode 100644 index a8b2a06..0000000 --- a/elements/uran.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "element.h" - -int update_URAN(UPDATE_FUNC_ARGS) { - if (!sim->legacy_enable && sim->pv[y/CELL][x/CELL]>0.0f) - { - float atemp = parts[i].temp + (-MIN_TEMP); - parts[i].temp = restrict_flt((atemp*(1+(sim->pv[y/CELL][x/CELL]/2000)))+MIN_TEMP, MIN_TEMP, MAX_TEMP); - } - return 0; -} diff --git a/elements/vine.cpp b/elements/vine.cpp deleted file mode 100644 index 165d391..0000000 --- a/elements/vine.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "element.h" - -int update_VINE(UPDATE_FUNC_ARGS) { - int r, np, rx =(rand()%3)-1, ry=(rand()%3)-1; - if (x+rx>=0 && y+ry>0 && x+rxrand()%15) - sim->part_change_type(i,x,y,PT_PLNT); - else if (!r) - { - np = sim->create_part(-1,x+rx,y+ry,PT_VINE); - if (np<0) return 0; - parts[np].temp = parts[i].temp; - sim->part_change_type(i,x,y,PT_PLNT); - } - } - return 0; -} diff --git a/elements/warp.cpp b/elements/warp.cpp deleted file mode 100644 index ddc1b81..0000000 --- a/elements/warp.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "element.h" - -int update_WARP(UPDATE_FUNC_ARGS) { - int trade, r, rx, ry; - for ( trade = 0; trade<5; trade ++) - { - rx = rand()%3-1; - ry = rand()%3-1; - if (x+rx>=0 && y+ry>0 && x+rx=rand()%200)) - { - parts[i].x = parts[r>>8].x; - parts[i].y = parts[r>>8].y; - parts[r>>8].x = x; - parts[r>>8].y = y; - parts[i].life += 4; - pmap[y][x] = r; - pmap[y+ry][x+rx] = (i<<8)|parts[i].type; - trade = 5; - } - } - } - return 0; -} diff --git a/elements/watr.cpp b/elements/watr.cpp deleted file mode 100644 index 09b66a9..0000000 --- a/elements/watr.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "element.h" - -int update_WATR(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) - { - sim->part_change_type(i,x,y,PT_SLTW); - sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); - } - if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - } - if ((r&0xFF)==PT_FIRE){ - sim->kill_part(r>>8); - if(1>(rand()%150)){ - sim->kill_part(i); - return 1; - } - } - /*if ((r&0xFF)==PT_CNCT && 1>(rand()%500)) Concrete+Water to paste, not very popular - { - part_change_type(i,x,y,PT_PSTE); - sim.kill_part(r>>8); - }*/ - } - return 0; -} diff --git a/elements/wifi.cpp b/elements/wifi.cpp deleted file mode 100644 index ee5e264..0000000 --- a/elements/wifi.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "element.h" - -int update_WIFI(UPDATE_FUNC_ARGS) { - int r, rx, ry; - parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); - if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; - else if (parts[i].tmp<0) parts[i].tmp = 0; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxwireless[parts[i].tmp][0]) - { - if (((r&0xFF)==PT_NSCN||(r&0xFF)==PT_PSCN||(r&0xFF)==PT_INWR)&&parts[r>>8].life==0 && sim->wireless[parts[i].tmp][0]) - { - parts[r>>8].ctype = r&0xFF; - sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - parts[r>>8].life = 4; - } - } - else - { - if ((r&0xFF)==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3) - { - sim->wireless[parts[i].tmp][0] = 1; - sim->wireless[parts[i].tmp][1] = 1; - //ISWIRE = 1; - } - } - } - return 0; -} diff --git a/elements/wire.cpp b/elements/wire.cpp deleted file mode 100644 index 49d3720..0000000 --- a/elements/wire.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include "element.h" - -int update_WIRE(UPDATE_FUNC_ARGS) { - int s,r,rx,ry,count; - /* - 0: wire - 1: spark head - 2: spark tail - - tmp is previous state, ctype is current state - */ - //parts[i].tmp=parts[i].ctype; - parts[i].ctype=0; - if(parts[i].tmp==1) - { - parts[i].ctype=2; - } - if(parts[i].tmp==2) - { - parts[i].ctype=0; - } - - count=0; - for(rx=-1; rx<2; rx++) - for(ry=-1; ry<2; ry++) - { - if(x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN){parts[i].ctype=1; parts[r>>8].life=0; return 0;} - else if((r&0xFF)==PT_NSCN && parts[i].tmp==1){sim->create_part(-1, x+rx, y+ry, PT_SPRK);} - else if((r&0xFF)==PT_WIRE && parts[r>>8].tmp==1 && !parts[i].tmp){count++;} - } - } - if(count==1 || count==2) - parts[i].ctype=1; - return 0; -} - -int graphics_WIRE(GRAPHICS_FUNC_ARGS) -{ - if (cpart->ctype==0) - { - *colr = 255; - *colg = 204; - *colb = 0; - return 0; - } - if (cpart->ctype==1) - { - *colr = 50; - *colg = 100; - *colb = 255; - //*pixel_mode |= PMODE_GLOW; - return 0; - } - if (cpart->ctype==2) - { - *colr = 255; - *colg = 100; - *colb = 50; - //*pixel_mode |= PMODE_GLOW; - return 0; - } -} diff --git a/elements/wtrv.cpp b/elements/wtrv.cpp deleted file mode 100644 index de0eae4..0000000 --- a/elements/wtrv.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "element.h" - -int update_WTRV(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxlegacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - } - } - if(parts[i].temp>1273&&parts[i].ctype==PT_FIRE) - parts[i].temp-=parts[i].temp/1000; - return 0; -} diff --git a/elements/yest.cpp b/elements/yest.cpp deleted file mode 100644 index c6c7db6..0000000 --- a/elements/yest.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "element.h" - -int update_YEST(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%30) && !sim->legacy_enable) - { - sim->part_change_type(i,x,y,PT_DYST); - } - } - if (parts[i].temp>303&&parts[i].temp<317) { - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_YEST); - } - return 0; -} diff --git a/includes/Air.h b/includes/Air.h deleted file mode 100644 index 8e4dc25..0000000 --- a/includes/Air.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef AIR_H -#define AIR_H -#include "Config.h" - -class Simulation; - -class Air -{ -public: - int airMode; - //Arrays from the simulation - unsigned char (*bmap)[XRES/CELL]; - unsigned char (*emap)[XRES/CELL]; - float (*fvx)[XRES/CELL]; - float (*fvy)[XRES/CELL]; - // - float vx[YRES/CELL][XRES/CELL]; - float ovx[YRES/CELL][XRES/CELL]; - float vy[YRES/CELL][XRES/CELL]; - float ovy[YRES/CELL][XRES/CELL]; - float pv[YRES/CELL][XRES/CELL]; - float opv[YRES/CELL][XRES/CELL]; - float hv[YRES/CELL][XRES/CELL]; - float ohv[YRES/CELL][XRES/CELL]; // Ambient Heat - unsigned char bmap_blockair[YRES/CELL][XRES/CELL]; - float kernel[9]; - void make_kernel(void); - void update_airh(void); - void update_air(void); - Air(); -}; - -#endif diff --git a/includes/Config.h b/includes/Config.h deleted file mode 100644 index 4cb2da3..0000000 --- a/includes/Config.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Config.h - * - * Created on: Jan 5, 2012 - * Author: Simon - */ - -//#ifndef CONFIG_H_ -//#define CONFIG_H_ - - -#ifdef WIN32 -#define PATH_SEP "\\" -#else -#define PATH_SEP "/" -#endif - -//VersionInfoStart -#define SAVE_VERSION 71 -#define MINOR_VERSION 0 -#define BETA -#define BUILD_NUM 133 -//VersionInfoEnd - -#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter - -#define MTOS_EXPAND(str) #str -#define MTOS(str) MTOS_EXPAND(str) - -#define SERVER "powdertoy.co.uk" -#define SCRIPTSERVER "powdertoy.co.uk" - -#define LOCAL_SAVE_DIR "Saves" - -#define APPDATA_SUBDIR "\\HardWIRED" - -#define THUMB_CACHE_SIZE 256 - -#ifndef M_PI -#define M_PI 3.14159265f -#endif -#ifndef M_GRAV -#define M_GRAV 6.67300e-1 -#endif - -#define IMGCONNS 3 -#define TIMEOUT 100 -#define HTTP_TIMEOUT 10 - -#ifdef RENDERER -#define MENUSIZE 0 -#define BARSIZE 0 -#else -#define MENUSIZE 40 -#define BARSIZE 17 -#endif -#define XRES 612 -#define YRES 384 -#define NPART XRES*YRES - -#define XCNTR 306 -#define YCNTR 192 - -#define MAX_DISTANCE sqrt(pow(XRES, 2)+pow(YRES, 2)) - -#define GRAV_DIFF - -#define MAXSIGNS 16 -#define TAG_MAX 256 - -#define ZSIZE_D 16 -#define ZFACTOR_D 8 -extern unsigned char ZFACTOR; -extern unsigned char ZSIZE; - -#define CELL 4 -#define ISTP (CELL/2) -#define CFDS (4.0f/CELL) - -#define AIR_TSTEPP 0.3f -#define AIR_TSTEPV 0.4f -#define AIR_VADV 0.3f -#define AIR_VLOSS 0.999f -#define AIR_PLOSS 0.9999f - -#define GRID_X 5 -#define GRID_Y 4 -#define GRID_P 3 -#define GRID_S 6 -#define GRID_Z 3 - -#define CATALOGUE_X 4 -#define CATALOGUE_Y 3 -#define CATALOGUE_S 6 -#define CATALOGUE_Z 3 - -#define STAMP_MAX 240 - -#define SAVE_OPS - -#define NGOL 25 -#define NGOLALT 24 //NGOL should be 24, but use this var until I find out why - -#define CIRCLE_BRUSH 0 -#define SQUARE_BRUSH 1 -#define TRI_BRUSH 2 -#define BRUSH_NUM 3 - -#define SURF_RANGE 10 -#define NORMAL_MIN_EST 3 -#define NORMAL_INTERP 20 -#define NORMAL_FRAC 16 - -#define REFRACT 0x80000000 - -/* heavy flint glass, for awesome refraction/dispersion - this way you can make roof prisms easily */ -#define GLASS_IOR 1.9 -#define GLASS_DISP 0.07 - -#ifdef WIN32 -#define strcasecmp stricmp -#endif -#if defined(WIN32) && !defined(__GNUC__) -#define fmin min -#define fminf min -#define fmax max -#define fmaxf max -#endif - -#if defined(WIN32) && !defined(__GNUC__) -#define TPT_INLINE _inline -#else -#define TPT_INLINE inline -#endif - -#define SDEUT -//#define REALHEAT - -#define DEBUG_PARTS 0x0001 -#define DEBUG_PARTCOUNT 0x0002 -#define DEBUG_DRAWTOOL 0x0004 -#define DEBUG_PERFORMANCE_CALC 0x0008 -#define DEBUG_PERFORMANCE_FRAME 0x0010 - -//#endif /* CONFIG_H_ */ diff --git a/includes/Console.h b/includes/Console.h deleted file mode 100644 index 657f935..0000000 --- a/includes/Console.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef CONSOLE_H -#define CONSOLE_H - -#include -#include - -#include "interface/Sandbox.h" -#include "Simulation.h" - -class ConsoleCommand -{ -private: - std::string * command; - int returnStatus; - std::string * returnString; -public: - void SetCommand(std::string * command); - void SetError(std::string * error); - std::string * GetCommand(); - std::string * GetError(); - ConsoleCommand(); - ConsoleCommand(std::string * command, int returnStatus, std::string * returnString = new std::string("")); -}; - -class Console -{ -private: - bool sound_enable; - bool file_script; - std::vector * previousCommands; - std::string * lastError; - ui::Sandbox * sandbox; - Simulation * sim; -public: - virtual void Tick(float * dt); - int ParseType(char * txt); - int ParsePartref(char * txt); - int ParseCoords(char * coords, int *x, int *y); - virtual void ConsoleShown(); - virtual void ConsoleHidden(); - virtual int ProcessCommand(char * console); - virtual std::string * GetLastError(); - virtual std::vector * GetPreviousCommands(); - Console(ui::Sandbox * sandbox); - virtual ~Console(); -}; - -#endif // CONSOLE_H diff --git a/includes/Element.h b/includes/Element.h deleted file mode 100644 index 449bf51..0000000 --- a/includes/Element.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef ELEMENT_H -#define ELEMENT_H -// This header should be included by all files in src/elements/ - -#include -#include "Simulation.h" -#include "Renderer.h" -#include "ElementFunctions.h" -//#include "powder.h" -#include "Gravity.h" -#include "Misc.h" -#include "ElementGraphics.h" - -#endif diff --git a/includes/ElementFunctions.h b/includes/ElementFunctions.h deleted file mode 100644 index ef80b6f..0000000 --- a/includes/ElementFunctions.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * ElementFunctions.h - * - * Created on: Jan 5, 2012 - * Author: Simon - */ - -#ifndef ELEMENTFUNCTIONS_H_ -#define ELEMENTFUNCTIONS_H_ -#include "Elements.h" - -int update_ACID(UPDATE_FUNC_ARGS); -int update_ANAR(UPDATE_FUNC_ARGS); -int update_AMTR(UPDATE_FUNC_ARGS); -int update_ARAY(UPDATE_FUNC_ARGS); -int update_BCLN(UPDATE_FUNC_ARGS); -int update_BCOL(UPDATE_FUNC_ARGS); -int update_BMTL(UPDATE_FUNC_ARGS); -int update_BRMT(UPDATE_FUNC_ARGS); -int update_BOMB(UPDATE_FUNC_ARGS); -int update_BOYL(UPDATE_FUNC_ARGS); -int update_BTRY(UPDATE_FUNC_ARGS); -int update_C5(UPDATE_FUNC_ARGS); -int update_CLNE(UPDATE_FUNC_ARGS); -int update_COAL(UPDATE_FUNC_ARGS); -int update_DEUT(UPDATE_FUNC_ARGS); -int update_DSTW(UPDATE_FUNC_ARGS); -int update_FOG(UPDATE_FUNC_ARGS); -int update_FRZW(UPDATE_FUNC_ARGS); -int update_FRZZ(UPDATE_FUNC_ARGS); -int update_FSEP(UPDATE_FUNC_ARGS); -int update_FUSE(UPDATE_FUNC_ARGS); -int update_FIRW(UPDATE_FUNC_ARGS); -int update_FWRK(UPDATE_FUNC_ARGS); -int update_GLAS(UPDATE_FUNC_ARGS); -int update_GLOW(UPDATE_FUNC_ARGS); -int update_GOO(UPDATE_FUNC_ARGS); -int update_HSWC(UPDATE_FUNC_ARGS); -int update_IRON(UPDATE_FUNC_ARGS); -int update_ICEI(UPDATE_FUNC_ARGS); -int update_ISZ(UPDATE_FUNC_ARGS); -int update_LCRY(UPDATE_FUNC_ARGS); -int update_MORT(UPDATE_FUNC_ARGS); -int update_NEUT(UPDATE_FUNC_ARGS); -int update_NPTCT(UPDATE_FUNC_ARGS); -int update_PCLN(UPDATE_FUNC_ARGS); -int update_PHOT(UPDATE_FUNC_ARGS); -int update_PIPE(UPDATE_FUNC_ARGS); -int update_PLNT(UPDATE_FUNC_ARGS); -int update_PLUT(UPDATE_FUNC_ARGS); -int update_PRTI(UPDATE_FUNC_ARGS); -int update_PRTO(UPDATE_FUNC_ARGS); -int update_PYRO(UPDATE_FUNC_ARGS); -int update_PUMP(UPDATE_FUNC_ARGS); -int update_QRTZ(UPDATE_FUNC_ARGS); -int update_RIME(UPDATE_FUNC_ARGS); -int update_SHLD1(UPDATE_FUNC_ARGS); -int update_SHLD2(UPDATE_FUNC_ARGS); -int update_SHLD3(UPDATE_FUNC_ARGS); -int update_SHLD4(UPDATE_FUNC_ARGS); -int update_SING(UPDATE_FUNC_ARGS); -int update_SLTW(UPDATE_FUNC_ARGS); -int update_SPAWN(UPDATE_FUNC_ARGS); -int update_SPAWN2(UPDATE_FUNC_ARGS); -int update_SPNG(UPDATE_FUNC_ARGS); -int update_SPRK(UPDATE_FUNC_ARGS); -int update_STKM(UPDATE_FUNC_ARGS); -int update_STKM2(UPDATE_FUNC_ARGS); -int update_SWCH(UPDATE_FUNC_ARGS); -int update_THDR(UPDATE_FUNC_ARGS); -int update_THRM(UPDATE_FUNC_ARGS); -int update_URAN(UPDATE_FUNC_ARGS); -int update_VINE(UPDATE_FUNC_ARGS); -int update_WARP(UPDATE_FUNC_ARGS); -int update_WATR(UPDATE_FUNC_ARGS); -int update_WIFI(UPDATE_FUNC_ARGS); -int update_WTRV(UPDATE_FUNC_ARGS); -int update_YEST(UPDATE_FUNC_ARGS); -int update_SOAP(UPDATE_FUNC_ARGS); -int update_O2(UPDATE_FUNC_ARGS); -int update_H2(UPDATE_FUNC_ARGS); -int update_NBHL(UPDATE_FUNC_ARGS); -int update_NWHL(UPDATE_FUNC_ARGS); -int update_MERC(UPDATE_FUNC_ARGS); -int update_PBCN(UPDATE_FUNC_ARGS); -int update_GPMP(UPDATE_FUNC_ARGS); -int update_CLST(UPDATE_FUNC_ARGS); -int update_DLAY(UPDATE_FUNC_ARGS); -int update_WIRE(UPDATE_FUNC_ARGS); -int update_GBMB(UPDATE_FUNC_ARGS); -int update_CO2(UPDATE_FUNC_ARGS); -int update_CBNW(UPDATE_FUNC_ARGS); -int update_STOR(UPDATE_FUNC_ARGS); -int update_BIZR(UPDATE_FUNC_ARGS); -int update_PVOD(UPDATE_FUNC_ARGS); -int update_CONV(UPDATE_FUNC_ARGS); -int update_CAUS(UPDATE_FUNC_ARGS); -int update_DEST(UPDATE_FUNC_ARGS); -int update_EMP(UPDATE_FUNC_ARGS); -int update_LIGH(UPDATE_FUNC_ARGS); -int update_FIGH(UPDATE_FUNC_ARGS); -int update_ELEC(UPDATE_FUNC_ARGS); -int update_ACEL(UPDATE_FUNC_ARGS); -int update_DCEL(UPDATE_FUNC_ARGS); -int update_BANG(UPDATE_FUNC_ARGS); -int update_IGNT(UPDATE_FUNC_ARGS); -int update_MISC(UPDATE_FUNC_ARGS); -int update_legacy_PYRO(UPDATE_FUNC_ARGS); -int update_legacy_all(UPDATE_FUNC_ARGS); -int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS); -void STKM_init_legs(Simulation * sim, playerst* playerp, int i); -void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y); - - -int graphics_FIRE(GRAPHICS_FUNC_ARGS); -int graphics_SMKE(GRAPHICS_FUNC_ARGS); -int graphics_PLSM(GRAPHICS_FUNC_ARGS); -int graphics_DEUT(GRAPHICS_FUNC_ARGS); -int graphics_PHOT(GRAPHICS_FUNC_ARGS); -int graphics_NEUT(GRAPHICS_FUNC_ARGS); -int graphics_LAVA(GRAPHICS_FUNC_ARGS); -int graphics_SPRK(GRAPHICS_FUNC_ARGS); -int graphics_QRTZ(GRAPHICS_FUNC_ARGS); -int graphics_CLST(GRAPHICS_FUNC_ARGS); -int graphics_CBNW(GRAPHICS_FUNC_ARGS); -int graphics_SPNG(GRAPHICS_FUNC_ARGS); -int graphics_LIFE(GRAPHICS_FUNC_ARGS); -int graphics_DUST(GRAPHICS_FUNC_ARGS); -int graphics_GRAV(GRAPHICS_FUNC_ARGS); -int graphics_WIFI(GRAPHICS_FUNC_ARGS); -int graphics_PRTI(GRAPHICS_FUNC_ARGS); -int graphics_PRTO(GRAPHICS_FUNC_ARGS); -int graphics_BIZR(GRAPHICS_FUNC_ARGS); -int graphics_PIPE(GRAPHICS_FUNC_ARGS); -int graphics_INVS(GRAPHICS_FUNC_ARGS); -int graphics_ACID(GRAPHICS_FUNC_ARGS); -int graphics_FILT(GRAPHICS_FUNC_ARGS); -int graphics_BRAY(GRAPHICS_FUNC_ARGS); -int graphics_SWCH(GRAPHICS_FUNC_ARGS); -int graphics_THDR(GRAPHICS_FUNC_ARGS); -int graphics_GLOW(GRAPHICS_FUNC_ARGS); -int graphics_LCRY(GRAPHICS_FUNC_ARGS); -int graphics_PCLN(GRAPHICS_FUNC_ARGS); -int graphics_PBCN(GRAPHICS_FUNC_ARGS); -int graphics_DLAY(GRAPHICS_FUNC_ARGS); -int graphics_HSWC(GRAPHICS_FUNC_ARGS); -int graphics_PVOD(GRAPHICS_FUNC_ARGS); -int graphics_STOR(GRAPHICS_FUNC_ARGS); -int graphics_PUMP(GRAPHICS_FUNC_ARGS); -int graphics_GPMP(GRAPHICS_FUNC_ARGS); -int graphics_HFLM(GRAPHICS_FUNC_ARGS); -int graphics_FIRW(GRAPHICS_FUNC_ARGS); -int graphics_BOMB(GRAPHICS_FUNC_ARGS); -int graphics_GBMB(GRAPHICS_FUNC_ARGS); -int graphics_COAL(GRAPHICS_FUNC_ARGS); -int graphics_STKM(GRAPHICS_FUNC_ARGS); -int graphics_STKM2(GRAPHICS_FUNC_ARGS); -int graphics_DEST(GRAPHICS_FUNC_ARGS); -int graphics_EMP(GRAPHICS_FUNC_ARGS); -int graphics_LIGH(GRAPHICS_FUNC_ARGS); -int graphics_FIGH(GRAPHICS_FUNC_ARGS); -int graphics_ELEC(GRAPHICS_FUNC_ARGS); -int graphics_WIRE(GRAPHICS_FUNC_ARGS); -int graphics_ACEL(GRAPHICS_FUNC_ARGS); -int graphics_DCEL(GRAPHICS_FUNC_ARGS); -int graphics_DEFAULT(GRAPHICS_FUNC_ARGS); - -#endif /* ELEMENTFUNCTIONS_H_ */ diff --git a/includes/ElementGraphics.h b/includes/ElementGraphics.h deleted file mode 100644 index a880e71..0000000 --- a/includes/ElementGraphics.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef PGRAPHICS_H -#define PGRAPHICS_H - -#define PMODE 0x00000FFF -#define PMODE_NONE 0x00000000 -#define PMODE_FLAT 0x00000001 -#define PMODE_BLOB 0x00000002 -#define PMODE_BLUR 0x00000004 -#define PMODE_GLOW 0x00000008 -#define PMODE_SPARK 0x00000010 -#define PMODE_FLARE 0x00000020 -#define PMODE_LFLARE 0x00000040 -#define PMODE_ADD 0x00000080 -#define PMODE_BLEND 0x00000100 -#define PSPEC_STICKMAN 0x00000200 - -#define OPTIONS 0x0000F000 -#define NO_DECO 0x00001000 -#define DECO_FIRE 0x00002000 - -#define FIREMODE 0x00FF0000 -#define FIRE_ADD 0x00010000 -#define FIRE_BLEND 0x00020000 - -#define EFFECT 0xFF000000 -#define EFFECT_GRAVIN 0x01000000 -#define EFFECT_GRAVOUT 0x02000000 - -#define RENDER_EFFE OPTIONS | PSPEC_STICKMAN | EFFECT | PMODE_SPARK | PMODE_FLARE | PMODE_LFLARE -#define RENDER_FIRE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND | FIREMODE -#define RENDER_GLOW OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_GLOW | PMODE_ADD | PMODE_BLEND -#define RENDER_BLUR OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLUR | PMODE_ADD | PMODE_BLEND -#define RENDER_BLOB OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLOB | PMODE_ADD | PMODE_BLEND -#define RENDER_BASC OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND -#define RENDER_NONE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT - -#define COLOUR_HEAT 0x00000001 -#define COLOUR_LIFE 0x00000002 -#define COLOUR_GRAD 0x00000004 - -#define COLOUR_DEFAULT 0x00000000 - -#define DISPLAY_AIRC 0x00000001 -#define DISPLAY_AIRP 0x00000002 -#define DISPLAY_AIRV 0x00000004 -#define DISPLAY_AIRH 0x00000008 -#define DISPLAY_AIR 0x0000000F -#define DISPLAY_WARP 0x00000010 -#define DISPLAY_PERS 0x00000020 -#define DISPLAY_EFFE 0x00000040 - -#endif diff --git a/includes/Elements.h b/includes/Elements.h deleted file mode 100644 index 204460c..0000000 --- a/includes/Elements.h +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Elements.h - * - * Created on: Jan 5, 2012 - * Author: Simon - */ - -//#ifndef ELEMENTS_H_ -//#define ELEMENTS_H_ - -//#include "Config.h" -//#include "Simulation.h" - -#define IPL -257.0f -#define IPH 257.0f -#define ITL MIN_TEMP-1 -#define ITH MAX_TEMP+1 -// no transition (PT_NONE means kill part) -#define NT -1 -// special transition - lava ctypes etc need extra code, which is only found and run if ST is given -#define ST PT_NUM - -#define R_TEMP 22 -#define MAX_TEMP 9999 -#define MIN_TEMP 0 -#define O_MAX_TEMP 3500 -#define O_MIN_TEMP -273 - -#define TYPE_PART 0x00001 //1 Powders -#define TYPE_LIQUID 0x00002 //2 Liquids -#define TYPE_SOLID 0x00004 //4 Solids -#define TYPE_GAS 0x00008 //8 Gasses (Includes plasma) -#define TYPE_ENERGY 0x00010 //16 Energy (Thunder, Light, Neutrons etc.) -#define PROP_CONDUCTS 0x00020 //32 Conducts electricity -#define PROP_BLACK 0x00040 //64 Absorbs Photons (not currently implemented or used, a photwl attribute might be better) -#define PROP_NEUTPENETRATE 0x00080 //128 Penetrated by neutrons -#define PROP_NEUTABSORB 0x00100 //256 Absorbs neutrons, reflect is default (not currently implemented or used) -#define PROP_NEUTPASS 0x00200 //512 Neutrons pass through, such as with glass -#define PROP_DEADLY 0x00400 //1024 Is deadly for stickman (not currently implemented or used) -#define PROP_HOT_GLOW 0x00800 //2048 Hot Metal Glow -#define PROP_LIFE 0x01000 //4096 Is a GoL type -#define PROP_RADIOACTIVE 0x02000 //8192 Radioactive -#define PROP_LIFE_DEC 0x04000 //2^14 Life decreases by one every frame if > zero -#define PROP_LIFE_KILL 0x08000 //2^15 Kill when life value is <= zero -#define PROP_LIFE_KILL_DEC 0x10000 //2^16 Kill when life value is decremented to <= zero -#define PROP_SPARKSETTLE 0x20000 //2^17 Allow Sparks/Embers to settle - -#define FLAG_STAGNANT 1 - -#define ST_NONE 0 -#define ST_SOLID 1 -#define ST_LIQUID 2 -#define ST_GAS 3 - -#define UPDATE_FUNC_ARGS Simulation* sim, int i, int x, int y, int surround_space, int nt, Particle *parts, int pmap[YRES][XRES] -// to call another update function with same arguments: -#define UPDATE_FUNC_SUBCALL_ARGS sim, i, x, y, surround_space, nt, parts, pmap - -#define GRAPHICS_FUNC_ARGS Renderer * ren, Particle *cpart, int nx, int ny, int *pixel_mode, int* cola, int *colr, int *colg, int *colb, int *firea, int *firer, int *fireg, int *fireb -#define GRAPHICS_FUNC_SUBCALL_ARGS ren, cpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb - -#define UI_WALLSTART 222 -#define UI_ACTUALSTART 122 -#define UI_WALLCOUNT 25 - -#define WL_WALLELEC 122 -#define WL_EWALL 123 -#define WL_DETECT 124 -#define WL_STREAM 125 -#define WL_SIGN 126 -#define WL_FAN 127 -#define WL_FANHELPER 255 -#define WL_ALLOWLIQUID 128 -#define WL_DESTROYALL 129 -#define WL_ERASE 130 -#define WL_WALL 131 -#define WL_ALLOWAIR 132 -#define WL_ALLOWSOLID 133 -#define WL_ALLOWALLELEC 134 -#define WL_EHOLE 135 - -#define SPC_AIR 236 -#define SPC_HEAT 237 -#define SPC_COOL 238 -#define SPC_VACUUM 239 -#define SPC_WIND 241 -#define SPC_PGRV 243 -#define SPC_NGRV 244 -#define SPC_PROP 246 - -#define WL_ALLOWGAS 140 -#define WL_GRAV 142 -#define WL_ALLOWENERGY 145 - -#define NGT_GOL 0 -#define NGT_HLIF 1 -#define NGT_ASIM 2 -#define NGT_2x2 3 -#define NGT_DANI 4 -#define NGT_AMOE 5 -#define NGT_MOVE 6 -#define NGT_PGOL 7 -#define NGT_DMOE 8 -#define NGT_34 9 -#define NGT_LLIF 10 -#define NGT_STAN 11 -#define NGT_SEED 12 -#define NGT_MAZE 13 -#define NGT_COAG 14 -#define NGT_WALL 15 -#define NGT_GNAR 16 -#define NGT_REPL 17 -#define NGT_MYST 18 -#define NGT_LOTE 19 -#define NGT_FRG2 20 -#define NGT_STAR 21 -#define NGT_FROG 22 -#define NGT_BRAN 23 - -#define PT_NONE 0 -#define PT_DUST 1 -#define PT_WATR 2 -#define PT_OIL 3 -#define PT_FIRE 4 -#define PT_STNE 5 -#define PT_LAVA 6 -#define PT_GUNP 7 -#define PT_NITR 8 -#define PT_CLNE 9 -#define PT_GAS 10 -#define PT_PLEX 11 -#define PT_GOO 12 -#define PT_ICEI 13 -#define PT_METL 14 -#define PT_SPRK 15 -#define PT_SNOW 16 -#define PT_WOOD 17 -#define PT_NEUT 18 -#define PT_PLUT 19 -#define PT_PLNT 20 -#define PT_ACID 21 -#define PT_VOID 22 -#define PT_WTRV 23 -#define PT_CNCT 24 -#define PT_DSTW 25 -#define PT_SALT 26 -#define PT_SLTW 27 -#define PT_DMND 28 -#define PT_BMTL 29 -#define PT_BRMT 30 -#define PT_PHOT 31 -#define PT_URAN 32 -#define PT_WAX 33 -#define PT_MWAX 34 -#define PT_PSCN 35 -#define PT_NSCN 36 -#define PT_LNTG 37 -#define PT_INSL 38 -#define PT_BHOL 39 -#define PT_WHOL 40 -#define PT_RBDM 41 -#define PT_LRBD 42 -#define PT_NTCT 43 -#define PT_SAND 44 -#define PT_GLAS 45 -#define PT_PTCT 46 -#define PT_BGLA 47 -#define PT_THDR 48 -#define PT_PLSM 49 -#define PT_ETRD 50 -#define PT_NICE 51 -#define PT_NBLE 52 -#define PT_BTRY 53 -#define PT_LCRY 54 -#define PT_STKM 55 -#define PT_SWCH 56 -#define PT_SMKE 57 -#define PT_DESL 58 -#define PT_COAL 59 -#define PT_LO2 60 -#define PT_O2 61 -#define PT_INWR 62 -#define PT_YEST 63 -#define PT_DYST 64 -#define PT_THRM 65 -#define PT_GLOW 66 -#define PT_BRCK 67 -#define PT_HFLM 68 -#define PT_FIRW 69 -#define PT_FUSE 70 -#define PT_FSEP 71 -#define PT_AMTR 72 -#define PT_BCOL 73 -#define PT_PCLN 74 -#define PT_HSWC 75 -#define PT_IRON 76 -#define PT_MORT 77 -#define PT_LIFE 78 -#define PT_DLAY 79 -#define PT_CO2 80 -#define PT_DRIC 81 -#define PT_CBNW 82 -#define PT_STOR 83 -#define PT_PVOD 84 -#define PT_CONV 85 -#define PT_CAUS 86 - -#define PT_LIGH 87 -#define PT_TESC 88 -#define PT_DEST 89 - -#define PT_SPNG 90 -#define PT_RIME 91 -#define PT_FOG 92 -#define PT_BCLN 93 -#define PT_LOVE 94 -#define PT_DEUT 95 -#define PT_WARP 96 -#define PT_PUMP 97 -#define PT_FWRK 98 -#define PT_PIPE 99 -#define PT_FRZZ 100 -#define PT_FRZW 101 -#define PT_GRAV 102 -#define PT_BIZR 103 -#define PT_BIZRG 104 -#define PT_BIZRS 105 -#define PT_INST 106 -#define PT_ISOZ 107 -#define PT_ISZS 108 -#define PT_PRTI 109 -#define PT_PRTO 110 -#define PT_PSTE 111 -#define PT_PSTS 112 -#define PT_ANAR 113 -#define PT_VINE 114 -#define PT_INVIS 115 -#define PT_EQUALVEL 116 //all particles equal their velocities -#define PT_SPAWN2 117 -#define PT_SPAWN 118 -#define PT_SHLD1 119 -#define PT_SHLD2 120 -#define PT_SHLD3 121 -#define PT_SHLD4 122 -#define PT_LOLZ 123 -#define PT_WIFI 124 -#define PT_FILT 125 -#define PT_ARAY 126 -#define PT_BRAY 127 -#define PT_STKM2 128 -#define PT_BOMB 129 -#define PT_C5 130 -#define PT_SING 131 -#define PT_QRTZ 132 -#define PT_PQRT 133 -#define PT_EMP 134 -#define PT_BREC 135 -#define PT_ELEC 136 -#define PT_ACEL 137 -#define PT_DCEL 138 -#define PT_BANG 139 -#define PT_IGNT 140 -#define PT_BOYL 141 - -#define OLD_PT_WIND 147 -#define PT_H2 148 -#define PT_SOAP 149 -#define PT_NBHL 150 -#define PT_NWHL 151 -#define PT_MERC 152 -#define PT_PBCN 153 -#define PT_GPMP 154 -#define PT_CLST 155 -#define PT_WIRE 156 -#define PT_GBMB 157 -#define PT_FIGH 158 -#define PT_NUM 159 - - -//#endif /* ELEMENTS_H_ */ diff --git a/includes/GameSession.h b/includes/GameSession.h deleted file mode 100644 index 8417e0c..0000000 --- a/includes/GameSession.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef GAMESESSION_H -#define GAMESESSION_H - -class GameSession -{ -public: - GameSession(); -}; - -#endif // GAMESESSION_H diff --git a/includes/Global.h b/includes/Global.h deleted file mode 100644 index 8e94255..0000000 --- a/includes/Global.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef GAMESESSION_H -#define GAMESESSION_H - -#include "Singleton.h" -#include "Graphics.h" - -class Global : public Singleton -{ -public: - Graphics * g; - Global(); -}; - -#endif // GAMESESSION_H diff --git a/includes/Graphics.h b/includes/Graphics.h deleted file mode 100644 index 6cd5b36..0000000 --- a/includes/Graphics.h +++ /dev/null @@ -1,172 +0,0 @@ -#ifndef GRAPHICS_H -#define GRAPHICS_H - -#include -#include -#include "Config.h" -//#include "powder.h" - -#ifdef PIX16 -#define PIXELSIZE 2 -#define PIXPACK(x) ((((x)>>8)&0xF800)|(((x)>>5)&0x07E0)|(((x)>>3)&0x001F)) -#define PIXRGB(r,g,b) ((((r)<<8)&0xF800)|(((g)<<3)&0x07E0)|(((b)>>3)&0x001F)) -#define PIXR(x) (((x)>>8)&0xF8) -#define PIXG(x) (((x)>>3)&0xFC) -#define PIXB(x) (((x)<<3)&0xF8) -#else -#define PIXELSIZE 4 -#ifdef PIX32BGR -#define PIXPACK(x) ((((x)>>16)&0x0000FF)|((x)&0x00FF00)|(((x)<<16)&0xFF0000)) -#define PIXRGB(r,g,b) (((b)<<16)|((g)<<8)|((r)))// (((b)<<16)|((g)<<8)|(r)) -#define PIXR(x) ((x)&0xFF) -#define PIXG(x) (((x)>>8)&0xFF) -#define PIXB(x) ((x)>>16) -#else -#ifdef PIX32BGRA -#define PIXPACK(x) ((((x)>>8)&0x0000FF00)|(((x)<<8)&0x00FF0000)|(((x)<<24)&0xFF000000)) -#define PIXRGB(r,g,b) (((b)<<24)|((g)<<16)|((r)<<8)) -#define PIXR(x) (((x)>>8)&0xFF) -#define PIXG(x) (((x)>>16)&0xFF) -#define PIXB(x) (((x)>>24)) -#elif defined(PIX32OGL) -#define PIXPACK(x) (0xFF000000|((x)&0xFFFFFF)) -#define PIXRGB(r,g,b) (0xFF000000|((r)<<16)|((g)<<8)|((b)))// (((b)<<16)|((g)<<8)|(r)) -#define PIXRGBA(r,g,b,a) (((a)<<24)|((r)<<16)|((g)<<8)|((b)))// (((b)<<16)|((g)<<8)|(r)) -#define PIXA(x) (((x)>>24)&0xFF) -#define PIXR(x) (((x)>>16)&0xFF) -#define PIXG(x) (((x)>>8)&0xFF) -#define PIXB(x) ((x)&0xFF) -#else -#define PIXPACK(x) (x) -#define PIXRGB(r,g,b) (((r)<<16)|((g)<<8)|(b)) -#define PIXR(x) ((x)>>16) -#define PIXG(x) (((x)>>8)&0xFF) -#define PIXB(x) ((x)&0xFF) -#endif -#endif -#endif - -#ifdef PIX16 -typedef unsigned short pixel; -#else -typedef unsigned int pixel; -#endif - -/*extern int emp_decor; - -extern unsigned int *render_modes; -extern unsigned int render_mode; -extern unsigned int colour_mode; -extern unsigned int *display_modes; -extern unsigned int display_mode; - -extern SDL_Surface *sdl_scrn; -extern int sdl_scale; - -extern int sandcolour_r; -extern int sandcolour_g; -extern int sandcolour_b; -extern int sandcolour_frame; - -extern unsigned char fire_r[YRES/CELL][XRES/CELL]; -extern unsigned char fire_g[YRES/CELL][XRES/CELL]; -extern unsigned char fire_b[YRES/CELL][XRES/CELL]; - -extern unsigned int fire_alpha[CELL*3][CELL*3]; -extern pixel *pers_bg; - -extern char * flm_data; -extern int flm_data_points; -extern pixel flm_data_colours[]; -extern float flm_data_pos[]; - -extern char * plasma_data; -extern int plasma_data_points; -extern pixel plasma_data_colours[]; -extern float plasma_data_pos[];*/ - -class Graphics -{ -public: - SDL_Surface * sdl_scrn; - pixel *vid; - pixel *render_packed_rgb(void *image, int width, int height, int cmp_size); - static char * generate_gradient(pixel * colours, float * points, int pointcount, int size); - void draw_other(); - void draw_rgba_image(unsigned char *data, int x, int y, float a); - static void *ptif_pack(pixel *src, int w, int h, int *result_size); - static pixel *ptif_unpack(void *datain, int size, int *w, int *h); - static pixel *resample_img_nn(pixel *src, int sw, int sh, int rw, int rh); - static pixel *resample_img(pixel *src, int sw, int sh, int rw, int rh); - static pixel *rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f); - //void render_gravlensing(pixel *src, pixel * dst); - //void sdl_blit_1(int x, int y, int w, int h, pixel *src, int pitch); - //void sdl_blit_2(int x, int y, int w, int h, pixel *src, int pitch); - //void sdl_blit(int x, int y, int w, int h, pixel *src, int pitch); - void drawblob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb); - void draw_tool(int b, int sl, int sr, unsigned pc, unsigned iswall); - //int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc); - //void draw_menu(pixel *vid_buf, int i, int hover); - void drawpixel(int x, int y, int r, int g, int b, int a); - int addchar(int x, int y, int c, int r, int g, int b, int a); - int drawchar(int x, int y, int c, int r, int g, int b, int a); - int drawtext(int x, int y, std::string &s, int r, int g, int b, int a); - int drawtext(int x, int y, const char *s, int r, int g, int b, int a); - int drawtext_outline(int x, int y, const char *s, int r, int g, int b, int a, int olr, int olg, int olb, int ola); - int drawtextwrap(int x, int y, int w, const char *s, int r, int g, int b, int a); - void drawrect(int x, int y, int w, int h, int r, int g, int b, int a); - void fillrect(int x, int y, int w, int h, int r, int g, int b, int a); - void clearrect(int x, int y, int w, int h); - void drawdots(int x, int y, int h, int r, int g, int b, int a); - static int textwidth(char *s); - int drawtextmax(int x, int y, int w, char *s, int r, int g, int b, int a); - static int textnwidth(char *s, int n); - static void textnpos(char *s, int n, int w, int *cx, int *cy); - static int textwidthx(char *s, int w); - static int textposxy(char *s, int width, int w, int h); - static int textwrapheight(char *s, int width); - void blendpixel(int x, int y, int r, int g, int b, int a); - void draw_icon(int x, int y, char ch, int flag); - //void draw_air(); - //void draw_grav_zones(pixel *vid); - //void draw_grav(pixel *vid); - void draw_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a); - void addpixel(int x, int y, int r, int g, int b, int a); - void xor_pixel(int x, int y); - void xor_line(int x1, int y1, int x2, int y2); - void xor_rect(int x, int y, int w, int h); - void blend_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a); - //void render_parts(pixel *vid); -// #ifdef OGLR -// void draw_parts_fbo(); -// #endif -// void draw_parts(); -// void draw_walls(pixel *vid); -// void create_decorations(int x, int y, int rx, int ry, int r, int g, int b, int click, int tool); -// void create_decoration(int x, int y, int r, int g, int b, int click, int tool); -// void line_decorations(int x1, int y1, int x2, int y2, int rx, int ry, int r, int g, int b, int click, int tool); -// void box_decorations(int x1, int y1, int x2, int y2, int r, int g, int b, int click, int tool); -// void draw_color_menu(pixel *vid_buf, int i, int hover); - void draw_wavelengths(int x, int y, int h, int wl); - void render_signs(); -// void render_fire(pixel *dst); -// void prepare_alpha(int size, float intensity); - void draw_image(pixel *img, int x, int y, int w, int h, int a); - static void dim_copy(pixel *dst, pixel *src); - static void dim_copy_pers(pixel *dst, pixel *src); - //void render_zoom(pixel *img); - //int render_thumb(void *thumb, int size, int bzip2, pixel *vid_buf, int px, int py, int scl); - //void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry); - //int sdl_open(void); - //int draw_debug_info(pixel* vid, int lm, int lx, int ly, int cx, int cy, int line_x, int line_y); - void Clear(); - void Blit(); - void AttachSDLSurface(SDL_Surface * surface); - #ifdef OGLR - void clearScreen(float alpha); - void ogl_blit(int x, int y, int w, int h, pixel *src, int pitch, int scale); - #endif - Graphics(); -}; - -#endif diff --git a/includes/Gravity.h b/includes/Gravity.h deleted file mode 100644 index 9f36240..0000000 --- a/includes/Gravity.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef GRAVITY_H -#define GRAVITY_H - -#include -#include "Config.h" -#include "Simulation.h" - -class Simulation; - -struct mask_el { - char *shape; - char shapeout; - void *next; -}; -typedef struct mask_el mask_el; - - -/* - * float *gravmap = NULL;//Maps to be used by the main thread - float *gravp = NULL; - float *gravy = NULL; - float *gravx = NULL; - unsigned *gravmask = NULL; - - float *th_ogravmap = NULL;// Maps to be processed by the gravity thread - float *th_gravmap = NULL; - float *th_gravx = NULL; - float *th_gravy = NULL; - float *th_gravp = NULL; - - int th_gravchanged = 0; - - pthread_t gravthread; - pthread_mutex_t gravmutex; - pthread_cond_t gravcv; - int grav_ready = 0; - int gravthread_done = 0; - */ -class Gravity -{ -private: - unsigned *gravmask; - - float *th_ogravmap; - float *th_gravmap; - float *th_gravx; - float *th_gravy; - float *th_gravp; - - int th_gravchanged; - - pthread_t gravthread; - pthread_mutex_t gravmutex; - pthread_cond_t gravcv; - int grav_ready; - int gravthread_done; - - //Simulation * sim; -public: - float *gravmap; - float *gravp; - float *gravy; - float *gravx; - unsigned char (*bmap)[XRES/CELL]; - int ngrav_enable; - void grav_mask_r(int x, int y, char checkmap[YRES/CELL][XRES/CELL], char shape[YRES/CELL][XRES/CELL], char *shapeout); - void mask_free(mask_el *c_mask_el); - - void gravity_init(); - void gravity_cleanup(); - void gravity_update_async(); - - static void *update_grav_async_helper(void * context); - void update_grav_async(); - - void start_grav_async(); - void stop_grav_async(); - void update_grav(); - void gravity_mask(); - - void bilinear_interpolation(float *src, float *dst, int sw, int sh, int rw, int rh); - - #ifdef GRAVFFT - void grav_fft_init(); - void grav_fft_cleanup(); - #endif - - Gravity(); -}; - -/*extern int ngrav_enable; //Newtonian gravity -extern int gravwl_timeout; -extern int gravityMode;*/ - -/*float *gravmap;//Maps to be used by the main thread -float *gravp; -float *gravy; -float *gravx; -unsigned *gravmask; - -float *th_ogravmap;// Maps to be processed by the gravity thread -float *th_gravmap; -float *th_gravx; -float *th_gravy; -float *th_gravp;*/ - - -#endif diff --git a/includes/Misc.h b/includes/Misc.h deleted file mode 100644 index c5a61ef..0000000 --- a/includes/Misc.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef UTILS_H -#define UTILS_H -#include -#include - -#if defined(WIN32) && !defined(__GNUC__) -#define x86_cpuid(func,af,bf,cf,df) \ - do {\ - __asm mov eax, func\ - __asm cpuid\ - __asm mov af, eax\ - __asm mov bf, ebx\ - __asm mov cf, ecx\ - __asm mov df, edx\ - } while(0) -#else -#define x86_cpuid(func,af,bf,cf,df) \ -__asm__ __volatile ("cpuid":\ - "=a" (af), "=b" (bf), "=c" (cf), "=d" (df) : "a" (func)); -#endif - -static char hex[] = "0123456789ABCDEF"; - -char *exe_name(void); - -//Signum function -int isign(float i); - -unsigned clamp_flt(float f, float min, float max); - -float restrict_flt(float f, float min, float max); - -char *mystrdup(char *s); - -struct strlist -{ - char *str; - struct strlist *next; -}; - -void strlist_add(struct strlist **list, char *str); - -int strlist_find(struct strlist **list, char *str); - -void strlist_free(struct strlist **list); - -void save_presets(int do_update); - -void clean_text(char *text, int vwidth); - -void load_presets(void); - -void save_string(FILE *f, char *str); - -int sregexp(const char *str, char *pattern); - -int load_string(FILE *f, char *str, int max); - -void strcaturl(char *dst, char *src); - -void strappend(char *dst, char *src); - -void *file_load(char *fn, int *size); - -void clipboard_push_text(char * text); - -char * clipboard_pull_text(); - -extern char *clipboard_text; - -int register_extension(); - -int cpu_check(void); - -void HSV_to_RGB(int h,int s,int v,int *r,int *g,int *b); - -void RGB_to_HSV(int r,int g,int b,int *h,int *s,int *v); - -void membwand(void * dest, void * src, size_t destsize, size_t srcsize); -// a b -// c d - -struct matrix2d { - float a,b,c,d; -}; -typedef struct matrix2d matrix2d; - -// column vector -struct vector2d { - float x,y; -}; -typedef struct vector2d vector2d; - -matrix2d m2d_multiply_m2d(matrix2d m1, matrix2d m2); -vector2d m2d_multiply_v2d(matrix2d m, vector2d v); -matrix2d m2d_multiply_float(matrix2d m, float s); -vector2d v2d_multiply_float(vector2d v, float s); - -vector2d v2d_add(vector2d v1, vector2d v2); -vector2d v2d_sub(vector2d v1, vector2d v2); - -matrix2d m2d_new(float me0, float me1, float me2, float me3); -vector2d v2d_new(float x, float y); - -extern vector2d v2d_zero; -extern matrix2d m2d_identity; - -#endif diff --git a/includes/Renderer.h b/includes/Renderer.h deleted file mode 100644 index 39c8c1a..0000000 --- a/includes/Renderer.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef RENDERER_H -#define RENDERER_H - -#include "Config.h" -#include "Simulation.h" -#include "Graphics.h" - -class Simulation; - -class Graphics; - -struct gcache_item -{ - int isready; - int pixel_mode; - int cola, colr, colg, colb; - int firea, firer, fireg, fireb; -}; -typedef struct gcache_item gcache_item; - -class Renderer -{ -public: - //TODO: Vectors! - unsigned int *render_modes; - unsigned int render_mode; - unsigned int colour_mode; - unsigned int *display_modes; - unsigned int display_mode; - // - unsigned char fire_r[YRES/CELL][XRES/CELL]; - unsigned char fire_g[YRES/CELL][XRES/CELL]; - unsigned char fire_b[YRES/CELL][XRES/CELL]; - unsigned int fire_alpha[CELL*3][CELL*3]; - char * flm_data; - char * plasma_data; - int emp_decor; - // - int decorations_enable; - Simulation * sim; - Graphics * g; - gcache_item *graphicscache; - // - void draw_walls(); - void render_signs(); - void render_gravlensing(); - void render_fire(); - void prepare_alpha(int size, float intensity); - void render_parts(); - void draw_grav_zones(); - void draw_air(); - void draw_grav(); - void draw_other(); - void init_display_modes(); - void get_sign_pos(int i, int *x0, int *y0, int *w, int *h); - void prepare_graphicscache(); - Renderer(Graphics * g, Simulation * sim); -}; - -#endif diff --git a/includes/Simulation.h b/includes/Simulation.h deleted file mode 100644 index b3c51af..0000000 --- a/includes/Simulation.h +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Simulation.h - * - * Created on: Jan 2, 2012 - * Author: Simon - */ - -#ifndef SIMULATION_H_ -#define SIMULATION_H_ -#include -#include "Config.h" -#include "Renderer.h" -#include "Graphics.h" -#include "Elements.h" -#include "misc.h" - -#define CHANNELS ((int)(MAX_TEMP-73)/100+2) - -class Simulation; -class Renderer; -class Gravity; -class Air; - -struct Particle -{ - int type; - int life, ctype; - float x, y, vx, vy; - float temp; - float pavg[2]; - int flags; - int tmp; - int tmp2; - unsigned int dcolour; -}; -typedef struct Particle Particle; - -struct sign -{ - int x,y,ju; - char text[256]; -}; -typedef struct sign sign; - -struct part_type -{ - char *name; - pixel pcolors; - float advection; - float airdrag; - float airloss; - float loss; - float collision; - float gravity; - float diffusion; - float hotair; - int falldown; - int flammable; - int explosive; - int meltable; - int hardness; - int menu; - int enabled; - int weight; - int menusection; - float heat; - unsigned char hconduct; - char *descs; - char state; - unsigned int properties; - int (*update_func) (UPDATE_FUNC_ARGS); - int (*graphics_func) (GRAPHICS_FUNC_ARGS); -}; -typedef struct part_type part_type; - -struct part_transition -{ - float plv; // transition occurs if pv is lower than this - int plt; - float phv; // transition occurs if pv is higher than this - int pht; - float tlv; // transition occurs if t is lower than this - int tlt; - float thv; // transition occurs if t is higher than this - int tht; -}; -typedef struct part_transition part_transition; - -struct playerst -{ - char comm; //command cell - char pcomm; //previous command - int elem; //element power - float legs[16]; //legs' positions - float accs[8]; //accelerations - char spwn; //if stick man was spawned - unsigned int frames; //frames since last particle spawn - used when spawning LIGH -}; -typedef struct playerst playerst; - -struct wall_type -{ - pixel colour; - pixel eglow; // if emap set, add this to fire glow - int drawstyle; - const char *descs; -}; -typedef struct wall_type wall_type; - -struct gol_menu -{ - const char *name; - pixel colour; - int goltype; - const char *description; -}; -typedef struct gol_menu gol_menu; - -//#ifdef _cplusplus -class Simulation -{ -private: -public: - - Gravity * grav; - Air * air; - part_type ptypes[PT_NUM]; - part_transition ptransitions[PT_NUM]; - wall_type wtypes[UI_WALLCOUNT]; - gol_menu gmenu[NGOL]; - int goltype[NGOL]; - int grule[NGOL+1][10]; - playerst player; - playerst player2; - playerst fighters[256]; //255 is the maximum number of fighters - unsigned char fighcount; //Contains the number of fighters - int lighting_recreate; - int gravwl_timeout; - Particle portalp[CHANNELS][8][80]; - Particle emptyparticle; - int portal_rx[8]; - int portal_ry[8]; - int wireless[CHANNELS][2]; - char can_move[PT_NUM][PT_NUM]; - int parts_lastActiveIndex;// = NPART-1; - int pfree; - int NUM_PARTS; - int elementCount[PT_NUM]; - int ISWIRE; - sign * signs; - //Gol sim - int CGOL; - int ISGOL; - int GSPEED; - unsigned char gol[XRES][YRES]; - unsigned char gol2[XRES][YRES][NGOL+1]; - //Air sim - float (*vx)[XRES/CELL]; - float (*vy)[XRES/CELL]; - float (*pv)[XRES/CELL]; - float (*hv)[XRES/CELL]; - //Gravity sim - float *gravx;//gravx[(YRES/CELL) * (XRES/CELL)]; - float *gravy;//gravy[(YRES/CELL) * (XRES/CELL)]; - float *gravp;//gravp[(YRES/CELL) * (XRES/CELL)]; - float *gravmap;//gravmap[(YRES/CELL) * (XRES/CELL)]; - //Walls - unsigned char bmap[YRES/CELL][XRES/CELL]; - unsigned char emap[YRES/CELL][XRES/CELL]; - float fvx[YRES/CELL][XRES/CELL]; - float fvy[YRES/CELL][XRES/CELL]; - //Particles - Particle parts[NPART]; - int pmap[YRES][XRES]; - int photons[YRES][XRES]; - // - int gravityMode; - int airMode; - int ngrav_enable; - int legacy_enable; - int aheat_enable; - int VINE_MODE; - int water_equal_test; - int sys_pause; - int framerender; - int pretty_powder; - // - int sandcolour_r; - int sandcolour_g; - int sandcolour_b; //TODO: Make a single variable - //Stuff - int is_blocking(int t, int x, int y); - int is_boundary(int pt, int x, int y); - int find_next_boundary(int pt, int *x, int *y, int dm, int *em); - int pn_junction_sprk(int x, int y, int pt); - void photoelectric_effect(int nx, int ny); - unsigned direction_to_map(float dx, float dy, int t); - int do_move(int i, int x, int y, float nxf, float nyf); - int try_move(int i, int x, int y, int nx, int ny); - int eval_move(int pt, int nx, int ny, unsigned *rr); - void init_can_move(); - void create_cherenkov_photon(int pp); - void create_gain_photon(int pp); - void kill_part(int i); - int flood_prop(int x, int y, size_t propoffset, void * propvalue, int proptype); - int flood_prop_2(int x, int y, size_t propoffset, void * propvalue, int proptype, int parttype, char * bitmap); - int flood_water(int x, int y, int i, int originaly, int check); - void detach(int i); - void part_change_type(int i, int x, int y, int t); - int create_part_add_props(int p, int x, int y, int tv, int rx, int ry); - //int InCurrentBrush(int i, int j, int rx, int ry); - //int get_brush_flags(); - int create_part(int p, int x, int y, int t); - void delete_part(int x, int y, int flags); - int is_wire(int x, int y); - int is_wire_off(int x, int y); - void set_emap(int x, int y); - int parts_avg(int ci, int ni, int t); - void create_arc(int sx, int sy, int dx, int dy, int midpoints, int variance, int type, int flags); - int nearest_part(int ci, int t, int max_d); - void update_particles_i(int start, int inc); - void update_particles(); - void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert); - void clear_area(int area_x, int area_y, int area_w, int area_h); - void create_box(int x1, int y1, int x2, int y2, int c, int flags); - int flood_parts(int x, int y, int c, int cm, int bm, int flags); - int create_parts(int x, int y, int rx, int ry, int c, int flags); - void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags); - void *transform_save(void *odata, int *size, matrix2d transform, vector2d translate); - void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]); - void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]); - int get_wavelength_bin(int *wm); - int get_normal(int pt, int x, int y, float dx, float dy, float *nx, float *ny); - int get_normal_interp(int pt, float x0, float y0, float dx, float dy, float *nx, float *ny); - void clear_sim(); - void UpdateParticles(); - Simulation(); -}; -//#endif - -#endif /* SIMULATION_H_ */ diff --git a/includes/Singleton.h b/includes/Singleton.h deleted file mode 100644 index 6b2214e..0000000 --- a/includes/Singleton.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef SINGLETON_H -#define SINGLETON_H - -template - -class Singleton -{ -public: - static T& Ref() - { - static T instance; - return instance; - } -}; - -#endif // SINGLETON_H diff --git a/includes/interface.old/Button.h b/includes/interface.old/Button.h deleted file mode 100644 index 1b2900e..0000000 --- a/includes/interface.old/Button.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Button.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef BUTTON_H_ -#define BUTTON_H_ - -#include - -#include "Component.h" - -namespace ui -{ - class Button : public Component - { - public: - Button(int x, int y, int width, int height, const std::string& buttonText); - - bool Toggleable; - - std::string ButtonText; - - virtual void OnMouseClick(int x, int y, unsigned int button); - virtual void OnMouseUnclick(int x, int y, unsigned int button); - virtual void OnMouseUp(int x, int y, unsigned int button); - - virtual void OnMouseEnter(int x, int y, int dx, int dy); - virtual void OnMouseLeave(int x, int y, int dx, int dy); - - virtual void Draw(void* userdata); - - inline bool GetState() { return state; } - virtual void DoAction(); //action of button what ever it may be - - protected: - bool isButtonDown, state, isMouseInside; - }; -} -#endif /* BUTTON_H_ */ diff --git a/includes/interface.old/Component.h b/includes/interface.old/Component.h deleted file mode 100644 index a4d02db..0000000 --- a/includes/interface.old/Component.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Component.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef COMPONENT_H_ -#define COMPONENT_H_ - -namespace ui -{ - class State; - - class Component - { - public: - Component(int x, int y, int width, int height); - virtual ~Component(); - - inline void LocalizePoint(int& x, int& y) { x -= X; y -= Y; } //convert a global point (point on the state) to a point based on component's position - inline void GlobalizePoint(int& x, int& y) { x += X; y += Y; } //convert a local point based on component's position to a global point on the state - - bool Focused; - bool Visible; - bool Enabled; - int Width; - int Height; - int X; - int Y; - - virtual void Tick(float dt); - virtual void Draw(void* userdata); - - virtual void OnMouseEnter(int localx, int localy, int dx, int dy); - virtual void OnMouseLeave(int localx, int localy, int dx, int dy); - virtual void OnMouseMoved(int localx, int localy, int dx, int dy); - virtual void OnMouseMovedInside(int localx, int localy, int dx, int dy); - virtual void OnMouseHover(int localx, int localy); - virtual void OnMouseDown(int localx, int localy, unsigned int button); - virtual void OnMouseUp(int localx, int localy, unsigned int button); - virtual void OnMouseClick(int localx, int localy, unsigned int button); - virtual void OnMouseUnclick(int localx, int localy, unsigned int button); - virtual void OnMouseWheel(int localx, int localy, int d); - virtual void OnMouseWheelInside(int localx, int localy, int d); - virtual void OnMouseWheelFocused(int localx, int localy, int d); - virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); - virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); - - State* Parent; - }; -} -#endif /* COMPONENT_H_ */ diff --git a/includes/interface.old/ControlFactory.h b/includes/interface.old/ControlFactory.h deleted file mode 100644 index 8bfd780..0000000 --- a/includes/interface.old/ControlFactory.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef CONTROLFACTORY_H -#define CONTROLFACTORY_H - -#include "Panel.h" -#include "Window.h" -#include "GameSession.h" - -class ControlFactory -{ -public: - static ui::Panel * MainMenu(GameSession * session, int x, int y, int width, int height); - -}; - -#endif // CONTROLFACTORY_H diff --git a/includes/interface.old/Panel.h b/includes/interface.old/Panel.h deleted file mode 100644 index 9549ff4..0000000 --- a/includes/interface.old/Panel.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Panel.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef PANEL_H_ -#define PANEL_H_ - -#include "interface/Component.h" - -namespace ui { - -class Panel: public ui::Component { -public: - Panel(int x, int y, int width, int height); - virtual ~Panel(); -}; - -} /* namespace ui */ -#endif /* PANEL_H_ */ diff --git a/includes/interface.old/Sandbox.h b/includes/interface.old/Sandbox.h deleted file mode 100644 index 32a0471..0000000 --- a/includes/interface.old/Sandbox.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Sandbox.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef SANDBOX_H_ -#define SANDBOX_H_ - -#include "Component.h" -#include "Simulation.h" -#include "Renderer.h" - -namespace ui { - -class Sandbox: public ui::Component { -private: - int lastCoordX, lastCoordY; - int activeElement; - bool isMouseDown; - Renderer * ren; - Simulation * sim; -public: - Sandbox(); - virtual Simulation * GetSimulation(); - virtual void OnMouseMovedInside(int localx, int localy, int dx, int dy); - virtual void OnMouseDown(int localx, int localy, unsigned int button); - virtual void OnMouseUp(int localx, int localy, unsigned int button); - virtual void Draw(void* userdata); - virtual void Tick(float delta); - virtual ~Sandbox(); -}; - -} /* namespace ui */ -#endif /* SANDBOX_H_ */ diff --git a/includes/interface.old/State.h b/includes/interface.old/State.h deleted file mode 100644 index 00df199..0000000 --- a/includes/interface.old/State.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * State.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef STATE_H_ -#define STATE_H_ - -#include - -#include "interface/Component.h" - -namespace ui { - -class State -{ -public: - State(int w, int h); - virtual ~State(); - - bool AllowExclusiveDrawing; //false will not call draw on objects outside of bounds - - virtual void Tick(float dt); - virtual void Draw(void* userdata); - - virtual void OnMouseMove(int x, int y); - virtual void OnMouseDown(int x, int y, unsigned int button); - virtual void OnMouseUp(int x, int y, unsigned int button); - virtual void OnMouseWheel(int x, int y, int d); - virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); - virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); - - virtual void Add(Component *child); - virtual void Remove(Component *child); - - inline bool IsFocused(Component* c) { return (c == focusedComponent_); } - inline int GetMouseX() { return mouseX; } - inline int GetMouseY() { return mouseY; } - inline int GetWidth() { return width; } - inline int GetHeight() { return height; } - -protected: - std::vector Components; - - int width; - int height; - - int mouseX; - int mouseY; - int mouseXP; - int mouseYP; - -private: - Component* focusedComponent_; - -}; - -} /* namespace ui */ -#endif /* STATE_H_ */ diff --git a/includes/interface.old/Window.h b/includes/interface.old/Window.h deleted file mode 100644 index 86a4bcd..0000000 --- a/includes/interface.old/Window.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Window.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef WINDOW_H_ -#define WINDOW_H_ - -#include "interface/State.h" - -namespace ui { - -class Window: public ui::State { -public: - Window(); - virtual ~Window(); -}; - -} /* namespace ui */ -#endif /* WINDOW_H_ */ diff --git a/includes/interface/Button.h b/includes/interface/Button.h deleted file mode 100644 index 9046ea1..0000000 --- a/includes/interface/Button.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Button.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef BUTTON_H_ -#define BUTTON_H_ - -#include - -#include "Component.h" - -namespace ui -{ - class Button : public Component - { - public: - Button(State* parent_state, std::string buttonText); - - Button(Point position, Point size, std::string buttonText); - - Button(std::string buttonText); - virtual ~Button(); - - bool Toggleable; - - std::string ButtonText; - - virtual void OnMouseClick(int x, int y, unsigned int button); - virtual void OnMouseUnclick(int x, int y, unsigned int button); - //virtual void OnMouseUp(int x, int y, unsigned int button); - - virtual void OnMouseEnter(int x, int y); - virtual void OnMouseLeave(int x, int y); - - virtual void Draw(const Point& screenPos); - - inline bool GetState() { return state; } - virtual void DoAction(); //action of button what ever it may be - void SetTogglable(bool isTogglable); - bool GetTogglable(); - inline bool GetToggleState(); - inline void SetToggleState(bool state); - - protected: - bool isButtonDown, state, isMouseInside, isTogglable, toggle; - }; -} -#endif /* BUTTON_H_ */ diff --git a/includes/interface/Component.h b/includes/interface/Component.h deleted file mode 100644 index 5759c08..0000000 --- a/includes/interface/Component.h +++ /dev/null @@ -1,204 +0,0 @@ -#pragma once - -#include "Point.h" -#include "State.h" -#include "Platform.h" - -namespace ui -{ - class State; - class Panel; - - /* class Component - * - * An interactive UI component that can be added to a state or an XComponent*. - * *See sys::XComponent - */ - class Component - { - public: - Component(State* parent_state); - Component(Point position, Point size); - Component(); - virtual ~Component(); - - void* UserData; - inline State* const GetParentState() const { return parentstate_; } - bool IsFocused() const; - - Point Position; - Point Size; - bool Locked; - bool Visible; - - /* See the parent of this component. - * If new_parent is NULL, this component will have no parent. (THIS DOES NOT delete THE COMPONENT. See XComponent::RemoveChild) - */ - void SetParentState(State* state); - void SetParent(Panel* new_parent); - - //Get the parent component. - inline Panel* const GetParent() const { return _parent; } - - //UI functions: - /* - void Tick(float dt); - void Draw(const Point& screenPos); - - void OnMouseHover(int localx, int localy); - void OnMouseMoved(int localx, int localy, int dx, int dy); - void OnMouseMovedInside(int localx, int localy, int dx, int dy); - void OnMouseEnter(int localx, int localy); - void OnMouseLeave(int localx, int localy); - void OnMouseDown(int x, int y, unsigned int button); - void OnMouseUp(int x, int y, unsigned int button); - void OnMouseClick(int localx, int localy, unsigned int button); - void OnMouseUnclick(int localx, int localy, unsigned int button); - void OnMouseWheel(int localx, int localy, int d); - void OnMouseWheelInside(int localx, int localy, int d); - void OnKeyPress(int key, bool shift, bool ctrl, bool alt); - void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); - */ - - /// - // Called: Every tick. - // Params: - // dt: The change in time. - /// - virtual void Tick(float dt); - - /// - // Called: When ready to draw. - // Params: - // None - /// - virtual void Draw(const Point& screenPos); - - - - - /// - // Called: When the mouse is currently hovering over the item. (Called every tick) - // Params: - // localx: Local mouse X position. - // localy: Local mouse Y position. - /// - virtual void OnMouseHover(int localx, int localy); - - /// - // Called: When the mouse moves. - // Params: - // localx: Local mouse X position. - // localy: Local mouse Y position. - // dx: Mouse X delta. - // dy: Mouse Y delta. - /// - virtual void OnMouseMoved(int localx, int localy, int dx, int dy); - - /// - // Called: When the mouse moves. - // Params: - // localx: Local mouse X position. - // localy: Local mouse Y position. - // dx: Mouse X delta. - // dy: Mouse Y delta. - /// - virtual void OnMouseMovedInside(int localx, int localy, int dx, int dy); - - /// - // Called: When the mouse moves on top of the item. - // Params: - // localx: Local mouse X position. - // localy: Local mouse Y position. - // dx: Mouse X delta. - // dy: Mouse Y delta. - /// - virtual void OnMouseEnter(int localx, int localy); - - /// - // Called: When the mouse leaves the item. - // Params: - // localx: Local mouse X position. - // localy: Local mouse Y position. - /// - virtual void OnMouseLeave(int localx, int localy); - - /// - // Called: When a mouse button is pressed. - // Params: - // x: X position of the mouse. - // y: Y position of the mouse. - // button: The button that is being held down. - /// - virtual void OnMouseDown(int x, int y, unsigned button); - - /// - // Called: When a mouse button is released. - // Params: - // x: X position of the mouse. - // y: Y position of the mouse. - // button: The button that is being released. - /// - virtual void OnMouseUp(int x, int y, unsigned button); - - /// - // Called: When a mouse button is pressed on top of the item. - // Params: - // x: X position of the mouse. - // y: Y position of the mouse. - // button: The button that is being held down. - /// - virtual void OnMouseClick(int localx, int localy, unsigned button); - - /// - // Called: When a mouse button is released on top of the item. - // Params: - // x: X position of the mouse. - // y: Y position of the mouse. - // button: The button that is being released. - /// - virtual void OnMouseUnclick(int localx, int localy, unsigned button); - - /// - // Called: When the mouse wheel moves/changes. - // Params: - // localx: Local mouse X position. - // localy: Local mouse Y position. - // d: The mouse wheel movement value. - /// - virtual void OnMouseWheel(int localx, int localy, int d); - - /// - // Called: When the mouse wheel moves/changes on top of the item. - // Params: - // localx: Local mouse X position. - // localy: Local mouse Y position. - // d: The mouse wheel movement value. - /// - virtual void OnMouseWheelInside(int localx, int localy, int d); - - /// - // Called: When a key is pressed. - // Params: - // key: The value of the key that is being pressed. - // shift: Shift key is down. - // ctrl: Control key is down. - // alt: Alternate key is down. - /// - virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); - - /// - // Called: When a key is released. - // Params: - // key: The value of the key that is being released. - // shift: Shift key is released. - // ctrl: Control key is released. - // alt: Alternate key is released. - /// - virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); - - private: - State* parentstate_; - Panel* _parent; - }; -} diff --git a/includes/interface/ControlFactory.h b/includes/interface/ControlFactory.h deleted file mode 100644 index 0f8ad61..0000000 --- a/includes/interface/ControlFactory.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef CONTROLFACTORY_H -#define CONTROLFACTORY_H - -#include "Panel.h" -#include "Engine.h" - -class ControlFactory -{ -public: - static ui::Panel * MainMenu(int x, int y, int width, int height); - -}; - -#endif // CONTROLFACTORY_H diff --git a/includes/interface/Engine.h b/includes/interface/Engine.h deleted file mode 100644 index 6136fb4..0000000 --- a/includes/interface/Engine.h +++ /dev/null @@ -1,64 +0,0 @@ -#pragma once - -#include -#include "Singleton.h" -#include "Platform.h" -#include "State.h" -#include "Graphics.h" - -namespace ui -{ - class State; - - /* class Engine - * - * Controls the User Interface. - * Send user inputs to the Engine and the appropriate controls and components will interact. - */ - class Engine: public Singleton - { - public: - Engine(); - ~Engine(); - - void onMouseMove(int x, int y); - void onMouseClick(int x, int y, unsigned button); - void onMouseUnclick(int x, int y, unsigned button); - void onMouseWheel(int x, int y, int delta); - void onKeyPress(int key, bool shift, bool ctrl, bool alt); - void onKeyRelease(int key, bool shift, bool ctrl, bool alt); - void onResize(int newWidth, int newHeight); - void onClose(); - - void Begin(int width, int height); - inline bool Running() { return running_; } - void Exit(); - - void Tick(float dt); - void Draw(); - - inline int GetMouseX() { return mousex_; } - inline int GetMouseY() { return mousey_; } - inline int GetWidth() { return width_; } - inline int GetHeight() { return height_; } - - inline void SetSize(int width, int height); - - void SetState(State* state); - inline State* GetState() { return state_; } - float FpsLimit; - private: - State* statequeued_; - State* state_; - - bool running_; - - int mousex_; - int mousey_; - int mousexp_; - int mouseyp_; - int width_; - int height_; - }; - -} diff --git a/includes/interface/Label.h b/includes/interface/Label.h deleted file mode 100644 index 2168956..0000000 --- a/includes/interface/Label.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef LABEL_H -#define LABEL_H - -#include - -#include "Component.h" - -namespace ui -{ - class Label : public Component - { - public: - Label(State* parent_state, std::string labelText); - - Label(Point position, Point size, std::string labelText); - - Label(std::string labelText); - virtual ~Label(); - - std::string LabelText; - - virtual void Draw(const Point& screenPos); - }; -} - -#endif // LABEL_H diff --git a/includes/interface/Panel.h b/includes/interface/Panel.h deleted file mode 100644 index 7c9adab..0000000 --- a/includes/interface/Panel.h +++ /dev/null @@ -1,136 +0,0 @@ -#pragma once -#include -//#include "Platform.h" - -#include "interface/Point.h" -#include "interface/State.h" -#include "interface/Component.h" - -namespace ui -{ - /* class XComponent - * - * An eXtension of the Component class. - * Adds the ability to have child components. - * - * See sys::Component - */ -class Component; - class Panel : public Component - { - public: - friend class Component; - - Panel(State* parent_state); - Panel(Point position, Point size); - Panel(); - virtual ~Panel(); - - /* Add a child component. - * Similar to XComponent::SetParent - * - * If the component is already parented, then this will become the new parent. - */ - void AddChild(Component* c); - - // Remove child from component. This DOES NOT free the component from memory. - void RemoveChild(Component* c); - - // Remove child from component. This WILL free the component from memory unless told otherwise. - void RemoveChild(unsigned idx, bool freeMem = true); - - //Grab the number of children this component owns. - int GetChildCount(); - - //Get child of this component by index. - Component* GetChild(unsigned idx); - - void Tick(float dt); - void Draw(const Point& screenPos); - - void OnMouseHover(int localx, int localy); - void OnMouseMoved(int localx, int localy, int dx, int dy); - void OnMouseMovedInside(int localx, int localy, int dx, int dy); - void OnMouseEnter(int localx, int localy); - void OnMouseLeave(int localx, int localy); - void OnMouseDown(int x, int y, unsigned button); - void OnMouseUp(int x, int y, unsigned button); - void OnMouseClick(int localx, int localy, unsigned button); - void OnMouseUnclick(int localx, int localy, unsigned button); - void OnMouseWheel(int localx, int localy, int d); - void OnMouseWheelInside(int localx, int localy, int d); - void OnKeyPress(int key, bool shift, bool ctrl, bool alt); - void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); - - protected: - // child components - std::vector children; - - //UI functions: - /* - void XTick(float dt); - void XDraw(const Point& screenPos); - - void XOnMouseHover(int localx, int localy); - void XOnMouseMoved(int localx, int localy, int dx, int dy); - void XOnMouseMovedInside(int localx, int localy, int dx, int dy); - void XOnMouseEnter(int localx, int localy); - void XOnMouseLeave(int localx, int localy); - void XOnMouseDown(int x, int y, unsigned int button); - void XOnMouseUp(int x, int y, unsigned int button); - void XOnMouseClick(int localx, int localy, unsigned int button); - void XOnMouseUnclick(int localx, int localy, unsigned int button); - void XOnMouseWheel(int localx, int localy, int d); - void XOnMouseWheelInside(int localx, int localy, int d); - void XOnKeyPress(int key, bool shift, bool ctrl, bool alt); - void XOnKeyRelease(int key, bool shift, bool ctrl, bool alt); - */ - - // Overridable. Called by XComponent::Tick() - virtual void XTick(float dt); - - // Overridable. Called by XComponent::Draw() - virtual void XDraw(const Point& screenPos); - - - // Overridable. Called by XComponent::XOnMouseHover() - virtual void XOnMouseHover(int localx, int localy); - - // Overridable. Called by XComponent::OnMouseMoved() - virtual void XOnMouseMoved(int localx, int localy, int dx, int dy); - - // Overridable. Called by XComponent::OnMouseMovedInside() - virtual void XOnMouseMovedInside(int localx, int localy, int dx, int dy); - - // Overridable. Called by XComponent::OnMouseEnter() - virtual void XOnMouseEnter(int localx, int localy); - - // Overridable. Called by XComponent::OnMouseLeave() - virtual void XOnMouseLeave(int localx, int localy); - - // Overridable. Called by XComponent::OnMouseDown() - virtual void XOnMouseDown(int x, int y, unsigned button); - - // Overridable. Called by XComponent::OnMouseUp() - virtual void XOnMouseUp(int x, int y, unsigned button); - - // Overridable. Called by XComponent::OnMouseClick() - virtual void XOnMouseClick(int localx, int localy, unsigned button); - - // Overridable. Called by XComponent::OnMouseUnclick() - virtual void XOnMouseUnclick(int localx, int localy, unsigned button); - - // Overridable. Called by XComponent::OnMouseWheel() - virtual void XOnMouseWheel(int localx, int localy, int d); - - // Overridable. Called by XComponent::OnMouseWheelInside() - virtual void XOnMouseWheelInside(int localx, int localy, int d); - - // Overridable. Called by XComponent::OnKeyPress() - virtual void XOnKeyPress(int key, bool shift, bool ctrl, bool alt); - - // Overridable. Called by XComponent::OnKeyRelease() - virtual void XOnKeyRelease(int key, bool shift, bool ctrl, bool alt); - }; - -} diff --git a/includes/interface/Platform.h b/includes/interface/Platform.h deleted file mode 100644 index c57dca6..0000000 --- a/includes/interface/Platform.h +++ /dev/null @@ -1,108 +0,0 @@ -#pragma once - - -/* ***** Platform-ness ***** */ - -#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32_LEAN_AND_MEAN) -# define IEF_PLATFORM_WIN32 -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -#elif defined(linux) || defined(_linux) || defined(__linux) -# define IEF_PLATFORM_LINUX - -#elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh) -# define IEF_PLATFORM_MACOSX - -//#elif defined(__FreeBSD__) || define(__FreeBSD_kernel__) -//# define IEF_PLATFORM_FREEBSD - -#else -# error Operating System not supported. -#endif - - -/* ***** Endian-ness ***** */ - -#if defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || (defined(__MIPS__) && defined(__MISPEB__)) || defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || defined(__sparc__) || defined(__hppa__) -# define IEF_ENDIAN_BIG - -#else -# define IEF_ENDIAN_LITTLE -#endif - - -/* ***** Debug-ness ***** */ - -#if !defined(NDEBUG) || defined(_DEBUG) -# define IEF_DEBUG -#endif - - -/* ***** Primitive Types ***** */ - -#ifndef NULL -# define NULL 0 -#endif - -#include -namespace sys -{ - -#if UCHAR_MAX == 0xFF //char - typedef signed char s8; - typedef unsigned char u8; -#else -# error No 8-Bit Integer supported. -#endif -#if USHRT_MAX == 0xFFFF //short - typedef signed short s16; - typedef unsigned short u16; -#elif UINT_MAX == 0xFFFF - typedef signed int s16; - typedef unsigned int u16; -#elif ULONG_MAX == 0xFFFF - typedef signed long s16; - typedef unsigned long u16; - #else - # error No 16-Bit Integer supported. - #endif - #if USHRT_MAX == 0xFFFFFFFF //int - typedef signed short s32; - typedef unsigned short u32; -#elif UINT_MAX == 0xFFFFFFFF - typedef signed int s32; - typedef unsigned int u32; -#elif ULONG_MAX == 0xFFFFFFFF - typedef signed long s32; - typedef unsigned long u32; - #else - # error No 32-Bit Integer supported. - #endif -#if UINT_MAX == 0xFFFFFFFFFFFFFFFF //long - typedef signed int s64; - typedef unsigned int u64; -#elif ULONG_MAX == 0xFFFFFFFFFFFFFFFF - typedef signed long s64; - typedef unsigned long u64; -#elif ULLONG_MAX == 0xFFFFFFFFFFFFFFFF - typedef signed long long s64; - typedef unsigned long long u64; -#else -# pragma message("Warning: 64-bit not supported. s64 and u64 defined as 32-bit.") - typedef s32 s64; - typedef u32 u64; -#endif -//floating -typedef float f32; -typedef double f64; -//misc -typedef u8 byte; -typedef u8 ubyte; -typedef s8 sbyte; -typedef s64 llong; -typedef s64 sllong; -typedef u64 ullong; -typedef char* cstring; - -} //namespace sys diff --git a/includes/interface/Point.h b/includes/interface/Point.h deleted file mode 100644 index 0d0250c..0000000 --- a/includes/interface/Point.h +++ /dev/null @@ -1,136 +0,0 @@ -#pragma once -#include "Platform.h" - -namespace ui -{ - -//Lightweight 2D Int32/Float32 Point struct for UI -struct Point -{ -#if ENABLE_FLOAT_UI -# define POINT_T float -#else -# define POINT_T int -#endif - - POINT_T X; - POINT_T Y; - - Point(POINT_T x, POINT_T y) - : X(x) - , Y(y) - { - } - - inline Point operator - () const - { - return Point(-X, -Y); - } - - inline Point operator + (const Point& v) const - { - return Point(X + v.X, Y + v.Y); - } - - inline Point operator - (const Point& v) const - { - return Point(X - v.X, Y - v.Y); - } - - inline Point operator * (const Point& v) const - { - return Point(X * v.X, Y * v.Y); - } - - inline Point operator * (int v) const - { - return Point(X * static_cast(v), Y * static_cast(v)); - } - - inline Point operator * (float v) const - { - return Point(X * static_cast(v), Y * static_cast(v)); - } - - inline Point operator / (const Point& v) const - { - return Point(X / v.X, Y / v.Y); - } - - inline Point operator / (int v) const - { - return Point(X / static_cast(v), Y / static_cast(v)); - } - - inline Point operator / (float v) const - { - return Point(X / static_cast(v), Y / static_cast(v)); - } - - inline void operator += (const Point& v) - { - X += v.X; - Y += v.Y; - } - - inline void operator -= (const Point& v) - { - X -= v.X; - Y -= v.Y; - } - - inline void operator *= (const Point& v) - { - X *= v.X; - Y *= v.Y; - } - - inline void operator *= (int v) - { - X *= static_cast(v); - Y *= static_cast(v); - } - - inline void operator *= (float v) - { - X *= static_cast(v); - Y *= static_cast(v); - } - - inline void operator /= (const Point& v) - { - X /= v.X; - Y /= v.Y; - } - - inline void operator /= (int v) - { - X /= static_cast(v); - Y /= static_cast(v); - } - - inline void operator /= (float v) - { - X /= static_cast(v); - Y /= static_cast(v); - } - - inline bool operator == (const Point& v) const - { - return (X == v.X && Y == v.Y); - } - - inline bool operator != (const Point& v) const - { - return (X != v.X || Y != v.Y); - } - - inline void operator = (const Point& v) - { - X = v.X; - Y = v.Y; - } - -}; - -} diff --git a/includes/interface/Sandbox.h b/includes/interface/Sandbox.h deleted file mode 100644 index fb4a668..0000000 --- a/includes/interface/Sandbox.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Sandbox.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef SANDBOX_H_ -#define SANDBOX_H_ - -#include -#include "Point.h" -#include "Component.h" -#include "Simulation.h" -#include "Renderer.h" - -namespace ui { - -class Sandbox: public ui::Component { -private: - int lastCoordX, lastCoordY; - int activeElement; - std::queue pointQueue; - bool isMouseDown; - Renderer * ren; - Simulation * sim; -public: - Sandbox(); - virtual Simulation * GetSimulation(); - virtual void OnMouseMoved(int localx, int localy, int dx, int dy); - virtual void OnMouseClick(int localx, int localy, unsigned int button); - virtual void OnMouseUp(int localx, int localy, unsigned int button); - virtual void Draw(const Point& screenPos); - virtual void Tick(float delta); - virtual ~Sandbox(); -}; - -} /* namespace ui */ -#endif /* SANDBOX_H_ */ diff --git a/includes/interface/State.h b/includes/interface/State.h deleted file mode 100644 index 75e969d..0000000 --- a/includes/interface/State.h +++ /dev/null @@ -1,77 +0,0 @@ -#pragma once - -#include - -#include "Engine.h" -#include "Component.h" -#include "Platform.h" - -namespace ui -{ - class Engine; - class Component; - - /* class State - * - * A UI state. Contains all components. - */ - class State - { - public: - State(); - virtual ~State(); - - bool AllowExclusiveDrawing; //false will not call draw on objects outside of bounds - - // Add Component to state - void AddComponent(Component* c); - - // Get the number of components this state has. - unsigned GetComponentCount(); - - // Get component by index. (See GetComponentCount()) - Component* GetComponent(unsigned idx); - - // Remove a component from state. NOTE: This DOES NOT free component from memory. - void RemoveComponent(Component* c); - - // Remove a component from state. NOTE: This WILL free component from memory. - void RemoveComponent(unsigned idx); - - void DoInitialized(); - void DoExit(); - void DoTick(float dt); - void DoDraw(); - - void DoMouseMove(int x, int y, int dx, int dy); - void DoMouseDown(int x, int y, unsigned button); - void DoMouseUp(int x, int y, unsigned button); - void DoMouseWheel(int x, int y, int d); - void DoKeyPress(int key, bool shift, bool ctrl, bool alt); - void DoKeyRelease(int key, bool shift, bool ctrl, bool alt); - - bool IsFocused(const Component* c) const; - void FocusComponent(Component* c); - - void* UserData; - - protected: - virtual void OnInitialized() {} - virtual void OnExit() {} - virtual void OnTick(float dt) {} - virtual void OnDraw() {} - - virtual void OnMouseMove(int x, int y, int dx, int dy) {} - virtual void OnMouseDown(int x, int y, unsigned button) {} - virtual void OnMouseUp(int x, int y, unsigned button) {} - virtual void OnMouseWheel(int x, int y, int d) {} - virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt) {} - virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {} - - private: - std::vector Components; - Component* focusedComponent_; - - }; - -} diff --git a/src/Air.h b/src/Air.h new file mode 100644 index 0000000..8e4dc25 --- /dev/null +++ b/src/Air.h @@ -0,0 +1,33 @@ +#ifndef AIR_H +#define AIR_H +#include "Config.h" + +class Simulation; + +class Air +{ +public: + int airMode; + //Arrays from the simulation + unsigned char (*bmap)[XRES/CELL]; + unsigned char (*emap)[XRES/CELL]; + float (*fvx)[XRES/CELL]; + float (*fvy)[XRES/CELL]; + // + float vx[YRES/CELL][XRES/CELL]; + float ovx[YRES/CELL][XRES/CELL]; + float vy[YRES/CELL][XRES/CELL]; + float ovy[YRES/CELL][XRES/CELL]; + float pv[YRES/CELL][XRES/CELL]; + float opv[YRES/CELL][XRES/CELL]; + float hv[YRES/CELL][XRES/CELL]; + float ohv[YRES/CELL][XRES/CELL]; // Ambient Heat + unsigned char bmap_blockair[YRES/CELL][XRES/CELL]; + float kernel[9]; + void make_kernel(void); + void update_airh(void); + void update_air(void); + Air(); +}; + +#endif diff --git a/src/Config.h b/src/Config.h new file mode 100644 index 0000000..4cb2da3 --- /dev/null +++ b/src/Config.h @@ -0,0 +1,146 @@ +/* + * Config.h + * + * Created on: Jan 5, 2012 + * Author: Simon + */ + +//#ifndef CONFIG_H_ +//#define CONFIG_H_ + + +#ifdef WIN32 +#define PATH_SEP "\\" +#else +#define PATH_SEP "/" +#endif + +//VersionInfoStart +#define SAVE_VERSION 71 +#define MINOR_VERSION 0 +#define BETA +#define BUILD_NUM 133 +//VersionInfoEnd + +#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter + +#define MTOS_EXPAND(str) #str +#define MTOS(str) MTOS_EXPAND(str) + +#define SERVER "powdertoy.co.uk" +#define SCRIPTSERVER "powdertoy.co.uk" + +#define LOCAL_SAVE_DIR "Saves" + +#define APPDATA_SUBDIR "\\HardWIRED" + +#define THUMB_CACHE_SIZE 256 + +#ifndef M_PI +#define M_PI 3.14159265f +#endif +#ifndef M_GRAV +#define M_GRAV 6.67300e-1 +#endif + +#define IMGCONNS 3 +#define TIMEOUT 100 +#define HTTP_TIMEOUT 10 + +#ifdef RENDERER +#define MENUSIZE 0 +#define BARSIZE 0 +#else +#define MENUSIZE 40 +#define BARSIZE 17 +#endif +#define XRES 612 +#define YRES 384 +#define NPART XRES*YRES + +#define XCNTR 306 +#define YCNTR 192 + +#define MAX_DISTANCE sqrt(pow(XRES, 2)+pow(YRES, 2)) + +#define GRAV_DIFF + +#define MAXSIGNS 16 +#define TAG_MAX 256 + +#define ZSIZE_D 16 +#define ZFACTOR_D 8 +extern unsigned char ZFACTOR; +extern unsigned char ZSIZE; + +#define CELL 4 +#define ISTP (CELL/2) +#define CFDS (4.0f/CELL) + +#define AIR_TSTEPP 0.3f +#define AIR_TSTEPV 0.4f +#define AIR_VADV 0.3f +#define AIR_VLOSS 0.999f +#define AIR_PLOSS 0.9999f + +#define GRID_X 5 +#define GRID_Y 4 +#define GRID_P 3 +#define GRID_S 6 +#define GRID_Z 3 + +#define CATALOGUE_X 4 +#define CATALOGUE_Y 3 +#define CATALOGUE_S 6 +#define CATALOGUE_Z 3 + +#define STAMP_MAX 240 + +#define SAVE_OPS + +#define NGOL 25 +#define NGOLALT 24 //NGOL should be 24, but use this var until I find out why + +#define CIRCLE_BRUSH 0 +#define SQUARE_BRUSH 1 +#define TRI_BRUSH 2 +#define BRUSH_NUM 3 + +#define SURF_RANGE 10 +#define NORMAL_MIN_EST 3 +#define NORMAL_INTERP 20 +#define NORMAL_FRAC 16 + +#define REFRACT 0x80000000 + +/* heavy flint glass, for awesome refraction/dispersion + this way you can make roof prisms easily */ +#define GLASS_IOR 1.9 +#define GLASS_DISP 0.07 + +#ifdef WIN32 +#define strcasecmp stricmp +#endif +#if defined(WIN32) && !defined(__GNUC__) +#define fmin min +#define fminf min +#define fmax max +#define fmaxf max +#endif + +#if defined(WIN32) && !defined(__GNUC__) +#define TPT_INLINE _inline +#else +#define TPT_INLINE inline +#endif + +#define SDEUT +//#define REALHEAT + +#define DEBUG_PARTS 0x0001 +#define DEBUG_PARTCOUNT 0x0002 +#define DEBUG_DRAWTOOL 0x0004 +#define DEBUG_PERFORMANCE_CALC 0x0008 +#define DEBUG_PERFORMANCE_FRAME 0x0010 + +//#endif /* CONFIG_H_ */ diff --git a/src/Console.h b/src/Console.h new file mode 100644 index 0000000..657f935 --- /dev/null +++ b/src/Console.h @@ -0,0 +1,48 @@ +#ifndef CONSOLE_H +#define CONSOLE_H + +#include +#include + +#include "interface/Sandbox.h" +#include "Simulation.h" + +class ConsoleCommand +{ +private: + std::string * command; + int returnStatus; + std::string * returnString; +public: + void SetCommand(std::string * command); + void SetError(std::string * error); + std::string * GetCommand(); + std::string * GetError(); + ConsoleCommand(); + ConsoleCommand(std::string * command, int returnStatus, std::string * returnString = new std::string("")); +}; + +class Console +{ +private: + bool sound_enable; + bool file_script; + std::vector * previousCommands; + std::string * lastError; + ui::Sandbox * sandbox; + Simulation * sim; +public: + virtual void Tick(float * dt); + int ParseType(char * txt); + int ParsePartref(char * txt); + int ParseCoords(char * coords, int *x, int *y); + virtual void ConsoleShown(); + virtual void ConsoleHidden(); + virtual int ProcessCommand(char * console); + virtual std::string * GetLastError(); + virtual std::vector * GetPreviousCommands(); + Console(ui::Sandbox * sandbox); + virtual ~Console(); +}; + +#endif // CONSOLE_H diff --git a/src/Element.h b/src/Element.h new file mode 100644 index 0000000..449bf51 --- /dev/null +++ b/src/Element.h @@ -0,0 +1,14 @@ +#ifndef ELEMENT_H +#define ELEMENT_H +// This header should be included by all files in src/elements/ + +#include +#include "Simulation.h" +#include "Renderer.h" +#include "ElementFunctions.h" +//#include "powder.h" +#include "Gravity.h" +#include "Misc.h" +#include "ElementGraphics.h" + +#endif diff --git a/src/ElementFunctions.h b/src/ElementFunctions.h new file mode 100644 index 0000000..ef80b6f --- /dev/null +++ b/src/ElementFunctions.h @@ -0,0 +1,168 @@ +/* + * ElementFunctions.h + * + * Created on: Jan 5, 2012 + * Author: Simon + */ + +#ifndef ELEMENTFUNCTIONS_H_ +#define ELEMENTFUNCTIONS_H_ +#include "Elements.h" + +int update_ACID(UPDATE_FUNC_ARGS); +int update_ANAR(UPDATE_FUNC_ARGS); +int update_AMTR(UPDATE_FUNC_ARGS); +int update_ARAY(UPDATE_FUNC_ARGS); +int update_BCLN(UPDATE_FUNC_ARGS); +int update_BCOL(UPDATE_FUNC_ARGS); +int update_BMTL(UPDATE_FUNC_ARGS); +int update_BRMT(UPDATE_FUNC_ARGS); +int update_BOMB(UPDATE_FUNC_ARGS); +int update_BOYL(UPDATE_FUNC_ARGS); +int update_BTRY(UPDATE_FUNC_ARGS); +int update_C5(UPDATE_FUNC_ARGS); +int update_CLNE(UPDATE_FUNC_ARGS); +int update_COAL(UPDATE_FUNC_ARGS); +int update_DEUT(UPDATE_FUNC_ARGS); +int update_DSTW(UPDATE_FUNC_ARGS); +int update_FOG(UPDATE_FUNC_ARGS); +int update_FRZW(UPDATE_FUNC_ARGS); +int update_FRZZ(UPDATE_FUNC_ARGS); +int update_FSEP(UPDATE_FUNC_ARGS); +int update_FUSE(UPDATE_FUNC_ARGS); +int update_FIRW(UPDATE_FUNC_ARGS); +int update_FWRK(UPDATE_FUNC_ARGS); +int update_GLAS(UPDATE_FUNC_ARGS); +int update_GLOW(UPDATE_FUNC_ARGS); +int update_GOO(UPDATE_FUNC_ARGS); +int update_HSWC(UPDATE_FUNC_ARGS); +int update_IRON(UPDATE_FUNC_ARGS); +int update_ICEI(UPDATE_FUNC_ARGS); +int update_ISZ(UPDATE_FUNC_ARGS); +int update_LCRY(UPDATE_FUNC_ARGS); +int update_MORT(UPDATE_FUNC_ARGS); +int update_NEUT(UPDATE_FUNC_ARGS); +int update_NPTCT(UPDATE_FUNC_ARGS); +int update_PCLN(UPDATE_FUNC_ARGS); +int update_PHOT(UPDATE_FUNC_ARGS); +int update_PIPE(UPDATE_FUNC_ARGS); +int update_PLNT(UPDATE_FUNC_ARGS); +int update_PLUT(UPDATE_FUNC_ARGS); +int update_PRTI(UPDATE_FUNC_ARGS); +int update_PRTO(UPDATE_FUNC_ARGS); +int update_PYRO(UPDATE_FUNC_ARGS); +int update_PUMP(UPDATE_FUNC_ARGS); +int update_QRTZ(UPDATE_FUNC_ARGS); +int update_RIME(UPDATE_FUNC_ARGS); +int update_SHLD1(UPDATE_FUNC_ARGS); +int update_SHLD2(UPDATE_FUNC_ARGS); +int update_SHLD3(UPDATE_FUNC_ARGS); +int update_SHLD4(UPDATE_FUNC_ARGS); +int update_SING(UPDATE_FUNC_ARGS); +int update_SLTW(UPDATE_FUNC_ARGS); +int update_SPAWN(UPDATE_FUNC_ARGS); +int update_SPAWN2(UPDATE_FUNC_ARGS); +int update_SPNG(UPDATE_FUNC_ARGS); +int update_SPRK(UPDATE_FUNC_ARGS); +int update_STKM(UPDATE_FUNC_ARGS); +int update_STKM2(UPDATE_FUNC_ARGS); +int update_SWCH(UPDATE_FUNC_ARGS); +int update_THDR(UPDATE_FUNC_ARGS); +int update_THRM(UPDATE_FUNC_ARGS); +int update_URAN(UPDATE_FUNC_ARGS); +int update_VINE(UPDATE_FUNC_ARGS); +int update_WARP(UPDATE_FUNC_ARGS); +int update_WATR(UPDATE_FUNC_ARGS); +int update_WIFI(UPDATE_FUNC_ARGS); +int update_WTRV(UPDATE_FUNC_ARGS); +int update_YEST(UPDATE_FUNC_ARGS); +int update_SOAP(UPDATE_FUNC_ARGS); +int update_O2(UPDATE_FUNC_ARGS); +int update_H2(UPDATE_FUNC_ARGS); +int update_NBHL(UPDATE_FUNC_ARGS); +int update_NWHL(UPDATE_FUNC_ARGS); +int update_MERC(UPDATE_FUNC_ARGS); +int update_PBCN(UPDATE_FUNC_ARGS); +int update_GPMP(UPDATE_FUNC_ARGS); +int update_CLST(UPDATE_FUNC_ARGS); +int update_DLAY(UPDATE_FUNC_ARGS); +int update_WIRE(UPDATE_FUNC_ARGS); +int update_GBMB(UPDATE_FUNC_ARGS); +int update_CO2(UPDATE_FUNC_ARGS); +int update_CBNW(UPDATE_FUNC_ARGS); +int update_STOR(UPDATE_FUNC_ARGS); +int update_BIZR(UPDATE_FUNC_ARGS); +int update_PVOD(UPDATE_FUNC_ARGS); +int update_CONV(UPDATE_FUNC_ARGS); +int update_CAUS(UPDATE_FUNC_ARGS); +int update_DEST(UPDATE_FUNC_ARGS); +int update_EMP(UPDATE_FUNC_ARGS); +int update_LIGH(UPDATE_FUNC_ARGS); +int update_FIGH(UPDATE_FUNC_ARGS); +int update_ELEC(UPDATE_FUNC_ARGS); +int update_ACEL(UPDATE_FUNC_ARGS); +int update_DCEL(UPDATE_FUNC_ARGS); +int update_BANG(UPDATE_FUNC_ARGS); +int update_IGNT(UPDATE_FUNC_ARGS); +int update_MISC(UPDATE_FUNC_ARGS); +int update_legacy_PYRO(UPDATE_FUNC_ARGS); +int update_legacy_all(UPDATE_FUNC_ARGS); +int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS); +void STKM_init_legs(Simulation * sim, playerst* playerp, int i); +void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y); + + +int graphics_FIRE(GRAPHICS_FUNC_ARGS); +int graphics_SMKE(GRAPHICS_FUNC_ARGS); +int graphics_PLSM(GRAPHICS_FUNC_ARGS); +int graphics_DEUT(GRAPHICS_FUNC_ARGS); +int graphics_PHOT(GRAPHICS_FUNC_ARGS); +int graphics_NEUT(GRAPHICS_FUNC_ARGS); +int graphics_LAVA(GRAPHICS_FUNC_ARGS); +int graphics_SPRK(GRAPHICS_FUNC_ARGS); +int graphics_QRTZ(GRAPHICS_FUNC_ARGS); +int graphics_CLST(GRAPHICS_FUNC_ARGS); +int graphics_CBNW(GRAPHICS_FUNC_ARGS); +int graphics_SPNG(GRAPHICS_FUNC_ARGS); +int graphics_LIFE(GRAPHICS_FUNC_ARGS); +int graphics_DUST(GRAPHICS_FUNC_ARGS); +int graphics_GRAV(GRAPHICS_FUNC_ARGS); +int graphics_WIFI(GRAPHICS_FUNC_ARGS); +int graphics_PRTI(GRAPHICS_FUNC_ARGS); +int graphics_PRTO(GRAPHICS_FUNC_ARGS); +int graphics_BIZR(GRAPHICS_FUNC_ARGS); +int graphics_PIPE(GRAPHICS_FUNC_ARGS); +int graphics_INVS(GRAPHICS_FUNC_ARGS); +int graphics_ACID(GRAPHICS_FUNC_ARGS); +int graphics_FILT(GRAPHICS_FUNC_ARGS); +int graphics_BRAY(GRAPHICS_FUNC_ARGS); +int graphics_SWCH(GRAPHICS_FUNC_ARGS); +int graphics_THDR(GRAPHICS_FUNC_ARGS); +int graphics_GLOW(GRAPHICS_FUNC_ARGS); +int graphics_LCRY(GRAPHICS_FUNC_ARGS); +int graphics_PCLN(GRAPHICS_FUNC_ARGS); +int graphics_PBCN(GRAPHICS_FUNC_ARGS); +int graphics_DLAY(GRAPHICS_FUNC_ARGS); +int graphics_HSWC(GRAPHICS_FUNC_ARGS); +int graphics_PVOD(GRAPHICS_FUNC_ARGS); +int graphics_STOR(GRAPHICS_FUNC_ARGS); +int graphics_PUMP(GRAPHICS_FUNC_ARGS); +int graphics_GPMP(GRAPHICS_FUNC_ARGS); +int graphics_HFLM(GRAPHICS_FUNC_ARGS); +int graphics_FIRW(GRAPHICS_FUNC_ARGS); +int graphics_BOMB(GRAPHICS_FUNC_ARGS); +int graphics_GBMB(GRAPHICS_FUNC_ARGS); +int graphics_COAL(GRAPHICS_FUNC_ARGS); +int graphics_STKM(GRAPHICS_FUNC_ARGS); +int graphics_STKM2(GRAPHICS_FUNC_ARGS); +int graphics_DEST(GRAPHICS_FUNC_ARGS); +int graphics_EMP(GRAPHICS_FUNC_ARGS); +int graphics_LIGH(GRAPHICS_FUNC_ARGS); +int graphics_FIGH(GRAPHICS_FUNC_ARGS); +int graphics_ELEC(GRAPHICS_FUNC_ARGS); +int graphics_WIRE(GRAPHICS_FUNC_ARGS); +int graphics_ACEL(GRAPHICS_FUNC_ARGS); +int graphics_DCEL(GRAPHICS_FUNC_ARGS); +int graphics_DEFAULT(GRAPHICS_FUNC_ARGS); + +#endif /* ELEMENTFUNCTIONS_H_ */ diff --git a/src/ElementGraphics.h b/src/ElementGraphics.h new file mode 100644 index 0000000..a880e71 --- /dev/null +++ b/src/ElementGraphics.h @@ -0,0 +1,52 @@ +#ifndef PGRAPHICS_H +#define PGRAPHICS_H + +#define PMODE 0x00000FFF +#define PMODE_NONE 0x00000000 +#define PMODE_FLAT 0x00000001 +#define PMODE_BLOB 0x00000002 +#define PMODE_BLUR 0x00000004 +#define PMODE_GLOW 0x00000008 +#define PMODE_SPARK 0x00000010 +#define PMODE_FLARE 0x00000020 +#define PMODE_LFLARE 0x00000040 +#define PMODE_ADD 0x00000080 +#define PMODE_BLEND 0x00000100 +#define PSPEC_STICKMAN 0x00000200 + +#define OPTIONS 0x0000F000 +#define NO_DECO 0x00001000 +#define DECO_FIRE 0x00002000 + +#define FIREMODE 0x00FF0000 +#define FIRE_ADD 0x00010000 +#define FIRE_BLEND 0x00020000 + +#define EFFECT 0xFF000000 +#define EFFECT_GRAVIN 0x01000000 +#define EFFECT_GRAVOUT 0x02000000 + +#define RENDER_EFFE OPTIONS | PSPEC_STICKMAN | EFFECT | PMODE_SPARK | PMODE_FLARE | PMODE_LFLARE +#define RENDER_FIRE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND | FIREMODE +#define RENDER_GLOW OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_GLOW | PMODE_ADD | PMODE_BLEND +#define RENDER_BLUR OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLUR | PMODE_ADD | PMODE_BLEND +#define RENDER_BLOB OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLOB | PMODE_ADD | PMODE_BLEND +#define RENDER_BASC OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND +#define RENDER_NONE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT + +#define COLOUR_HEAT 0x00000001 +#define COLOUR_LIFE 0x00000002 +#define COLOUR_GRAD 0x00000004 + +#define COLOUR_DEFAULT 0x00000000 + +#define DISPLAY_AIRC 0x00000001 +#define DISPLAY_AIRP 0x00000002 +#define DISPLAY_AIRV 0x00000004 +#define DISPLAY_AIRH 0x00000008 +#define DISPLAY_AIR 0x0000000F +#define DISPLAY_WARP 0x00000010 +#define DISPLAY_PERS 0x00000020 +#define DISPLAY_EFFE 0x00000040 + +#endif diff --git a/src/Elements.h b/src/Elements.h new file mode 100644 index 0000000..204460c --- /dev/null +++ b/src/Elements.h @@ -0,0 +1,280 @@ +/* + * Elements.h + * + * Created on: Jan 5, 2012 + * Author: Simon + */ + +//#ifndef ELEMENTS_H_ +//#define ELEMENTS_H_ + +//#include "Config.h" +//#include "Simulation.h" + +#define IPL -257.0f +#define IPH 257.0f +#define ITL MIN_TEMP-1 +#define ITH MAX_TEMP+1 +// no transition (PT_NONE means kill part) +#define NT -1 +// special transition - lava ctypes etc need extra code, which is only found and run if ST is given +#define ST PT_NUM + +#define R_TEMP 22 +#define MAX_TEMP 9999 +#define MIN_TEMP 0 +#define O_MAX_TEMP 3500 +#define O_MIN_TEMP -273 + +#define TYPE_PART 0x00001 //1 Powders +#define TYPE_LIQUID 0x00002 //2 Liquids +#define TYPE_SOLID 0x00004 //4 Solids +#define TYPE_GAS 0x00008 //8 Gasses (Includes plasma) +#define TYPE_ENERGY 0x00010 //16 Energy (Thunder, Light, Neutrons etc.) +#define PROP_CONDUCTS 0x00020 //32 Conducts electricity +#define PROP_BLACK 0x00040 //64 Absorbs Photons (not currently implemented or used, a photwl attribute might be better) +#define PROP_NEUTPENETRATE 0x00080 //128 Penetrated by neutrons +#define PROP_NEUTABSORB 0x00100 //256 Absorbs neutrons, reflect is default (not currently implemented or used) +#define PROP_NEUTPASS 0x00200 //512 Neutrons pass through, such as with glass +#define PROP_DEADLY 0x00400 //1024 Is deadly for stickman (not currently implemented or used) +#define PROP_HOT_GLOW 0x00800 //2048 Hot Metal Glow +#define PROP_LIFE 0x01000 //4096 Is a GoL type +#define PROP_RADIOACTIVE 0x02000 //8192 Radioactive +#define PROP_LIFE_DEC 0x04000 //2^14 Life decreases by one every frame if > zero +#define PROP_LIFE_KILL 0x08000 //2^15 Kill when life value is <= zero +#define PROP_LIFE_KILL_DEC 0x10000 //2^16 Kill when life value is decremented to <= zero +#define PROP_SPARKSETTLE 0x20000 //2^17 Allow Sparks/Embers to settle + +#define FLAG_STAGNANT 1 + +#define ST_NONE 0 +#define ST_SOLID 1 +#define ST_LIQUID 2 +#define ST_GAS 3 + +#define UPDATE_FUNC_ARGS Simulation* sim, int i, int x, int y, int surround_space, int nt, Particle *parts, int pmap[YRES][XRES] +// to call another update function with same arguments: +#define UPDATE_FUNC_SUBCALL_ARGS sim, i, x, y, surround_space, nt, parts, pmap + +#define GRAPHICS_FUNC_ARGS Renderer * ren, Particle *cpart, int nx, int ny, int *pixel_mode, int* cola, int *colr, int *colg, int *colb, int *firea, int *firer, int *fireg, int *fireb +#define GRAPHICS_FUNC_SUBCALL_ARGS ren, cpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb + +#define UI_WALLSTART 222 +#define UI_ACTUALSTART 122 +#define UI_WALLCOUNT 25 + +#define WL_WALLELEC 122 +#define WL_EWALL 123 +#define WL_DETECT 124 +#define WL_STREAM 125 +#define WL_SIGN 126 +#define WL_FAN 127 +#define WL_FANHELPER 255 +#define WL_ALLOWLIQUID 128 +#define WL_DESTROYALL 129 +#define WL_ERASE 130 +#define WL_WALL 131 +#define WL_ALLOWAIR 132 +#define WL_ALLOWSOLID 133 +#define WL_ALLOWALLELEC 134 +#define WL_EHOLE 135 + +#define SPC_AIR 236 +#define SPC_HEAT 237 +#define SPC_COOL 238 +#define SPC_VACUUM 239 +#define SPC_WIND 241 +#define SPC_PGRV 243 +#define SPC_NGRV 244 +#define SPC_PROP 246 + +#define WL_ALLOWGAS 140 +#define WL_GRAV 142 +#define WL_ALLOWENERGY 145 + +#define NGT_GOL 0 +#define NGT_HLIF 1 +#define NGT_ASIM 2 +#define NGT_2x2 3 +#define NGT_DANI 4 +#define NGT_AMOE 5 +#define NGT_MOVE 6 +#define NGT_PGOL 7 +#define NGT_DMOE 8 +#define NGT_34 9 +#define NGT_LLIF 10 +#define NGT_STAN 11 +#define NGT_SEED 12 +#define NGT_MAZE 13 +#define NGT_COAG 14 +#define NGT_WALL 15 +#define NGT_GNAR 16 +#define NGT_REPL 17 +#define NGT_MYST 18 +#define NGT_LOTE 19 +#define NGT_FRG2 20 +#define NGT_STAR 21 +#define NGT_FROG 22 +#define NGT_BRAN 23 + +#define PT_NONE 0 +#define PT_DUST 1 +#define PT_WATR 2 +#define PT_OIL 3 +#define PT_FIRE 4 +#define PT_STNE 5 +#define PT_LAVA 6 +#define PT_GUNP 7 +#define PT_NITR 8 +#define PT_CLNE 9 +#define PT_GAS 10 +#define PT_PLEX 11 +#define PT_GOO 12 +#define PT_ICEI 13 +#define PT_METL 14 +#define PT_SPRK 15 +#define PT_SNOW 16 +#define PT_WOOD 17 +#define PT_NEUT 18 +#define PT_PLUT 19 +#define PT_PLNT 20 +#define PT_ACID 21 +#define PT_VOID 22 +#define PT_WTRV 23 +#define PT_CNCT 24 +#define PT_DSTW 25 +#define PT_SALT 26 +#define PT_SLTW 27 +#define PT_DMND 28 +#define PT_BMTL 29 +#define PT_BRMT 30 +#define PT_PHOT 31 +#define PT_URAN 32 +#define PT_WAX 33 +#define PT_MWAX 34 +#define PT_PSCN 35 +#define PT_NSCN 36 +#define PT_LNTG 37 +#define PT_INSL 38 +#define PT_BHOL 39 +#define PT_WHOL 40 +#define PT_RBDM 41 +#define PT_LRBD 42 +#define PT_NTCT 43 +#define PT_SAND 44 +#define PT_GLAS 45 +#define PT_PTCT 46 +#define PT_BGLA 47 +#define PT_THDR 48 +#define PT_PLSM 49 +#define PT_ETRD 50 +#define PT_NICE 51 +#define PT_NBLE 52 +#define PT_BTRY 53 +#define PT_LCRY 54 +#define PT_STKM 55 +#define PT_SWCH 56 +#define PT_SMKE 57 +#define PT_DESL 58 +#define PT_COAL 59 +#define PT_LO2 60 +#define PT_O2 61 +#define PT_INWR 62 +#define PT_YEST 63 +#define PT_DYST 64 +#define PT_THRM 65 +#define PT_GLOW 66 +#define PT_BRCK 67 +#define PT_HFLM 68 +#define PT_FIRW 69 +#define PT_FUSE 70 +#define PT_FSEP 71 +#define PT_AMTR 72 +#define PT_BCOL 73 +#define PT_PCLN 74 +#define PT_HSWC 75 +#define PT_IRON 76 +#define PT_MORT 77 +#define PT_LIFE 78 +#define PT_DLAY 79 +#define PT_CO2 80 +#define PT_DRIC 81 +#define PT_CBNW 82 +#define PT_STOR 83 +#define PT_PVOD 84 +#define PT_CONV 85 +#define PT_CAUS 86 + +#define PT_LIGH 87 +#define PT_TESC 88 +#define PT_DEST 89 + +#define PT_SPNG 90 +#define PT_RIME 91 +#define PT_FOG 92 +#define PT_BCLN 93 +#define PT_LOVE 94 +#define PT_DEUT 95 +#define PT_WARP 96 +#define PT_PUMP 97 +#define PT_FWRK 98 +#define PT_PIPE 99 +#define PT_FRZZ 100 +#define PT_FRZW 101 +#define PT_GRAV 102 +#define PT_BIZR 103 +#define PT_BIZRG 104 +#define PT_BIZRS 105 +#define PT_INST 106 +#define PT_ISOZ 107 +#define PT_ISZS 108 +#define PT_PRTI 109 +#define PT_PRTO 110 +#define PT_PSTE 111 +#define PT_PSTS 112 +#define PT_ANAR 113 +#define PT_VINE 114 +#define PT_INVIS 115 +#define PT_EQUALVEL 116 //all particles equal their velocities +#define PT_SPAWN2 117 +#define PT_SPAWN 118 +#define PT_SHLD1 119 +#define PT_SHLD2 120 +#define PT_SHLD3 121 +#define PT_SHLD4 122 +#define PT_LOLZ 123 +#define PT_WIFI 124 +#define PT_FILT 125 +#define PT_ARAY 126 +#define PT_BRAY 127 +#define PT_STKM2 128 +#define PT_BOMB 129 +#define PT_C5 130 +#define PT_SING 131 +#define PT_QRTZ 132 +#define PT_PQRT 133 +#define PT_EMP 134 +#define PT_BREC 135 +#define PT_ELEC 136 +#define PT_ACEL 137 +#define PT_DCEL 138 +#define PT_BANG 139 +#define PT_IGNT 140 +#define PT_BOYL 141 + +#define OLD_PT_WIND 147 +#define PT_H2 148 +#define PT_SOAP 149 +#define PT_NBHL 150 +#define PT_NWHL 151 +#define PT_MERC 152 +#define PT_PBCN 153 +#define PT_GPMP 154 +#define PT_CLST 155 +#define PT_WIRE 156 +#define PT_GBMB 157 +#define PT_FIGH 158 +#define PT_NUM 159 + + +//#endif /* ELEMENTS_H_ */ diff --git a/src/GameSession.cpp b/src/GameSession.cpp deleted file mode 100644 index 364f268..0000000 --- a/src/GameSession.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "GameSession.h" - -GameSession::GameSession() -{ - //Boop -} diff --git a/src/Global.cpp b/src/Global.cpp index 7bf28f0..c1e0559 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -1,5 +1,6 @@ -#include "Global.h" +/*#include "Global.h" Global::Global(){ } +*/ diff --git a/src/Global.h b/src/Global.h new file mode 100644 index 0000000..ceff38e --- /dev/null +++ b/src/Global.h @@ -0,0 +1,14 @@ +#ifndef GAMESESSION_H +#define GAMESESSION_H + +#include "Singleton.h" +#include "Graphics.h" + +/*class Global : public Singleton +{ +public: + Graphics * g; + Global(); +};*/ + +#endif // GAMESESSION_H diff --git a/src/Graphics.h b/src/Graphics.h new file mode 100644 index 0000000..6cd5b36 --- /dev/null +++ b/src/Graphics.h @@ -0,0 +1,172 @@ +#ifndef GRAPHICS_H +#define GRAPHICS_H + +#include +#include +#include "Config.h" +//#include "powder.h" + +#ifdef PIX16 +#define PIXELSIZE 2 +#define PIXPACK(x) ((((x)>>8)&0xF800)|(((x)>>5)&0x07E0)|(((x)>>3)&0x001F)) +#define PIXRGB(r,g,b) ((((r)<<8)&0xF800)|(((g)<<3)&0x07E0)|(((b)>>3)&0x001F)) +#define PIXR(x) (((x)>>8)&0xF8) +#define PIXG(x) (((x)>>3)&0xFC) +#define PIXB(x) (((x)<<3)&0xF8) +#else +#define PIXELSIZE 4 +#ifdef PIX32BGR +#define PIXPACK(x) ((((x)>>16)&0x0000FF)|((x)&0x00FF00)|(((x)<<16)&0xFF0000)) +#define PIXRGB(r,g,b) (((b)<<16)|((g)<<8)|((r)))// (((b)<<16)|((g)<<8)|(r)) +#define PIXR(x) ((x)&0xFF) +#define PIXG(x) (((x)>>8)&0xFF) +#define PIXB(x) ((x)>>16) +#else +#ifdef PIX32BGRA +#define PIXPACK(x) ((((x)>>8)&0x0000FF00)|(((x)<<8)&0x00FF0000)|(((x)<<24)&0xFF000000)) +#define PIXRGB(r,g,b) (((b)<<24)|((g)<<16)|((r)<<8)) +#define PIXR(x) (((x)>>8)&0xFF) +#define PIXG(x) (((x)>>16)&0xFF) +#define PIXB(x) (((x)>>24)) +#elif defined(PIX32OGL) +#define PIXPACK(x) (0xFF000000|((x)&0xFFFFFF)) +#define PIXRGB(r,g,b) (0xFF000000|((r)<<16)|((g)<<8)|((b)))// (((b)<<16)|((g)<<8)|(r)) +#define PIXRGBA(r,g,b,a) (((a)<<24)|((r)<<16)|((g)<<8)|((b)))// (((b)<<16)|((g)<<8)|(r)) +#define PIXA(x) (((x)>>24)&0xFF) +#define PIXR(x) (((x)>>16)&0xFF) +#define PIXG(x) (((x)>>8)&0xFF) +#define PIXB(x) ((x)&0xFF) +#else +#define PIXPACK(x) (x) +#define PIXRGB(r,g,b) (((r)<<16)|((g)<<8)|(b)) +#define PIXR(x) ((x)>>16) +#define PIXG(x) (((x)>>8)&0xFF) +#define PIXB(x) ((x)&0xFF) +#endif +#endif +#endif + +#ifdef PIX16 +typedef unsigned short pixel; +#else +typedef unsigned int pixel; +#endif + +/*extern int emp_decor; + +extern unsigned int *render_modes; +extern unsigned int render_mode; +extern unsigned int colour_mode; +extern unsigned int *display_modes; +extern unsigned int display_mode; + +extern SDL_Surface *sdl_scrn; +extern int sdl_scale; + +extern int sandcolour_r; +extern int sandcolour_g; +extern int sandcolour_b; +extern int sandcolour_frame; + +extern unsigned char fire_r[YRES/CELL][XRES/CELL]; +extern unsigned char fire_g[YRES/CELL][XRES/CELL]; +extern unsigned char fire_b[YRES/CELL][XRES/CELL]; + +extern unsigned int fire_alpha[CELL*3][CELL*3]; +extern pixel *pers_bg; + +extern char * flm_data; +extern int flm_data_points; +extern pixel flm_data_colours[]; +extern float flm_data_pos[]; + +extern char * plasma_data; +extern int plasma_data_points; +extern pixel plasma_data_colours[]; +extern float plasma_data_pos[];*/ + +class Graphics +{ +public: + SDL_Surface * sdl_scrn; + pixel *vid; + pixel *render_packed_rgb(void *image, int width, int height, int cmp_size); + static char * generate_gradient(pixel * colours, float * points, int pointcount, int size); + void draw_other(); + void draw_rgba_image(unsigned char *data, int x, int y, float a); + static void *ptif_pack(pixel *src, int w, int h, int *result_size); + static pixel *ptif_unpack(void *datain, int size, int *w, int *h); + static pixel *resample_img_nn(pixel *src, int sw, int sh, int rw, int rh); + static pixel *resample_img(pixel *src, int sw, int sh, int rw, int rh); + static pixel *rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f); + //void render_gravlensing(pixel *src, pixel * dst); + //void sdl_blit_1(int x, int y, int w, int h, pixel *src, int pitch); + //void sdl_blit_2(int x, int y, int w, int h, pixel *src, int pitch); + //void sdl_blit(int x, int y, int w, int h, pixel *src, int pitch); + void drawblob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb); + void draw_tool(int b, int sl, int sr, unsigned pc, unsigned iswall); + //int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc); + //void draw_menu(pixel *vid_buf, int i, int hover); + void drawpixel(int x, int y, int r, int g, int b, int a); + int addchar(int x, int y, int c, int r, int g, int b, int a); + int drawchar(int x, int y, int c, int r, int g, int b, int a); + int drawtext(int x, int y, std::string &s, int r, int g, int b, int a); + int drawtext(int x, int y, const char *s, int r, int g, int b, int a); + int drawtext_outline(int x, int y, const char *s, int r, int g, int b, int a, int olr, int olg, int olb, int ola); + int drawtextwrap(int x, int y, int w, const char *s, int r, int g, int b, int a); + void drawrect(int x, int y, int w, int h, int r, int g, int b, int a); + void fillrect(int x, int y, int w, int h, int r, int g, int b, int a); + void clearrect(int x, int y, int w, int h); + void drawdots(int x, int y, int h, int r, int g, int b, int a); + static int textwidth(char *s); + int drawtextmax(int x, int y, int w, char *s, int r, int g, int b, int a); + static int textnwidth(char *s, int n); + static void textnpos(char *s, int n, int w, int *cx, int *cy); + static int textwidthx(char *s, int w); + static int textposxy(char *s, int width, int w, int h); + static int textwrapheight(char *s, int width); + void blendpixel(int x, int y, int r, int g, int b, int a); + void draw_icon(int x, int y, char ch, int flag); + //void draw_air(); + //void draw_grav_zones(pixel *vid); + //void draw_grav(pixel *vid); + void draw_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a); + void addpixel(int x, int y, int r, int g, int b, int a); + void xor_pixel(int x, int y); + void xor_line(int x1, int y1, int x2, int y2); + void xor_rect(int x, int y, int w, int h); + void blend_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a); + //void render_parts(pixel *vid); +// #ifdef OGLR +// void draw_parts_fbo(); +// #endif +// void draw_parts(); +// void draw_walls(pixel *vid); +// void create_decorations(int x, int y, int rx, int ry, int r, int g, int b, int click, int tool); +// void create_decoration(int x, int y, int r, int g, int b, int click, int tool); +// void line_decorations(int x1, int y1, int x2, int y2, int rx, int ry, int r, int g, int b, int click, int tool); +// void box_decorations(int x1, int y1, int x2, int y2, int r, int g, int b, int click, int tool); +// void draw_color_menu(pixel *vid_buf, int i, int hover); + void draw_wavelengths(int x, int y, int h, int wl); + void render_signs(); +// void render_fire(pixel *dst); +// void prepare_alpha(int size, float intensity); + void draw_image(pixel *img, int x, int y, int w, int h, int a); + static void dim_copy(pixel *dst, pixel *src); + static void dim_copy_pers(pixel *dst, pixel *src); + //void render_zoom(pixel *img); + //int render_thumb(void *thumb, int size, int bzip2, pixel *vid_buf, int px, int py, int scl); + //void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry); + //int sdl_open(void); + //int draw_debug_info(pixel* vid, int lm, int lx, int ly, int cx, int cy, int line_x, int line_y); + void Clear(); + void Blit(); + void AttachSDLSurface(SDL_Surface * surface); + #ifdef OGLR + void clearScreen(float alpha); + void ogl_blit(int x, int y, int w, int h, pixel *src, int pitch, int scale); + #endif + Graphics(); +}; + +#endif diff --git a/src/Gravity.h b/src/Gravity.h new file mode 100644 index 0000000..9f36240 --- /dev/null +++ b/src/Gravity.h @@ -0,0 +1,108 @@ +#ifndef GRAVITY_H +#define GRAVITY_H + +#include +#include "Config.h" +#include "Simulation.h" + +class Simulation; + +struct mask_el { + char *shape; + char shapeout; + void *next; +}; +typedef struct mask_el mask_el; + + +/* + * float *gravmap = NULL;//Maps to be used by the main thread + float *gravp = NULL; + float *gravy = NULL; + float *gravx = NULL; + unsigned *gravmask = NULL; + + float *th_ogravmap = NULL;// Maps to be processed by the gravity thread + float *th_gravmap = NULL; + float *th_gravx = NULL; + float *th_gravy = NULL; + float *th_gravp = NULL; + + int th_gravchanged = 0; + + pthread_t gravthread; + pthread_mutex_t gravmutex; + pthread_cond_t gravcv; + int grav_ready = 0; + int gravthread_done = 0; + */ +class Gravity +{ +private: + unsigned *gravmask; + + float *th_ogravmap; + float *th_gravmap; + float *th_gravx; + float *th_gravy; + float *th_gravp; + + int th_gravchanged; + + pthread_t gravthread; + pthread_mutex_t gravmutex; + pthread_cond_t gravcv; + int grav_ready; + int gravthread_done; + + //Simulation * sim; +public: + float *gravmap; + float *gravp; + float *gravy; + float *gravx; + unsigned char (*bmap)[XRES/CELL]; + int ngrav_enable; + void grav_mask_r(int x, int y, char checkmap[YRES/CELL][XRES/CELL], char shape[YRES/CELL][XRES/CELL], char *shapeout); + void mask_free(mask_el *c_mask_el); + + void gravity_init(); + void gravity_cleanup(); + void gravity_update_async(); + + static void *update_grav_async_helper(void * context); + void update_grav_async(); + + void start_grav_async(); + void stop_grav_async(); + void update_grav(); + void gravity_mask(); + + void bilinear_interpolation(float *src, float *dst, int sw, int sh, int rw, int rh); + + #ifdef GRAVFFT + void grav_fft_init(); + void grav_fft_cleanup(); + #endif + + Gravity(); +}; + +/*extern int ngrav_enable; //Newtonian gravity +extern int gravwl_timeout; +extern int gravityMode;*/ + +/*float *gravmap;//Maps to be used by the main thread +float *gravp; +float *gravy; +float *gravx; +unsigned *gravmask; + +float *th_ogravmap;// Maps to be processed by the gravity thread +float *th_gravmap; +float *th_gravx; +float *th_gravy; +float *th_gravp;*/ + + +#endif diff --git a/src/Misc.h b/src/Misc.h new file mode 100644 index 0000000..c5a61ef --- /dev/null +++ b/src/Misc.h @@ -0,0 +1,108 @@ +#ifndef UTILS_H +#define UTILS_H +#include +#include + +#if defined(WIN32) && !defined(__GNUC__) +#define x86_cpuid(func,af,bf,cf,df) \ + do {\ + __asm mov eax, func\ + __asm cpuid\ + __asm mov af, eax\ + __asm mov bf, ebx\ + __asm mov cf, ecx\ + __asm mov df, edx\ + } while(0) +#else +#define x86_cpuid(func,af,bf,cf,df) \ +__asm__ __volatile ("cpuid":\ + "=a" (af), "=b" (bf), "=c" (cf), "=d" (df) : "a" (func)); +#endif + +static char hex[] = "0123456789ABCDEF"; + +char *exe_name(void); + +//Signum function +int isign(float i); + +unsigned clamp_flt(float f, float min, float max); + +float restrict_flt(float f, float min, float max); + +char *mystrdup(char *s); + +struct strlist +{ + char *str; + struct strlist *next; +}; + +void strlist_add(struct strlist **list, char *str); + +int strlist_find(struct strlist **list, char *str); + +void strlist_free(struct strlist **list); + +void save_presets(int do_update); + +void clean_text(char *text, int vwidth); + +void load_presets(void); + +void save_string(FILE *f, char *str); + +int sregexp(const char *str, char *pattern); + +int load_string(FILE *f, char *str, int max); + +void strcaturl(char *dst, char *src); + +void strappend(char *dst, char *src); + +void *file_load(char *fn, int *size); + +void clipboard_push_text(char * text); + +char * clipboard_pull_text(); + +extern char *clipboard_text; + +int register_extension(); + +int cpu_check(void); + +void HSV_to_RGB(int h,int s,int v,int *r,int *g,int *b); + +void RGB_to_HSV(int r,int g,int b,int *h,int *s,int *v); + +void membwand(void * dest, void * src, size_t destsize, size_t srcsize); +// a b +// c d + +struct matrix2d { + float a,b,c,d; +}; +typedef struct matrix2d matrix2d; + +// column vector +struct vector2d { + float x,y; +}; +typedef struct vector2d vector2d; + +matrix2d m2d_multiply_m2d(matrix2d m1, matrix2d m2); +vector2d m2d_multiply_v2d(matrix2d m, vector2d v); +matrix2d m2d_multiply_float(matrix2d m, float s); +vector2d v2d_multiply_float(vector2d v, float s); + +vector2d v2d_add(vector2d v1, vector2d v2); +vector2d v2d_sub(vector2d v1, vector2d v2); + +matrix2d m2d_new(float me0, float me1, float me2, float me3); +vector2d v2d_new(float x, float y); + +extern vector2d v2d_zero; +extern matrix2d m2d_identity; + +#endif diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 1e9630c..cf7d804 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -19,6 +19,9 @@ #include "interface/Point.h" #include "interface/Label.h" +#include "game/GameController.h" +#include "game/GameView.h" + using namespace std; SDL_Surface * SDLOpen() @@ -66,20 +69,24 @@ int main(int argc, char * argv[]) //Simulation * sim = new Simulation(); //ren = new Renderer(g, sim); - Global::Ref().g = new Graphics(); - Global::Ref().g->AttachSDLSurface(SDLOpen()); + ui::Engine::Ref().g = new Graphics(); + ui::Engine::Ref().g->AttachSDLSurface(SDLOpen()); ui::Engine * engine = &ui::Engine::Ref();//new ui::Engine(); - ui::State * engineState = new ui::State(); - ui::Sandbox * sandbox = new ui::Sandbox(); - ui::Button * button = new ui::Button(ui::Point(100, 100), ui::Point(100, 100), std::string("poP")); + //ui::State * engineState = new ui::State(); ui::Label * fpsLabel = new ui::Label(ui::Point(2, 2), ui::Point(200, 14), std::string("FPS: 0")); + //engineState->AddComponent(fpsLabel); engine->Begin(XRES, YRES); - engine->SetState(engineState); +// engine->SetState(engineState); + + GameController * gameController = new GameController(); + engine->ShowWindow(gameController->GetView()); + /*ui::Sandbox * sandbox = new ui::Sandbox(); + ui::Button * button = new ui::Button(ui::Point(100, 100), ui::Point(100, 100), std::string("poP")); engineState->AddComponent(fpsLabel); engineState->AddComponent(sandbox); engineState->AddComponent(button); - engineState->AddComponent(ControlFactory::MainMenu(0, YRES+MENUSIZE-17, XRES+BARSIZE, 16)); + engineState->AddComponent(ControlFactory::MainMenu(0, YRES+MENUSIZE-17, XRES+BARSIZE, 16));*/ SDL_Event event; while(engine->Running()) diff --git a/src/Renderer.h b/src/Renderer.h new file mode 100644 index 0000000..39c8c1a --- /dev/null +++ b/src/Renderer.h @@ -0,0 +1,60 @@ +#ifndef RENDERER_H +#define RENDERER_H + +#include "Config.h" +#include "Simulation.h" +#include "Graphics.h" + +class Simulation; + +class Graphics; + +struct gcache_item +{ + int isready; + int pixel_mode; + int cola, colr, colg, colb; + int firea, firer, fireg, fireb; +}; +typedef struct gcache_item gcache_item; + +class Renderer +{ +public: + //TODO: Vectors! + unsigned int *render_modes; + unsigned int render_mode; + unsigned int colour_mode; + unsigned int *display_modes; + unsigned int display_mode; + // + unsigned char fire_r[YRES/CELL][XRES/CELL]; + unsigned char fire_g[YRES/CELL][XRES/CELL]; + unsigned char fire_b[YRES/CELL][XRES/CELL]; + unsigned int fire_alpha[CELL*3][CELL*3]; + char * flm_data; + char * plasma_data; + int emp_decor; + // + int decorations_enable; + Simulation * sim; + Graphics * g; + gcache_item *graphicscache; + // + void draw_walls(); + void render_signs(); + void render_gravlensing(); + void render_fire(); + void prepare_alpha(int size, float intensity); + void render_parts(); + void draw_grav_zones(); + void draw_air(); + void draw_grav(); + void draw_other(); + void init_display_modes(); + void get_sign_pos(int i, int *x0, int *y0, int *w, int *h); + void prepare_graphicscache(); + Renderer(Graphics * g, Simulation * sim); +}; + +#endif diff --git a/src/Simulation.h b/src/Simulation.h new file mode 100644 index 0000000..b3c51af --- /dev/null +++ b/src/Simulation.h @@ -0,0 +1,241 @@ +/* + * Simulation.h + * + * Created on: Jan 2, 2012 + * Author: Simon + */ + +#ifndef SIMULATION_H_ +#define SIMULATION_H_ +#include +#include "Config.h" +#include "Renderer.h" +#include "Graphics.h" +#include "Elements.h" +#include "misc.h" + +#define CHANNELS ((int)(MAX_TEMP-73)/100+2) + +class Simulation; +class Renderer; +class Gravity; +class Air; + +struct Particle +{ + int type; + int life, ctype; + float x, y, vx, vy; + float temp; + float pavg[2]; + int flags; + int tmp; + int tmp2; + unsigned int dcolour; +}; +typedef struct Particle Particle; + +struct sign +{ + int x,y,ju; + char text[256]; +}; +typedef struct sign sign; + +struct part_type +{ + char *name; + pixel pcolors; + float advection; + float airdrag; + float airloss; + float loss; + float collision; + float gravity; + float diffusion; + float hotair; + int falldown; + int flammable; + int explosive; + int meltable; + int hardness; + int menu; + int enabled; + int weight; + int menusection; + float heat; + unsigned char hconduct; + char *descs; + char state; + unsigned int properties; + int (*update_func) (UPDATE_FUNC_ARGS); + int (*graphics_func) (GRAPHICS_FUNC_ARGS); +}; +typedef struct part_type part_type; + +struct part_transition +{ + float plv; // transition occurs if pv is lower than this + int plt; + float phv; // transition occurs if pv is higher than this + int pht; + float tlv; // transition occurs if t is lower than this + int tlt; + float thv; // transition occurs if t is higher than this + int tht; +}; +typedef struct part_transition part_transition; + +struct playerst +{ + char comm; //command cell + char pcomm; //previous command + int elem; //element power + float legs[16]; //legs' positions + float accs[8]; //accelerations + char spwn; //if stick man was spawned + unsigned int frames; //frames since last particle spawn - used when spawning LIGH +}; +typedef struct playerst playerst; + +struct wall_type +{ + pixel colour; + pixel eglow; // if emap set, add this to fire glow + int drawstyle; + const char *descs; +}; +typedef struct wall_type wall_type; + +struct gol_menu +{ + const char *name; + pixel colour; + int goltype; + const char *description; +}; +typedef struct gol_menu gol_menu; + +//#ifdef _cplusplus +class Simulation +{ +private: +public: + + Gravity * grav; + Air * air; + part_type ptypes[PT_NUM]; + part_transition ptransitions[PT_NUM]; + wall_type wtypes[UI_WALLCOUNT]; + gol_menu gmenu[NGOL]; + int goltype[NGOL]; + int grule[NGOL+1][10]; + playerst player; + playerst player2; + playerst fighters[256]; //255 is the maximum number of fighters + unsigned char fighcount; //Contains the number of fighters + int lighting_recreate; + int gravwl_timeout; + Particle portalp[CHANNELS][8][80]; + Particle emptyparticle; + int portal_rx[8]; + int portal_ry[8]; + int wireless[CHANNELS][2]; + char can_move[PT_NUM][PT_NUM]; + int parts_lastActiveIndex;// = NPART-1; + int pfree; + int NUM_PARTS; + int elementCount[PT_NUM]; + int ISWIRE; + sign * signs; + //Gol sim + int CGOL; + int ISGOL; + int GSPEED; + unsigned char gol[XRES][YRES]; + unsigned char gol2[XRES][YRES][NGOL+1]; + //Air sim + float (*vx)[XRES/CELL]; + float (*vy)[XRES/CELL]; + float (*pv)[XRES/CELL]; + float (*hv)[XRES/CELL]; + //Gravity sim + float *gravx;//gravx[(YRES/CELL) * (XRES/CELL)]; + float *gravy;//gravy[(YRES/CELL) * (XRES/CELL)]; + float *gravp;//gravp[(YRES/CELL) * (XRES/CELL)]; + float *gravmap;//gravmap[(YRES/CELL) * (XRES/CELL)]; + //Walls + unsigned char bmap[YRES/CELL][XRES/CELL]; + unsigned char emap[YRES/CELL][XRES/CELL]; + float fvx[YRES/CELL][XRES/CELL]; + float fvy[YRES/CELL][XRES/CELL]; + //Particles + Particle parts[NPART]; + int pmap[YRES][XRES]; + int photons[YRES][XRES]; + // + int gravityMode; + int airMode; + int ngrav_enable; + int legacy_enable; + int aheat_enable; + int VINE_MODE; + int water_equal_test; + int sys_pause; + int framerender; + int pretty_powder; + // + int sandcolour_r; + int sandcolour_g; + int sandcolour_b; //TODO: Make a single variable + //Stuff + int is_blocking(int t, int x, int y); + int is_boundary(int pt, int x, int y); + int find_next_boundary(int pt, int *x, int *y, int dm, int *em); + int pn_junction_sprk(int x, int y, int pt); + void photoelectric_effect(int nx, int ny); + unsigned direction_to_map(float dx, float dy, int t); + int do_move(int i, int x, int y, float nxf, float nyf); + int try_move(int i, int x, int y, int nx, int ny); + int eval_move(int pt, int nx, int ny, unsigned *rr); + void init_can_move(); + void create_cherenkov_photon(int pp); + void create_gain_photon(int pp); + void kill_part(int i); + int flood_prop(int x, int y, size_t propoffset, void * propvalue, int proptype); + int flood_prop_2(int x, int y, size_t propoffset, void * propvalue, int proptype, int parttype, char * bitmap); + int flood_water(int x, int y, int i, int originaly, int check); + void detach(int i); + void part_change_type(int i, int x, int y, int t); + int create_part_add_props(int p, int x, int y, int tv, int rx, int ry); + //int InCurrentBrush(int i, int j, int rx, int ry); + //int get_brush_flags(); + int create_part(int p, int x, int y, int t); + void delete_part(int x, int y, int flags); + int is_wire(int x, int y); + int is_wire_off(int x, int y); + void set_emap(int x, int y); + int parts_avg(int ci, int ni, int t); + void create_arc(int sx, int sy, int dx, int dy, int midpoints, int variance, int type, int flags); + int nearest_part(int ci, int t, int max_d); + void update_particles_i(int start, int inc); + void update_particles(); + void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert); + void clear_area(int area_x, int area_y, int area_w, int area_h); + void create_box(int x1, int y1, int x2, int y2, int c, int flags); + int flood_parts(int x, int y, int c, int cm, int bm, int flags); + int create_parts(int x, int y, int rx, int ry, int c, int flags); + void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags); + void *transform_save(void *odata, int *size, matrix2d transform, vector2d translate); + void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]); + void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]); + int get_wavelength_bin(int *wm); + int get_normal(int pt, int x, int y, float dx, float dy, float *nx, float *ny); + int get_normal_interp(int pt, float x0, float y0, float dx, float dy, float *nx, float *ny); + void clear_sim(); + void UpdateParticles(); + Simulation(); +}; +//#endif + +#endif /* SIMULATION_H_ */ diff --git a/src/Singleton.h b/src/Singleton.h new file mode 100644 index 0000000..6b2214e --- /dev/null +++ b/src/Singleton.h @@ -0,0 +1,16 @@ +#ifndef SINGLETON_H +#define SINGLETON_H + +template + +class Singleton +{ +public: + static T& Ref() + { + static T instance; + return instance; + } +}; + +#endif // SINGLETON_H diff --git a/src/elements/O2.cpp b/src/elements/O2.cpp new file mode 100644 index 0000000..78b4229 --- /dev/null +++ b/src/elements/O2.cpp @@ -0,0 +1,30 @@ +#include "element.h" + +int update_O2(UPDATE_FUNC_ARGS) +{ + int r,rx,ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rx>8].temp+=(rand()/(RAND_MAX/100)); + if(parts[r>>8].tmp&0x01) + parts[r>>8].temp=3473; + parts[r>>8].tmp |= 2; + } + if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM) + { + sim->create_part(i,x,y,PT_FIRE); + parts[i].temp+=(rand()/(RAND_MAX/100)); + parts[i].tmp |= 2; + } + + } + return 0; +} diff --git a/src/elements/acel.cpp b/src/elements/acel.cpp new file mode 100644 index 0000000..7ab9684 --- /dev/null +++ b/src/elements/acel.cpp @@ -0,0 +1,58 @@ +#include "element.h" + +int update_ACEL(UPDATE_FUNC_ARGS) { + int r, rx, ry; + parts[i].tmp = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; + if ((r>>8)>=NPART || !r) + continue; + if(sim->ptypes[r&0xFF].properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) + { + parts[r>>8].vx *= 1.1f; + parts[r>>8].vy *= 1.1f; + parts[i].tmp = 1; + } + } + return 0; +} + +int graphics_ACEL(GRAPHICS_FUNC_ARGS) +{ + if(cpart->tmp) + *pixel_mode |= PMODE_GLOW; + return 0; +} +int update_DCEL(UPDATE_FUNC_ARGS) { + int r, rx, ry; + parts[i].tmp = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; + if ((r>>8)>=NPART || !r) + continue; + if(sim->ptypes[r&0xFF].properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) + { + parts[r>>8].vx *= 0.9f; + parts[r>>8].vy *= 0.9f; + parts[i].tmp = 1; + } + } + return 0; +} + +int graphics_DCEL(GRAPHICS_FUNC_ARGS) +{ + if(cpart->tmp) + *pixel_mode |= PMODE_GLOW; + return 0; +} diff --git a/src/elements/acid.cpp b/src/elements/acid.cpp new file mode 100644 index 0000000..3a72b9d --- /dev/null +++ b/src/elements/acid.cpp @@ -0,0 +1,76 @@ +#include "element.h" + +int update_ACID(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, np; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxpart_change_type(i,x,y,PT_FIRE); + sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); + parts[i].life = 4; + parts[r>>8].life = 4; + } + else if ((r&0xFF)==PT_WTRV) + { + if(!(rand()%250)) + { + sim->part_change_type(i, x, y, PT_CAUS); + parts[i].life = (rand()%50)+25; + sim->kill_part(r>>8); + } + } + else if (((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && sim->ptypes[r&0xFF].hardness>(rand()%1000))&&parts[i].life>=50) + { + if (sim->parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid + { + float newtemp = ((60.0f-(float)sim->ptypes[r&0xFF].hardness))*7.0f; + if(newtemp < 0){ + newtemp = 0; + } + parts[i].temp += newtemp; + parts[i].life--; + sim->kill_part(r>>8); + } + } + else if (parts[i].life<=50) + { + sim->kill_part(i); + return 1; + } + } + } + for ( trade = 0; trade<2; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rx>8)>=NPART || !r) + continue; + if ((r&0xFF)==PT_ACID&&(parts[i].life>parts[r>>8].life)&&parts[i].life>0)//diffusion + { + int temp = parts[i].life - parts[r>>8].life; + if (temp ==1) + { + parts[r>>8].life ++; + parts[i].life --; + } + else if (temp>0) + { + parts[r>>8].life += temp/2; + parts[i].life -= temp/2; + } + } + } + } + return 0; +} diff --git a/src/elements/amtr.cpp b/src/elements/amtr.cpp new file mode 100644 index 0000000..d119cc9 --- /dev/null +++ b/src/elements/amtr.cpp @@ -0,0 +1,28 @@ +#include "element.h" + +int update_AMTR(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxkill_part(i); + return 1; + } + if (10>(rand()/(RAND_MAX/100))) + sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); + else + sim->kill_part(r>>8); + sim->pv[y/CELL][x/CELL] -= 2.0f; + } + } + return 0; +} diff --git a/src/elements/anar.cpp b/src/elements/anar.cpp new file mode 100644 index 0000000..83eaf5a --- /dev/null +++ b/src/elements/anar.cpp @@ -0,0 +1,27 @@ +#include "element.h" + +int update_ANAR(UPDATE_FUNC_ARGS) { + int r, rx, ry; + + //if (parts[i].temp >= 0.23) + // parts[i].temp --; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%22) + { + sim->part_change_type(i,x,y,PT_HFLM); + parts[i].life = rand()%150+50; + parts[r>>8].temp = parts[i].temp = 0; + sim->pv[y/CELL][x/CELL] -= 0.5; + } + } + } + return 0; +} diff --git a/src/elements/aray.cpp b/src/elements/aray.cpp new file mode 100644 index 0000000..65b0d53 --- /dev/null +++ b/src/elements/aray.cpp @@ -0,0 +1,104 @@ +#include "element.h" + +int update_ARAY(UPDATE_FUNC_ARGS) { + int r, nxx, nyy, docontinue, nxi, nyi, rx, ry, nr, ry1, rx1; + if (parts[i].life==0) { + int colored =0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN)?1:0; + int nostop = (parts[r>>8].ctype==PT_INST)?1:0; + for (docontinue = 1, nxx = 0, nyy = 0, nxi = rx*-1, nyi = ry*-1; docontinue; nyy+=nyi, nxx+=nxi) { + if (!(x+nxi+nxx= 0 && y+nyi+nyy >= 0)) { + break; + } + r = pmap[y+nyi+nyy][x+nxi+nxx]; + if (!r) { + int nr = sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_BRAY); + if (nr!=-1) { + if (destroy) {//if it came from PSCN + parts[nr].tmp = 2; + parts[nr].life = 2; + } else + parts[nr].ctype = colored; + parts[nr].temp = parts[i].temp; + } + } else if (!destroy) { + if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==0) {//if it hits another BRAY that isn't red + if (nyy!=0 || nxx!=0) { + parts[r>>8].life = 1020;//makes it last a while + parts[r>>8].tmp = 1; + if (!parts[r>>8].ctype)//and colors it if it isn't already + parts[r>>8].ctype = colored; + } + docontinue = 0;//then stop it + } else if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==1) {//if it hits one that already was a long life, reset it + parts[r>>8].life = 1020; + //docontinue = 1; + } else if ((r&0xFF)==PT_FILT) {//get color if passed through FILT + colored = parts[r>>8].ctype; + //this if prevents BRAY from stopping on certain materials + } else if ((r&0xFF)!=PT_STOR && (r&0xFF)!=PT_INWR && (r&0xFF)!=PT_ARAY && (r&0xFF)!=PT_WIFI && !((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { + if (nyy!=0 || nxx!=0) { + sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK); + } + //if (!(nostop && (ptypes[r&0xFF].properties&PROP_CONDUCTS))) { + if (!(nostop && parts[r>>8].ctype >= 0 && parts[r>>8].ctype < PT_NUM && (sim->ptypes[parts[r>>8].ctype].properties&PROP_CONDUCTS))) { + docontinue = 0; + } else { + docontinue = 1; + } + } else if((r&0xFF)==PT_STOR) { + if(parts[r>>8].tmp) + { + //Cause STOR to release + for(ry1 = 1; ry1 >= -1; ry1--){ + for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ + int np = sim->create_part(-1, x+nxi+nxx+rx1, y+nyi+nyy+ry1, parts[r>>8].tmp); + if (np!=-1) + { + parts[np].temp = parts[r>>8].temp; + parts[np].life = parts[r>>8].flags; + parts[np].tmp = parts[r>>8].pavg[0]; + parts[np].ctype = parts[r>>8].pavg[1]; + parts[r>>8].tmp = 0; + parts[r>>8].life = 10; + break; + } + } + } + } + else + { + parts[r>>8].life = 10; + } + } + } else if (destroy) { + if ((r&0xFF)==PT_BRAY) { + parts[r>>8].life = 1; + docontinue = 1; + //this if prevents red BRAY from stopping on certain materials + } else if ((r&0xFF)==PT_STOR || (r&0xFF)==PT_INWR || (r&0xFF)==PT_ARAY || (r&0xFF)==PT_WIFI || (r&0xFF)==PT_FILT || ((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { + if((r&0xFF)==PT_STOR) + { + parts[r>>8].tmp = 0; + parts[r>>8].life = 0; + } + docontinue = 1; + } else { + docontinue = 0; + } + } + } + } + //parts[i].life = 4; + } + } + return 0; +} diff --git a/src/elements/bang.cpp b/src/elements/bang.cpp new file mode 100644 index 0000000..658a567 --- /dev/null +++ b/src/elements/bang.cpp @@ -0,0 +1,75 @@ +#include "element.h" + +int update_BANG(UPDATE_FUNC_ARGS) { + int r, rx, ry, nb; + if(parts[i].tmp==0) + { + if(parts[i].temp>=673.0f) + parts[i].tmp = 1; + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxflood_prop(x, y, offsetof(Particle, tmp), &tempvalue, 0); + } + else if(parts[i].tmp==2) + { + parts[i].tmp = 3; + } + else if(parts[i].tmp>=3) + { + float otemp = parts[i].temp-275.13f; + //Explode!! + sim->pv[y/CELL][x/CELL] += 0.5f; + parts[i].tmp = 0; + if(!(rand()%3)) + { + if(!(rand()%2)) + { + sim->create_part(i, x, y, PT_FIRE); + parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); + } + else + { + sim->create_part(i, x, y, PT_SMKE); + parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); + } + } + else + { + if(!(rand()%15)) + { + sim->create_part(i, x, y, PT_BOMB); + parts[i].tmp = 1; + parts[i].life = 50; + parts[i].temp = restrict_flt((MAX_TEMP/3)+otemp, MIN_TEMP, MAX_TEMP); + parts[i].vx = rand()%20-10; + parts[i].vy = rand()%20-10; + } + else + { + sim->kill_part(i); + } + } + return 1; + } + return 0; +} diff --git a/src/elements/bcln.cpp b/src/elements/bcln.cpp new file mode 100644 index 0000000..8c00f95 --- /dev/null +++ b/src/elements/bcln.cpp @@ -0,0 +1,40 @@ +#include "element.h" + +int update_BCLN(UPDATE_FUNC_ARGS) { + if (!parts[i].life && sim->pv[y/CELL][x/CELL]>4.0f) + parts[i].life = rand()%40+80; + if (parts[i].life) + { + float advection = 0.1f; + parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; + parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; + } + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && + (r&0xFF)!=PT_STKM2 && (r&0xFF)!=PT_PBCN && + (r&0xFF)>8].ctype; + } + } + } + else { + if (parts[i].ctype==PT_LIFE) sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); + else sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + return 0; +} diff --git a/src/elements/bcol.cpp b/src/elements/bcol.cpp new file mode 100644 index 0000000..d941508 --- /dev/null +++ b/src/elements/bcol.cpp @@ -0,0 +1,68 @@ +#include "element.h" + +int update_BCOL(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, temp; + if (parts[i].life<=0) { + sim->create_part(i, x, y, PT_FIRE); + return 1; + } else if (parts[i].life < 100) { + parts[i].life--; + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) + { + if (parts[i].life>100) { + parts[i].life = 99; + } + } + if ((r&0xFF)==PT_LAVA && 1>(rand()%500)) + { + if (parts[r>>8].ctype == PT_IRON) { + parts[r>>8].ctype = PT_METL; + sim->kill_part(i); + return 1; + } + } + } + /*if(100-parts[i].life > parts[i].tmp2) + parts[i].tmp2 = 100-parts[i].life; + if(parts[i].tmp2 < 0) parts[i].tmp2 = 0; + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion + { + int temp = parts[i].tmp2 - parts[r>>8].tmp2; + if(temp < 10) + continue; + if (temp ==1) + { + parts[r>>8].tmp2 ++; + parts[i].tmp2 --; + } + else if (temp>0) + { + parts[r>>8].tmp2 += temp/2; + parts[i].tmp2 -= temp/2; + } + } + } + }*/ + if(parts[i].temp > parts[i].tmp2) + parts[i].tmp2 = parts[i].temp; + return 0; +} diff --git a/src/elements/bizr.cpp b/src/elements/bizr.cpp new file mode 100644 index 0000000..538b87f --- /dev/null +++ b/src/elements/bizr.cpp @@ -0,0 +1,44 @@ +#include "element.h" + +//Used by ALL 3 BIZR states +int update_BIZR(UPDATE_FUNC_ARGS) { + int r, rx, ry, nr, ng, nb, na; + float tr, tg, tb, ta, mr, mg, mb, ma; + float blend; + if(parts[i].dcolour){ + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; + tg = (parts[r>>8].dcolour>>8)&0xFF; + tb = (parts[r>>8].dcolour)&0xFF; + ta = (parts[r>>8].dcolour>>24)&0xFF; + + mr = (parts[i].dcolour>>16)&0xFF; + mg = (parts[i].dcolour>>8)&0xFF; + mb = (parts[i].dcolour)&0xFF; + ma = (parts[i].dcolour>>24)&0xFF; + + nr = (tr*blend) + (mr*(1-blend)); + ng = (tg*blend) + (mg*(1-blend)); + nb = (tb*blend) + (mb*(1-blend)); + na = (ta*blend) + (ma*(1-blend)); + + parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; + } + } + } + if(((r = sim->photons[y][x])&0xFF)==PT_PHOT || ((r = pmap[y][x])&0xFF)==PT_PHOT) + { + sim->part_change_type(r>>8, x, y, PT_ELEC); + parts[r>>8].ctype = 0; + } + return 0; +} diff --git a/src/elements/bmtl.cpp b/src/elements/bmtl.cpp new file mode 100644 index 0000000..a3dc4b8 --- /dev/null +++ b/src/elements/bmtl.cpp @@ -0,0 +1,29 @@ +#include "element.h" + +int update_BMTL(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, tempFactor; + if (parts[i].tmp>1) + { + parts[i].tmp--; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + if ((rt==PT_METL || rt==PT_IRON) && 1>(rand()/(RAND_MAX/100))) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_BMTL); + parts[r>>8].tmp=(parts[i].tmp<=7)?parts[i].tmp=1:parts[i].tmp-(rand()%5);//rand()/(RAND_MAX/300)+100; + } + } + } + else if (parts[i].tmp==1 && 1>rand()%1000) + { + parts[i].tmp = 0; + sim->part_change_type(i,x,y,PT_BRMT); + } + return 0; +} diff --git a/src/elements/bomb.cpp b/src/elements/bomb.cpp new file mode 100644 index 0000000..b2e9e7d --- /dev/null +++ b/src/elements/bomb.cpp @@ -0,0 +1,85 @@ +#include "element.h" + +int update_BOMB(UPDATE_FUNC_ARGS) { + int r, rx, ry, nb; + //Spark is used so much now that it should be a seperate element. + if (parts[i].tmp==1) { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties & (TYPE_SOLID | TYPE_PART | TYPE_LIQUID) && !(sim->ptypes[r&0xFF].properties & PROP_SPARKSETTLE)) { + sim->kill_part(i); + return 1; + } + } + } else if (parts[i].tmp==0) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+nxi, y+nxj, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 1; + parts[nb].life = 50; + parts[nb].temp = MAX_TEMP; + parts[nb].vx = rand()%20-10; + parts[nb].vy = rand()%20-10; + } + } + for (nxj=-rad; nxj<=rad; nxj++) + for (nxi=-rad; nxi<=rad; nxi++) + if ((pow(nxi,2))/(pow(rad,2))+(pow(nxj,2))/(pow(rad,2))<=1) + if ((pmap[y+nxj][x+nxi]&0xFF)!=PT_DMND && (pmap[y+nxj][x+nxi]&0xFF)!=PT_CLNE && (pmap[y+nxj][x+nxi]&0xFF)!=PT_PCLN && (pmap[y+nxj][x+nxi]&0xFF)!=PT_BCLN) { + sim->delete_part(x+nxi, y+nxj, 0);//it SHOULD kill anything but the exceptions above, doesn't seem to always work + sim->pv[(y+nxj)/CELL][(x+nxi)/CELL] += 0.1f; + nb = sim->create_part(-1, x+nxi, y+nxj, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 2; + parts[nb].life = 2; + parts[nb].temp = MAX_TEMP; + } + } + //create_parts(x, y, 9, 9, PT_BOMB); + //create_parts(x, y, 8, 8, PT_NONE); + sim->kill_part(i); + return 1; + } + } + } + return 0; +} +int graphics_BOMB(GRAPHICS_FUNC_ARGS) +{ + if (cpart->tmp==0) { + //Normal bomb + *pixel_mode |= PMODE_FLARE; + } + else if(cpart->tmp==2) + { + //Flash + *pixel_mode = PMODE_FLAT | FIRE_ADD; + *colr = *colg = *colb = *firer = *fireg = *fireb = *firea = 255; + } + else + { + //Flying spark + *pixel_mode = PMODE_SPARK | PMODE_ADD; + *cola = 4*cpart->life; + } + return 0; +} diff --git a/src/elements/boyl.cpp b/src/elements/boyl.cpp new file mode 100644 index 0000000..e4ee6d2 --- /dev/null +++ b/src/elements/boyl.cpp @@ -0,0 +1,43 @@ +#include "element.h" + +int update_BOYL(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (sim->pv[y/CELL][x/CELL]<(parts[i].temp/100)) + sim->pv[y/CELL][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL]); + if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp/100)) + sim->pv[y/CELL+1][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL+1][x/CELL]); + if (x+CELLpv[y/CELL][x/CELL+1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL+1]); + if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL+1][x/CELL+1]); + } + if (y-CELL>=0 && sim->pv[y/CELL-1][x/CELL]<(parts[i].temp/100)) + sim->pv[y/CELL-1][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL-1][x/CELL]); + if (x-CELL>=0) + { + sim->pv[y/CELL][x/CELL-1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL-1]); + if (y-CELL>=0) + sim->pv[y/CELL-1][x/CELL-1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL-1][x/CELL-1]); + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && + x+rxrand()%30) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FOG); + } + else if ((r&0xFF)==PT_O2 && 1>rand()%9) + { + sim->kill_part(r>>8); + sim->part_change_type(i,x,y,PT_WATR); + sim->pv[y/CELL][x/CELL] += 4.0; + } + } + return 0; +} diff --git a/src/elements/brmt.cpp b/src/elements/brmt.cpp new file mode 100644 index 0000000..c23bd99 --- /dev/null +++ b/src/elements/brmt.cpp @@ -0,0 +1,35 @@ +#include "element.h" + +int update_BRMT(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, tempFactor; + if (parts[i].temp > (250.0f+273.15f)) + { + printf("%f\n", (250.0f+273.15f)-parts[i].temp); + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + tempFactor = 1000 - (((250.0f+273.15f)-parts[i].temp)*2); + if(tempFactor < 2) + tempFactor = 2; + if ((rt==PT_BREC) && 1 > (rand()%tempFactor)) + { + if(rand()%2) + { + sim->create_part(r>>8, x+rx, y+ry, PT_THRM); + } + else + { sim->create_part(i, x, y, PT_THRM); + } + return 1; + //part_change_type(r>>8,x+rx,y+ry,PT_BMTL); + //parts[r>>8].tmp=(parts[i].tmp<=7)?parts[i].tmp=1:parts[i].tmp-(rand()%5);//rand()/(RAND_MAX/300)+100; + } + } + } + return 0; +} diff --git a/src/elements/btry.cpp b/src/elements/btry.cpp new file mode 100644 index 0000000..3f11003 --- /dev/null +++ b/src/elements/btry.cpp @@ -0,0 +1,24 @@ +#include "element.h" + +int update_BTRY(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + if (sim->parts_avg(i,r>>8,PT_INSL) != PT_INSL) + { + if ((sim->ptypes[rt].properties&PROP_CONDUCTS) && !(rt==PT_WATR||rt==PT_SLTW||rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR) && parts[r>>8].life==0 && abs(rx)+abs(ry) < 4) + { + parts[r>>8].life = 4; + parts[r>>8].ctype = rt; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + } + } + } + return 0; +} diff --git a/src/elements/c5.cpp b/src/elements/c5.cpp new file mode 100644 index 0000000..412245f --- /dev/null +++ b/src/elements/c5.cpp @@ -0,0 +1,24 @@ +#include "element.h" + +int update_C5(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].temp<100)||(r&0xFF)==PT_HFLM) + { + if (1>rand()%6) + { + sim->part_change_type(i,x,y,PT_HFLM); + parts[r>>8].temp = parts[i].temp = 0; + parts[i].life = rand()%150+50; + sim->pv[y/CELL][x/CELL] += 1.5; + } + } + } + return 0; +} diff --git a/src/elements/caus.cpp b/src/elements/caus.cpp new file mode 100644 index 0000000..2ec268e --- /dev/null +++ b/src/elements/caus.cpp @@ -0,0 +1,35 @@ +#include "element.h" + +int update_CAUS(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, np; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].hardness>(rand()%1000))&&parts[i].life>=50) + { + if (sim->parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid + { + float newtemp = ((60.0f-(float)sim->ptypes[r&0xFF].hardness))*7.0f; + if(newtemp < 0){ + newtemp = 0; + } + parts[i].temp += newtemp; + parts[i].life--; + sim->kill_part(r>>8); + } + } + else if (parts[i].life<=50) + { + sim->kill_part(i); + return 1; + } + } + } + return 0; +} diff --git a/src/elements/cbnw.cpp b/src/elements/cbnw.cpp new file mode 100644 index 0000000..cf0c13e --- /dev/null +++ b/src/elements/cbnw.cpp @@ -0,0 +1,89 @@ +#include "element.h" + +int update_CBNW(UPDATE_FUNC_ARGS) { + int r, rx, ry, oldt; + oldt = parts[i].tmp; + if (sim->pv[y/CELL][x/CELL]<=3) + { + if(20>(rand()%80000)) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.5f; + } + else if(sim->pv[y/CELL][x/CELL]<=-0.5) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.5f; + } + } + if (parts[i].tmp>0) + parts[i].tmp--; + if(!(rand()%200)) + { + parts[i].tmp2 = rand()%40; + } else if(parts[i].tmp2!=20) { + parts[i].tmp2 -= (parts[i].tmp2>20)?1:-1; + } + if(oldt==1) + { + //Explode + if(rand()%4) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.2f; + } + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties&TYPE_PART) && parts[i].tmp == 0 && 1>(rand()%250)) + { + //Start explode + parts[i].tmp = rand()%25;//(rand()%100)+50; + } + else if((sim->ptypes[r&0xFF].properties&TYPE_SOLID) && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_GLAS && parts[i].tmp == 0 && (2-sim->pv[y/CELL][x/CELL])>(rand()%20000)) + { + if(rand()%2) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.2f; + } + } + if ((r&0xFF)==PT_CBNW) + { + if(!parts[i].tmp && parts[r>>8].tmp) + { + parts[i].tmp = parts[r>>8].tmp; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[i].tmp--; + } + else if(parts[i].tmp && !parts[r>>8].tmp) + { + parts[r>>8].tmp = parts[i].tmp; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[r>>8].tmp++; + } + } + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + } + return 0; +} diff --git a/src/elements/clne.cpp b/src/elements/clne.cpp new file mode 100644 index 0000000..13b25b9 --- /dev/null +++ b/src/elements/clne.cpp @@ -0,0 +1,32 @@ +#include "element.h" + +int update_CLNE(UPDATE_FUNC_ARGS) { + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && + (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && + (r&0xFF)>8].ctype; + } + } + } + else { + if (parts[i].ctype==PT_LIFE) sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); + else sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + return 0; +} diff --git a/src/elements/clst.cpp b/src/elements/clst.cpp new file mode 100644 index 0000000..2c31d87 --- /dev/null +++ b/src/elements/clst.cpp @@ -0,0 +1,38 @@ +#include "element.h" + +int update_CLST(UPDATE_FUNC_ARGS) { + int r, rx, ry; + float cxy; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1500)) + { + sim->part_change_type(i,x,y,PT_PSTS); + sim->kill_part(r>>8); + } + if ((r&0xFF)==PT_NITR) + { + sim->create_part(i, x, y, PT_BANG); + sim->create_part(r>>8, x+rx, y+ry, PT_BANG); + } + if ((r&0xFF)==PT_CLST) + { + if(parts[i].temp <195) + cxy = 0.05; + if(parts[i].temp >= 195 && parts[i].temp <295) + cxy = 0.015; + if(parts[i].temp >= 295 && parts[i].temp <350) + cxy = 0.01; + if(parts[i].temp > 350) + cxy = 0.005; + parts[i].vx += cxy*rx; + parts[i].vy += cxy*ry;//These two can be set not to calculate over 350 later. They do virtually nothing over 0.005. + } + } + return 0; +} diff --git a/src/elements/co2.cpp b/src/elements/co2.cpp new file mode 100644 index 0000000..5a3bbf5 --- /dev/null +++ b/src/elements/co2.cpp @@ -0,0 +1,31 @@ +#include "element.h" + +int update_CO2(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%40000)&&parts[i].ctype==5) + { + parts[i].ctype = 0; + sim->create_part(-3, x, y, PT_WATR); + } + if ((r>>8)>=NPART || !r) + continue; + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW) && 1>(rand()%250)) + { + sim->part_change_type(i,x,y,PT_CBNW); + sim->kill_part(r>>8); + } + } + return 0; +} diff --git a/src/elements/coal.cpp b/src/elements/coal.cpp new file mode 100644 index 0000000..256aa69 --- /dev/null +++ b/src/elements/coal.cpp @@ -0,0 +1,75 @@ +#include "element.h" + +int update_COAL(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, temp; + if (parts[i].life<=0) { + sim->create_part(i, x, y, PT_FIRE); + return 1; + } else if (parts[i].life < 100) { + parts[i].life--; + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); + } + if ((sim->pv[y/CELL][x/CELL] > 4.3f)&&parts[i].tmp>40) + parts[i].tmp=39; + else if (parts[i].tmp<40&&parts[i].tmp>0) + parts[i].tmp--; + else if (parts[i].tmp<=0) { + sim->create_part(i, x, y, PT_BCOL); + return 1; + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) + { + if (parts[i].life>100) { + parts[i].life = 99; + } + } + if ((r&0xFF)==PT_LAVA && 1>(rand()%500)) + { + if (parts[r>>8].ctype == PT_IRON) { + parts[r>>8].ctype = PT_METL; + sim->kill_part(i); + return 1; + } + } + } + /*if(100-parts[i].life > parts[i].tmp2) + parts[i].tmp2 = 100-parts[i].life; + if(parts[i].tmp2 < 0) parts[i].tmp2 = 0; + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion + { + int temp = parts[i].tmp2 - parts[r>>8].tmp2; + if(temp < 10) + continue; + if (temp ==1) + { + parts[r>>8].tmp2 ++; + parts[i].tmp2 --; + } + else if (temp>0) + { + parts[r>>8].tmp2 += temp/2; + parts[i].tmp2 -= temp/2; + } + } + } + }*/ + if(parts[i].temp > parts[i].tmp2) + parts[i].tmp2 = parts[i].temp; + return 0; +} diff --git a/src/elements/conv.cpp b/src/elements/conv.cpp new file mode 100644 index 0000000..ce4ee48 --- /dev/null +++ b/src/elements/conv.cpp @@ -0,0 +1,45 @@ +#include "element.h" + +int update_CONV(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && + (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && + (r&0xFF)!=PT_CONV && (r&0xFF)>8].ctype; + } + } + } + else if(parts[i].ctype>0 && parts[i].ctype=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if((r&0xFF)!=PT_CONV && (r&0xFF)!=parts[i].ctype) + { + if (parts[i].ctype==PT_LIFE) sim->create_part(r>>8, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); + else sim->create_part(r>>8, x+rx, y+ry, parts[i].ctype); + } + } + } + return 0; +} diff --git a/src/elements/dest.cpp b/src/elements/dest.cpp new file mode 100644 index 0000000..014fad4 --- /dev/null +++ b/src/elements/dest.cpp @@ -0,0 +1,66 @@ +#include "element.h" + +int update_DEST(UPDATE_FUNC_ARGS) { + int r,rx,ry,topv; + rx=rand()%5-2; + ry=rand()%5-2; + + r = pmap[y+ry][x+rx]; + if (!r || (r&0xFF)==PT_DEST || (r&0xFF)==PT_DMND) + return 0; + + if (parts[i].life<=0 || parts[i].life>37) + { + parts[i].life=30+rand()%20; + parts[i].temp+=20000; + sim->pv[y/CELL][x/CELL]+=60.0f; + } + parts[i].temp+=10000; + if ((r&0xFF)==PT_PLUT || (r&0xFF)==PT_DEUT) + { + sim->pv[y/CELL][x/CELL]+=20.0f; + parts[i].temp+=18000; + if (rand()%2==0) + { + float orig_temp = parts[r>>8].temp; + sim->create_part(r>>8, x+rx, y+ry, PT_NEUT); + parts[r>>8].temp = restrict_flt(orig_temp+40000.0f, MIN_TEMP, MAX_TEMP); + sim->pv[y/CELL][x/CELL] += 10.0f; + parts[i].life-=4; + } + } + else if ((r&0xFF)==PT_INSL) + { + sim->create_part(r>>8, x+rx, y+ry, PT_PLSM); + } + else if (rand()%3==0) + { + sim->kill_part(r>>8); + parts[i].life -= 4*((sim->ptypes[r&0xFF].properties&TYPE_SOLID)?3:1); + if (parts[i].life<=0) + parts[i].life=1; + parts[i].temp+=10000; + } + else + { + if (sim->ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+10000.0f, MIN_TEMP, MAX_TEMP); + } + topv=sim->pv[y/CELL][x/CELL]/9+parts[r>>8].temp/900; + if (topv>40.0f) + topv=40.0f; + sim->pv[y/CELL][x/CELL]+=40.0f+topv; + parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); + return 0; +} +int graphics_DEST(GRAPHICS_FUNC_ARGS) +{ + if(cpart->life) + { + *pixel_mode |= PMODE_LFLARE; + } + else + { + *pixel_mode |= PMODE_SPARK; + } + return 0; +} diff --git a/src/elements/deut.cpp b/src/elements/deut.cpp new file mode 100644 index 0000000..03de364 --- /dev/null +++ b/src/elements/deut.cpp @@ -0,0 +1,89 @@ +#include "element.h" + +int update_DEUT(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, np; + int maxlife = ((10000/(parts[i].temp + 1))-1); + if ((10000%((int)parts[i].temp+1))>rand()%((int)parts[i].temp+1)) + maxlife ++; + if (parts[i].life < maxlife) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=maxlife)) + continue; + if ((r&0xFF)==PT_DEUT&&33>=rand()/(RAND_MAX/100)+1) + { + if ((parts[i].life + parts[r>>8].life + 1) <= maxlife) + { + parts[i].life += parts[r>>8].life + 1; + sim->kill_part(r>>8); + } + } + } + } + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create deut + { + np = sim->create_part(-1,x+rx,y+ry,PT_DEUT); + if (np<0) continue; + parts[i].life--; + parts[np].temp = parts[i].temp; + parts[np].life = 0; + } + } + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].life)&&parts[i].life>0)//diffusion + { + int temp = parts[i].life - parts[r>>8].life; + if (temp ==1) + { + parts[r>>8].life ++; + parts[i].life --; + } + else if (temp>0) + { + parts[r>>8].life += temp/2; + parts[i].life -= temp/2; + } + } + } + } + return 0; +} + +int graphics_DEUT(GRAPHICS_FUNC_ARGS) +{ + if(cpart->life>=700) + { + *colr += cpart->life*1; + *colg += cpart->life*2; + *colb += cpart->life*3; + *pixel_mode |= PMODE_GLOW; + } + else + { + *colr += cpart->life*1; + *colg += cpart->life*2; + *colb += cpart->life*3; + *pixel_mode |= PMODE_BLUR; + } + return 0; +} diff --git a/src/elements/dlay.cpp b/src/elements/dlay.cpp new file mode 100644 index 0000000..4643b30 --- /dev/null +++ b/src/elements/dlay.cpp @@ -0,0 +1,48 @@ +#include "element.h" + +int update_DLAY(UPDATE_FUNC_ARGS) { + int r, rx, ry, oldl; + oldl = parts[i].life; + if (parts[i].life>0) + parts[i].life--; + //if (parts[i].life==1) + //{ + if (parts[i].temp>=256.0+273.15) + parts[i].temp=256.0+273.15; + if (parts[i].temp<= -256.0+273.15) + parts[i].temp = -256.0+273.15; + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN) + { + parts[i].life = (int)(parts[i].temp-273.15); + } + else if ((r&0xFF)==PT_DLAY) + { + if(!parts[i].life && parts[r>>8].life) + { + parts[i].life = parts[r>>8].life; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[i].life--; + } + else if(parts[i].life && !parts[r>>8].life) + { + parts[r>>8].life = parts[i].life; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[r>>8].life++; + } + } + else if((r&0xFF)==PT_NSCN && oldl==1) + { + sim->create_part(-1, x+rx, y+ry, PT_SPRK); + } + } + //} + return 0; +} diff --git a/src/elements/dstw.cpp b/src/elements/dstw.cpp new file mode 100644 index 0000000..03ae7dd --- /dev/null +++ b/src/elements/dstw.cpp @@ -0,0 +1,39 @@ +#include "element.h" + +int update_DSTW(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) + { + sim->part_change_type(i,x,y,PT_SLTW); + sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); + } + if (((r&0xFF)==PT_WATR||(r&0xFF)==PT_SLTW) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_WATR); + } + if ((r&0xFF)==PT_SLTW && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_SLTW); + } + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>12.0f) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + } + return 0; +} diff --git a/src/elements/elec.cpp b/src/elements/elec.cpp new file mode 100644 index 0000000..6b06f8f --- /dev/null +++ b/src/elements/elec.cpp @@ -0,0 +1,101 @@ +#include "element.h" + +int update_ELEC(UPDATE_FUNC_ARGS) { + int r, rt, rx, ry, nb, rrx, rry; + float rr, rrr; + parts[i].pavg[0] = x; + parts[i].pavg[1] = y; + if(pmap[y][x]==PT_GLOW) + { + sim->part_change_type(i, x, y, PT_PHOT); + } + for (rx=-2; rx<=2; rx++) + for (ry=-2; ry<=2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)==PT_GLAS) + { + //fire_r[y/CELL][x/CELL] += rand()%200; //D: Doesn't work with OpenGL, also shouldn't be here TODO: FIX THIS SHIT + //fire_g[y/CELL][x/CELL] += rand()%200; + //fire_b[y/CELL][x/CELL] += rand()%200; + for (rrx=-1; rrx<=1; rrx++) + { + for (rry=-1; rry<=1; rry++) + { + if (x+rx+rrx>=0 && y+ry+rry>=0 && x+rx+rrxcreate_part(-1, x+rx+rrx, y+ry+rry, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 1; + parts[nb].life = 50; + parts[nb].temp = 400.0f; + parts[nb].vx = rand()%20-10; + parts[nb].vy = rand()%20-10; + } + } + } + } + sim->kill_part(i); + return 1; + } + if ((r&0xFF)==PT_LCRY) + { + parts[r>>8].tmp2 = 5+rand()%5; + } + if ((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_CBNW) + { + if(rand()%2) + { + sim->create_part(r>>8, x+rx, y+ry, PT_H2); + sim->part_change_type(i, x, y, PT_O2); + parts[i].life = 0; + parts[i].ctype = 0; + return 1; + } + else + { + sim->create_part(r>>8, x+rx, y+ry, PT_O2); + sim->part_change_type(i, x, y, PT_H2); + parts[i].life = 0; + parts[i].ctype = 0; + return 1; + } + } + if ((r&0xFF)==PT_NEUT) + { + sim->part_change_type(r>>8, x+rx, y+ry, PT_H2); + parts[r>>8].life = 0; + parts[r>>8].ctype = 0; + } + if ((r&0xFF)==PT_DEUT) + { + if(parts[r>>8].life < 6000) + parts[r>>8].life += 1; + parts[r>>8].temp = 0; + parts[i].temp = 0; + sim->kill_part(i); + return 1; + } + if (sim->ptypes[r&0xFF].properties & PROP_CONDUCTS) + { + sim->create_part(-1, x+rx, y+ry, PT_SPRK); + sim->kill_part(i); + return 1; + } + } + return 0; +} + +int graphics_ELEC(GRAPHICS_FUNC_ARGS) +{ + *firea = 70; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode |= FIRE_ADD; + return 0; +} diff --git a/src/elements/elementmisc.cpp b/src/elements/elementmisc.cpp new file mode 100644 index 0000000..a169e80 --- /dev/null +++ b/src/elements/elementmisc.cpp @@ -0,0 +1,12 @@ +#include "element.h" + +int update_MISC(UPDATE_FUNC_ARGS) { + /*int t = parts[i].type; + if (t==PT_LOVE) + ISLOVE=1; + else if (t==PT_LOLZ) + ISLOLZ=1; + else if (t==PT_GRAV) + ISGRAV=1;*/ + return 0; +} diff --git a/src/elements/emp.cpp b/src/elements/emp.cpp new file mode 100644 index 0000000..a187196 --- /dev/null +++ b/src/elements/emp.cpp @@ -0,0 +1,128 @@ +#include "element.h" + +int update_EMP(UPDATE_FUNC_ARGS) { + int r,rx,ry,ok=0,t,n,nx,ny; + if (parts[i].life) + return 0; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rx40) + // emp_decor=40; + for (r=0; r<=sim->parts_lastActiveIndex; r++) + { + t=parts[r].type; + rx=parts[r].x; + ry=parts[r].y; + if (t==PT_SPRK || (t==PT_SWCH && parts[r].life!=0 && parts[r].life!=10) || (t==PT_WIRE && parts[r].ctype>0)) + { + int is_elec=0; + if ((parts[r].ctype==PT_PSCN || parts[r].ctype==PT_NSCN || parts[r].ctype==PT_PTCT || + parts[r].ctype==PT_NTCT || parts[r].ctype==PT_INST || parts[r].ctype==PT_SWCH) || t==PT_WIRE || t==PT_SWCH) + { + is_elec=1; + if (sim->ptypes[parts[r].type].hconduct && rand()%100==0) + parts[r].temp = restrict_flt(parts[r].temp+3000.0f, MIN_TEMP, MAX_TEMP); + if (rand()%80==0) + sim->part_change_type(r, rx, ry, PT_BREC); + else if (rand()%120==0) + sim->part_change_type(r, rx, ry, PT_NTCT); + } + + for (nx=-2; nx<3; nx++) + for (ny=-2; ny<3; ny++) + if (rx+nx>=0 && ry+ny>=0 && rx+nx>8, rx+nx, ry+ny, PT_PLSM); + parts[n>>8].life=rand()%100+70; + parts[n>>8].temp+=3000; + }*/ + + //Some elements should only be affected by wire/swch, or by a spark on inst/semiconductor + //So not affected by spark on metl, watr etc + if (is_elec) + { + if (((n&0xFF)==PT_METL || (n&0xFF)==PT_BMTL) && rand()%280==0) + { + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+3000.0f, MIN_TEMP, MAX_TEMP); + } + if ((n&0xFF)==PT_BMTL && rand()%160==0) + { + sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BMTL);//TODO: Redundant, was this meant to be BRMT or something? + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); + } + if ((n&0xFF)==PT_METL && rand()%300==0) + { + sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BMTL); + } + if ((n&0xFF)==PT_WIFI && rand()%8==0) + { + //Randomise channel + parts[n>>8].temp = rand()%MAX_TEMP; + } + if ((n&0xFF)==PT_WIFI && rand()%16==0) + { + sim->create_part(n>>8, rx+nx, ry+ny, PT_BREC); + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); + } + } + if ((n&0xFF)==PT_SWCH && rand()%100==0) + { + sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BREC); + } + if ((n&0xFF)==PT_SWCH && rand()%100==0) + { + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+2000.0f, MIN_TEMP, MAX_TEMP); + } + if ((n&0xFF)==PT_ARAY && rand()%60==0) + { + sim->create_part(n>>8, rx+nx, ry+ny, PT_BREC); + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); + } + if (t==PT_DLAY && rand()%70==0) + { + //Randomise delay + parts[n>>8].temp = (rand()%256) + 273.15f; + } + } + } + } + return 0; +} +int graphics_EMP(GRAPHICS_FUNC_ARGS) +{ + if(cpart->life) + { + *colr = cpart->life*1.5; + *colg = cpart->life*1.5; + *colb = 200-(cpart->life); + if (*colr>255) + *colr = 255; + if (*colg>255) + *colg = 255; + if (*colb>255) + *colb = 255; + if (*colb<=0) + *colb = 0; + } + return 0; +} diff --git a/src/elements/figh.cpp b/src/elements/figh.cpp new file mode 100644 index 0000000..8b18871 --- /dev/null +++ b/src/elements/figh.cpp @@ -0,0 +1,105 @@ +#include "element.h" + +int update_FIGH(UPDATE_FUNC_ARGS) +{ + playerst* figh = &sim->fighters[(unsigned char)parts[i].tmp]; + + float tarx, tary; + + parts[i].tmp2 = 0; //0 - stay in place, 1 - seek a stick man + + //Set target cords + if (sim->player.spwn) + { + if (sim->player2.spwn) + if ((pow(sim->player.legs[2]-x, 2) + pow(sim->player.legs[3]-y, 2))<= + (pow(sim->player2.legs[2]-x, 2) + pow(sim->player2.legs[3]-y, 2))) + { + tarx = sim->player.legs[2]; + tary = sim->player.legs[3]; + } + else + { + tarx = sim->player2.legs[2]; + tary = sim->player2.legs[3]; + } + else + { + tarx = sim->player.legs[2]; + tary = sim->player.legs[3]; + } + + parts[i].tmp2 = 1; + } + else + if (sim->player2.spwn) + { + tarx = sim->player2.legs[2]; + tary = sim->player2.legs[3]; + + parts[i].tmp2 = 1; + } + + switch (parts[i].tmp2) + { + case 1: + if ((pow(tarx-x, 2) + pow(tary-y, 2))<600) + { + if (figh->elem == PT_LIGH || figh->elem == PT_NEUT + || (sim->ptypes[figh->elem].properties&(PROP_DEADLY|PROP_RADIOACTIVE)) + || sim->ptypes[figh->elem].heat>=323 || sim->ptypes[figh->elem].heat<=243) + figh->comm = (int)figh->comm | 0x08; + } + else + if (tarxeval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+6, NULL)) + figh->comm = 0x01; + else + figh->comm = 0x02; + + if (!sim->eval_move(PT_DUST, figh->legs[4]-4, figh->legs[5]-1, NULL) + || !sim->eval_move(PT_DUST, figh->legs[12]-4, figh->legs[13]-1, NULL) + || sim->eval_move(PT_DUST, 2*figh->legs[4]-figh->legs[6], figh->legs[5]+5, NULL)) + figh->comm = (int)figh->comm | 0x04; + } + else + { + if (!sim->eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+6, NULL)) + figh->comm = 0x02; + else + figh->comm = 0x01; + + if (!sim->eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL) + || !sim->eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL) + || sim->eval_move(PT_DUST, 2*figh->legs[12]-figh->legs[14], figh->legs[13]+5, NULL)) + figh->comm = (int)figh->comm | 0x04; + } + break; + default: + figh->comm = 0; + break; + } + + figh->pcomm = figh->comm; + + run_stickman(figh, UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + +int graphics_FIGH(GRAPHICS_FUNC_ARGS) +{ + playerst * cplayer;// = &sim->fighters[(unsigned char)cpart->tmp]; + *pixel_mode = PSPEC_STICKMAN; + /*if (cplayer->elemptypes[cplayer->elem].pcolors); + *colg = PIXG(sim->ptypes[cplayer->elem].pcolors); + *colb = PIXB(sim->ptypes[cplayer->elem].pcolors); + } + else*/ + { + *colr = *colg = *colb = 255; + } + return 1; +} diff --git a/src/elements/fire.cpp b/src/elements/fire.cpp new file mode 100644 index 0000000..1f9c0c2 --- /dev/null +++ b/src/elements/fire.cpp @@ -0,0 +1,19 @@ +#include "element.h" + +int graphics_FIRE(GRAPHICS_FUNC_ARGS) +{ + int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = (unsigned char)ren->flm_data[caddress]; + *colg = (unsigned char)ren->flm_data[caddress+1]; + *colb = (unsigned char)ren->flm_data[caddress+2]; + + *firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + return 0; +} diff --git a/src/elements/firw.cpp b/src/elements/firw.cpp new file mode 100644 index 0000000..74605b0 --- /dev/null +++ b/src/elements/firw.cpp @@ -0,0 +1,65 @@ +#include "element.h" + +int update_FIRW(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, np; + if (parts[i].tmp==0) { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + if (rt==PT_FIRE||rt==PT_PLSM||rt==PT_THDR) + { + parts[i].tmp = 1; + parts[i].life = rand()%50+60; + } + } + } + else if (parts[i].tmp==1) { + if (parts[i].life==0) { + parts[i].tmp=2; + } else { + float newVel = parts[i].life/25; + parts[i].flags = parts[i].flags&0xFFFFFFFE; + /* TODO: + if ((pmap[(int)(ly-newVel)][(int)lx]&0xFF)==PT_NONE && ly-newVel>0) { + parts[i].vy = -newVel; + ly-=newVel; + iy-=newVel; + }*/ + parts[i].vy = -newVel; + } + } + else if (parts[i].tmp==2) { + int col = rand()%200+4; + int tmul; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+rx, y+ry, PT_FIRW); + if (np>-1) + { + parts[np].vx = (rand()%3-1)*tmul; + parts[np].vy = (rand()%3-1)*tmul; + parts[np].tmp = col; + parts[np].life = rand()%100+100; + parts[np].temp = 6000.0f; + parts[np].dcolour = parts[i].dcolour; + } + } + sim->pv[y/CELL][x/CELL] += 20; + sim->kill_part(i); + return 1; + } else if (parts[i].tmp>=3) { + if (parts[i].life<=0) { + sim->kill_part(i); + return 1; + } + } + return 0; +} diff --git a/src/elements/fog.cpp b/src/elements/fog.cpp new file mode 100644 index 0000000..28952e9 --- /dev/null +++ b/src/elements/fog.cpp @@ -0,0 +1,22 @@ +#include "element.h" + +int update_FOG(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].state==ST_SOLID&&5>=rand()%50&&parts[i].life==0&&!((r&0xFF)==PT_CLNE||(r&0xFF)==PT_PCLN)) // TODO: should this also exclude BCLN? + { + sim->part_change_type(i,x,y,PT_RIME); + } + if ((r&0xFF)==PT_SPRK) + { + parts[i].life += rand()%20; + } + } + return 0; +} diff --git a/src/elements/frzw.cpp b/src/elements/frzw.cpp new file mode 100644 index 0000000..932bccb --- /dev/null +++ b/src/elements/frzw.cpp @@ -0,0 +1,30 @@ +#include "element.h" + +int update_FRZW(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%70) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FRZW); + } + } + if (parts[i].life==0&&13>rand()%2500) + { + sim->part_change_type(i,x,y,PT_ICEI); + parts[i].ctype=PT_FRZW; + parts[i].temp = restrict_flt(parts[i].temp-200.0f, MIN_TEMP, MAX_TEMP); + } + else if ((100-(parts[i].life))>rand()%50000) + { + sim->part_change_type(i,x,y,PT_ICEI); + parts[i].ctype=PT_FRZW; + parts[i].temp = restrict_flt(parts[i].temp-200.0f, MIN_TEMP, MAX_TEMP); + } + return 0; +} diff --git a/src/elements/frzz.cpp b/src/elements/frzz.cpp new file mode 100644 index 0000000..8e09c1d --- /dev/null +++ b/src/elements/frzz.cpp @@ -0,0 +1,25 @@ +#include "element.h" + +int update_FRZZ(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%100) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FRZW); + parts[r>>8].life = 100; + parts[i].type = PT_NONE; + } + + } + if (parts[i].type==PT_NONE) { + sim->kill_part(i); + return 1; + } + return 0; +} diff --git a/src/elements/fsep.cpp b/src/elements/fsep.cpp new file mode 100644 index 0000000..3db5ba5 --- /dev/null +++ b/src/elements/fsep.cpp @@ -0,0 +1,35 @@ +#include "element.h" + +int update_FSEP(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life<=0) { + r = sim->create_part(i, x, y, PT_PLSM); + if (r!=-1) + parts[r].life = 50; + return 1; + } else if (parts[i].life < 40) { + parts[i].life--; + if ((rand()%10)==0) { + r = sim->create_part(-1, (rx=x+rand()%3-1), (ry=y+rand()%3-1), PT_PLSM); + if (r!=-1) + parts[r].life = 50; + } + } + else { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=(273.15+400.0f))) && 1>(rand()%15)) + { + if (parts[i].life>40) { + parts[i].life = 39; + } + } + } + } + return 0; +} diff --git a/src/elements/fuse.cpp b/src/elements/fuse.cpp new file mode 100644 index 0000000..e1db1ff --- /dev/null +++ b/src/elements/fuse.cpp @@ -0,0 +1,41 @@ +#include "element.h" + +int update_FUSE(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life<=0) { + r = sim->create_part(i, x, y, PT_PLSM); + if (r!=-1) + parts[r].life = 50; + return 1; + } else if (parts[i].life < 40) { + parts[i].life--; + if ((rand()%100)==0) { + r = sim->create_part(-1, (rx=x+rand()%3-1), (ry=y+rand()%3-1), PT_PLSM); + if (r!=-1) + parts[r].life = 50; + } + } + if ((sim->pv[y/CELL][x/CELL] > 2.7f)&&parts[i].tmp>40) + parts[i].tmp=39; + else if (parts[i].tmp<40&&parts[i].tmp>0) + parts[i].tmp--; + else if (parts[i].tmp<=0) { + sim->create_part(i, x, y, PT_FSEP); + return 1; + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=(273.15+700.0f)) && 1>(rand()%20))) + { + if (parts[i].life>40) { + parts[i].life = 39; + } + } + } + return 0; +} diff --git a/src/elements/fwrk.cpp b/src/elements/fwrk.cpp new file mode 100644 index 0000000..d217ad9 --- /dev/null +++ b/src/elements/fwrk.cpp @@ -0,0 +1,53 @@ +#include "element.h" + +int update_FWRK(UPDATE_FUNC_ARGS) { + int r, rx, ry, np; + if ((parts[i].temp>400&&(9+parts[i].temp/40)>rand()%100000&&parts[i].life==0&&!pmap[y-1][x])||parts[i].ctype==PT_DUST) + { + np = sim->create_part(-1, x , y-1 , PT_FWRK); + if (np!=-1) + { + parts[np].vy = rand()%8-22; + parts[np].vx = rand()%20-rand()%20; + parts[np].life=rand()%15+25; + parts[np].dcolour = parts[i].dcolour; + sim->kill_part(i); + return 1; + } + } + if (parts[i].life>=45) + parts[i].life=0; + if ((parts[i].life<3&&parts[i].life>0)||(parts[i].vy>6&&parts[i].life>0)) + { + int q = (rand()%255+1); + int w = (rand()%255+1); + int e = (rand()%255+1); + for (rx=-1; rx<2; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=rand()%8) + { + if (!pmap[y+ry][x+rx]) + { + np = sim->create_part(-1, x+rx, y+ry , PT_DUST); + sim->pv[y/CELL][x/CELL] += 2.00f*CFDS; + if (np!=-1) + { + parts[np].vy = -(rand()%10-1); + parts[np].vx = ((rand()%2)*2-1)*rand()%(5+5)+(parts[i].vx)*2 ; + parts[np].life= rand()%37+18; + parts[np].tmp=q; + parts[np].flags=w; + parts[np].ctype=e; + parts[np].temp= rand()%20+6000; + parts[np].dcolour = parts[i].dcolour; + } + } + } + } + sim->kill_part(i); + return 1; + } + return 0; +} diff --git a/src/elements/gbmb.cpp b/src/elements/gbmb.cpp new file mode 100644 index 0000000..95afc4e --- /dev/null +++ b/src/elements/gbmb.cpp @@ -0,0 +1,26 @@ +#include "element.h" +int update_GBMB(UPDATE_FUNC_ARGS) { + int rx,ry,r; + if (parts[i].life<=0) + { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + { + r = pmap[y+ry][x+rx]; + if(!r) + continue; + if((r&0xFF)!=PT_BOMB && (r&0xFF)!=PT_GBMB && + (r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_DMND) + { + parts[i].life=60; + break; + } + } + } + if(parts[i].life>20) + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = 20; + if(parts[i].life<20 && parts[i].life>=1) + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = -80; + return 0; +} diff --git a/src/elements/glas.cpp b/src/elements/glas.cpp new file mode 100644 index 0000000..e8c0a6c --- /dev/null +++ b/src/elements/glas.cpp @@ -0,0 +1,11 @@ +#include "element.h" + +int update_GLAS(UPDATE_FUNC_ARGS) { + parts[i].pavg[0] = parts[i].pavg[1]; + parts[i].pavg[1] = sim->pv[y/CELL][x/CELL]; + if (parts[i].pavg[1]-parts[i].pavg[0] > 0.25f || parts[i].pavg[1]-parts[i].pavg[0] < -0.25f) + { + sim->part_change_type(i,x,y,PT_BGLA); + } + return 0; +} diff --git a/src/elements/glow.cpp b/src/elements/glow.cpp new file mode 100644 index 0000000..e83e2f4 --- /dev/null +++ b/src/elements/glow.cpp @@ -0,0 +1,28 @@ +#include "element.h" + +int update_GLOW(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%2000)) + { + parts[i].type = PT_NONE; + sim->part_change_type(r>>8,x+rx,y+ry,PT_DEUT); + parts[r>>8].life = 10; + } + } + parts[i].ctype = sim->pv[y/CELL][x/CELL]*16; + + parts[i].tmp = abs((int)((sim->vx[y/CELL][x/CELL]+sim->vy[y/CELL][x/CELL])*16.0f)) + abs((int)((parts[i].vx+parts[i].vy)*64.0f)); + //printf("%f %f\n", parts[i].vx, parts[i].vy); + if (parts[i].type==PT_NONE) { + sim->kill_part(i); + return 1; + } + return 0; +} diff --git a/src/elements/goo.cpp b/src/elements/goo.cpp new file mode 100644 index 0000000..c305182 --- /dev/null +++ b/src/elements/goo.cpp @@ -0,0 +1,13 @@ +#include "element.h" + +int update_GOO(UPDATE_FUNC_ARGS) { + if (!parts[i].life && sim->pv[y/CELL][x/CELL]>1.0f) + parts[i].life = rand()%80+300; + if (parts[i].life) + { + float advection = 0.1f; + parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; + parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; + } + return 0; +} diff --git a/src/elements/gpmp.cpp b/src/elements/gpmp.cpp new file mode 100644 index 0000000..dcde7a9 --- /dev/null +++ b/src/elements/gpmp.cpp @@ -0,0 +1,34 @@ +#include "element.h" + +int update_GPMP(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (parts[i].life==10) + { + if (parts[i].temp>=256.0+273.15) + parts[i].temp=256.0+273.15; + if (parts[i].temp<= -256.0+273.15) + parts[i].temp = -256.0+273.15; + + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = 0.2f*(parts[i].temp-273.15); + if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp-273.15)) + sim->gravmap[(y/CELL+1)*(XRES/CELL)+(x/CELL)] += 0.1f*((parts[i].temp-273.15)-sim->gravmap[(y/CELL+1)*(XRES/CELL)+(x/CELL)]); + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + return 0; +} diff --git a/src/elements/graphics_default.cpp b/src/elements/graphics_default.cpp new file mode 100644 index 0000000..1270977 --- /dev/null +++ b/src/elements/graphics_default.cpp @@ -0,0 +1,23 @@ +#include "element.h" + +int graphics_DEFAULT(GRAPHICS_FUNC_ARGS) +{ + int t = cpart->type; + //Property based defaults + if(ren->sim->ptypes[t].properties & PROP_RADIOACTIVE) *pixel_mode |= PMODE_GLOW; + if(ren->sim->ptypes[t].properties & TYPE_LIQUID) + { + *pixel_mode |= PMODE_BLUR; + } + if(ren->sim->ptypes[t].properties & TYPE_GAS) + { + *pixel_mode &= ~PMODE; + *pixel_mode |= FIRE_BLEND; + *firer = *colr/2; + *fireg = *colg/2; + *fireb = *colb/2; + *firea = 125; + *pixel_mode |= DECO_FIRE; + } + return 1; +} diff --git a/src/elements/h2.cpp b/src/elements/h2.cpp new file mode 100644 index 0000000..da39ad0 --- /dev/null +++ b/src/elements/h2.cpp @@ -0,0 +1,34 @@ +#include "element.h" + +int update_H2(UPDATE_FUNC_ARGS) +{ + int r,rx,ry,rt; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxpv[y/CELL][x/CELL] > 8.0f && rt == PT_DESL) // This will not work. DESL turns to fire above 5.0 pressure + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); + sim->part_change_type(i,x,y,PT_OIL); + } + if ((r&0xFF)==PT_FIRE) + { + parts[r>>8].temp=2473.15; + if(parts[r>>8].tmp&0x02) + parts[r>>8].temp=3473; + parts[r>>8].tmp |= 1; + } + if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM || (r&0xFF)==PT_LAVA) + { + sim->create_part(i,x,y,PT_FIRE); + parts[i].temp+=(rand()/(RAND_MAX/100)); + parts[i].tmp |= 1; + } + } + return 0; +} diff --git a/src/elements/hswc.cpp b/src/elements/hswc.cpp new file mode 100644 index 0000000..c727395 --- /dev/null +++ b/src/elements/hswc.cpp @@ -0,0 +1,26 @@ +#include "element.h" + +int update_HSWC(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (parts[i].life==10) + { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + return 0; +} diff --git a/src/elements/ice.cpp b/src/elements/ice.cpp new file mode 100644 index 0000000..aece17b --- /dev/null +++ b/src/elements/ice.cpp @@ -0,0 +1,23 @@ +#include "element.h" + +int update_ICEI(UPDATE_FUNC_ARGS) { //currently used for snow as well + int r, rx, ry; + if (parts[i].ctype==PT_FRZW)//get colder if it is from FRZW + { + parts[i].temp = restrict_flt(parts[i].temp-1.0f, MIN_TEMP, MAX_TEMP); + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_SLTW); + sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); + } + } + return 0; +} diff --git a/src/elements/ignt.cpp b/src/elements/ignt.cpp new file mode 100644 index 0000000..1d7ea64 --- /dev/null +++ b/src/elements/ignt.cpp @@ -0,0 +1,44 @@ +#include "element.h" + +int update_IGNT(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if(parts[i].tmp==0) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life==1)) + { + parts[i].tmp = 1; + } + } + } + else if(parts[i].life > 0) + { + if(rand()%3) + { + int nb = sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 1; + parts[nb].life = 30; + parts[nb].vx = rand()%20-10; + parts[nb].vy = rand()%20-10; + parts[nb].temp = restrict_flt(400.0f+parts[i].temp-273.15, MIN_TEMP, MAX_TEMP); + } + } + else + { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); + } + parts[i].life--; + } + return 0; +} diff --git a/src/elements/iron.cpp b/src/elements/iron.cpp new file mode 100644 index 0000000..b887cf8 --- /dev/null +++ b/src/elements/iron.cpp @@ -0,0 +1,25 @@ +#include "element.h" + +int update_IRON(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()/(RAND_MAX/700))) || + ((r&0xFF) == PT_SLTW && 30>(rand()/(RAND_MAX/2000))) || + ((r&0xFF) == PT_WATR && 5 >(rand()/(RAND_MAX/6000))) || + ((r&0xFF) == PT_O2 && 2 >(rand()/(RAND_MAX/500))) || + ((r&0xFF) == PT_LO2))&& + (!(parts[i].life)) + ) + { + sim->part_change_type(i,x,y,PT_BMTL); + parts[i].tmp=(rand()/(RAND_MAX/10))+20; + } + } + return 0; +} diff --git a/src/elements/isz.cpp b/src/elements/isz.cpp new file mode 100644 index 0000000..25446d2 --- /dev/null +++ b/src/elements/isz.cpp @@ -0,0 +1,14 @@ +#include "element.h" + +int update_ISZ(UPDATE_FUNC_ARGS) { // for both ISZS and ISOZ + float rr, rrr; + if (1>rand()%200 && ((int)(-4.0f*(sim->pv[y/CELL][x/CELL])))>(rand()%1000)) + { + sim->create_part(i, x, y, PT_PHOT); + rr = (rand()%228+128)/127.0f; + rrr = (rand()%360)*3.14159f/180.0f; + parts[i].vx = rr*cosf(rrr); + parts[i].vy = rr*sinf(rrr); + } + return 0; +} diff --git a/src/elements/lava.cpp b/src/elements/lava.cpp new file mode 100644 index 0000000..3d7827b --- /dev/null +++ b/src/elements/lava.cpp @@ -0,0 +1,19 @@ +#include "element.h" + +int graphics_LAVA(GRAPHICS_FUNC_ARGS) +{ + *colr = cpart->life * 2 + 0xE0; + *colg = cpart->life * 1 + 0x50; + *colb = cpart->life / 2 + 0x10; + if (*colr>255) *colr = 255; + if (*colg>192) *colg = 192; + if (*colb>128) *colb = 128; + *firea = 40; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + *pixel_mode |= FIRE_ADD; + *pixel_mode |= PMODE_BLUR; + //Returning 0 means dynamic, do not cache + return 0; +} diff --git a/src/elements/lcry.cpp b/src/elements/lcry.cpp new file mode 100644 index 0000000..546c2ca --- /dev/null +++ b/src/elements/lcry.cpp @@ -0,0 +1,61 @@ +#include "element.h" + +int update_LCRY(UPDATE_FUNC_ARGS) +{ + int r, rx, ry; + if(parts[i].tmp==1 || parts[i].tmp==0) + { + if(parts[i].tmp==1) + { + if(parts[i].life<=0) + parts[i].tmp = 0; + else + { + parts[i].life-=2; + if(parts[i].life < 0) + parts[i].life = 0; + parts[i].tmp2 = parts[i].life; + } + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].tmp == 3) + { + parts[r>>8].tmp = 1; + } + } + } + else if(parts[i].tmp==2 || parts[i].tmp==3) + { + if(parts[i].tmp==2) + { + if(parts[i].life>=10) + parts[i].tmp = 3; + else + { + parts[i].life+=2; + if(parts[i].life > 10) + parts[i].life = 10; + parts[i].tmp2 = parts[i].life; + } + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].tmp == 0) + { + parts[r>>8].tmp = 2; + } + } + } + return 0; +} diff --git a/src/elements/legacy.cpp b/src/elements/legacy.cpp new file mode 100644 index 0000000..dd58173 --- /dev/null +++ b/src/elements/legacy.cpp @@ -0,0 +1,120 @@ +#include "element.h" + +// Interactions which only occur when legacy_enable is on +int update_legacy_all(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt; + int t = parts[i].type; + if (!sim->legacy_enable) return 0; + if (t==PT_WTRV) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && + x+rx(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_WATR); + sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); + } + if (((r&0xFF)==PT_ICEI || (r&0xFF)==PT_SNOW) && 1>(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_WATR); + if (1>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); + } + } + } + else if (t==PT_WATR) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && + x+rx(rand()%10)) + { + sim->part_change_type(i,x,y,PT_WTRV); + } + } + } + else if (t==PT_SLTW) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && + x+rx(rand()%10)) + { + sim->part_change_type(i,x,y,PT_SALT); + sim->part_change_type(r>>8,x+rx,y+ry,PT_WTRV); + } + } + } + else if (t==PT_DSTW) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && + x+rx(rand()%10)) + { + sim->part_change_type(i,x,y,PT_WTRV); + } + } + } + else if (t==PT_ICEI) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_ICEI); + sim->part_change_type(r>>8,x+rx,y+ry,PT_ICEI); + } + } + } + else if (t==PT_SNOW) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_ICEI); + sim->part_change_type(r>>8,x+rx,y+ry,PT_ICEI); + } + if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW) && 15>(rand()%1000)) + sim->part_change_type(i,x,y,PT_WATR); + } + } + if (t==PT_WTRV && sim->pv[y/CELL][x/CELL]>4.0f) + sim->part_change_type(i,x,y,PT_DSTW); + if (t==PT_OIL && sim->pv[y/CELL][x/CELL]<-6.0f) + sim->part_change_type(i,x,y,PT_GAS); + if (t==PT_GAS && sim->pv[y/CELL][x/CELL]>6.0f) + sim->part_change_type(i,x,y,PT_OIL); + if (t==PT_DESL && sim->pv[y/CELL][x/CELL]>12.0f) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = rand()%50+120; + } + return 0; +} diff --git a/src/elements/ligh.cpp b/src/elements/ligh.cpp new file mode 100644 index 0000000..8108c4b --- /dev/null +++ b/src/elements/ligh.cpp @@ -0,0 +1,295 @@ +#include "element.h" + +#define LIGHTING_POWER 0.65 + +int LIGH_nearest_part(Simulation * sim, int ci, int max_d) +{ + int distance = (max_d!=-1)?max_d:MAX_DISTANCE; + int ndistance = 0; + int id = -1; + int i = 0; + int cx = (int)sim->parts[ci].x; + int cy = (int)sim->parts[ci].y; + for (i=0; i<=sim->parts_lastActiveIndex; i++) + { + if (sim->parts[i].type && sim->parts[i].life && i!=ci && sim->parts[i].type!=PT_LIGH && sim->parts[i].type!=PT_THDR && sim->parts[i].type!=PT_NEUT && sim->parts[i].type!=PT_PHOT) + { + ndistance = abs(cx-sim->parts[i].x)+abs(cy-sim->parts[i].y);// Faster but less accurate Older: sqrt(pow(cx-parts[i].x, 2)+pow(cy-parts[i].y, 2)); + if (ndistanceparts[i].x, y=sim->parts[i].y; + int r,rx,ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxpmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)==tp) + return r>>8; + } + return -1; +} + +void create_line_par(Simulation * sim, int x1, int y1, int x2, int y2, int c, int temp, int life, int tmp, int tmp2) +{ + int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; + float e, de; + if (c==WL_EHOLE || c==WL_ALLOWGAS || c==WL_ALLOWALLELEC || c==WL_ALLOWSOLID || c==WL_ALLOWAIR || c==WL_WALL || c==WL_DESTROYALL || c==WL_ALLOWLIQUID || c==WL_FAN || c==WL_STREAM || c==WL_DETECT || c==WL_EWALL || c==WL_WALLELEC) + return; // this function only for particles, no walls + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1create_part(-1, y, x, c); + else + p = sim->create_part(-1, x, y,c); + if (p!=-1) + { + sim->parts[p].life = life; + sim->parts[p].temp = temp; + sim->parts[p].tmp = tmp; + sim->parts[p].tmp2 = tmp2; + } + e += de; + if (e >= 0.5f) + { + y += sy; + e -= 1.0f; + } + } +} + +int update_LIGH(UPDATE_FUNC_ARGS) +{ + /* + * + * tmp2: + * -1 - part will be removed + * 0 - "branches" of the lightning + * 1 - bending + * 2 - branching + * 3 - transfer spark or make destruction + * 4 - first pixel + * + * life - "thickness" of lighting (but anyway one pixel) + * + * tmp - angle of lighting + * + */ + int r,rx,ry, multipler, powderful; + float angle, angle2=-1; + int pNear = 0; + powderful = powderful = parts[i].temp*(1+parts[i].life/40)*LIGHTING_POWER; + update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); + if (sim->aheat_enable) + { + sim->hv[y/CELL][x/CELL]+=powderful/50; + if (sim->hv[y/CELL][x/CELL]>MAX_TEMP) + sim->hv[y/CELL][x/CELL]=MAX_TEMP; + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxptypes[r&0xFF].properties&PROP_CONDUCTS) && parts[r>>8].life==0) + { + sim->create_part(r>>8,x+rx,y+ry,PT_SPRK); + } + sim->pv[y/CELL][x/CELL] += powderful/400; + if (sim->ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/1.5, MIN_TEMP, MAX_TEMP); + } + if ((r&0xFF)==PT_DEUT || (r&0xFF)==PT_PLUT) // start nuclear reactions + { + parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful, MIN_TEMP, MAX_TEMP); + sim->pv[y/CELL][x/CELL] +=powderful/35; + if (rand()%3==0) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_NEUT); + parts[r>>8].life = rand()%480+480; + parts[r>>8].vx=rand()%10-5; + parts[r>>8].vy=rand()%10-5; + } + } + if ((r&0xFF)==PT_COAL || (r&0xFF)==PT_BCOL) // ignite coal + { + if (parts[r>>8].life>100) { + parts[r>>8].life = 99; + } + } + if (sim->ptypes[r&0xFF].hconduct) + parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/10, MIN_TEMP, MAX_TEMP); + if (((r&0xFF)==PT_STKM && sim->player.elem!=PT_LIGH) || ((r&0xFF)==PT_STKM2 && sim->player2.elem!=PT_LIGH)) + { + parts[r>>8].life-=powderful/100; + } + } + } + if (parts[i].tmp2==3) + { + parts[i].tmp2=0; + return 1; + } + + if (parts[i].tmp2==-1) + { + sim->kill_part(i); + return 1; + } + if (parts[i].tmp2<=0 || parts[i].life<=1) + { + if (parts[i].tmp2>0) + parts[i].tmp2=0; + parts[i].tmp2--; + return 1; + } + if (parts[i].tmp2<=-2) + { + sim->kill_part(i); + return 1; + } + + angle2=-1; + + pNear = LIGH_nearest_part(sim, i, parts[i].life*2.5); + if (pNear!=-1) + { + int t=parts[pNear].type; + float n_angle; // angle to nearest part + rx=parts[pNear].x-x; + ry=parts[pNear].y-y; + if (rx*rx+ry*ry!=0) + n_angle = asin(-ry/sqrt(rx*rx+ry*ry)); + else + n_angle = 0; + if (n_angle<0) + n_angle+=M_PI*2; + if (parts[i].life<5 || fabs(n_angle-parts[i].tmp*M_PI/180)=360) + angle-=360; + if (parts[i].tmp2==2 && pNear==-1) + { + angle2=angle+100-rand()%200; + if (angle2<0) + angle2+=360; + if (angle2>=360) + angle-=360; + } + + multipler=parts[i].life*1.5+rand()%((int)(parts[i].life+1)); + rx=cos(angle*M_PI/180)*multipler; + ry=-sin(angle*M_PI/180)*multipler; + create_line_par(sim, x, y, x+rx, y+ry, PT_LIGH, parts[i].temp, parts[i].life, angle, 0); + + if (x+rx>=0 && y+ry>=0 && x+rx>8].tmp2=1+(rand()%200>parts[i].tmp2*parts[i].tmp2/10+60); + parts[r>>8].life=(int)(1.0*parts[i].life/1.5-rand()%2); + parts[r>>8].tmp=angle; + parts[r>>8].temp=parts[i].temp; + } + } + + if (angle2!=-1) + { + multipler=parts[i].life*1.5+rand()%((int)(parts[i].life+1)); + rx=cos(angle2*M_PI/180)*multipler; + ry=-sin(angle2*M_PI/180)*multipler; + create_line_par(sim, x, y, x+rx, y+ry, PT_LIGH, parts[i].temp, parts[i].life, angle2, 0); + + if (x+rx>=0 && y+ry>0 && x+rx>8].tmp2=1+(rand()%200>parts[i].tmp2*parts[i].tmp2/10+40); + parts[r>>8].life=(int)(1.0*parts[i].life/1.5-rand()%2); + parts[r>>8].tmp=angle; + parts[r>>8].temp=parts[i].temp; + } + } + } + + parts[i].tmp2=-1; + return 1; +} +int graphics_LIGH(GRAPHICS_FUNC_ARGS) +{ + *colr = 235; + *colg = 245; + *colb = 255; + *pixel_mode |= PMODE_GLOW; + return 1; +} diff --git a/src/elements/merc.cpp b/src/elements/merc.cpp new file mode 100644 index 0000000..2df113b --- /dev/null +++ b/src/elements/merc.cpp @@ -0,0 +1,70 @@ +#include "element.h" + +int update_MERC(UPDATE_FUNC_ARGS) { + int r, rx, ry, trade, np; + int maxtmp = ((10000/(parts[i].temp + 1))-1); + if ((10000%((int)parts[i].temp+1))>rand()%((int)parts[i].temp+1)) + maxtmp ++; + if (parts[i].tmp < maxtmp) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=maxtmp)) + continue; + if ((r&0xFF)==PT_MERC&&33>=rand()/(RAND_MAX/100)+1) + { + if ((parts[i].tmp + parts[r>>8].tmp + 1) <= maxtmp) + { + parts[i].tmp += parts[r>>8].tmp + 1; + sim->kill_part(r>>8); + } + } + } + } + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create deut + { + np = sim->create_part(-1,x+rx,y+ry,PT_MERC); + if (np<0) continue; + parts[i].tmp--; + parts[np].temp = parts[i].temp; + parts[np].tmp = 0; + } + } + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp)&&parts[i].tmp>0)//diffusion + { + int temp = parts[i].tmp - parts[r>>8].tmp; + if (temp ==1) + { + parts[r>>8].tmp ++; + parts[i].tmp --; + } + else if (temp>0) + { + parts[r>>8].tmp += temp/2; + parts[i].tmp -= temp/2; + } + } + } + } + return 0; +} diff --git a/src/elements/mort.cpp b/src/elements/mort.cpp new file mode 100644 index 0000000..bbb6264 --- /dev/null +++ b/src/elements/mort.cpp @@ -0,0 +1,6 @@ +#include "element.h" + +int update_MORT(UPDATE_FUNC_ARGS) { + sim->create_part(-1, x, y-1, PT_SMKE); + return 0; +} diff --git a/src/elements/nbhl.cpp b/src/elements/nbhl.cpp new file mode 100644 index 0000000..056313c --- /dev/null +++ b/src/elements/nbhl.cpp @@ -0,0 +1,6 @@ +#include "element.h" + +int update_NBHL(UPDATE_FUNC_ARGS) { + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] += 0.1f; + return 0; +} diff --git a/src/elements/neut.cpp b/src/elements/neut.cpp new file mode 100644 index 0000000..a48fc09 --- /dev/null +++ b/src/elements/neut.cpp @@ -0,0 +1,145 @@ +#include "element.h" + + +int create_n_parts(Simulation * sim, int n, int x, int y, float vx, float vy, float temp, int t)//testing a new deut create part +{ + int i, c; + n = (n/50); + if (n<1) { + n = 1; + } + if (n>340) { + n = 340; + } + if (x<0 || y<0 || x>=XRES || y>=YRES || t<0 || t>=PT_NUM) + return -1; + + for (c=0; cpfree == -1) + return -1; + i = sim->pfree; + sim->pfree = sim->parts[i].life; + if (i>sim->parts_lastActiveIndex) sim->parts_lastActiveIndex = i; + + sim->parts[i].x = (float)x; + sim->parts[i].y = (float)y; + sim->parts[i].type = t; + sim->parts[i].life = rand()%480+480; + sim->parts[i].vx = r*cosf(a); + sim->parts[i].vy = r*sinf(a); + sim->parts[i].ctype = 0; + sim->parts[i].temp = temp; + sim->parts[i].tmp = 0; + if (t!=PT_STKM&&t!=PT_STKM2 && t!=PT_PHOT && t!=PT_NEUT && !sim->pmap[y][x]) + sim->pmap[y][x] = t|(i<<8); + else if ((t==PT_PHOT||t==PT_NEUT) && !sim->photons[y][x]) + sim->photons[y][x] = t|(i<<8); + + sim->pv[y/CELL][x/CELL] += 6.0f * CFDS; + } + return 0; +} + +int update_NEUT(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt; + int pressureFactor = 3 + (int)sim->pv[y/CELL][x/CELL]; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) + { + if (33>rand()%100) + { + sim->create_part(r>>8, x+rx, y+ry, rand()%3 ? PT_LAVA : PT_URAN); + parts[r>>8].temp = MAX_TEMP; + if (parts[r>>8].type==PT_LAVA) { + parts[r>>8].tmp = 100; + parts[r>>8].ctype = PT_PLUT; + } + } + else + { + sim->create_part(r>>8, x+rx, y+ry, PT_NEUT); + parts[r>>8].vx = 0.25f*parts[r>>8].vx + parts[i].vx; + parts[r>>8].vy = 0.25f*parts[r>>8].vy + parts[i].vy; + } + sim->pv[y/CELL][x/CELL] += 10.0f * CFDS; //Used to be 2, some people said nukes weren't powerful enough + update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); + } +#ifdef SDEUT + else if ((r&0xFF)==PT_DEUT && (pressureFactor+1+(parts[r>>8].life/100))>(rand()%1000)) + { + create_n_parts(sim, parts[r>>8].life, x+rx, y+ry, parts[i].vx, parts[i].vy, restrict_flt(parts[r>>8].temp + parts[r>>8].life*500, MIN_TEMP, MAX_TEMP), PT_NEUT); + sim->kill_part(r>>8); + } +#else + else if ((r&0xFF)==PT_DEUT && (pressureFactor+1)>(rand()%1000)) + { + create_part(r>>8, x+rx, y+ry, PT_NEUT); + parts[r>>8].vx = 0.25f*parts[r>>8].vx + parts[i].vx; + parts[r>>8].vy = 0.25f*parts[r>>8].vy + parts[i].vy; + if (parts[r>>8].life>0) + { + parts[r>>8].life --; + parts[r>>8].temp = restrict_flt(parts[r>>8].temp + parts[r>>8].life*17, MIN_TEMP, MAX_TEMP); + pv[y/CELL][x/CELL] += 6.0f * CFDS; + } + else + sim.kill_part(r>>8); + } +#endif + else if ((r&0xFF)==PT_GUNP && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DUST); + else if ((r&0xFF)==PT_DYST && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_YEST); + else if ((r&0xFF)==PT_YEST) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DYST); + else if ((r&0xFF)==PT_WATR && 15>(rand()%100)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DSTW); + else if ((r&0xFF)==PT_PLEX && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_GOO); + else if ((r&0xFF)==PT_NITR && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DESL); + else if ((r&0xFF)==PT_PLNT && 5>(rand()%100)) + sim->create_part(r>>8, x+rx, y+ry, PT_WOOD); + else if ((r&0xFF)==PT_DESL && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_GAS); + else if ((r&0xFF)==PT_COAL && 5>(rand()%100)) + sim->create_part(r>>8, x+rx, y+ry, PT_WOOD); + else if ((r&0xFF)==PT_DUST && 5>(rand()%100)) + sim->part_change_type(r>>8, x+rx, y+ry, PT_FWRK); + else if ((r&0xFF)==PT_FWRK && 5>(rand()%100)) + parts[r>>8].ctype = PT_DUST; + else if ((r&0xFF)==PT_ACID && 5>(rand()%100)) + sim->create_part(r>>8, x+rx, y+ry, PT_ISOZ); + /*if(parts[r>>8].type>1 && parts[r>>8].type!=PT_NEUT && parts[r>>8].type-1!=PT_NEUT && parts[r>>8].type-1!=PT_STKM && + (ptypes[parts[r>>8].type-1].menusection==SC_LIQUID|| + ptypes[parts[r>>8].type-1].menusection==SC_EXPLOSIVE|| + ptypes[parts[r>>8].type-1].menusection==SC_GAS|| + ptypes[parts[r>>8].type-1].menusection==SC_POWDERS) && 15>(rand()%1000)) + parts[r>>8].type--;*/ + } + return 0; +} + +int graphics_NEUT(GRAPHICS_FUNC_ARGS) +{ + *firea = 120; + *firer = 10; + *fireg = 80; + *fireb = 120; + + *pixel_mode |= FIRE_ADD; + return 1; +} diff --git a/src/elements/newgraphics.cpp b/src/elements/newgraphics.cpp new file mode 100644 index 0000000..83da27b --- /dev/null +++ b/src/elements/newgraphics.cpp @@ -0,0 +1,541 @@ +#include "element.h" +#include "hmap.h" + +int graphics_QRTZ(GRAPHICS_FUNC_ARGS) //QRTZ and PQRT +{ + int t = cpart->type, z = cpart->tmp - 5;//speckles! + /*if (cpart->temp>(ptransitions[t].thv-800.0f))//hotglow for quartz + { + float frequency = 3.1415/(2*ptransitions[t].thv-(ptransitions[t].thv-800.0f)); + int q = (cpart->temp>ptransitions[t].thv)?ptransitions[t].thv-(ptransitions[t].thv-800.0f):cpart->temp-(ptransitions[t].thv-800.0f); + *colr += sin(frequency*q) * 226 + (z * 16); + *colg += sin(frequency*q*4.55 +3.14) * 34 + (z * 16); + *colb += sin(frequency*q*2.22 +3.14) * 64 + (z * 16); + } + else*/ + { + *colr += z * 16; + *colg += z * 16; + *colb += z * 16; + } + return 0; +} +int graphics_CLST(GRAPHICS_FUNC_ARGS) +{ + int z = cpart->tmp - 5;//speckles! + *colr += z * 16; + *colg += z * 16; + *colb += z * 16; + return 0; +} +int graphics_CBNW(GRAPHICS_FUNC_ARGS) +{ + int z = cpart->tmp2 - 20;//speckles! + *colr += z * 1; + *colg += z * 2; + *colb += z * 8; + return 0; +} +int graphics_SPNG(GRAPHICS_FUNC_ARGS) +{ + *colr -= cpart->life*15; + *colg -= cpart->life*15; + *colb -= cpart->life*15; + if (*colr<=50) + *colr = 50; + if (*colg<=50) + *colg = 50; + if (*colb<=20) + *colb = 20; + return 0; +} +int graphics_LIFE(GRAPHICS_FUNC_ARGS) +{ + pixel pc; + if (cpart->ctype==NGT_LOTE)//colors for life states + { + if (cpart->tmp==2) + pc = PIXRGB(255, 128, 0); + else if (cpart->tmp==1) + pc = PIXRGB(255, 255, 0); + else + pc = PIXRGB(255, 0, 0); + } + else if (cpart->ctype==NGT_FRG2)//colors for life states + { + if (cpart->tmp==2) + pc = PIXRGB(0, 100, 50); + else + pc = PIXRGB(0, 255, 90); + } + else if (cpart->ctype==NGT_STAR)//colors for life states + { + if (cpart->tmp==4) + pc = PIXRGB(0, 0, 128); + else if (cpart->tmp==3) + pc = PIXRGB(0, 0, 150); + else if (cpart->tmp==2) + pc = PIXRGB(0, 0, 190); + else if (cpart->tmp==1) + pc = PIXRGB(0, 0, 230); + else + pc = PIXRGB(0, 0, 70); + } + else if (cpart->ctype==NGT_FROG)//colors for life states + { + if (cpart->tmp==2) + pc = PIXRGB(0, 100, 0); + else + pc = PIXRGB(0, 255, 0); + } + else if (cpart->ctype==NGT_BRAN)//colors for life states + { + if (cpart->tmp==1) + pc = PIXRGB(150, 150, 0); + else + pc = PIXRGB(255, 255, 0); + } else { + //pc = gmenu[cpart->ctype].colour; + } + *colr = PIXR(pc); + *colg = PIXG(pc); + *colb = PIXB(pc); + return 0; +} +int graphics_DUST(GRAPHICS_FUNC_ARGS) +{ + if(cpart->life >= 1) + { + *colr = cpart->flags; + *colg = cpart->tmp; + *colb = cpart->ctype; + if (ren->decorations_enable && cpart->dcolour) + { + int a = (cpart->dcolour>>24)&0xFF; + *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; + *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; + *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; + } + *pixel_mode |= PMODE_GLOW; + /**firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb;*/ + } + return 0; +} +int graphics_GRAV(GRAPHICS_FUNC_ARGS) +{ + int GRAV_R, GRAV_B, GRAV_G, GRAV_R2, GRAV_B2, GRAV_G2; + *colr = 20; + *colg = 20; + *colb = 20; + if (cpart->vx>0) + { + *colr += (cpart->vx)*GRAV_R; + *colg += (cpart->vx)*GRAV_G; + *colb += (cpart->vx)*GRAV_B; + } + if (cpart->vy>0) + { + *colr += (cpart->vy)*GRAV_G; + *colg += (cpart->vy)*GRAV_B; + *colb += (cpart->vy)*GRAV_R; + + } + if (cpart->vx<0) + { + *colr -= (cpart->vx)*GRAV_B; + *colg -= (cpart->vx)*GRAV_R; + *colb -= (cpart->vx)*GRAV_G; + + } + if (cpart->vy<0) + { + *colr -= (cpart->vy)*GRAV_R2; + *colg -= (cpart->vy)*GRAV_G2; + *colb -= (cpart->vy)*GRAV_B2; + } + return 0; +} +int graphics_WIFI(GRAPHICS_FUNC_ARGS) +{ + float frequency = 0.0628; + int q = cpart->tmp; + *colr = sin(frequency*q + 0) * 127 + 128; + *colg = sin(frequency*q + 2) * 127 + 128; + *colb = sin(frequency*q + 4) * 127 + 128; + return 0; +} +int graphics_PRTI(GRAPHICS_FUNC_ARGS) +{ + *firea = 8; + *firer = 255; + *fireg = 0; + *fireb = 0; + *pixel_mode |= EFFECT_GRAVIN; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_ADD; + return 1; +} +int graphics_PRTO(GRAPHICS_FUNC_ARGS) +{ + *firea = 8; + *firer = 0; + *fireg = 0; + *fireb = 255; + *pixel_mode |= EFFECT_GRAVOUT; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_ADD; + return 1; +} +int graphics_BIZR(GRAPHICS_FUNC_ARGS) //BIZR, BIZRG, BIZRS +{ + int x = 0; + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + if(fabs(cpart->vx)+fabs(cpart->vy)>0) + { + *firea = 255; + *fireg = *colg/5 * fabs(cpart->vx)+fabs(cpart->vy); + *fireb = *colb/5 * fabs(cpart->vx)+fabs(cpart->vy); + *firer = *colr/5 * fabs(cpart->vx)+fabs(cpart->vy); + *pixel_mode |= FIRE_ADD; + } + return 0; +} +int graphics_INVS(GRAPHICS_FUNC_ARGS) +{ + //pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f + if(cpart->tmp) + { + *cola = 100; + *colr = 15; + *colg = 0; + *colb = 150; + *pixel_mode &= PMODE; + *pixel_mode |= PMODE_BLEND; + } + return 0; +} +int graphics_ACID(GRAPHICS_FUNC_ARGS) +{ + int s = cpart->life; + if (s>75) s = 75; //These two should not be here. + if (s<49) s = 49; + s = (s-49)*3; + if (s==0) s = 1; + *colr += s*4; + *colg += s*1; + *colb += s*2; + *pixel_mode |= PMODE_BLUR; + return 0; +} +int graphics_FILT(GRAPHICS_FUNC_ARGS) +{ + int x, temp_bin = (int)((cpart->temp-273.0f)*0.025f); + if (temp_bin < 0) temp_bin = 0; + if (temp_bin > 25) temp_bin = 25; + cpart->ctype = 0x1F << temp_bin; + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *cola = 127; + *colr *= x; + *colg *= x; + *colb *= x; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_BLEND; + return 0; +} +int graphics_BRAY(GRAPHICS_FUNC_ARGS) +{ + int x, trans = 255; + if(cpart->tmp==0) + { + trans = cpart->life * 7; + if (trans>255) trans = 255; + if (cpart->ctype) { + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + } + } + else if(cpart->tmp==1) + { + trans = cpart->life/4; + if (trans>255) trans = 255; + if (cpart->ctype) { + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + } + } + else if(cpart->tmp==2) + { + trans = cpart->life*100; + if (trans>255) trans = 255; + *colr = 255; + *colg = 150; + *colb = 50; + } + *cola = trans; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_BLEND; + return 0; +} +int graphics_SWCH(GRAPHICS_FUNC_ARGS) +{ + if(cpart->life >= 10) + { + *colr = 17; + *colg = 217; + *colb = 24; + *pixel_mode |= PMODE_GLOW; + } + return 0; +} +int graphics_THDR(GRAPHICS_FUNC_ARGS) +{ + *firea = 160; + *fireg = 192; + *fireb = 255; + *firer = 144; + *pixel_mode |= FIRE_ADD; + return 1; +} +int graphics_GLOW(GRAPHICS_FUNC_ARGS) +{ + *firer = restrict_flt(cpart->temp-(275.13f+32.0f), 0, 128)/50.0f; + *fireg = restrict_flt(cpart->ctype, 0, 128)/50.0f; + *fireb = restrict_flt(cpart->tmp, 0, 128)/50.0f; + + *colr = restrict_flt(64.0f+cpart->temp-(275.13f+32.0f), 0, 255); + *colg = restrict_flt(64.0f+cpart->ctype, 0, 255); + *colb = restrict_flt(64.0f+cpart->tmp, 0, 255); + + *pixel_mode |= FIRE_ADD; + return 0; +} +int graphics_LCRY(GRAPHICS_FUNC_ARGS) +{ + if(ren->decorations_enable && cpart->dcolour && cpart->dcolour&0xFF000000) + { + *colr = (cpart->dcolour>>16)&0xFF; + *colg = (cpart->dcolour>>8)&0xFF; + *colb = (cpart->dcolour)&0xFF; + + if(cpart->tmp2<10){ + *colr /= 10-cpart->tmp2; + *colg /= 10-cpart->tmp2; + *colb /= 10-cpart->tmp2; + } + + } + else + { + *colr = *colg = *colb = 0x50+((cpart->tmp2>10?10:cpart->tmp2)*10); + } + *pixel_mode |= NO_DECO; + return 0; + + /*int lifemod = ((cpart->tmp2>10?10:cpart->tmp2)*10); + *colr += lifemod; + *colg += lifemod; + *colb += lifemod; + if(decorations_enable && cpart->dcolour && cpart->dcolour&0xFF000000) + { + lifemod *= 2.5f; + if(lifemod < 40) + lifemod = 40; + *colr = (lifemod*((cpart->dcolour>>16)&0xFF) + (255-lifemod)**colr) >> 8; + *colg = (lifemod*((cpart->dcolour>>8)&0xFF) + (255-lifemod)**colg) >> 8; + *colb = (lifemod*((cpart->dcolour)&0xFF) + (255-lifemod)**colb) >> 8; + } + *pixel_mode |= NO_DECO; + return 0;*/ +} +int graphics_PCLN(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*10); + *colr += lifemod; + *colg += lifemod; + return 0; +} +int graphics_PBCN(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*10); + *colr += lifemod; + *colg += lifemod/2; + return 0; +} +int graphics_DLAY(GRAPHICS_FUNC_ARGS) +{ + int stage = (int)(((float)cpart->life/(cpart->temp-273.15))*100.0f); + *colr += stage; + *colg += stage; + *colb += stage; + return 0; +} +int graphics_HSWC(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*19); + *colr += lifemod; + return 0; +} +int graphics_PVOD(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*16); + *colr += lifemod; + return 0; +} +int graphics_STOR(GRAPHICS_FUNC_ARGS) +{ + if(cpart->tmp){ + *pixel_mode |= PMODE_GLOW; + *colr = 0x50; + *colg = 0xDF; + *colb = 0xDF; + } else { + *colr = 0x20; + *colg = 0xAF; + *colb = 0xAF; + } + return 0; +} +int graphics_PUMP(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*19); + *colb += lifemod; + return 0; +} +int graphics_GPMP(GRAPHICS_FUNC_ARGS) +{ + int lifemod = ((cpart->life>10?10:cpart->life)*19); + *colg += lifemod; + *colb += lifemod; + return 0; +} +int graphics_HFLM(GRAPHICS_FUNC_ARGS) +{ + int caddress = restrict_flt(restrict_flt((float)((int)(cpart->life/2)), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = (unsigned char)hflm_data[caddress]; + *colg = (unsigned char)hflm_data[caddress+1]; + *colb = (unsigned char)hflm_data[caddress+2]; + + *firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + return 0; +} +int graphics_FIRW(GRAPHICS_FUNC_ARGS) +{ + if(cpart->tmp>=3) + { + int caddress = restrict_flt(restrict_flt((float)(cpart->tmp-4), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = (unsigned char)firw_data[caddress]; + *colg = (unsigned char)firw_data[caddress+1]; + *colb = (unsigned char)firw_data[caddress+2]; + + if (ren->decorations_enable && cpart->dcolour) + { + int a = (cpart->dcolour>>24)&0xFF; + *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; + *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; + *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; + } + + *firea = cpart->life*4; + if(*firea > 240) + *firea = 240; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + } + else if(cpart->tmp > 0) + { + *pixel_mode |= PMODE_GLOW; + } + return 0; +} +int graphics_GBMB(GRAPHICS_FUNC_ARGS) +{ + if (cpart->life <= 0) { + *pixel_mode |= PMODE_FLARE; + } + else + { + *pixel_mode |= PMODE_SPARK; + } + return 0; +} +int graphics_COAL(GRAPHICS_FUNC_ARGS) //Both COAL and Broken Coal +{ + *colr += (cpart->tmp2-295.15f)/3; + + if (*colr > 170) + *colr = 170; + if (*colr < *colg) + *colr = *colg; + + *colg = *colb = *colr; + + if((cpart->temp-295.15f) > 300.0f-200.0f) + { + float frequency = 3.1415/(2*300.0f-(300.0f-200.0f)); + int q = ((cpart->temp-295.15f)>300.0f)?300.0f-(300.0f-200.0f):(cpart->temp-295.15f)-(300.0f-200.0f); + + *colr += sin(frequency*q) * 226; + *colg += sin(frequency*q*4.55 +3.14) * 34; + *colb += sin(frequency*q*2.22 +3.14) * 64; + } + return 0; +} + diff --git a/src/elements/none.cpp b/src/elements/none.cpp new file mode 100644 index 0000000..50f301f --- /dev/null +++ b/src/elements/none.cpp @@ -0,0 +1,6 @@ +#include "element.h" + +int update_(UPDATE_FUNC_ARGS) { + + return 0; +} diff --git a/src/elements/nptct.cpp b/src/elements/nptct.cpp new file mode 100644 index 0000000..2d68a9b --- /dev/null +++ b/src/elements/nptct.cpp @@ -0,0 +1,7 @@ +#include "element.h" + +int update_NPTCT(UPDATE_FUNC_ARGS) { + if (parts[i].temp>295.0f) + parts[i].temp -= 2.5f; + return 0; +} diff --git a/src/elements/nwhl.cpp b/src/elements/nwhl.cpp new file mode 100644 index 0000000..f53b657 --- /dev/null +++ b/src/elements/nwhl.cpp @@ -0,0 +1,6 @@ +#include "element.h" + +int update_NWHL(UPDATE_FUNC_ARGS) { + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] -= 0.1f; + return 0; +} diff --git a/src/elements/pbcn.cpp b/src/elements/pbcn.cpp new file mode 100644 index 0000000..7e99397 --- /dev/null +++ b/src/elements/pbcn.cpp @@ -0,0 +1,83 @@ +#include "element.h" + +int update_PBCN(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (!parts[i].tmp2 && sim->pv[y/CELL][x/CELL]>4.0f) + parts[i].tmp2 = rand()%40+80; + if (parts[i].tmp2) + { + float advection = 0.1f; + parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; + parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; + parts[i].tmp2--; + if(!parts[i].tmp2){ + sim->kill_part(i); + return 1; + } + } + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_SPRK && + (r&0xFF)!=PT_NSCN && (r&0xFF)!=PT_PSCN && + (r&0xFF)!=PT_STKM && (r&0xFF)!=PT_STKM2 && + (r&0xFF)!=PT_PBCN && (r&0xFF)>8].ctype; + } + } + if (parts[i].life==10) + { + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x+rx, y+ry, parts[i].ctype); + if (r!=-1) { + parts[r].vx = rx*3; + parts[r].vy = ry*3; + } + } + } + } + else if (parts[i].ctype==PT_LIFE) {//create life a different way + for (rx=-1; rx<2; rx++) { + for (ry=-1; ry<2; ry++) { + sim->create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); + } + } + } else { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + } + return 0; +} diff --git a/src/elements/pcln.cpp b/src/elements/pcln.cpp new file mode 100644 index 0000000..cd1ed4f --- /dev/null +++ b/src/elements/pcln.cpp @@ -0,0 +1,73 @@ +#include "element.h" + +int update_PCLN(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN) + parts[i].life = 10; + else if (parts[r>>8].ctype==PT_NSCN) + parts[i].life = 9; + } + if ((r&0xFF)==PT_PCLN) + { + if (parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[i].life==0&&parts[r>>8].life==10) + parts[i].life = 10; + } + } + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_SPRK && + (r&0xFF)!=PT_NSCN && (r&0xFF)!=PT_PSCN && + (r&0xFF)!=PT_STKM && (r&0xFF)!=PT_STKM2 && + (r&0xFF)!=PT_PBCN && (r&0xFF)>8].ctype; + } + } + if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x+rx, y+ry, parts[i].ctype); + if (r!=-1) { + parts[r].vx = rx*3; + parts[r].vy = ry*3; + } + } + } + } + else if (parts[i].ctype==PT_LIFE) {//create life a different way + for (rx=-1; rx<2; rx++) { + for (ry=-1; ry<2; ry++) { + sim->create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); + } + } + } else { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + } + return 0; +} diff --git a/src/elements/phot.cpp b/src/elements/phot.cpp new file mode 100644 index 0000000..3ed6b5d --- /dev/null +++ b/src/elements/phot.cpp @@ -0,0 +1,84 @@ +#include "element.h" + +int update_PHOT(UPDATE_FUNC_ARGS) { + int r, rt, rx, ry; + float rr, rrr; + parts[i].pavg[0] = x; + parts[i].pavg[1] = y; + if (!parts[i].ctype) { + sim->kill_part(i); + return 1; + } + if (1>rand()%10) update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rx(rand()%2000)) + { + parts[i].vx *= 0.90; + parts[i].vy *= 0.90; + sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); + rrr = (rand()%360)*3.14159f/180.0f; + rr = (rand()%128+128)/127.0f; + parts[r>>8].vx = rr*cosf(rrr); + parts[r>>8].vy = rr*sinf(rrr); + sim->pv[y/CELL][x/CELL] -= 15.0f * CFDS; + } + if ((r&0xFF)==PT_ISZS && 5>(rand()%2000)) + { + parts[i].vx *= 0.90; + parts[i].vy *= 0.90; + sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); + rr = (rand()%228+128)/127.0f; + rrr = (rand()%360)*3.14159f/180.0f; + parts[r>>8].vx = rr*cosf(rrr); + parts[r>>8].vy = rr*sinf(rrr); + sim->pv[y/CELL][x/CELL] -= 15.0f * CFDS; + } + } + r = pmap[y][x]; + if((r&0xFF) == PT_QRTZ && r)// && parts[i].ctype==0x3FFFFFFF) + { + float a = (rand()%360)*3.14159f/180.0f; + parts[i].vx = 3.0f*cosf(a); + parts[i].vy = 3.0f*sinf(a); + if(parts[i].ctype == 0x3FFFFFFF) + parts[i].ctype = 0x1F<<(rand()%26); + parts[i].life++; //Delay death + } + //r = pmap[y][x]; + //rt = r&0xFF; + /*if (rt==PT_CLNE || rt==PT_PCLN || rt==PT_BCLN || rt==PT_PBCN) { + if (!parts[r>>8].ctype) + parts[r>>8].ctype = PT_PHOT; + }*/ + + return 0; +} + +int graphics_PHOT(GRAPHICS_FUNC_ARGS) +{ + int x = 0; + *colr = *colg = *colb = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + + *firea = 100; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode |= FIRE_ADD; + return 0; +} diff --git a/src/elements/pipe.cpp b/src/elements/pipe.cpp new file mode 100644 index 0000000..08432f5 --- /dev/null +++ b/src/elements/pipe.cpp @@ -0,0 +1,332 @@ +#include "element.h" + +signed char pos_1_rx[] = {-1,-1,-1, 0, 0, 1, 1, 1}; +signed char pos_1_ry[] = {-1, 0, 1,-1, 1,-1, 0, 1}; + +void pushParticle(Simulation * sim, int i, int count, int original) +{ + int rndstore, rnd, rx, ry, r, x, y, np, q, notctype=(((sim->parts[i].ctype)%3)+2); + if ((sim->parts[i].tmp&0xFF) == 0 || count >= 2)//don't push if there is nothing there, max speed of 2 per frame + return; + x = (int)(sim->parts[i].x+0.5f); + y = (int)(sim->parts[i].y+0.5f); + if( !(sim->parts[i].tmp&0x200) ) + { + //normal random push + rndstore = rand(); + // RAND_MAX is at least 32767 on all platforms i.e. pow(8,5)-1 + // so can go 5 cycles without regenerating rndstore + for (q=0; q<3; q++)//try to push twice + { + rnd = rndstore&7; + rndstore = rndstore>>3; + rx = pos_1_rx[rnd]; + ry = pos_1_ry[rnd]; + if (x+rx>=0 && y+ry>=0 && x+rxpmap[y+ry][x+rx]; + if (!r) + continue; + else if ((r&0xFF)==PT_PIPE && sim->parts[r>>8].ctype!=notctype && (sim->parts[r>>8].tmp&0xFF)==0) + { + sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); + sim->parts[r>>8].temp = sim->parts[i].temp; + sim->parts[r>>8].flags = sim->parts[i].flags; + sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; + sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; + if (r>>8 > original) + sim->parts[r>>8].tmp2 = 1;//skip particle push, normalizes speed + sim->parts[i].tmp &= ~0xFF; + count++; + pushParticle(sim, r>>8,count,original); + } + } + } + } + else //predefined 1 pixel thick pipe movement + { + int coords = 7 - ((sim->parts[i].tmp>>10)&7); + r = sim->pmap[y+ pos_1_ry[coords]][x+ pos_1_rx[coords]]; + if (!r) + { + } + else if ((r&0xFF)==PT_PIPE && sim->parts[r>>8].ctype!=notctype && (sim->parts[r>>8].tmp&0xFF)==0) + { + sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); + sim->parts[r>>8].temp = sim->parts[i].temp; + sim->parts[r>>8].flags = sim->parts[i].flags; + sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; + sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; + if (r>>8 > original) + sim->parts[r>>8].tmp2 = 1;//skip particle push, normalizes speed + sim->parts[i].tmp &= ~0xFF; + count++; + pushParticle(sim, r>>8,count,original); + } + + + } + return; +} + +int update_PIPE(UPDATE_FUNC_ARGS) { + int r, rx, ry, np; + int rnd, rndstore; + if (parts[i].ctype>=2 && parts[i].ctype<=4) + { + if (parts[i].life==3) + { + int lastneighbor = -1; + int neighborcount = 0; + int count = 0; + // make automatic pipe pattern + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==1) + { + parts[r>>8].ctype = (((parts[i].ctype)%3)+2);//reverse + parts[r>>8].life = 6; + if ( parts[i].tmp&0x100)//is a single pixel pipe + { + parts[r>>8].tmp |= 0x200;//will transfer to a single pixel pipe + parts[r>>8].tmp |= count<<10;//coords of where it came from + } + neighborcount ++; + lastneighbor = r>>8; + } + else if ((r&0xFF)==PT_PIPE&&parts[r>>8].ctype!=(((parts[i].ctype-1)%3)+2)) + { + neighborcount ++; + lastneighbor = r>>8; + } + count++; + } + if(neighborcount == 1) + parts[lastneighbor].tmp |= 0x100; + } + else + { + if (parts[i].tmp2 == 1)//skip particle push to prevent particle number being higher causeing speed up + { + parts[i].tmp2 = 0 ; + } + else + { + pushParticle(sim, i,0,i); + } + + if (nt)//there is something besides PIPE around current particle + { + rndstore = rand(); + rnd = rndstore&7; + rndstore = rndstore>>3; + rx = pos_1_rx[rnd]; + ry = pos_1_ry[rnd]; + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (surround_space && !r && (parts[i].tmp&0xFF)!=0) //creating at end + { + np = sim->create_part(-1,x+rx,y+ry,parts[i].tmp&0xFF); + if (np!=-1) + { + parts[np].temp = parts[i].temp;//pipe saves temp and life now + parts[np].life = parts[i].flags; + parts[np].tmp = parts[i].pavg[0]; + parts[np].ctype = parts[i].pavg[1]; + parts[i].tmp &= ~0xFF; + } + } + //try eating particle at entrance + else if ((parts[i].tmp&0xFF) == 0 && (sim->ptypes[r&0xFF].falldown!= 0 || sim->ptypes[r&0xFF].state == ST_GAS)) + { + if ((r&0xFF)==PT_SOAP) + sim->detach(r>>8); + parts[i].tmp = (parts[i].tmp&~0xFF) | parts[r>>8].type; + parts[i].temp = parts[r>>8].temp; + parts[i].flags = parts[r>>8].life; + parts[i].pavg[0] = parts[r>>8].tmp; + parts[i].pavg[1] = parts[r>>8].ctype; + sim->kill_part(r>>8); + } + else if ((parts[i].tmp&0xFF) == 0 && (r&0xFF)==PT_STOR && parts[r>>8].tmp && (sim->ptypes[parts[r>>8].tmp].falldown!= 0 || sim->ptypes[parts[r>>8].tmp].state == ST_GAS)) + { + parts[i].tmp = parts[r>>8].tmp; + parts[i].temp = parts[r>>8].temp; + parts[i].flags = parts[r>>8].flags; + parts[i].pavg[0] = parts[r>>8].pavg[0]; + parts[i].pavg[1] = parts[r>>8].pavg[1]; + parts[r>>8].tmp = 0; + parts[r>>8].life = 0; + } + } + } + } + } + else if (!parts[i].ctype && parts[i].life<=10) + { + if (parts[i].temp<272.15)//manual pipe colors + { + if (parts[i].temp>173.25&&parts[i].temp<273.15) + { + parts[i].ctype = 2; + parts[i].life = 0; + } + if (parts[i].temp>73.25&&parts[i].temp<=173.15) + { + parts[i].ctype = 3; + parts[i].life = 0; + } + if (parts[i].temp>=0&&parts[i].temp<=73.15) + { + parts[i].ctype = 4; + parts[i].life = 0; + } + } + else + { + // make a border + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + { + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_BRCK);//BRCK border, people didn't like DMND + } + } + if (parts[i].life<=1) + parts[i].ctype = 1; + } + } + else if (parts[i].ctype==1)//wait for empty space before starting to generate automatic pipe pattern + { + if (!parts[i].life) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=0 && y+ry>0 && x+rxtmp&0xFF)>0 && (cpart->tmp&0xFF)tmp&0xFF; + tpart.temp = cpart->temp; + tpart.life = cpart->flags; + tpart.tmp = cpart->pavg[0]; + tpart.ctype = cpart->pavg[1]; + t = tpart.type; + if (ren->graphicscache[t].isready) + { + *pixel_mode = ren->graphicscache[t].pixel_mode; + *colr = ren->graphicscache[t].colr; + *colg = ren->graphicscache[t].colg; + *colb = ren->graphicscache[t].colb; + *firea = ren->graphicscache[t].firea; + *firer = ren->graphicscache[t].firer; + *fireg = ren->graphicscache[t].fireg; + *fireb = ren->graphicscache[t].fireb; + } + else + { + *colr = PIXR(ren->sim->ptypes[t].pcolors); + *colg = PIXR(ren->sim->ptypes[t].pcolors); + *colb = PIXR(ren->sim->ptypes[t].pcolors); + if (ren->sim->ptypes[t].graphics_func) + { + (*(ren->sim->ptypes[t].graphics_func))(ren, &tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); + } + else + { + graphics_DEFAULT(ren, &tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); + } + } + //*colr = PIXR(ptypes[cpart->tmp&0xFF].pcolors); + //*colg = PIXG(ptypes[cpart->tmp&0xFF].pcolors); + //*colb = PIXB(ptypes[cpart->tmp&0xFF].pcolors); + } + else + { + if (cpart->ctype==2) + { + *colr = 50; + *colg = 1; + *colb = 1; + } + else if (cpart->ctype==3) + { + *colr = 1; + *colg = 50; + *colb = 1; + } + else if (cpart->ctype==4) + { + *colr = 1; + *colg = 1; + *colb = 50; + } + else if (cpart->temp<272.15&&cpart->ctype!=1) + { + if (cpart->temp>173.25&&cpart->temp<273.15) + { + *colr = 50; + *colg = 1; + *colb = 1; + } + if (cpart->temp>73.25&&cpart->temp<=173.15) + { + *colr = 1; + *colg = 50; + *colb = 1; + } + if (cpart->temp>=0&&cpart->temp<=73.15) + { + *colr = 1; + *colg = 1; + *colb = 50; + } + } + } + return 0; +} diff --git a/src/elements/plnt.cpp b/src/elements/plnt.cpp new file mode 100644 index 0000000..a44c8c2 --- /dev/null +++ b/src/elements/plnt.cpp @@ -0,0 +1,55 @@ +#include "element.h" + +int update_PLNT(UPDATE_FUNC_ARGS) { + int r, rx, ry, np; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) + { + np = sim->create_part(r>>8,x+rx,y+ry,PT_PLNT); + if (np<0) continue; + parts[np].life = 0; + } + else if ((r&0xFF)==PT_LAVA && 1>(rand()%250)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + else if (((r&0xFF)==PT_SMKE || (r&0xFF)==PT_CO2) && (1>rand()%250)) + { + sim->kill_part(r>>8); + parts[i].life = rand()%60 + 60; + } + else if ((r&0xFF)==PT_WOOD && (1>rand()%20) && abs(rx+ry)<=2 && sim->VINE_MODE) + { + int nnx = rand()%3 -1; + int nny = rand()%3 -1; + if (x+rx+nnx>=0 && y+ry+nny>0 && x+rx+nnxcreate_part(-1,x+rx+nnx,y+ry+nny,PT_VINE); + if (np<0) continue; + parts[np].temp = parts[i].temp; + } + } + } + if (parts[i].life==2) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_O2); + } + parts[i].life = 0; + } + return 0; +} diff --git a/src/elements/plsm.cpp b/src/elements/plsm.cpp new file mode 100644 index 0000000..c6f7c20 --- /dev/null +++ b/src/elements/plsm.cpp @@ -0,0 +1,20 @@ +#include "element.h" +#include "hmap.h" + +int graphics_PLSM(GRAPHICS_FUNC_ARGS) +{ + int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = (unsigned char)ren->plasma_data[caddress]; + *colg = (unsigned char)ren->plasma_data[caddress+1]; + *colb = (unsigned char)ren->plasma_data[caddress+2]; + + *firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_GLOW | PMODE_ADD; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + return 0; +} diff --git a/src/elements/plut.cpp b/src/elements/plut.cpp new file mode 100644 index 0000000..3e2820d --- /dev/null +++ b/src/elements/plut.cpp @@ -0,0 +1,9 @@ +#include "element.h" + +int update_PLUT(UPDATE_FUNC_ARGS) { + if (1>rand()%100 && ((int)(5.0f*sim->pv[y/CELL][x/CELL]))>(rand()%1000)) + { + sim->create_part(i, x, y, PT_NEUT); + } + return 0; +} diff --git a/src/elements/prti.cpp b/src/elements/prti.cpp new file mode 100644 index 0000000..df212d4 --- /dev/null +++ b/src/elements/prti.cpp @@ -0,0 +1,79 @@ +#include "element.h" +/*these are the count values of where the particle gets stored, depending on where it came from + 0 1 2 + 7 . 3 + 6 5 4 + PRTO does (count+4)%8, so that it will come out at the opposite place to where it came in + PRTO does +/-1 to the count, so it doesn't jam as easily +*/ +int portal_rx[8] = {-1, 0, 1, 1, 1, 0,-1,-1}; +int portal_ry[8] = {-1,-1,-1, 0, 1, 1, 1, 0}; + +int update_PRTI(UPDATE_FUNC_ARGS) { + int r, nnx, rx, ry, fe = 0; + int count =0; + parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); + if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; + else if (parts[i].tmp<0) parts[i].tmp = 0; + for (count=0; count<8; count++) + { + rx = portal_rx[count]; + ry = portal_ry[count]; + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].falldown== 0 && sim->ptypes[r&0xFF].state != ST_GAS && (r&0xFF)!=PT_SPRK)) + { + r = sim->photons[y+ry][x+rx]; + if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (sim->ptypes[r&0xFF].falldown== 0 && sim->ptypes[r&0xFF].state != ST_GAS && (r&0xFF)!=PT_SPRK)) + continue; + } + + if ((r&0xFF) == PT_SOAP) + sim->detach(r>>8); + + for ( nnx=0; nnx<80; nnx++) + if (!sim->portalp[parts[i].tmp][count][nnx].type) + { + sim->portalp[parts[i].tmp][count][nnx] = parts[r>>8]; + if ((r&0xFF)==PT_SPRK) + sim->part_change_type(r>>8,x+rx,y+ry,parts[r>>8].ctype); + else + sim->kill_part(r>>8); + fe = 1; + break; + } + } + } + + + if (fe) { + int orbd[4] = {0, 0, 0, 0}; //Orbital distances + int orbl[4] = {0, 0, 0, 0}; //Orbital locations + if (!parts[i].life) parts[i].life = rand(); + if (!parts[i].ctype) parts[i].ctype = rand(); + sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); + for (r = 0; r < 4; r++) { + if (orbd[r]>1) { + orbd[r] -= 12; + if (orbd[r]<1) { + orbd[r] = (rand()%128)+128; + orbl[r] = rand()%255; + } else { + orbl[r] += 2; + orbl[r] = orbl[r]%255; + } + } else { + orbd[r] = (rand()%128)+128; + orbl[r] = rand()%255; + } + } + sim->orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); + } else { + parts[i].life = 0; + parts[i].ctype = 0; + } + return 0; +} diff --git a/src/elements/prto.cpp b/src/elements/prto.cpp new file mode 100644 index 0000000..ee61abf --- /dev/null +++ b/src/elements/prto.cpp @@ -0,0 +1,88 @@ +#include "element.h" +/*these are the count values of where the particle gets stored, depending on where it came from + 0 1 2 + 7 . 3 + 6 5 4 + PRTO does (count+4)%8, so that it will come out at the opposite place to where it came in + PRTO does +/-1 to the count, so it doesn't jam as easily +*/ +int update_PRTO(UPDATE_FUNC_ARGS) { + int r, nnx, rx, ry, np, fe = 0; + int count = 0; + parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); + if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; + else if (parts[i].tmp<0) parts[i].tmp = 0; + for (count=0; count<8; count++) + { + rx = sim->portal_rx[count]; + ry = sim->portal_ry[count]; + if (x+rx>=0 && y+ry>0 && x+rxportalp[parts[i].tmp][randomness][nnx].type==PT_SPRK)// TODO: make it look better, spark creation + { + sim->create_part(-1,x+1,y,PT_SPRK); + sim->create_part(-1,x+1,y+1,PT_SPRK); + sim->create_part(-1,x+1,y-1,PT_SPRK); + sim->create_part(-1,x,y-1,PT_SPRK); + sim->create_part(-1,x,y+1,PT_SPRK); + sim->create_part(-1,x-1,y+1,PT_SPRK); + sim->create_part(-1,x-1,y,PT_SPRK); + sim->create_part(-1,x-1,y-1,PT_SPRK); + sim->portalp[parts[i].tmp][randomness][nnx] = sim->emptyparticle; + break; + } + else if (sim->portalp[parts[i].tmp][randomness][nnx].type) + { + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM) + sim->player.spwn = 0; + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM2) + sim->player2.spwn = 0; + np = sim->create_part(-1, x+rx, y+ry, sim->portalp[parts[i].tmp][randomness][nnx].type); + if (np<0) continue; + parts[np] = sim->portalp[parts[i].tmp][randomness][nnx]; + parts[np].x = x+rx; + parts[np].y = y+ry; + sim->portalp[parts[i].tmp][randomness][nnx] = sim->emptyparticle; + break; + } + } + } + } + } + if (fe) { + int orbd[4] = {0, 0, 0, 0}; //Orbital distances + int orbl[4] = {0, 0, 0, 0}; //Orbital locations + if (!parts[i].life) parts[i].life = rand(); + if (!parts[i].ctype) parts[i].life = rand(); + sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); + for (r = 0; r < 4; r++) { + if (orbd[r]<254) { + orbd[r] += 16; + if (orbd[r]>254) { + orbd[r] = 0; + orbl[r] = rand()%255; + } + //orbl[r] += 1; + //orbl[r] = orbl[r]%255; + } else { + orbd[r] = 0; + orbl[r] = rand()%255; + } + } + sim->orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); + } else { + parts[i].life = 0; + parts[i].ctype = 0; + } + return 0; +} diff --git a/src/elements/pump.cpp b/src/elements/pump.cpp new file mode 100644 index 0000000..8a7254e --- /dev/null +++ b/src/elements/pump.cpp @@ -0,0 +1,41 @@ +#include "element.h" + +int update_PUMP(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (parts[i].life==10) + { + if (parts[i].temp>=256.0+273.15) + parts[i].temp=256.0+273.15; + if (parts[i].temp<= -256.0+273.15) + parts[i].temp = -256.0+273.15; + + if (sim->pv[y/CELL][x/CELL]<(parts[i].temp-273.15)) + sim->pv[y/CELL][x/CELL] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL][x/CELL]); + if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp-273.15)) + sim->pv[y/CELL+1][x/CELL] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL+1][x/CELL]); + if (x+CELLpv[y/CELL][x/CELL+1] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL][x/CELL+1]); + if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL+1][x/CELL+1]); + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + return 0; +} diff --git a/src/elements/pvod.cpp b/src/elements/pvod.cpp new file mode 100644 index 0000000..e645d0a --- /dev/null +++ b/src/elements/pvod.cpp @@ -0,0 +1,30 @@ +#include "element.h" + +int update_PVOD(UPDATE_FUNC_ARGS) { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN) + parts[i].life = 10; + else if (parts[r>>8].ctype==PT_NSCN) + parts[i].life = 9; + } + if ((r&0xFF)==PT_PVOD) + { + if (parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[i].life==0&&parts[r>>8].life==10) + parts[i].life = 10; + } + } + return 0; +} diff --git a/src/elements/pyro.cpp b/src/elements/pyro.cpp new file mode 100644 index 0000000..790e295 --- /dev/null +++ b/src/elements/pyro.cpp @@ -0,0 +1,129 @@ +#include "element.h" + +int update_PYRO(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, t = parts[i].type; + if (t==PT_PLSM&&parts[i].ctype == PT_NBLE&&parts[i].life <=1) + { + t = PT_NBLE; + sim->part_change_type(i,x,y,t); + parts[i].life = 0; + } + if(t==PT_FIRE && parts[i].life <=1) + { + if (parts[i].tmp==3){ + t = PT_DSTW; + sim->part_change_type(i,x,y,t); + parts[i].life = 0; + parts[i].ctype = PT_FIRE; + } + else if (parts[i].temp<625) + { + t = PT_SMKE; + sim->part_change_type(i,x,y,t); + parts[i].life = rand()%20+250; + } + } + if(t==PT_PLSM && parts[i].life <=1) + { + if (parts[i].tmp==3){ + t = PT_DSTW; + sim->part_change_type(i,x,y,t); + parts[i].life = 0; + parts[i].ctype = PT_FIRE; + } + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL] && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_STREAM) + continue; + rt = parts[r>>8].type; + if ((surround_space || sim->ptypes[rt].explosive) && + (t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL)) && + (t!=PT_PHOT || rt!=PT_INSL) && + (rt!=PT_SPNG || parts[r>>8].life==0) && + sim->ptypes[rt].flammable && (sim->ptypes[rt].flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000)) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); + parts[r>>8].temp = restrict_flt(sim->ptypes[PT_FIRE].heat + (sim->ptypes[rt].flammable/2), MIN_TEMP, MAX_TEMP); + parts[r>>8].life = rand()%80+180; + parts[r>>8].tmp = parts[r>>8].ctype = 0; + if (sim->ptypes[rt].explosive) + sim->pv[y/CELL][x/CELL] += 0.25f * CFDS; + } + } + if (sim->legacy_enable) update_legacy_PYRO(UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + +int update_legacy_PYRO(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, lpv, t = parts[i].type; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL] && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_STREAM) + continue; + rt = r&0xFF; + lpv = (int)sim->pv[(y+ry)/CELL][(x+rx)/CELL]; + if (lpv < 1) lpv = 1; + if (t!=PT_SPRK && sim->ptypes[rt].meltable && ((rt!=PT_RBDM && rt!=PT_LRBD) || t!=PT_SPRK) && ((t!=PT_FIRE&&t!=PT_PLSM) || (rt!=PT_METL && rt!=PT_IRON && rt!=PT_ETRD && rt!=PT_PSCN && rt!=PT_NSCN && rt!=PT_NTCT && rt!=PT_PTCT && rt!=PT_BMTL && rt!=PT_BRMT && rt!=PT_SALT && rt!=PT_INWR)) && + sim->ptypes[rt].meltable*lpv>(rand()%1000)) + { + if (t!=PT_LAVA || parts[i].life>0) + { + parts[r>>8].ctype = (rt==PT_BRMT)?PT_BMTL:parts[r>>8].type; + parts[r>>8].ctype = (parts[r>>8].ctype==PT_SAND)?PT_GLAS:parts[r>>8].ctype; + sim->part_change_type(r>>8,x+rx,y+ry,PT_LAVA); + parts[r>>8].life = rand()%120+240; + } + else + { + parts[i].life = 0; + t = parts[i].type = (parts[i].ctype)?parts[i].ctype:PT_STNE; + parts[i].ctype = PT_NONE;//rt; + sim->part_change_type(i,x,y,t); + return 1; + } + } + if (t!=PT_SPRK && (rt==PT_ICEI || rt==PT_SNOW)) + { + parts[r>>8].type = PT_WATR; + if (t==PT_FIRE) + { + sim->kill_part(i); + return 1; + } + if (t==PT_LAVA) + { + parts[i].life = 0; + t = parts[i].type = PT_STNE; + sim->part_change_type(i,x,y,t); + } + } + if (t!=PT_SPRK && (rt==PT_WATR || rt==PT_DSTW || rt==PT_SLTW)) + { + sim->kill_part(r>>8); + if (t==PT_FIRE) + { + sim->kill_part(i); + return 1; + } + if (t==PT_LAVA) + { + parts[i].life = 0; + t = parts[i].type = (parts[i].ctype)?parts[i].ctype:PT_STNE; + parts[i].ctype = PT_NONE; + sim->part_change_type(i,x,y,t); + } + } + } + return 0; +} diff --git a/src/elements/qrtz.cpp b/src/elements/qrtz.cpp new file mode 100644 index 0000000..7768765 --- /dev/null +++ b/src/elements/qrtz.cpp @@ -0,0 +1,94 @@ +#include "element.h" + +int update_QRTZ(UPDATE_FUNC_ARGS) { + int r, tmp, trade, rx, ry, np, t; + t = parts[i].type; + if (t == PT_QRTZ) + { + parts[i].pavg[0] = parts[i].pavg[1]; + parts[i].pavg[1] = sim->pv[y/CELL][x/CELL]; + if (parts[i].pavg[1]-parts[i].pavg[0] > 0.05*(parts[i].temp/3) || parts[i].pavg[1]-parts[i].pavg[0] < -0.05*(parts[i].temp/3)) + { + sim->part_change_type(i,x,y,PT_PQRT); + } + } + // absorb SLTW + if (parts[i].ctype!=-1) + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%2500)) + { + sim->kill_part(r>>8); + parts[i].ctype ++; + } + } + // grow if absorbed SLTW + if (parts[i].ctype>0) + { + for ( trade = 0; trade<5; trade ++) + { + rx = rand()%3-1; + ry = rand()%3-1; + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_QRTZ); + if (np>-1) + { + parts[np].tmp = parts[i].tmp; + parts[i].ctype--; + if (5>rand()%10) + { + parts[np].ctype=-1;//dead qrtz + } + else if (!parts[i].ctype && 1>rand()%15) + { + parts[i].ctype=-1; + } + + break; + } + } + } + } + } + // diffuse absorbed SLTW + if (parts[i].ctype>0) + { + for ( trade = 0; trade<9; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].ctype) && parts[r>>8].ctype>=0 )//diffusion + { + tmp = parts[i].ctype - parts[r>>8].ctype; + if (tmp ==1) + { + parts[r>>8].ctype ++; + parts[i].ctype --; + break; + } + if (tmp>0) + { + parts[r>>8].ctype += tmp/2; + parts[i].ctype -= tmp/2; + break; + } + } + } + } + } + return 0; +} diff --git a/src/elements/rime.cpp b/src/elements/rime.cpp new file mode 100644 index 0000000..617414b --- /dev/null +++ b/src/elements/rime.cpp @@ -0,0 +1,26 @@ +#include "element.h" + +int update_RIME(UPDATE_FUNC_ARGS) { + int r, rx, ry; + parts[i].vx = 0; + parts[i].vy = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxpart_change_type(i,x,y,PT_FOG); + parts[i].life = rand()%50 + 60; + } + else if ((r&0xFF)==PT_FOG&&parts[r>>8].life>0) + { + sim->part_change_type(i,x,y,PT_FOG); + parts[i].life = parts[r>>8].life; + } + } + return 0; +} diff --git a/src/elements/shld.cpp b/src/elements/shld.cpp new file mode 100644 index 0000000..cbe8306 --- /dev/null +++ b/src/elements/shld.cpp @@ -0,0 +1,162 @@ +#include "element.h" + +int update_SHLD1(UPDATE_FUNC_ARGS) { + int r, nnx, nny, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%200&&parts[i].life==0) + { + sim->part_change_type(i,x,y,PT_SHLD2); + parts[i].life = 7; + } + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + if (!pmap[y+ry+nny][x+rx+nnx]) + { + sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + //parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; + } + } + } + else if ((r&0xFF)==PT_SHLD3&&4>rand()%10) + { + sim->part_change_type(i,x,y,PT_SHLD2); + parts[i].life = 7; + } + } + return 0; +} + +int update_SHLD2(UPDATE_FUNC_ARGS) { + int r, nnx, nny, rx, ry, np; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx0) + sim->create_part(-1,x+rx,y+ry,PT_SHLD1); + if (!r) + continue; + else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) + { + if (25>rand()%200&&parts[i].life==0) + { + sim->part_change_type(i,x,y,PT_SHLD3); + parts[i].life = 7; + } + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + if (!pmap[y+ry+nny][x+rx+nnx]) + { + np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + } + } + } + else if ((r&0xFF)==PT_SHLD4&&4>rand()%10) + { + sim->part_change_type(i,x,y,PT_SHLD3); + parts[i].life = 7; + } + } + return 0; +} + +int update_SHLD3(UPDATE_FUNC_ARGS) { + int r, nnx, nny, rx, ry, np; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%2500) + { + np = sim->create_part(-1,x+rx,y+ry,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + sim->part_change_type(i,x,y,PT_SHLD2); + } + else + continue; + + } + if ((r&0xFF)==PT_SHLD1 && parts[i].life>3) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_SHLD2); + parts[r>>8].life=7; + } + else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) + { + if (18>rand()%3000&&parts[i].life==0) + { + sim->part_change_type(i,x,y,PT_SHLD4); + parts[i].life = 7; + } + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + + if (!pmap[y+ry+nny][x+rx+nnx]) + { + np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + } + } + } + } + return 0; +} + +int update_SHLD4(UPDATE_FUNC_ARGS) { + int r, nnx, nny, rx, ry, np; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%5500) + { + np = sim->create_part(-1,x+rx,y+ry,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + sim->part_change_type(i,x,y,PT_SHLD2); + } + else + continue; + + } + if ((r&0xFF)==PT_SHLD2 && parts[i].life>3) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_SHLD3); + parts[r>>8].life = 7; + } + else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + if (!pmap[y+ry+nny][x+rx+nnx]) + { + np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + } + } + } + return 0; +} diff --git a/src/elements/sing.cpp b/src/elements/sing.cpp new file mode 100644 index 0000000..fa6121c --- /dev/null +++ b/src/elements/sing.cpp @@ -0,0 +1,104 @@ +#include "element.h" + +int update_SING(UPDATE_FUNC_ARGS) { + int r, rx, ry, cry, crx, rad, nxi, nxj, nb, j, spawncount; + int singularity = -parts[i].life; + float angle, v; + + if (sim->pv[y/CELL][x/CELL]pv[y/CELL][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL]); + if (y+CELLpv[y/CELL+1][x/CELL]pv[y/CELL+1][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL+1][x/CELL]); + if (x+CELLpv[y/CELL][x/CELL+1] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL+1]); + if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.1f*(singularity-sim->pv[y/CELL+1][x/CELL+1]); + } + if (y+CELL>0 && sim->pv[y/CELL-1][x/CELL]pv[y/CELL-1][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL-1][x/CELL]); + if (x+CELL>0) + { + sim->pv[y/CELL][x/CELL-1] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL-1]); + if (y+CELL>0) + sim->pv[y/CELL-1][x/CELL-1] += 0.1f*(singularity-sim->pv[y/CELL-1][x/CELL-1]); + } + if (parts[i].life<1) { + //Pop! + for (rx=-2; rx<3; rx++) { + crx = (x/CELL)+rx; + for (ry=-2; ry<3; ry++) { + cry = (y/CELL)+ry; + if (cry > 0 && crx > 0 && crx < (XRES/CELL) && cry < (YRES/CELL)) { + sim->pv[cry][crx] += (float)parts[i].tmp; + } + } + } + spawncount = (parts[i].tmp>255)?255:parts[i].tmp; + if (spawncount>=1) + spawncount = spawncount/8; + spawncount = spawncount*spawncount*M_PI; + for (j=0;jcreate_part(-3, x, y, PT_PHOT); + break; + case 1: + nb = sim->create_part(-3, x, y, PT_NEUT); + break; + case 2: + nb = sim->create_part(-3, x, y, PT_ELEC); + break; + } + if (nb!=-1) { + parts[nb].life = (rand()%300); + parts[nb].temp = MAX_TEMP/2; + angle = rand()*2.0f*M_PI/RAND_MAX; + v = (float)(rand())*5.0f/RAND_MAX; + parts[nb].vx = v*cosf(angle); + parts[nb].vy = v*sinf(angle); + } + else if (sim->pfree==-1) + break;//if we've run out of particles, stop trying to create them - saves a lot of lag on "sing bomb" saves + } + sim->kill_part(i); + return 1; + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=rand()/(RAND_MAX/100)+1) + { + if ((r&0xFF)==PT_SING && parts[r>>8].life >10) + { + if (parts[i].life+parts[r>>8].life > 255) + continue; + parts[i].life += parts[r>>8].life; + } + else + { + if (parts[i].life+3 > 255) + { + if (parts[r>>8].type!=PT_SING && 1>rand()%100) + { + int np; + np = sim->create_part(r>>8,x+rx,y+ry,PT_SING); + parts[np].life = rand()%50+60; + } + continue; + } + parts[i].life += 3; + parts[i].tmp++; + } + parts[i].temp = restrict_flt(parts[r>>8].temp+parts[i].temp, MIN_TEMP, MAX_TEMP); + sim->kill_part(r>>8); + } + } + return 0; +} diff --git a/src/elements/sltw.cpp b/src/elements/sltw.cpp new file mode 100644 index 0000000..c965fd4 --- /dev/null +++ b/src/elements/sltw.cpp @@ -0,0 +1,30 @@ +#include "element.h" + +int update_SLTW(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%10000)) + sim->kill_part(r>>8); + if ((r&0xFF)==PT_PLNT&&5>(rand()%1000)) + sim->kill_part(r>>8); + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && !sim->legacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + } + return 0; +} diff --git a/src/elements/smke.cpp b/src/elements/smke.cpp new file mode 100644 index 0000000..d19bd0a --- /dev/null +++ b/src/elements/smke.cpp @@ -0,0 +1,18 @@ +#include "element.h" + +int graphics_SMKE(GRAPHICS_FUNC_ARGS) +{ + *colr = 55; + *colg = 55; + *colb = 55; + + *firea = 75; + *firer = 55; + *fireg = 55; + *fireb = 55; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_BLEND; + //Returning 1 means static, cache as we please + return 1; +} \ No newline at end of file diff --git a/src/elements/soap.cpp b/src/elements/soap.cpp new file mode 100644 index 0000000..0d31292 --- /dev/null +++ b/src/elements/soap.cpp @@ -0,0 +1,234 @@ +#include "element.h" + +int update_SOAP(UPDATE_FUNC_ARGS) +{ + int r, rx, ry, nr, ng, nb, na; + float tr, tg, tb, ta; + float blend; + + //0x01 - bubble on/off + //0x02 - first mate yes/no + //0x04 - "back" mate yes/no + + if ((parts[i].ctype&1) == 1) + { + if (parts[i].temp>0) + { + if (parts[i].life<=0) + { + if ((parts[i].ctype&6) != 6 && parts[i].ctype>1) + { + int target; + + target = i; + + while((parts[target].ctype&6) != 6 && parts[target].ctype>1) + { + if ((parts[target].ctype&2) == 2) + { + target = parts[target].tmp; + sim->detach(target); + } + + if ((parts[target].ctype&4) == 4) + { + target = parts[target].tmp2; + sim->detach(target); + } + } + } + + if ((parts[i].ctype&6) != 6) + parts[i].ctype = 0; + + if ((parts[i].ctype&6) == 6 && (parts[parts[i].tmp].ctype&6) == 6 && parts[parts[i].tmp].tmp == i) + sim->detach(i); + } + + parts[i].vy -= 0.1f; + + parts[i].vy *= 0.5f; + parts[i].vx *= 0.5f; + } + + if((parts[i].ctype&2) != 2) + { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type == PT_SOAP) && ((parts[r>>8].ctype&1) == 1) + && ((parts[r>>8].ctype&4) != 4)) + { + if ((parts[r>>8].ctype&2) == 2) + { + parts[i].tmp = r>>8; + parts[r>>8].tmp2 = i; + + parts[i].ctype |= 2; + parts[r>>8].ctype |= 4; + } + else + { + if ((parts[i].ctype&2) != 2) + { + parts[i].tmp = r>>8; + parts[r>>8].tmp2 = i; + + parts[i].ctype |= 2; + parts[r>>8].ctype |= 4; + } + } + } + } + } + else + { + if (parts[i].life<=0) + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL]) + continue; + + if (parts[i].temp>0) + { + if (sim->bmap[(y+ry)/CELL][(x+rx)/CELL] + || (r && sim->ptypes[r&0xFF].state != ST_GAS + && (r&0xFF) != PT_SOAP && (r&0xFF) != PT_GLAS) + || (parts[r>>8].ctype == 0 && (r&0xFF) == PT_SOAP + && (abs(parts[r>>8].vx)<2 || abs(parts[r>>8].vy)<2))) + { + sim->detach(i); + continue; + } + } + + if ((r&0xFF) == PT_SOAP && parts[r>>8].ctype == 1) + { + int buf; + + buf = parts[i].tmp; + + parts[i].tmp = r>>8; + parts[buf].tmp2 = r>>8; + parts[r>>8].tmp2 = i; + parts[r>>8].tmp = buf; + parts[r>>8].ctype = 7; + } + + if ((r&0xFF) == PT_SOAP && parts[r>>8].ctype == 7 && parts[i].tmp != r>>8 && parts[i].tmp2 != r>>8) + { + int buf; + + parts[parts[i].tmp].tmp2 = parts[r>>8].tmp2; + parts[parts[r>>8].tmp2].tmp = parts[i].tmp; + parts[r>>8].tmp2 = i; + parts[i].tmp = r>>8; + } + } + } + + if((parts[i].ctype&2) == 2) + { + float d, dx, dy; + + dx = parts[i].x - parts[parts[i].tmp].x; + dy = parts[i].y - parts[parts[i].tmp].y; + + d = 9/(pow(dx, 2)+pow(dy, 2)+9)-0.5; + + parts[parts[i].tmp].vx -= dx*d; + parts[parts[i].tmp].vy -= dy*d; + + parts[i].vx += dx*d; + parts[i].vy += dy*d; + + if (((parts[parts[i].tmp].ctype&2) == 2) && ((parts[parts[i].tmp].ctype&1) == 1) + && ((parts[parts[parts[i].tmp].tmp].ctype&2) == 2) && ((parts[parts[parts[i].tmp].tmp].ctype&1) == 1)) + { + int ii; + + ii = parts[parts[parts[i].tmp].tmp].tmp; + + dx = parts[ii].x - parts[parts[i].tmp].x; + dy = parts[ii].y - parts[parts[i].tmp].y; + + d = 81/(pow(dx, 2)+pow(dy, 2)+81)-0.5; + + parts[parts[i].tmp].vx -= dx*d*0.5f; + parts[parts[i].tmp].vy -= dy*d*0.5f; + + parts[ii].vx += dx*d*0.5f; + parts[ii].vy += dy*d*0.5f; + } + } + } + else + { + if (sim->pv[y/CELL][x/CELL]>0.5f || sim->pv[y/CELL][x/CELL]<(-0.5f)) + { + parts[i].ctype = 1; + parts[i].life = 10; + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].vx)/2; + ay = (parts[i].vy + parts[r>>8].vy)/2; + + parts[i].vx = ax; + parts[i].vy = ay; + parts[r>>8].vx = ax; + parts[r>>8].vy = ay; + } + } + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; + tg = (parts[r>>8].dcolour>>8)&0xFF; + tb = (parts[r>>8].dcolour)&0xFF; + ta = (parts[r>>8].dcolour>>24)&0xFF; + + nr = (tr*blend); + ng = (tg*blend); + nb = (tb*blend); + na = (ta*blend); + + parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; + } + } + + return 0; +} diff --git a/src/elements/spng.cpp b/src/elements/spng.cpp new file mode 100644 index 0000000..28b3e1b --- /dev/null +++ b/src/elements/spng.cpp @@ -0,0 +1,110 @@ +#include "element.h" + +int update_SPNG(UPDATE_FUNC_ARGS) { + int r, trade, rx, ry, tmp, np; + if (sim->pv[y/CELL][x/CELL]<=3 && sim->pv[y/CELL][x/CELL]>=-3&&parts[i].temp<=374.0f) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=rand()/(RAND_MAX/100)+1) + { + parts[i].life++; + sim->kill_part(r>>8); + } + } + } + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create water + { + np = sim->create_part(-1,x+rx,y+ry,PT_WATR); + if (np>-1) parts[i].life--; + } + } + for ( trade = 0; trade<9; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].life)&&parts[i].life>0)//diffusion + { + tmp = parts[i].life - parts[r>>8].life; + if (tmp ==1) + { + parts[r>>8].life ++; + parts[i].life --; + trade = 9; + } + else if (tmp>0) + { + parts[r>>8].life += tmp/2; + parts[i].life -= tmp/2; + trade = 9; + } + } + } + } + tmp = 0; + if (parts[i].life>0) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life>60) + parts[r>>8].life -= parts[r>>8].life/60; + else if (parts[r>>8].life>2) + parts[r>>8].life--; + } + } + } + if (tmp && parts[i].life>3) + parts[i].life -= parts[i].life/3; + if (tmp>1) + tmp = tmp/2; + if (tmp || parts[i].temp>=374) + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create steam + { + np = sim->create_part(-1,x+rx,y+ry,PT_WTRV); + if (np>-1) + { + parts[np].temp = parts[i].temp; + tmp--; + parts[i].life--; + parts[i].temp -= 20.0f; + } + } + } + if (tmp>0) + { + if (parts[i].life>tmp) + parts[i].life -= tmp; + else + parts[i].life = 0; + } + return 0; +} diff --git a/src/elements/sprk.cpp b/src/elements/sprk.cpp new file mode 100644 index 0000000..244e831 --- /dev/null +++ b/src/elements/sprk.cpp @@ -0,0 +1,230 @@ +#include "element.h" + +int update_SPRK(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, conduct_sprk, nearp, pavg, ct = parts[i].ctype; + update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); + + if (parts[i].life<=0) + { + if (ct==PT_WATR||ct==PT_SLTW||ct==PT_PSCN||ct==PT_NSCN||ct==PT_ETRD||ct==PT_INWR) + parts[i].temp = R_TEMP + 273.15f; + if (ct<=0 || ct>=PT_NUM) + ct = PT_METL; + sim->part_change_type(i,x,y,ct); + parts[i].ctype = PT_NONE; + parts[i].life = 4; + if (ct == PT_WATR) + parts[i].life = 64; + if (ct == PT_SLTW) + parts[i].life = 54; + if (ct == PT_SWCH) + parts[i].life = 14; + return 0; + } + if (ct==PT_SPRK) + { + sim->kill_part(i); + return 1; + } + else if (ct==PT_NTCT || ct==PT_PTCT) + { + update_NPTCT(UPDATE_FUNC_SUBCALL_ARGS); + } + else if (ct==PT_ETRD&&parts[i].life==1) + { + nearp = sim->nearest_part(i, PT_ETRD, -1); + if (nearp!=-1 && sim->parts_avg(i, nearp, PT_INSL)!=PT_INSL) + { + sim->create_line(x, y, (int)(parts[nearp].x+0.5f), (int)(parts[nearp].y+0.5f), 0, 0, PT_PLSM, 0); + sim->part_change_type(i,x,y,ct); + ct = parts[i].ctype = PT_NONE; + parts[i].life = 20; + sim->part_change_type(nearp,(int)(parts[nearp].x+0.5f),(int)(parts[nearp].y+0.5f),PT_SPRK); + parts[nearp].life = 9; + parts[nearp].ctype = PT_ETRD; + } + } + else if (ct==PT_NBLE&&parts[i].life<=1) + { + parts[i].life = rand()%150+50; + sim->part_change_type(i,x,y,PT_PLSM); + parts[i].ctype = PT_NBLE; + parts[i].temp = 3500; + sim->pv[y/CELL][x/CELL] += 1; + } + else if (ct==PT_TESC) // tesla coil code + { + if (parts[i].tmp>300) + parts[i].tmp=300; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+rx*2, y+ry*2, PT_LIGH); + if (p!=-1) + { + if(parts[i].tmp<=4) //Prevent Arithmetic errors with zero values + continue; + parts[p].life=rand()%(2+parts[i].tmp/15)+parts[i].tmp/7; + if (parts[i].life>60) + parts[i].life=60; + parts[p].temp=parts[p].life*parts[i].tmp/2.5; + parts[p].tmp2=1; + parts[p].tmp=acos(1.0*rx/sqrt(rx*rx+ry*ry))/M_PI*360; + parts[i].temp-=parts[i].tmp*2+parts[i].temp/5; // slight self-cooling + if (fabs(sim->pv[y/CELL][x/CELL])!=0.0f) + { + if (fabs(sim->pv[y/CELL][x/CELL])<=0.5f) + sim->pv[y/CELL][x/CELL]=0; + else + sim->pv[y/CELL][x/CELL]-=(sim->pv[y/CELL][x/CELL]>0)?0.5:-0.5; + } + } + } + } + } + else if (ct==PT_IRON) { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()/(RAND_MAX/1000))) || + ((r&0xFF) == PT_SLTW && 30>(rand()/(RAND_MAX/1000))) || + ((r&0xFF) == PT_WATR && 30>(rand()/(RAND_MAX/1000)))) + { + if (rand()part_change_type(r>>8,x+rx,y+ry,PT_O2); + else + sim->part_change_type(r>>8,x+rx,y+ry,PT_H2); + } + } + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + conduct_sprk = 1; + + + pavg = sim->parts_avg(r>>8, i,PT_INSL); + if ((rt==PT_SWCH||(rt==PT_SPRK&&parts[r>>8].ctype==PT_SWCH)) && pavg!=PT_INSL) // make sparked SWCH turn off correctly + { + if (rt==PT_SWCH&&ct==PT_PSCN&&parts[r>>8].life<10) { + parts[r>>8].life = 10; + } + if (ct==PT_NSCN) { + sim->part_change_type(r>>8,x+rx,y+ry,PT_SWCH); + parts[r>>8].ctype = PT_NONE; + parts[r>>8].life = 9; + } + } + else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_PUMP||rt==PT_GPMP||rt==PT_HSWC||rt==PT_PBCN)) // PROP_PTOGGLE, Maybe? We seem to use 2 different methods for handling actived elements, this one seems better. Yes, use this one for new elements, PCLN is different for compatibility with existing saves + { + if (ct==PT_PSCN) parts[r>>8].life = 10; + else if (ct==PT_NSCN && parts[r>>8].life>=10) parts[r>>8].life = 9; + } + else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_LCRY&&abs(rx)<2&&abs(ry)<2)) + { + if (ct==PT_PSCN && parts[r>>8].tmp == 0) parts[r>>8].tmp = 2; + else if (ct==PT_NSCN && parts[r>>8].tmp == 3) parts[r>>8].tmp = 1; + } + + + // ct = spark from material, rt = spark to material. Make conduct_sprk = 0 if conduction not allowed + + if (pavg == PT_INSL) conduct_sprk = 0; + if (!((sim->ptypes[rt].properties&PROP_CONDUCTS)||rt==PT_INST||rt==PT_QRTZ)) conduct_sprk = 0; + if (abs(rx)+abs(ry)>=4 &&ct!=PT_SWCH&&rt!=PT_SWCH) + conduct_sprk = 0; + + + if (ct==PT_METL && (rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR||(rt==PT_SPRK&&(parts[r>>8].ctype==PT_NTCT||parts[r>>8].ctype==PT_PTCT))) && pavg!=PT_INSL) + { + parts[r>>8].temp = 473.0f; + if (rt==PT_NTCT||rt==PT_PTCT) + conduct_sprk = 0; + } + if (ct==PT_NTCT && !(rt==PT_PSCN || rt==PT_NTCT || (rt==PT_NSCN&&parts[i].temp>373.0f))) + conduct_sprk = 0; + if (ct==PT_PTCT && !(rt==PT_PSCN || rt==PT_PTCT || (rt==PT_NSCN&&parts[i].temp<373.0f))) + conduct_sprk = 0; + if (ct==PT_INWR && !(rt==PT_NSCN || rt==PT_INWR || rt==PT_PSCN)) + conduct_sprk = 0; + if (ct==PT_NSCN && rt==PT_PSCN) + conduct_sprk = 0; + if (ct==PT_ETRD && !(rt==PT_METL||rt==PT_ETRD||rt==PT_BMTL||rt==PT_BRMT||rt==PT_LRBD||rt==PT_RBDM||rt==PT_PSCN||rt==PT_NSCN)) + conduct_sprk = 0; + if (ct==PT_INST&&rt!=PT_NSCN) conduct_sprk = 0; + if (ct==PT_SWCH && (rt==PT_PSCN||rt==PT_NSCN||rt==PT_WATR||rt==PT_SLTW||rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR)) + conduct_sprk = 0; + if (rt==PT_QRTZ && !((ct==PT_NSCN||ct==PT_METL||ct==PT_PSCN||ct==PT_QRTZ) && (parts[r>>8].temp<173.15||sim->pv[(y+ry)/CELL][(x+rx)/CELL]>8))) + conduct_sprk = 0; + if (rt==PT_NTCT && !(ct==PT_NSCN || ct==PT_NTCT || (ct==PT_PSCN&&parts[r>>8].temp>373.0f))) + conduct_sprk = 0; + if (rt==PT_PTCT && !(ct==PT_NSCN || ct==PT_PTCT || (ct==PT_PSCN&&parts[r>>8].temp<373.0f))) + conduct_sprk = 0; + if (rt==PT_INWR && !(ct==PT_NSCN || ct==PT_INWR || ct==PT_PSCN)) + conduct_sprk = 0; + if (rt==PT_INST&&ct!=PT_PSCN) + conduct_sprk = 0; + + if (conduct_sprk) { + if (rt==PT_WATR||rt==PT_SLTW) { + if (parts[r>>8].life==0 && (parts[i].life<2 || ((r>>8)part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + if (rt==PT_WATR) parts[r>>8].life = 6; + else parts[r>>8].life = 5; + parts[r>>8].ctype = rt; + } + } + else if (rt==PT_INST) { + if (parts[i].life>=3&&parts[r>>8].life==0) + { + sim->flood_parts(x+rx,y+ry,PT_SPRK,PT_INST,-1, 0);//spark the wire + } + } + else if (parts[r>>8].life==0 && (parts[i].life<3 || ((r>>8)>8].life = 4; + parts[r>>8].ctype = rt; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + if (parts[r>>8].temp+10.0f<673.0f&&!sim->legacy_enable&&(rt==PT_METL||rt==PT_BMTL||rt==PT_BRMT||rt==PT_PSCN||rt==PT_NSCN||rt==PT_ETRD||rt==PT_NBLE||rt==PT_IRON)) + parts[r>>8].temp = parts[r>>8].temp+10.0f; + } + else if (ct==PT_ETRD && parts[i].life==5) + { + sim->part_change_type(i,x,y,ct); + parts[i].ctype = PT_NONE; + parts[i].life = 20; + parts[r>>8].life = 4; + parts[r>>8].ctype = rt; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + } + } + } + return 0; +} + +int graphics_SPRK(GRAPHICS_FUNC_ARGS) +{ + *firea = 80; + + *firer = *colr = 170; + *fireg = *colg = 200; + *fireb = *colb = 220; + //*pixel_mode |= FIRE_ADD; + *pixel_mode |= FIRE_ADD; + return 1; +} diff --git a/src/elements/stkm.cpp b/src/elements/stkm.cpp new file mode 100644 index 0000000..322eba1 --- /dev/null +++ b/src/elements/stkm.cpp @@ -0,0 +1,488 @@ +#include "element.h" + +int update_SPAWN(UPDATE_FUNC_ARGS) { + if (!sim->player.spwn) + sim->create_part(-1, x, y, PT_STKM); + + return 0; +} + +int update_STKM(UPDATE_FUNC_ARGS) +{ + run_stickman(&sim->player, UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + +int graphics_STKM(GRAPHICS_FUNC_ARGS) +{ + /**pixel_mode = PSPEC_STICKMAN; + if ((int)sim->player.elemplayer.elem].pcolors); + *colg = PIXG(ptypes[sim->player.elem].pcolors); + *colb = PIXB(ptypes[sim->player.elem].pcolors); + } + else*/ + { + *colr = *colg = *colb = 255; + } + return 1; +} + +int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { + int r, rx, ry; + float pp, d; + float dt = 0.9;///(FPSB*FPSB); //Delta time in square + float gvx, gvy; + float gx, gy, dl, dr; + + if ((parts[i].ctype>0 && parts[i].ctypeptypes[parts[i].ctype].falldown>0) || parts[i].ctype==SPC_AIR || parts[i].ctype == PT_NEUT || parts[i].ctype == PT_PHOT || parts[i].ctype == PT_LIGH) + playerp->elem = parts[i].ctype; + playerp->frames++; + + //Tempirature handling + if (parts[i].temp<243) + parts[i].life -= 1; + if ((parts[i].temp<309.6f) && (parts[i].temp>=243)) + parts[i].temp += 1; + + //Death + if (parts[i].life<1 || (sim->pv[y/CELL][x/CELL]>=4.5f && playerp->elem != SPC_AIR) ) //If his HP is less that 0 or there is very big wind... + { + for (r=-2; r<=1; r++) + { + sim->create_part(-1, x+r, y-2, playerp->elem); + sim->create_part(-1, x+r+1, y+2, playerp->elem); + sim->create_part(-1, x-2, y+r+1, playerp->elem); + sim->create_part(-1, x+2, y+r, playerp->elem); + } + sim->kill_part(i); //Kill him + return 1; + } + + //Follow gravity + gvx = gvy = 0.0f; + switch (sim->gravityMode) + { + default: + case 0: + gvy = 1; + break; + case 1: + gvy = gvx = 0.0f; + break; + case 2: + { + float gravd; + gravd = 0.01f - hypotf((parts[i].x - XCNTR), (parts[i].y - YCNTR)); + gvx = ((float)(parts[i].x - XCNTR) / gravd); + gvy = ((float)(parts[i].y - YCNTR) / gravd); + } + } + + gvx += sim->gravx[((int)parts[i].y/CELL)*(XRES/CELL)+((int)parts[i].x/CELL)]; + gvy += sim->gravy[((int)parts[i].y/CELL)*(XRES/CELL)+((int)parts[i].x/CELL)]; + + parts[i].vx -= gvx*dt; //Head up! + parts[i].vy -= gvy*dt; + + //Verlet integration + pp = 2*playerp->legs[0]-playerp->legs[2]+playerp->accs[0]*dt*dt; + playerp->legs[2] = playerp->legs[0]; + playerp->legs[0] = pp; + pp = 2*playerp->legs[1]-playerp->legs[3]+playerp->accs[1]*dt*dt; + playerp->legs[3] = playerp->legs[1]; + playerp->legs[1] = pp; + + pp = 2*playerp->legs[4]-playerp->legs[6]+(playerp->accs[2]+gvx)*dt*dt; + playerp->legs[6] = playerp->legs[4]; + playerp->legs[4] = pp; + pp = 2*playerp->legs[5]-playerp->legs[7]+(playerp->accs[3]+gvy)*dt*dt; + playerp->legs[7] = playerp->legs[5]; + playerp->legs[5] = pp; + + pp = 2*playerp->legs[8]-playerp->legs[10]+playerp->accs[4]*dt*dt; + playerp->legs[10] = playerp->legs[8]; + playerp->legs[8] = pp; + pp = 2*playerp->legs[9]-playerp->legs[11]+playerp->accs[5]*dt*dt; + playerp->legs[11] = playerp->legs[9]; + playerp->legs[9] = pp; + + pp = 2*playerp->legs[12]-playerp->legs[14]+(playerp->accs[6]+gvx)*dt*dt; + playerp->legs[14] = playerp->legs[12]; + playerp->legs[12] = pp; + pp = 2*playerp->legs[13]-playerp->legs[15]+(playerp->accs[7]+gvy)*dt*dt; + playerp->legs[15] = playerp->legs[13]; + playerp->legs[13] = pp; + + //Setting accseleration to 0 + playerp->accs[0] = 0; + playerp->accs[1] = 0; + + playerp->accs[2] = 0; + playerp->accs[3] = 0; + + playerp->accs[4] = 0; + playerp->accs[5] = 0; + + playerp->accs[6] = 0; + playerp->accs[7] = 0; + + gx = (playerp->legs[4] + playerp->legs[12])/2 - gvy; + gy = (playerp->legs[5] + playerp->legs[13])/2 + gvx; + dl = pow(gx - playerp->legs[4], 2) + pow(gy - playerp->legs[5], 2); + dr = pow(gx - playerp->legs[12], 2) + pow(gy - playerp->legs[13], 2); + + //Go left + if (((int)(playerp->comm)&0x01) == 0x01) + { + if (dl>dr) + { + if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + playerp->accs[2] = -3*gvy-3*gvx; + playerp->accs[3] = 3*gvx-3*gvy; + playerp->accs[0] = -gvy; + playerp->accs[1] = gvx; + } + } + else + { + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + playerp->accs[6] = -3*gvy-3*gvx; + playerp->accs[7] = 3*gvx-3*gvy; + playerp->accs[0] = -gvy; + playerp->accs[1] = gvx; + } + } + } + + //Go right + if (((int)(playerp->comm)&0x02) == 0x02) + { + if (dleval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + playerp->accs[2] = 3*gvy-3*gvx; + playerp->accs[3] = -3*gvx-3*gvy; + playerp->accs[0] = gvy; + playerp->accs[1] = -gvx; + } + } + else + { + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + playerp->accs[6] = 3*gvy-3*gvx; + playerp->accs[7] = -3*gvx-3*gvy; + playerp->accs[0] = gvy; + playerp->accs[1] = -gvx; + } + } + } + + //Jump + if (((int)(playerp->comm)&0x04) == 0x04 && + (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL) || !sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL))) + { + parts[i].vy -= 4*gvy; + playerp->accs[3] -= gvy; + playerp->accs[7] -= gvy; + } + + //Charge detector wall if foot inside + if (sim->bmap[(int)(playerp->legs[5]+0.5)/CELL][(int)(playerp->legs[4]+0.5)/CELL]==WL_DETECT) + sim->set_emap((int)playerp->legs[4]/CELL, (int)playerp->legs[5]/CELL); + if (sim->bmap[(int)(playerp->legs[13]+0.5)/CELL][(int)(playerp->legs[12]+0.5)/CELL]==WL_DETECT) + sim->set_emap((int)(playerp->legs[12]+0.5)/CELL, (int)(playerp->legs[13]+0.5)/CELL); + + //Searching for particles near head + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; + + if (!r && !sim->bmap[(y+ry)/CELL][(x+rx)/CELL]) + continue; + + if (sim->ptypes[r&0xFF].falldown!=0 || sim->ptypes[r&0xFF].state == ST_GAS || (r&0xFF) == PT_NEUT || (r&0xFF) == PT_PHOT) + { + playerp->elem = r&0xFF; //Current element + } + if ((r&0xFF)==PT_TESC || (r&0xFF)==PT_LIGH) + playerp->elem = PT_LIGH; + if ((r&0xFF) == PT_PLNT && parts[i].life<100) //Plant gives him 5 HP + { + if (parts[i].life<=95) + parts[i].life += 5; + else + parts[i].life = 100; + sim->kill_part(r>>8); + } + + if ((r&0xFF) == PT_NEUT) + { + if (parts[i].life<=100) parts[i].life -= (102-parts[i].life)/2; + else parts[i].life *= 0.9f; + sim->kill_part(r>>8); + } + if (sim->bmap[(ry+y)/CELL][(rx+x)/CELL]==WL_FAN) + playerp->elem = SPC_AIR; + if ((r&0xFF)==PT_PRTI) + STKM_interact(sim, playerp, i, rx, ry); + if (!parts[i].type)//STKM_interact may kill STKM + return 1; + } + + //Head position + rx = x + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01); + ry = y - 3*(playerp->pcomm == 0); + + //Spawn + if (((int)(playerp->comm)&0x08) == 0x08) + { + ry -= 2*(rand()%2)+1; + r = pmap[ry][rx]; + if (sim->ptypes[r&0xFF].state == ST_SOLID) + { + sim->create_part(-1, rx, ry, PT_SPRK); + playerp->frames = 0; + } + else + { + int np = -1; + if (playerp->elem == SPC_AIR) + sim->create_parts(rx + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01), ry, 4, 4, SPC_AIR, 0); + else if (playerp->elem==PT_LIGH && playerp->frames<30)//limit lightning creation rate + np = -1; + else + np = sim->create_part(-1, rx, ry, playerp->elem); + if ( (np < NPART) && np>=0) + { + if (playerp->elem == PT_PHOT) + { + int random = abs(rand()%3-1)*3; + if (random==0) + { + sim->kill_part(np); + } + else + { + parts[np].vy = 0; + if (((int)playerp->pcomm)&(0x01|0x02)) + parts[np].vx = (((((int)playerp->pcomm)&0x02) == 0x02) - (((int)(playerp->pcomm)&0x01) == 0x01))*random; + else + parts[np].vx = random; + } + } + else if (playerp->elem == PT_LIGH) + { + float angle; + int power = 100; + if (gvx!=0 || gvy!=0) + angle = atan2(gvx, gvy)*180.0f/M_PI; + else + angle = rand()%360; + if (((int)playerp->comm)&0x01) + angle += 180; + if (angle>360) + angle-=360; + if (angle<0) + angle+=360; + parts[np].tmp = angle; + parts[np].life=rand()%(2+power/15)+power/7; + parts[np].temp=parts[np].life*power/2.5; + parts[np].tmp2=1; + } + else if (playerp->elem != SPC_AIR) + { + parts[np].vx -= -gvy*(5*((((int)playerp->pcomm)&0x02) == 0x02) - 5*(((int)(playerp->pcomm)&0x01) == 0x01)); + parts[np].vy -= gvx*(5*((((int)playerp->pcomm)&0x02) == 0x02) - 5*(((int)(playerp->pcomm)&0x01) == 0x01)); + parts[i].vx -= (sim->ptypes[(int)playerp->elem].weight*parts[np].vx)/1000; + } + playerp->frames = 0; + } + + } + } + + //Simulation of joints + d = 25/(pow((playerp->legs[0]-playerp->legs[4]), 2) + pow((playerp->legs[1]-playerp->legs[5]), 2)+25) - 0.5; //Fast distance + playerp->legs[4] -= (playerp->legs[0]-playerp->legs[4])*d; + playerp->legs[5] -= (playerp->legs[1]-playerp->legs[5])*d; + playerp->legs[0] += (playerp->legs[0]-playerp->legs[4])*d; + playerp->legs[1] += (playerp->legs[1]-playerp->legs[5])*d; + + d = 25/(pow((playerp->legs[8]-playerp->legs[12]), 2) + pow((playerp->legs[9]-playerp->legs[13]), 2)+25) - 0.5; + playerp->legs[12] -= (playerp->legs[8]-playerp->legs[12])*d; + playerp->legs[13] -= (playerp->legs[9]-playerp->legs[13])*d; + playerp->legs[8] += (playerp->legs[8]-playerp->legs[12])*d; + playerp->legs[9] += (playerp->legs[9]-playerp->legs[13])*d; + + d = 36/(pow((playerp->legs[0]-parts[i].x), 2) + pow((playerp->legs[1]-parts[i].y), 2)+36) - 0.5; + parts[i].vx -= (playerp->legs[0]-parts[i].x)*d; + parts[i].vy -= (playerp->legs[1]-parts[i].y)*d; + playerp->legs[0] += (playerp->legs[0]-parts[i].x)*d; + playerp->legs[1] += (playerp->legs[1]-parts[i].y)*d; + + d = 36/(pow((playerp->legs[8]-parts[i].x), 2) + pow((playerp->legs[9]-parts[i].y), 2)+36) - 0.5; + parts[i].vx -= (playerp->legs[8]-parts[i].x)*d; + parts[i].vy -= (playerp->legs[9]-parts[i].y)*d; + playerp->legs[8] += (playerp->legs[8]-parts[i].x)*d; + playerp->legs[9] += (playerp->legs[9]-parts[i].y)*d; + + if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + playerp->legs[4] = playerp->legs[6]; + playerp->legs[5] = playerp->legs[7]; + } + + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + playerp->legs[12] = playerp->legs[14]; + playerp->legs[13] = playerp->legs[15]; + } + + //This makes stick man "pop" from obstacles + if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + float t; + t = playerp->legs[4]; playerp->legs[4] = playerp->legs[6]; playerp->legs[6] = t; + t = playerp->legs[5]; playerp->legs[5] = playerp->legs[7]; playerp->legs[7] = t; + } + + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + float t; + t = playerp->legs[12]; playerp->legs[12] = playerp->legs[14]; playerp->legs[14] = t; + t = playerp->legs[13]; playerp->legs[13] = playerp->legs[15]; playerp->legs[15] = t; + } + + //Keeping legs distance + if ((pow((playerp->legs[4] - playerp->legs[12]), 2) + pow((playerp->legs[5]-playerp->legs[13]), 2))<16) + { + float tvx, tvy; + tvx = -gvy; + tvy = gvx; + + if (tvx || tvy) + { + playerp->accs[2] -= 0.2*tvx/hypot(tvx, tvy); + playerp->accs[3] -= 0.2*tvy/hypot(tvx, tvy); + + playerp->accs[6] += 0.2*tvx/hypot(tvx, tvy); + playerp->accs[7] += 0.2*tvy/hypot(tvx, tvy); + } + } + + if ((pow((playerp->legs[0] - playerp->legs[8]), 2) + pow((playerp->legs[1]-playerp->legs[9]), 2))<16) + { + float tvx, tvy; + tvx = -gvy; + tvy = gvx; + + if (tvx || tvy) + { + playerp->accs[0] -= 0.2*tvx/hypot(tvx, tvy); + playerp->accs[1] -= 0.2*tvy/hypot(tvx, tvy); + + playerp->accs[4] += 0.2*tvx/hypot(tvx, tvy); + playerp->accs[5] += 0.2*tvy/hypot(tvx, tvy); + } + } + + //If legs touch something + STKM_interact(sim, playerp, i, (int)(playerp->legs[4]+0.5), (int)(playerp->legs[5]+0.5)); + STKM_interact(sim, playerp, i, (int)(playerp->legs[12]+0.5), (int)(playerp->legs[13]+0.5)); + STKM_interact(sim, playerp, i, (int)(playerp->legs[4]+0.5), (int)playerp->legs[5]); + STKM_interact(sim, playerp, i, (int)(playerp->legs[12]+0.5), (int)playerp->legs[13]); + if (!parts[i].type) + return 1; + + parts[i].ctype = playerp->elem; + return 0; +} + +void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y) +{ + int r; + if (x<0 || y<0 || x>=XRES || y>=YRES || !sim->parts[i].type) + return; + r = sim->pmap[y][x]; + if (r) + { + if ((r&0xFF)==PT_SPRK && playerp->elem!=PT_LIGH) //If on charge + { + sim->parts[i].life -= (int)(rand()*20/RAND_MAX)+32; + } + + if (sim->ptypes[r&0xFF].hconduct && ((playerp->elem!=PT_LIGH && sim->parts[r>>8].temp>=323) || sim->parts[r>>8].temp<=243)) + { + sim->parts[i].life -= 2; + playerp->accs[3] -= 1; + } + + if (sim->ptypes[r&0xFF].properties&PROP_DEADLY) + switch (r&0xFF) + { + case PT_ACID: + sim->parts[i].life -= 5; + break; + default: + sim->parts[i].life -= 1; + break; + } + + if (sim->ptypes[r&0xFF].properties&PROP_RADIOACTIVE) + sim->parts[i].life -= 1; + + if ((r&0xFF)==PT_PRTI && sim->parts[i].type) + { + int nnx, count=1;//gives rx=0, ry=1 in update_PRTO + sim->parts[r>>8].tmp = (int)((sim->parts[r>>8].temp-73.15f)/100+1); + if (sim->parts[r>>8].tmp>=CHANNELS) sim->parts[r>>8].tmp = CHANNELS-1; + else if (sim->parts[r>>8].tmp<0) sim->parts[r>>8].tmp = 0; + for (nnx=0; nnx<80; nnx++) + if (!sim->portalp[sim->parts[r>>8].tmp][count][nnx].type) + { + sim->portalp[sim->parts[r>>8].tmp][count][nnx] = sim->parts[i]; + sim->kill_part(i); + playerp->spwn = 1;//stop SPWN creating a new STKM while he is in portal + break; + } + } + } +} + +void STKM_init_legs(Simulation * sim, playerst* playerp, int i) +{ + int x, y; + + x = (int)(sim->parts[i].x+0.5f); + y = (int)(sim->parts[i].y+0.5f); + + playerp->legs[0] = x-1; + playerp->legs[1] = y+6; + playerp->legs[2] = x-1; + playerp->legs[3] = y+6; + + playerp->legs[4] = x-3; + playerp->legs[5] = y+12; + playerp->legs[6] = x-3; + playerp->legs[7] = y+12; + + playerp->legs[8] = x+1; + playerp->legs[9] = y+6; + playerp->legs[10] = x+1; + playerp->legs[11] = y+6; + + playerp->legs[12] = x+3; + playerp->legs[13] = y+12; + playerp->legs[14] = x+3; + playerp->legs[15] = y+12; +} diff --git a/src/elements/stkm2.cpp b/src/elements/stkm2.cpp new file mode 100644 index 0000000..967bea2 --- /dev/null +++ b/src/elements/stkm2.cpp @@ -0,0 +1,29 @@ +#include "element.h" + +int update_SPAWN2(UPDATE_FUNC_ARGS) { + if (!sim->player2.spwn) + sim->create_part(-1, x, y, PT_STKM2); + + return 0; +} + +int update_STKM2(UPDATE_FUNC_ARGS) { + run_stickman(&sim->player2, UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + +int graphics_STKM2(GRAPHICS_FUNC_ARGS) +{ + /**pixel_mode = PSPEC_STICKMAN; + if ((int)sim->player2.elemplayer2.elem].pcolors); + *colg = PIXG(ptypes[sim->player2.elem].pcolors); + *colb = PIXB(ptypes[sim->player2.elem].pcolors); + } + else*/ + { + *colr = *colg = *colb = 255; + } + return 1; +} diff --git a/src/elements/stor.cpp b/src/elements/stor.cpp new file mode 100644 index 0000000..66eb072 --- /dev/null +++ b/src/elements/stor.cpp @@ -0,0 +1,43 @@ +#include "element.h" + +int update_STOR(UPDATE_FUNC_ARGS) { + int r, rx, ry, np, rx1, ry1; + if(parts[i].life && !parts[i].tmp) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8)>=NPART || !r) + continue; + if (!parts[i].tmp && !parts[i].life && (r&0xFF)!=PT_STOR && !(sim->ptypes[(r&0xFF)].properties&TYPE_SOLID) && (!parts[i].ctype || (r&0xFF)==parts[i].ctype)) + { + parts[i].tmp = parts[r>>8].type; + parts[i].temp = parts[r>>8].temp; + parts[i].flags = parts[r>>8].life; + parts[i].pavg[0] = parts[r>>8].tmp; + parts[i].pavg[1] = parts[r>>8].ctype; + sim->kill_part(r>>8); + } + if(parts[i].tmp && (r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN) + { + for(ry1 = 1; ry1 >= -1; ry1--){ + for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ // Oscilate the X starting at 0, 1, -1, 3, -5, etc (Though stop at -1) + np = sim->create_part(-1,x+rx1,y+ry1,parts[i].tmp); + if (np!=-1) + { + parts[np].temp = parts[i].temp; + parts[np].life = parts[i].flags; + parts[np].tmp = parts[i].pavg[0]; + parts[np].ctype = parts[i].pavg[1]; + parts[i].tmp = 0; + parts[i].life = 10; + break; + } + } + } + } + } + return 0; +} diff --git a/src/elements/swch.cpp b/src/elements/swch.cpp new file mode 100644 index 0000000..ee2c467 --- /dev/null +++ b/src/elements/swch.cpp @@ -0,0 +1,41 @@ +#include "element.h" + +int update_SWCH(UPDATE_FUNC_ARGS) { + int r, rt, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxparts_avg(i,r>>8,PT_INSL)!=PT_INSL) { + rt = r&0xFF; + if (rt==PT_SWCH) + { + if (parts[i].life>=10&&parts[r>>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[i].life==0&&parts[r>>8].life==10) + parts[i].life = 10; + } + else if (rt==PT_SPRK&&parts[i].life==10&&parts[r>>8].ctype!=PT_PSCN&&parts[r>>8].ctype!=PT_NSCN) { + sim->part_change_type(i,x,y,PT_SPRK); + parts[i].ctype = PT_SWCH; + parts[i].life = 4; + } + } + } + //turn off SWCH from two red BRAYS + if (parts[i].life==10 && (!(pmap[y-1][x-1]&0xFF) && ((pmap[y-1][x]&0xFF)==PT_BRAY&&parts[pmap[y-1][x]>>8].tmp==2) && !(pmap[y-1][x+1]&0xFF) && ((pmap[y][x+1]&0xFF)==PT_BRAY&&parts[pmap[y][x+1]>>8].tmp==2))) + { + parts[i].life = 9; + } + //turn on SWCH from two red BRAYS + else if (parts[i].life<=5 && (!(pmap[y-1][x-1]&0xFF) && (((pmap[y-1][x]&0xFF)==PT_BRAY&&parts[pmap[y-1][x]>>8].tmp==2) || ((pmap[y+1][x]&0xFF)==PT_BRAY&&parts[pmap[y+1][x]>>8].tmp==2)) && !(pmap[y-1][x+1]&0xFF) && (((pmap[y][x+1]&0xFF)==PT_BRAY&&parts[pmap[y][x+1]>>8].tmp==2) || ((pmap[y][x-1]&0xFF)==PT_BRAY&&parts[pmap[y][x-1]>>8].tmp==2)))) + { + parts[i].life = 14; + } + return 0; +} diff --git a/src/elements/thdr.cpp b/src/elements/thdr.cpp new file mode 100644 index 0000000..f7f95b4 --- /dev/null +++ b/src/elements/thdr.cpp @@ -0,0 +1,38 @@ +#include "element.h" + +int update_THDR(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties&PROP_CONDUCTS) && parts[r>>8].life==0 && !((r&0xFF)==PT_WATR||(r&0xFF)==PT_SLTW) && parts[r>>8].ctype!=PT_SPRK) + { + parts[i].type = PT_NONE; + parts[r>>8].ctype = parts[r>>8].type; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + parts[r>>8].life = 4; + } + else if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT&&(r&0xFF)) + { + sim->pv[y/CELL][x/CELL] += 100.0f; + if (sim->legacy_enable&&1>(rand()%200)) + { + parts[i].life = rand()%50+120; + sim->part_change_type(i,x,y,PT_FIRE); + } + else + { + parts[i].type = PT_NONE; + } + } + } + if (parts[i].type==PT_NONE) { + sim->kill_part(i); + return 1; + } + return 0; +} diff --git a/src/elements/thrm.cpp b/src/elements/thrm.cpp new file mode 100644 index 0000000..91939e6 --- /dev/null +++ b/src/elements/thrm.cpp @@ -0,0 +1,29 @@ +#include "element.h" + +int update_THRM(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) { + sim->part_change_type(i,x,y,PT_LAVA); + parts[i].ctype = PT_BMTL; + parts[i].temp = 3500.0f; + sim->pv[y/CELL][x/CELL] += 50.0f; + } else { + sim->part_change_type(i,x,y,PT_LAVA); + parts[i].life = 400; + parts[i].ctype = PT_THRM; + parts[i].temp = 3500.0f; + parts[i].tmp = 20; + } + } + } + return 0; +} diff --git a/src/elements/uran.cpp b/src/elements/uran.cpp new file mode 100644 index 0000000..a8b2a06 --- /dev/null +++ b/src/elements/uran.cpp @@ -0,0 +1,10 @@ +#include "element.h" + +int update_URAN(UPDATE_FUNC_ARGS) { + if (!sim->legacy_enable && sim->pv[y/CELL][x/CELL]>0.0f) + { + float atemp = parts[i].temp + (-MIN_TEMP); + parts[i].temp = restrict_flt((atemp*(1+(sim->pv[y/CELL][x/CELL]/2000)))+MIN_TEMP, MIN_TEMP, MAX_TEMP); + } + return 0; +} diff --git a/src/elements/vine.cpp b/src/elements/vine.cpp new file mode 100644 index 0000000..165d391 --- /dev/null +++ b/src/elements/vine.cpp @@ -0,0 +1,19 @@ +#include "element.h" + +int update_VINE(UPDATE_FUNC_ARGS) { + int r, np, rx =(rand()%3)-1, ry=(rand()%3)-1; + if (x+rx>=0 && y+ry>0 && x+rxrand()%15) + sim->part_change_type(i,x,y,PT_PLNT); + else if (!r) + { + np = sim->create_part(-1,x+rx,y+ry,PT_VINE); + if (np<0) return 0; + parts[np].temp = parts[i].temp; + sim->part_change_type(i,x,y,PT_PLNT); + } + } + return 0; +} diff --git a/src/elements/warp.cpp b/src/elements/warp.cpp new file mode 100644 index 0000000..ddc1b81 --- /dev/null +++ b/src/elements/warp.cpp @@ -0,0 +1,28 @@ +#include "element.h" + +int update_WARP(UPDATE_FUNC_ARGS) { + int trade, r, rx, ry; + for ( trade = 0; trade<5; trade ++) + { + rx = rand()%3-1; + ry = rand()%3-1; + if (x+rx>=0 && y+ry>0 && x+rx=rand()%200)) + { + parts[i].x = parts[r>>8].x; + parts[i].y = parts[r>>8].y; + parts[r>>8].x = x; + parts[r>>8].y = y; + parts[i].life += 4; + pmap[y][x] = r; + pmap[y+ry][x+rx] = (i<<8)|parts[i].type; + trade = 5; + } + } + } + return 0; +} diff --git a/src/elements/watr.cpp b/src/elements/watr.cpp new file mode 100644 index 0000000..09b66a9 --- /dev/null +++ b/src/elements/watr.cpp @@ -0,0 +1,36 @@ +#include "element.h" + +int update_WATR(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) + { + sim->part_change_type(i,x,y,PT_SLTW); + sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); + } + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + /*if ((r&0xFF)==PT_CNCT && 1>(rand()%500)) Concrete+Water to paste, not very popular + { + part_change_type(i,x,y,PT_PSTE); + sim.kill_part(r>>8); + }*/ + } + return 0; +} diff --git a/src/elements/wifi.cpp b/src/elements/wifi.cpp new file mode 100644 index 0000000..ee5e264 --- /dev/null +++ b/src/elements/wifi.cpp @@ -0,0 +1,35 @@ +#include "element.h" + +int update_WIFI(UPDATE_FUNC_ARGS) { + int r, rx, ry; + parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); + if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; + else if (parts[i].tmp<0) parts[i].tmp = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxwireless[parts[i].tmp][0]) + { + if (((r&0xFF)==PT_NSCN||(r&0xFF)==PT_PSCN||(r&0xFF)==PT_INWR)&&parts[r>>8].life==0 && sim->wireless[parts[i].tmp][0]) + { + parts[r>>8].ctype = r&0xFF; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + parts[r>>8].life = 4; + } + } + else + { + if ((r&0xFF)==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3) + { + sim->wireless[parts[i].tmp][0] = 1; + sim->wireless[parts[i].tmp][1] = 1; + //ISWIRE = 1; + } + } + } + return 0; +} diff --git a/src/elements/wire.cpp b/src/elements/wire.cpp new file mode 100644 index 0000000..49d3720 --- /dev/null +++ b/src/elements/wire.cpp @@ -0,0 +1,67 @@ +#include "element.h" + +int update_WIRE(UPDATE_FUNC_ARGS) { + int s,r,rx,ry,count; + /* + 0: wire + 1: spark head + 2: spark tail + + tmp is previous state, ctype is current state + */ + //parts[i].tmp=parts[i].ctype; + parts[i].ctype=0; + if(parts[i].tmp==1) + { + parts[i].ctype=2; + } + if(parts[i].tmp==2) + { + parts[i].ctype=0; + } + + count=0; + for(rx=-1; rx<2; rx++) + for(ry=-1; ry<2; ry++) + { + if(x+rx>=0 && y+ry>0 && x+rx>8].ctype==PT_PSCN){parts[i].ctype=1; parts[r>>8].life=0; return 0;} + else if((r&0xFF)==PT_NSCN && parts[i].tmp==1){sim->create_part(-1, x+rx, y+ry, PT_SPRK);} + else if((r&0xFF)==PT_WIRE && parts[r>>8].tmp==1 && !parts[i].tmp){count++;} + } + } + if(count==1 || count==2) + parts[i].ctype=1; + return 0; +} + +int graphics_WIRE(GRAPHICS_FUNC_ARGS) +{ + if (cpart->ctype==0) + { + *colr = 255; + *colg = 204; + *colb = 0; + return 0; + } + if (cpart->ctype==1) + { + *colr = 50; + *colg = 100; + *colb = 255; + //*pixel_mode |= PMODE_GLOW; + return 0; + } + if (cpart->ctype==2) + { + *colr = 255; + *colg = 100; + *colb = 50; + //*pixel_mode |= PMODE_GLOW; + return 0; + } +} diff --git a/src/elements/wtrv.cpp b/src/elements/wtrv.cpp new file mode 100644 index 0000000..de0eae4 --- /dev/null +++ b/src/elements/wtrv.cpp @@ -0,0 +1,21 @@ +#include "element.h" + +int update_WTRV(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxlegacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + } + if(parts[i].temp>1273&&parts[i].ctype==PT_FIRE) + parts[i].temp-=parts[i].temp/1000; + return 0; +} diff --git a/src/elements/yest.cpp b/src/elements/yest.cpp new file mode 100644 index 0000000..c6c7db6 --- /dev/null +++ b/src/elements/yest.cpp @@ -0,0 +1,21 @@ +#include "element.h" + +int update_YEST(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%30) && !sim->legacy_enable) + { + sim->part_change_type(i,x,y,PT_DYST); + } + } + if (parts[i].temp>303&&parts[i].temp<317) { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_YEST); + } + return 0; +} diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp new file mode 100644 index 0000000..becb540 --- /dev/null +++ b/src/game/GameController.cpp @@ -0,0 +1,62 @@ + +#include +#include +#include "Config.h" +#include "GameController.h" +#include "GameModel.h" +#include "interface/Point.h" + +using namespace std; + +GameController::GameController() +{ + gameView = new GameView(); + gameModel = new GameModel(); + + gameView->AttachController(this); + gameModel->AddObserver(gameView); + + sim = new Simulation(); +} + +GameView * GameController::GetView() +{ + return gameView; +} + +void GameController::DrawPoints(queue & pointQueue) +{ + Simulation * sim = gameModel->GetSimulation(); + int activeElement = gameModel->GetActiveElement(); + if(!pointQueue.empty()) + { + ui::Point * sPoint = NULL; + while(!pointQueue.empty()) + { + ui::Point * fPoint = pointQueue.front(); + pointQueue.pop(); + if(sPoint) + { + sim->create_line(fPoint->X, fPoint->Y, sPoint->X, sPoint->Y, 1, 1, activeElement, 0); + delete sPoint; + } + else + { + sim->create_parts(fPoint->X, fPoint->Y, 1, 1, activeElement, 0); + } + sPoint = fPoint; + } + if(sPoint) + delete sPoint; + } +} + +void GameController::Tick() +{ + gameModel->GetSimulation()->update_particles(); +} + +void GameController::SetPaused(bool pauseState) +{ + gameModel->SetPaused(pauseState); +} diff --git a/src/game/GameController.h b/src/game/GameController.h new file mode 100644 index 0000000..c3c8273 --- /dev/null +++ b/src/game/GameController.h @@ -0,0 +1,28 @@ +#ifndef GAMECONTROLLER_H +#define GAMECONTROLLER_H + +#include +#include "GameView.h" +#include "GameModel.h" +#include "interface/Point.h" +#include "Simulation.h" + +using namespace std; + +class GameModel; +class GameView; +class GameController +{ +private: + Simulation * sim; + GameView * gameView; + GameModel * gameModel; +public: + GameController(); + GameView * GetView(); + void DrawPoints(queue & pointQueue); + void Tick(); + void SetPaused(bool pauseState); +}; + +#endif // GAMECONTROLLER_H diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp new file mode 100644 index 0000000..96b29a9 --- /dev/null +++ b/src/game/GameModel.cpp @@ -0,0 +1,75 @@ +#include "interface/Engine.h" +#include "GameModel.h" +#include "GameView.h" +#include "Simulation.h" +#include "Renderer.h" + +GameModel::GameModel(): + activeElement(1) +{ + sim = new Simulation(); + ren = new Renderer(ui::Engine::Ref().g, sim); +} + +void GameModel::AddObserver(GameView * observer){ + observers.push_back(observer); + + observer->NotifySimulationChanged(this); + observer->NotifyRendererChanged(this); + observer->NotifyPausedChanged(this); +} + +int GameModel::GetActiveElement() +{ + return activeElement; +} + +void GameModel::SetActiveElement(int element) +{ + activeElement = element; +} + +Simulation * GameModel::GetSimulation() +{ + return sim; +} + +Renderer * GameModel::GetRenderer() +{ + return ren; +} + +void GameModel::SetPaused(bool pauseState) +{ + sim->sys_pause = pauseState?1:0; + notifyPausedChanged(); +} + +bool GameModel::GetPaused() +{ + return sim->sys_pause?true:false; +} + +void GameModel::notifyRendererChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyRendererChanged(this); + } +} + +void GameModel::notifySimulationChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifySimulationChanged(this); + } +} + +void GameModel::notifyPausedChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyPausedChanged(this); + } +} diff --git a/src/game/GameModel.h b/src/game/GameModel.h new file mode 100644 index 0000000..a2eb3ce --- /dev/null +++ b/src/game/GameModel.h @@ -0,0 +1,37 @@ +#ifndef GAMEMODEL_H +#define GAMEMODEL_H + +#include +#include "Simulation.h" +#include "Renderer.h" +#include "GameView.h" + +using namespace std; + +class GameView; +class Simulation; +class Renderer; + +class GameModel +{ +private: + vector observers; + Simulation * sim; + Renderer * ren; + int activeElement; + void notifyRendererChanged(); + void notifySimulationChanged(); + void notifyPausedChanged(); +public: + GameModel(); + void AddObserver(GameView * observer); + int GetActiveElement(); + void SetActiveElement(int element); + bool GetPaused(); + void SetPaused(bool pauseState); + + Simulation * GetSimulation(); + Renderer * GetRenderer(); +}; + +#endif // GAMEMODEL_H diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp new file mode 100644 index 0000000..2576527 --- /dev/null +++ b/src/game/GameView.cpp @@ -0,0 +1,83 @@ +#include "Config.h" +#include "GameView.h" +#include "interface/Window.h" +#include "interface/Button.h" + +GameView::GameView(): + ui::Window(ui::Point(0, 0), ui::Point(XRES+BARSIZE, YRES+MENUSIZE)), + pointQueue(queue()), + isMouseDown(false), + ren(NULL) +{ + //Set up UI + class PauseAction : public ui::ButtonAction + { + GameView * v; + public: + PauseAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->SetPaused(sender->GetToggleState()); + } + }; + pauseButton = new ui::Button(ui::Point(Size.X-18, Size.Y-18), ui::Point(16, 16), "\x90"); //Pause + pauseButton->SetTogglable(true); + pauseButton->SetActionCallback(new PauseAction(this)); + AddComponent(pauseButton); +} + +void GameView::NotifyRendererChanged(GameModel * sender) +{ + ren = sender->GetRenderer(); +} + +void GameView::NotifySimulationChanged(GameModel * sender) +{ + +} + +void GameView::NotifyPausedChanged(GameModel * sender) +{ + pauseButton->SetToggleState(sender->GetPaused()); +} + +void GameView::OnMouseMove(int x, int y, int dx, int dy) +{ + if(isMouseDown) + { + pointQueue.push(new ui::Point(x-dx, y-dy)); + pointQueue.push(new ui::Point(x, y)); + } +} + +void GameView::OnMouseDown(int x, int y, unsigned button) +{ + isMouseDown = true; + pointQueue.push(new ui::Point(x, y)); +} + +void GameView::OnMouseUp(int x, int y, unsigned button) +{ + if(isMouseDown) + { + isMouseDown = false; + pointQueue.push(new ui::Point(x, y)); + } +} + +void GameView::OnTick(float dt) +{ + if(!pointQueue.empty()) + { + c->DrawPoints(pointQueue); + } + c->Tick(); +} + +void GameView::OnDraw() +{ + if(ren) + { + ren->render_parts(); + } +} diff --git a/src/game/GameView.h b/src/game/GameView.h new file mode 100644 index 0000000..531a4b9 --- /dev/null +++ b/src/game/GameView.h @@ -0,0 +1,48 @@ +#ifndef GAMEVIEW_H +#define GAMEVIEW_H + +#include +#include "GameController.h" +#include "GameModel.h" +#include "interface/Window.h" +#include "interface/Point.h" +#include "interface/Button.h" + +using namespace std; + +class GameController; +class GameModel; +class GameView: public ui::Window +{ +private: + bool isMouseDown; + queue pointQueue; + GameController * c; + Renderer * ren; + //UI Elements + ui::Button * pauseButton; +public: + GameView(); + void AttachController(GameController * _c){ c = _c; } + void NotifyRendererChanged(GameModel * sender); + void NotifySimulationChanged(GameModel * sender); + void NotifyPausedChanged(GameModel * sender); + /*virtual void DoMouseMove(int x, int y, int dx, int dy); + virtual void DoMouseDown(int x, int y, unsigned button); + virtual void DoMouseUp(int x, int y, unsigned button); + //virtual void DoMouseWheel(int x, int y, int d); + //virtual void DoKeyPress(int key, bool shift, bool ctrl, bool alt); + //virtual void DoKeyRelease(int key, bool shift, bool ctrl, bool alt); + virtual void DoTick(float dt); + virtual void DoDraw();*/ + virtual void OnMouseMove(int x, int y, int dx, int dy); + virtual void OnMouseDown(int x, int y, unsigned button); + virtual void OnMouseUp(int x, int y, unsigned button); + //virtual void OnMouseWheel(int x, int y, int d) {} + //virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt) {} + //virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {} + virtual void OnTick(float dt); + virtual void OnDraw(); +}; + +#endif // GAMEVIEW_H diff --git a/src/interface.old/Button.cpp b/src/interface.old/Button.cpp deleted file mode 100644 index a357c36..0000000 --- a/src/interface.old/Button.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Button.cpp - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#include - -#include "interface/Button.h" -#include "Graphics.h" - -namespace ui { - -Button::Button(int x, int y, int width, int height, const std::string& buttonText): - Component(x, y, width, height), - Toggleable(false), - ButtonText(buttonText), - isMouseInside(false), - isButtonDown(false), - state(false) -{ - -} - -void Button::Draw(void* userdata) -{ - Graphics * g = reinterpret_cast(userdata); - //TODO: Cache text location, that way we don't have the text alignment code here - if(isButtonDown) - { - g->fillrect(X, Y, Width, Height, 255, 255, 255, 255); - g->drawtext(X+(Width-Graphics::textwidth((char *)ButtonText.c_str()))/2, Y+(Height-10)/2, ButtonText, 0, 0, 0, 255); - } - else - { - if(isMouseInside) - g->fillrect(X, Y, Width, Height, 20, 20, 20, 255); - g->drawrect(X, Y, Width, Height, 255, 255, 255, 255); - g->drawtext(X+(Width-Graphics::textwidth((char *)ButtonText.c_str()))/2, Y+(Height-10)/2, ButtonText, 255, 255, 255, 255); - } - /*sf::RenderWindow* rw = reinterpret_cast(userdata); //it better be a RenderWindow or so help your god - - //Draw component here - sf::Text textGraphic(ButtonText); - textGraphic.SetCharacterSize(11); - if(isButtonDown) - textGraphic.SetColor(sf::Color::Black); - else - textGraphic.SetColor(sf::Color::White); - sf::FloatRect tempRect = textGraphic.GetRect(); - textGraphic.SetPosition(ceil(X + Width/2 - tempRect.Width/2), ceil(Y + Height/2 - tempRect.Height/2)); - - if(isMouseInside) - { - if(isButtonDown) - rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::White, 2.f, sf::Color::Black)); - else - rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::Black, 2.f, sf::Color::White)); - } - else - { - if(isButtonDown) - rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::White, 2.f, sf::Color::Black)); - else - rw->Draw(sf::Shape::Rectangle(X+1, Y+1, Width-2, Width-2, sf::Color::Black, 1.f, sf::Color::White)); - } - - rw->Draw(textGraphic);*/ -} - -void Button::OnMouseUnclick(int x, int y, unsigned int button) -{ - if(button != 1) - { - return; //left click only! - } - - if(isButtonDown) - { - if(state) - { - state = false; - } - else - { - if(Toggleable) - { - state = true; - } - DoAction(); - } - } - - isButtonDown = false; -} - -void Button::OnMouseUp(int x, int y, unsigned int button) //mouse unclick is called before this -{ - if(button != 1) return; //left click only! - - isButtonDown = false; -} - -void Button::OnMouseClick(int x, int y, unsigned int button) -{ - if(button != 1) return; //left click only! - - isButtonDown = true; -} - -void Button::OnMouseEnter(int x, int y, int dx, int dy) -{ - isMouseInside = true; -} - -void Button::OnMouseLeave(int x, int y, int dx, int dy) -{ - isMouseInside = false; -} - -void Button::DoAction() -{ - std::cout << "Do action!"<Add(new ui::Button(0, 0, 20, 20, "Turd")); - return mainMenu; -} diff --git a/src/interface.old/Panel.cpp b/src/interface.old/Panel.cpp deleted file mode 100644 index 164bfa3..0000000 --- a/src/interface.old/Panel.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Panel.cpp - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#include "interface/Panel.h" - -namespace ui { - -Panel::Panel(int x, int y, int width, int height): - Component(x, y, width, height) -{ - // TODO Auto-generated constructor stub - -} - -Panel::~Panel() { - // TODO Auto-generated destructor stub -} - -} /* namespace ui */ diff --git a/src/interface.old/Sandbox.cpp b/src/interface.old/Sandbox.cpp deleted file mode 100644 index 5e29bae..0000000 --- a/src/interface.old/Sandbox.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Sandbox.cpp - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#include - -#include "Config.h" - -#include "interface/Sandbox.h" -#include "interface/Component.h" -#include "Renderer.h" -#include "Simulation.h" - -namespace ui { - -Sandbox::Sandbox(): - Component(0, 0, XRES, YRES), - ren(NULL), - isMouseDown(false), - activeElement(1) -{ - sim = new Simulation(); -} - -Simulation * Sandbox::GetSimulation() -{ - return sim; -} - -void Sandbox::OnMouseMovedInside(int localx, int localy, int dx, int dy) -{ - if(isMouseDown) - { - sim->create_line(lastCoordX, lastCoordY, localx, localy, 2, 2, activeElement, 0); - lastCoordX = localx; - lastCoordY = localy; - } -} - -void Sandbox::OnMouseDown(int localx, int localy, unsigned int button) -{ - sim->create_line(localx, localy, localx, localy, 2, 2, activeElement, 0); - lastCoordX = localx; - lastCoordY = localy; - isMouseDown = true; -} - -void Sandbox::OnMouseUp(int localx, int localy, unsigned int button) -{ - sim->create_line(lastCoordX, lastCoordY, localx, localy, 2, 2, activeElement, 0); - lastCoordX = localx; - lastCoordY = localy; - isMouseDown = false; -} - -void Sandbox::Draw(void* userdata) -{ - Graphics * g = reinterpret_cast(userdata); - if(!ren) - ren = new Renderer(g, sim); - ren->render_parts(); -} - -void Sandbox::Tick(float delta) -{ - sim->update_particles(); -} - -Sandbox::~Sandbox() { - // TODO Auto-generated destructor stub -} - -} /* namespace ui */ diff --git a/src/interface.old/State.cpp b/src/interface.old/State.cpp deleted file mode 100644 index 2828751..0000000 --- a/src/interface.old/State.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/* - * State.cpp - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#include -#include -#include - -#include "interface/State.h" - -namespace ui { - -State::State(int w, int h): - mouseX(0), - mouseY(0), - mouseXP(0), - mouseYP(0), - width(w), - height(h), - Components() -{ -} - -State::~State() -{ - //Components.~vector(); // just in case // devnote : Nope.jpg Nate :3 -frankbro -} - -void State::Add(Component* child) -{ - Components.push_back(child); - child->Parent = this; -} - -void State::Remove(Component* child) -{ - for(int i = 0; i < Components.size(); i++) - if(Components[i] == child) - { - Components.erase(Components.begin() + i); - break; - } -} - -void State::Draw(void* userdata) -{ - //draw - for(int i = 0; i < Components.size(); i++) - { - if(Components[i]->Visible) - { - if(AllowExclusiveDrawing) - { - Components[i]->Draw(userdata); - } - else if( - Components[i]->X + Components[i]->Width >= 0 && - Components[i]->Y + Components[i]->Height >= 0 && - Components[i]->X < width && - Components[i]->Y < height ) - { - Components[i]->Draw(userdata); - } - } - } -} - -void State::Tick(float dt) -{ - //on mouse hover - for(int i = 0; i < Components.size(); i++) - if( mouseX >= Components[i]->X && - mouseY >= Components[i]->Y && - mouseX < Components[i]->X + Components[i]->Width && - mouseY < Components[i]->Y + Components[i]->Height ) - { - if(Components[i]->Enabled) - { - Components[i]->OnMouseHover(mouseX, mouseY); - } - break; - } - - //tick - for(int i = 0; i < Components.size(); i++) - Components[i]->Tick(dt); -} - -void State::OnKeyPress(int key, bool shift, bool ctrl, bool alt) -{ - //on key press - if(focusedComponent_ != NULL) - if(focusedComponent_->Enabled) - focusedComponent_->OnKeyPress(key, shift, ctrl, alt); -} - -void State::OnKeyRelease(int key, bool shift, bool ctrl, bool alt) -{ - //on key unpress - if(focusedComponent_ != NULL) - if(focusedComponent_->Enabled) - focusedComponent_->OnKeyRelease(key, shift, ctrl, alt); -} - -void State::OnMouseDown(int x, int y, unsigned int button) -{ - //on mouse click - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) - if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) - { - Components[i]->OnMouseClick(x - Components[i]->X, y - Components[i]->Y, button); - this->focusedComponent_ = Components[i]; //set this component as the focused component - break; - } - - //on mouse down - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) - Components[i]->OnMouseDown(x - Components[i]->X, y - Components[i]->Y, button); -} - -void State::OnMouseMove(int x, int y) -{ - //update mouse coords - mouseX = x; - mouseY = y; - - //on mouse move (if true, and inside) - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) - { - int localX = x - Components[i]->X; - int localY = y - Components[i]->Y; - int localXP = mouseXP - Components[i]->X; - int localYP = mouseYP - Components[i]->Y; - int dx = x - mouseXP; - int dy = x - mouseYP; - - Components[i]->OnMouseMoved(localX, localY, dx, dy); - - //is the mouse inside - if(localX >= 0 && - localY >= 0 && - localX < Components[i]->Width && - localY < Components[i]->Height ) - { - //was the mouse outside last tick? - if(localXP < 0 || - localXP >= Components[i]->Width || - localYP < 0 || - localYP >= Components[i]->Height ) - { - Components[i]->OnMouseEnter(localX, localY, dx, dy); - } - - Components[i]->OnMouseMovedInside(localX, localY, dx, dy); - - break; //found the top-most component under mouse, break that shit - } - //not inside, let's see if it used to be inside last tick - else if (localXP >= 0 && - localYP >= 0 && - localXP < Components[i]->Width && - localYP < Components[i]->Height ) - { - Components[i]->OnMouseLeave(localX, localY, x - mouseXP, y - mouseYP); - } - } - else //is locked - { - int localX = x - Components[i]->X; - int localY = y - Components[i]->Y; - - //is the mouse inside - if(localX >= 0 && - localY >= 0 && - localX < Components[i]->Width && - localY < Components[i]->Height ) - { - break; //it's the top-most component under the mouse, we don't want to go under it. - } - } - // end of for loop here - - //set the previous mouse coords - mouseXP = x; - mouseYP = y; -} - -void State::OnMouseUp(int x, int y, unsigned int button) -{ - //on mouse unclick - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) - if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) - { - Components[i]->OnMouseUnclick(x - Components[i]->X, y - Components[i]->Y, button); - break; - } - - //on mouse up - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) - Components[i]->OnMouseUp(x - Components[i]->X, y - Components[i]->Y, button); -} - -void State::OnMouseWheel(int x, int y, int d) -{ - //focused mouse wheel - if(focusedComponent_ != NULL) - focusedComponent_->OnMouseWheelFocused(x - focusedComponent_->X, y - focusedComponent_->Y, d); - - //mouse wheel inside - for(int i = Components.size() - 1; i > -1 ; i--) - if(x >= Components[i]->X && y >= Components[i]->Y && x < Components[i]->X + Components[i]->Width && y < Components[i]->Y + Components[i]->Height) - { - if(Components[i]->Enabled) - Components[i]->OnMouseWheelInside(x - Components[i]->X, y - Components[i]->Y, d); - break; //found top-most component under mouse - } - - //on mouse wheel - for(int i = Components.size() - 1; i > -1 ; i--) - if(Components[i]->Enabled) - Components[i]->OnMouseWheel(x - Components[i]->X, y - Components[i]->Y, d); -} - - -} /* namespace ui */ diff --git a/src/interface.old/Window.cpp b/src/interface.old/Window.cpp deleted file mode 100644 index 624bf9a..0000000 --- a/src/interface.old/Window.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Window.cpp - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#include "interface/Window.h" - -namespace ui { - -Window::Window(): - State(width, height) -{ - // TODO Auto-generated constructor stub - -} - -Window::~Window() { - // TODO Auto-generated destructor stub -} - -} /* namespace ui */ diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 6ea9854..a3f76b9 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -10,15 +10,17 @@ #include "interface/Button.h" #include "Graphics.h" #include "Global.h" +#include "Engine.h" namespace ui { -Button::Button(State* parent_state, std::string buttonText): +Button::Button(Window* parent_state, std::string buttonText): Component(parent_state), ButtonText(buttonText), isMouseInside(false), isButtonDown(false), - isTogglable(false) + isTogglable(false), + actionCallback(NULL) { } @@ -28,7 +30,8 @@ Button::Button(Point position, Point size, std::string buttonText): ButtonText(buttonText), isMouseInside(false), isButtonDown(false), - isTogglable(false) + isTogglable(false), + actionCallback(NULL) { } @@ -38,7 +41,8 @@ Button::Button(std::string buttonText): ButtonText(buttonText), isMouseInside(false), isButtonDown(false), - isTogglable(false) + isTogglable(false), + actionCallback(NULL) { } @@ -68,13 +72,13 @@ inline void Button::SetToggleState(bool state) void Button::Draw(const Point& screenPos) { - Graphics * g = Global::Ref().g; + Graphics * g = ui::Engine::Ref().g; Point Position = screenPos; // = reinterpret_cast(userdata); //TODO: Cache text location, that way we don't have the text alignment code here if(isButtonDown || (isTogglable && toggle)) { - g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); + g->fillrect(Position.X-1, Position.Y-1, Size.X+2, Size.Y+2, 255, 255, 255, 255); g->drawtext(Position.X+(Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2, Position.Y+(Size.Y-10)/2, ButtonText, 0, 0, 0, 255); } else @@ -116,7 +120,6 @@ void Button::Draw(const Point& screenPos) void Button::OnMouseUnclick(int x, int y, unsigned int button) { - std::cout << "Unclick!" << std::endl; if(button != 1) { return; //left click only! @@ -160,6 +163,15 @@ void Button::OnMouseLeave(int x, int y) void Button::DoAction() { std::cout << "Do action!"<ActionCallback(this); +} + +void Button::SetActionCallback(ButtonAction * action) +{ + actionCallback = action; } Button::~Button() diff --git a/src/interface/Button.h b/src/interface/Button.h new file mode 100644 index 0000000..5f2d71f --- /dev/null +++ b/src/interface/Button.h @@ -0,0 +1,60 @@ +/* + * Button.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef BUTTON_H_ +#define BUTTON_H_ + +#include + +#include "Component.h" + +namespace ui +{ +class Button; +class ButtonAction +{ +public: + virtual void ActionCallback(ui::Button * sender) {} +}; + +class Button : public Component +{ +public: + Button(Window* parent_state, std::string buttonText); + + Button(Point position, Point size, std::string buttonText); + + Button(std::string buttonText); + virtual ~Button(); + + bool Toggleable; + + std::string ButtonText; + + virtual void OnMouseClick(int x, int y, unsigned int button); + virtual void OnMouseUnclick(int x, int y, unsigned int button); + //virtual void OnMouseUp(int x, int y, unsigned int button); + + virtual void OnMouseEnter(int x, int y); + virtual void OnMouseLeave(int x, int y); + + virtual void Draw(const Point& screenPos); + + inline bool GetState() { return state; } + virtual void DoAction(); //action of button what ever it may be + void SetTogglable(bool isTogglable); + bool GetTogglable(); + inline bool GetToggleState(); + inline void SetToggleState(bool state); + void SetActionCallback(ButtonAction * action); + +protected: + bool isButtonDown, state, isMouseInside, isTogglable, toggle; + ButtonAction * actionCallback; +}; +} +#endif /* BUTTON_H_ */ diff --git a/src/interface/Component.cpp b/src/interface/Component.cpp index 49ff7f8..75e9c40 100644 --- a/src/interface/Component.cpp +++ b/src/interface/Component.cpp @@ -2,12 +2,12 @@ #include "interface/Component.h" #include "interface/Engine.h" #include "interface/Point.h" -#include "interface/State.h" +#include "interface/Window.h" #include "interface/Panel.h" using namespace ui; -Component::Component(State* parent_state): +Component::Component(Window* parent_state): parentstate_(parent_state), _parent(NULL), Position(Point(0,0)), @@ -45,9 +45,9 @@ bool Component::IsFocused() const return parentstate_->IsFocused(this); } -void Component::SetParentState(State* state) +void Component::SetParentWindow(Window* window) { - parentstate_ = state; + parentstate_ = window; } void Component::SetParent(Panel* new_parent) @@ -65,7 +65,7 @@ void Component::SetParent(Panel* new_parent) _parent->RemoveChild(i, false); // add ourself to the parent state - GetParentState()->AddComponent(this); + GetParentWindow()->AddComponent(this); //done in this loop. break; @@ -76,8 +76,8 @@ void Component::SetParent(Panel* new_parent) else { // remove from parent state (if in parent state) and place in new parent - if(GetParentState()) - GetParentState()->RemoveComponent(this); + if(GetParentWindow()) + GetParentWindow()->RemoveComponent(this); new_parent->children.push_back(this); } this->_parent = new_parent; diff --git a/src/interface/Component.h b/src/interface/Component.h new file mode 100644 index 0000000..578aba6 --- /dev/null +++ b/src/interface/Component.h @@ -0,0 +1,204 @@ +#pragma once + +#include "Point.h" +#include "Window.h" +#include "Platform.h" + +namespace ui +{ + class Window; + class Panel; + + /* class Component + * + * An interactive UI component that can be added to a state or an XComponent*. + * *See sys::XComponent + */ + class Component + { + public: + Component(Window* parent_state); + Component(Point position, Point size); + Component(); + virtual ~Component(); + + void* UserData; + inline Window* const GetParentWindow() const { return parentstate_; } + bool IsFocused() const; + + Point Position; + Point Size; + bool Locked; + bool Visible; + + /* See the parent of this component. + * If new_parent is NULL, this component will have no parent. (THIS DOES NOT delete THE COMPONENT. See XComponent::RemoveChild) + */ + void SetParentWindow(Window* window); + void SetParent(Panel* new_parent); + + //Get the parent component. + inline Panel* const GetParent() const { return _parent; } + + //UI functions: + /* + void Tick(float dt); + void Draw(const Point& screenPos); + + void OnMouseHover(int localx, int localy); + void OnMouseMoved(int localx, int localy, int dx, int dy); + void OnMouseMovedInside(int localx, int localy, int dx, int dy); + void OnMouseEnter(int localx, int localy); + void OnMouseLeave(int localx, int localy); + void OnMouseDown(int x, int y, unsigned int button); + void OnMouseUp(int x, int y, unsigned int button); + void OnMouseClick(int localx, int localy, unsigned int button); + void OnMouseUnclick(int localx, int localy, unsigned int button); + void OnMouseWheel(int localx, int localy, int d); + void OnMouseWheelInside(int localx, int localy, int d); + void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + */ + + /// + // Called: Every tick. + // Params: + // dt: The change in time. + /// + virtual void Tick(float dt); + + /// + // Called: When ready to draw. + // Params: + // None + /// + virtual void Draw(const Point& screenPos); + + + + + /// + // Called: When the mouse is currently hovering over the item. (Called every tick) + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + /// + virtual void OnMouseHover(int localx, int localy); + + /// + // Called: When the mouse moves. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + // dx: Mouse X delta. + // dy: Mouse Y delta. + /// + virtual void OnMouseMoved(int localx, int localy, int dx, int dy); + + /// + // Called: When the mouse moves. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + // dx: Mouse X delta. + // dy: Mouse Y delta. + /// + virtual void OnMouseMovedInside(int localx, int localy, int dx, int dy); + + /// + // Called: When the mouse moves on top of the item. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + // dx: Mouse X delta. + // dy: Mouse Y delta. + /// + virtual void OnMouseEnter(int localx, int localy); + + /// + // Called: When the mouse leaves the item. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + /// + virtual void OnMouseLeave(int localx, int localy); + + /// + // Called: When a mouse button is pressed. + // Params: + // x: X position of the mouse. + // y: Y position of the mouse. + // button: The button that is being held down. + /// + virtual void OnMouseDown(int x, int y, unsigned button); + + /// + // Called: When a mouse button is released. + // Params: + // x: X position of the mouse. + // y: Y position of the mouse. + // button: The button that is being released. + /// + virtual void OnMouseUp(int x, int y, unsigned button); + + /// + // Called: When a mouse button is pressed on top of the item. + // Params: + // x: X position of the mouse. + // y: Y position of the mouse. + // button: The button that is being held down. + /// + virtual void OnMouseClick(int localx, int localy, unsigned button); + + /// + // Called: When a mouse button is released on top of the item. + // Params: + // x: X position of the mouse. + // y: Y position of the mouse. + // button: The button that is being released. + /// + virtual void OnMouseUnclick(int localx, int localy, unsigned button); + + /// + // Called: When the mouse wheel moves/changes. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + // d: The mouse wheel movement value. + /// + virtual void OnMouseWheel(int localx, int localy, int d); + + /// + // Called: When the mouse wheel moves/changes on top of the item. + // Params: + // localx: Local mouse X position. + // localy: Local mouse Y position. + // d: The mouse wheel movement value. + /// + virtual void OnMouseWheelInside(int localx, int localy, int d); + + /// + // Called: When a key is pressed. + // Params: + // key: The value of the key that is being pressed. + // shift: Shift key is down. + // ctrl: Control key is down. + // alt: Alternate key is down. + /// + virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + + /// + // Called: When a key is released. + // Params: + // key: The value of the key that is being released. + // shift: Shift key is released. + // ctrl: Control key is released. + // alt: Alternate key is released. + /// + virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + + private: + Window* parentstate_; + Panel* _parent; + }; +} diff --git a/src/interface/ControlFactory.cpp b/src/interface/ControlFactory.cpp index 372ed31..7132499 100644 --- a/src/interface/ControlFactory.cpp +++ b/src/interface/ControlFactory.cpp @@ -50,10 +50,5 @@ ui::Panel * ControlFactory::MainMenu(int x, int y, int width, int height) mainMenu->AddChild(tempButton); //Render options currentX += 18; - tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\x90"); //Pause - tempButton->SetTogglable(true); - mainMenu->AddChild(tempButton); - currentX += 18; - return mainMenu; } diff --git a/src/interface/ControlFactory.h b/src/interface/ControlFactory.h new file mode 100644 index 0000000..0f8ad61 --- /dev/null +++ b/src/interface/ControlFactory.h @@ -0,0 +1,14 @@ +#ifndef CONTROLFACTORY_H +#define CONTROLFACTORY_H + +#include "Panel.h" +#include "Engine.h" + +class ControlFactory +{ +public: + static ui::Panel * MainMenu(int x, int y, int width, int height); + +}; + +#endif // CONTROLFACTORY_H diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 25f2038..55a2370 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -1,22 +1,25 @@ #include #include "Config.h" +#include + #include "Global.h" +#include "interface/Window.h" #include "interface/Platform.h" #include "interface/Engine.h" -#include "interface/State.h" #include "Graphics.h" using namespace ui; +using namespace std; Engine::Engine(): state_(NULL), - statequeued_(NULL), mousex_(0), mousey_(0), mousexp_(0), mouseyp_(0), - FpsLimit(60.0f) + FpsLimit(60.0f), + windows(stack()) { } @@ -40,7 +43,30 @@ void Engine::Exit() running_ = false; } -void Engine::SetState(State * state) +void Engine::ShowWindow(Window * window) +{ + if(state_) + { + windows.push(window); + } + state_ = window; + windows.push(window); +} + +void Engine::CloseWindow() +{ + if(!windows.empty()) + { + state_ = windows.top(); + windows.pop(); + } + else + { + state_ = NULL; + } +} + +/*void Engine::SetState(State * state) { if(state_) //queue if currently in a state statequeued_ = state; @@ -50,7 +76,7 @@ void Engine::SetState(State * state) if(state_) state_->DoInitialized(); } -} +}*/ void Engine::SetSize(int width, int height) { @@ -63,7 +89,7 @@ void Engine::Tick(float dt) if(state_ != NULL) state_->DoTick(dt); - if(statequeued_ != NULL) + /*if(statequeued_ != NULL) { if(state_ != NULL) { @@ -76,15 +102,15 @@ void Engine::Tick(float dt) if(state_ != NULL) state_->DoInitialized(); - } + }*/ } void Engine::Draw() { if(state_) state_->DoDraw(); - Global::Ref().g->Blit(); - Global::Ref().g->Clear(); + g->Blit(); + g->Clear(); } void Engine::onKeyPress(int key, bool shift, bool ctrl, bool alt) diff --git a/src/interface/Engine.h b/src/interface/Engine.h new file mode 100644 index 0000000..7bf78f9 --- /dev/null +++ b/src/interface/Engine.h @@ -0,0 +1,71 @@ +#pragma once + +#include +#include +#include "Singleton.h" +#include "Platform.h" +#include "Graphics.h" +#include "Window.h" + +namespace ui +{ + class Window; + + /* class Engine + * + * Controls the User Interface. + * Send user inputs to the Engine and the appropriate controls and components will interact. + */ + class Engine: public Singleton + { + public: + Engine(); + ~Engine(); + + void ShowWindow(Window * window); + void CloseWindow(); + + void onMouseMove(int x, int y); + void onMouseClick(int x, int y, unsigned button); + void onMouseUnclick(int x, int y, unsigned button); + void onMouseWheel(int x, int y, int delta); + void onKeyPress(int key, bool shift, bool ctrl, bool alt); + void onKeyRelease(int key, bool shift, bool ctrl, bool alt); + void onResize(int newWidth, int newHeight); + void onClose(); + + void Begin(int width, int height); + inline bool Running() { return running_; } + void Exit(); + + void Tick(float dt); + void Draw(); + + inline int GetMouseX() { return mousex_; } + inline int GetMouseY() { return mousey_; } + inline int GetWidth() { return width_; } + inline int GetHeight() { return height_; } + + inline void SetSize(int width, int height); + + //void SetState(Window* state); + //inline State* GetState() { return state_; } + inline Window* GetWindow() { return state_; } + float FpsLimit; + Graphics * g; + private: + std::stack windows; + //Window* statequeued_; + Window* state_; + + bool running_; + + int mousex_; + int mousey_; + int mousexp_; + int mouseyp_; + int width_; + int height_; + }; + +} diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp index c77b6bf..cf09d4e 100644 --- a/src/interface/Label.cpp +++ b/src/interface/Label.cpp @@ -6,7 +6,7 @@ using namespace ui; -Label::Label(State* parent_state, std::string labelText): +Label::Label(Window* parent_state, std::string labelText): Component(parent_state), LabelText(labelText) { @@ -35,6 +35,6 @@ Label::~Label() void Label::Draw(const Point& screenPos) { - Graphics * g = Global::Ref().g; + Graphics * g = Engine::Ref().g; g->drawtext(Position.X+(Size.X-Graphics::textwidth((char *)LabelText.c_str()))/2, Position.Y+(Size.Y-10)/2, LabelText, 255, 255, 255, 255); } diff --git a/src/interface/Label.h b/src/interface/Label.h new file mode 100644 index 0000000..e56852e --- /dev/null +++ b/src/interface/Label.h @@ -0,0 +1,26 @@ +#ifndef LABEL_H +#define LABEL_H + +#include + +#include "Component.h" + +namespace ui +{ + class Label : public Component + { + public: + Label(Window* parent_state, std::string labelText); + + Label(Point position, Point size, std::string labelText); + + Label(std::string labelText); + virtual ~Label(); + + std::string LabelText; + + virtual void Draw(const Point& screenPos); + }; +} + +#endif // LABEL_H diff --git a/src/interface/Panel.cpp b/src/interface/Panel.cpp index e44663a..acfcf53 100644 --- a/src/interface/Panel.cpp +++ b/src/interface/Panel.cpp @@ -5,12 +5,12 @@ #include "interface/Panel.h" #include "interface/Point.h" -#include "interface/State.h" +#include "interface/Window.h" #include "interface/Component.h" using namespace ui; -Panel::Panel(State* parent_state): +Panel::Panel(Window* parent_state): Component(parent_state) { @@ -84,7 +84,7 @@ void Panel::Draw(const Point& screenPos) // the component must be visible if(children[i]->Visible) { - if(GetParentState()->AllowExclusiveDrawing) + if(GetParentWindow()->AllowExclusiveDrawing) { //who cares if the component is off the screen? draw anyway. Point scrpos = screenPos + children[i]->Position; @@ -143,7 +143,7 @@ void Panel::OnMouseClick(int localx, int localy, unsigned button) localy < children[i]->Position.Y + children[i]->Size.Y ) { childclicked = true; - GetParentState()->FocusComponent(children[i]); + GetParentWindow()->FocusComponent(children[i]); children[i]->OnMouseClick(localx - children[i]->Position.X, localy - children[i]->Position.Y, button); break; } @@ -154,7 +154,7 @@ void Panel::OnMouseClick(int localx, int localy, unsigned button) if(!childclicked) { XOnMouseClick(localx, localy, button); - GetParentState()->FocusComponent(this); + GetParentWindow()->FocusComponent(this); } } diff --git a/src/interface/Panel.h b/src/interface/Panel.h new file mode 100644 index 0000000..51f52aa --- /dev/null +++ b/src/interface/Panel.h @@ -0,0 +1,136 @@ +#pragma once +#include +//#include "Platform.h" + +#include "interface/Point.h" +#include "interface/Window.h" +#include "interface/Component.h" + +namespace ui +{ + /* class XComponent + * + * An eXtension of the Component class. + * Adds the ability to have child components. + * + * See sys::Component + */ +class Component; + class Panel : public Component + { + public: + friend class Component; + + Panel(Window* parent_state); + Panel(Point position, Point size); + Panel(); + virtual ~Panel(); + + /* Add a child component. + * Similar to XComponent::SetParent + * + * If the component is already parented, then this will become the new parent. + */ + void AddChild(Component* c); + + // Remove child from component. This DOES NOT free the component from memory. + void RemoveChild(Component* c); + + // Remove child from component. This WILL free the component from memory unless told otherwise. + void RemoveChild(unsigned idx, bool freeMem = true); + + //Grab the number of children this component owns. + int GetChildCount(); + + //Get child of this component by index. + Component* GetChild(unsigned idx); + + void Tick(float dt); + void Draw(const Point& screenPos); + + void OnMouseHover(int localx, int localy); + void OnMouseMoved(int localx, int localy, int dx, int dy); + void OnMouseMovedInside(int localx, int localy, int dx, int dy); + void OnMouseEnter(int localx, int localy); + void OnMouseLeave(int localx, int localy); + void OnMouseDown(int x, int y, unsigned button); + void OnMouseUp(int x, int y, unsigned button); + void OnMouseClick(int localx, int localy, unsigned button); + void OnMouseUnclick(int localx, int localy, unsigned button); + void OnMouseWheel(int localx, int localy, int d); + void OnMouseWheelInside(int localx, int localy, int d); + void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + + protected: + // child components + std::vector children; + + //UI functions: + /* + void XTick(float dt); + void XDraw(const Point& screenPos); + + void XOnMouseHover(int localx, int localy); + void XOnMouseMoved(int localx, int localy, int dx, int dy); + void XOnMouseMovedInside(int localx, int localy, int dx, int dy); + void XOnMouseEnter(int localx, int localy); + void XOnMouseLeave(int localx, int localy); + void XOnMouseDown(int x, int y, unsigned int button); + void XOnMouseUp(int x, int y, unsigned int button); + void XOnMouseClick(int localx, int localy, unsigned int button); + void XOnMouseUnclick(int localx, int localy, unsigned int button); + void XOnMouseWheel(int localx, int localy, int d); + void XOnMouseWheelInside(int localx, int localy, int d); + void XOnKeyPress(int key, bool shift, bool ctrl, bool alt); + void XOnKeyRelease(int key, bool shift, bool ctrl, bool alt); + */ + + // Overridable. Called by XComponent::Tick() + virtual void XTick(float dt); + + // Overridable. Called by XComponent::Draw() + virtual void XDraw(const Point& screenPos); + + + // Overridable. Called by XComponent::XOnMouseHover() + virtual void XOnMouseHover(int localx, int localy); + + // Overridable. Called by XComponent::OnMouseMoved() + virtual void XOnMouseMoved(int localx, int localy, int dx, int dy); + + // Overridable. Called by XComponent::OnMouseMovedInside() + virtual void XOnMouseMovedInside(int localx, int localy, int dx, int dy); + + // Overridable. Called by XComponent::OnMouseEnter() + virtual void XOnMouseEnter(int localx, int localy); + + // Overridable. Called by XComponent::OnMouseLeave() + virtual void XOnMouseLeave(int localx, int localy); + + // Overridable. Called by XComponent::OnMouseDown() + virtual void XOnMouseDown(int x, int y, unsigned button); + + // Overridable. Called by XComponent::OnMouseUp() + virtual void XOnMouseUp(int x, int y, unsigned button); + + // Overridable. Called by XComponent::OnMouseClick() + virtual void XOnMouseClick(int localx, int localy, unsigned button); + + // Overridable. Called by XComponent::OnMouseUnclick() + virtual void XOnMouseUnclick(int localx, int localy, unsigned button); + + // Overridable. Called by XComponent::OnMouseWheel() + virtual void XOnMouseWheel(int localx, int localy, int d); + + // Overridable. Called by XComponent::OnMouseWheelInside() + virtual void XOnMouseWheelInside(int localx, int localy, int d); + + // Overridable. Called by XComponent::OnKeyPress() + virtual void XOnKeyPress(int key, bool shift, bool ctrl, bool alt); + + // Overridable. Called by XComponent::OnKeyRelease() + virtual void XOnKeyRelease(int key, bool shift, bool ctrl, bool alt); + }; + +} diff --git a/src/interface/Platform.h b/src/interface/Platform.h new file mode 100644 index 0000000..c57dca6 --- /dev/null +++ b/src/interface/Platform.h @@ -0,0 +1,108 @@ +#pragma once + + +/* ***** Platform-ness ***** */ + +#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32_LEAN_AND_MEAN) +# define IEF_PLATFORM_WIN32 +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +#elif defined(linux) || defined(_linux) || defined(__linux) +# define IEF_PLATFORM_LINUX + +#elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh) +# define IEF_PLATFORM_MACOSX + +//#elif defined(__FreeBSD__) || define(__FreeBSD_kernel__) +//# define IEF_PLATFORM_FREEBSD + +#else +# error Operating System not supported. +#endif + + +/* ***** Endian-ness ***** */ + +#if defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || (defined(__MIPS__) && defined(__MISPEB__)) || defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || defined(__sparc__) || defined(__hppa__) +# define IEF_ENDIAN_BIG + +#else +# define IEF_ENDIAN_LITTLE +#endif + + +/* ***** Debug-ness ***** */ + +#if !defined(NDEBUG) || defined(_DEBUG) +# define IEF_DEBUG +#endif + + +/* ***** Primitive Types ***** */ + +#ifndef NULL +# define NULL 0 +#endif + +#include +namespace sys +{ + +#if UCHAR_MAX == 0xFF //char + typedef signed char s8; + typedef unsigned char u8; +#else +# error No 8-Bit Integer supported. +#endif +#if USHRT_MAX == 0xFFFF //short + typedef signed short s16; + typedef unsigned short u16; +#elif UINT_MAX == 0xFFFF + typedef signed int s16; + typedef unsigned int u16; +#elif ULONG_MAX == 0xFFFF + typedef signed long s16; + typedef unsigned long u16; + #else + # error No 16-Bit Integer supported. + #endif + #if USHRT_MAX == 0xFFFFFFFF //int + typedef signed short s32; + typedef unsigned short u32; +#elif UINT_MAX == 0xFFFFFFFF + typedef signed int s32; + typedef unsigned int u32; +#elif ULONG_MAX == 0xFFFFFFFF + typedef signed long s32; + typedef unsigned long u32; + #else + # error No 32-Bit Integer supported. + #endif +#if UINT_MAX == 0xFFFFFFFFFFFFFFFF //long + typedef signed int s64; + typedef unsigned int u64; +#elif ULONG_MAX == 0xFFFFFFFFFFFFFFFF + typedef signed long s64; + typedef unsigned long u64; +#elif ULLONG_MAX == 0xFFFFFFFFFFFFFFFF + typedef signed long long s64; + typedef unsigned long long u64; +#else +# pragma message("Warning: 64-bit not supported. s64 and u64 defined as 32-bit.") + typedef s32 s64; + typedef u32 u64; +#endif +//floating +typedef float f32; +typedef double f64; +//misc +typedef u8 byte; +typedef u8 ubyte; +typedef s8 sbyte; +typedef s64 llong; +typedef s64 sllong; +typedef u64 ullong; +typedef char* cstring; + +} //namespace sys diff --git a/src/interface/Point.h b/src/interface/Point.h new file mode 100644 index 0000000..0d0250c --- /dev/null +++ b/src/interface/Point.h @@ -0,0 +1,136 @@ +#pragma once +#include "Platform.h" + +namespace ui +{ + +//Lightweight 2D Int32/Float32 Point struct for UI +struct Point +{ +#if ENABLE_FLOAT_UI +# define POINT_T float +#else +# define POINT_T int +#endif + + POINT_T X; + POINT_T Y; + + Point(POINT_T x, POINT_T y) + : X(x) + , Y(y) + { + } + + inline Point operator - () const + { + return Point(-X, -Y); + } + + inline Point operator + (const Point& v) const + { + return Point(X + v.X, Y + v.Y); + } + + inline Point operator - (const Point& v) const + { + return Point(X - v.X, Y - v.Y); + } + + inline Point operator * (const Point& v) const + { + return Point(X * v.X, Y * v.Y); + } + + inline Point operator * (int v) const + { + return Point(X * static_cast(v), Y * static_cast(v)); + } + + inline Point operator * (float v) const + { + return Point(X * static_cast(v), Y * static_cast(v)); + } + + inline Point operator / (const Point& v) const + { + return Point(X / v.X, Y / v.Y); + } + + inline Point operator / (int v) const + { + return Point(X / static_cast(v), Y / static_cast(v)); + } + + inline Point operator / (float v) const + { + return Point(X / static_cast(v), Y / static_cast(v)); + } + + inline void operator += (const Point& v) + { + X += v.X; + Y += v.Y; + } + + inline void operator -= (const Point& v) + { + X -= v.X; + Y -= v.Y; + } + + inline void operator *= (const Point& v) + { + X *= v.X; + Y *= v.Y; + } + + inline void operator *= (int v) + { + X *= static_cast(v); + Y *= static_cast(v); + } + + inline void operator *= (float v) + { + X *= static_cast(v); + Y *= static_cast(v); + } + + inline void operator /= (const Point& v) + { + X /= v.X; + Y /= v.Y; + } + + inline void operator /= (int v) + { + X /= static_cast(v); + Y /= static_cast(v); + } + + inline void operator /= (float v) + { + X /= static_cast(v); + Y /= static_cast(v); + } + + inline bool operator == (const Point& v) const + { + return (X == v.X && Y == v.Y); + } + + inline bool operator != (const Point& v) const + { + return (X != v.X || Y != v.Y); + } + + inline void operator = (const Point& v) + { + X = v.X; + Y = v.Y; + } + +}; + +} diff --git a/src/interface/Sandbox.cpp b/src/interface/Sandbox.cpp index a9760e7..9a858f8 100644 --- a/src/interface/Sandbox.cpp +++ b/src/interface/Sandbox.cpp @@ -16,6 +16,7 @@ #include "interface/Component.h" #include "Renderer.h" #include "Simulation.h" +#include "Engine.h" namespace ui { @@ -60,7 +61,7 @@ void Sandbox::OnMouseUp(int localx, int localy, unsigned int button) void Sandbox::Draw(const Point& screenPos) { - Graphics * g = Global::Ref().g; + Graphics * g = Engine::Ref().g; if(!ren) ren = new Renderer(g, sim); ren->render_parts(); diff --git a/src/interface/Sandbox.h b/src/interface/Sandbox.h new file mode 100644 index 0000000..fb4a668 --- /dev/null +++ b/src/interface/Sandbox.h @@ -0,0 +1,39 @@ +/* + * Sandbox.h + * + * Created on: Jan 8, 2012 + * Author: Simon + */ + +#ifndef SANDBOX_H_ +#define SANDBOX_H_ + +#include +#include "Point.h" +#include "Component.h" +#include "Simulation.h" +#include "Renderer.h" + +namespace ui { + +class Sandbox: public ui::Component { +private: + int lastCoordX, lastCoordY; + int activeElement; + std::queue pointQueue; + bool isMouseDown; + Renderer * ren; + Simulation * sim; +public: + Sandbox(); + virtual Simulation * GetSimulation(); + virtual void OnMouseMoved(int localx, int localy, int dx, int dy); + virtual void OnMouseClick(int localx, int localy, unsigned int button); + virtual void OnMouseUp(int localx, int localy, unsigned int button); + virtual void Draw(const Point& screenPos); + virtual void Tick(float delta); + virtual ~Sandbox(); +}; + +} /* namespace ui */ +#endif /* SANDBOX_H_ */ diff --git a/src/interface/State.cpp b/src/interface/State.cpp deleted file mode 100644 index 665e2e8..0000000 --- a/src/interface/State.cpp +++ /dev/null @@ -1,291 +0,0 @@ -#include -#include "interface/Component.h" -#include "interface/Engine.h" -#include "interface/State.h" -//#include "Platform.h" - -using namespace ui; - -State::State() -: UserData(NULL) -, focusedComponent_(NULL) -{ -} - -State::~State() -{ - for(unsigned i = 0, sz = Components.size(); i < sz; ++i) - if( Components[i] ) - delete Components[i]; -} - -void State::AddComponent(Component* c) -{ - // TODO: do a check if component was already added? - if(c->GetParentState()==NULL) - { - c->SetParentState(this); - Components.push_back(c); - } - else - { - //Component already has a state, don't sad it - } -} - -unsigned State::GetComponentCount() -{ - return Components.size(); -} - -Component* State::GetComponent(unsigned idx) -{ - return Components[idx]; -} - -void State::RemoveComponent(Component* c) -{ - // remove component WITHOUT freeing it. - for(unsigned i = 0; i < Components.size(); ++i) - { - // find the appropriate component index - if(Components[i] == c) - { - Components.erase(Components.begin() + i); - - // we're done - return; - } - } -} - -void State::RemoveComponent(unsigned idx) -{ - // free component and remove it. - delete Components[idx]; - Components.erase(Components.begin() + idx); -} - -bool State::IsFocused(const Component* c) const -{ - return c == focusedComponent_; -} - -void State::FocusComponent(Component* c) -{ - this->focusedComponent_ = c; -} - -void State::DoExit() -{ - - OnExit(); -} - -void State::DoInitialized() -{ - - OnInitialized(); -} - -void State::DoDraw() -{ - //draw - for(int i = 0, sz = Components.size(); i < sz; ++i) - if(Components[i]->Visible) - { - if(AllowExclusiveDrawing) - { - Point scrpos(Components[i]->Position.X, Components[i]->Position.Y); - Components[i]->Draw(scrpos); - } - else - { - if( Components[i]->Position.X + Components[i]->Size.X >= 0 && - Components[i]->Position.Y + Components[i]->Size.Y >= 0 && - Components[i]->Position.X < ui::Engine::Ref().GetWidth() && - Components[i]->Position.Y < ui::Engine::Ref().GetHeight() ) - { - Point scrpos(Components[i]->Position.X, Components[i]->Position.Y); - Components[i]->Draw( Point(scrpos) ); - } - } - } - - OnDraw(); -} - -void State::DoTick(float dt) -{ - //on mouse hover - for(int i = Components.size() - 1; i >= 0; --i) - { - if(!Components[i]->Locked && - ui::Engine::Ref().GetMouseX() >= Components[i]->Position.X && - ui::Engine::Ref().GetMouseY() >= Components[i]->Position.Y && - ui::Engine::Ref().GetMouseX() < Components[i]->Position.X + Components[i]->Size.X && - ui::Engine::Ref().GetMouseY() < Components[i]->Position.Y + Components[i]->Size.Y ) - { - Components[i]->OnMouseHover(ui::Engine::Ref().GetMouseX() - Components[i]->Position.X, ui::Engine::Ref().GetMouseY() - Components[i]->Position.Y); - break; - } - } - - //tick - for(int i = 0, sz = Components.size(); i < sz; ++i) - { - Components[i]->Tick(dt); - } - - OnTick(dt); -} - -void State::DoKeyPress(int key, bool shift, bool ctrl, bool alt) -{ - //on key press - if(focusedComponent_ != NULL) - { - if(!focusedComponent_->Locked) - focusedComponent_->OnKeyPress(key, shift, ctrl, alt); - } - - OnKeyPress(key, shift, ctrl, alt); -} - -void State::DoKeyRelease(int key, bool shift, bool ctrl, bool alt) -{ - //on key unpress - if(focusedComponent_ != NULL) - { - if(!focusedComponent_->Locked) - focusedComponent_->OnKeyRelease(key, shift, ctrl, alt); - } - - OnKeyRelease(key, shift, ctrl, alt); -} - -void State::DoMouseDown(int x, int y, unsigned button) -{ - //on mouse click - bool clickState = false; - for(int i = Components.size() - 1; i > -1 ; --i) - { - if(!Components[i]->Locked) - { - if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) - { - FocusComponent(Components[i]); - Components[i]->OnMouseClick(x - Components[i]->Position.X, y - Components[i]->Position.Y, button); - clickState = true; - break; - } - } - } - - if(!clickState) - FocusComponent(NULL); - - //on mouse down - for(int i = Components.size() - 1; i > -1 ; --i) - { - if(!Components[i]->Locked) - Components[i]->OnMouseDown(x, y, button); - } - - OnMouseDown(x, y, button); -} - -void State::DoMouseMove(int x, int y, int dx, int dy) -{ - //on mouse move (if true, and inside) - for(int i = Components.size() - 1; i > -1 ; --i) - { - if(!Components[i]->Locked) - { - Point local (x - Components[i]->Position.X, y - Components[i]->Position.Y) - , a (local.X - dx, local.Y - dy); - - Components[i]->OnMouseMoved(local.X, local.Y, dx, dy); - - if(local.X >= 0 && - local.Y >= 0 && - local.X < Components[i]->Size.X && - local.Y < Components[i]->Size.Y ) - { - Components[i]->OnMouseMovedInside(local.X, local.Y, dx, dy); - - // entering? - if(!( - a.X >= 0 && - a.Y >= 0 && - a.X < Components[i]->Size.X && - a.Y < Components[i]->Size.Y )) - { - Components[i]->OnMouseEnter(local.X, local.Y); - } - } - else - { - // leaving? - if( a.X >= 0 && - a.Y >= 0 && - a.X < Components[i]->Size.X && - a.Y < Components[i]->Size.Y ) - { - Components[i]->OnMouseLeave(local.X, local.Y); - } - - } - } - } - - OnMouseMove(x, y, dx, dy); -} - -void State::DoMouseUp(int x, int y, unsigned button) -{ - //on mouse unclick - for(int i = Components.size() - 1; i >= 0 ; --i) - { - if(!Components[i]->Locked) - { - if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) - { - Components[i]->OnMouseUnclick(x - Components[i]->Position.X, y - Components[i]->Position.Y, button); - break; - } - } - } - - //on mouse up - for(int i = Components.size() - 1; i >= 0 ; --i) - { - if(!Components[i]->Locked) - Components[i]->OnMouseUp(x, y, button); - } - - OnMouseUp(x, y, button); -} - -void State::DoMouseWheel(int x, int y, int d) -{ - //on mouse wheel focused - for(int i = Components.size() - 1; i >= 0 ; --i) - { - if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) - { - if(!Components[i]->Locked) - Components[i]->OnMouseWheelInside(x - Components[i]->Position.X, y - Components[i]->Position.Y, d); - break; - } - } - - //on mouse wheel - for(int i = Components.size() - 1; i >= 0 ; --i) - { - if(!Components[i]->Locked) - Components[i]->OnMouseWheel(x - Components[i]->Position.X, y - Components[i]->Position.Y, d); - } - - OnMouseWheel(x, y, d); -} diff --git a/src/interface/Window.cpp b/src/interface/Window.cpp new file mode 100644 index 0000000..e28d34b --- /dev/null +++ b/src/interface/Window.cpp @@ -0,0 +1,291 @@ +#include "Window.h" +#include "Component.h" +#include "interface/Point.h" + +using namespace ui; + +Window::Window(Point _position, Point _size): + Position(_position), + Size(_size), + focusedComponent_(NULL) +{ +} + +Window::~Window() +{ + for(unsigned i = 0, sz = Components.size(); i < sz; ++i) + if( Components[i] ) + delete Components[i]; +} + +void Window::AddComponent(Component* c) +{ + // TODO: do a check if component was already added? + if(c->GetParentWindow()==NULL) + { + c->SetParentWindow(this); + Components.push_back(c); + } + else + { + //Component already has a state, don't sad it + } +} + +unsigned Window::GetComponentCount() +{ + return Components.size(); +} + +Component* Window::GetComponent(unsigned idx) +{ + return Components[idx]; +} + +void Window::RemoveComponent(Component* c) +{ + // remove component WITHOUT freeing it. + for(unsigned i = 0; i < Components.size(); ++i) + { + // find the appropriate component index + if(Components[i] == c) + { + Components.erase(Components.begin() + i); + + // we're done + return; + } + } +} + +void Window::RemoveComponent(unsigned idx) +{ + // free component and remove it. + delete Components[idx]; + Components.erase(Components.begin() + idx); +} + +bool Window::IsFocused(const Component* c) const +{ + return c == focusedComponent_; +} + +void Window::FocusComponent(Component* c) +{ + this->focusedComponent_ = c; +} + +void Window::DoExit() +{ + + OnExit(); +} + +void Window::DoInitialized() +{ + + OnInitialized(); +} + +void Window::DoDraw() +{ + //draw + for(int i = 0, sz = Components.size(); i < sz; ++i) + if(Components[i]->Visible) + { + if(AllowExclusiveDrawing) + { + Point scrpos(Components[i]->Position.X, Components[i]->Position.Y); + Components[i]->Draw(scrpos); + } + else + { + if( Components[i]->Position.X+Position.X + Components[i]->Size.X >= 0 && + Components[i]->Position.Y+Position.Y + Components[i]->Size.Y >= 0 && + Components[i]->Position.X+Position.X < ui::Engine::Ref().GetWidth() && + Components[i]->Position.Y+Position.Y < ui::Engine::Ref().GetHeight() ) + { + Point scrpos(Components[i]->Position.X + Position.X, Components[i]->Position.Y + Position.Y); + Components[i]->Draw( Point(scrpos) ); + } + } + } + + OnDraw(); +} + +void Window::DoTick(float dt) +{ + //on mouse hover + for(int i = Components.size() - 1; i >= 0; --i) + { + if(!Components[i]->Locked && + ui::Engine::Ref().GetMouseX() >= Components[i]->Position.X+Position.X && + ui::Engine::Ref().GetMouseY() >= Components[i]->Position.Y+Position.Y && + ui::Engine::Ref().GetMouseX() < Components[i]->Position.X+Position.X + Components[i]->Size.X && + ui::Engine::Ref().GetMouseY() < Components[i]->Position.Y+Position.Y + Components[i]->Size.Y ) + { + Components[i]->OnMouseHover(ui::Engine::Ref().GetMouseX() - (Components[i]->Position.X + Position.X), ui::Engine::Ref().GetMouseY() - (Components[i]->Position.Y + Position.Y)); + break; + } + } + + //tick + for(int i = 0, sz = Components.size(); i < sz; ++i) + { + Components[i]->Tick(dt); + } + + OnTick(dt); +} + +void Window::DoKeyPress(int key, bool shift, bool ctrl, bool alt) +{ + //on key press + if(focusedComponent_ != NULL) + { + if(!focusedComponent_->Locked) + focusedComponent_->OnKeyPress(key, shift, ctrl, alt); + } + + OnKeyPress(key, shift, ctrl, alt); +} + +void Window::DoKeyRelease(int key, bool shift, bool ctrl, bool alt) +{ + //on key unpress + if(focusedComponent_ != NULL) + { + if(!focusedComponent_->Locked) + focusedComponent_->OnKeyRelease(key, shift, ctrl, alt); + } + + OnKeyRelease(key, shift, ctrl, alt); +} + +void Window::DoMouseDown(int x, int y, unsigned button) +{ + //on mouse click + bool clickState = false; + for(int i = Components.size() - 1; i > -1 ; --i) + { + if(!Components[i]->Locked) + { + if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) + { + FocusComponent(Components[i]); + Components[i]->OnMouseClick(x - Components[i]->Position.X, y - Components[i]->Position.Y, button); + clickState = true; + break; + } + } + } + + if(!clickState) + FocusComponent(NULL); + + //on mouse down + for(int i = Components.size() - 1; i > -1 ; --i) + { + if(!Components[i]->Locked) + Components[i]->OnMouseDown(x, y, button); + } + + OnMouseDown(x, y, button); +} + +void Window::DoMouseMove(int x, int y, int dx, int dy) +{ + //on mouse move (if true, and inside) + for(int i = Components.size() - 1; i > -1 ; --i) + { + if(!Components[i]->Locked) + { + Point local (x - Components[i]->Position.X, y - Components[i]->Position.Y) + , a (local.X - dx, local.Y - dy); + + Components[i]->OnMouseMoved(local.X, local.Y, dx, dy); + + if(local.X >= 0 && + local.Y >= 0 && + local.X < Components[i]->Size.X && + local.Y < Components[i]->Size.Y ) + { + Components[i]->OnMouseMovedInside(local.X, local.Y, dx, dy); + + // entering? + if(!( + a.X >= 0 && + a.Y >= 0 && + a.X < Components[i]->Size.X && + a.Y < Components[i]->Size.Y )) + { + Components[i]->OnMouseEnter(local.X, local.Y); + } + } + else + { + // leaving? + if( a.X >= 0 && + a.Y >= 0 && + a.X < Components[i]->Size.X && + a.Y < Components[i]->Size.Y ) + { + Components[i]->OnMouseLeave(local.X, local.Y); + } + + } + } + } + + OnMouseMove(x, y, dx, dy); +} + +void Window::DoMouseUp(int x, int y, unsigned button) +{ + //on mouse unclick + for(int i = Components.size() - 1; i >= 0 ; --i) + { + if(!Components[i]->Locked) + { + if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) + { + Components[i]->OnMouseUnclick(x - Components[i]->Position.X, y - Components[i]->Position.Y, button); + break; + } + } + } + + //on mouse up + for(int i = Components.size() - 1; i >= 0 ; --i) + { + if(!Components[i]->Locked) + Components[i]->OnMouseUp(x, y, button); + } + + OnMouseUp(x, y, button); +} + +void Window::DoMouseWheel(int x, int y, int d) +{ + //on mouse wheel focused + for(int i = Components.size() - 1; i >= 0 ; --i) + { + if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) + { + if(!Components[i]->Locked) + Components[i]->OnMouseWheelInside(x - Components[i]->Position.X, y - Components[i]->Position.Y, d); + break; + } + } + + //on mouse wheel + for(int i = Components.size() - 1; i >= 0 ; --i) + { + if(!Components[i]->Locked) + Components[i]->OnMouseWheel(x - Components[i]->Position.X, y - Components[i]->Position.Y, d); + } + + OnMouseWheel(x, y, d); +} + diff --git a/src/interface/Window.h b/src/interface/Window.h new file mode 100644 index 0000000..581b91f --- /dev/null +++ b/src/interface/Window.h @@ -0,0 +1,103 @@ +#ifndef WINDOW_H +#define WINDOW_H + +#include +#include "interface/Point.h" +#include "Engine.h" + +namespace ui +{ + +enum ChromeStyle +{ + None, Title, Resizable +}; +//class State; + class Engine; + class Component; + + /* class State + * + * A UI state. Contains all components. + */ + class Window + { + public: + Window(Point _position, Point _size); + virtual ~Window(); + + bool AllowExclusiveDrawing; //false will not call draw on objects outside of bounds + + // Add Component to state + void AddComponent(Component* c); + + // Get the number of components this state has. + unsigned GetComponentCount(); + + // Get component by index. (See GetComponentCount()) + Component* GetComponent(unsigned idx); + + // Remove a component from state. NOTE: This DOES NOT free component from memory. + void RemoveComponent(Component* c); + + // Remove a component from state. NOTE: This WILL free component from memory. + void RemoveComponent(unsigned idx); + + virtual void DoInitialized(); + virtual void DoExit(); + virtual void DoTick(float dt); + virtual void DoDraw(); + + virtual void DoMouseMove(int x, int y, int dx, int dy); + virtual void DoMouseDown(int x, int y, unsigned button); + virtual void DoMouseUp(int x, int y, unsigned button); + virtual void DoMouseWheel(int x, int y, int d); + virtual void DoKeyPress(int key, bool shift, bool ctrl, bool alt); + virtual void DoKeyRelease(int key, bool shift, bool ctrl, bool alt); + + bool IsFocused(const Component* c) const; + void FocusComponent(Component* c); + + void* UserData; + + protected: + virtual void OnInitialized() {} + virtual void OnExit() {} + virtual void OnTick(float dt) {} + virtual void OnDraw() {} + + virtual void OnMouseMove(int x, int y, int dx, int dy) {} + virtual void OnMouseDown(int x, int y, unsigned button) {} + virtual void OnMouseUp(int x, int y, unsigned button) {} + virtual void OnMouseWheel(int x, int y, int d) {} + virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt) {} + virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {} + std::vector Components; + Component* focusedComponent_; + + Point Position; + Point Size; + ChromeStyle chrome; + + }; + + +/*class Window : public State +{ +private: + ChromeStyle chrome; +public: + Window(Point _position, Point _size); + Point Position; + Point Size; + + virtual void DoTick(float dt); + virtual void DoDraw(); + + virtual void DoMouseMove(int x, int y, int dx, int dy); + virtual void DoMouseDown(int x, int y, unsigned button); + virtual void DoMouseUp(int x, int y, unsigned button); + virtual void DoMouseWheel(int x, int y, int d); +};*/ +} +#endif // WINDOW_H diff --git a/src/search/Save.h b/src/search/Save.h new file mode 100644 index 0000000..a3ef485 --- /dev/null +++ b/src/search/Save.h @@ -0,0 +1,41 @@ +#ifndef SAVE_H +#define SAVE_H + +#include + +using namespace std; + +class Save +{ +private: + int id; + int votesUp, votesDown; + string userName; + string name; +public: + Save(int _id, int _votesUp, int _votesDown, string _userName, string _name): + id(_id), + votesUp(_votesUp), + votesDown(_votesDown), + userName(_userName), + name(_name) + { + } + + void SetName(string name){ this->name = name; } + string GetName(){ return name; } + + void SetUserName(string userName){ this->userName = userName; } + string GetUserName(){ return userName; } + + void SetID(int id){ this->id = id; } + int GetID(){ return id; } + + void SetVotesUp(int votesUp){ this->votesUp = votesUp; } + int GetVotesUp(){ return votesUp; } + + void SetVotesDown(int votesDown){ this->votesDown = votesDown; } + int GetVotesDown(){ return votesDown; } +}; + +#endif // SAVE_H diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp new file mode 100644 index 0000000..cf13f2e --- /dev/null +++ b/src/search/SearchController.cpp @@ -0,0 +1,14 @@ +#include "SearchController.h" +#include "SearchModel.h" +#include "SearchView.h" +#include "interface/Panel.h" + +SearchController::SearchController() +{ + searchModel = new SearchModel(); + searchView = new SearchView(); + searchModel->AddObserver(searchView); + + //Set up interface + //windowPanel.AddChild(); +} diff --git a/src/search/SearchController.h b/src/search/SearchController.h new file mode 100644 index 0000000..8755a07 --- /dev/null +++ b/src/search/SearchController.h @@ -0,0 +1,18 @@ +#ifndef SEARCHCONTROLLER_H +#define SEARCHCONTROLLER_H + +#include "interface/Panel.h" +#include "SearchModel.h" +#include "SearchView.h" + +class SearchController +{ +private: + SearchModel * searchModel; + SearchView * searchView; + ui::Panel * windowPanel; +public: + SearchController(); +}; + +#endif // SEARCHCONTROLLER_H diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp new file mode 100644 index 0000000..63188bd --- /dev/null +++ b/src/search/SearchModel.cpp @@ -0,0 +1,23 @@ +#include "SearchModel.h" +#include "Save.h" + +SearchModel::SearchModel() +{ +} + +void SearchModel::UpdateSaveList() +{ + saveList.clear(); + notifySaveListChanged(); + saveList.push_back(Save(1, 45, 5, "Simon", "Post logic gates")); + notifySaveListChanged(); +} + +void SearchModel::notifySaveListChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + SearchView* cObserver = observers[i]; + cObserver->NotifySaveListChanged(this); + } +} diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h new file mode 100644 index 0000000..0951577 --- /dev/null +++ b/src/search/SearchModel.h @@ -0,0 +1,23 @@ +#ifndef SEARCHMODEL_H +#define SEARCHMODEL_H + +#include +#include "Save.h" +#include "SearchView.h" + +using namespace std; + +class SearchModel +{ +private: + vector observers; + vector saveList; + void notifySaveListChanged(); +public: + SearchModel(); + void AddObserver(SearchView * observer){ observers.push_back(observer); } + void UpdateSaveList(); + vector GetSaveList(); +}; + +#endif // SEARCHMODEL_H diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp new file mode 100644 index 0000000..4b551f3 --- /dev/null +++ b/src/search/SearchView.cpp @@ -0,0 +1,10 @@ +#include "SearchView.h" + +SearchView::SearchView() +{ +} + +void SearchView::NotifySaveListChanged(SearchModel * sender) +{ + +} diff --git a/src/search/SearchView.h b/src/search/SearchView.h new file mode 100644 index 0000000..e540f21 --- /dev/null +++ b/src/search/SearchView.h @@ -0,0 +1,13 @@ +#ifndef SEARCHVIEW_H +#define SEARCHVIEW_H + +class SearchModel; + +class SearchView +{ +public: + void NotifySaveListChanged(SearchModel * sender); + SearchView(); +}; + +#endif // SEARCHVIEW_H -- cgit v0.9.2-21-gd62e From 44639a6423c03552a3c0faafab27ef8f395f73a6 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 19 Jan 2012 13:44:59 +0000 Subject: Some folder changes, started search and client diff --git a/Makefile b/Makefile index 4d20bfc..43fa157 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,8 @@ OBJS += $(patsubst src/%.cpp,build/obj/powder.exe/%.o,$(SOURCES)) FOLDERS := $(sort $(dir $(OBJS))) -CFLAGS := -Wno-deprecated -Wno-deprecated-declarations -Isrc/ -Idata/ -DWIN32 -DWINCONSOLE -OFLAGS := -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -msse2 -fkeep-inline-functions +CFLAGS := -w -Isrc/ -Idata/ -DWIN32 -DWINCONSOLE +OFLAGS := -fkeep-inline-functions #-O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -msse2 LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 # -mwindows CFLAGS += $(OFLAGS) diff --git a/PowderToy++.files b/PowderToy++.files index 5a30285..af47ebb 100644 --- a/PowderToy++.files +++ b/PowderToy++.files @@ -140,7 +140,6 @@ includes/Console.h includes/interface/Engine.h includes/interface/Platform.h src/interface/State.cpp -src/interface/Sandbox.cpp src/interface/Panel.cpp src/interface/Engine.cpp src/interface/ControlFactory.cpp @@ -290,7 +289,6 @@ src/elements/acid.cpp src/elements/acel.cpp src/interface/Window.h src/interface/State.h -src/interface/Sandbox.h src/interface/Point.h src/interface/Platform.h src/interface/Panel.h @@ -308,3 +306,23 @@ src/interface/Engine.cpp src/interface/ControlFactory.cpp src/interface/Component.cpp src/interface/Button.cpp +src/interface/SaveButton.h +src/interface/SaveButton.cpp +src/client/Client.h +src/client/Client.cpp +src/client/HTTP.h +src/client/HTTP.c +src/client/HTTP.cpp +src/client/MD5.cpp +src/client/MD5.h +src/search/Thumbnail.h +src/simulation/Simulation.h +src/simulation/Gravity.h +src/simulation/Elements.h +src/simulation/ElementGraphics.h +src/simulation/ElementFunctions.h +src/simulation/Element.h +src/simulation/Air.h +src/simulation/Simulation.cpp +src/simulation/Gravity.cpp +src/simulation/Air.cpp diff --git a/src/Air.cpp b/src/Air.cpp deleted file mode 100644 index 2d8d1b5..0000000 --- a/src/Air.cpp +++ /dev/null @@ -1,301 +0,0 @@ -#include -#include "Config.h" -#include "Air.h" -//#include -//#include -#include "gravity.h" - -/*float kernel[9]; - -float vx[YRES/CELL][XRES/CELL], ovx[YRES/CELL][XRES/CELL]; -float vy[YRES/CELL][XRES/CELL], ovy[YRES/CELL][XRES/CELL]; -float pv[YRES/CELL][XRES/CELL], opv[YRES/CELL][XRES/CELL]; -unsigned char bmap_blockair[YRES/CELL][XRES/CELL]; - -float cb_vx[YRES/CELL][XRES/CELL]; -float cb_vy[YRES/CELL][XRES/CELL]; -float cb_pv[YRES/CELL][XRES/CELL]; -float cb_hv[YRES/CELL][XRES/CELL]; - -float fvx[YRES/CELL][XRES/CELL], fvy[YRES/CELL][XRES/CELL]; - -float hv[YRES/CELL][XRES/CELL], ohv[YRES/CELL][XRES/CELL]; // For Ambient Heat */ - -void Air::make_kernel(void) //used for velocity -{ - int i, j; - float s = 0.0f; - for (j=-1; j<2; j++) - for (i=-1; i<2; i++) - { - kernel[(i+1)+3*(j+1)] = expf(-2.0f*(i*i+j*j)); - s += kernel[(i+1)+3*(j+1)]; - } - s = 1.0f / s; - for (j=-1; j<2; j++) - for (i=-1; i<2; i++) - kernel[(i+1)+3*(j+1)] *= s; -} -void Air::update_airh(void) -{ - int x, y, i, j; - float dh, dx, dy, f, tx, ty; - for (i=0; i0 && y+j0 && x+i=2 && i=2 && j0) - vy[y][x] -= airdiff/5000.0f; - } - ohv[y][x] = dh; - } - } - memcpy(hv, ohv, sizeof(hv)); -} - -void Air::update_air(void) -{ - int x, y, i, j; - float dp, dx, dy, f, tx, ty; - - for (y=0; y0 && y+j0 && x+i=2 && i=2 && j 256.0f) dp = 256.0f; - if (dp < -256.0f) dp = -256.0f; - if (dx > 256.0f) dx = 256.0f; - if (dx < -256.0f) dx = -256.0f; - if (dy > 256.0f) dy = 256.0f; - if (dy < -256.0f) dy = -256.0f; - - - switch (airMode) - { - default: - case 0: //Default - break; - case 1: //0 Pressure - dp = 0.0f; - break; - case 2: //0 Velocity - dx = 0.0f; - dy = 0.0f; - break; - case 3: //0 Air - dx = 0.0f; - dy = 0.0f; - dp = 0.0f; - break; - case 4: //No Update - break; - } - - ovx[y][x] = dx; - ovy[y][x] = dy; - opv[y][x] = dp; - } - memcpy(vx, ovx, sizeof(vx)); - memcpy(vy, ovy, sizeof(vy)); - memcpy(pv, opv, sizeof(pv)); - } -} -Air::Air() -{ - //Simulation should do this. - make_kernel(); -} diff --git a/src/Air.h b/src/Air.h deleted file mode 100644 index 8e4dc25..0000000 --- a/src/Air.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef AIR_H -#define AIR_H -#include "Config.h" - -class Simulation; - -class Air -{ -public: - int airMode; - //Arrays from the simulation - unsigned char (*bmap)[XRES/CELL]; - unsigned char (*emap)[XRES/CELL]; - float (*fvx)[XRES/CELL]; - float (*fvy)[XRES/CELL]; - // - float vx[YRES/CELL][XRES/CELL]; - float ovx[YRES/CELL][XRES/CELL]; - float vy[YRES/CELL][XRES/CELL]; - float ovy[YRES/CELL][XRES/CELL]; - float pv[YRES/CELL][XRES/CELL]; - float opv[YRES/CELL][XRES/CELL]; - float hv[YRES/CELL][XRES/CELL]; - float ohv[YRES/CELL][XRES/CELL]; // Ambient Heat - unsigned char bmap_blockair[YRES/CELL][XRES/CELL]; - float kernel[9]; - void make_kernel(void); - void update_airh(void); - void update_air(void); - Air(); -}; - -#endif diff --git a/src/Console.h b/src/Console.h index 657f935..8f7a072 100644 --- a/src/Console.h +++ b/src/Console.h @@ -5,7 +5,7 @@ #include #include "interface/Sandbox.h" -#include "Simulation.h" +#include "simulation/Simulation.h" class ConsoleCommand { diff --git a/src/Element.h b/src/Element.h deleted file mode 100644 index 449bf51..0000000 --- a/src/Element.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef ELEMENT_H -#define ELEMENT_H -// This header should be included by all files in src/elements/ - -#include -#include "Simulation.h" -#include "Renderer.h" -#include "ElementFunctions.h" -//#include "powder.h" -#include "Gravity.h" -#include "Misc.h" -#include "ElementGraphics.h" - -#endif diff --git a/src/ElementFunctions.h b/src/ElementFunctions.h deleted file mode 100644 index ef80b6f..0000000 --- a/src/ElementFunctions.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * ElementFunctions.h - * - * Created on: Jan 5, 2012 - * Author: Simon - */ - -#ifndef ELEMENTFUNCTIONS_H_ -#define ELEMENTFUNCTIONS_H_ -#include "Elements.h" - -int update_ACID(UPDATE_FUNC_ARGS); -int update_ANAR(UPDATE_FUNC_ARGS); -int update_AMTR(UPDATE_FUNC_ARGS); -int update_ARAY(UPDATE_FUNC_ARGS); -int update_BCLN(UPDATE_FUNC_ARGS); -int update_BCOL(UPDATE_FUNC_ARGS); -int update_BMTL(UPDATE_FUNC_ARGS); -int update_BRMT(UPDATE_FUNC_ARGS); -int update_BOMB(UPDATE_FUNC_ARGS); -int update_BOYL(UPDATE_FUNC_ARGS); -int update_BTRY(UPDATE_FUNC_ARGS); -int update_C5(UPDATE_FUNC_ARGS); -int update_CLNE(UPDATE_FUNC_ARGS); -int update_COAL(UPDATE_FUNC_ARGS); -int update_DEUT(UPDATE_FUNC_ARGS); -int update_DSTW(UPDATE_FUNC_ARGS); -int update_FOG(UPDATE_FUNC_ARGS); -int update_FRZW(UPDATE_FUNC_ARGS); -int update_FRZZ(UPDATE_FUNC_ARGS); -int update_FSEP(UPDATE_FUNC_ARGS); -int update_FUSE(UPDATE_FUNC_ARGS); -int update_FIRW(UPDATE_FUNC_ARGS); -int update_FWRK(UPDATE_FUNC_ARGS); -int update_GLAS(UPDATE_FUNC_ARGS); -int update_GLOW(UPDATE_FUNC_ARGS); -int update_GOO(UPDATE_FUNC_ARGS); -int update_HSWC(UPDATE_FUNC_ARGS); -int update_IRON(UPDATE_FUNC_ARGS); -int update_ICEI(UPDATE_FUNC_ARGS); -int update_ISZ(UPDATE_FUNC_ARGS); -int update_LCRY(UPDATE_FUNC_ARGS); -int update_MORT(UPDATE_FUNC_ARGS); -int update_NEUT(UPDATE_FUNC_ARGS); -int update_NPTCT(UPDATE_FUNC_ARGS); -int update_PCLN(UPDATE_FUNC_ARGS); -int update_PHOT(UPDATE_FUNC_ARGS); -int update_PIPE(UPDATE_FUNC_ARGS); -int update_PLNT(UPDATE_FUNC_ARGS); -int update_PLUT(UPDATE_FUNC_ARGS); -int update_PRTI(UPDATE_FUNC_ARGS); -int update_PRTO(UPDATE_FUNC_ARGS); -int update_PYRO(UPDATE_FUNC_ARGS); -int update_PUMP(UPDATE_FUNC_ARGS); -int update_QRTZ(UPDATE_FUNC_ARGS); -int update_RIME(UPDATE_FUNC_ARGS); -int update_SHLD1(UPDATE_FUNC_ARGS); -int update_SHLD2(UPDATE_FUNC_ARGS); -int update_SHLD3(UPDATE_FUNC_ARGS); -int update_SHLD4(UPDATE_FUNC_ARGS); -int update_SING(UPDATE_FUNC_ARGS); -int update_SLTW(UPDATE_FUNC_ARGS); -int update_SPAWN(UPDATE_FUNC_ARGS); -int update_SPAWN2(UPDATE_FUNC_ARGS); -int update_SPNG(UPDATE_FUNC_ARGS); -int update_SPRK(UPDATE_FUNC_ARGS); -int update_STKM(UPDATE_FUNC_ARGS); -int update_STKM2(UPDATE_FUNC_ARGS); -int update_SWCH(UPDATE_FUNC_ARGS); -int update_THDR(UPDATE_FUNC_ARGS); -int update_THRM(UPDATE_FUNC_ARGS); -int update_URAN(UPDATE_FUNC_ARGS); -int update_VINE(UPDATE_FUNC_ARGS); -int update_WARP(UPDATE_FUNC_ARGS); -int update_WATR(UPDATE_FUNC_ARGS); -int update_WIFI(UPDATE_FUNC_ARGS); -int update_WTRV(UPDATE_FUNC_ARGS); -int update_YEST(UPDATE_FUNC_ARGS); -int update_SOAP(UPDATE_FUNC_ARGS); -int update_O2(UPDATE_FUNC_ARGS); -int update_H2(UPDATE_FUNC_ARGS); -int update_NBHL(UPDATE_FUNC_ARGS); -int update_NWHL(UPDATE_FUNC_ARGS); -int update_MERC(UPDATE_FUNC_ARGS); -int update_PBCN(UPDATE_FUNC_ARGS); -int update_GPMP(UPDATE_FUNC_ARGS); -int update_CLST(UPDATE_FUNC_ARGS); -int update_DLAY(UPDATE_FUNC_ARGS); -int update_WIRE(UPDATE_FUNC_ARGS); -int update_GBMB(UPDATE_FUNC_ARGS); -int update_CO2(UPDATE_FUNC_ARGS); -int update_CBNW(UPDATE_FUNC_ARGS); -int update_STOR(UPDATE_FUNC_ARGS); -int update_BIZR(UPDATE_FUNC_ARGS); -int update_PVOD(UPDATE_FUNC_ARGS); -int update_CONV(UPDATE_FUNC_ARGS); -int update_CAUS(UPDATE_FUNC_ARGS); -int update_DEST(UPDATE_FUNC_ARGS); -int update_EMP(UPDATE_FUNC_ARGS); -int update_LIGH(UPDATE_FUNC_ARGS); -int update_FIGH(UPDATE_FUNC_ARGS); -int update_ELEC(UPDATE_FUNC_ARGS); -int update_ACEL(UPDATE_FUNC_ARGS); -int update_DCEL(UPDATE_FUNC_ARGS); -int update_BANG(UPDATE_FUNC_ARGS); -int update_IGNT(UPDATE_FUNC_ARGS); -int update_MISC(UPDATE_FUNC_ARGS); -int update_legacy_PYRO(UPDATE_FUNC_ARGS); -int update_legacy_all(UPDATE_FUNC_ARGS); -int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS); -void STKM_init_legs(Simulation * sim, playerst* playerp, int i); -void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y); - - -int graphics_FIRE(GRAPHICS_FUNC_ARGS); -int graphics_SMKE(GRAPHICS_FUNC_ARGS); -int graphics_PLSM(GRAPHICS_FUNC_ARGS); -int graphics_DEUT(GRAPHICS_FUNC_ARGS); -int graphics_PHOT(GRAPHICS_FUNC_ARGS); -int graphics_NEUT(GRAPHICS_FUNC_ARGS); -int graphics_LAVA(GRAPHICS_FUNC_ARGS); -int graphics_SPRK(GRAPHICS_FUNC_ARGS); -int graphics_QRTZ(GRAPHICS_FUNC_ARGS); -int graphics_CLST(GRAPHICS_FUNC_ARGS); -int graphics_CBNW(GRAPHICS_FUNC_ARGS); -int graphics_SPNG(GRAPHICS_FUNC_ARGS); -int graphics_LIFE(GRAPHICS_FUNC_ARGS); -int graphics_DUST(GRAPHICS_FUNC_ARGS); -int graphics_GRAV(GRAPHICS_FUNC_ARGS); -int graphics_WIFI(GRAPHICS_FUNC_ARGS); -int graphics_PRTI(GRAPHICS_FUNC_ARGS); -int graphics_PRTO(GRAPHICS_FUNC_ARGS); -int graphics_BIZR(GRAPHICS_FUNC_ARGS); -int graphics_PIPE(GRAPHICS_FUNC_ARGS); -int graphics_INVS(GRAPHICS_FUNC_ARGS); -int graphics_ACID(GRAPHICS_FUNC_ARGS); -int graphics_FILT(GRAPHICS_FUNC_ARGS); -int graphics_BRAY(GRAPHICS_FUNC_ARGS); -int graphics_SWCH(GRAPHICS_FUNC_ARGS); -int graphics_THDR(GRAPHICS_FUNC_ARGS); -int graphics_GLOW(GRAPHICS_FUNC_ARGS); -int graphics_LCRY(GRAPHICS_FUNC_ARGS); -int graphics_PCLN(GRAPHICS_FUNC_ARGS); -int graphics_PBCN(GRAPHICS_FUNC_ARGS); -int graphics_DLAY(GRAPHICS_FUNC_ARGS); -int graphics_HSWC(GRAPHICS_FUNC_ARGS); -int graphics_PVOD(GRAPHICS_FUNC_ARGS); -int graphics_STOR(GRAPHICS_FUNC_ARGS); -int graphics_PUMP(GRAPHICS_FUNC_ARGS); -int graphics_GPMP(GRAPHICS_FUNC_ARGS); -int graphics_HFLM(GRAPHICS_FUNC_ARGS); -int graphics_FIRW(GRAPHICS_FUNC_ARGS); -int graphics_BOMB(GRAPHICS_FUNC_ARGS); -int graphics_GBMB(GRAPHICS_FUNC_ARGS); -int graphics_COAL(GRAPHICS_FUNC_ARGS); -int graphics_STKM(GRAPHICS_FUNC_ARGS); -int graphics_STKM2(GRAPHICS_FUNC_ARGS); -int graphics_DEST(GRAPHICS_FUNC_ARGS); -int graphics_EMP(GRAPHICS_FUNC_ARGS); -int graphics_LIGH(GRAPHICS_FUNC_ARGS); -int graphics_FIGH(GRAPHICS_FUNC_ARGS); -int graphics_ELEC(GRAPHICS_FUNC_ARGS); -int graphics_WIRE(GRAPHICS_FUNC_ARGS); -int graphics_ACEL(GRAPHICS_FUNC_ARGS); -int graphics_DCEL(GRAPHICS_FUNC_ARGS); -int graphics_DEFAULT(GRAPHICS_FUNC_ARGS); - -#endif /* ELEMENTFUNCTIONS_H_ */ diff --git a/src/ElementGraphics.h b/src/ElementGraphics.h deleted file mode 100644 index a880e71..0000000 --- a/src/ElementGraphics.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef PGRAPHICS_H -#define PGRAPHICS_H - -#define PMODE 0x00000FFF -#define PMODE_NONE 0x00000000 -#define PMODE_FLAT 0x00000001 -#define PMODE_BLOB 0x00000002 -#define PMODE_BLUR 0x00000004 -#define PMODE_GLOW 0x00000008 -#define PMODE_SPARK 0x00000010 -#define PMODE_FLARE 0x00000020 -#define PMODE_LFLARE 0x00000040 -#define PMODE_ADD 0x00000080 -#define PMODE_BLEND 0x00000100 -#define PSPEC_STICKMAN 0x00000200 - -#define OPTIONS 0x0000F000 -#define NO_DECO 0x00001000 -#define DECO_FIRE 0x00002000 - -#define FIREMODE 0x00FF0000 -#define FIRE_ADD 0x00010000 -#define FIRE_BLEND 0x00020000 - -#define EFFECT 0xFF000000 -#define EFFECT_GRAVIN 0x01000000 -#define EFFECT_GRAVOUT 0x02000000 - -#define RENDER_EFFE OPTIONS | PSPEC_STICKMAN | EFFECT | PMODE_SPARK | PMODE_FLARE | PMODE_LFLARE -#define RENDER_FIRE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND | FIREMODE -#define RENDER_GLOW OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_GLOW | PMODE_ADD | PMODE_BLEND -#define RENDER_BLUR OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLUR | PMODE_ADD | PMODE_BLEND -#define RENDER_BLOB OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLOB | PMODE_ADD | PMODE_BLEND -#define RENDER_BASC OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND -#define RENDER_NONE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT - -#define COLOUR_HEAT 0x00000001 -#define COLOUR_LIFE 0x00000002 -#define COLOUR_GRAD 0x00000004 - -#define COLOUR_DEFAULT 0x00000000 - -#define DISPLAY_AIRC 0x00000001 -#define DISPLAY_AIRP 0x00000002 -#define DISPLAY_AIRV 0x00000004 -#define DISPLAY_AIRH 0x00000008 -#define DISPLAY_AIR 0x0000000F -#define DISPLAY_WARP 0x00000010 -#define DISPLAY_PERS 0x00000020 -#define DISPLAY_EFFE 0x00000040 - -#endif diff --git a/src/Elements.h b/src/Elements.h deleted file mode 100644 index 204460c..0000000 --- a/src/Elements.h +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Elements.h - * - * Created on: Jan 5, 2012 - * Author: Simon - */ - -//#ifndef ELEMENTS_H_ -//#define ELEMENTS_H_ - -//#include "Config.h" -//#include "Simulation.h" - -#define IPL -257.0f -#define IPH 257.0f -#define ITL MIN_TEMP-1 -#define ITH MAX_TEMP+1 -// no transition (PT_NONE means kill part) -#define NT -1 -// special transition - lava ctypes etc need extra code, which is only found and run if ST is given -#define ST PT_NUM - -#define R_TEMP 22 -#define MAX_TEMP 9999 -#define MIN_TEMP 0 -#define O_MAX_TEMP 3500 -#define O_MIN_TEMP -273 - -#define TYPE_PART 0x00001 //1 Powders -#define TYPE_LIQUID 0x00002 //2 Liquids -#define TYPE_SOLID 0x00004 //4 Solids -#define TYPE_GAS 0x00008 //8 Gasses (Includes plasma) -#define TYPE_ENERGY 0x00010 //16 Energy (Thunder, Light, Neutrons etc.) -#define PROP_CONDUCTS 0x00020 //32 Conducts electricity -#define PROP_BLACK 0x00040 //64 Absorbs Photons (not currently implemented or used, a photwl attribute might be better) -#define PROP_NEUTPENETRATE 0x00080 //128 Penetrated by neutrons -#define PROP_NEUTABSORB 0x00100 //256 Absorbs neutrons, reflect is default (not currently implemented or used) -#define PROP_NEUTPASS 0x00200 //512 Neutrons pass through, such as with glass -#define PROP_DEADLY 0x00400 //1024 Is deadly for stickman (not currently implemented or used) -#define PROP_HOT_GLOW 0x00800 //2048 Hot Metal Glow -#define PROP_LIFE 0x01000 //4096 Is a GoL type -#define PROP_RADIOACTIVE 0x02000 //8192 Radioactive -#define PROP_LIFE_DEC 0x04000 //2^14 Life decreases by one every frame if > zero -#define PROP_LIFE_KILL 0x08000 //2^15 Kill when life value is <= zero -#define PROP_LIFE_KILL_DEC 0x10000 //2^16 Kill when life value is decremented to <= zero -#define PROP_SPARKSETTLE 0x20000 //2^17 Allow Sparks/Embers to settle - -#define FLAG_STAGNANT 1 - -#define ST_NONE 0 -#define ST_SOLID 1 -#define ST_LIQUID 2 -#define ST_GAS 3 - -#define UPDATE_FUNC_ARGS Simulation* sim, int i, int x, int y, int surround_space, int nt, Particle *parts, int pmap[YRES][XRES] -// to call another update function with same arguments: -#define UPDATE_FUNC_SUBCALL_ARGS sim, i, x, y, surround_space, nt, parts, pmap - -#define GRAPHICS_FUNC_ARGS Renderer * ren, Particle *cpart, int nx, int ny, int *pixel_mode, int* cola, int *colr, int *colg, int *colb, int *firea, int *firer, int *fireg, int *fireb -#define GRAPHICS_FUNC_SUBCALL_ARGS ren, cpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb - -#define UI_WALLSTART 222 -#define UI_ACTUALSTART 122 -#define UI_WALLCOUNT 25 - -#define WL_WALLELEC 122 -#define WL_EWALL 123 -#define WL_DETECT 124 -#define WL_STREAM 125 -#define WL_SIGN 126 -#define WL_FAN 127 -#define WL_FANHELPER 255 -#define WL_ALLOWLIQUID 128 -#define WL_DESTROYALL 129 -#define WL_ERASE 130 -#define WL_WALL 131 -#define WL_ALLOWAIR 132 -#define WL_ALLOWSOLID 133 -#define WL_ALLOWALLELEC 134 -#define WL_EHOLE 135 - -#define SPC_AIR 236 -#define SPC_HEAT 237 -#define SPC_COOL 238 -#define SPC_VACUUM 239 -#define SPC_WIND 241 -#define SPC_PGRV 243 -#define SPC_NGRV 244 -#define SPC_PROP 246 - -#define WL_ALLOWGAS 140 -#define WL_GRAV 142 -#define WL_ALLOWENERGY 145 - -#define NGT_GOL 0 -#define NGT_HLIF 1 -#define NGT_ASIM 2 -#define NGT_2x2 3 -#define NGT_DANI 4 -#define NGT_AMOE 5 -#define NGT_MOVE 6 -#define NGT_PGOL 7 -#define NGT_DMOE 8 -#define NGT_34 9 -#define NGT_LLIF 10 -#define NGT_STAN 11 -#define NGT_SEED 12 -#define NGT_MAZE 13 -#define NGT_COAG 14 -#define NGT_WALL 15 -#define NGT_GNAR 16 -#define NGT_REPL 17 -#define NGT_MYST 18 -#define NGT_LOTE 19 -#define NGT_FRG2 20 -#define NGT_STAR 21 -#define NGT_FROG 22 -#define NGT_BRAN 23 - -#define PT_NONE 0 -#define PT_DUST 1 -#define PT_WATR 2 -#define PT_OIL 3 -#define PT_FIRE 4 -#define PT_STNE 5 -#define PT_LAVA 6 -#define PT_GUNP 7 -#define PT_NITR 8 -#define PT_CLNE 9 -#define PT_GAS 10 -#define PT_PLEX 11 -#define PT_GOO 12 -#define PT_ICEI 13 -#define PT_METL 14 -#define PT_SPRK 15 -#define PT_SNOW 16 -#define PT_WOOD 17 -#define PT_NEUT 18 -#define PT_PLUT 19 -#define PT_PLNT 20 -#define PT_ACID 21 -#define PT_VOID 22 -#define PT_WTRV 23 -#define PT_CNCT 24 -#define PT_DSTW 25 -#define PT_SALT 26 -#define PT_SLTW 27 -#define PT_DMND 28 -#define PT_BMTL 29 -#define PT_BRMT 30 -#define PT_PHOT 31 -#define PT_URAN 32 -#define PT_WAX 33 -#define PT_MWAX 34 -#define PT_PSCN 35 -#define PT_NSCN 36 -#define PT_LNTG 37 -#define PT_INSL 38 -#define PT_BHOL 39 -#define PT_WHOL 40 -#define PT_RBDM 41 -#define PT_LRBD 42 -#define PT_NTCT 43 -#define PT_SAND 44 -#define PT_GLAS 45 -#define PT_PTCT 46 -#define PT_BGLA 47 -#define PT_THDR 48 -#define PT_PLSM 49 -#define PT_ETRD 50 -#define PT_NICE 51 -#define PT_NBLE 52 -#define PT_BTRY 53 -#define PT_LCRY 54 -#define PT_STKM 55 -#define PT_SWCH 56 -#define PT_SMKE 57 -#define PT_DESL 58 -#define PT_COAL 59 -#define PT_LO2 60 -#define PT_O2 61 -#define PT_INWR 62 -#define PT_YEST 63 -#define PT_DYST 64 -#define PT_THRM 65 -#define PT_GLOW 66 -#define PT_BRCK 67 -#define PT_HFLM 68 -#define PT_FIRW 69 -#define PT_FUSE 70 -#define PT_FSEP 71 -#define PT_AMTR 72 -#define PT_BCOL 73 -#define PT_PCLN 74 -#define PT_HSWC 75 -#define PT_IRON 76 -#define PT_MORT 77 -#define PT_LIFE 78 -#define PT_DLAY 79 -#define PT_CO2 80 -#define PT_DRIC 81 -#define PT_CBNW 82 -#define PT_STOR 83 -#define PT_PVOD 84 -#define PT_CONV 85 -#define PT_CAUS 86 - -#define PT_LIGH 87 -#define PT_TESC 88 -#define PT_DEST 89 - -#define PT_SPNG 90 -#define PT_RIME 91 -#define PT_FOG 92 -#define PT_BCLN 93 -#define PT_LOVE 94 -#define PT_DEUT 95 -#define PT_WARP 96 -#define PT_PUMP 97 -#define PT_FWRK 98 -#define PT_PIPE 99 -#define PT_FRZZ 100 -#define PT_FRZW 101 -#define PT_GRAV 102 -#define PT_BIZR 103 -#define PT_BIZRG 104 -#define PT_BIZRS 105 -#define PT_INST 106 -#define PT_ISOZ 107 -#define PT_ISZS 108 -#define PT_PRTI 109 -#define PT_PRTO 110 -#define PT_PSTE 111 -#define PT_PSTS 112 -#define PT_ANAR 113 -#define PT_VINE 114 -#define PT_INVIS 115 -#define PT_EQUALVEL 116 //all particles equal their velocities -#define PT_SPAWN2 117 -#define PT_SPAWN 118 -#define PT_SHLD1 119 -#define PT_SHLD2 120 -#define PT_SHLD3 121 -#define PT_SHLD4 122 -#define PT_LOLZ 123 -#define PT_WIFI 124 -#define PT_FILT 125 -#define PT_ARAY 126 -#define PT_BRAY 127 -#define PT_STKM2 128 -#define PT_BOMB 129 -#define PT_C5 130 -#define PT_SING 131 -#define PT_QRTZ 132 -#define PT_PQRT 133 -#define PT_EMP 134 -#define PT_BREC 135 -#define PT_ELEC 136 -#define PT_ACEL 137 -#define PT_DCEL 138 -#define PT_BANG 139 -#define PT_IGNT 140 -#define PT_BOYL 141 - -#define OLD_PT_WIND 147 -#define PT_H2 148 -#define PT_SOAP 149 -#define PT_NBHL 150 -#define PT_NWHL 151 -#define PT_MERC 152 -#define PT_PBCN 153 -#define PT_GPMP 154 -#define PT_CLST 155 -#define PT_WIRE 156 -#define PT_GBMB 157 -#define PT_FIGH 158 -#define PT_NUM 159 - - -//#endif /* ELEMENTS_H_ */ diff --git a/src/Graphics.cpp b/src/Graphics.cpp index 52fa4c9..65d198f 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -19,13 +19,13 @@ #endif #include "Config.h" -#include "air.h" -#include "gravity.h" +//#include "simulation/Air.h" +//#include "simulation/Gravity.h" //#include "powder.h" -#define INCLUDE_PSTRUCT -#include "Simulation.h" -#include "Graphics.h" -#include "ElementGraphics.h" +//#define INCLUDE_PSTRUCT +//#include "Simulation.h" +//#include "Graphics.h" +//#include "ElementGraphics.h" #define INCLUDE_FONTDATA #include "font.h" #include "misc.h" @@ -1501,15 +1501,24 @@ void Graphics::draw_image(pixel *img, int x, int y, int w, int h, int a) { int i, j, r, g, b; if (!img) return; - for (j=0; j YRES+MENUSIZE) h = (YRES+MENUSIZE)-y; //Adjust height to prevent drawing off the bottom + if(a >= 255) + for (j=0; j -#include -#include -#include "Config.h" -#include "Gravity.h" -//#include "powder.h" - -#ifdef GRAVFFT -#include -#endif - -void Gravity::bilinear_interpolation(float *src, float *dst, int sw, int sh, int rw, int rh) -{ - int y, x, fxceil, fyceil; - float fx, fy, fyc, fxc; - double intp; - float tr, tl, br, bl; - //Bilinear interpolation for upscaling - for (y=0; y=sw) fxceil = sw-1; - if (fyceil>=sh) fyceil = sh-1; - tr = src[sw*(int)floor(fy)+fxceil]; - tl = src[sw*(int)floor(fy)+(int)floor(fx)]; - br = src[sw*fyceil+fxceil]; - bl = src[sw*fyceil+(int)floor(fx)]; - dst[rw*y+x] = ((tl*(1.0f-fxc))+(tr*(fxc)))*(1.0f-fyc) + ((bl*(1.0f-fxc))+(br*(fxc)))*(fyc); - } -} - -void Gravity::gravity_init() -{ - //Allocate full size Gravmaps - th_ogravmap = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); - th_gravmap = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); - th_gravy = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); - th_gravx = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); - th_gravp = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); - gravmap = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); - gravy = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); - gravx = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); - gravp = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); - gravmask = (unsigned int *)calloc((XRES/CELL)*(YRES/CELL), sizeof(unsigned)); -} - -void Gravity::gravity_cleanup() -{ -#ifdef GRAVFFT - grav_fft_cleanup(); -#endif -} - -void Gravity::gravity_update_async() -{ - int result; - if(ngrav_enable) - { - pthread_mutex_lock(&gravmutex); - result = grav_ready; - if(result) //Did the gravity thread finish? - { - //if (!sys_pause||framerender){ //Only update if not paused - //Switch the full size gravmaps, we don't really need the two above any more - float *tmpf; - - if(th_gravchanged) - { - #if !defined(GRAVFFT) && defined(GRAV_DIFF) - memcpy(gravy, th_gravy, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - memcpy(gravx, th_gravx, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - memcpy(gravp, th_gravp, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - #else - tmpf = gravy; - gravy = th_gravy; - th_gravy = tmpf; - - tmpf = gravx; - gravx = th_gravx; - th_gravx = tmpf; - - tmpf = gravp; - gravp = th_gravp; - th_gravp = tmpf; - #endif - } - - tmpf = gravmap; - gravmap = th_gravmap; - th_gravmap = tmpf; - - grav_ready = 0; //Tell the other thread that we're ready for it to continue - pthread_cond_signal(&gravcv); - //} - } - pthread_mutex_unlock(&gravmutex); - //Apply the gravity mask - membwand(gravy, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned)); - membwand(gravx, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned)); - memset(gravmap, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - } -} - -void *Gravity::update_grav_async_helper(void * context) -{ - ((Gravity *)context)->update_grav_async(); -} - -void Gravity::update_grav_async() -{ - int done = 0; - int thread_done = 0; - memset(th_ogravmap, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - memset(th_gravmap, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - memset(th_gravy, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - memset(th_gravx, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - memset(th_gravp, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - //memset(th_gravy, 0, XRES*YRES*sizeof(float)); - //memset(th_gravx, 0, XRES*YRES*sizeof(float)); - //memset(th_gravp, 0, XRES*YRES*sizeof(float)); -#ifdef GRAVFFT - grav_fft_init(); -#endif - while(!thread_done){ - if(!done){ - update_grav(); - done = 1; - pthread_mutex_lock(&gravmutex); - - grav_ready = done; - thread_done = gravthread_done; - - pthread_mutex_unlock(&gravmutex); - } else { - pthread_mutex_lock(&gravmutex); - pthread_cond_wait(&gravcv, &gravmutex); - - done = grav_ready; - thread_done = gravthread_done; - - pthread_mutex_unlock(&gravmutex); - } - } - pthread_exit(NULL); -} - -void Gravity::start_grav_async() -{ - if(!ngrav_enable){ - gravthread_done = 0; - grav_ready = 0; - pthread_mutex_init (&gravmutex, NULL); - pthread_cond_init(&gravcv, NULL); - pthread_create(&gravthread, NULL, &Gravity::update_grav_async_helper, this); //Start asynchronous gravity simulation - ngrav_enable = 1; - } - memset(gravy, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - memset(gravx, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - memset(gravp, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); -} - -void Gravity::stop_grav_async() -{ - if(ngrav_enable){ - pthread_mutex_lock(&gravmutex); - gravthread_done = 1; - pthread_cond_signal(&gravcv); - pthread_mutex_unlock(&gravmutex); - pthread_join(gravthread, NULL); - pthread_mutex_destroy(&gravmutex); //Destroy the mutex - ngrav_enable = 0; - } - //Clear the grav velocities - memset(gravy, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - memset(gravx, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); - memset(gravp, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); -} - -#ifdef GRAVFFT -int grav_fft_status = 0; -float *th_ptgravx, *th_ptgravy, *th_gravmapbig, *th_gravxbig, *th_gravybig; -fftwf_complex *th_ptgravxt, *th_ptgravyt, *th_gravmapbigt, *th_gravxbigt, *th_gravybigt; -fftwf_plan plan_gravmap, plan_gravx_inverse, plan_gravy_inverse; - -void Gravity::grav_fft_init() -{ - int xblock2 = XRES/CELL*2; - int yblock2 = YRES/CELL*2; - int x, y, fft_tsize = (xblock2/2+1)*yblock2; - float distance, scaleFactor; - fftwf_plan plan_ptgravx, plan_ptgravy; - if (grav_fft_status) return; - - //use fftw malloc function to ensure arrays are aligned, to get better performance - th_ptgravx = fftwf_malloc(xblock2*yblock2*sizeof(float)); - th_ptgravy = fftwf_malloc(xblock2*yblock2*sizeof(float)); - th_ptgravxt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); - th_ptgravyt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); - th_gravmapbig = fftwf_malloc(xblock2*yblock2*sizeof(float)); - th_gravmapbigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); - th_gravxbig = fftwf_malloc(xblock2*yblock2*sizeof(float)); - th_gravybig = fftwf_malloc(xblock2*yblock2*sizeof(float)); - th_gravxbigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); - th_gravybigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); - - //select best algorithm, could use FFTW_PATIENT or FFTW_EXHAUSTIVE but that increases the time taken to plan, and I don't see much increase in execution speed - plan_ptgravx = fftwf_plan_dft_r2c_2d(yblock2, xblock2, th_ptgravx, th_ptgravxt, FFTW_MEASURE); - plan_ptgravy = fftwf_plan_dft_r2c_2d(yblock2, xblock2, th_ptgravy, th_ptgravyt, FFTW_MEASURE); - plan_gravmap = fftwf_plan_dft_r2c_2d(yblock2, xblock2, th_gravmapbig, th_gravmapbigt, FFTW_MEASURE); - plan_gravx_inverse = fftwf_plan_dft_c2r_2d(yblock2, xblock2, th_gravxbigt, th_gravxbig, FFTW_MEASURE); - plan_gravy_inverse = fftwf_plan_dft_c2r_2d(yblock2, xblock2, th_gravybigt, th_gravybig, FFTW_MEASURE); - - //(XRES/CELL)*(YRES/CELL)*4 is size of data array, scaling needed because FFTW calculates an unnormalized DFT - scaleFactor = -M_GRAV/((XRES/CELL)*(YRES/CELL)*4); - //calculate velocity map caused by a point mass - for (y=0; y 0.0001f || th_gravmap[i*(XRES/CELL)+j]<-0.0001f) //Only calculate with populated or changed cells. - { -#endif - for (y = 0; y < YRES / CELL; y++) { - for (x = 0; x < XRES / CELL; x++) { - if (x == j && y == i)//Ensure it doesn't calculate with itself - continue; - distance = sqrt(pow(j - x, 2) + pow(i - y, 2)); -#ifdef GRAV_DIFF - val = th_gravmap[i*(XRES/CELL)+j] - th_ogravmap[i*(XRES/CELL)+j]; -#else - val = th_gravmap[i*(XRES/CELL)+j]; -#endif - th_gravx[y*(XRES/CELL)+x] += M_GRAV * val * (j - x) / pow(distance, 3); - th_gravy[y*(XRES/CELL)+x] += M_GRAV * val * (i - y) / pow(distance, 3); - th_gravp[y*(XRES/CELL)+x] += M_GRAV * val / pow(distance, 2); - } - } - } - } - } -fin: - memcpy(th_ogravmap, th_gravmap, (XRES/CELL)*(YRES/CELL)*sizeof(float)); -} -#endif - - - -void Gravity::grav_mask_r(int x, int y, char checkmap[YRES/CELL][XRES/CELL], char shape[YRES/CELL][XRES/CELL], char *shapeout) -{ - if(x < 0 || x >= XRES/CELL || y < 0 || y >= YRES/CELL) - return; - if(x == 0 || y ==0 || y == (YRES/CELL)-1 || x == (XRES/CELL)-1) - *shapeout = 1; - checkmap[y][x] = 1; - shape[y][x] = 1; - if(x-1 >= 0 && !checkmap[y][x-1] && bmap[y][x-1]!=WL_GRAV) - grav_mask_r(x-1, y, checkmap, shape, shapeout); - if(y-1 >= 0 && !checkmap[y-1][x] && bmap[y-1][x]!=WL_GRAV) - grav_mask_r(x, y-1, checkmap, shape, shapeout); - if(x+1 < XRES/CELL && !checkmap[y][x+1] && bmap[y][x+1]!=WL_GRAV) - grav_mask_r(x+1, y, checkmap, shape, shapeout); - if(y+1 < YRES/CELL && !checkmap[y+1][x] && bmap[y+1][x]!=WL_GRAV) - grav_mask_r(x, y+1, checkmap, shape, shapeout); - return; -} -void Gravity::mask_free(mask_el *c_mask_el){ - if(c_mask_el==NULL) - return; - if(c_mask_el->next!=NULL) - mask_free((mask_el*)c_mask_el->next); - free(c_mask_el->shape); - free(c_mask_el); -} -void Gravity::gravity_mask() -{ - char checkmap[YRES/CELL][XRES/CELL]; - int x = 0, y = 0, i, j; - unsigned maskvalue; - mask_el *t_mask_el = NULL; - mask_el *c_mask_el = NULL; - if(!gravmask) - return; - memset(checkmap, 0, sizeof(checkmap)); - for(x = 0; x < XRES/CELL; x++) - { - for(y = 0; y < YRES/CELL; y++) - { - if(bmap[y][x]!=WL_GRAV && checkmap[y][x] == 0) - { - //Create a new shape - if(t_mask_el==NULL){ - t_mask_el = (mask_el *)malloc(sizeof(mask_el)); - t_mask_el->shape = (char *)malloc((XRES/CELL)*(YRES/CELL)); - memset(t_mask_el->shape, 0, (XRES/CELL)*(YRES/CELL)); - t_mask_el->shapeout = 0; - t_mask_el->next = NULL; - c_mask_el = t_mask_el; - } else { - c_mask_el->next = (mask_el *)malloc(sizeof(mask_el)); - c_mask_el = (mask_el *)c_mask_el->next; - c_mask_el->shape = (char *)malloc((XRES/CELL)*(YRES/CELL)); - memset(c_mask_el->shape, 0, (XRES/CELL)*(YRES/CELL)); - c_mask_el->shapeout = 0; - c_mask_el->next = NULL; - } - //Fill the shape - grav_mask_r(x, y, (char (*)[XRES/CELL])checkmap, (char (*)[XRES/CELL])c_mask_el->shape, (char*)&c_mask_el->shapeout); - } - } - } - c_mask_el = t_mask_el; - memset(gravmask, 0, (XRES/CELL)*(YRES/CELL)*sizeof(unsigned)); - while(c_mask_el!=NULL) - { - char *cshape = c_mask_el->shape; - for(x = 0; x < XRES/CELL; x++) - { - for(y = 0; y < YRES/CELL; y++) - { - if(cshape[y*(XRES/CELL)+x]){ - if(c_mask_el->shapeout) - maskvalue = 0xFFFFFFFF; - else - maskvalue = 0x00000000; - gravmask[y*(XRES/CELL)+x] = maskvalue; - } - } - } - c_mask_el = (mask_el*)c_mask_el->next; - } - mask_free(t_mask_el); -} - -Gravity::Gravity() -{ - gravity_init(); -} diff --git a/src/Gravity.h b/src/Gravity.h deleted file mode 100644 index 9f36240..0000000 --- a/src/Gravity.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef GRAVITY_H -#define GRAVITY_H - -#include -#include "Config.h" -#include "Simulation.h" - -class Simulation; - -struct mask_el { - char *shape; - char shapeout; - void *next; -}; -typedef struct mask_el mask_el; - - -/* - * float *gravmap = NULL;//Maps to be used by the main thread - float *gravp = NULL; - float *gravy = NULL; - float *gravx = NULL; - unsigned *gravmask = NULL; - - float *th_ogravmap = NULL;// Maps to be processed by the gravity thread - float *th_gravmap = NULL; - float *th_gravx = NULL; - float *th_gravy = NULL; - float *th_gravp = NULL; - - int th_gravchanged = 0; - - pthread_t gravthread; - pthread_mutex_t gravmutex; - pthread_cond_t gravcv; - int grav_ready = 0; - int gravthread_done = 0; - */ -class Gravity -{ -private: - unsigned *gravmask; - - float *th_ogravmap; - float *th_gravmap; - float *th_gravx; - float *th_gravy; - float *th_gravp; - - int th_gravchanged; - - pthread_t gravthread; - pthread_mutex_t gravmutex; - pthread_cond_t gravcv; - int grav_ready; - int gravthread_done; - - //Simulation * sim; -public: - float *gravmap; - float *gravp; - float *gravy; - float *gravx; - unsigned char (*bmap)[XRES/CELL]; - int ngrav_enable; - void grav_mask_r(int x, int y, char checkmap[YRES/CELL][XRES/CELL], char shape[YRES/CELL][XRES/CELL], char *shapeout); - void mask_free(mask_el *c_mask_el); - - void gravity_init(); - void gravity_cleanup(); - void gravity_update_async(); - - static void *update_grav_async_helper(void * context); - void update_grav_async(); - - void start_grav_async(); - void stop_grav_async(); - void update_grav(); - void gravity_mask(); - - void bilinear_interpolation(float *src, float *dst, int sw, int sh, int rw, int rh); - - #ifdef GRAVFFT - void grav_fft_init(); - void grav_fft_cleanup(); - #endif - - Gravity(); -}; - -/*extern int ngrav_enable; //Newtonian gravity -extern int gravwl_timeout; -extern int gravityMode;*/ - -/*float *gravmap;//Maps to be used by the main thread -float *gravp; -float *gravy; -float *gravx; -unsigned *gravmask; - -float *th_ogravmap;// Maps to be processed by the gravity thread -float *th_gravmap; -float *th_gravx; -float *th_gravy; -float *th_gravp;*/ - - -#endif diff --git a/src/Misc.h b/src/Misc.h index c5a61ef..65ae5b3 100644 --- a/src/Misc.h +++ b/src/Misc.h @@ -3,6 +3,16 @@ #include #include +enum HorizontalAlignment +{ + AlignLeft, AlignCentre, AlignRight +}; + +enum VerticalAlignment +{ + AlignTop, AlignMiddle, AlignBottom +}; + #if defined(WIN32) && !defined(__GNUC__) #define x86_cpuid(func,af,bf,cf,df) \ do {\ diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index cf7d804..0ee1648 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -6,10 +6,7 @@ #include #include "Config.h" #include "Global.h" -#include "Simulation.h" -#include "Renderer.h" #include "Graphics.h" -#include "Air.h" #include "interface/Engine.h" #include "interface/Button.h" @@ -22,6 +19,8 @@ #include "game/GameController.h" #include "game/GameView.h" +#include "client/HTTP.h" + using namespace std; SDL_Surface * SDLOpen() diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 67f9348..2644924 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -9,10 +9,10 @@ #include "Config.h" #include "Renderer.h" #include "Graphics.h" -#include "Elements.h" -#include "ElementFunctions.h" -#include "ElementGraphics.h" -#include "Air.h" +#include "simulation/Elements.h" +#include "simulation/ElementFunctions.h" +#include "simulation/ElementGraphics.h" +#include "simulation/Air.h" extern "C" { #include "hmap.h" diff --git a/src/Renderer.h b/src/Renderer.h index 39c8c1a..a756f13 100644 --- a/src/Renderer.h +++ b/src/Renderer.h @@ -2,7 +2,7 @@ #define RENDERER_H #include "Config.h" -#include "Simulation.h" +#include "simulation/Simulation.h" #include "Graphics.h" class Simulation; diff --git a/src/Simulation.cpp b/src/Simulation.cpp deleted file mode 100644 index a1a785a..0000000 --- a/src/Simulation.cpp +++ /dev/null @@ -1,3593 +0,0 @@ -#include -#include -#define _cplusplus -#include "Config.h" -#include "Simulation.h" -#include "Elements.h" -#include "ElementFunctions.h" -#include "Air.h" -#include "Gravity.h" -//#include "powder.h" - -void Simulation::clear_area(int area_x, int area_y, int area_w, int area_h) -{ - int cx = 0; - int cy = 0; - for (cy=0; cyx2) - { - i = x2; - x2 = x1; - x1 = i; - } - if (y1>y2) - { - j = y2; - y2 = y1; - y1 = j; - } - for (j=y1; j<=y2; j++) - for (i=x1; i<=x2; i++) - create_parts(i, j, 0, 0, c, flags); -} - -int Simulation::flood_prop_2(int x, int y, size_t propoffset, void * propvalue, int proptype, int parttype, char * bitmap) -{ - int x1, x2, i, dy = 1; - x1 = x2 = x; - while (x1>=CELL) - { - if ((pmap[y][x1-1]&0xFF)!=parttype || bitmap[(y*XRES)+x1-1]) - { - break; - } - x1--; - } - while (x2>8; - if(proptype==2){ - *((float*)(((char*)&parts[i])+propoffset)) = *((float*)propvalue); - } else if(proptype==0) { - *((int*)(((char*)&parts[i])+propoffset)) = *((int*)propvalue); - } else if(proptype==1) { - *((char*)(((char*)&parts[i])+propoffset)) = *((char*)propvalue); - } - bitmap[(y*XRES)+x] = 1; - } - if (y>=CELL+dy) - for (x=x1; x<=x2; x++) - if ((pmap[y-dy][x]&0xFF)==parttype && !bitmap[((y-dy)*XRES)+x]) - if (!flood_prop_2(x, y-dy, propoffset, propvalue, proptype, parttype, bitmap)) - return 0; - if (y=CELL) - { - if ((pmap[y][x1-1]&0xFF)!=cm || bmap[y/CELL][(x1-1)/CELL]!=bm) - { - break; - } - x1--; - } - while (x2=CELL+dy && x1==x2 && - ((pmap[y-1][x1-1]&0xFF)==PT_INST||(pmap[y-1][x1-1]&0xFF)==PT_SPRK) && ((pmap[y-1][x1]&0xFF)==PT_INST||(pmap[y-1][x1]&0xFF)==PT_SPRK) && ((pmap[y-1][x1+1]&0xFF)==PT_INST || (pmap[y-1][x1+1]&0xFF)==PT_SPRK) && - (pmap[y-2][x1-1]&0xFF)!=PT_INST && ((pmap[y-2][x1]&0xFF)==PT_INST ||(pmap[y-2][x1]&0xFF)==PT_SPRK) && (pmap[y-2][x1+1]&0xFF)!=PT_INST) - flood_parts(x1, y-2, fullc, cm, bm, flags); - else if (y>=CELL+dy) - for (x=x1; x<=x2; x++) - if ((pmap[y-1][x]&0xFF)!=PT_SPRK) - { - if (x==x1 || x==x2 || y>=YRES-CELL-1 || - (pmap[y-1][x-1]&0xFF)==PT_INST || (pmap[y-1][x+1]&0xFF)==PT_INST || - (pmap[y+1][x-1]&0xFF)==PT_INST || ((pmap[y+1][x]&0xFF)!=PT_INST&&(pmap[y+1][x]&0xFF)!=PT_SPRK) || (pmap[y+1][x+1]&0xFF)==PT_INST) - flood_parts(x, y-dy, fullc, cm, bm, flags); - - } - - if (y=CELL+dy) - for (x=x1; x<=x2; x++) - if ((pmap[y-dy][x]&0xFF)==cm && bmap[(y-dy)/CELL][x/CELL]==bm) - if (!flood_parts(x, y-dy, fullc, cm, bm, flags)) - return 0; - if (y=CELL) - { - if ((ptypes[(pmap[y][x1-1]&0xFF)].falldown)!=2) - { - break; - } - x1--; - } - while (x2>8].tmp2 = !check;//flag it as checked, maybe shouldn't use .tmp2 - //check above, maybe around other sides too? - if ( ((y-1) > originaly) && !pmap[y-1][x] && eval_move(parts[i].type, x, y-1, NULL)) - { - int oldx = (int)(parts[i].x + 0.5f); - int oldy = (int)(parts[i].y + 0.5f); - pmap[y-1][x] = pmap[oldy][oldx]; - pmap[oldy][oldx] = 0; - parts[i].x = x; - parts[i].y = y-1; - return 0; - } - } - // fill children - - if (y>=CELL+1) - for (x=x1; x<=x2; x++) - if ((ptypes[(pmap[y-1][x]&0xFF)].falldown)==2 && parts[pmap[y-1][x]>>8].tmp2 == check) - if (!flood_water(x, y-1, i, originaly, check)) - return 0; - if (y>8].tmp2 == check) - if (!flood_water(x, y+1, i, originaly, check)) - return 0; - return 1; -} - -//wrapper around create_part to create TESC with correct tmp value -int Simulation::create_part_add_props(int p, int x, int y, int tv, int rx, int ry) -{ - p=create_part(p, x, y, tv); - if (tv==PT_TESC) - { - parts[p].tmp=rx*4+ry*4+7; - if (parts[p].tmp>300) - parts[p].tmp=300; - } - return p; -} - -//this creates particles from a brush, don't use if you want to create one particle -int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags) -{ - int i, j, r, f = 0, u, v, oy, ox, b = 0, dw = 0, stemp = 0, p;//n; - - int wall = c - 100; - if (c==SPC_WIND || c==PT_FIGH) - return 0; - - //if(c==SPC_PROP){ - // prop_edit_ui(vid_buf, x, y); - // return 0; - //} - for (r=UI_ACTUALSTART; r<=UI_ACTUALSTART+UI_WALLCOUNT; r++) - { - if (wall==r) - { - if (c == SPC_AIR || c == SPC_HEAT || c == SPC_COOL || c == SPC_VACUUM || c == SPC_PGRV || c == SPC_NGRV || wall == WL_SIGN) - break; - if (wall == WL_ERASE) - b = 0; - else - b = wall; - dw = 1; - } - } - if (c == WL_FANHELPER) - { - b = WL_FANHELPER; - dw = 1; - } - if (wall == WL_GRAV) - { - gravwl_timeout = 60; - } - if (c==PT_LIGH) - { - if (lighting_recreate>0 && rx+ry>0) - return 0; - p=create_part(-2, x, y, c); - if (p!=-1) - { - parts[p].life=rx+ry; - if (parts[p].life>55) - parts[p].life=55; - parts[p].temp=parts[p].life*150; // temperature of the lighting shows the power of the lighting - lighting_recreate+=parts[p].life/2+1; - return 1; - } - else return 0; - } - - if (dw==1) - { - ry = ry/CELL; - rx = rx/CELL; - x = x/CELL; - y = y/CELL; - x -= rx/2; - y -= ry/2; - for (ox=x; ox<=x+rx; ox++) - { - for (oy=y; oy<=y+rx; oy++) - { - if (ox>=0&&ox=0&&oy=0 && i+u=0 && j+v=XRES || y+j>=YRES) - continue; - //if (!REPLACE_MODE) - create_part(-2, x+i, y+j, c); - /*else if ((pmap[y+j][x+i]&0xFF)==SLALT&&SLALT!=0) - create_part(-2, x+i, y+j, c);*/ - } - return 1; - } - - /*if (flags&BRUSH_REPLACEMODE) - { - if (rx==0&&ry==0) - { - if ((pmap[y][x]&0xFF)==SLALT || SLALT==0) - { - if ((pmap[y][x])) - { - delete_part(x, y, 0); - if (c!=0) - create_part_add_props(-2, x, y, c, rx, ry); - } - } - } - else - for (j=-ry; j<=ry; j++) - for (i=-rx; i<=rx; i++) - if (InCurrentBrush(i ,j ,rx ,ry)) - { - if ( x+i<0 || y+j<0 || x+i>=XRES || y+j>=YRES) - continue; - if ((pmap[y+j][x+i]&0xFF)!=SLALT&&SLALT!=0) - continue; - if ((pmap[y+j][x+i])) - { - delete_part(x+i, y+j, 0); - if (c!=0) - create_part_add_props(-2, x+i, y+j, c, rx, ry); - } - } - return 1; - - }*/ - //else, no special modes, draw element like normal. - if (rx==0&&ry==0)//workaround for 1pixel brush/floodfill crashing. todo: find a better fix later. - { - if (create_part_add_props(-2, x, y, c, rx, ry)==-1) - f = 1; - } - else - for (j=-ry; j<=ry; j++) - for (i=-rx; i<=rx; i++) - //if (InCurrentBrush(i ,j ,rx ,ry)) - if (create_part_add_props(-2, x+i, y+j, c, rx, ry)==-1) - f = 1; - return !f; -} -/*int Simulation::InCurrentBrush(int i, int j, int rx, int ry) -{ - switch(CURRENT_BRUSH) - { - case CIRCLE_BRUSH: - return (pow(i,2)*pow(ry,2)+pow(j,2)*pow(rx,2)<=pow(rx,2)*pow(ry,2)); - break; - case SQUARE_BRUSH: - return (i*j<=ry*rx); - break; - case TRI_BRUSH: - return (j <= ry ) && ( j >= (((-2.0*ry)/rx)*i) -ry) && ( j >= (((-2.0*ry)/(-rx))*i)-ry ) ; - break; - } - return 0; -} -int Simulation::get_brush_flags() -{ - int flags = 0; - if (REPLACE_MODE) - flags |= BRUSH_REPLACEMODE; - if (sdl_mod & KMOD_CAPS) - flags |= BRUSH_SPECIFIC_DELETE; - if ((sdl_mod & KMOD_LALT) && (sdl_mod & (KMOD_CTRL))) - flags |= BRUSH_SPECIFIC_DELETE; - return flags; -}*/ -void Simulation::create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags) -{ - int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; - float e, de; - if (c==SPC_PROP) - return; - if (cp) - { - y = x1; - x1 = y1; - y1 = y; - y = x2; - x2 = y2; - y2 = y; - } - if (x1 > x2) - { - y = x1; - x1 = x2; - x2 = y; - y = y1; - y1 = y2; - y2 = y; - } - dx = x2 - x1; - dy = abs(y2 - y1); - e = 0.0f; - if (dx) - de = dy/(float)dx; - else - de = 0.0f; - y = y1; - sy = (y1= 0.5f) - { - y += sy; - if ((c==WL_EHOLE+100 || c==WL_ALLOWGAS+100 || c==WL_ALLOWENERGY+100 || c==WL_ALLOWALLELEC+100 || c==WL_ALLOWSOLID+100 || c==WL_ALLOWAIR+100 || c==WL_WALL+100 || c==WL_DESTROYALL+100 || c==WL_ALLOWLIQUID+100 || c==WL_FAN+100 || c==WL_STREAM+100 || c==WL_DETECT+100 || c==WL_EWALL+100 || c==WL_WALLELEC+100 || !(rx+ry)) - && ((y1=y2))) - { - if (cp) - create_parts(y, x, rx, ry, c, flags); - else - create_parts(x, y, rx, ry, c, flags); - } - e -= 1.0f; - } - } -} - -void *Simulation::transform_save(void *odata, int *size, matrix2d transform, vector2d translate) -{ - void *ndata; - unsigned char (*bmapo)[XRES/CELL] = (unsigned char (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(unsigned char)); - unsigned char (*bmapn)[XRES/CELL] = (unsigned char (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(unsigned char)); - Particle *partst = (Particle *)calloc(sizeof(Particle), NPART); - sign *signst = (sign *)calloc(MAXSIGNS, sizeof(sign)); - unsigned (*pmapt)[XRES] = (unsigned (*)[XRES])calloc(YRES*XRES, sizeof(unsigned)); - float (*fvxo)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); - float (*fvyo)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); - float (*fvxn)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); - float (*fvyn)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); - int i, x, y, nx, ny, w, h, nw, nh; - vector2d pos, tmp, ctl, cbr; - vector2d cornerso[4]; - unsigned char *odatac = (unsigned char *)odata; - //*if (parse_save(odata, *size, 0, 0, 0, bmapo, fvxo, fvyo, signst, partst, pmapt)) TODO: IMPLEMENT - { - free(bmapo); - free(bmapn); - free(partst); - free(signst); - free(pmapt); - free(fvxo); - free(fvyo); - free(fvxn); - free(fvyn); - return odata; - } - w = odatac[6]*CELL; - h = odatac[7]*CELL; - // undo any translation caused by rotation - cornerso[0] = v2d_new(0,0); - cornerso[1] = v2d_new(w-1,0); - cornerso[2] = v2d_new(0,h-1); - cornerso[3] = v2d_new(w-1,h-1); - for (i=0; i<4; i++) - { - tmp = m2d_multiply_v2d(transform,cornerso[i]); - if (i==0) ctl = cbr = tmp; // top left, bottom right corner - if (tmp.xcbr.x) cbr.x = tmp.x; - if (tmp.y>cbr.y) cbr.y = tmp.y; - } - // casting as int doesn't quite do what we want with negative numbers, so use floor() - tmp = v2d_new(floor(ctl.x+0.5f),floor(ctl.y+0.5f)); - translate = v2d_sub(translate,tmp); - nw = floor(cbr.x+0.5f)-floor(ctl.x+0.5f)+1; - nh = floor(cbr.y+0.5f)-floor(ctl.y+0.5f)+1; - if (nw>XRES) nw = XRES; - if (nh>YRES) nh = YRES; - // rotate and translate signs, parts, walls - for (i=0; i=nw || ny<0 || ny>=nh) - { - signst[i].text[0] = 0; - continue; - } - signst[i].x = nx; - signst[i].y = ny; - } - for (i=0; i=nw || ny<0 || ny>=nh) - { - partst[i].type = PT_NONE; - continue; - } - partst[i].x = nx; - partst[i].y = ny; - } - for (y=0; y=nw || ny<0 || ny>=nh) - continue; - if (bmapo[y][x]) - { - bmapn[ny][nx] = bmapo[y][x]; - if (bmapo[y][x]==WL_FAN) - { - fvxn[ny][nx] = fvxo[y][x]; - fvyn[ny][nx] = fvyo[y][x]; - } - } - } - //ndata = build_save(size,0,0,nw,nh,bmapn,fvxn,fvyn,signst,partst); TODO: IMPLEMENT - free(bmapo); - free(bmapn); - free(partst); - free(signst); - free(pmapt); - free(fvxo); - free(fvyo); - free(fvxn); - free(fvyn); - return ndata; -} - -void Simulation::orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]) -{ - resblock1[0] = (block1&0x000000FF); - resblock1[1] = (block1&0x0000FF00)>>8; - resblock1[2] = (block1&0x00FF0000)>>16; - resblock1[3] = (block1&0xFF000000)>>24; - - resblock2[0] = (block2&0x000000FF); - resblock2[1] = (block2&0x0000FF00)>>8; - resblock2[2] = (block2&0x00FF0000)>>16; - resblock2[3] = (block2&0xFF000000)>>24; -} - -void Simulation::orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]) -{ - int block1tmp = 0; - int block2tmp = 0; - - block1tmp = (resblock1[0]&0xFF); - block1tmp |= (resblock1[1]&0xFF)<<8; - block1tmp |= (resblock1[2]&0xFF)<<16; - block1tmp |= (resblock1[3]&0xFF)<<24; - - block2tmp = (resblock2[0]&0xFF); - block2tmp |= (resblock2[1]&0xFF)<<8; - block2tmp |= (resblock2[2]&0xFF)<<16; - block2tmp |= (resblock2[3]&0xFF)<<24; - - *block1 = block1tmp; - *block2 = block2tmp; -} - -inline int Simulation::is_wire(int x, int y) -{ - return bmap[y][x]==WL_DETECT || bmap[y][x]==WL_EWALL || bmap[y][x]==WL_ALLOWLIQUID || bmap[y][x]==WL_WALLELEC || bmap[y][x]==WL_ALLOWALLELEC || bmap[y][x]==WL_EHOLE; -} - -inline int Simulation::is_wire_off(int x, int y) -{ - return (bmap[y][x]==WL_DETECT || bmap[y][x]==WL_EWALL || bmap[y][x]==WL_ALLOWLIQUID || bmap[y][x]==WL_WALLELEC || bmap[y][x]==WL_ALLOWALLELEC || bmap[y][x]==WL_EHOLE) && emap[y][x]<8; -} - -int Simulation::get_wavelength_bin(int *wm) -{ - int i, w0=30, wM=0; - - if (!*wm) - return -1; - - for (i=0; i<30; i++) - if (*wm & (1< wM) - wM = i; - } - - if (wM-w0 < 5) - return (wM+w0)/2; - - i = rand() % (wM-w0-3); - i += w0; - - *wm &= 0x1F << i; - return i + 2; -} - -void Simulation::set_emap(int x, int y) -{ - int x1, x2; - - if (!is_wire_off(x, y)) - return; - - // go left as far as possible - x1 = x2 = x; - while (x1>0) - { - if (!is_wire_off(x1-1, y)) - break; - x1--; - } - while (x21 && x1==x2 && - is_wire(x1-1, y-1) && is_wire(x1, y-1) && is_wire(x1+1, y-1) && - !is_wire(x1-1, y-2) && is_wire(x1, y-2) && !is_wire(x1+1, y-2)) - set_emap(x1, y-2); - else if (y>0) - for (x=x1; x<=x2; x++) - if (is_wire_off(x, y-1)) - { - if (x==x1 || x==x2 || y>=YRES/CELL-1 || - is_wire(x-1, y-1) || is_wire(x+1, y-1) || - is_wire(x-1, y+1) || !is_wire(x, y+1) || is_wire(x+1, y+1)) - set_emap(x, y-1); - } - - if (y>8].type; - else - return PT_NONE; - } - else - { - int pmr2 = pmap[(int)((parts[ci].y + parts[ni].y)/2+0.5f)][(int)((parts[ci].x + parts[ni].x)/2+0.5f)];//seems to be more accurate. - if (pmr2) - { - if (parts[pmr2>>8].type==t) - return t; - } - else - return PT_NONE; - } - return PT_NONE; -} - - -int Simulation::nearest_part(int ci, int t, int max_d) -{ - int distance = (max_d!=-1)?max_d:MAX_DISTANCE; - int ndistance = 0; - int id = -1; - int i = 0; - int cx = (int)parts[ci].x; - int cy = (int)parts[ci].y; - for (i=0; i<=parts_lastActiveIndex; i++) - { - if ((parts[i].type==t||(t==-1&&parts[i].type))&&!parts[i].life&&i!=ci) - { - ndistance = abs(cx-parts[i].x)+abs(cy-parts[i].y);// Faster but less accurate Older: sqrt(pow(cx-parts[i].x, 2)+pow(cy-parts[i].y, 2)); - if (ndistance=XRES || ny>=YRES) - return 0; - - r = pmap[ny][nx]; - if (r) - r = (r&~0xFF) | parts[r>>8].type; - if (rr) - *rr = r; - if (pt>=PT_NUM || (r&0xFF)>=PT_NUM) - return 0; - result = can_move[pt][r&0xFF]; - if (result==3) - { - if ((pt==PT_PHOT || pt==PT_ELEC) && (r&0xFF)==PT_LCRY) - result = (parts[r>>8].life > 5)? 2 : 0; - if ((r&0xFF)==PT_INVIS) - { - if (pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f) result = 2; - else result = 0; - } - if ((r&0xFF)==PT_PVOD) - { - if (parts[r>>8].life == 10) result = 1; - else result = 0; - } - } - if (bmap[ny/CELL][nx/CELL]) - { - if (bmap[ny/CELL][nx/CELL]==WL_ALLOWGAS && !(ptypes[pt].properties&TYPE_GAS))// && ptypes[pt].falldown!=0 && pt!=PT_FIRE && pt!=PT_SMKE) - return 0; - if (bmap[ny/CELL][nx/CELL]==WL_ALLOWENERGY && !(ptypes[pt].properties&TYPE_ENERGY))// && ptypes[pt].falldown!=0 && pt!=PT_FIRE && pt!=PT_SMKE) - return 0; - if (bmap[ny/CELL][nx/CELL]==WL_ALLOWLIQUID && ptypes[pt].falldown!=2) - return 0; - if (bmap[ny/CELL][nx/CELL]==WL_ALLOWSOLID && ptypes[pt].falldown!=1) - return 0; - if (bmap[ny/CELL][nx/CELL]==WL_ALLOWAIR || bmap[ny/CELL][nx/CELL]==WL_WALL || bmap[ny/CELL][nx/CELL]==WL_WALLELEC) - return 0; - if (bmap[ny/CELL][nx/CELL]==WL_EWALL && !emap[ny/CELL][nx/CELL]) - return 0; - if (bmap[ny/CELL][nx/CELL]==WL_EHOLE && !emap[ny/CELL][nx/CELL]) - return 2; - } - return result; -} - -int Simulation::try_move(int i, int x, int y, int nx, int ny) -{ - unsigned r, e; - - if (x==nx && y==ny) - return 1; - if (nx<0 || ny<0 || nx>=XRES || ny>=YRES) - return 1; - - e = eval_move(parts[i].type, nx, ny, &r); - - if ((r&0xFF)==PT_BOMB && parts[i].type==PT_BOMB && parts[i].tmp == 1) - e = 2; - - /* half-silvered mirror */ - if (!e && parts[i].type==PT_PHOT && - (((r&0xFF)==PT_BMTL && rand()>8].temp = parts[i].temp; - - if ((r & 0xFF) < PT_NUM && ptypes[r&0xFF].hconduct && ((r&0xFF)!=PT_HSWC||parts[r>>8].life==10) && (r&0xFF)!=PT_FILT) - parts[i].temp = parts[r>>8].temp = restrict_flt((parts[r>>8].temp+parts[i].temp)/2, MIN_TEMP, MAX_TEMP); - } - if ((parts[i].type==PT_NEUT || parts[i].type==PT_ELEC) && ((r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN || (r&0xFF)==PT_BCLN || (r&0xFF)==PT_PBCN)) { - if (!parts[r>>8].ctype) - parts[r>>8].ctype = parts[i].type; - } - if ((r&0xFF)==PT_PRTI && (parts[i].type==PT_PHOT || parts[i].type==PT_NEUT || parts[i].type==PT_ELEC)) - { - int nnx, count; - for (count=0; count<8; count++) - { - if (isign(x-nx)==isign(portal_rx[count]) && isign(y-ny)==isign(portal_ry[count])) - break; - } - count = count%8; - parts[r>>8].tmp = (int)((parts[r>>8].temp-73.15f)/100+1); - if (parts[r>>8].tmp>=CHANNELS) parts[r>>8].tmp = CHANNELS-1; - else if (parts[r>>8].tmp<0) parts[r>>8].tmp = 0; - for ( nnx=0; nnx<80; nnx++) - if (!portalp[parts[r>>8].tmp][count][nnx].type) - { - portalp[parts[r>>8].tmp][count][nnx] = parts[i]; - parts[i].type=PT_NONE; - break; - } - } - return 0; - } - - if (e == 2) //if occupy same space - { - if (parts[i].type == PT_PHOT && (r&0xFF)==PT_GLOW && !parts[r>>8].life) - if (rand() < RAND_MAX/30) - { - parts[r>>8].life = 120; - create_gain_photon(i); - } - if (parts[i].type == PT_PHOT && (r&0xFF)==PT_FILT) - { - int temp_bin = (int)((parts[r>>8].temp-273.0f)*0.025f); - if (temp_bin < 0) temp_bin = 0; - if (temp_bin > 25) temp_bin = 25; - if(!parts[r>>8].tmp){ - parts[i].ctype = 0x1F << temp_bin; //Assign Colour - } else if(parts[r>>8].tmp==1){ - parts[i].ctype &= 0x1F << temp_bin; //Filter Colour - } else if(parts[r>>8].tmp==2){ - parts[i].ctype |= 0x1F << temp_bin; //Add Colour - } else if(parts[r>>8].tmp==3){ - parts[i].ctype &= ~(0x1F << temp_bin); //Subtract Colour - } - } - if (parts[i].type == PT_NEUT && (r&0xFF)==PT_GLAS) { - if (rand() < RAND_MAX/10) - create_cherenkov_photon(i); - } - if (parts[i].type == PT_PHOT && (r&0xFF)==PT_INVIS && pv[ny/CELL][nx/CELL]<=4.0f && pv[ny/CELL][nx/CELL]>=-4.0f) { - part_change_type(i,x,y,PT_NEUT); - parts[i].ctype = 0; - } - if ((parts[i].type==PT_BIZR||parts[i].type==PT_BIZRG) && (r&0xFF)==PT_FILT) - { - int temp_bin = (int)((parts[r>>8].temp-273.0f)*0.025f); - if (temp_bin < 0) temp_bin = 0; - if (temp_bin > 25) temp_bin = 25; - parts[i].ctype = 0x1F << temp_bin; - } - return 1; - } - //else e=1 , we are trying to swap the particles, return 0 no swap/move, 1 is still overlap/move, because the swap takes place later - - if ((r&0xFF)==PT_VOID || (r&0xFF)==PT_PVOD) //this is where void eats particles - { - if (parts[i].type == PT_STKM) - { - player.spwn = 0; - } - if (parts[i].type == PT_STKM2) - { - player2.spwn = 0; - } - if (parts[i].type == PT_FIGH) - { - fighters[(unsigned char)parts[i].tmp].spwn = 0; - fighcount--; - } - parts[i].type=PT_NONE; - return 0; - } - if ((r&0xFF)==PT_BHOL || (r&0xFF)==PT_NBHL) //this is where blackhole eats particles - { - if (parts[i].type == PT_STKM) - { - player.spwn = 0; - } - if (parts[i].type == PT_STKM2) - { - player2.spwn = 0; - } - if (parts[i].type == PT_FIGH) - { - fighters[(unsigned char)parts[i].tmp].spwn = 0; - fighcount--; - } - parts[i].type=PT_NONE; - if (!legacy_enable) - { - parts[r>>8].temp = restrict_flt(parts[r>>8].temp+parts[i].temp/2, MIN_TEMP, MAX_TEMP);//3.0f; - } - - return 0; - } - if (((r&0xFF)==PT_WHOL||(r&0xFF)==PT_NWHL) && parts[i].type==PT_ANAR) //whitehole eats anar - { - parts[i].type=PT_NONE; - if (!legacy_enable) - { - parts[r>>8].temp = restrict_flt(parts[r>>8].temp- (MAX_TEMP-parts[i].temp)/2, MIN_TEMP, MAX_TEMP); - } - - return 0; - } - - if (parts[i].type==PT_CNCT && y0) - return 0; - - e = r >> 8; //e is now the particle number at r (pmap[ny][nx]) - if (r)//the swap part, if we make it this far, swap - { - if (parts[i].type==PT_NEUT) { - // target material is NEUTPENETRATE, meaning it gets moved around when neutron passes - unsigned s = pmap[y][x]; - if (!(ptypes[s&0xFF].properties&PROP_NEUTPENETRATE)) - return 1; // if the element currently underneath neutron isn't NEUTPENETRATE, don't move anything except the neutron - // if nothing is currently underneath neutron, only move target particle - if (s) - { - pmap[ny][nx] = (s&~(0xFF))|parts[s>>8].type; - parts[s>>8].x = nx; - parts[s>>8].y = ny; - } - else pmap[ny][nx] = 0; - parts[e].x = x; - parts[e].y = y; - pmap[y][x] = (e<<8)|parts[e].type; - return 1; - } - - if ((pmap[ny][nx]>>8)==e) pmap[ny][nx] = 0; - parts[e].x += x-nx; - parts[e].y += y-ny; - pmap[(int)(parts[e].y+0.5f)][(int)(parts[e].x+0.5f)] = (e<<8)|parts[e].type; - } - return 1; -} - -// try to move particle, and if successful update pmap and parts[i].x,y -int Simulation::do_move(int i, int x, int y, float nxf, float nyf) -{ - int nx = (int)(nxf+0.5f), ny = (int)(nyf+0.5f); - int result = try_move(i, x, y, nx, ny); - if (result) - { - int t = parts[i].type; - parts[i].x = nxf; - parts[i].y = nyf; - if (ny!=y || nx!=x) - { - if ((pmap[y][x]>>8)==i) pmap[y][x] = 0; - else if ((photons[y][x]>>8)==i) photons[y][x] = 0; - if (nx=XRES-CELL || ny=YRES-CELL)//kill_part if particle is out of bounds - { - kill_part(i); - return -1; - } - if (t==PT_PHOT||t==PT_NEUT||t==PT_ELEC) - photons[ny][nx] = t|(i<<8); - else if (t) - pmap[ny][nx] = t|(i<<8); - } - } - return result; -} - -int Simulation::pn_junction_sprk(int x, int y, int pt) -{ - unsigned r = pmap[y][x]; - if ((r & 0xFF) != pt) - return 0; - r >>= 8; - if (parts[r].type != pt) - return 0; - if (parts[r].life != 0) - return 0; - - parts[r].ctype = pt; - part_change_type(r,x,y,PT_SPRK); - parts[r].life = 4; - return 1; -} - -void Simulation::photoelectric_effect(int nx, int ny)//create sparks from PHOT when hitting PSCN and NSCN -{ - unsigned r = pmap[ny][nx]; - - if ((r&0xFF) == PT_PSCN) { - if ((pmap[ny][nx-1] & 0xFF) == PT_NSCN || - (pmap[ny][nx+1] & 0xFF) == PT_NSCN || - (pmap[ny-1][nx] & 0xFF) == PT_NSCN || - (pmap[ny+1][nx] & 0xFF) == PT_NSCN) - pn_junction_sprk(nx, ny, PT_PSCN); - } -} - -unsigned Simulation::direction_to_map(float dx, float dy, int t) -{ - // TODO: - // Adding extra directions causes some inaccuracies. - // Not adding them causes problems with some diagonal surfaces (photons absorbed instead of reflected). - // For now, don't add them. - // Solution may involve more intelligent setting of initial i0 value in find_next_boundary? - // or rewriting normal/boundary finding code - - return (dx >= 0) | - (((dx + dy) >= 0) << 1) | /* 567 */ - ((dy >= 0) << 2) | /* 4+0 */ - (((dy - dx) >= 0) << 3) | /* 321 */ - ((dx <= 0) << 4) | - (((dx + dy) <= 0) << 5) | - ((dy <= 0) << 6) | - (((dy - dx) <= 0) << 7); - /* - return (dx >= -0.001) | - (((dx + dy) >= -0.001) << 1) | // 567 - ((dy >= -0.001) << 2) | // 4+0 - (((dy - dx) >= -0.001) << 3) | // 321 - ((dx <= 0.001) << 4) | - (((dx + dy) <= 0.001) << 5) | - ((dy <= 0.001) << 6) | - (((dy - dx) <= 0.001) << 7); - }*/ -} - -int Simulation::is_blocking(int t, int x, int y) -{ - if (t & REFRACT) { - if (x<0 || y<0 || x>=XRES || y>=YRES) - return 0; - if ((pmap[y][x] & 0xFF) == PT_GLAS) - return 1; - return 0; - } - - return !eval_move(t, x, y, NULL); -} - -int Simulation::is_boundary(int pt, int x, int y) -{ - if (!is_blocking(pt,x,y)) - return 0; - if (is_blocking(pt,x,y-1) && is_blocking(pt,x,y+1) && is_blocking(pt,x-1,y) && is_blocking(pt,x+1,y)) - return 0; - return 1; -} - -int Simulation::find_next_boundary(int pt, int *x, int *y, int dm, int *em) -{ - static int dx[8] = {1,1,0,-1,-1,-1,0,1}; - static int dy[8] = {0,1,1,1,0,-1,-1,-1}; - static int de[8] = {0x83,0x07,0x0E,0x1C,0x38,0x70,0xE0,0xC1}; - int i, ii, i0; - - if (*x <= 0 || *x >= XRES-1 || *y <= 0 || *y >= YRES-1) - return 0; - - if (*em != -1) { - i0 = *em; - dm &= de[i0]; - } else - i0 = 0; - - for (ii=0; ii<8; ii++) { - i = (ii + i0) & 7; - if ((dm & (1 << i)) && is_boundary(pt, *x+dx[i], *y+dy[i])) { - *x += dx[i]; - *y += dy[i]; - *em = i; - return 1; - } - } - - return 0; -} - -int Simulation::get_normal(int pt, int x, int y, float dx, float dy, float *nx, float *ny) -{ - int ldm, rdm, lm, rm; - int lx, ly, lv, rx, ry, rv; - int i, j; - float r, ex, ey; - - if (!dx && !dy) - return 0; - - if (!is_boundary(pt, x, y)) - return 0; - - ldm = direction_to_map(-dy, dx, pt); - rdm = direction_to_map(dy, -dx, pt); - lx = rx = x; - ly = ry = y; - lv = rv = 1; - lm = rm = -1; - - j = 0; - for (i=0; i= NORMAL_INTERP) - return 0; - - if (pt == PT_PHOT) - photoelectric_effect(x, y); - - return get_normal(pt, x, y, dx, dy, nx, ny); -} - -//For soap only -void Simulation::detach(int i) -{ - if ((parts[i].ctype&2) == 2) - { - if ((parts[parts[i].tmp].ctype&4) == 4) - parts[parts[i].tmp].ctype ^= 4; - } - - if ((parts[i].ctype&4) == 4) - { - if ((parts[parts[i].tmp2].ctype&2) == 2) - parts[parts[i].tmp2].ctype ^= 2; - } - - parts[i].ctype = 0; -} - -void Simulation::kill_part(int i)//kills particle number i -{ - int x, y; - - if(elementCount[parts[i].type] && parts[i].type) - elementCount[parts[i].type]--; - x = (int)(parts[i].x+0.5f); - y = (int)(parts[i].y+0.5f); - if (parts[i].type == PT_STKM) - { - player.spwn = 0; - } - if (parts[i].type == PT_STKM2) - { - player2.spwn = 0; - } - if (parts[i].type == PT_FIGH) - { - fighters[(unsigned char)parts[i].tmp].spwn = 0; - fighcount--; - } - if (parts[i].type == PT_SOAP) - { - detach(i); - } - if (x>=0 && y>=0 && x>8)==i) - pmap[y][x] = 0; - else if ((photons[y][x]>>8)==i) - photons[y][x] = 0; - } - - parts[i].type = PT_NONE; - parts[i].life = pfree; - pfree = i; -} - -void Simulation::part_change_type(int i, int x, int y, int t)//changes the type of particle number i, to t. This also changes pmap at the same time. -{ - if (x<0 || y<0 || x>=XRES || y>=YRES || i>=NPART || t<0 || t>=PT_NUM) - return; - if (!ptypes[t].enabled) - t = PT_NONE; - - if (parts[i].type == PT_STKM) - player.spwn = 0; - - if (parts[i].type == PT_STKM2) - player2.spwn = 0; - - if (parts[i].type == PT_FIGH) - { - fighters[(unsigned char)parts[i].tmp].spwn = 0; - fighcount--; - } - - parts[i].type = t; - if (t==PT_PHOT || t==PT_NEUT || t==PT_ELEC) - { - photons[y][x] = t|(i<<8); - if ((pmap[y][x]>>8)==i) - pmap[y][x] = 0; - } - else - { - pmap[y][x] = t|(i<<8); - if ((photons[y][x]>>8)==i) - photons[y][x] = 0; - } -} - -int Simulation::create_part(int p, int x, int y, int tv)//the function for creating a particle, use p=-1 for creating a new particle, -2 is from a brush, or a particle number to replace a particle. -{ - int i; - - int t = tv & 0xFF; - int v = (tv >> 8) & 0xFF; - - if (x<0 || y<0 || x>=XRES || y>=YRES || ((t<0 || t>=PT_NUM)&&t!=SPC_HEAT&&t!=SPC_COOL&&t!=SPC_AIR&&t!=SPC_VACUUM&&t!=SPC_PGRV&&t!=SPC_NGRV)) - return -1; - if (t>=0 && t>8].temp>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 0.1f, MIN_TEMP, MAX_TEMP); - } else if ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL))) { - parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 50.0f, MIN_TEMP, MAX_TEMP); - } else { - parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 4.0f, MIN_TEMP, MAX_TEMP); - } - } - if (t==SPC_COOL&&parts[pmap[y][x]>>8].temp>MIN_TEMP) - { - if ((pmap[y][x]&0xFF)==PT_PUMP || (pmap[y][x]&0xFF)==PT_GPMP) { - parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 0.1f, MIN_TEMP, MAX_TEMP); - } else if ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL))) { - parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 50.0f, MIN_TEMP, MAX_TEMP); - } else { - parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 4.0f, MIN_TEMP, MAX_TEMP); - } - } - return pmap[y][x]>>8; - } - else - { - return -1; - } - }*/ - if (t==SPC_AIR) - { - pv[y/CELL][x/CELL] += 0.03f; - if (y+CELL>8].ctype=PT_DUST; - } - if (!((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS))) - return -1; - if (parts[pmap[y][x]>>8].life!=0) - return -1; - parts[pmap[y][x]>>8].type = PT_SPRK; - parts[pmap[y][x]>>8].life = 4; - parts[pmap[y][x]>>8].ctype = pmap[y][x]&0xFF; - pmap[y][x] = (pmap[y][x]&~0xFF) | PT_SPRK; - return pmap[y][x]>>8; - } - if (t==PT_SPAWN&&elementCount[PT_SPAWN]) - return -1; - if (t==PT_SPAWN2&&elementCount[PT_SPAWN2]) - return -1; - if (p==-1)//creating from anything but brush - { - if (pmap[y][x] || (bmap[y/CELL][x/CELL] && !eval_move(t, x, y, NULL))) - { - if ((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2) - { - if (t!=PT_STKM&&t!=PT_STKM2&&t!=PT_FIGH) - { - return -1; - } - } - } - if (pfree == -1) - return -1; - i = pfree; - pfree = parts[i].life; - } - else if (p==-2)//creating from brush - { - if (pmap[y][x]) - { - if (( - ((pmap[y][x]&0xFF)==PT_STOR&&!(ptypes[t].properties&TYPE_SOLID))|| - (pmap[y][x]&0xFF)==PT_CLNE|| - (pmap[y][x]&0xFF)==PT_BCLN|| - (pmap[y][x]&0xFF)==PT_CONV|| - ((pmap[y][x]&0xFF)==PT_PCLN&&t!=PT_PSCN&&t!=PT_NSCN)|| - ((pmap[y][x]&0xFF)==PT_PBCN&&t!=PT_PSCN&&t!=PT_NSCN) - )&&( - t!=PT_CLNE&&t!=PT_PCLN&& - t!=PT_BCLN&&t!=PT_STKM&& - t!=PT_STKM2&&t!=PT_PBCN&& - t!=PT_STOR&&t!=PT_FIGH) - ) - { - parts[pmap[y][x]>>8].ctype = t; - if (t==PT_LIFE && v>8].tmp = v; - } - return -1; - } - if (photons[y][x] && (t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)) - return -1; - if (pfree == -1) - return -1; - i = pfree; - pfree = parts[i].life; - } - else if (p==-3)//skip pmap checks, e.g. for sing explosion - { - if (pfree == -1) - return -1; - i = pfree; - pfree = parts[i].life; - } - else - { - int oldX = (int)(parts[p].x+0.5f); - int oldY = (int)(parts[p].y+0.5f); - if ((pmap[oldY][oldX]>>8)==p) - pmap[oldY][oldX] = 0; - if ((photons[oldY][oldX]>>8)==p) - photons[oldY][oldX] = 0; - i = p; - } - - if (i>parts_lastActiveIndex) parts_lastActiveIndex = i; - - parts[i].dcolour = 0; - if (t==PT_GLAS) - { - parts[i].pavg[1] = pv[y/CELL][x/CELL]; - } - else if (t==PT_QRTZ) - { - parts[i].pavg[1] = pv[y/CELL][x/CELL]; - } - else - { - parts[i].pavg[0] = 0.0f; - parts[i].pavg[1] = 0.0f; - } - if (t!=PT_STKM&&t!=PT_STKM2&&t!=PT_FIGH)//set everything to default values first, except for stickman. - { - parts[i].x = (float)x; - parts[i].y = (float)y; - parts[i].type = t; - parts[i].vx = 0; - parts[i].vy = 0; - parts[i].life = 0; - parts[i].ctype = 0; - parts[i].temp = ptypes[t].heat; - parts[i].tmp = 0; - parts[i].tmp2 = 0; - } - if (t==PT_LIGH && p==-2) - { - switch (gravityMode) - { - default: - case 0: - parts[i].tmp= 270+rand()%40-20; - break; - case 1: - parts[i].tmp = rand()%360; - break; - case 2: - parts[i].tmp = atan2(x-XCNTR, y-YCNTR)*(180.0f/M_PI)+90; - break; - } - parts[i].tmp2 = 4; - } - if (t==PT_SOAP) - { - parts[i].tmp = -1; - parts[i].tmp2 = -1; - } - //now set various properties that we want at spawn. - if (t==PT_ACID || t==PT_CAUS) - { - parts[i].life = 75; - } - /*Testing - if(t==PT_WOOD){ - parts[i].life = 150; - } - End Testing*/ - if (t==PT_WARP) { - parts[i].life = rand()%95+70; - } - if (t==PT_FUSE) { - parts[i].life = 50; - parts[i].tmp = 50; - } - /*if (ptypes[t].properties&PROP_LIFE) { - int r; - for (r = 0; r255 ? 255 : (colr<0 ? 0 : colr); - colg = colg>255 ? 255 : (colg<0 ? 0 : colg); - colb = colb>255 ? 255 : (colb<0 ? 0 : colb); - parts[i].dcolour = 0xFF000000 | (colr<<16) | (colg<<8) | colb; - } - elementCount[t]++; - return i; -} - -void Simulation::create_gain_photon(int pp)//photons from PHOT going through GLOW -{ - float xx, yy; - int i, lr, temp_bin, nx, ny; - - if (pfree == -1) - return; - i = pfree; - - lr = rand() % 2; - - if (lr) { - xx = parts[pp].x - 0.3*parts[pp].vy; - yy = parts[pp].y + 0.3*parts[pp].vx; - } else { - xx = parts[pp].x + 0.3*parts[pp].vy; - yy = parts[pp].y - 0.3*parts[pp].vx; - } - - nx = (int)(xx + 0.5f); - ny = (int)(yy + 0.5f); - - if (nx<0 || ny<0 || nx>=XRES || ny>=YRES) - return; - - if ((pmap[ny][nx] & 0xFF) != PT_GLOW) - return; - - pfree = parts[i].life; - if (i>parts_lastActiveIndex) parts_lastActiveIndex = i; - - parts[i].type = PT_PHOT; - parts[i].life = 680; - parts[i].x = xx; - parts[i].y = yy; - parts[i].vx = parts[pp].vx; - parts[i].vy = parts[pp].vy; - parts[i].temp = parts[pmap[ny][nx] >> 8].temp; - parts[i].tmp = 0; - parts[i].pavg[0] = parts[i].pavg[1] = 0.0f; - photons[ny][nx] = PT_PHOT|(i<<8); - - temp_bin = (int)((parts[i].temp-273.0f)*0.25f); - if (temp_bin < 0) temp_bin = 0; - if (temp_bin > 25) temp_bin = 25; - parts[i].ctype = 0x1F << temp_bin; -} - -void Simulation::create_cherenkov_photon(int pp)//photons from NEUT going through GLAS -{ - int i, lr, nx, ny; - float r, eff_ior; - - if (pfree == -1) - return; - i = pfree; - - nx = (int)(parts[pp].x + 0.5f); - ny = (int)(parts[pp].y + 0.5f); - if ((pmap[ny][nx] & 0xFF) != PT_GLAS) - return; - - if (hypotf(parts[pp].vx, parts[pp].vy) < 1.44f) - return; - - pfree = parts[i].life; - if (i>parts_lastActiveIndex) parts_lastActiveIndex = i; - - lr = rand() % 2; - - parts[i].type = PT_PHOT; - parts[i].ctype = 0x00000F80; - parts[i].life = 680; - parts[i].x = parts[pp].x; - parts[i].y = parts[pp].y; - parts[i].temp = parts[pmap[ny][nx] >> 8].temp; - parts[i].tmp = 0; - parts[i].pavg[0] = parts[i].pavg[1] = 0.0f; - photons[ny][nx] = PT_PHOT|(i<<8); - - if (lr) { - parts[i].vx = parts[pp].vx - 2.5f*parts[pp].vy; - parts[i].vy = parts[pp].vy + 2.5f*parts[pp].vx; - } else { - parts[i].vx = parts[pp].vx + 2.5f*parts[pp].vy; - parts[i].vy = parts[pp].vy - 2.5f*parts[pp].vx; - } - - /* photons have speed of light. no discussion. */ - r = 1.269 / hypotf(parts[i].vx, parts[i].vy); - parts[i].vx *= r; - parts[i].vy *= r; -} - -void Simulation::delete_part(int x, int y, int flags)//calls kill_part with the particle located at x,y -{ - unsigned i; - - if (x<0 || y<0 || x>=XRES || y>=YRES) - return; - if (photons[y][x]) { - i = photons[y][x]; - } else { - i = pmap[y][x]; - } - - if (!i) - return; - kill_part(i>>8); -} - -void Simulation::update_particles_i(int start, int inc) -{ - int i, j, x, y, t, nx, ny, r, surround_space, s, lt, rt, nt, nnx, nny, q, golnum, goldelete, z, neighbors, createdsomething; - float mv, dx, dy, ix, iy, lx, ly, nrx, nry, dp, ctemph, ctempl, gravtot; - int fin_x, fin_y, clear_x, clear_y, stagnant; - float fin_xf, fin_yf, clear_xf, clear_yf; - float nn, ct1, ct2, swappage; - float pt = R_TEMP; - float c_heat = 0.0f; - int h_count = 0; - int starti = (start*-1); - int surround[8]; - int surround_hconduct[8]; - int lighting_ok=1; - float pGravX, pGravY, pGravD; - - if (sys_pause&&lighting_recreate>0) - { - for (i=0; i<=parts_lastActiveIndex; i++) - { - if (parts[i].type==PT_LIGH && parts[i].tmp2>0) - { - lighting_ok=0; - break; - } - } - } - - if (lighting_ok) - lighting_recreate--; - - if (lighting_recreate<0) - lighting_recreate=1; - - if (lighting_recreate>21) - lighting_recreate=21; - - if (sys_pause&&!framerender)//do nothing if paused - return; - - //wire! - if(elementCount[PT_WIRE] > 0) - { - for (nx=0; nx>8].type==PT_WIRE) - parts[r>>8].tmp=parts[r>>8].ctype; - } - } - } - //game of life! - if (elementCount[PT_LIFE]>0&&++CGOL>=GSPEED)//GSPEED is frames per generation - { - int createdsomething = 0; - CGOL=0; - ISGOL=0; - for (nx=CELL; nx>8].type==PT_LIFE/* && parts[r>>8].ctype==golnum-1*/) - { - golnum = parts[r>>8].ctype+1; - if (golnum<=0 || golnum>NGOLALT) { - parts[r>>8].type = PT_NONE; - continue; - } - if (parts[r>>8].tmp == grule[golnum][9]-1) { - gol[nx][ny] = golnum; - for ( nnx=-1; nnx<2; nnx++) - { - for ( nny=-1; nny<2; nny++)//it will count itself as its own neighbor, which is needed, but will have 1 extra for delete check - { - rt = pmap[((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL]; - if (!rt || (rt&0xFF)==PT_LIFE) - { - gol2[((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL][((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][golnum] ++; - gol2[((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL][((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][0] ++; - } - } - } - } else { - parts[r>>8].tmp --; - if (parts[r>>8].tmp<=0) - parts[r>>8].type = PT_NONE;//using kill_part makes it not work - } - } - //} - } - } - } - for (nx=CELL; nx=2&&gol2[nx][ny][golnum]>=(goldelete%2)+goldelete/2) - { - if (create_part(-1, nx, ny, PT_LIFE|((golnum-1)<<8))) - createdsomething = 1; - } - else if (gol[nx][ny]==golnum&&(grule[golnum][goldelete-1]==0||grule[golnum][goldelete-1]==2))//subtract 1 because it counted itself - { - if (parts[r>>8].tmp==grule[golnum][9]-1) - parts[r>>8].tmp --; - } - if (r && parts[r>>8].tmp<=0) - parts[r>>8].type = PT_NONE;//using kill_part makes it not work - } - for ( z = 0; z<=NGOL; z++) - gol2[nx][ny][z] = 0;//this improves performance A LOT compared to the memset, i was getting ~23 more fps with this. - } - } - //memset(gol2, 0, sizeof(gol2)); - } - if (ISWIRE==1)//wifi channel reseting - { - for ( q = 0; q<(int)(MAX_TEMP-73.15f)/100+2; q++) - if (!wireless[q][1]) - { - wireless[q][0] = 0; - } - else - wireless[q][1] = 0; - } - //the main particle loop function, goes over all particles. - for (i=0; i<=parts_lastActiveIndex; i++) - if (parts[i].type) - { - lx = parts[i].x; - ly = parts[i].y; - t = parts[i].type; - if (t<0 || t>=PT_NUM) - { - kill_part(i); - continue; - } - //printf("parts[%d].type: %d\n", i, parts[i].type); - - if (parts[i].life>0 && (ptypes[t].properties&PROP_LIFE_DEC)) - { - // automatically decrease life - parts[i].life--; - if (parts[i].life<=0 && (ptypes[t].properties&(PROP_LIFE_KILL_DEC|PROP_LIFE_KILL))) - { - // kill on change to no life - kill_part(i); - continue; - } - } - else if (parts[i].life<=0 && (ptypes[t].properties&PROP_LIFE_KILL)) - { - // kill if no life - kill_part(i); - continue; - } - - x = (int)(parts[i].x+0.5f); - y = (int)(parts[i].y+0.5f); - - //this kills any particle out of the screen, or in a wall where it isn't supposed to go - if (x=XRES-CELL || y>=YRES-CELL || - (bmap[y/CELL][x/CELL] && - (bmap[y/CELL][x/CELL]==WL_WALL || - bmap[y/CELL][x/CELL]==WL_WALLELEC || - bmap[y/CELL][x/CELL]==WL_ALLOWAIR || - (bmap[y/CELL][x/CELL]==WL_DESTROYALL) || - (bmap[y/CELL][x/CELL]==WL_ALLOWLIQUID && ptypes[t].falldown!=2) || - (bmap[y/CELL][x/CELL]==WL_ALLOWSOLID && ptypes[t].falldown!=1) || - (bmap[y/CELL][x/CELL]==WL_ALLOWGAS && !(ptypes[t].properties&TYPE_GAS)) || //&& ptypes[t].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE && parts[i].type!=PT_HFLM) || - (bmap[y/CELL][x/CELL]==WL_ALLOWENERGY && !(ptypes[t].properties&TYPE_ENERGY)) || - (bmap[y/CELL][x/CELL]==WL_DETECT && (t==PT_METL || t==PT_SPRK)) || - (bmap[y/CELL][x/CELL]==WL_EWALL && !emap[y/CELL][x/CELL])) && (t!=PT_STKM) && (t!=PT_STKM2) && (t!=PT_FIGH))) - { - kill_part(i); - continue; - } - if (bmap[y/CELL][x/CELL]==WL_DETECT && emap[y/CELL][x/CELL]<8) - set_emap(x/CELL, y/CELL); - - //adding to velocity from the particle's velocity - vx[y/CELL][x/CELL] = vx[y/CELL][x/CELL]*ptypes[t].airloss + ptypes[t].airdrag*parts[i].vx; - vy[y/CELL][x/CELL] = vy[y/CELL][x/CELL]*ptypes[t].airloss + ptypes[t].airdrag*parts[i].vy; - - if (t==PT_GAS||t==PT_NBLE) - { - if (pv[y/CELL][x/CELL]<3.5f) - pv[y/CELL][x/CELL] += ptypes[t].hotair*(3.5f-pv[y/CELL][x/CELL]); - if (y+CELL= 0 && y-2 < YRES && (ptypes[t].properties&TYPE_LIQUID)) {//some heat convection for liquids - r = pmap[y-2][x]; - if (!(!r || parts[i].type != (r&0xFF))) { - if (parts[i].temp>parts[r>>8].temp) { - swappage = parts[i].temp; - parts[i].temp = parts[r>>8].temp; - parts[r>>8].temp = swappage; - } - } - } - - //heat transfer code - h_count = 0; -#ifdef REALHEAT - if (t&&(t!=PT_HSWC||parts[i].life==10)) - { - float c_Cm = 0.0f; -#else - if (t&&(t!=PT_HSWC||parts[i].life==10)&&ptypes[t].hconduct>(rand()%250)) - { - float c_Cm = 0.0f; -#endif - if (aheat_enable) - { - c_heat = (hv[y/CELL][x/CELL]-parts[i].temp)*0.04; - c_heat = restrict_flt(c_heat, -MAX_TEMP+MIN_TEMP, MAX_TEMP-MIN_TEMP); - parts[i].temp += c_heat; - hv[y/CELL][x/CELL] -= c_heat; - } - c_heat = 0.0f; - for (j=0; j<8; j++) - { - surround_hconduct[j] = i; - r = surround[j]; - if (!r) - continue; - rt = r&0xFF; - if (rt&&ptypes[rt].hconduct&&(rt!=PT_HSWC||parts[r>>8].life==10) - &&(t!=PT_FILT||(rt!=PT_BRAY&&rt!=PT_BIZR&&rt!=PT_BIZRG)) - &&(rt!=PT_FILT||(t!=PT_BRAY&&t!=PT_PHOT&&t!=PT_BIZR&&t!=PT_BIZRG))) - { - surround_hconduct[j] = r>>8; -#ifdef REALHEAT - c_heat += parts[r>>8].temp*96.645/ptypes[rt].hconduct*fabs(ptypes[rt].weight); - c_Cm += 96.645/ptypes[rt].hconduct*fabs(ptypes[rt].weight); -#else - c_heat += parts[r>>8].temp; -#endif - h_count++; - } - } -#ifdef REALHEAT - if (t == PT_PHOT) - pt = (c_heat+parts[i].temp*96.645)/(c_Cm+96.645); - else - pt = (c_heat+parts[i].temp*96.645/ptypes[t].hconduct*fabs(ptypes[t].weight))/(c_Cm+96.645/ptypes[t].hconduct*fabs(ptypes[t].weight)); - -#else - pt = (c_heat+parts[i].temp)/(h_count+1); -#endif - pt = parts[i].temp = restrict_flt(pt, MIN_TEMP, MAX_TEMP); - for (j=0; j<8; j++) - { - parts[surround_hconduct[j]].temp = pt; - } - - ctemph = ctempl = pt; - // change boiling point with pressure - if ((ptypes[t].state==ST_LIQUID && ptransitions[t].tht>-1 && ptransitions[t].tht-1 && ptransitions[t].tltptransitions[t].thv&&ptransitions[t].tht>-1) { - // particle type change due to high temperature - if (ptransitions[t].tht!=PT_NUM) - t = ptransitions[t].tht; - else if (t==PT_ICEI) { - if (parts[i].ctype>0&&parts[i].ctype274.0f) t = PT_WATR; - else s = 0; - } - else if (t==PT_SLTW) { - if (1>rand()%6) t = PT_SALT; - else t = PT_WTRV; - } - else s = 0; - } else if (ctempl-1) { - // particle type change due to low temperature - if (ptransitions[t].tlt!=PT_NUM) - t = ptransitions[t].tlt; - else if (t==PT_WTRV) { - if (pt<273.0f) t = PT_RIME; - else t = PT_DSTW; - } - else if (t==PT_LAVA) { - if (parts[i].ctype>0 && parts[i].ctype=ptransitions[PT_BMTL].thv) s = 0; - else if (ptransitions[parts[i].ctype].tht==PT_LAVA) { - if (pt>=ptransitions[parts[i].ctype].thv) s = 0; - } - else if (pt>=973.0f) s = 0; // freezing point for lava with any other (not listed in ptransitions as turning into lava) ctype - if (s) { - t = parts[i].ctype; - parts[i].ctype = PT_NONE; - if (t==PT_THRM) { - parts[i].tmp = 0; - t = PT_BMTL; - } - if (t==PT_PLUT) - { - parts[i].tmp = 0; - t = PT_LAVA; - } - } - } - else if (pt<973.0f) t = PT_STNE; - else s = 0; - } - else s = 0; - } - else s = 0; - if (s) { // particle type change occurred - if (t==PT_ICEI||t==PT_LAVA) - parts[i].ctype = parts[i].type; - if (!(t==PT_ICEI&&parts[i].ctype==PT_FRZW)) parts[i].life = 0; - if (ptypes[t].state==ST_GAS&&ptypes[parts[i].type].state!=ST_GAS) - pv[y/CELL][x/CELL] += 0.50f; - part_change_type(i,x,y,t); - if (t==PT_FIRE||t==PT_PLSM||t==PT_HFLM) - parts[i].life = rand()%50+120; - if (t==PT_LAVA) { - if (parts[i].ctype==PT_BRMT) parts[i].ctype = PT_BMTL; - else if (parts[i].ctype==PT_SAND) parts[i].ctype = PT_GLAS; - else if (parts[i].ctype==PT_BGLA) parts[i].ctype = PT_GLAS; - else if (parts[i].ctype==PT_PQRT) parts[i].ctype = PT_QRTZ; - parts[i].life = rand()%120+240; - } - if (t==PT_NONE) { - kill_part(i); - goto killed; - } - } - - pt = parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); - if (t==PT_LAVA) { - parts[i].life = restrict_flt((parts[i].temp-700)/7, 0.0f, 400.0f); - if (parts[i].ctype==PT_THRM&&parts[i].tmp>0) - { - parts[i].tmp--; - parts[i].temp = 3500; - } - if (parts[i].ctype==PT_PLUT&&parts[i].tmp>0) - { - parts[i].tmp--; - parts[i].temp = MAX_TEMP; - } - } - } - } - - if (t==PT_LIFE) - { - parts[i].temp = restrict_flt(parts[i].temp-50.0f, MIN_TEMP, MAX_TEMP); - //ISGOL=1;//means there is a life particle on screen - } - if (t==PT_WIRE) - { - //wire_placed = 1; - } - //spark updates from walls - if ((ptypes[t].properties&PROP_CONDUCTS) || t==PT_SPRK) - { - nx = x % CELL; - if (nx == 0) - nx = x/CELL - 1; - else if (nx == CELL-1) - nx = x/CELL + 1; - else - nx = x/CELL; - ny = y % CELL; - if (ny == 0) - ny = y/CELL - 1; - else if (ny == CELL-1) - ny = y/CELL + 1; - else - ny = y/CELL; - if (nx>=0 && ny>=0 && nx2.5f) - { - parts[i].life = rand()%80+180; - parts[i].temp = restrict_flt(ptypes[PT_FIRE].heat + (ptypes[t].flammable/2), MIN_TEMP, MAX_TEMP); - t = PT_FIRE; - part_change_type(i,x,y,t); - pv[y/CELL][x/CELL] += 0.25f * CFDS; - } - - - s = 1; - gravtot = fabs(gravy[(y/CELL)*(XRES/CELL)+(x/CELL)])+fabs(gravx[(y/CELL)*(XRES/CELL)+(x/CELL)]); - if (pv[y/CELL][x/CELL]>ptransitions[t].phv&&ptransitions[t].pht>-1) { - // particle type change due to high pressure - if (ptransitions[t].pht!=PT_NUM) - t = ptransitions[t].pht; - else if (t==PT_BMTL) { - if (pv[y/CELL][x/CELL]>2.5f) - t = PT_BRMT; - else if (pv[y/CELL][x/CELL]>1.0f && parts[i].tmp==1) - t = PT_BRMT; - else s = 0; - } - else s = 0; - } else if (pv[y/CELL][x/CELL]-1) { - // particle type change due to low pressure - if (ptransitions[t].plt!=PT_NUM) - t = ptransitions[t].plt; - else s = 0; - } else if (gravtot>(ptransitions[t].phv/4.0f)&&ptransitions[t].pht>-1) { - // particle type change due to high gravity - if (ptransitions[t].pht!=PT_NUM) - t = ptransitions[t].pht; - else if (t==PT_BMTL) { - if (gravtot>0.625f) - t = PT_BRMT; - else if (gravtot>0.25f && parts[i].tmp==1) - t = PT_BRMT; - else s = 0; - } - else s = 0; - } else s = 0; - if (s) { // particle type change occurred - parts[i].life = 0; - part_change_type(i,x,y,t); - if (t==PT_FIRE) - parts[i].life = rand()%50+120; - if (t==PT_NONE) { - kill_part(i); - goto killed; - } - } - - //call the particle update function, if there is one -#ifdef LUACONSOLE - if (ptypes[t].update_func && lua_el_mode[t] != 2) -#else - if (ptypes[t].update_func) -#endif - { - if ((*(ptypes[t].update_func))(this, i,x,y,surround_space,nt, parts, pmap)) - continue; - } -#ifdef LUACONSOLE - if(lua_el_mode[t]) - { - if(luacon_part_update(t,i,x,y,surround_space,nt)) - continue; - } -#endif - if (legacy_enable)//if heat sim is off - update_legacy_all(this, i,x,y,surround_space,nt, parts, pmap); - -killed: - if (parts[i].type == PT_NONE)//if its dead, skip to next particle - continue; - - if (!parts[i].vx&&!parts[i].vy)//if its not moving, skip to next particle, movement code it next - continue; - -#if defined(WIN32) && !defined(__GNUC__) - mv = max(fabsf(parts[i].vx), fabsf(parts[i].vy)); -#else - mv = fmaxf(fabsf(parts[i].vx), fabsf(parts[i].vy)); -#endif - if (mv < ISTP) - { - clear_x = x; - clear_y = y; - clear_xf = parts[i].x; - clear_yf = parts[i].y; - fin_xf = clear_xf + parts[i].vx; - fin_yf = clear_yf + parts[i].vy; - fin_x = (int)(fin_xf+0.5f); - fin_y = (int)(fin_yf+0.5f); - } - else - { - // interpolate to see if there is anything in the way - dx = parts[i].vx*ISTP/mv; - dy = parts[i].vy*ISTP/mv; - fin_xf = parts[i].x; - fin_yf = parts[i].y; - while (1) - { - mv -= ISTP; - fin_xf += dx; - fin_yf += dy; - fin_x = (int)(fin_xf+0.5f); - fin_y = (int)(fin_yf+0.5f); - if (mv <= 0.0f) - { - // nothing found - fin_xf = parts[i].x + parts[i].vx; - fin_yf = parts[i].y + parts[i].vy; - fin_x = (int)(fin_xf+0.5f); - fin_y = (int)(fin_yf+0.5f); - clear_xf = fin_xf-dx; - clear_yf = fin_yf-dy; - clear_x = (int)(clear_xf+0.5f); - clear_y = (int)(clear_yf+0.5f); - break; - } - if (fin_x=XRES-CELL || fin_y>=YRES-CELL || pmap[fin_y][fin_x] || (bmap[fin_y/CELL][fin_x/CELL] && (bmap[fin_y/CELL][fin_x/CELL]==WL_DESTROYALL || bmap[fin_y/CELL][fin_x/CELL]==WL_DETECT || !eval_move(t,fin_x,fin_y,NULL)))) - { - // found an obstacle - clear_xf = fin_xf-dx; - clear_yf = fin_yf-dy; - clear_x = (int)(clear_xf+0.5f); - clear_y = (int)(clear_yf+0.5f); - break; - } - - } - } - - stagnant = parts[i].flags & FLAG_STAGNANT; - parts[i].flags &= ~FLAG_STAGNANT; - - if ((t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)) { - if (t == PT_PHOT) { - rt = pmap[fin_y][fin_x] & 0xFF; - lt = pmap[y][x] & 0xFF; - - r = eval_move(PT_PHOT, fin_x, fin_y, NULL); - if (((rt==PT_GLAS && lt!=PT_GLAS) || (rt!=PT_GLAS && lt==PT_GLAS)) && r) { - if (!get_normal_interp(REFRACT|t, parts[i].x, parts[i].y, parts[i].vx, parts[i].vy, &nrx, &nry)) { - kill_part(i); - continue; - } - - r = get_wavelength_bin(&parts[i].ctype); - if (r == -1) { - kill_part(i); - continue; - } - nn = GLASS_IOR - GLASS_DISP*(r-15)/15.0f; - nn *= nn; - nrx = -nrx; - nry = -nry; - if (rt==PT_GLAS && lt!=PT_GLAS) - nn = 1.0f/nn; - ct1 = parts[i].vx*nrx + parts[i].vy*nry; - ct2 = 1.0f - (nn*nn)*(1.0f-(ct1*ct1)); - if (ct2 < 0.0f) { - // total internal reflection - parts[i].vx -= 2.0f*ct1*nrx; - parts[i].vy -= 2.0f*ct1*nry; - fin_xf = parts[i].x; - fin_yf = parts[i].y; - fin_x = x; - fin_y = y; - } else { - // refraction - ct2 = sqrtf(ct2); - ct2 = ct2 - nn*ct1; - parts[i].vx = nn*parts[i].vx + ct2*nrx; - parts[i].vy = nn*parts[i].vy + ct2*nry; - } - } - } - if (stagnant)//FLAG_STAGNANT set, was reflected on previous frame - { - // cast coords as int then back to float for compatibility with existing saves - if (!do_move(i, x, y, (float)fin_x, (float)fin_y)) { - kill_part(i); - continue; - } - } - else if (!do_move(i, x, y, fin_xf, fin_yf)) - { - // reflection - parts[i].flags |= FLAG_STAGNANT; - if (t==PT_NEUT && 100>(rand()%1000)) - { - kill_part(i); - continue; - } - r = pmap[fin_y][fin_x]; - - if ((r & 0xFF) == PT_PIPE && !(parts[r>>8].tmp&0xFF)) - { - parts[r>>8].tmp = (parts[r>>8].tmp&~0xFF) | parts[i].type; - parts[r>>8].temp = parts[i].temp; - parts[r>>8].flags = parts[i].life; - parts[r>>8].pavg[0] = parts[i].tmp; - parts[r>>8].pavg[1] = parts[i].ctype; - kill_part(i); - continue; - } - - // this should be replaced with a particle type attribute ("photwl" or something) - if ((r & 0xFF) == PT_PSCN) parts[i].ctype = 0x00000000; - if ((r & 0xFF) == PT_NSCN) parts[i].ctype = 0x00000000; - if ((r & 0xFF) == PT_SPRK) parts[i].ctype = 0x00000000; - if ((r & 0xFF) == PT_COAL) parts[i].ctype = 0x00000000; - if ((r & 0xFF) == PT_BCOL) parts[i].ctype = 0x00000000; - if ((r & 0xFF) == PT_PLEX) parts[i].ctype &= 0x1F00003E; - if ((r & 0xFF) == PT_NITR) parts[i].ctype &= 0x0007C000; - if ((r & 0xFF) == PT_NBLE) parts[i].ctype &= 0x3FFF8000; - if ((r & 0xFF) == PT_LAVA) parts[i].ctype &= 0x3FF00000; - if ((r & 0xFF) == PT_ACID) parts[i].ctype &= 0x1FE001FE; - if ((r & 0xFF) == PT_DUST) parts[i].ctype &= 0x3FFFFFC0; - if ((r & 0xFF) == PT_SNOW) parts[i].ctype &= 0x03FFFFFF; - if ((r & 0xFF) == PT_GOO) parts[i].ctype &= 0x3FFAAA00; - if ((r & 0xFF) == PT_PLNT) parts[i].ctype &= 0x0007C000; - if ((r & 0xFF) == PT_PLUT) parts[i].ctype &= 0x001FCE00; - if ((r & 0xFF) == PT_URAN) parts[i].ctype &= 0x003FC000; - - if (get_normal_interp(t, parts[i].x, parts[i].y, parts[i].vx, parts[i].vy, &nrx, &nry)) { - dp = nrx*parts[i].vx + nry*parts[i].vy; - parts[i].vx -= 2.0f*dp*nrx; - parts[i].vy -= 2.0f*dp*nry; - // leave the actual movement until next frame so that reflection of fast particles and refraction happen correctly - } else { - if (t!=PT_NEUT) - kill_part(i); - continue; - } - if (!parts[i].ctype&&t!=PT_NEUT&&t!=PT_ELEC) { - kill_part(i); - continue; - } - } - } - else if (ptypes[t].falldown==0) - { - // gasses and solids (but not powders) - if (!do_move(i, x, y, fin_xf, fin_yf)) - { - // can't move there, so bounce off - // TODO - if (fin_x>x+ISTP) fin_x=x+ISTP; - if (fin_xy+ISTP) fin_y=y+ISTP; - if (fin_y= rand()%400)//checking stagnant is cool, but then it doesn't update when you change it later. - { - if (!flood_water(x,y,i,y, parts[i].tmp2)) - goto movedone; - } - // liquids and powders - if (!do_move(i, x, y, fin_xf, fin_yf)) - { - if (fin_x!=x && do_move(i, x, y, fin_xf, clear_yf)) - { - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; - } - else if (fin_y!=y && do_move(i, x, y, clear_xf, fin_yf)) - { - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; - } - else - { - s = 1; - r = (rand()%2)*2-1; - if ((clear_x!=x || clear_y!=y || nt || surround_space) && - (fabsf(parts[i].vx)>0.01f || fabsf(parts[i].vy)>0.01f)) - { - // allow diagonal movement if target position is blocked - // but no point trying this if particle is stuck in a block of identical particles - dx = parts[i].vx - parts[i].vy*r; - dy = parts[i].vy + parts[i].vx*r; - if (fabsf(dy)>fabsf(dx)) - mv = fabsf(dy); - else - mv = fabsf(dx); - dx /= mv; - dy /= mv; - if (do_move(i, x, y, clear_xf+dx, clear_yf+dy)) - { - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; - goto movedone; - } - swappage = dx; - dx = dy*r; - dy = -swappage*r; - if (do_move(i, x, y, clear_xf+dx, clear_yf+dy)) - { - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; - goto movedone; - } - } - if (ptypes[t].falldown>1 && !ngrav_enable && gravityMode==0 && parts[i].vy>fabsf(parts[i].vx)) - { - s = 0; - // stagnant is true if FLAG_STAGNANT was set for this particle in previous frame - if (!stagnant || nt) //nt is if there is an something else besides the current particle type, around the particle - rt = 30;//slight less water lag, although it changes how it moves a lot - else - rt = 10; - for (j=clear_x+r; j>=0 && j>=clear_x-rt && j0) - r = 1; - else - r = -1; - if (s==1) - for (j=ny+r; j>=0 && j=ny-rt && j1 && fabsf(pGravX*parts[i].vx+pGravY*parts[i].vy)>fabsf(pGravY*parts[i].vx-pGravX*parts[i].vy)) - { - float nxf, nyf, prev_pGravX, prev_pGravY, ptGrav = ptypes[t].gravity; - s = 0; - // stagnant is true if FLAG_STAGNANT was set for this particle in previous frame - if (!stagnant || nt) //nt is if there is an something else besides the current particle type, around the particle - rt = 30;//slight less water lag, although it changes how it moves a lot - else - rt = 10; - nxf = clear_xf; - nyf = clear_yf; - for (j=0;jfabsf(pGravX)) - mv = fabsf(pGravY); - else - mv = fabsf(pGravX); - if (mv<0.0001f) break; - pGravX /= mv; - pGravY /= mv; - if (j) - { - nxf += r*(pGravY*2.0f-prev_pGravY); - nyf += -r*(pGravX*2.0f-prev_pGravX); - } - else - { - nxf += r*pGravY; - nyf += -r*pGravX; - } - prev_pGravX = pGravX; - prev_pGravY = pGravY; - nx = (int)(nxf+0.5f); - ny = (int)(nyf+0.5f); - if (nx<0 || ny<0 || nx>=XRES || ny >=YRES) - break; - if ((pmap[ny][nx]&0xFF)!=t || bmap[ny/CELL][nx/CELL]) - { - s = do_move(i, x, y, nxf, nyf); - if (s) - { - nx = (int)(parts[i].x+0.5f); - ny = (int)(parts[i].y+0.5f); - break; - } - if (bmap[ny/CELL][nx/CELL]!=WL_STREAM) - break; - } - } - if (s==1) - { - clear_x = nx; - clear_y = ny; - for (j=0;jfabsf(pGravX)) - mv = fabsf(pGravY); - else - mv = fabsf(pGravX); - if (mv<0.0001f) break; - pGravX /= mv; - pGravY /= mv; - nxf += pGravX; - nyf += pGravY; - nx = (int)(nxf+0.5f); - ny = (int)(nyf+0.5f); - if (nx<0 || ny<0 || nx>=XRES || ny>=YRES) - break; - if ((pmap[ny][nx]&0xFF)!=t || bmap[ny/CELL][nx/CELL]) - { - s = do_move(i, clear_x, clear_y, nxf, nyf); - if (s || bmap[ny/CELL][nx/CELL]!=WL_STREAM) - break; - } - } - } - else if (s==-1) {} // particle is out of bounds - else if ((clear_x!=x||clear_y!=y) && do_move(i, x, y, clear_xf, clear_yf)) {} - else parts[i].flags |= FLAG_STAGNANT; - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; - } - else - { - // if interpolation was done, try moving to last clear position - if ((clear_x!=x||clear_y!=y) && do_move(i, x, y, clear_xf, clear_yf)) {} - else parts[i].flags |= FLAG_STAGNANT; - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; - } - } - } - } -movedone: - continue; - } -} - -void Simulation::update_particles()//doesn't update the particles themselves, but some other things -{ - int i, j, x, y, t, nx, ny, r, cr,cg,cb, l = -1; - float lx, ly; - int lastPartUsed = 0; - int lastPartUnused = -1; -#ifdef MT - int pt = 0, pc = 0; - pthread_t *InterThreads; -#endif - - air->update_air(); - - memset(pmap, 0, sizeof(pmap)); - memset(photons, 0, sizeof(photons)); - NUM_PARTS = 0; - for (i=0; i<=parts_lastActiveIndex; i++)//the particle loop that resets the pmap/photon maps every frame, to update them. - { - if (parts[i].type) - { - t = parts[i].type; - x = (int)(parts[i].x+0.5f); - y = (int)(parts[i].y+0.5f); - if (x>=0 && y>=0 && x=NPART-1) pfree = -1; - else pfree = parts_lastActiveIndex+1; - } - else - { - if (parts_lastActiveIndex>=NPART-1) parts[lastPartUnused].life = -1; - else parts[lastPartUnused].life = parts_lastActiveIndex+1; - } - parts_lastActiveIndex = lastPartUsed; - if (!sys_pause||framerender) - { - for (y=0; y=XRES || ny<0 || ny>=YRES) - break; - addpixel(vid, nx, ny, 255, 255, 255, 64); - i = nx/CELL; - j = ny/CELL; - lx += vx[j][i]*0.125f; - ly += vy[j][i]*0.125f; - if (bmap[j][i]==WL_STREAM && i!=x && j!=y) - break; - } - drawtext(vid, x*CELL, y*CELL-2, "\x8D", 255, 255, 255, 128); - } -*/ -} - -Simulation::Simulation() -{ - //Create and attach gravity simulation - grav = new Gravity(); - //Give air sim references to our data - grav->bmap = bmap; - //Gravity sim gives us maps to use - gravx = grav->gravx; - gravy = grav->gravy; - gravp = grav->gravp; - gravmap = grav->gravmap; - - //Create and attach air simulation - air = new Air(); - //Give air sim references to our data - air->bmap = bmap; - air->emap = emap; - air->fvx = fvx; - air->fvy = fvy; - //Air sim gives us maps to use - vx = air->vx; - vy = air->vy; - pv = air->pv; - hv = air->hv; - - //ptypes[0] = {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, 0, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}; - //ptypes[1] = {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, 0, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}; - //ptypes[2] = {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, 0, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}; - -#define SC_WALL 0 -#define SC_ELEC 1 -#define SC_POWERED 2 -#define SC_EXPLOSIVE 3 -#define SC_GAS 4 -#define SC_LIQUID 5 -#define SC_POWDERS 6 -#define SC_SOLIDS 7 -#define SC_NUCLEAR 8 -#define SC_SPECIAL 9 -#define SC_LIFE 10 -#define SC_TOOL 11 -#define SC_CRACKER 13 -#define SC_CRACKER2 14 -#define SC_TOTAL 12 - - part_type ptypest[PT_NUM] = - { - //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description - {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}, - {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}, - {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}, - {"OIL", PIXPACK(0x404010), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 20, 0, 0, 5, 1, 1, 20, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Flammable.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"FIRE", PIXPACK(0xFF1000), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, R_TEMP+400.0f+273.15f, 88, "Ignites flammable materials. Heats air.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_FIRE}, - {"STNE", PIXPACK(0xA0A0A0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Heavy particles. Meltable.", ST_SOLID, TYPE_PART, NULL, NULL}, - {"LAVA", PIXPACK(0xE05010), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.0003f * CFDS, 2, 0, 0, 0, 2, 1, 1, 45, SC_LIQUID, R_TEMP+1500.0f+273.15f, 60, "Heavy liquid. Ignites flammable materials. Solidifies when cold.", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC, &update_PYRO, &graphics_LAVA}, - {"GUN", PIXPACK(0xC0C0D0), 0.7f, 0.02f * CFDS, 0.94f, 0.80f, -0.1f, 0.1f, 0.00f, 0.000f * CFDS, 1, 600, 1, 0, 10, 1, 1, 85, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 97, "Light dust. Explosive.", ST_SOLID, TYPE_PART, NULL, NULL}, - {"NITR", PIXPACK(0x20E010), 0.5f, 0.02f * CFDS, 0.92f, 0.97f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 2, 1000, 2, 0, 3, 1, 1, 23, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 50, "Liquid. Pressure sensitive explosive.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"CLNE", PIXPACK(0xFFD010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Solid. Duplicates any particles it touches.", ST_SOLID, TYPE_SOLID, &update_CLNE, NULL}, - {"GAS", PIXPACK(0xE0FF20), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 600, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Gas. Diffuses. Flammable. Liquefies under pressure.", ST_GAS, TYPE_GAS, NULL, NULL}, - {"C-4", PIXPACK(0xD080E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 2, 50, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Solid. Pressure sensitive explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, NULL, NULL}, - {"GOO", PIXPACK(0x804000), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 75, "Solid. Deforms and disappears under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GOO, NULL}, - {"ICE", PIXPACK(0xA0C0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP-50.0f+273.15f, 46, "Solid. Freezes water. Crushes under pressure. Cools down air.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ICEI, NULL}, - {"METL", PIXPACK(0x404060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Conducts electricity. Meltable.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, - {"SPRK", PIXPACK(0xFFFF80), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electricity. Conducted by metal and water.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SPRK, &graphics_SPRK}, - {"SNOW", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f, -0.00005f* CFDS,1, 0, 0, 0, 20, 1, 1, 50, SC_POWDERS, R_TEMP-30.0f+273.15f, 46, "Light particles.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_ICEI, NULL}, - {"WOOD", PIXPACK(0xC0A040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 15, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Solid. Flammable.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, NULL, NULL}, - {"NEUT", PIXPACK(0x20E0FF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 60, "Neutrons. Interact with matter in odd ways.", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_NEUT, &graphics_NEUT}, - {"PLUT", PIXPACK(0x407020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 251, "Heavy particles. Fissile. Generates neutrons under pressure.", ST_SOLID, TYPE_PART|PROP_NEUTPENETRATE|PROP_RADIOACTIVE, &update_PLUT, NULL}, - {"PLNT", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 65, "Plant, drinks water and grows.", ST_SOLID, TYPE_SOLID|PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_PLNT, NULL}, - {"ACID", PIXPACK(0xED55FF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 40, 0, 0, 1, 1, 1, 10, SC_LIQUID, R_TEMP+0.0f +273.15f, 34, "Dissolves almost everything.", ST_LIQUID, TYPE_LIQUID|PROP_DEADLY, &update_ACID, &graphics_ACID}, - {"VOID", PIXPACK(0x790B0B), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Hole, will drain away any particles.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"WTRV", PIXPACK(0xA0A0FF), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, -0.1f, 0.75f, 0.0003f * CFDS, 0, 0, 0, 0, 4, 1, 1, 1, SC_GAS, R_TEMP+100.0f+273.15f, 48, "Steam, heats up air, produced from hot water.", ST_GAS, TYPE_GAS, &update_WTRV, NULL}, - {"CNCT", PIXPACK(0xC0C0C0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 100, "Concrete, stronger than stone.", ST_SOLID, TYPE_PART|PROP_HOT_GLOW, NULL, NULL}, - {"DSTW", PIXPACK(0x1020C0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 23, "Distilled water, does not conduct electricity.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_DSTW, NULL}, - {"SALT", PIXPACK(0xFFFFFF), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 75, SC_POWDERS, R_TEMP+0.0f +273.15f, 110, "Salt, dissolves in water.", ST_SOLID, TYPE_PART, NULL, NULL}, - {"SLTW", PIXPACK(0x4050F0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP+0.0f +273.15f, 75, "Saltwater, conducts electricity, difficult to freeze.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_SLTW, NULL}, - {"DMND", PIXPACK(0xCCFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 186, "Diamond. Indestructible.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"BMTL", PIXPACK(0x505070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Breakable metal.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_BMTL, NULL}, - {"BRMT", PIXPACK(0x705060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken metal.", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_BRMT, NULL}, - {"PHOT", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+900.0f+273.15f, 251, "Photons. Travel in straight lines.", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_PHOT, &graphics_PHOT}, - {"URAN", PIXPACK(0x707020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_NUCLEAR, R_TEMP+30.0f+273.15f, 251, "Heavy particles. Generates heat under pressure.", ST_SOLID, TYPE_PART | PROP_RADIOACTIVE, &update_URAN, NULL}, - {"WAX", PIXPACK(0xF0F0BB), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 44, "Wax. Melts at moderately high temperatures.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"MWAX", PIXPACK(0xE0E0AA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 5, 0, 0, 2, 1, 1, 25, SC_LIQUID, R_TEMP+28.0f+273.15f, 44, "Liquid Wax.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"PSCN", PIXPACK(0x805050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "P-Type Silicon, Will transfer current to any conductor.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"NSCN", PIXPACK(0x505080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "N-Type Silicon, Will not transfer current to P-Type Silicon.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"LN2", PIXPACK(0x80A0DF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 1, 30, SC_LIQUID, 70.15f, 70, "Liquid Nitrogen. Very cold.", ST_SOLID, TYPE_LIQUID, NULL, NULL}, - {"INSL", PIXPACK(0x9EA3B6), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 7, 0, 0, 10, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Insulator, does not conduct heat or electricity.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"VACU", PIXPACK(0x303030), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, -0.01f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+70.0f+273.15f, 255, "Vacuum, sucks in other particles and heats up.", ST_NONE, TYPE_SOLID, NULL, NULL}, - {"VENT", PIXPACK(0xEFEFEF), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.010f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP-16.0f+273.15f, 255, "Air vent, creates pressure and pushes other particles away.", ST_NONE, TYPE_SOLID, NULL, NULL}, - {"RBDM", PIXPACK(0xCCCCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 1, 50, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 240, "Rubidium, explosive, especially on contact with water, low melting point", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"LRBD", PIXPACK(0xAAAAAA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 1000, 1, 0, 2, 1, 1, 45, SC_EXPLOSIVE, R_TEMP+45.0f+273.15f, 170, "Liquid Rubidium.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"NTCT", PIXPACK(0x505040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when hot (More than 100C)", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NPTCT, NULL}, - {"SAND", PIXPACK(0xFFD090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Sand, Heavy particles. Meltable.", ST_SOLID, TYPE_PART, NULL, NULL}, - {"GLAS", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 150, "Solid. Meltable. Shatters under pressure", ST_SOLID, TYPE_SOLID | PROP_NEUTPASS | PROP_HOT_GLOW | PROP_SPARKSETTLE, &update_GLAS, NULL}, - {"PTCT", PIXPACK(0x405050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when cold (Less than 100C)", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NPTCT, NULL}, - {"BGLA", PIXPACK(0x606060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Glass, Heavy particles. Meltable. Bagels.", ST_SOLID, TYPE_PART | PROP_HOT_GLOW, NULL, NULL}, - {"THDR", PIXPACK(0xFFFFA0), 0.0f, 0.00f * CFDS, 1.0f, 0.30f, -0.99f, 0.6f, 0.62f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_EXPLOSIVE, 9000.0f +273.15f, 1, "Lightning! Very hot, inflicts damage upon most materials, transfers current to metals.", ST_NONE, TYPE_ENERGY, &update_THDR, &graphics_THDR}, - {"PLSM", PIXPACK(0xBB99FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.30f, 0.001f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, 10000.0f +273.15f, 5, "Plasma, extremely hot.", ST_NONE, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_PLSM}, - {"ETRD", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)", ST_NONE, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"NICE", PIXPACK(0xC0E0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 35.0f, 46, "Nitrogen Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"NBLE", PIXPACK(0xEB4917), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 106, "Noble Gas. Diffuses. Conductive. Ionizes into plasma when introduced to electricity", ST_GAS, TYPE_GAS|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"BTRY", PIXPACK(0x858505), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Generates Electricity.", ST_SOLID, TYPE_SOLID, &update_BTRY, NULL}, - {"LCRY", PIXPACK(0x505050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)", ST_SOLID, TYPE_SOLID, &update_LCRY, &graphics_LCRY}, - {"STKM", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM, &graphics_STKM}, - {"SWCH", PIXPACK(0x103B11), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Only conducts when switched on. (PSCN switches on, NSCN switches off)", ST_SOLID, TYPE_SOLID, &update_SWCH, &graphics_SWCH}, - {"SMKE", PIXPACK(0x222222), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+320.0f+273.15f, 88, "Smoke", ST_SOLID, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_SMKE}, - {"DESL", PIXPACK(0x440000), 1.0f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.0f, 0.0f * CFDS, 2, 2, 0, 0, 5, 1, 1, 15, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Explodes under high pressure and temperatures", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"COAL", PIXPACK(0x222222), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly.", ST_SOLID, TYPE_SOLID, &update_COAL, &graphics_COAL}, - {"LOXY", PIXPACK(0x80A0EF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 5000, 0, 0, 0, 1, 1, 30, SC_LIQUID, 80.0f, 70, "Liquid Oxygen. Very cold. Reacts with fire", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"OXYG", PIXPACK(0x80A0FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 3.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Gas. Ignites easily.", ST_GAS, TYPE_GAS, &update_O2, NULL}, - {"INWR", PIXPACK(0x544141), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Insulated Wire. Doesn't conduct to metal or semiconductors.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"YEST", PIXPACK(0xEEE0C0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 15, 0, 0, 30, 1, 1, 80, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Yeast, grows when warm (~37C).", ST_SOLID, TYPE_PART, &update_YEST, NULL}, - {"DYST", PIXPACK(0xBBB0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 20, 0, 0, 30, 0, 1, 80, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Dead Yeast.", ST_SOLID, TYPE_PART, NULL, NULL}, - {"THRM", PIXPACK(0xA08090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 211, "Thermite. Burns at extremely high temperature.", ST_SOLID, TYPE_PART, &update_THRM, NULL}, - {"GLOW", PIXPACK(0x445464), 0.3f, 0.02f * CFDS, 0.98f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 2, 1, 1, 40, SC_LIQUID, R_TEMP+20.0f+273.15f, 44, "Glow, Glows under pressure", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC, &update_GLOW, &graphics_GLOW}, - {"BRCK", PIXPACK(0x808080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Brick, breakable building material.", ST_SOLID, TYPE_SOLID|PROP_HOT_GLOW, NULL, NULL}, - {"CFLM", PIXPACK(0x8080FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.0005f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, 0.0f, 88, "Sub-zero flame.", ST_LIQUID, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, NULL, &graphics_HFLM}, - {"FIRW", PIXPACK(0xFFA040), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, -0.99f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 55, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 70, "Fireworks!", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_FIRW, &graphics_FIRW}, - {"FUSE", PIXPACK(0x0A5706), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly. Ignites at somewhat high temperatures and electricity.", ST_SOLID, TYPE_SOLID, &update_FUSE, NULL}, - {"FSEP", PIXPACK(0x63AD5F), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 70, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Fuse Powder. See FUSE.", ST_SOLID, TYPE_PART, &update_FSEP, NULL}, - {"AMTR", PIXPACK(0x808080), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.00f, 0.10f, 1.00f, 0.0000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Anti-Matter, Destroys a majority of particles", ST_NONE, TYPE_PART, &update_AMTR, NULL}, //Maybe TYPE_ENERGY? - {"BCOL", PIXPACK(0x333333), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Coal. Heavy particles. See COAL", ST_SOLID, TYPE_PART, &update_BCOL, NULL}, - {"PCLN", PIXPACK(0x3B3B0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, duplicates any particles it touches.", ST_NONE, TYPE_SOLID, &update_PCLN, &graphics_PCLN}, - {"HSWC", PIXPACK(0x3B0A0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Heat switch. Conducts Heat only when activated", ST_NONE, TYPE_SOLID, &update_HSWC, &graphics_HSWC}, - {"IRON", PIXPACK(0x707070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 50, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Rusts with salt, can be used for electrolysis of WATR", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_IRON, NULL}, - {"MORT", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_CRACKER2, R_TEMP+4.0f +273.15f, 60, "Steam Train.", ST_NONE, TYPE_PART, &update_MORT, NULL}, - {"LIFE", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 1, 100, SC_LIFE, 9000.0f, 40, "Game Of Life! B3/S23", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, &graphics_LIFE}, - {"DLAY", PIXPACK(0x753590), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, 4.0f+273.15f, 0, "Conducts with temperature-dependent delay. (use HEAT/COOL).", ST_SOLID, TYPE_SOLID, &update_DLAY, &graphics_DLAY}, - {"CO2", PIXPACK(0x666666), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.1f, 1.0f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+273.15f, 88, "Carbon Dioxide", ST_GAS, TYPE_GAS, &update_CO2, NULL}, - {"DRIC", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 172.65f, 2, "Dry Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"BUBW", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Carbonated water. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_CBNW, &graphics_CBNW}, - {"STOR", PIXPACK(0x50DFDF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. Stores a single particle, releases when charged with PSCN, also passes to PIPE", ST_NONE, TYPE_SOLID, &update_STOR, &graphics_STOR}, - {"PVOD", PIXPACK(0x792020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, destroys entering particles", ST_NONE, TYPE_SOLID, &update_PVOD, &graphics_PVOD}, - {"CONV", PIXPACK(0x0AAB0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Solid. Converts whatever touches it into its ctype.", ST_NONE, TYPE_SOLID, &update_CONV, NULL}, - {"CAUS", PIXPACK(0x80FFA0), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 1.50f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Caustic Gas, acts like Acid", ST_GAS, TYPE_GAS|PROP_DEADLY, &update_CAUS, NULL}, - {"LIGH", PIXPACK(0xFFFFC0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "More realistic lightning. Set pen size to set the size of the lightning.", ST_SOLID, TYPE_SOLID, &update_LIGH, &graphics_LIGH}, - {"TESC", PIXPACK(0x707040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Tesla coil!", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, - {"DEST", PIXPACK(0xFF3311), -0.05f, 0.00f * CFDS, 0.95f, 0.95f, -0.1f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 101, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 150, "More destructive Bomb.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_DEST, &graphics_DEST}, - {"SPNG", PIXPACK(0xFFBE30), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 1, 30, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "A sponge, absorbs water.", ST_SOLID, TYPE_SOLID, &update_SPNG, &graphics_SPNG}, - {"RIME", PIXPACK(0xCCCCCC), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 100, SC_CRACKER2, 243.15f, 100, "Not quite Ice", ST_SOLID, TYPE_SOLID, &update_RIME, NULL}, - {"FOG", PIXPACK(0xAAAAAA), 0.8f, 0.00f * CFDS, 0.4f, 0.70f, -0.1f, 0.0f, 0.99f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 1, SC_CRACKER2, 243.15f, 100, "Not quite Steam", ST_GAS, TYPE_GAS|PROP_LIFE_DEC, &update_FOG, NULL}, - {"BCLN", PIXPACK(0xFFD040), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Breakable Clone.", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_BCLN, NULL}, - {"LOVE", PIXPACK(0xFF30FF), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_CRACKER2, 373.0f, 40, "Love...", ST_GAS, TYPE_SOLID, &update_MISC, NULL}, - {"DEUT", PIXPACK(0x00153F), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 31, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 251, "Deuterium oxide. Volume changes with temp, radioactive with neutrons.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_DEUT, &graphics_DEUT}, - {"WARP", PIXPACK(0x000000), 0.8f, 0.00f * CFDS, 0.9f, 0.70f, -0.1f, 0.0f, 3.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 1, SC_NUCLEAR, R_TEMP +273.15f, 100, "Displaces other elements.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_WARP, NULL}, - {"PUMP", PIXPACK(0x0A0A3B), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 1, 100, SC_POWERED, 273.15f, 0, "Changes pressure to its temp when activated. (use HEAT/COOL).", ST_SOLID, TYPE_SOLID, &update_PUMP, &graphics_PUMP}, - {"FWRK", PIXPACK(0x666666), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 1, 1, 1, 97, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 100, "First fireworks made, activated by heat/neutrons.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_FWRK, NULL}, - {"PIPE", PIXPACK(0x444444), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, 273.15f, 0, "Moves elements around, read FAQ on website for help.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_PIPE, &graphics_PIPE}, - {"FRZZ", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f, -0.00005f* CFDS,1, 0, 0, 0, 20, 1, 1, 50, SC_POWDERS, 90.0f, 46, "FREEZE", ST_SOLID, TYPE_PART, &update_FRZZ, NULL}, - {"FRZW", PIXPACK(0x1020C0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_CRACKER2, 120.0f, 29, "FREEZE WATER", ST_LIQUID, TYPE_LIQUID||PROP_LIFE_DEC, &update_FRZW, NULL}, - {"GRAV", PIXPACK(0xFFE0A0), 0.7f, 0.00f * CFDS, 1.00f, 1.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Changes colour based on velocity.", ST_SOLID, TYPE_PART, &update_MISC, &graphics_GRAV}, - {"BIZR", PIXPACK(0x00FF77), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP+0.0f +273.15f, 29, "Bizarre... contradicts the normal state changes.", ST_LIQUID, TYPE_LIQUID, &update_BIZR, &graphics_BIZR}, - {"BIZG", PIXPACK(0x00FFBB), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 2.75f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_CRACKER2, R_TEMP-200.0f+273.15f, 42, "Bizarre gas", ST_GAS, TYPE_GAS, &update_BIZR, &graphics_BIZR}, - {"BIZS", PIXPACK(0x00E455), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_CRACKER2, R_TEMP+300.0f+273.15f, 251, "Bizarre solid", ST_SOLID, TYPE_SOLID, &update_BIZR, &graphics_BIZR}, - {"INST", PIXPACK(0x404039), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Instantly conducts, PSCN to charge, NSCN to take.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, NULL, NULL}, - {"ISOZ", PIXPACK(0xAA30D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 1, 24, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 29, "Radioactive liquid", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_ISZ, NULL}, - {"ISZS", PIXPACK(0x662089), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0007f* CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_NUCLEAR, 140.00f, 251, "Solid form of ISOZ, slowly decays.", ST_SOLID, TYPE_SOLID, &update_ISZ, NULL}, - {"PRTI", PIXPACK(0xEB5917), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.005f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Portal IN. Things go in here, now with channels (same as WIFI)", ST_SOLID, TYPE_SOLID, &update_PRTI, &graphics_PRTI}, - {"PRTO", PIXPACK(0x0020EB), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.005f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Portal OUT. Things come out here, now with channels (same as WIFI)", ST_SOLID, TYPE_SOLID, &update_PRTO, &graphics_PRTO}, - {"PSTE", PIXPACK(0xAA99AA), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 31, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Colloid, Hardens under pressure", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"PSTS", PIXPACK(0x776677), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 20, 0, 1, 100, SC_CRACKER, R_TEMP-2.0f +273.15f, 29, "Solid form of PSTE, temporary", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"ANAR", PIXPACK(0xFFFFEE), -0.7f, -0.02f * CFDS, 0.96f, 0.80f, 0.1f, -0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Behaves opposite gravity", ST_SOLID, TYPE_PART, &update_ANAR, NULL}, - {"VINE", PIXPACK(0x079A00), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 65, "Vine, grows", ST_SOLID, TYPE_SOLID, &update_VINE, NULL}, - {"INVS", PIXPACK(0x00CCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 15, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Invisible to everything while under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPASS, NULL, &graphics_INVS}, - {"EQVE", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 0, 1, 85, SC_CRACKER2, R_TEMP+0.0f +273.15f, 70, "Shared velocity test", ST_SOLID, TYPE_PART, NULL, NULL}, - {"SPWN2", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "STK2 spawn point", ST_SOLID, TYPE_SOLID, &update_SPAWN2, NULL}, - {"SPWN", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "STKM spawn point", ST_SOLID, TYPE_SOLID, &update_SPAWN, NULL}, - {"SHLD", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "Shield, spark it to grow", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD1, NULL}, - {"SHD2", PIXPACK(0x777777), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 2", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD2, NULL}, - {"SHD3", PIXPACK(0x444444), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 3", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD3, NULL}, - {"SHD4", PIXPACK(0x212121), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 4", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD4, NULL}, - {"LOLZ", PIXPACK(0x569212), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_CRACKER2, 373.0f, 40, "Lolz", ST_GAS, TYPE_SOLID, &update_MISC, NULL}, - {"WIFI", PIXPACK(0x40A060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 2, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Wireless transmitter, color coded.", ST_SOLID, TYPE_SOLID, &update_WIFI, &graphics_WIFI}, - {"FILT", PIXPACK(0x000056), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Filter for photons, changes the color.", ST_SOLID, TYPE_SOLID, NULL, &graphics_FILT}, - {"ARAY", PIXPACK(0xFFBB00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Ray Emitter. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ARAY, NULL}, - {"BRAY", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 0, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Ray Point. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, NULL, &graphics_BRAY}, - {"STK2", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM2, &graphics_STKM2}, - {"BOMB", PIXPACK(0xFFF288), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Bomb.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC|PROP_SPARKSETTLE, &update_BOMB, &graphics_BOMB}, - {"C-5", PIXPACK(0x2050E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Cold explosive", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_C5, NULL}, - {"SING", PIXPACK(0x242424), 0.7f, 0.36f * CFDS, 0.96f, 0.80f, 0.1f, 0.12f, 0.00f, -0.001f * CFDS, 1, 0, 0, 0, 0, 1, 1, 86, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Singularity", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_SING, NULL}, - {"QRTZ", PIXPACK(0xAADDDD), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 3, "Quartz, breakable mineral. Conducts but becomes brittle at lower temperatures.", ST_SOLID, TYPE_SOLID|PROP_HOT_GLOW|PROP_LIFE_DEC, &update_QRTZ, &graphics_QRTZ}, - {"PQRT", PIXPACK(0x88BBBB), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.27f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 3, "Broken quartz.", ST_SOLID, TYPE_PART| PROP_HOT_GLOW, &update_QRTZ, &graphics_QRTZ}, - {"EMP", PIXPACK(0x66AAFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 3, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 121, "Breaks activated electronics.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_EMP, &graphics_EMP}, - {"BREL", PIXPACK(0x707060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.18f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken electronics", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, - {"ELEC", PIXPACK(0xDFEFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+200.0f+273.15f, 251, "Electrons", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_ELEC, &graphics_ELEC}, - {"ACEL", PIXPACK(0x0099CC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Accelerator", ST_NONE, TYPE_SOLID, &update_ACEL, &graphics_ACEL}, - {"DCEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Decelerator", ST_NONE, TYPE_SOLID, &update_DCEL, &graphics_DCEL}, - {"TNT", PIXPACK(0xC05050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_BANG, NULL}, - {"IGNC", PIXPACK(0xC0B050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Ignition cord.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL, &update_IGNT, NULL}, - {"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL}, - /*FREE*/{"LOTE", PIXPACK(0xFF0000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Behaves kinda like Living on the Edge S3458/B37/4", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"FRG2", PIXPACK(0x00FF00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Frogs rule S124/B3/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"STAR", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Star Wars rule S3456/B278/6", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"FROG", PIXPACK(0x00AA00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Frogs S12/B34/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"BRAN", PIXPACK(0xCCCC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Brian 6 S6/B246/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"WIND", PIXPACK(0x101010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_SPECIAL, 0.0f, 40, "", ST_NONE, ST_NONE, NULL, NULL}, - {"HYGN", PIXPACK(0x5070FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.10f, 0.00f, 3.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 251, "Combines with O2 to make WATR", ST_GAS, TYPE_GAS, &update_H2, NULL}, - {"SOAP", PIXPACK(0xF5F5DC), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Soap. Creates bubbles.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_SOAP, NULL}, - {"BHOL", PIXPACK(0x202020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "Black hole (Requires newtonian gravity)", ST_SOLID, TYPE_SOLID, &update_NBHL, NULL}, - {"WHOL", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "White hole (Requires newtonian gravity)", ST_SOLID, TYPE_SOLID, &update_NWHL, NULL}, - {"MERC", PIXPACK(0x736B6D), 0.4f, 0.04f * CFDS, 0.94f, 0.80f, 0.0f, 0.3f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 91, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Mercury. Volume changes with temperature, Conductive.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_NEUTABSORB|PROP_LIFE_DEC, &update_MERC, NULL}, - {"PBCN", PIXPACK(0x3B1D0A), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Powered breakable clone", ST_NONE, TYPE_SOLID, &update_PBCN, &graphics_PBCN}, - {"GPMP", PIXPACK(0x0A3B3B), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, 0.0f +273.15f, 0, "Changes gravity to its temp when activated. (use HEAT/COOL).", ST_NONE, TYPE_SOLID, &update_GPMP, &graphics_GPMP}, - {"CLST", PIXPACK(0xE4A4A4), 0.7f, 0.02f * CFDS, 0.94f, 0.95f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Clay dust. Produces paste when mixed with water.", ST_SOLID, TYPE_PART, &update_CLST, &graphics_CLST}, - {"WIRE", PIXPACK(0xFFCC00), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 250, "WireWorld wires.",ST_SOLID,TYPE_SOLID,&update_WIRE, &graphics_WIRE}, - {"GBMB", PIXPACK(0x1144BB), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Sticks to first object it touches then produces strong gravity push.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GBMB, &graphics_GBMB}, - {"FIGH", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Fighter. Tries to kill stickmen.", ST_NONE, 0, &update_FIGH, &graphics_FIGH}, - //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description - }; - memcpy(ptypes, ptypest, sizeof(part_type)*PT_NUM); - -#define IPL -257.0f -#define IPH 257.0f -#define ITL MIN_TEMP-1 -#define ITH MAX_TEMP+1 -// no transition (PT_NONE means kill part) -#define NT -1 -// special transition - lava ctypes etc need extra code, which is only found and run if ST is given -#define ST PT_NUM -part_transition ptransitionst[PT_NUM] = -{ // if low pressure if high pressure if low temperature if high temperature - // Name plv plt phv pht tlv tlt thv tht - /* NONE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* DUST */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WATR */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, - /* OIL */ {IPL, NT, IPH, NT, ITL, NT, 333.0f, PT_GAS}, - /* FIRE */ {IPL, NT, IPH, NT, ITL, NT, 2773.0f,PT_PLSM}, - /* STNE */ {IPL, NT, IPH, NT, ITL, NT, 983.0f, PT_LAVA}, - /* LAVA */ {IPL, NT, IPH, NT, 2573.15f,ST, ITH, NT}, // 2573.15f is highest melt pt of possible ctypes - /* GUN */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, - /* NITR */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, - /* CLNE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* GAS */ {IPL, NT, 6.0f, PT_OIL, ITL, NT, 573.0f, PT_FIRE}, - /* C-4 */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, - /* GOO */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ICE */ {IPL, NT, 0.8f, PT_SNOW, ITL, NT, 233.0f, ST}, - /* METL */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_LAVA}, - /* SPRK */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SNOW */ {IPL, NT, IPH, NT, ITL, NT, 273.0f, PT_WATR}, - /* WOOD */ {IPL, NT, IPH, NT, ITL, NT, 873.0f, PT_FIRE}, - /* NEUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PLUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PLNT */ {IPL, NT, IPH, NT, ITL, NT, 573.0f, PT_FIRE}, - /* ACID */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* VOID */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WTRV */ {IPL, NT, IPH, NT, 371.0f, ST, ITH, NT}, - /* CNCT */ {IPL, NT, IPH, NT, ITL, NT, 1123.0f,PT_LAVA}, - /* DSTW */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, - /* SALT */ {IPL, NT, IPH, NT, ITL, NT, 1173.0f,PT_LAVA}, - /* SLTW */ {IPL, NT, IPH, NT, 233.0f, PT_ICEI, 483.0f, ST}, - /* DMND */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BMTL */ {IPL, NT, 1.0f, ST, ITL, NT, 1273.0f,PT_LAVA}, - /* BRMT */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_LAVA}, - /* PHOT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* URAN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WAX */ {IPL, NT, IPH, NT, ITL, NT, 319.0f, PT_MWAX}, - /* MWAX */ {IPL, NT, IPH, NT, 318.0f, PT_WAX, 673.0f, PT_FIRE}, - /* PSCN */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, - /* NSCN */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, - /* LN2 */ {IPL, NT, IPH, NT, 63.0f, PT_NICE, 77.0f, PT_NONE}, - /* INSL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* VACU */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* VENT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* RBDM */ {IPL, NT, IPH, NT, ITL, NT, 312.0f, PT_LRBD}, - /* LRBD */ {IPL, NT, IPH, NT, 311.0f, PT_RBDM, 961.0f, PT_FIRE}, - /* NTCT */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, - /* SAND */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, - /* GLAS */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, - /* PTCT */ {IPL, NT, IPH, NT, ITL, NT, 1414.0f,PT_LAVA}, - /* BGLA */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, - /* THDR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PLSM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ETRD */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* NICE */ {IPL, NT, IPH, NT, ITL, NT, 63.1f, PT_LNTG}, - /* NBLE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BTRY */ {IPL, NT, IPH, NT, ITL, NT, 2273.0f,PT_PLSM}, - /* LCRY */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_BGLA}, - /* STKM */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, - /* SWCH */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SMKE */ {IPL, NT, IPH, NT, ITL, NT, 625.0f, PT_FIRE}, - /* DESL */ {IPL, NT, 5.0f, PT_FIRE, ITL, NT, 335.0f, PT_FIRE}, - /* COAL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* LO2 */ {IPL, NT, IPH, NT, ITL, NT, 90.1f, PT_O2}, - /* O2 */ {IPL, NT, IPH, NT, 90.0f, PT_LO2, ITH, NT}, - /* INWR */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, - /* YEST */ {IPL, NT, IPH, NT, ITL, NT, 373.0f, PT_DYST}, - /* DYST */ {IPL, NT, IPH, NT, ITL, NT, 473.0f, PT_DUST}, - /* THRM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* GLOW */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BRCK */ {IPL, NT, 8.8f, PT_STNE, ITL, NT, 1223.0f,PT_LAVA}, - /* CFLM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FIRW */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FUSE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FSEP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* AMTR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BCOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PCLN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* HSWC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* IRON */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, - /* MORT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* LIFE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* DLAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* CO2 */ {IPL, NT, IPH, NT, 194.65f,PT_DRIC, ITH, NT}, - /* DRIC */ {IPL, NT, IPH, NT, ITL, NT, 195.65f,PT_CO2}, - /* CBNW */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, - /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SPNG */ {IPL, NT, IPH, NT, ITL, NT, 2730.0f,PT_FIRE}, - /* RIME */ {IPL, NT, IPH, NT, ITL, NT, 273.15f,PT_WATR}, - /* FOG */ {IPL, NT, IPH, NT, ITL, NT, 373.15f,PT_WTRV}, - /* BCLN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* LOVE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* DEUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WARP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PUMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FWRK */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PIPE */ {IPL, NT, 10.0f, PT_BRMT, ITL, NT, ITH, NT}, - /* FRZZ */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FRZW */ {IPL, NT, IPH, NT, ITL, NT, 53.0f, PT_ICEI}, - /* GRAV */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BIZR */ {IPL, NT, IPH, NT, 100.0f, PT_BIZRG, 400.0f, PT_BIZRS}, - /* BIZRG*/ {IPL, NT, IPH, NT, ITL, NT, 100.0f, PT_BIZR},//, 400.0f, PT_BIZRS}, - /* BIZRS*/ {IPL, NT, IPH, NT, 400.0f, PT_BIZR, ITH, NT},// 100.0f, PT_BIZRG}, - /* INST */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ISOZ */ {IPL, NT, IPH, NT, 160.0f, PT_ISZS, ITH, NT}, - /* ISZS */ {IPL, NT, IPH, NT, ITL, NT, 300.0f, PT_ISOZ}, - /* PRTI */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PRTO */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PSTE */ {IPL, NT, 0.5f, PT_PSTS, ITL, NT, 747.0f, PT_BRCK}, - /* PSTS */ {0.5f, PT_PSTE, IPH, NT, ITL, NT, ITH, NT}, - /* ANAR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* VINE */ {IPL, NT, IPH, NT, ITL, NT, 573.0f, PT_FIRE}, - /* INVS */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* EQVE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SPWN2*/ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SPAWN*/ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SHLD1*/ {IPL, NT, 7.0f, PT_NONE, ITL, NT, ITH, NT}, - /* SHLD2*/ {IPL, NT, 15.0f, PT_NONE, ITL, NT, ITH, NT}, - /* SHLD3*/ {IPL, NT, 25.0f, PT_NONE, ITL, NT, ITH, NT}, - /* SHLD4*/ {IPL, NT, 40.0f, PT_NONE, ITL, NT, ITH, NT}, - /* LOlZ */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WIFI */ {IPL, NT, 15.0f, PT_BRMT, ITL, NT, ITH, NT}, - /* FILT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ARAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BRAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* STKM2*/ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, - /* BOMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* C-5 */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SING */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* QRTZ */ {IPL, NT, IPH, NT, ITL, NT, 2573.15f,PT_LAVA}, - /* PQRT */ {IPL, NT, IPH, NT, ITL, NT, 2573.15f,PT_LAVA}, - /* EMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BREL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ELEC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ACEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* DCEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* TNT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* IGNP */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, - /* BOYL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WIND */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* H2 */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SOAP */ {IPL, NT, IPH, NT, ITL, NT, ITL, NT}, - /* NBHL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* NWHL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* MERC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PBCN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* GPMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* CLST */ {IPL, NT, IPH, NT, ITL, NT, 1256.0f, PT_LAVA}, - /* WIRE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* GBMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FIGH */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, -}; -#undef IPL -#undef IPH -#undef ITL -#undef ITH -#undef NT -#undef ST*/ - memcpy(ptransitions, ptransitionst, sizeof(part_transition) * PT_NUM); - init_can_move(); - clear_sim(); -} diff --git a/src/Simulation.h b/src/Simulation.h deleted file mode 100644 index b3c51af..0000000 --- a/src/Simulation.h +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Simulation.h - * - * Created on: Jan 2, 2012 - * Author: Simon - */ - -#ifndef SIMULATION_H_ -#define SIMULATION_H_ -#include -#include "Config.h" -#include "Renderer.h" -#include "Graphics.h" -#include "Elements.h" -#include "misc.h" - -#define CHANNELS ((int)(MAX_TEMP-73)/100+2) - -class Simulation; -class Renderer; -class Gravity; -class Air; - -struct Particle -{ - int type; - int life, ctype; - float x, y, vx, vy; - float temp; - float pavg[2]; - int flags; - int tmp; - int tmp2; - unsigned int dcolour; -}; -typedef struct Particle Particle; - -struct sign -{ - int x,y,ju; - char text[256]; -}; -typedef struct sign sign; - -struct part_type -{ - char *name; - pixel pcolors; - float advection; - float airdrag; - float airloss; - float loss; - float collision; - float gravity; - float diffusion; - float hotair; - int falldown; - int flammable; - int explosive; - int meltable; - int hardness; - int menu; - int enabled; - int weight; - int menusection; - float heat; - unsigned char hconduct; - char *descs; - char state; - unsigned int properties; - int (*update_func) (UPDATE_FUNC_ARGS); - int (*graphics_func) (GRAPHICS_FUNC_ARGS); -}; -typedef struct part_type part_type; - -struct part_transition -{ - float plv; // transition occurs if pv is lower than this - int plt; - float phv; // transition occurs if pv is higher than this - int pht; - float tlv; // transition occurs if t is lower than this - int tlt; - float thv; // transition occurs if t is higher than this - int tht; -}; -typedef struct part_transition part_transition; - -struct playerst -{ - char comm; //command cell - char pcomm; //previous command - int elem; //element power - float legs[16]; //legs' positions - float accs[8]; //accelerations - char spwn; //if stick man was spawned - unsigned int frames; //frames since last particle spawn - used when spawning LIGH -}; -typedef struct playerst playerst; - -struct wall_type -{ - pixel colour; - pixel eglow; // if emap set, add this to fire glow - int drawstyle; - const char *descs; -}; -typedef struct wall_type wall_type; - -struct gol_menu -{ - const char *name; - pixel colour; - int goltype; - const char *description; -}; -typedef struct gol_menu gol_menu; - -//#ifdef _cplusplus -class Simulation -{ -private: -public: - - Gravity * grav; - Air * air; - part_type ptypes[PT_NUM]; - part_transition ptransitions[PT_NUM]; - wall_type wtypes[UI_WALLCOUNT]; - gol_menu gmenu[NGOL]; - int goltype[NGOL]; - int grule[NGOL+1][10]; - playerst player; - playerst player2; - playerst fighters[256]; //255 is the maximum number of fighters - unsigned char fighcount; //Contains the number of fighters - int lighting_recreate; - int gravwl_timeout; - Particle portalp[CHANNELS][8][80]; - Particle emptyparticle; - int portal_rx[8]; - int portal_ry[8]; - int wireless[CHANNELS][2]; - char can_move[PT_NUM][PT_NUM]; - int parts_lastActiveIndex;// = NPART-1; - int pfree; - int NUM_PARTS; - int elementCount[PT_NUM]; - int ISWIRE; - sign * signs; - //Gol sim - int CGOL; - int ISGOL; - int GSPEED; - unsigned char gol[XRES][YRES]; - unsigned char gol2[XRES][YRES][NGOL+1]; - //Air sim - float (*vx)[XRES/CELL]; - float (*vy)[XRES/CELL]; - float (*pv)[XRES/CELL]; - float (*hv)[XRES/CELL]; - //Gravity sim - float *gravx;//gravx[(YRES/CELL) * (XRES/CELL)]; - float *gravy;//gravy[(YRES/CELL) * (XRES/CELL)]; - float *gravp;//gravp[(YRES/CELL) * (XRES/CELL)]; - float *gravmap;//gravmap[(YRES/CELL) * (XRES/CELL)]; - //Walls - unsigned char bmap[YRES/CELL][XRES/CELL]; - unsigned char emap[YRES/CELL][XRES/CELL]; - float fvx[YRES/CELL][XRES/CELL]; - float fvy[YRES/CELL][XRES/CELL]; - //Particles - Particle parts[NPART]; - int pmap[YRES][XRES]; - int photons[YRES][XRES]; - // - int gravityMode; - int airMode; - int ngrav_enable; - int legacy_enable; - int aheat_enable; - int VINE_MODE; - int water_equal_test; - int sys_pause; - int framerender; - int pretty_powder; - // - int sandcolour_r; - int sandcolour_g; - int sandcolour_b; //TODO: Make a single variable - //Stuff - int is_blocking(int t, int x, int y); - int is_boundary(int pt, int x, int y); - int find_next_boundary(int pt, int *x, int *y, int dm, int *em); - int pn_junction_sprk(int x, int y, int pt); - void photoelectric_effect(int nx, int ny); - unsigned direction_to_map(float dx, float dy, int t); - int do_move(int i, int x, int y, float nxf, float nyf); - int try_move(int i, int x, int y, int nx, int ny); - int eval_move(int pt, int nx, int ny, unsigned *rr); - void init_can_move(); - void create_cherenkov_photon(int pp); - void create_gain_photon(int pp); - void kill_part(int i); - int flood_prop(int x, int y, size_t propoffset, void * propvalue, int proptype); - int flood_prop_2(int x, int y, size_t propoffset, void * propvalue, int proptype, int parttype, char * bitmap); - int flood_water(int x, int y, int i, int originaly, int check); - void detach(int i); - void part_change_type(int i, int x, int y, int t); - int create_part_add_props(int p, int x, int y, int tv, int rx, int ry); - //int InCurrentBrush(int i, int j, int rx, int ry); - //int get_brush_flags(); - int create_part(int p, int x, int y, int t); - void delete_part(int x, int y, int flags); - int is_wire(int x, int y); - int is_wire_off(int x, int y); - void set_emap(int x, int y); - int parts_avg(int ci, int ni, int t); - void create_arc(int sx, int sy, int dx, int dy, int midpoints, int variance, int type, int flags); - int nearest_part(int ci, int t, int max_d); - void update_particles_i(int start, int inc); - void update_particles(); - void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert); - void clear_area(int area_x, int area_y, int area_w, int area_h); - void create_box(int x1, int y1, int x2, int y2, int c, int flags); - int flood_parts(int x, int y, int c, int cm, int bm, int flags); - int create_parts(int x, int y, int rx, int ry, int c, int flags); - void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags); - void *transform_save(void *odata, int *size, matrix2d transform, vector2d translate); - void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]); - void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]); - int get_wavelength_bin(int *wm); - int get_normal(int pt, int x, int y, float dx, float dy, float *nx, float *ny); - int get_normal_interp(int pt, float x0, float y0, float dx, float dy, float *nx, float *ny); - void clear_sim(); - void UpdateParticles(); - Simulation(); -}; -//#endif - -#endif /* SIMULATION_H_ */ diff --git a/src/client/Client.cpp b/src/client/Client.cpp new file mode 100644 index 0000000..3545414 --- /dev/null +++ b/src/client/Client.cpp @@ -0,0 +1,133 @@ +#include +#include +#include +#include +#include "Config.h" +#include "Client.h" +#include "interface/Point.h" +#include "Graphics.h" + +/* + static Thumbnail* thumbnailCache[120]; + static void * activeThumbRequests[5]; + static int activeThumbRequestTimes[5]; + static std::string activeThumbRequestIDs[5]; +*/ + +Client::Client() +{ + int i = 0; + http_init(NULL); + for(i = 0; i < 120; i++) + { + thumbnailCache[i] = NULL; + } + for(i = 0; i < 5; i++) + { + activeThumbRequests[i] = NULL; + activeThumbRequestTimes[i] = 0; + } +} + +Client::~Client() +{ + http_done(); +} + +void Client::ClearThumbnailRequests() +{ + for(int i = 0; i < 5; i++) + { + if(activeThumbRequests[i]) + { + http_async_req_close(activeThumbRequests[i]); + activeThumbRequests[i] = NULL; + } + } +} + +Thumbnail * Client::GetThumbnail(int saveID, int saveDate) +{ + std::stringstream urlStream; + std::stringstream idStream; + int i = 0; + for(i = 0; i < 120; i++) + { + if(thumbnailCache[i] && thumbnailCache[i]->ID == saveID && thumbnailCache[i]->Datestamp == saveDate) + return thumbnailCache[i]; + } + urlStream << "http://" << SERVER << "/Get.api?Op=thumbsmall&ID=" << saveID; + if(saveDate) + { + urlStream << "&Date=" << saveDate; + } + idStream << saveID << ":" << saveDate; + std::string idString = idStream.str(); + bool found = false; + for(i = 0; i < 5; i++) + { + if(activeThumbRequests[i] && activeThumbRequestIDs[i] == idString) + { + found = true; + if(http_async_req_status(activeThumbRequests[i])) + { + pixel * thumbData; + char * data; + int status, data_size, imgw, imgh; + data = http_async_req_stop(activeThumbRequests[i], &status, &data_size); + activeThumbRequests[i] = NULL; + if (status == 200 && data) + { + thumbData = Graphics::ptif_unpack(data, data_size, &imgw, &imgh); + if(data) + { + free(data); + } + thumbnailCacheNextID %= 120; + if(thumbnailCache[thumbnailCacheNextID]) + { + delete thumbnailCache[thumbnailCacheNextID]; + } + if(thumbData) + { + thumbnailCache[thumbnailCacheNextID] = new Thumbnail(saveID, saveDate, thumbData, ui::Point(imgw, imgh)); + } + else + { + thumbnailCache[thumbnailCacheNextID] = new Thumbnail(saveID, saveDate, (pixel *)malloc((128*128) * PIXELSIZE), ui::Point(128, 128)); + } + return thumbnailCache[thumbnailCacheNextID++]; + } + else + { + if(data) + { + free(data); + } + thumbnailCacheNextID %= 120; + if(thumbnailCache[thumbnailCacheNextID]) + { + delete thumbnailCache[thumbnailCacheNextID]; + } + thumbnailCache[thumbnailCacheNextID] = new Thumbnail(saveID, saveDate, (pixel *)malloc((128*128) * PIXELSIZE), ui::Point(128, 128)); + return thumbnailCache[thumbnailCacheNextID++]; + } + } + } + } + if(!found) + { + for(i = 0; i < 5; i++) + { + if(!activeThumbRequests[i]) + { + activeThumbRequests[i] = http_async_req_start(NULL, (char *)urlStream.str().c_str(), NULL, 0, 1); + std::cout << "ThumbCache: Requesting " << urlStream.str() << " : " << idString << std::endl; + activeThumbRequestIDs[i] = idString; + return NULL; + } + } + } + //http_async_req_start(http, urlStream.str().c_str(), NULL, 0, 1); + return NULL; +} diff --git a/src/client/Client.h b/src/client/Client.h new file mode 100644 index 0000000..37d0ad6 --- /dev/null +++ b/src/client/Client.h @@ -0,0 +1,24 @@ +#ifndef CLIENT_H +#define CLIENT_H + +#include +#include "HTTP.h" +#include "search/Thumbnail.h" +#include "Singleton.h" + +class Client: public Singleton +{ +private: + int thumbnailCacheNextID; + Thumbnail * thumbnailCache[120]; + void * activeThumbRequests[5]; + int activeThumbRequestTimes[5]; + std::string activeThumbRequestIDs[5]; +public: + Client(); + ~Client(); + void ClearThumbnailRequests(); + Thumbnail * GetThumbnail(int saveID, int saveDate); +}; + +#endif // CLIENT_H diff --git a/src/client/HTTP.cpp b/src/client/HTTP.cpp new file mode 100644 index 0000000..7514515 --- /dev/null +++ b/src/client/HTTP.cpp @@ -0,0 +1,1076 @@ +/** + * Powder Toy - HTTP Library + * + * Copyright (c) 2008 - 2010 Stanislaw Skowronek. + * Copyright (c) 2010 Simon Robertshaw + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + */ + + +#include +#include +#include +#ifndef MACOSX +#include +#endif +#include +#ifdef WIN32 +#define _WIN32_WINNT 0x0501 +//#include +#include +#include +#else +#include +#include +#include +#include +#include +#include +#include +#endif + +#include "Config.h" +#include "HTTP.h" +#include "MD5.h" + +#ifdef WIN32 +#define PERROR SOCKET_ERROR +#define PERRNO WSAGetLastError() +#define PEAGAIN WSAEWOULDBLOCK +#define PEINTR WSAEINTR +#define PEINPROGRESS WSAEINPROGRESS +#define PEALREADY WSAEALREADY +#define PCLOSE closesocket +#else +#define PERROR -1 +#define PERRNO errno +#define PEAGAIN EAGAIN +#define PEINTR EINTR +#define PEINPROGRESS EINPROGRESS +#define PEALREADY EALREADY +#define PCLOSE close +#endif + +static int http_up = 0; +static long http_timeout = 15; +static int http_use_proxy = 0; +static struct sockaddr_in http_proxy; + +static char *mystrdup(char *s) +{ + char *x; + if (s) + { + x = (char *)malloc(strlen(s)+1); + strcpy(x, s); + return x; + } + return s; +} + +static int splituri(char *uri, char **host, char **path) +{ + char *p=uri,*q,*x,*y; + if (!strncmp(p, "http://", 7)) + p += 7; + q = strchr(p, '/'); + if (!q) + q = p + strlen(p); + x = (char *)malloc(q-p+1); + if (*q) + y = mystrdup(q); + else + y = mystrdup("/"); + strncpy(x, p, q-p); + x[q-p] = 0; + if (q==p || x[q-p-1]==':') + { + free(x); + free(y); + return 1; + } + *host = x; + *path = y; + return 0; +} + +static char *getserv(char *host) +{ + char *q, *x = mystrdup(host); + q = strchr(x, ':'); + if (q) + *q = 0; + return x; +} + +static char *getport(char *host) +{ + char *p, *q; + q = strchr(host, ':'); + if (q) + p = mystrdup(q+1); + else + p = mystrdup("80"); + return p; +} + +static int resolve(char *dns, char *srv, struct sockaddr_in *addr) +{ + struct addrinfo hnt, *res = 0; + if (http_use_proxy) + { + memcpy(addr, &http_proxy, sizeof(struct sockaddr_in)); + return 0; + } + memset(&hnt, 0, sizeof(hnt)); + hnt.ai_family = AF_INET; + hnt.ai_socktype = SOCK_STREAM; + if (getaddrinfo(dns, srv, &hnt, &res)) + return 1; + if (res) + { + if (res->ai_family != AF_INET) + { + freeaddrinfo(res); + return 1; + } + memcpy(addr, res->ai_addr, res->ai_addrlen); + freeaddrinfo(res); + return 0; + } + return 1; +} + +void http_init(char *proxy) +{ + char *host, *port; +#ifdef WIN32 + WSADATA wsadata; + if (!WSAStartup(MAKEWORD(2,2), &wsadata)) + http_up = 1; +#else + signal(SIGPIPE, SIG_IGN); + http_up = 1; +#endif + if (proxy) + { + host = getserv(proxy); + port = getport(proxy); + if (resolve(host, port, &http_proxy)) + http_up = 0; + else + http_use_proxy = 1; + free(host); + free(port); + } +} + +void http_done(void) +{ +#ifdef WIN32 + WSACleanup(); +#endif + http_up = 0; +} + +#define CHUNK 4096 + +#define HTS_STRT 0 +#define HTS_RSLV 1 +#define HTS_CONN 2 +#define HTS_IDLE 3 +#define HTS_XMIT 4 +#define HTS_RECV 5 +#define HTS_DONE 6 +struct http_ctx +{ + int state; + time_t last; + int keep; + int ret; + char *host, *path; + char *thdr; + int thlen; + char *txd; + int txdl; + struct sockaddr_in addr; + char *tbuf; + int tlen, tptr; + char *hbuf; + int hlen, hptr; + char *rbuf; + int rlen, rptr; + int chunked, chunkhdr, rxtogo, contlen, cclose; + int fd; + char *fdhost; +}; +void *http_async_req_start(void *ctx, char *uri, char *data, int dlen, int keep) +{ + struct http_ctx *cx = (http_ctx *)ctx; + if (!ctx) + { + ctx = calloc(1, sizeof(struct http_ctx)); + cx = (http_ctx *)ctx; + cx->fd = PERROR; + } + + if (!cx->hbuf) + { + cx->hbuf = (char *)malloc(256); + cx->hlen = 256; + } + + if (!http_up) + { + cx->ret = 604; + cx->state = HTS_DONE; + return ctx; + } + + if (cx->state!=HTS_STRT && cx->state!=HTS_IDLE) + { + fprintf(stderr, "HTTP: unclean request restart state.\n"); + exit(1); + } + + cx->keep = keep; + cx->ret = 600; + if (splituri(uri, &cx->host, &cx->path)) + { + cx->ret = 601; + cx->state = HTS_DONE; + return ctx; + } + if (http_use_proxy) + { + free(cx->path); + cx->path = mystrdup(uri); + } + if (cx->fdhost && strcmp(cx->host, cx->fdhost)) + { + free(cx->fdhost); + cx->fdhost = NULL; + PCLOSE(cx->fd); + cx->fd = PERROR; + cx->state = HTS_STRT; + } + if (data) + { + if (!dlen) + dlen = strlen(data); + cx->txd = (char*)malloc(dlen); + memcpy(cx->txd, data, dlen); + cx->txdl = dlen; + } + else + cx->txdl = 0; + + cx->contlen = 0; + cx->chunked = 0; + cx->chunkhdr = 0; + cx->rxtogo = 0; + cx->cclose = 0; + + cx->tptr = 0; + cx->tlen = 0; + + cx->last = time(NULL); + + return ctx; +} + +void http_async_add_header(void *ctx, char *name, char *data) +{ + struct http_ctx *cx = (http_ctx *)ctx; + cx->thdr = (char *)realloc(cx->thdr, cx->thlen + strlen(name) + strlen(data) + 4); + cx->thlen += sprintf(cx->thdr+cx->thlen, "%s: %s\n", name, data); +} + +static void process_header(struct http_ctx *cx, char *str) +{ + char *p; + if (cx->chunkhdr) + { + p = strchr(str, ';'); + if (p) + *p = 0; + cx->rxtogo = strtoul(str, NULL, 16); + cx->chunkhdr = 0; + if (!cx->rxtogo) + cx->chunked = 0; + } + if (!str[0]) + { + cx->rxtogo = cx->contlen; + cx->chunkhdr = cx->chunked; + if (!cx->contlen && !cx->chunked && cx->ret!=100) + cx->state = HTS_DONE; + return; + } + if (!strncmp(str, "HTTP/", 5)) + { + p = strchr(str, ' '); + if (!p) + { + cx->ret = 603; + cx->state = HTS_DONE; + return; + } + p++; + cx->ret = atoi(p); + return; + } + if (!strncmp(str, "Content-Length: ", 16)) + { + cx->contlen = atoi(str+16); + return; + } + if (!strcmp(str, "Transfer-Encoding: chunked")) + { + cx->chunked = 1; + return; + } + if (!strcmp(str, "Connection: close")) + { + cx->cclose = 1; + return; + } +} + +static void process_byte(struct http_ctx *cx, char ch) +{ + if (cx->rxtogo) + { + cx->rxtogo--; + + if (!cx->rbuf) + { + cx->rbuf = (char *)malloc(256); + cx->rlen = 256; + } + if (cx->rptr >= cx->rlen-1) + { + cx->rlen *= 2; + cx->rbuf = (char *)realloc(cx->rbuf, cx->rlen); + } + cx->rbuf[cx->rptr++] = ch; + + if (!cx->rxtogo && !cx->chunked) + cx->state = HTS_DONE; + } + else + { + if (ch == '\n') + { + cx->hbuf[cx->hptr] = 0; + process_header(cx, cx->hbuf); + cx->hptr = 0; + } + else if (ch != '\r') + { + if (cx->hptr >= cx->hlen-1) + { + cx->hlen *= 2; + cx->hbuf = (char *)realloc(cx->hbuf, cx->hlen); + } + cx->hbuf[cx->hptr++] = ch; + } + } +} + +int http_async_req_status(void *ctx) +{ + struct http_ctx *cx = (http_ctx *)ctx; + char *dns,*srv,buf[CHUNK]; + int tmp, i; + time_t now = time(NULL); +#ifdef WIN32 + unsigned long tmp2; +#endif + + switch (cx->state) + { + case HTS_STRT: + dns = getserv(cx->host); + srv = getport(cx->host); + if (resolve(dns, srv, &cx->addr)) + { + free(dns); + free(srv); + cx->state = HTS_DONE; + cx->ret = 602; + return 1; + } + free(dns); + free(srv); + cx->state = HTS_RSLV; + return 0; + case HTS_RSLV: + cx->state = HTS_CONN; + cx->last = now; + return 0; + case HTS_CONN: + if (cx->fd == PERROR) + { + cx->fd = socket(AF_INET, SOCK_STREAM, 0); + if (cx->fd == PERROR) + goto fail; + cx->fdhost = mystrdup(cx->host); +#ifdef WIN32 + tmp2 = 1; + if (ioctlsocket(cx->fd, FIONBIO, &tmp2) == SOCKET_ERROR) + goto fail; +#else + tmp = fcntl(cx->fd, F_GETFL); + if (tmp < 0) + goto fail; + if (fcntl(cx->fd, F_SETFL, tmp|O_NONBLOCK) < 0) + goto fail; +#endif + } + if (!connect(cx->fd, (struct sockaddr *)&cx->addr, sizeof(cx->addr))) + cx->state = HTS_IDLE; +#ifdef WIN32 + else if (PERRNO==WSAEISCONN) + cx->state = HTS_IDLE; +#endif +#ifdef MACOSX + else if (PERRNO==EISCONN) + cx->state = HTS_IDLE; +#endif + else if (PERRNO!=PEINPROGRESS && PERRNO!=PEALREADY +#ifdef WIN32 + && PERRNO!=PEAGAIN && PERRNO!=WSAEINVAL +#endif + ) + goto fail; + if (now-cx->last>http_timeout) + goto timeout; + return 0; + case HTS_IDLE: + if (cx->txdl) + { + // generate POST + cx->tbuf = (char *)malloc(strlen(cx->host) + strlen(cx->path) + 121 + cx->txdl + cx->thlen); + cx->tptr = 0; + cx->tlen = 0; + cx->tlen += sprintf(cx->tbuf+cx->tlen, "POST %s HTTP/1.1\n", cx->path); + cx->tlen += sprintf(cx->tbuf+cx->tlen, "Host: %s\n", cx->host); + if (!cx->keep) + cx->tlen += sprintf(cx->tbuf+cx->tlen, "Connection: close\n"); + if (cx->thdr) + { + memcpy(cx->tbuf+cx->tlen, cx->thdr, cx->thlen); + cx->tlen += cx->thlen; + free(cx->thdr); + cx->thdr = NULL; + cx->thlen = 0; + } + cx->tlen += sprintf(cx->tbuf+cx->tlen, "Content-Length: %d\n", cx->txdl); +#ifdef BETA + cx->tlen += sprintf(cx->tbuf+cx->tlen, "X-Powder-Version: %s%dB%d\n", IDENT_VERSION, SAVE_VERSION, MINOR_VERSION); +#else + cx->tlen += sprintf(cx->tbuf+cx->tlen, "X-Powder-Version: %s%dS%d\n", IDENT_VERSION, SAVE_VERSION, MINOR_VERSION); +#endif + cx->tlen += sprintf(cx->tbuf+cx->tlen, "\n"); + memcpy(cx->tbuf+cx->tlen, cx->txd, cx->txdl); + cx->tlen += cx->txdl; + free(cx->txd); + cx->txd = NULL; + cx->txdl = 0; + } + else + { + // generate GET + cx->tbuf = (char *)malloc(strlen(cx->host) + strlen(cx->path) + 89 + cx->thlen); + cx->tptr = 0; + cx->tlen = 0; + cx->tlen += sprintf(cx->tbuf+cx->tlen, "GET %s HTTP/1.1\n", cx->path); + cx->tlen += sprintf(cx->tbuf+cx->tlen, "Host: %s\n", cx->host); + if (cx->thdr) + { + memcpy(cx->tbuf+cx->tlen, cx->thdr, cx->thlen); + cx->tlen += cx->thlen; + free(cx->thdr); + cx->thdr = NULL; + cx->thlen = 0; + } + if (!cx->keep) + cx->tlen += sprintf(cx->tbuf+cx->tlen, "Connection: close\n"); +#ifdef BETA + cx->tlen += sprintf(cx->tbuf+cx->tlen, "X-Powder-Version: %s%dB%d\n", IDENT_VERSION, SAVE_VERSION, MINOR_VERSION); +#else + cx->tlen += sprintf(cx->tbuf+cx->tlen, "X-Powder-Version: %s%dS%d\n", IDENT_VERSION, SAVE_VERSION, MINOR_VERSION); +#endif + cx->tlen += sprintf(cx->tbuf+cx->tlen, "\n"); + } + cx->state = HTS_XMIT; + cx->last = now; + return 0; + case HTS_XMIT: + tmp = send(cx->fd, cx->tbuf+cx->tptr, cx->tlen-cx->tptr, 0); + if (tmp==PERROR && PERRNO!=PEAGAIN && PERRNO!=PEINTR) + goto fail; + if (tmp!=PERROR) + { + cx->tptr += tmp; + if (cx->tptr == cx->tlen) + { + cx->tptr = 0; + cx->tlen = 0; + if (cx->tbuf) + free(cx->tbuf); + cx->state = HTS_RECV; + } + cx->last = now; + } + if (now-cx->last>http_timeout) + goto timeout; + return 0; + case HTS_RECV: + tmp = recv(cx->fd, buf, CHUNK, 0); + if (tmp==PERROR && PERRNO!=PEAGAIN && PERRNO!=PEINTR) + goto fail; + if (tmp!=PERROR) + { + for (i=0; istate == HTS_DONE) + return 1; + } + cx->last = now; + } + if (now-cx->last>http_timeout) + goto timeout; + return 0; + case HTS_DONE: + return 1; + } + return 0; + +fail: + cx->ret = 600; + cx->state = HTS_DONE; + return 1; + +timeout: + cx->ret = 605; + cx->state = HTS_DONE; + return 1; +} + +char *http_async_req_stop(void *ctx, int *ret, int *len) +{ + struct http_ctx *cx = (http_ctx *)ctx; + char *rxd; + + if (cx->state != HTS_DONE) + while (!http_async_req_status(ctx)) ; + + if (cx->host) + { + free(cx->host); + cx->host = NULL; + } + if (cx->path) + { + free(cx->path); + cx->path = NULL; + } + if (cx->txd) + { + free(cx->txd); + cx->txd = NULL; + cx->txdl = 0; + } + if (cx->hbuf) + { + free(cx->hbuf); + cx->hbuf = NULL; + } + if (cx->thdr) + { + free(cx->thdr); + cx->thdr = NULL; + cx->thlen = 0; + } + + if (ret) + *ret = cx->ret; + if (len) + *len = cx->rptr; + if (cx->rbuf) + cx->rbuf[cx->rptr] = 0; + rxd = cx->rbuf; + cx->rbuf = NULL; + cx->rlen = 0; + cx->rptr = 0; + cx->contlen = 0; + + if (!cx->keep) + http_async_req_close(ctx); + else if (cx->cclose) + { + PCLOSE(cx->fd); + cx->fd = PERROR; + if (cx->fdhost) + { + free(cx->fdhost); + cx->fdhost = NULL; + } + cx->state = HTS_STRT; + } + else + cx->state = HTS_IDLE; + + return rxd; +} + +void http_async_get_length(void *ctx, int *total, int *done) +{ + struct http_ctx *cx = (http_ctx *)ctx; + if (done) + *done = cx->rptr; + if (total) + *total = cx->contlen; +} + +void http_async_req_close(void *ctx) +{ + struct http_ctx *cx = (http_ctx *)ctx; + void *tmp; + if (cx->host) + { + cx->keep = 1; + tmp = http_async_req_stop(ctx, NULL, NULL); + if (tmp) + free(tmp); + } + if (cx->fdhost) + free(cx->fdhost); + PCLOSE(cx->fd); + free(ctx); +} + +char *http_simple_get(char *uri, int *ret, int *len) +{ + void *ctx = http_async_req_start(NULL, uri, NULL, 0, 0); + if (!ctx) + { + if (ret) + *ret = 600; + if (len) + *len = 0; + return NULL; + } + return http_async_req_stop(ctx, ret, len); +} +static char hex[] = "0123456789abcdef"; +void http_auth_headers(void *ctx, char *user, char *pass, char *session_id) +{ + char *tmp; + int i; + unsigned char hash[16]; + unsigned int m; + struct md5_context md5; + + if (user) + { + if (pass) + { + md5_init(&md5); + md5_update(&md5, (unsigned char *)user, strlen(user)); + md5_update(&md5, (unsigned char *)"-", 1); + m = 0; + + md5_update(&md5, (unsigned char *)pass, strlen(pass)); + md5_final(hash, &md5); + tmp = (char *)malloc(33); + for (i=0; i<16; i++) + { + tmp[i*2] = hex[hash[i]>>4]; + tmp[i*2+1] = hex[hash[i]&15]; + } + tmp[32] = 0; + http_async_add_header(ctx, "X-Auth-Hash", tmp); + free(tmp); + } + if (session_id) + { + http_async_add_header(ctx, "X-Auth-User-Id", user); + http_async_add_header(ctx, "X-Auth-Session-Key", session_id); + } + else + { + http_async_add_header(ctx, "X-Auth-User", user); + } + } +} +char *http_auth_get(char *uri, char *user, char *pass, char *session_id, int *ret, int *len) +{ + void *ctx = http_async_req_start(NULL, uri, NULL, 0, 0); + + if (!ctx) + { + if (ret) + *ret = 600; + if (len) + *len = 0; + return NULL; + } + return http_async_req_stop(ctx, ret, len); +} + +char *http_simple_post(char *uri, char *data, int dlen, int *ret, int *len) +{ + void *ctx = http_async_req_start(NULL, uri, data, dlen, 0); + if (!ctx) + { + if (ret) + *ret = 600; + if (len) + *len = 0; + return NULL; + } + return http_async_req_stop(ctx, ret, len); +} + +char *http_ret_text(int ret) +{ + switch (ret) + { + case 100: + return "Continue"; + case 101: + return "Switching Protocols"; + case 102: + return "Processing"; + + case 200: + return "OK"; + case 201: + return "Created"; + case 202: + return "Accepted"; + case 203: + return "Non-Authoritative Information"; + case 204: + return "No Content"; + case 205: + return "Reset Content"; + case 206: + return "Partial Content"; + case 207: + return "Multi-Status"; + + case 300: + return "Multiple Choices"; + case 301: + return "Moved Permanently"; + case 302: + return "Found"; + case 303: + return "See Other"; + case 304: + return "Not Modified"; + case 305: + return "Use Proxy"; + case 306: + return "Switch Proxy"; + case 307: + return "Temporary Redirect"; + + case 400: + return "Bad Request"; + case 401: + return "Unauthorized"; + case 402: + return "Payment Required"; + case 403: + return "Forbidden"; + case 404: + return "Not Found"; + case 405: + return "Method Not Allowed"; + case 406: + return "Not Acceptable"; + case 407: + return "Proxy Authentication Required"; + case 408: + return "Request Timeout"; + case 409: + return "Conflict"; + case 410: + return "Gone"; + case 411: + return "Length Required"; + case 412: + return "Precondition Failed"; + case 413: + return "Request Entity Too Large"; + case 414: + return "Request URI Too Long"; + case 415: + return "Unsupported Media Type"; + case 416: + return "Requested Range Not Satisfiable"; + case 417: + return "Expectation Failed"; + case 418: + return "I'm a teapot"; + case 422: + return "Unprocessable Entity"; + case 423: + return "Locked"; + case 424: + return "Failed Dependency"; + case 425: + return "Unordered Collection"; + case 426: + return "Upgrade Required"; + case 444: + return "No Response"; + case 450: + return "Blocked by Windows Parental Controls"; + case 499: + return "Client Closed Request"; + + case 500: + return "Internal Server Error"; + case 501: + return "Not Implemented"; + case 502: + return "Bad Gateway"; + case 503: + return "Service Unavailable"; + case 504: + return "Gateway Timeout"; + case 505: + return "HTTP Version Not Supported"; + case 506: + return "Variant Also Negotiates"; + case 507: + return "Insufficient Storage"; + case 509: + return "Bandwidth Limit Exceeded"; + case 510: + return "Not Extended"; + + case 600: + return "Internal Client Error"; + case 601: + return "Unsupported Protocol"; + case 602: + return "Server Not Found"; + case 603: + return "Malformed Response"; + case 604: + return "Network Not Available"; + case 605: + return "Request Timed Out"; + default: + return "Unknown Status Code"; + } +} +char *http_multipart_post(char *uri, char **names, char **parts, int *plens, char *user, char *pass, char *session_id, int *ret, int *len) +{ + void *ctx; + char *data = NULL, *tmp, *p; + int dlen = 0, i, j; + unsigned char hash[16]; + unsigned char boundary[32], ch; + int blen = 0; + unsigned int map[62], m; + struct md5_context md5; + //struct md5_context md52; + int own_plen = 0; + + if (names) + { + if (!plens) + { + own_plen = 1; + for (i=0; names[i]; i++) ; + plens = (int *)calloc(i, sizeof(int)); + for (i=0; names[i]; i++) + plens[i] = strlen(parts[i]); + } + +retry: + if (blen >= 31) + goto fail; + memset(map, 0, 62*sizeof(int)); + for (i=0; names[i]; i++) + { + for (j=0; j='0' && ch<='9') + map[ch-'0']++; + else if (ch>='A' && ch<='Z') + map[ch-'A'+10]++; + else if (ch>='a' && ch<='z') + map[ch-'a'+36]++; + } + } + m = ~0; + j = 61; + for (i=0; i<62; i++) + if (map[i]>4]; + tmp[i*2+1] = hex[hash[i]&15]; + } + tmp[32] = 0; + http_async_add_header(ctx, "X-Auth-Hash", tmp); + free(tmp); + } + if (session_id) + { + http_async_add_header(ctx, "X-Auth-User-Id", user); + http_async_add_header(ctx, "X-Auth-Session-Key", session_id); + } + else + { + http_async_add_header(ctx, "X-Auth-User", user); + } + } + + if (data) + { + tmp = (char *)malloc(32+strlen((char *)boundary)); + sprintf(tmp, "multipart/form-data, boundary=%s", boundary); + http_async_add_header(ctx, "Content-type", tmp); + free(tmp); + free(data); + } + + if (own_plen) + free(plens); + return http_async_req_stop(ctx, ret, len); + +fail: + if (data) + free(data); + if (own_plen) + free(plens); + if (ret) + *ret = 600; + if (len) + *len = 0; + return NULL; +} diff --git a/src/client/HTTP.h b/src/client/HTTP.h new file mode 100644 index 0000000..af0971c --- /dev/null +++ b/src/client/HTTP.h @@ -0,0 +1,43 @@ +/** + * Powder Toy - HTTP Library (Header) + * + * Copyright (c) 2008 - 2010 Stanislaw Skowronek. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + */ +#ifndef HTTP_H +#define HTTP_H + +void http_init(char *proxy); +void http_done(void); + +char *http_simple_get(char *uri, int *ret, int *len); +char *http_auth_get(char *uri, char *user, char *pass, char * session_id, int *ret, int *len); +char *http_simple_post(char *uri, char *data, int dlen, int *ret, int *len); + +void http_auth_headers(void *ctx, char *user, char *pass, char * session_id); + +void *http_async_req_start(void *ctx, char *uri, char *data, int dlen, int keep); +void http_async_add_header(void *ctx, char *name, char *data); +int http_async_req_status(void *ctx); +void http_async_get_length(void *ctx, int *total, int *done); +char *http_async_req_stop(void *ctx, int *ret, int *len); +void http_async_req_close(void *ctx); + +char *http_multipart_post(char *uri, char **names, char **parts, int *plens, char *user, char *pass, char * session_id, int *ret, int *len); + +char *http_ret_text(int ret); + +#endif diff --git a/src/client/MD5.cpp b/src/client/MD5.cpp new file mode 100644 index 0000000..9cb398c --- /dev/null +++ b/src/client/MD5.cpp @@ -0,0 +1,231 @@ +// based on public-domain code from Colin Plumb (1993) +#include +#include "MD5.h" + +static unsigned getu32(const unsigned char *addr) +{ + return (((((unsigned long)addr[3] << 8) | addr[2]) << 8) | addr[1]) << 8 | addr[0]; +} + +static void putu32(unsigned data, unsigned char *addr) +{ + addr[0] = (unsigned char)data; + addr[1] = (unsigned char)(data >> 8); + addr[2] = (unsigned char)(data >> 16); + addr[3] = (unsigned char)(data >> 24); +} + +void md5_init(struct md5_context *ctx) +{ + ctx->buf[0] = 0x67452301; + ctx->buf[1] = 0xefcdab89; + ctx->buf[2] = 0x98badcfe; + ctx->buf[3] = 0x10325476; + + ctx->bits[0] = 0; + ctx->bits[1] = 0; +} + +void md5_update(struct md5_context *ctx, unsigned char const *buf, unsigned len) +{ + unsigned t; + + // update bit count + t = ctx->bits[0]; + if ((ctx->bits[0] = (t + ((unsigned)len << 3)) & 0xffffffff) < t) + ctx->bits[1]++; // carry + ctx->bits[1] += len >> 29; + + t = (t >> 3) & 0x3f; + + // use leading data to top up the buffer + + if (t) + { + unsigned char *p = ctx->in + t; + + t = 64-t; + if (len < t) + { + memcpy(p, buf, len); + return; + } + memcpy(p, buf, t); + md5_transform(ctx->buf, ctx->in); + buf += t; + len -= t; + } + + // following 64-byte chunks + + while (len >= 64) + { + memcpy(ctx->in, buf, 64); + md5_transform(ctx->buf, ctx->in); + buf += 64; + len -= 64; + } + + // save rest of bytes for later + + memcpy(ctx->in, buf, len); +} + +void md5_final(unsigned char digest[16], struct md5_context *ctx) +{ + unsigned count; + unsigned char *p; + + // #bytes mod64 + count = (ctx->bits[0] >> 3) & 0x3F; + + // first char of padding = 0x80 + p = ctx->in + count; + *p++ = 0x80; + + // calculate # of bytes to pad + count = 64 - 1 - count; + + // Pad out to 56 mod 64 + if (count < 8) + { + // we need to finish a whole block before padding + memset(p, 0, count); + md5_transform(ctx->buf, ctx->in); + memset(ctx->in, 0, 56); + } + else + { + // just pad to 56 bytes + memset(p, 0, count-8); + } + + // append length & final transform + putu32(ctx->bits[0], ctx->in + 56); + putu32(ctx->bits[1], ctx->in + 60); + + md5_transform(ctx->buf, ctx->in); + putu32(ctx->buf[0], digest); + putu32(ctx->buf[1], digest + 4); + putu32(ctx->buf[2], digest + 8); + putu32(ctx->buf[3], digest + 12); + memset(ctx, 0, sizeof(ctx)); +} + +#define F1(x, y, z) (z ^ (x & (y ^ z))) +#define F2(x, y, z) F1(z, x, y) +#define F3(x, y, z) (x ^ y ^ z) +#define F4(x, y, z) (y ^ (x | ~z)) + +#define MD5STEP(f, w, x, y, z, data, s) \ + ( w += f(x, y, z) + data, w &= 0xffffffff, w = w<>(32-s), w += x ) + +void md5_transform(unsigned buf[4], const unsigned char inraw[64]) +{ + unsigned a, b, c, d; + unsigned in[16]; + int i; + + for (i = 0; i < 16; ++i) + in[i] = getu32 (inraw + 4 * i); + + a = buf[0]; + b = buf[1]; + c = buf[2]; + d = buf[3]; + + MD5STEP(F1, a, b, c, d, in[ 0]+0xd76aa478, 7); + MD5STEP(F1, d, a, b, c, in[ 1]+0xe8c7b756, 12); + MD5STEP(F1, c, d, a, b, in[ 2]+0x242070db, 17); + MD5STEP(F1, b, c, d, a, in[ 3]+0xc1bdceee, 22); + MD5STEP(F1, a, b, c, d, in[ 4]+0xf57c0faf, 7); + MD5STEP(F1, d, a, b, c, in[ 5]+0x4787c62a, 12); + MD5STEP(F1, c, d, a, b, in[ 6]+0xa8304613, 17); + MD5STEP(F1, b, c, d, a, in[ 7]+0xfd469501, 22); + MD5STEP(F1, a, b, c, d, in[ 8]+0x698098d8, 7); + MD5STEP(F1, d, a, b, c, in[ 9]+0x8b44f7af, 12); + MD5STEP(F1, c, d, a, b, in[10]+0xffff5bb1, 17); + MD5STEP(F1, b, c, d, a, in[11]+0x895cd7be, 22); + MD5STEP(F1, a, b, c, d, in[12]+0x6b901122, 7); + MD5STEP(F1, d, a, b, c, in[13]+0xfd987193, 12); + MD5STEP(F1, c, d, a, b, in[14]+0xa679438e, 17); + MD5STEP(F1, b, c, d, a, in[15]+0x49b40821, 22); + + MD5STEP(F2, a, b, c, d, in[ 1]+0xf61e2562, 5); + MD5STEP(F2, d, a, b, c, in[ 6]+0xc040b340, 9); + MD5STEP(F2, c, d, a, b, in[11]+0x265e5a51, 14); + MD5STEP(F2, b, c, d, a, in[ 0]+0xe9b6c7aa, 20); + MD5STEP(F2, a, b, c, d, in[ 5]+0xd62f105d, 5); + MD5STEP(F2, d, a, b, c, in[10]+0x02441453, 9); + MD5STEP(F2, c, d, a, b, in[15]+0xd8a1e681, 14); + MD5STEP(F2, b, c, d, a, in[ 4]+0xe7d3fbc8, 20); + MD5STEP(F2, a, b, c, d, in[ 9]+0x21e1cde6, 5); + MD5STEP(F2, d, a, b, c, in[14]+0xc33707d6, 9); + MD5STEP(F2, c, d, a, b, in[ 3]+0xf4d50d87, 14); + MD5STEP(F2, b, c, d, a, in[ 8]+0x455a14ed, 20); + MD5STEP(F2, a, b, c, d, in[13]+0xa9e3e905, 5); + MD5STEP(F2, d, a, b, c, in[ 2]+0xfcefa3f8, 9); + MD5STEP(F2, c, d, a, b, in[ 7]+0x676f02d9, 14); + MD5STEP(F2, b, c, d, a, in[12]+0x8d2a4c8a, 20); + + MD5STEP(F3, a, b, c, d, in[ 5]+0xfffa3942, 4); + MD5STEP(F3, d, a, b, c, in[ 8]+0x8771f681, 11); + MD5STEP(F3, c, d, a, b, in[11]+0x6d9d6122, 16); + MD5STEP(F3, b, c, d, a, in[14]+0xfde5380c, 23); + MD5STEP(F3, a, b, c, d, in[ 1]+0xa4beea44, 4); + MD5STEP(F3, d, a, b, c, in[ 4]+0x4bdecfa9, 11); + MD5STEP(F3, c, d, a, b, in[ 7]+0xf6bb4b60, 16); + MD5STEP(F3, b, c, d, a, in[10]+0xbebfbc70, 23); + MD5STEP(F3, a, b, c, d, in[13]+0x289b7ec6, 4); + MD5STEP(F3, d, a, b, c, in[ 0]+0xeaa127fa, 11); + MD5STEP(F3, c, d, a, b, in[ 3]+0xd4ef3085, 16); + MD5STEP(F3, b, c, d, a, in[ 6]+0x04881d05, 23); + MD5STEP(F3, a, b, c, d, in[ 9]+0xd9d4d039, 4); + MD5STEP(F3, d, a, b, c, in[12]+0xe6db99e5, 11); + MD5STEP(F3, c, d, a, b, in[15]+0x1fa27cf8, 16); + MD5STEP(F3, b, c, d, a, in[ 2]+0xc4ac5665, 23); + + MD5STEP(F4, a, b, c, d, in[ 0]+0xf4292244, 6); + MD5STEP(F4, d, a, b, c, in[ 7]+0x432aff97, 10); + MD5STEP(F4, c, d, a, b, in[14]+0xab9423a7, 15); + MD5STEP(F4, b, c, d, a, in[ 5]+0xfc93a039, 21); + MD5STEP(F4, a, b, c, d, in[12]+0x655b59c3, 6); + MD5STEP(F4, d, a, b, c, in[ 3]+0x8f0ccc92, 10); + MD5STEP(F4, c, d, a, b, in[10]+0xffeff47d, 15); + MD5STEP(F4, b, c, d, a, in[ 1]+0x85845dd1, 21); + MD5STEP(F4, a, b, c, d, in[ 8]+0x6fa87e4f, 6); + MD5STEP(F4, d, a, b, c, in[15]+0xfe2ce6e0, 10); + MD5STEP(F4, c, d, a, b, in[ 6]+0xa3014314, 15); + MD5STEP(F4, b, c, d, a, in[13]+0x4e0811a1, 21); + MD5STEP(F4, a, b, c, d, in[ 4]+0xf7537e82, 6); + MD5STEP(F4, d, a, b, c, in[11]+0xbd3af235, 10); + MD5STEP(F4, c, d, a, b, in[ 2]+0x2ad7d2bb, 15); + MD5STEP(F4, b, c, d, a, in[ 9]+0xeb86d391, 21); + + buf[0] += a; + buf[1] += b; + buf[2] += c; + buf[3] += d; +} + +static char hex[] = "0123456789abcdef"; +void md5_ascii(char *result, unsigned char const *buf, unsigned len) +{ + struct md5_context md5; + unsigned char hash[16]; + int i; + + if (len==0) + len = strlen((char *)buf); + + md5_init(&md5); + md5_update(&md5, buf, len); + md5_final(hash, &md5); + + for (i=0; i<16; i++) + { + result[i*2] = hex[(hash[i]>>4)&0xF]; + result[i*2+1] = hex[hash[i]&0x0F]; + } + result[32] = 0; +} diff --git a/src/client/MD5.h b/src/client/MD5.h new file mode 100644 index 0000000..a8ef123 --- /dev/null +++ b/src/client/MD5.h @@ -0,0 +1,18 @@ +#ifndef MD5_H +#define MD5_H + +struct md5_context +{ + unsigned buf[4]; + unsigned bits[2]; + unsigned char in[64]; +}; + +void md5_init(struct md5_context *context); +void md5_update(struct md5_context *context, unsigned char const *buf, unsigned len); +void md5_final(unsigned char digest[16], struct md5_context *context); +void md5_transform(unsigned buf[4], const unsigned char in[64]); + +void md5_ascii(char *result, unsigned char const *buf, unsigned len); + +#endif diff --git a/src/elements/O2.cpp b/src/elements/O2.cpp index 78b4229..864d9e8 100644 --- a/src/elements/O2.cpp +++ b/src/elements/O2.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_O2(UPDATE_FUNC_ARGS) { diff --git a/src/elements/acel.cpp b/src/elements/acel.cpp index 7ab9684..0d69894 100644 --- a/src/elements/acel.cpp +++ b/src/elements/acel.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_ACEL(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/acid.cpp b/src/elements/acid.cpp index 3a72b9d..8d881fd 100644 --- a/src/elements/acid.cpp +++ b/src/elements/acid.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_ACID(UPDATE_FUNC_ARGS) { int r, rx, ry, trade, np; diff --git a/src/elements/amtr.cpp b/src/elements/amtr.cpp index d119cc9..5ff4529 100644 --- a/src/elements/amtr.cpp +++ b/src/elements/amtr.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_AMTR(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/anar.cpp b/src/elements/anar.cpp index 83eaf5a..6db0d2e 100644 --- a/src/elements/anar.cpp +++ b/src/elements/anar.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_ANAR(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/aray.cpp b/src/elements/aray.cpp index 65b0d53..2ab9b40 100644 --- a/src/elements/aray.cpp +++ b/src/elements/aray.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_ARAY(UPDATE_FUNC_ARGS) { int r, nxx, nyy, docontinue, nxi, nyi, rx, ry, nr, ry1, rx1; diff --git a/src/elements/bang.cpp b/src/elements/bang.cpp index 658a567..7a1f673 100644 --- a/src/elements/bang.cpp +++ b/src/elements/bang.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_BANG(UPDATE_FUNC_ARGS) { int r, rx, ry, nb; diff --git a/src/elements/bcln.cpp b/src/elements/bcln.cpp index 8c00f95..702b322 100644 --- a/src/elements/bcln.cpp +++ b/src/elements/bcln.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_BCLN(UPDATE_FUNC_ARGS) { if (!parts[i].life && sim->pv[y/CELL][x/CELL]>4.0f) diff --git a/src/elements/bcol.cpp b/src/elements/bcol.cpp index d941508..d727abf 100644 --- a/src/elements/bcol.cpp +++ b/src/elements/bcol.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_BCOL(UPDATE_FUNC_ARGS) { int r, rx, ry, trade, temp; diff --git a/src/elements/bizr.cpp b/src/elements/bizr.cpp index 538b87f..aae09d9 100644 --- a/src/elements/bizr.cpp +++ b/src/elements/bizr.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" //Used by ALL 3 BIZR states int update_BIZR(UPDATE_FUNC_ARGS) { diff --git a/src/elements/bmtl.cpp b/src/elements/bmtl.cpp index a3dc4b8..8682561 100644 --- a/src/elements/bmtl.cpp +++ b/src/elements/bmtl.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_BMTL(UPDATE_FUNC_ARGS) { int r, rx, ry, rt, tempFactor; diff --git a/src/elements/bomb.cpp b/src/elements/bomb.cpp index b2e9e7d..b696b19 100644 --- a/src/elements/bomb.cpp +++ b/src/elements/bomb.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_BOMB(UPDATE_FUNC_ARGS) { int r, rx, ry, nb; diff --git a/src/elements/boyl.cpp b/src/elements/boyl.cpp index e4ee6d2..7c0fc24 100644 --- a/src/elements/boyl.cpp +++ b/src/elements/boyl.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_BOYL(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/brmt.cpp b/src/elements/brmt.cpp index c23bd99..0e49cd1 100644 --- a/src/elements/brmt.cpp +++ b/src/elements/brmt.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_BRMT(UPDATE_FUNC_ARGS) { int r, rx, ry, rt, tempFactor; diff --git a/src/elements/btry.cpp b/src/elements/btry.cpp index 3f11003..0168e08 100644 --- a/src/elements/btry.cpp +++ b/src/elements/btry.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_BTRY(UPDATE_FUNC_ARGS) { int r, rx, ry, rt; diff --git a/src/elements/c5.cpp b/src/elements/c5.cpp index 412245f..8a10915 100644 --- a/src/elements/c5.cpp +++ b/src/elements/c5.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_C5(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/caus.cpp b/src/elements/caus.cpp index 2ec268e..fb71969 100644 --- a/src/elements/caus.cpp +++ b/src/elements/caus.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_CAUS(UPDATE_FUNC_ARGS) { int r, rx, ry, trade, np; diff --git a/src/elements/cbnw.cpp b/src/elements/cbnw.cpp index cf0c13e..37625b0 100644 --- a/src/elements/cbnw.cpp +++ b/src/elements/cbnw.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_CBNW(UPDATE_FUNC_ARGS) { int r, rx, ry, oldt; diff --git a/src/elements/clne.cpp b/src/elements/clne.cpp index 13b25b9..303908e 100644 --- a/src/elements/clne.cpp +++ b/src/elements/clne.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_CLNE(UPDATE_FUNC_ARGS) { if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) diff --git a/src/elements/clst.cpp b/src/elements/clst.cpp index 2c31d87..f8653be 100644 --- a/src/elements/clst.cpp +++ b/src/elements/clst.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_CLST(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/co2.cpp b/src/elements/co2.cpp index 5a3bbf5..62bc646 100644 --- a/src/elements/co2.cpp +++ b/src/elements/co2.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_CO2(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/coal.cpp b/src/elements/coal.cpp index 256aa69..23d20ba 100644 --- a/src/elements/coal.cpp +++ b/src/elements/coal.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_COAL(UPDATE_FUNC_ARGS) { int r, rx, ry, trade, temp; diff --git a/src/elements/conv.cpp b/src/elements/conv.cpp index ce4ee48..a62cd55 100644 --- a/src/elements/conv.cpp +++ b/src/elements/conv.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_CONV(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/dest.cpp b/src/elements/dest.cpp index 014fad4..fa5faf8 100644 --- a/src/elements/dest.cpp +++ b/src/elements/dest.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_DEST(UPDATE_FUNC_ARGS) { int r,rx,ry,topv; diff --git a/src/elements/deut.cpp b/src/elements/deut.cpp index 03de364..cee38de 100644 --- a/src/elements/deut.cpp +++ b/src/elements/deut.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_DEUT(UPDATE_FUNC_ARGS) { int r, rx, ry, trade, np; diff --git a/src/elements/dlay.cpp b/src/elements/dlay.cpp index 4643b30..e40c362 100644 --- a/src/elements/dlay.cpp +++ b/src/elements/dlay.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_DLAY(UPDATE_FUNC_ARGS) { int r, rx, ry, oldl; diff --git a/src/elements/dstw.cpp b/src/elements/dstw.cpp index 03ae7dd..21d7db2 100644 --- a/src/elements/dstw.cpp +++ b/src/elements/dstw.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_DSTW(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/elec.cpp b/src/elements/elec.cpp index 6b06f8f..e8ddf5e 100644 --- a/src/elements/elec.cpp +++ b/src/elements/elec.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_ELEC(UPDATE_FUNC_ARGS) { int r, rt, rx, ry, nb, rrx, rry; diff --git a/src/elements/elementmisc.cpp b/src/elements/elementmisc.cpp index a169e80..4df53f4 100644 --- a/src/elements/elementmisc.cpp +++ b/src/elements/elementmisc.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_MISC(UPDATE_FUNC_ARGS) { /*int t = parts[i].type; diff --git a/src/elements/emp.cpp b/src/elements/emp.cpp index a187196..2b3db86 100644 --- a/src/elements/emp.cpp +++ b/src/elements/emp.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_EMP(UPDATE_FUNC_ARGS) { int r,rx,ry,ok=0,t,n,nx,ny; diff --git a/src/elements/figh.cpp b/src/elements/figh.cpp index 8b18871..35b5a20 100644 --- a/src/elements/figh.cpp +++ b/src/elements/figh.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_FIGH(UPDATE_FUNC_ARGS) { diff --git a/src/elements/fire.cpp b/src/elements/fire.cpp index 1f9c0c2..3f36916 100644 --- a/src/elements/fire.cpp +++ b/src/elements/fire.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int graphics_FIRE(GRAPHICS_FUNC_ARGS) { diff --git a/src/elements/firw.cpp b/src/elements/firw.cpp index 74605b0..ffd7941 100644 --- a/src/elements/firw.cpp +++ b/src/elements/firw.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_FIRW(UPDATE_FUNC_ARGS) { int r, rx, ry, rt, np; diff --git a/src/elements/fog.cpp b/src/elements/fog.cpp index 28952e9..24ea953 100644 --- a/src/elements/fog.cpp +++ b/src/elements/fog.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_FOG(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/frzw.cpp b/src/elements/frzw.cpp index 932bccb..4569911 100644 --- a/src/elements/frzw.cpp +++ b/src/elements/frzw.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_FRZW(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/frzz.cpp b/src/elements/frzz.cpp index 8e09c1d..b412cbc 100644 --- a/src/elements/frzz.cpp +++ b/src/elements/frzz.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_FRZZ(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/fsep.cpp b/src/elements/fsep.cpp index 3db5ba5..347fc46 100644 --- a/src/elements/fsep.cpp +++ b/src/elements/fsep.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_FSEP(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/fuse.cpp b/src/elements/fuse.cpp index e1db1ff..9081b21 100644 --- a/src/elements/fuse.cpp +++ b/src/elements/fuse.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_FUSE(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/fwrk.cpp b/src/elements/fwrk.cpp index d217ad9..1838dde 100644 --- a/src/elements/fwrk.cpp +++ b/src/elements/fwrk.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_FWRK(UPDATE_FUNC_ARGS) { int r, rx, ry, np; diff --git a/src/elements/gbmb.cpp b/src/elements/gbmb.cpp index 95afc4e..d1d7c20 100644 --- a/src/elements/gbmb.cpp +++ b/src/elements/gbmb.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_GBMB(UPDATE_FUNC_ARGS) { int rx,ry,r; if (parts[i].life<=0) diff --git a/src/elements/glas.cpp b/src/elements/glas.cpp index e8c0a6c..ef9e7f7 100644 --- a/src/elements/glas.cpp +++ b/src/elements/glas.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_GLAS(UPDATE_FUNC_ARGS) { parts[i].pavg[0] = parts[i].pavg[1]; diff --git a/src/elements/glow.cpp b/src/elements/glow.cpp index e83e2f4..38f7140 100644 --- a/src/elements/glow.cpp +++ b/src/elements/glow.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_GLOW(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/goo.cpp b/src/elements/goo.cpp index c305182..6e66468 100644 --- a/src/elements/goo.cpp +++ b/src/elements/goo.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_GOO(UPDATE_FUNC_ARGS) { if (!parts[i].life && sim->pv[y/CELL][x/CELL]>1.0f) diff --git a/src/elements/gpmp.cpp b/src/elements/gpmp.cpp index dcde7a9..3ad552b 100644 --- a/src/elements/gpmp.cpp +++ b/src/elements/gpmp.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_GPMP(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/graphics_default.cpp b/src/elements/graphics_default.cpp index 1270977..cf394aa 100644 --- a/src/elements/graphics_default.cpp +++ b/src/elements/graphics_default.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int graphics_DEFAULT(GRAPHICS_FUNC_ARGS) { diff --git a/src/elements/h2.cpp b/src/elements/h2.cpp index da39ad0..3a92cfe 100644 --- a/src/elements/h2.cpp +++ b/src/elements/h2.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_H2(UPDATE_FUNC_ARGS) { diff --git a/src/elements/hswc.cpp b/src/elements/hswc.cpp index c727395..a279947 100644 --- a/src/elements/hswc.cpp +++ b/src/elements/hswc.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_HSWC(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/ice.cpp b/src/elements/ice.cpp index aece17b..aab4e0e 100644 --- a/src/elements/ice.cpp +++ b/src/elements/ice.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_ICEI(UPDATE_FUNC_ARGS) { //currently used for snow as well int r, rx, ry; diff --git a/src/elements/ignt.cpp b/src/elements/ignt.cpp index 1d7ea64..66b0e18 100644 --- a/src/elements/ignt.cpp +++ b/src/elements/ignt.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_IGNT(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/iron.cpp b/src/elements/iron.cpp index b887cf8..391b708 100644 --- a/src/elements/iron.cpp +++ b/src/elements/iron.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_IRON(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/isz.cpp b/src/elements/isz.cpp index 25446d2..22e6c77 100644 --- a/src/elements/isz.cpp +++ b/src/elements/isz.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_ISZ(UPDATE_FUNC_ARGS) { // for both ISZS and ISOZ float rr, rrr; diff --git a/src/elements/lava.cpp b/src/elements/lava.cpp index 3d7827b..cc0fbb3 100644 --- a/src/elements/lava.cpp +++ b/src/elements/lava.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int graphics_LAVA(GRAPHICS_FUNC_ARGS) { diff --git a/src/elements/lcry.cpp b/src/elements/lcry.cpp index 546c2ca..0ecb84c 100644 --- a/src/elements/lcry.cpp +++ b/src/elements/lcry.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_LCRY(UPDATE_FUNC_ARGS) { diff --git a/src/elements/legacy.cpp b/src/elements/legacy.cpp index dd58173..f1fcf03 100644 --- a/src/elements/legacy.cpp +++ b/src/elements/legacy.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" // Interactions which only occur when legacy_enable is on int update_legacy_all(UPDATE_FUNC_ARGS) { diff --git a/src/elements/ligh.cpp b/src/elements/ligh.cpp index 8108c4b..5249c4f 100644 --- a/src/elements/ligh.cpp +++ b/src/elements/ligh.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" #define LIGHTING_POWER 0.65 diff --git a/src/elements/merc.cpp b/src/elements/merc.cpp index 2df113b..58b19a3 100644 --- a/src/elements/merc.cpp +++ b/src/elements/merc.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_MERC(UPDATE_FUNC_ARGS) { int r, rx, ry, trade, np; diff --git a/src/elements/mort.cpp b/src/elements/mort.cpp index bbb6264..9de088f 100644 --- a/src/elements/mort.cpp +++ b/src/elements/mort.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_MORT(UPDATE_FUNC_ARGS) { sim->create_part(-1, x, y-1, PT_SMKE); diff --git a/src/elements/nbhl.cpp b/src/elements/nbhl.cpp index 056313c..565416f 100644 --- a/src/elements/nbhl.cpp +++ b/src/elements/nbhl.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_NBHL(UPDATE_FUNC_ARGS) { sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] += 0.1f; diff --git a/src/elements/neut.cpp b/src/elements/neut.cpp index a48fc09..c804106 100644 --- a/src/elements/neut.cpp +++ b/src/elements/neut.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int create_n_parts(Simulation * sim, int n, int x, int y, float vx, float vy, float temp, int t)//testing a new deut create part diff --git a/src/elements/newgraphics.cpp b/src/elements/newgraphics.cpp index 83da27b..036a6a7 100644 --- a/src/elements/newgraphics.cpp +++ b/src/elements/newgraphics.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" #include "hmap.h" int graphics_QRTZ(GRAPHICS_FUNC_ARGS) //QRTZ and PQRT diff --git a/src/elements/none.cpp b/src/elements/none.cpp index 50f301f..6974e6c 100644 --- a/src/elements/none.cpp +++ b/src/elements/none.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_(UPDATE_FUNC_ARGS) { diff --git a/src/elements/nptct.cpp b/src/elements/nptct.cpp index 2d68a9b..f8e29e6 100644 --- a/src/elements/nptct.cpp +++ b/src/elements/nptct.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_NPTCT(UPDATE_FUNC_ARGS) { if (parts[i].temp>295.0f) diff --git a/src/elements/nwhl.cpp b/src/elements/nwhl.cpp index f53b657..cae189a 100644 --- a/src/elements/nwhl.cpp +++ b/src/elements/nwhl.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_NWHL(UPDATE_FUNC_ARGS) { sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] -= 0.1f; diff --git a/src/elements/pbcn.cpp b/src/elements/pbcn.cpp index 7e99397..a6bbe5a 100644 --- a/src/elements/pbcn.cpp +++ b/src/elements/pbcn.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_PBCN(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/pcln.cpp b/src/elements/pcln.cpp index cd1ed4f..beb4a9a 100644 --- a/src/elements/pcln.cpp +++ b/src/elements/pcln.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_PCLN(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/phot.cpp b/src/elements/phot.cpp index 3ed6b5d..407ac2e 100644 --- a/src/elements/phot.cpp +++ b/src/elements/phot.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_PHOT(UPDATE_FUNC_ARGS) { int r, rt, rx, ry; diff --git a/src/elements/pipe.cpp b/src/elements/pipe.cpp index 08432f5..40ef411 100644 --- a/src/elements/pipe.cpp +++ b/src/elements/pipe.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" signed char pos_1_rx[] = {-1,-1,-1, 0, 0, 1, 1, 1}; signed char pos_1_ry[] = {-1, 0, 1,-1, 1,-1, 0, 1}; diff --git a/src/elements/plnt.cpp b/src/elements/plnt.cpp index a44c8c2..ef7985f 100644 --- a/src/elements/plnt.cpp +++ b/src/elements/plnt.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_PLNT(UPDATE_FUNC_ARGS) { int r, rx, ry, np; diff --git a/src/elements/plsm.cpp b/src/elements/plsm.cpp index c6f7c20..f8b3865 100644 --- a/src/elements/plsm.cpp +++ b/src/elements/plsm.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" #include "hmap.h" int graphics_PLSM(GRAPHICS_FUNC_ARGS) diff --git a/src/elements/plut.cpp b/src/elements/plut.cpp index 3e2820d..7c51b2d 100644 --- a/src/elements/plut.cpp +++ b/src/elements/plut.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_PLUT(UPDATE_FUNC_ARGS) { if (1>rand()%100 && ((int)(5.0f*sim->pv[y/CELL][x/CELL]))>(rand()%1000)) diff --git a/src/elements/prti.cpp b/src/elements/prti.cpp index df212d4..9bbbf26 100644 --- a/src/elements/prti.cpp +++ b/src/elements/prti.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" /*these are the count values of where the particle gets stored, depending on where it came from 0 1 2 7 . 3 diff --git a/src/elements/prto.cpp b/src/elements/prto.cpp index ee61abf..32e7251 100644 --- a/src/elements/prto.cpp +++ b/src/elements/prto.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" /*these are the count values of where the particle gets stored, depending on where it came from 0 1 2 7 . 3 diff --git a/src/elements/pump.cpp b/src/elements/pump.cpp index 8a7254e..af05c02 100644 --- a/src/elements/pump.cpp +++ b/src/elements/pump.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_PUMP(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/pvod.cpp b/src/elements/pvod.cpp index e645d0a..1a48ca8 100644 --- a/src/elements/pvod.cpp +++ b/src/elements/pvod.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_PVOD(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/pyro.cpp b/src/elements/pyro.cpp index 790e295..81f00f7 100644 --- a/src/elements/pyro.cpp +++ b/src/elements/pyro.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_PYRO(UPDATE_FUNC_ARGS) { int r, rx, ry, rt, t = parts[i].type; diff --git a/src/elements/qrtz.cpp b/src/elements/qrtz.cpp index 7768765..c33cacb 100644 --- a/src/elements/qrtz.cpp +++ b/src/elements/qrtz.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_QRTZ(UPDATE_FUNC_ARGS) { int r, tmp, trade, rx, ry, np, t; diff --git a/src/elements/rime.cpp b/src/elements/rime.cpp index 617414b..878b928 100644 --- a/src/elements/rime.cpp +++ b/src/elements/rime.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_RIME(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/shld.cpp b/src/elements/shld.cpp index cbe8306..ade7edb 100644 --- a/src/elements/shld.cpp +++ b/src/elements/shld.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_SHLD1(UPDATE_FUNC_ARGS) { int r, nnx, nny, rx, ry; diff --git a/src/elements/sing.cpp b/src/elements/sing.cpp index fa6121c..de1e329 100644 --- a/src/elements/sing.cpp +++ b/src/elements/sing.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_SING(UPDATE_FUNC_ARGS) { int r, rx, ry, cry, crx, rad, nxi, nxj, nb, j, spawncount; diff --git a/src/elements/sltw.cpp b/src/elements/sltw.cpp index c965fd4..507602c 100644 --- a/src/elements/sltw.cpp +++ b/src/elements/sltw.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_SLTW(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/smke.cpp b/src/elements/smke.cpp index d19bd0a..e9311bd 100644 --- a/src/elements/smke.cpp +++ b/src/elements/smke.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int graphics_SMKE(GRAPHICS_FUNC_ARGS) { diff --git a/src/elements/soap.cpp b/src/elements/soap.cpp index 0d31292..0d1054f 100644 --- a/src/elements/soap.cpp +++ b/src/elements/soap.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_SOAP(UPDATE_FUNC_ARGS) { diff --git a/src/elements/spng.cpp b/src/elements/spng.cpp index 28b3e1b..868b1e6 100644 --- a/src/elements/spng.cpp +++ b/src/elements/spng.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_SPNG(UPDATE_FUNC_ARGS) { int r, trade, rx, ry, tmp, np; diff --git a/src/elements/sprk.cpp b/src/elements/sprk.cpp index 244e831..80f66a2 100644 --- a/src/elements/sprk.cpp +++ b/src/elements/sprk.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_SPRK(UPDATE_FUNC_ARGS) { int r, rx, ry, rt, conduct_sprk, nearp, pavg, ct = parts[i].ctype; diff --git a/src/elements/stkm.cpp b/src/elements/stkm.cpp index 322eba1..c457b62 100644 --- a/src/elements/stkm.cpp +++ b/src/elements/stkm.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_SPAWN(UPDATE_FUNC_ARGS) { if (!sim->player.spwn) diff --git a/src/elements/stkm2.cpp b/src/elements/stkm2.cpp index 967bea2..d18a7ac 100644 --- a/src/elements/stkm2.cpp +++ b/src/elements/stkm2.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_SPAWN2(UPDATE_FUNC_ARGS) { if (!sim->player2.spwn) diff --git a/src/elements/stor.cpp b/src/elements/stor.cpp index 66eb072..414caad 100644 --- a/src/elements/stor.cpp +++ b/src/elements/stor.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_STOR(UPDATE_FUNC_ARGS) { int r, rx, ry, np, rx1, ry1; diff --git a/src/elements/swch.cpp b/src/elements/swch.cpp index ee2c467..f37192b 100644 --- a/src/elements/swch.cpp +++ b/src/elements/swch.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_SWCH(UPDATE_FUNC_ARGS) { int r, rt, rx, ry; diff --git a/src/elements/thdr.cpp b/src/elements/thdr.cpp index f7f95b4..1e3d0ab 100644 --- a/src/elements/thdr.cpp +++ b/src/elements/thdr.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_THDR(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/thrm.cpp b/src/elements/thrm.cpp index 91939e6..2075e13 100644 --- a/src/elements/thrm.cpp +++ b/src/elements/thrm.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_THRM(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/uran.cpp b/src/elements/uran.cpp index a8b2a06..31e93a7 100644 --- a/src/elements/uran.cpp +++ b/src/elements/uran.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_URAN(UPDATE_FUNC_ARGS) { if (!sim->legacy_enable && sim->pv[y/CELL][x/CELL]>0.0f) diff --git a/src/elements/vine.cpp b/src/elements/vine.cpp index 165d391..c8d51ba 100644 --- a/src/elements/vine.cpp +++ b/src/elements/vine.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_VINE(UPDATE_FUNC_ARGS) { int r, np, rx =(rand()%3)-1, ry=(rand()%3)-1; diff --git a/src/elements/warp.cpp b/src/elements/warp.cpp index ddc1b81..88315a9 100644 --- a/src/elements/warp.cpp +++ b/src/elements/warp.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_WARP(UPDATE_FUNC_ARGS) { int trade, r, rx, ry; diff --git a/src/elements/watr.cpp b/src/elements/watr.cpp index 09b66a9..b44fa22 100644 --- a/src/elements/watr.cpp +++ b/src/elements/watr.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/element.h" int update_WATR(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/wifi.cpp b/src/elements/wifi.cpp index ee5e264..cb77dd9 100644 --- a/src/elements/wifi.cpp +++ b/src/elements/wifi.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_WIFI(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/wire.cpp b/src/elements/wire.cpp index 49d3720..f7202e4 100644 --- a/src/elements/wire.cpp +++ b/src/elements/wire.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_WIRE(UPDATE_FUNC_ARGS) { int s,r,rx,ry,count; diff --git a/src/elements/wtrv.cpp b/src/elements/wtrv.cpp index de0eae4..2e3838a 100644 --- a/src/elements/wtrv.cpp +++ b/src/elements/wtrv.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_WTRV(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/elements/yest.cpp b/src/elements/yest.cpp index c6c7db6..5b3fc95 100644 --- a/src/elements/yest.cpp +++ b/src/elements/yest.cpp @@ -1,4 +1,4 @@ -#include "element.h" +#include "simulation/Element.h" int update_YEST(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index becb540..e029fc9 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -4,6 +4,7 @@ #include "Config.h" #include "GameController.h" #include "GameModel.h" +#include "search/SearchController.h" #include "interface/Point.h" using namespace std; @@ -60,3 +61,9 @@ void GameController::SetPaused(bool pauseState) { gameModel->SetPaused(pauseState); } + +void GameController::OpenSearch() +{ + SearchController * search = new SearchController(); + ui::Engine::Ref().ShowWindow(search->GetView()); +} diff --git a/src/game/GameController.h b/src/game/GameController.h index c3c8273..d9755a1 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -5,7 +5,7 @@ #include "GameView.h" #include "GameModel.h" #include "interface/Point.h" -#include "Simulation.h" +#include "simulation/Simulation.h" using namespace std; @@ -23,6 +23,7 @@ public: void DrawPoints(queue & pointQueue); void Tick(); void SetPaused(bool pauseState); + void OpenSearch(); }; #endif // GAMECONTROLLER_H diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 96b29a9..3d5a800 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -1,7 +1,7 @@ #include "interface/Engine.h" #include "GameModel.h" #include "GameView.h" -#include "Simulation.h" +#include "simulation/Simulation.h" #include "Renderer.h" GameModel::GameModel(): diff --git a/src/game/GameModel.h b/src/game/GameModel.h index a2eb3ce..6cb74cb 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -2,7 +2,7 @@ #define GAMEMODEL_H #include -#include "Simulation.h" +#include "simulation/Simulation.h" #include "Renderer.h" #include "GameView.h" diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 2576527..2fbed31 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -24,6 +24,21 @@ GameView::GameView(): pauseButton->SetTogglable(true); pauseButton->SetActionCallback(new PauseAction(this)); AddComponent(pauseButton); + + class SearchAction : public ui::ButtonAction + { + GameView * v; + public: + SearchAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->OpenSearch(); + } + }; + searchButton = new ui::Button(ui::Point(1, Size.Y-18), ui::Point(16, 16), "\x81"); //Open + searchButton->SetTogglable(false); + searchButton->SetActionCallback(new SearchAction(this)); + AddComponent(searchButton); } void GameView::NotifyRendererChanged(GameModel * sender) diff --git a/src/game/GameView.h b/src/game/GameView.h index 531a4b9..f34aedc 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -21,20 +21,13 @@ private: Renderer * ren; //UI Elements ui::Button * pauseButton; + ui::Button * searchButton; public: GameView(); void AttachController(GameController * _c){ c = _c; } void NotifyRendererChanged(GameModel * sender); void NotifySimulationChanged(GameModel * sender); void NotifyPausedChanged(GameModel * sender); - /*virtual void DoMouseMove(int x, int y, int dx, int dy); - virtual void DoMouseDown(int x, int y, unsigned button); - virtual void DoMouseUp(int x, int y, unsigned button); - //virtual void DoMouseWheel(int x, int y, int d); - //virtual void DoKeyPress(int key, bool shift, bool ctrl, bool alt); - //virtual void DoKeyRelease(int key, bool shift, bool ctrl, bool alt); - virtual void DoTick(float dt); - virtual void DoDraw();*/ virtual void OnMouseMove(int x, int y, int dx, int dy); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index a3f76b9..affa75d 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -11,6 +11,7 @@ #include "Graphics.h" #include "Global.h" #include "Engine.h" +#include "Misc.h" namespace ui { @@ -20,9 +21,12 @@ Button::Button(Window* parent_state, std::string buttonText): isMouseInside(false), isButtonDown(false), isTogglable(false), - actionCallback(NULL) + actionCallback(NULL), + textPosition(ui::Point(0, 0)), + textVAlign(AlignMiddle), + textHAlign(AlignCentre) { - + TextPosition(); } Button::Button(Point position, Point size, std::string buttonText): @@ -31,9 +35,12 @@ Button::Button(Point position, Point size, std::string buttonText): isMouseInside(false), isButtonDown(false), isTogglable(false), - actionCallback(NULL) + actionCallback(NULL), + textPosition(ui::Point(0, 0)), + textVAlign(AlignMiddle), + textHAlign(AlignCentre) { - + TextPosition(); } Button::Button(std::string buttonText): @@ -42,9 +49,48 @@ Button::Button(std::string buttonText): isMouseInside(false), isButtonDown(false), isTogglable(false), - actionCallback(NULL) + actionCallback(NULL), + textPosition(ui::Point(0, 0)), + textVAlign(AlignMiddle), + textHAlign(AlignCentre) { + TextPosition(); +} + +void Button::TextPosition() +{ + //Position.X+(Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2, Position.Y+(Size.Y-10)/2 + switch(textVAlign) + { + case AlignTop: + textPosition.Y = 3; + break; + case AlignMiddle: + textPosition.Y = (Size.Y-10)/2; + break; + case AlignBottom: + textPosition.Y = Size.Y-11; + break; + } + switch(textHAlign) + { + case AlignLeft: + textPosition.X = 3; + break; + case AlignCentre: + textPosition.X = (Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2; + break; + case AlignRight: + textPosition.X = (Size.X-Graphics::textwidth((char *)ButtonText.c_str()))-2; + break; + } +} + +void Button::SetText(std::string buttonText) +{ + ButtonText = buttonText; + TextPosition(); } void Button::SetTogglable(bool togglable) @@ -68,25 +114,21 @@ inline void Button::SetToggleState(bool state) toggle = state; } - - void Button::Draw(const Point& screenPos) { Graphics * g = ui::Engine::Ref().g; Point Position = screenPos; - // = reinterpret_cast(userdata); - //TODO: Cache text location, that way we don't have the text alignment code here if(isButtonDown || (isTogglable && toggle)) { g->fillrect(Position.X-1, Position.Y-1, Size.X+2, Size.Y+2, 255, 255, 255, 255); - g->drawtext(Position.X+(Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2, Position.Y+(Size.Y-10)/2, ButtonText, 0, 0, 0, 255); + g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 0, 0, 0, 255); } else { if(isMouseInside) g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 20, 20, 20, 255); g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); - g->drawtext(Position.X+(Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2, Position.Y+(Size.Y-10)/2, ButtonText, 255, 255, 255, 255); + g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 255, 255, 255, 255); } /*sf::RenderWindow* rw = reinterpret_cast(userdata); //it better be a RenderWindow or so help your god diff --git a/src/interface/Button.h b/src/interface/Button.h index 5f2d71f..aabca91 100644 --- a/src/interface/Button.h +++ b/src/interface/Button.h @@ -9,7 +9,7 @@ #define BUTTON_H_ #include - +#include "Misc.h" #include "Component.h" namespace ui @@ -51,10 +51,18 @@ public: inline bool GetToggleState(); inline void SetToggleState(bool state); void SetActionCallback(ButtonAction * action); - + void TextPosition(); + void SetText(std::string buttonText); + HorizontalAlignment GetHAlignment() { return textHAlign; } + VerticalAlignment GetVAlignment() { return textVAlign; } + void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign) { textHAlign = hAlign; textVAlign = vAlign; TextPosition(); } protected: bool isButtonDown, state, isMouseInside, isTogglable, toggle; ButtonAction * actionCallback; + ui::Point textPosition; + HorizontalAlignment textHAlign; + VerticalAlignment textVAlign; + }; } #endif /* BUTTON_H_ */ diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 55a2370..130fc8e 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -47,10 +47,9 @@ void Engine::ShowWindow(Window * window) { if(state_) { - windows.push(window); + windows.push(state_); } state_ = window; - windows.push(window); } void Engine::CloseWindow() diff --git a/src/interface/Sandbox.cpp b/src/interface/Sandbox.cpp deleted file mode 100644 index 9a858f8..0000000 --- a/src/interface/Sandbox.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Sandbox.cpp - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#include -#include - -#include "Config.h" -#include "Global.h" - -#include "interface/Point.h" -#include "interface/Sandbox.h" -#include "interface/Component.h" -#include "Renderer.h" -#include "Simulation.h" -#include "Engine.h" - -namespace ui { - -Sandbox::Sandbox(): - Component(Point(0, 0), Point(XRES, YRES)), - pointQueue(std::queue()), - ren(NULL), - isMouseDown(false), - activeElement(1) -{ - sim = new Simulation(); -} - -Simulation * Sandbox::GetSimulation() -{ - return sim; -} - -void Sandbox::OnMouseMoved(int localx, int localy, int dx, int dy) -{ - if(isMouseDown) - { - pointQueue.push(new Point(localx-dx, localy-dy)); - pointQueue.push(new Point(localx, localy)); - } -} - -void Sandbox::OnMouseClick(int localx, int localy, unsigned int button) -{ - isMouseDown = true; - pointQueue.push(new Point(localx, localy)); -} - -void Sandbox::OnMouseUp(int localx, int localy, unsigned int button) -{ - if(isMouseDown) - { - isMouseDown = false; - pointQueue.push(new Point(localx, localy)); - } -} - -void Sandbox::Draw(const Point& screenPos) -{ - Graphics * g = Engine::Ref().g; - if(!ren) - ren = new Renderer(g, sim); - ren->render_parts(); -} - -void Sandbox::Tick(float delta) -{ - if(!pointQueue.empty()) - { - Point * sPoint = NULL; - while(!pointQueue.empty()) - { - Point * fPoint = pointQueue.front(); - pointQueue.pop(); - if(sPoint) - { - sim->create_line(fPoint->X, fPoint->Y, sPoint->X, sPoint->Y, 1, 1, activeElement, 0); - delete sPoint; - } - else - { - sim->create_parts(fPoint->X, fPoint->Y, 1, 1, activeElement, 0); - } - sPoint = fPoint; - } - if(sPoint) - delete sPoint; - } - sim->update_particles(); - sim->sys_pause = 1; -} - -Sandbox::~Sandbox() { - // TODO Auto-generated destructor stub -} - -} /* namespace ui */ diff --git a/src/interface/Sandbox.h b/src/interface/Sandbox.h deleted file mode 100644 index fb4a668..0000000 --- a/src/interface/Sandbox.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Sandbox.h - * - * Created on: Jan 8, 2012 - * Author: Simon - */ - -#ifndef SANDBOX_H_ -#define SANDBOX_H_ - -#include -#include "Point.h" -#include "Component.h" -#include "Simulation.h" -#include "Renderer.h" - -namespace ui { - -class Sandbox: public ui::Component { -private: - int lastCoordX, lastCoordY; - int activeElement; - std::queue pointQueue; - bool isMouseDown; - Renderer * ren; - Simulation * sim; -public: - Sandbox(); - virtual Simulation * GetSimulation(); - virtual void OnMouseMoved(int localx, int localy, int dx, int dy); - virtual void OnMouseClick(int localx, int localy, unsigned int button); - virtual void OnMouseUp(int localx, int localy, unsigned int button); - virtual void Draw(const Point& screenPos); - virtual void Tick(float delta); - virtual ~Sandbox(); -}; - -} /* namespace ui */ -#endif /* SANDBOX_H_ */ diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp new file mode 100644 index 0000000..18f3281 --- /dev/null +++ b/src/interface/SaveButton.cpp @@ -0,0 +1,157 @@ +#include + +#include "SaveButton.h" +#include "search/Save.h" +#include "Graphics.h" +#include "Global.h" +#include "Engine.h" +#include "client/Client.h" + +namespace ui { + +SaveButton::SaveButton(Window* parent_state, Save save): + Component(parent_state), + save(save), + thumbnail(NULL), + isMouseInside(false), + isButtonDown(false), + actionCallback(NULL) +{ + +} + +SaveButton::SaveButton(Point position, Point size, Save save): + Component(position, size), + save(save), + thumbnail(NULL), + isMouseInside(false), + isButtonDown(false), + actionCallback(NULL) +{ + +} + +SaveButton::SaveButton(Save save): + Component(), + save(save), + thumbnail(NULL), + isMouseInside(false), + isButtonDown(false), + actionCallback(NULL) +{ + +} + +SaveButton::~SaveButton() +{ + if(thumbnail) + delete thumbnail; +} + +void SaveButton::Tick(float dt) +{ + Thumbnail * tempThumb; + float scaleFactorY = 1.0f, scaleFactorX = 1.0f; + if(!thumbnail) + { + tempThumb = Client::Ref().GetThumbnail(save.GetID(), 0); + if(tempThumb) + { + thumbnail = tempThumb; //Store a local copy of the thumbnail + if(thumbnail->Data) + { + if(thumbnail->Size.Y > (Size.Y-25)) + { + scaleFactorY = ((float)(Size.Y-25))/((float)thumbnail->Size.Y); + } + if(thumbnail->Size.X > Size.X) + { + scaleFactorX = ((float)Size.X)/((float)thumbnail->Size.X); + } + if(scaleFactorY < 1.0f || scaleFactorX < 1.0f) + { + float scaleFactor = scaleFactorY < scaleFactorX ? scaleFactorY : scaleFactorX; + pixel * thumbData = thumbnail->Data; + thumbnail->Data = Graphics::resample_img(thumbData, thumbnail->Size.X, thumbnail->Size.Y, thumbnail->Size.X * scaleFactor, thumbnail->Size.Y * scaleFactor); + thumbnail->Size.X *= scaleFactor; + thumbnail->Size.Y *= scaleFactor; + free(thumbData); + } + } + } + } +} + +void SaveButton::Draw(const Point& screenPos) +{ + Graphics * g = ui::Engine::Ref().g; + float scaleFactor; + + if(thumbnail) + { + g->draw_image(thumbnail->Data, screenPos.X+(Size.X-thumbnail->Size.X)/2, screenPos.Y+((Size.Y-25)-thumbnail->Size.Y)/2, thumbnail->Size.X, thumbnail->Size.Y, 255); + g->drawrect(screenPos.X+(Size.X-thumbnail->Size.X)/2, screenPos.Y+((Size.Y-25)-thumbnail->Size.Y)/2, thumbnail->Size.X, thumbnail->Size.Y, 180, 180, 180, 255); + } + else + { + scaleFactor = (Size.Y-25)/((float)YRES); + g->drawrect(screenPos.X+(Size.X-((float)XRES)*scaleFactor)/2, screenPos.Y+((Size.Y-21)-((float)YRES)*scaleFactor)/2, ((float)XRES)*scaleFactor, ((float)YRES)*scaleFactor, 180, 180, 180, 255); + } + + if(isMouseInside) + { + g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save.name.c_str()))/2, screenPos.Y+Size.Y - 21, save.name, 255, 255, 255, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save.userName.c_str()))/2, screenPos.Y+Size.Y - 10, save.userName, 200, 230, 255, 255); + } + else + { + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save.name.c_str()))/2, screenPos.Y+Size.Y - 21, save.name, 180, 180, 180, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save.userName.c_str()))/2, screenPos.Y+Size.Y - 10, save.userName, 100, 130, 160, 255); + } +} + +void SaveButton::OnMouseUnclick(int x, int y, unsigned int button) +{ + if(button != 1) + { + return; //left click only! + } + + if(isButtonDown) + { + DoAction(); + } + + isButtonDown = false; +} + +void SaveButton::OnMouseClick(int x, int y, unsigned int button) +{ + if(button != 1) return; //left click only! + isButtonDown = true; +} + +void SaveButton::OnMouseEnter(int x, int y) +{ + isMouseInside = true; +} + +void SaveButton::OnMouseLeave(int x, int y) +{ + isMouseInside = false; +} + +void SaveButton::DoAction() +{ + std::cout << "Do action!" << std::endl; + if(actionCallback) + actionCallback->ActionCallback(this); +} + +void SaveButton::SetActionCallback(SaveButtonAction * action) +{ + actionCallback = action; +} + +} /* namespace ui */ diff --git a/src/interface/SaveButton.h b/src/interface/SaveButton.h new file mode 100644 index 0000000..8834d8a --- /dev/null +++ b/src/interface/SaveButton.h @@ -0,0 +1,50 @@ +#ifndef SAVEBUTTON_H_ +#define SAVEBUTTON_H_ + +#include + +#include "Component.h" +#include "search/Save.h" +#include "Graphics.h" +#include "search/Thumbnail.h" + +namespace ui +{ +class SaveButton; +class SaveButtonAction +{ +public: + virtual void ActionCallback(ui::SaveButton * sender) {} +}; + +class SaveButton : public Component +{ + Save save; + Thumbnail * thumbnail; +public: + SaveButton(Window* parent_state, Save save); + + SaveButton(Point position, Point size, Save save); + + SaveButton(Save save); + virtual ~SaveButton(); + + virtual void OnMouseClick(int x, int y, unsigned int button); + virtual void OnMouseUnclick(int x, int y, unsigned int button); + + virtual void OnMouseEnter(int x, int y); + virtual void OnMouseLeave(int x, int y); + + virtual void Draw(const Point& screenPos); + virtual void Tick(float dt); + + inline bool GetState() { return state; } + virtual void DoAction(); + void SetActionCallback(SaveButtonAction * action); +protected: + bool isButtonDown, state, isMouseInside; + SaveButtonAction * actionCallback; +}; +} +#endif /* BUTTON_H_ */ + diff --git a/src/search/Save.h b/src/search/Save.h index a3ef485..91a1ec4 100644 --- a/src/search/Save.h +++ b/src/search/Save.h @@ -10,8 +10,6 @@ class Save private: int id; int votesUp, votesDown; - string userName; - string name; public: Save(int _id, int _votesUp, int _votesDown, string _userName, string _name): id(_id), @@ -22,6 +20,9 @@ public: { } + string userName; + string name; + void SetName(string name){ this->name = name; } string GetName(){ return name; } diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index cf13f2e..90750e0 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -8,6 +8,9 @@ SearchController::SearchController() searchModel = new SearchModel(); searchView = new SearchView(); searchModel->AddObserver(searchView); + searchView->AttachController(this); + + searchModel->UpdateSaveList(); //Set up interface //windowPanel.AddChild(); diff --git a/src/search/SearchController.h b/src/search/SearchController.h index 8755a07..10dd9bd 100644 --- a/src/search/SearchController.h +++ b/src/search/SearchController.h @@ -4,15 +4,16 @@ #include "interface/Panel.h" #include "SearchModel.h" #include "SearchView.h" - +class SearchView; +class SearchModel; class SearchController { private: SearchModel * searchModel; SearchView * searchView; - ui::Panel * windowPanel; public: SearchController(); + SearchView * GetView() { return searchView; } }; #endif // SEARCHCONTROLLER_H diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index 63188bd..494d490 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -9,10 +9,24 @@ void SearchModel::UpdateSaveList() { saveList.clear(); notifySaveListChanged(); - saveList.push_back(Save(1, 45, 5, "Simon", "Post logic gates")); + for(int i = 0; i < 16; i++) + { + saveList.push_back(Save(2198, 2333, 315, "dima-gord", "Destroyable city 5 (wth metro)")); + } notifySaveListChanged(); } +vector SearchModel::GetSaveList() +{ + return saveList; +} + +void SearchModel::AddObserver(SearchView * observer) +{ + observers.push_back(observer); + observer->NotifySaveListChanged(this); +} + void SearchModel::notifySaveListChanged() { for(int i = 0; i < observers.size(); i++) diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index 0951577..85d4177 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -7,6 +7,7 @@ using namespace std; +class SearchView; class SearchModel { private: @@ -15,7 +16,7 @@ private: void notifySaveListChanged(); public: SearchModel(); - void AddObserver(SearchView * observer){ observers.push_back(observer); } + void AddObserver(SearchView * observer); void UpdateSaveList(); vector GetSaveList(); }; diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 4b551f3..29d6eef 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -1,10 +1,60 @@ #include "SearchView.h" +#include "interface/SaveButton.h" +#include "Misc.h" -SearchView::SearchView() +SearchView::SearchView(): + ui::Window(ui::Point(0, 0), ui::Point(XRES+BARSIZE, YRES+MENUSIZE)), + saveButtons(vector()) { + nextButton = new ui::Button(ui::Point(XRES+BARSIZE-52, YRES+MENUSIZE-18), ui::Point(50, 16), "Next \x95"); + previousButton = new ui::Button(ui::Point(1, YRES+MENUSIZE-18), ui::Point(50, 16), "\x96 Prev"); + + nextButton->SetAlignment(AlignRight, AlignBottom); + previousButton->SetAlignment(AlignLeft, AlignBottom); + AddComponent(nextButton); + AddComponent(previousButton); } -void SearchView::NotifySaveListChanged(SearchModel * sender) +SearchView::~SearchView() { +} +void SearchView::NotifySaveListChanged(SearchModel * sender) +{ + int i = 0; + int buttonWidth, buttonHeight, saveX = 0, saveY = 0, savesX = 4, savesY = 3, buttonPadding = 2; + int buttonAreaWidth, buttonAreaHeight, buttonXOffset, buttonYOffset; + buttonXOffset = 0; + buttonYOffset = 50; + buttonAreaWidth = Size.X; + buttonAreaHeight = Size.Y - buttonYOffset - 18; + buttonWidth = (buttonAreaWidth/savesX) - buttonPadding*2; + buttonHeight = (buttonAreaHeight/savesY) - buttonPadding*2; + for(i = 0; i < saveButtons.size(); i++) + { + RemoveComponent(saveButtons[i]); + delete saveButtons[i]; + } + vector saves = sender->GetSaveList(); + for(i = 0; i < saves.size(); i++) + { + if(saveX == savesX) + { + if(saveY == savesY-1) + break; + saveX = 0; + saveY++; + } + ui::SaveButton * saveButton; + saveButton = new ui::SaveButton( + ui::Point( + buttonXOffset + buttonPadding + saveX*(buttonWidth+buttonPadding*2), + buttonYOffset + buttonPadding + saveY*(buttonHeight+buttonPadding*2) + ), + ui::Point(buttonWidth, buttonHeight), + saves[i]); + saveButtons.push_back(saveButton); + AddComponent(saveButton); + saveX++; + } } diff --git a/src/search/SearchView.h b/src/search/SearchView.h index e540f21..c68d42c 100644 --- a/src/search/SearchView.h +++ b/src/search/SearchView.h @@ -1,13 +1,28 @@ #ifndef SEARCHVIEW_H #define SEARCHVIEW_H +#include +#include "SearchController.h" +#include "interface/SaveButton.h" +#include "interface/Button.h" + +using namespace std; + class SearchModel; +class SearchController; -class SearchView +class SearchView: public ui::Window { +private: + SearchController * c; + vector saveButtons; + ui::Button * nextButton; + ui::Button * previousButton; public: void NotifySaveListChanged(SearchModel * sender); SearchView(); + virtual ~SearchView(); + void AttachController(SearchController * _c) { c = _c; } }; #endif // SEARCHVIEW_H diff --git a/src/search/Thumbnail.h b/src/search/Thumbnail.h new file mode 100644 index 0000000..3b865ca --- /dev/null +++ b/src/search/Thumbnail.h @@ -0,0 +1,49 @@ +#ifndef THUMBNAIL_H +#define THUMBNAIL_H + +#include "Graphics.h" +#include "interface/Point.h" + +class Thumbnail +{ +public: + Thumbnail(const Thumbnail & thumb): + ID(thumb.ID), + Datestamp(thumb.Datestamp), + Data(thumb.Data), + Size(thumb.Size) + { + //Ensure the actual thumbnail data is copied + if(thumb.Data) + { + Data = (pixel *)malloc((thumb.Size.X*thumb.Size.Y) * PIXELSIZE); + memcpy(Data, thumb.Data, (thumb.Size.X*thumb.Size.Y) * PIXELSIZE); + } + else + { + Data = NULL; + } + } + + Thumbnail(int _id, int _datestamp, pixel * _data, ui::Point _size): + ID(_id), + Datestamp(_datestamp), + Data(_data), + Size(_size) + { + } + + ~Thumbnail() + { + if(Data) + { + free(Data); + } + } + + int ID, Datestamp; + ui::Point Size; + pixel * Data; +}; + +#endif // THUMBNAIL_H diff --git a/src/simulation/Air.cpp b/src/simulation/Air.cpp new file mode 100644 index 0000000..2d8d1b5 --- /dev/null +++ b/src/simulation/Air.cpp @@ -0,0 +1,301 @@ +#include +#include "Config.h" +#include "Air.h" +//#include +//#include +#include "gravity.h" + +/*float kernel[9]; + +float vx[YRES/CELL][XRES/CELL], ovx[YRES/CELL][XRES/CELL]; +float vy[YRES/CELL][XRES/CELL], ovy[YRES/CELL][XRES/CELL]; +float pv[YRES/CELL][XRES/CELL], opv[YRES/CELL][XRES/CELL]; +unsigned char bmap_blockair[YRES/CELL][XRES/CELL]; + +float cb_vx[YRES/CELL][XRES/CELL]; +float cb_vy[YRES/CELL][XRES/CELL]; +float cb_pv[YRES/CELL][XRES/CELL]; +float cb_hv[YRES/CELL][XRES/CELL]; + +float fvx[YRES/CELL][XRES/CELL], fvy[YRES/CELL][XRES/CELL]; + +float hv[YRES/CELL][XRES/CELL], ohv[YRES/CELL][XRES/CELL]; // For Ambient Heat */ + +void Air::make_kernel(void) //used for velocity +{ + int i, j; + float s = 0.0f; + for (j=-1; j<2; j++) + for (i=-1; i<2; i++) + { + kernel[(i+1)+3*(j+1)] = expf(-2.0f*(i*i+j*j)); + s += kernel[(i+1)+3*(j+1)]; + } + s = 1.0f / s; + for (j=-1; j<2; j++) + for (i=-1; i<2; i++) + kernel[(i+1)+3*(j+1)] *= s; +} +void Air::update_airh(void) +{ + int x, y, i, j; + float dh, dx, dy, f, tx, ty; + for (i=0; i0 && y+j0 && x+i=2 && i=2 && j0) + vy[y][x] -= airdiff/5000.0f; + } + ohv[y][x] = dh; + } + } + memcpy(hv, ohv, sizeof(hv)); +} + +void Air::update_air(void) +{ + int x, y, i, j; + float dp, dx, dy, f, tx, ty; + + for (y=0; y0 && y+j0 && x+i=2 && i=2 && j 256.0f) dp = 256.0f; + if (dp < -256.0f) dp = -256.0f; + if (dx > 256.0f) dx = 256.0f; + if (dx < -256.0f) dx = -256.0f; + if (dy > 256.0f) dy = 256.0f; + if (dy < -256.0f) dy = -256.0f; + + + switch (airMode) + { + default: + case 0: //Default + break; + case 1: //0 Pressure + dp = 0.0f; + break; + case 2: //0 Velocity + dx = 0.0f; + dy = 0.0f; + break; + case 3: //0 Air + dx = 0.0f; + dy = 0.0f; + dp = 0.0f; + break; + case 4: //No Update + break; + } + + ovx[y][x] = dx; + ovy[y][x] = dy; + opv[y][x] = dp; + } + memcpy(vx, ovx, sizeof(vx)); + memcpy(vy, ovy, sizeof(vy)); + memcpy(pv, opv, sizeof(pv)); + } +} +Air::Air() +{ + //Simulation should do this. + make_kernel(); +} diff --git a/src/simulation/Air.h b/src/simulation/Air.h new file mode 100644 index 0000000..8e4dc25 --- /dev/null +++ b/src/simulation/Air.h @@ -0,0 +1,33 @@ +#ifndef AIR_H +#define AIR_H +#include "Config.h" + +class Simulation; + +class Air +{ +public: + int airMode; + //Arrays from the simulation + unsigned char (*bmap)[XRES/CELL]; + unsigned char (*emap)[XRES/CELL]; + float (*fvx)[XRES/CELL]; + float (*fvy)[XRES/CELL]; + // + float vx[YRES/CELL][XRES/CELL]; + float ovx[YRES/CELL][XRES/CELL]; + float vy[YRES/CELL][XRES/CELL]; + float ovy[YRES/CELL][XRES/CELL]; + float pv[YRES/CELL][XRES/CELL]; + float opv[YRES/CELL][XRES/CELL]; + float hv[YRES/CELL][XRES/CELL]; + float ohv[YRES/CELL][XRES/CELL]; // Ambient Heat + unsigned char bmap_blockair[YRES/CELL][XRES/CELL]; + float kernel[9]; + void make_kernel(void); + void update_airh(void); + void update_air(void); + Air(); +}; + +#endif diff --git a/src/simulation/Element.h b/src/simulation/Element.h new file mode 100644 index 0000000..449bf51 --- /dev/null +++ b/src/simulation/Element.h @@ -0,0 +1,14 @@ +#ifndef ELEMENT_H +#define ELEMENT_H +// This header should be included by all files in src/elements/ + +#include +#include "Simulation.h" +#include "Renderer.h" +#include "ElementFunctions.h" +//#include "powder.h" +#include "Gravity.h" +#include "Misc.h" +#include "ElementGraphics.h" + +#endif diff --git a/src/simulation/ElementFunctions.h b/src/simulation/ElementFunctions.h new file mode 100644 index 0000000..ef80b6f --- /dev/null +++ b/src/simulation/ElementFunctions.h @@ -0,0 +1,168 @@ +/* + * ElementFunctions.h + * + * Created on: Jan 5, 2012 + * Author: Simon + */ + +#ifndef ELEMENTFUNCTIONS_H_ +#define ELEMENTFUNCTIONS_H_ +#include "Elements.h" + +int update_ACID(UPDATE_FUNC_ARGS); +int update_ANAR(UPDATE_FUNC_ARGS); +int update_AMTR(UPDATE_FUNC_ARGS); +int update_ARAY(UPDATE_FUNC_ARGS); +int update_BCLN(UPDATE_FUNC_ARGS); +int update_BCOL(UPDATE_FUNC_ARGS); +int update_BMTL(UPDATE_FUNC_ARGS); +int update_BRMT(UPDATE_FUNC_ARGS); +int update_BOMB(UPDATE_FUNC_ARGS); +int update_BOYL(UPDATE_FUNC_ARGS); +int update_BTRY(UPDATE_FUNC_ARGS); +int update_C5(UPDATE_FUNC_ARGS); +int update_CLNE(UPDATE_FUNC_ARGS); +int update_COAL(UPDATE_FUNC_ARGS); +int update_DEUT(UPDATE_FUNC_ARGS); +int update_DSTW(UPDATE_FUNC_ARGS); +int update_FOG(UPDATE_FUNC_ARGS); +int update_FRZW(UPDATE_FUNC_ARGS); +int update_FRZZ(UPDATE_FUNC_ARGS); +int update_FSEP(UPDATE_FUNC_ARGS); +int update_FUSE(UPDATE_FUNC_ARGS); +int update_FIRW(UPDATE_FUNC_ARGS); +int update_FWRK(UPDATE_FUNC_ARGS); +int update_GLAS(UPDATE_FUNC_ARGS); +int update_GLOW(UPDATE_FUNC_ARGS); +int update_GOO(UPDATE_FUNC_ARGS); +int update_HSWC(UPDATE_FUNC_ARGS); +int update_IRON(UPDATE_FUNC_ARGS); +int update_ICEI(UPDATE_FUNC_ARGS); +int update_ISZ(UPDATE_FUNC_ARGS); +int update_LCRY(UPDATE_FUNC_ARGS); +int update_MORT(UPDATE_FUNC_ARGS); +int update_NEUT(UPDATE_FUNC_ARGS); +int update_NPTCT(UPDATE_FUNC_ARGS); +int update_PCLN(UPDATE_FUNC_ARGS); +int update_PHOT(UPDATE_FUNC_ARGS); +int update_PIPE(UPDATE_FUNC_ARGS); +int update_PLNT(UPDATE_FUNC_ARGS); +int update_PLUT(UPDATE_FUNC_ARGS); +int update_PRTI(UPDATE_FUNC_ARGS); +int update_PRTO(UPDATE_FUNC_ARGS); +int update_PYRO(UPDATE_FUNC_ARGS); +int update_PUMP(UPDATE_FUNC_ARGS); +int update_QRTZ(UPDATE_FUNC_ARGS); +int update_RIME(UPDATE_FUNC_ARGS); +int update_SHLD1(UPDATE_FUNC_ARGS); +int update_SHLD2(UPDATE_FUNC_ARGS); +int update_SHLD3(UPDATE_FUNC_ARGS); +int update_SHLD4(UPDATE_FUNC_ARGS); +int update_SING(UPDATE_FUNC_ARGS); +int update_SLTW(UPDATE_FUNC_ARGS); +int update_SPAWN(UPDATE_FUNC_ARGS); +int update_SPAWN2(UPDATE_FUNC_ARGS); +int update_SPNG(UPDATE_FUNC_ARGS); +int update_SPRK(UPDATE_FUNC_ARGS); +int update_STKM(UPDATE_FUNC_ARGS); +int update_STKM2(UPDATE_FUNC_ARGS); +int update_SWCH(UPDATE_FUNC_ARGS); +int update_THDR(UPDATE_FUNC_ARGS); +int update_THRM(UPDATE_FUNC_ARGS); +int update_URAN(UPDATE_FUNC_ARGS); +int update_VINE(UPDATE_FUNC_ARGS); +int update_WARP(UPDATE_FUNC_ARGS); +int update_WATR(UPDATE_FUNC_ARGS); +int update_WIFI(UPDATE_FUNC_ARGS); +int update_WTRV(UPDATE_FUNC_ARGS); +int update_YEST(UPDATE_FUNC_ARGS); +int update_SOAP(UPDATE_FUNC_ARGS); +int update_O2(UPDATE_FUNC_ARGS); +int update_H2(UPDATE_FUNC_ARGS); +int update_NBHL(UPDATE_FUNC_ARGS); +int update_NWHL(UPDATE_FUNC_ARGS); +int update_MERC(UPDATE_FUNC_ARGS); +int update_PBCN(UPDATE_FUNC_ARGS); +int update_GPMP(UPDATE_FUNC_ARGS); +int update_CLST(UPDATE_FUNC_ARGS); +int update_DLAY(UPDATE_FUNC_ARGS); +int update_WIRE(UPDATE_FUNC_ARGS); +int update_GBMB(UPDATE_FUNC_ARGS); +int update_CO2(UPDATE_FUNC_ARGS); +int update_CBNW(UPDATE_FUNC_ARGS); +int update_STOR(UPDATE_FUNC_ARGS); +int update_BIZR(UPDATE_FUNC_ARGS); +int update_PVOD(UPDATE_FUNC_ARGS); +int update_CONV(UPDATE_FUNC_ARGS); +int update_CAUS(UPDATE_FUNC_ARGS); +int update_DEST(UPDATE_FUNC_ARGS); +int update_EMP(UPDATE_FUNC_ARGS); +int update_LIGH(UPDATE_FUNC_ARGS); +int update_FIGH(UPDATE_FUNC_ARGS); +int update_ELEC(UPDATE_FUNC_ARGS); +int update_ACEL(UPDATE_FUNC_ARGS); +int update_DCEL(UPDATE_FUNC_ARGS); +int update_BANG(UPDATE_FUNC_ARGS); +int update_IGNT(UPDATE_FUNC_ARGS); +int update_MISC(UPDATE_FUNC_ARGS); +int update_legacy_PYRO(UPDATE_FUNC_ARGS); +int update_legacy_all(UPDATE_FUNC_ARGS); +int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS); +void STKM_init_legs(Simulation * sim, playerst* playerp, int i); +void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y); + + +int graphics_FIRE(GRAPHICS_FUNC_ARGS); +int graphics_SMKE(GRAPHICS_FUNC_ARGS); +int graphics_PLSM(GRAPHICS_FUNC_ARGS); +int graphics_DEUT(GRAPHICS_FUNC_ARGS); +int graphics_PHOT(GRAPHICS_FUNC_ARGS); +int graphics_NEUT(GRAPHICS_FUNC_ARGS); +int graphics_LAVA(GRAPHICS_FUNC_ARGS); +int graphics_SPRK(GRAPHICS_FUNC_ARGS); +int graphics_QRTZ(GRAPHICS_FUNC_ARGS); +int graphics_CLST(GRAPHICS_FUNC_ARGS); +int graphics_CBNW(GRAPHICS_FUNC_ARGS); +int graphics_SPNG(GRAPHICS_FUNC_ARGS); +int graphics_LIFE(GRAPHICS_FUNC_ARGS); +int graphics_DUST(GRAPHICS_FUNC_ARGS); +int graphics_GRAV(GRAPHICS_FUNC_ARGS); +int graphics_WIFI(GRAPHICS_FUNC_ARGS); +int graphics_PRTI(GRAPHICS_FUNC_ARGS); +int graphics_PRTO(GRAPHICS_FUNC_ARGS); +int graphics_BIZR(GRAPHICS_FUNC_ARGS); +int graphics_PIPE(GRAPHICS_FUNC_ARGS); +int graphics_INVS(GRAPHICS_FUNC_ARGS); +int graphics_ACID(GRAPHICS_FUNC_ARGS); +int graphics_FILT(GRAPHICS_FUNC_ARGS); +int graphics_BRAY(GRAPHICS_FUNC_ARGS); +int graphics_SWCH(GRAPHICS_FUNC_ARGS); +int graphics_THDR(GRAPHICS_FUNC_ARGS); +int graphics_GLOW(GRAPHICS_FUNC_ARGS); +int graphics_LCRY(GRAPHICS_FUNC_ARGS); +int graphics_PCLN(GRAPHICS_FUNC_ARGS); +int graphics_PBCN(GRAPHICS_FUNC_ARGS); +int graphics_DLAY(GRAPHICS_FUNC_ARGS); +int graphics_HSWC(GRAPHICS_FUNC_ARGS); +int graphics_PVOD(GRAPHICS_FUNC_ARGS); +int graphics_STOR(GRAPHICS_FUNC_ARGS); +int graphics_PUMP(GRAPHICS_FUNC_ARGS); +int graphics_GPMP(GRAPHICS_FUNC_ARGS); +int graphics_HFLM(GRAPHICS_FUNC_ARGS); +int graphics_FIRW(GRAPHICS_FUNC_ARGS); +int graphics_BOMB(GRAPHICS_FUNC_ARGS); +int graphics_GBMB(GRAPHICS_FUNC_ARGS); +int graphics_COAL(GRAPHICS_FUNC_ARGS); +int graphics_STKM(GRAPHICS_FUNC_ARGS); +int graphics_STKM2(GRAPHICS_FUNC_ARGS); +int graphics_DEST(GRAPHICS_FUNC_ARGS); +int graphics_EMP(GRAPHICS_FUNC_ARGS); +int graphics_LIGH(GRAPHICS_FUNC_ARGS); +int graphics_FIGH(GRAPHICS_FUNC_ARGS); +int graphics_ELEC(GRAPHICS_FUNC_ARGS); +int graphics_WIRE(GRAPHICS_FUNC_ARGS); +int graphics_ACEL(GRAPHICS_FUNC_ARGS); +int graphics_DCEL(GRAPHICS_FUNC_ARGS); +int graphics_DEFAULT(GRAPHICS_FUNC_ARGS); + +#endif /* ELEMENTFUNCTIONS_H_ */ diff --git a/src/simulation/ElementGraphics.h b/src/simulation/ElementGraphics.h new file mode 100644 index 0000000..a880e71 --- /dev/null +++ b/src/simulation/ElementGraphics.h @@ -0,0 +1,52 @@ +#ifndef PGRAPHICS_H +#define PGRAPHICS_H + +#define PMODE 0x00000FFF +#define PMODE_NONE 0x00000000 +#define PMODE_FLAT 0x00000001 +#define PMODE_BLOB 0x00000002 +#define PMODE_BLUR 0x00000004 +#define PMODE_GLOW 0x00000008 +#define PMODE_SPARK 0x00000010 +#define PMODE_FLARE 0x00000020 +#define PMODE_LFLARE 0x00000040 +#define PMODE_ADD 0x00000080 +#define PMODE_BLEND 0x00000100 +#define PSPEC_STICKMAN 0x00000200 + +#define OPTIONS 0x0000F000 +#define NO_DECO 0x00001000 +#define DECO_FIRE 0x00002000 + +#define FIREMODE 0x00FF0000 +#define FIRE_ADD 0x00010000 +#define FIRE_BLEND 0x00020000 + +#define EFFECT 0xFF000000 +#define EFFECT_GRAVIN 0x01000000 +#define EFFECT_GRAVOUT 0x02000000 + +#define RENDER_EFFE OPTIONS | PSPEC_STICKMAN | EFFECT | PMODE_SPARK | PMODE_FLARE | PMODE_LFLARE +#define RENDER_FIRE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND | FIREMODE +#define RENDER_GLOW OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_GLOW | PMODE_ADD | PMODE_BLEND +#define RENDER_BLUR OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLUR | PMODE_ADD | PMODE_BLEND +#define RENDER_BLOB OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLOB | PMODE_ADD | PMODE_BLEND +#define RENDER_BASC OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND +#define RENDER_NONE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT + +#define COLOUR_HEAT 0x00000001 +#define COLOUR_LIFE 0x00000002 +#define COLOUR_GRAD 0x00000004 + +#define COLOUR_DEFAULT 0x00000000 + +#define DISPLAY_AIRC 0x00000001 +#define DISPLAY_AIRP 0x00000002 +#define DISPLAY_AIRV 0x00000004 +#define DISPLAY_AIRH 0x00000008 +#define DISPLAY_AIR 0x0000000F +#define DISPLAY_WARP 0x00000010 +#define DISPLAY_PERS 0x00000020 +#define DISPLAY_EFFE 0x00000040 + +#endif diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h new file mode 100644 index 0000000..204460c --- /dev/null +++ b/src/simulation/Elements.h @@ -0,0 +1,280 @@ +/* + * Elements.h + * + * Created on: Jan 5, 2012 + * Author: Simon + */ + +//#ifndef ELEMENTS_H_ +//#define ELEMENTS_H_ + +//#include "Config.h" +//#include "Simulation.h" + +#define IPL -257.0f +#define IPH 257.0f +#define ITL MIN_TEMP-1 +#define ITH MAX_TEMP+1 +// no transition (PT_NONE means kill part) +#define NT -1 +// special transition - lava ctypes etc need extra code, which is only found and run if ST is given +#define ST PT_NUM + +#define R_TEMP 22 +#define MAX_TEMP 9999 +#define MIN_TEMP 0 +#define O_MAX_TEMP 3500 +#define O_MIN_TEMP -273 + +#define TYPE_PART 0x00001 //1 Powders +#define TYPE_LIQUID 0x00002 //2 Liquids +#define TYPE_SOLID 0x00004 //4 Solids +#define TYPE_GAS 0x00008 //8 Gasses (Includes plasma) +#define TYPE_ENERGY 0x00010 //16 Energy (Thunder, Light, Neutrons etc.) +#define PROP_CONDUCTS 0x00020 //32 Conducts electricity +#define PROP_BLACK 0x00040 //64 Absorbs Photons (not currently implemented or used, a photwl attribute might be better) +#define PROP_NEUTPENETRATE 0x00080 //128 Penetrated by neutrons +#define PROP_NEUTABSORB 0x00100 //256 Absorbs neutrons, reflect is default (not currently implemented or used) +#define PROP_NEUTPASS 0x00200 //512 Neutrons pass through, such as with glass +#define PROP_DEADLY 0x00400 //1024 Is deadly for stickman (not currently implemented or used) +#define PROP_HOT_GLOW 0x00800 //2048 Hot Metal Glow +#define PROP_LIFE 0x01000 //4096 Is a GoL type +#define PROP_RADIOACTIVE 0x02000 //8192 Radioactive +#define PROP_LIFE_DEC 0x04000 //2^14 Life decreases by one every frame if > zero +#define PROP_LIFE_KILL 0x08000 //2^15 Kill when life value is <= zero +#define PROP_LIFE_KILL_DEC 0x10000 //2^16 Kill when life value is decremented to <= zero +#define PROP_SPARKSETTLE 0x20000 //2^17 Allow Sparks/Embers to settle + +#define FLAG_STAGNANT 1 + +#define ST_NONE 0 +#define ST_SOLID 1 +#define ST_LIQUID 2 +#define ST_GAS 3 + +#define UPDATE_FUNC_ARGS Simulation* sim, int i, int x, int y, int surround_space, int nt, Particle *parts, int pmap[YRES][XRES] +// to call another update function with same arguments: +#define UPDATE_FUNC_SUBCALL_ARGS sim, i, x, y, surround_space, nt, parts, pmap + +#define GRAPHICS_FUNC_ARGS Renderer * ren, Particle *cpart, int nx, int ny, int *pixel_mode, int* cola, int *colr, int *colg, int *colb, int *firea, int *firer, int *fireg, int *fireb +#define GRAPHICS_FUNC_SUBCALL_ARGS ren, cpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb + +#define UI_WALLSTART 222 +#define UI_ACTUALSTART 122 +#define UI_WALLCOUNT 25 + +#define WL_WALLELEC 122 +#define WL_EWALL 123 +#define WL_DETECT 124 +#define WL_STREAM 125 +#define WL_SIGN 126 +#define WL_FAN 127 +#define WL_FANHELPER 255 +#define WL_ALLOWLIQUID 128 +#define WL_DESTROYALL 129 +#define WL_ERASE 130 +#define WL_WALL 131 +#define WL_ALLOWAIR 132 +#define WL_ALLOWSOLID 133 +#define WL_ALLOWALLELEC 134 +#define WL_EHOLE 135 + +#define SPC_AIR 236 +#define SPC_HEAT 237 +#define SPC_COOL 238 +#define SPC_VACUUM 239 +#define SPC_WIND 241 +#define SPC_PGRV 243 +#define SPC_NGRV 244 +#define SPC_PROP 246 + +#define WL_ALLOWGAS 140 +#define WL_GRAV 142 +#define WL_ALLOWENERGY 145 + +#define NGT_GOL 0 +#define NGT_HLIF 1 +#define NGT_ASIM 2 +#define NGT_2x2 3 +#define NGT_DANI 4 +#define NGT_AMOE 5 +#define NGT_MOVE 6 +#define NGT_PGOL 7 +#define NGT_DMOE 8 +#define NGT_34 9 +#define NGT_LLIF 10 +#define NGT_STAN 11 +#define NGT_SEED 12 +#define NGT_MAZE 13 +#define NGT_COAG 14 +#define NGT_WALL 15 +#define NGT_GNAR 16 +#define NGT_REPL 17 +#define NGT_MYST 18 +#define NGT_LOTE 19 +#define NGT_FRG2 20 +#define NGT_STAR 21 +#define NGT_FROG 22 +#define NGT_BRAN 23 + +#define PT_NONE 0 +#define PT_DUST 1 +#define PT_WATR 2 +#define PT_OIL 3 +#define PT_FIRE 4 +#define PT_STNE 5 +#define PT_LAVA 6 +#define PT_GUNP 7 +#define PT_NITR 8 +#define PT_CLNE 9 +#define PT_GAS 10 +#define PT_PLEX 11 +#define PT_GOO 12 +#define PT_ICEI 13 +#define PT_METL 14 +#define PT_SPRK 15 +#define PT_SNOW 16 +#define PT_WOOD 17 +#define PT_NEUT 18 +#define PT_PLUT 19 +#define PT_PLNT 20 +#define PT_ACID 21 +#define PT_VOID 22 +#define PT_WTRV 23 +#define PT_CNCT 24 +#define PT_DSTW 25 +#define PT_SALT 26 +#define PT_SLTW 27 +#define PT_DMND 28 +#define PT_BMTL 29 +#define PT_BRMT 30 +#define PT_PHOT 31 +#define PT_URAN 32 +#define PT_WAX 33 +#define PT_MWAX 34 +#define PT_PSCN 35 +#define PT_NSCN 36 +#define PT_LNTG 37 +#define PT_INSL 38 +#define PT_BHOL 39 +#define PT_WHOL 40 +#define PT_RBDM 41 +#define PT_LRBD 42 +#define PT_NTCT 43 +#define PT_SAND 44 +#define PT_GLAS 45 +#define PT_PTCT 46 +#define PT_BGLA 47 +#define PT_THDR 48 +#define PT_PLSM 49 +#define PT_ETRD 50 +#define PT_NICE 51 +#define PT_NBLE 52 +#define PT_BTRY 53 +#define PT_LCRY 54 +#define PT_STKM 55 +#define PT_SWCH 56 +#define PT_SMKE 57 +#define PT_DESL 58 +#define PT_COAL 59 +#define PT_LO2 60 +#define PT_O2 61 +#define PT_INWR 62 +#define PT_YEST 63 +#define PT_DYST 64 +#define PT_THRM 65 +#define PT_GLOW 66 +#define PT_BRCK 67 +#define PT_HFLM 68 +#define PT_FIRW 69 +#define PT_FUSE 70 +#define PT_FSEP 71 +#define PT_AMTR 72 +#define PT_BCOL 73 +#define PT_PCLN 74 +#define PT_HSWC 75 +#define PT_IRON 76 +#define PT_MORT 77 +#define PT_LIFE 78 +#define PT_DLAY 79 +#define PT_CO2 80 +#define PT_DRIC 81 +#define PT_CBNW 82 +#define PT_STOR 83 +#define PT_PVOD 84 +#define PT_CONV 85 +#define PT_CAUS 86 + +#define PT_LIGH 87 +#define PT_TESC 88 +#define PT_DEST 89 + +#define PT_SPNG 90 +#define PT_RIME 91 +#define PT_FOG 92 +#define PT_BCLN 93 +#define PT_LOVE 94 +#define PT_DEUT 95 +#define PT_WARP 96 +#define PT_PUMP 97 +#define PT_FWRK 98 +#define PT_PIPE 99 +#define PT_FRZZ 100 +#define PT_FRZW 101 +#define PT_GRAV 102 +#define PT_BIZR 103 +#define PT_BIZRG 104 +#define PT_BIZRS 105 +#define PT_INST 106 +#define PT_ISOZ 107 +#define PT_ISZS 108 +#define PT_PRTI 109 +#define PT_PRTO 110 +#define PT_PSTE 111 +#define PT_PSTS 112 +#define PT_ANAR 113 +#define PT_VINE 114 +#define PT_INVIS 115 +#define PT_EQUALVEL 116 //all particles equal their velocities +#define PT_SPAWN2 117 +#define PT_SPAWN 118 +#define PT_SHLD1 119 +#define PT_SHLD2 120 +#define PT_SHLD3 121 +#define PT_SHLD4 122 +#define PT_LOLZ 123 +#define PT_WIFI 124 +#define PT_FILT 125 +#define PT_ARAY 126 +#define PT_BRAY 127 +#define PT_STKM2 128 +#define PT_BOMB 129 +#define PT_C5 130 +#define PT_SING 131 +#define PT_QRTZ 132 +#define PT_PQRT 133 +#define PT_EMP 134 +#define PT_BREC 135 +#define PT_ELEC 136 +#define PT_ACEL 137 +#define PT_DCEL 138 +#define PT_BANG 139 +#define PT_IGNT 140 +#define PT_BOYL 141 + +#define OLD_PT_WIND 147 +#define PT_H2 148 +#define PT_SOAP 149 +#define PT_NBHL 150 +#define PT_NWHL 151 +#define PT_MERC 152 +#define PT_PBCN 153 +#define PT_GPMP 154 +#define PT_CLST 155 +#define PT_WIRE 156 +#define PT_GBMB 157 +#define PT_FIGH 158 +#define PT_NUM 159 + + +//#endif /* ELEMENTS_H_ */ diff --git a/src/simulation/Gravity.cpp b/src/simulation/Gravity.cpp new file mode 100644 index 0000000..cc20b2f --- /dev/null +++ b/src/simulation/Gravity.cpp @@ -0,0 +1,488 @@ +#include +#include +#include +#include "Config.h" +#include "Gravity.h" +//#include "powder.h" + +#ifdef GRAVFFT +#include +#endif + +void Gravity::bilinear_interpolation(float *src, float *dst, int sw, int sh, int rw, int rh) +{ + int y, x, fxceil, fyceil; + float fx, fy, fyc, fxc; + double intp; + float tr, tl, br, bl; + //Bilinear interpolation for upscaling + for (y=0; y=sw) fxceil = sw-1; + if (fyceil>=sh) fyceil = sh-1; + tr = src[sw*(int)floor(fy)+fxceil]; + tl = src[sw*(int)floor(fy)+(int)floor(fx)]; + br = src[sw*fyceil+fxceil]; + bl = src[sw*fyceil+(int)floor(fx)]; + dst[rw*y+x] = ((tl*(1.0f-fxc))+(tr*(fxc)))*(1.0f-fyc) + ((bl*(1.0f-fxc))+(br*(fxc)))*(fyc); + } +} + +void Gravity::gravity_init() +{ + //Allocate full size Gravmaps + th_ogravmap = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + th_gravmap = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + th_gravy = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + th_gravx = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + th_gravp = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + gravmap = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + gravy = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + gravx = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + gravp = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); + gravmask = (unsigned int *)calloc((XRES/CELL)*(YRES/CELL), sizeof(unsigned)); +} + +void Gravity::gravity_cleanup() +{ +#ifdef GRAVFFT + grav_fft_cleanup(); +#endif +} + +void Gravity::gravity_update_async() +{ + int result; + if(ngrav_enable) + { + pthread_mutex_lock(&gravmutex); + result = grav_ready; + if(result) //Did the gravity thread finish? + { + //if (!sys_pause||framerender){ //Only update if not paused + //Switch the full size gravmaps, we don't really need the two above any more + float *tmpf; + + if(th_gravchanged) + { + #if !defined(GRAVFFT) && defined(GRAV_DIFF) + memcpy(gravy, th_gravy, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memcpy(gravx, th_gravx, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memcpy(gravp, th_gravp, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + #else + tmpf = gravy; + gravy = th_gravy; + th_gravy = tmpf; + + tmpf = gravx; + gravx = th_gravx; + th_gravx = tmpf; + + tmpf = gravp; + gravp = th_gravp; + th_gravp = tmpf; + #endif + } + + tmpf = gravmap; + gravmap = th_gravmap; + th_gravmap = tmpf; + + grav_ready = 0; //Tell the other thread that we're ready for it to continue + pthread_cond_signal(&gravcv); + //} + } + pthread_mutex_unlock(&gravmutex); + //Apply the gravity mask + membwand(gravy, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned)); + membwand(gravx, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned)); + memset(gravmap, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + } +} + +void *Gravity::update_grav_async_helper(void * context) +{ + ((Gravity *)context)->update_grav_async(); +} + +void Gravity::update_grav_async() +{ + int done = 0; + int thread_done = 0; + memset(th_ogravmap, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(th_gravmap, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(th_gravy, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(th_gravx, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(th_gravp, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + //memset(th_gravy, 0, XRES*YRES*sizeof(float)); + //memset(th_gravx, 0, XRES*YRES*sizeof(float)); + //memset(th_gravp, 0, XRES*YRES*sizeof(float)); +#ifdef GRAVFFT + grav_fft_init(); +#endif + while(!thread_done){ + if(!done){ + update_grav(); + done = 1; + pthread_mutex_lock(&gravmutex); + + grav_ready = done; + thread_done = gravthread_done; + + pthread_mutex_unlock(&gravmutex); + } else { + pthread_mutex_lock(&gravmutex); + pthread_cond_wait(&gravcv, &gravmutex); + + done = grav_ready; + thread_done = gravthread_done; + + pthread_mutex_unlock(&gravmutex); + } + } + pthread_exit(NULL); +} + +void Gravity::start_grav_async() +{ + if(!ngrav_enable){ + gravthread_done = 0; + grav_ready = 0; + pthread_mutex_init (&gravmutex, NULL); + pthread_cond_init(&gravcv, NULL); + pthread_create(&gravthread, NULL, &Gravity::update_grav_async_helper, this); //Start asynchronous gravity simulation + ngrav_enable = 1; + } + memset(gravy, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(gravx, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(gravp, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); +} + +void Gravity::stop_grav_async() +{ + if(ngrav_enable){ + pthread_mutex_lock(&gravmutex); + gravthread_done = 1; + pthread_cond_signal(&gravcv); + pthread_mutex_unlock(&gravmutex); + pthread_join(gravthread, NULL); + pthread_mutex_destroy(&gravmutex); //Destroy the mutex + ngrav_enable = 0; + } + //Clear the grav velocities + memset(gravy, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(gravx, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); + memset(gravp, 0, (XRES/CELL)*(YRES/CELL)*sizeof(float)); +} + +#ifdef GRAVFFT +int grav_fft_status = 0; +float *th_ptgravx, *th_ptgravy, *th_gravmapbig, *th_gravxbig, *th_gravybig; +fftwf_complex *th_ptgravxt, *th_ptgravyt, *th_gravmapbigt, *th_gravxbigt, *th_gravybigt; +fftwf_plan plan_gravmap, plan_gravx_inverse, plan_gravy_inverse; + +void Gravity::grav_fft_init() +{ + int xblock2 = XRES/CELL*2; + int yblock2 = YRES/CELL*2; + int x, y, fft_tsize = (xblock2/2+1)*yblock2; + float distance, scaleFactor; + fftwf_plan plan_ptgravx, plan_ptgravy; + if (grav_fft_status) return; + + //use fftw malloc function to ensure arrays are aligned, to get better performance + th_ptgravx = fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_ptgravy = fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_ptgravxt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_ptgravyt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_gravmapbig = fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_gravmapbigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_gravxbig = fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_gravybig = fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_gravxbigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_gravybigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + + //select best algorithm, could use FFTW_PATIENT or FFTW_EXHAUSTIVE but that increases the time taken to plan, and I don't see much increase in execution speed + plan_ptgravx = fftwf_plan_dft_r2c_2d(yblock2, xblock2, th_ptgravx, th_ptgravxt, FFTW_MEASURE); + plan_ptgravy = fftwf_plan_dft_r2c_2d(yblock2, xblock2, th_ptgravy, th_ptgravyt, FFTW_MEASURE); + plan_gravmap = fftwf_plan_dft_r2c_2d(yblock2, xblock2, th_gravmapbig, th_gravmapbigt, FFTW_MEASURE); + plan_gravx_inverse = fftwf_plan_dft_c2r_2d(yblock2, xblock2, th_gravxbigt, th_gravxbig, FFTW_MEASURE); + plan_gravy_inverse = fftwf_plan_dft_c2r_2d(yblock2, xblock2, th_gravybigt, th_gravybig, FFTW_MEASURE); + + //(XRES/CELL)*(YRES/CELL)*4 is size of data array, scaling needed because FFTW calculates an unnormalized DFT + scaleFactor = -M_GRAV/((XRES/CELL)*(YRES/CELL)*4); + //calculate velocity map caused by a point mass + for (y=0; y 0.0001f || th_gravmap[i*(XRES/CELL)+j]<-0.0001f) //Only calculate with populated or changed cells. + { +#endif + for (y = 0; y < YRES / CELL; y++) { + for (x = 0; x < XRES / CELL; x++) { + if (x == j && y == i)//Ensure it doesn't calculate with itself + continue; + distance = sqrt(pow(j - x, 2) + pow(i - y, 2)); +#ifdef GRAV_DIFF + val = th_gravmap[i*(XRES/CELL)+j] - th_ogravmap[i*(XRES/CELL)+j]; +#else + val = th_gravmap[i*(XRES/CELL)+j]; +#endif + th_gravx[y*(XRES/CELL)+x] += M_GRAV * val * (j - x) / pow(distance, 3); + th_gravy[y*(XRES/CELL)+x] += M_GRAV * val * (i - y) / pow(distance, 3); + th_gravp[y*(XRES/CELL)+x] += M_GRAV * val / pow(distance, 2); + } + } + } + } + } +fin: + memcpy(th_ogravmap, th_gravmap, (XRES/CELL)*(YRES/CELL)*sizeof(float)); +} +#endif + + + +void Gravity::grav_mask_r(int x, int y, char checkmap[YRES/CELL][XRES/CELL], char shape[YRES/CELL][XRES/CELL], char *shapeout) +{ + if(x < 0 || x >= XRES/CELL || y < 0 || y >= YRES/CELL) + return; + if(x == 0 || y ==0 || y == (YRES/CELL)-1 || x == (XRES/CELL)-1) + *shapeout = 1; + checkmap[y][x] = 1; + shape[y][x] = 1; + if(x-1 >= 0 && !checkmap[y][x-1] && bmap[y][x-1]!=WL_GRAV) + grav_mask_r(x-1, y, checkmap, shape, shapeout); + if(y-1 >= 0 && !checkmap[y-1][x] && bmap[y-1][x]!=WL_GRAV) + grav_mask_r(x, y-1, checkmap, shape, shapeout); + if(x+1 < XRES/CELL && !checkmap[y][x+1] && bmap[y][x+1]!=WL_GRAV) + grav_mask_r(x+1, y, checkmap, shape, shapeout); + if(y+1 < YRES/CELL && !checkmap[y+1][x] && bmap[y+1][x]!=WL_GRAV) + grav_mask_r(x, y+1, checkmap, shape, shapeout); + return; +} +void Gravity::mask_free(mask_el *c_mask_el){ + if(c_mask_el==NULL) + return; + if(c_mask_el->next!=NULL) + mask_free((mask_el*)c_mask_el->next); + free(c_mask_el->shape); + free(c_mask_el); +} +void Gravity::gravity_mask() +{ + char checkmap[YRES/CELL][XRES/CELL]; + int x = 0, y = 0, i, j; + unsigned maskvalue; + mask_el *t_mask_el = NULL; + mask_el *c_mask_el = NULL; + if(!gravmask) + return; + memset(checkmap, 0, sizeof(checkmap)); + for(x = 0; x < XRES/CELL; x++) + { + for(y = 0; y < YRES/CELL; y++) + { + if(bmap[y][x]!=WL_GRAV && checkmap[y][x] == 0) + { + //Create a new shape + if(t_mask_el==NULL){ + t_mask_el = (mask_el *)malloc(sizeof(mask_el)); + t_mask_el->shape = (char *)malloc((XRES/CELL)*(YRES/CELL)); + memset(t_mask_el->shape, 0, (XRES/CELL)*(YRES/CELL)); + t_mask_el->shapeout = 0; + t_mask_el->next = NULL; + c_mask_el = t_mask_el; + } else { + c_mask_el->next = (mask_el *)malloc(sizeof(mask_el)); + c_mask_el = (mask_el *)c_mask_el->next; + c_mask_el->shape = (char *)malloc((XRES/CELL)*(YRES/CELL)); + memset(c_mask_el->shape, 0, (XRES/CELL)*(YRES/CELL)); + c_mask_el->shapeout = 0; + c_mask_el->next = NULL; + } + //Fill the shape + grav_mask_r(x, y, (char (*)[XRES/CELL])checkmap, (char (*)[XRES/CELL])c_mask_el->shape, (char*)&c_mask_el->shapeout); + } + } + } + c_mask_el = t_mask_el; + memset(gravmask, 0, (XRES/CELL)*(YRES/CELL)*sizeof(unsigned)); + while(c_mask_el!=NULL) + { + char *cshape = c_mask_el->shape; + for(x = 0; x < XRES/CELL; x++) + { + for(y = 0; y < YRES/CELL; y++) + { + if(cshape[y*(XRES/CELL)+x]){ + if(c_mask_el->shapeout) + maskvalue = 0xFFFFFFFF; + else + maskvalue = 0x00000000; + gravmask[y*(XRES/CELL)+x] = maskvalue; + } + } + } + c_mask_el = (mask_el*)c_mask_el->next; + } + mask_free(t_mask_el); +} + +Gravity::Gravity() +{ + gravity_init(); +} diff --git a/src/simulation/Gravity.h b/src/simulation/Gravity.h new file mode 100644 index 0000000..9f36240 --- /dev/null +++ b/src/simulation/Gravity.h @@ -0,0 +1,108 @@ +#ifndef GRAVITY_H +#define GRAVITY_H + +#include +#include "Config.h" +#include "Simulation.h" + +class Simulation; + +struct mask_el { + char *shape; + char shapeout; + void *next; +}; +typedef struct mask_el mask_el; + + +/* + * float *gravmap = NULL;//Maps to be used by the main thread + float *gravp = NULL; + float *gravy = NULL; + float *gravx = NULL; + unsigned *gravmask = NULL; + + float *th_ogravmap = NULL;// Maps to be processed by the gravity thread + float *th_gravmap = NULL; + float *th_gravx = NULL; + float *th_gravy = NULL; + float *th_gravp = NULL; + + int th_gravchanged = 0; + + pthread_t gravthread; + pthread_mutex_t gravmutex; + pthread_cond_t gravcv; + int grav_ready = 0; + int gravthread_done = 0; + */ +class Gravity +{ +private: + unsigned *gravmask; + + float *th_ogravmap; + float *th_gravmap; + float *th_gravx; + float *th_gravy; + float *th_gravp; + + int th_gravchanged; + + pthread_t gravthread; + pthread_mutex_t gravmutex; + pthread_cond_t gravcv; + int grav_ready; + int gravthread_done; + + //Simulation * sim; +public: + float *gravmap; + float *gravp; + float *gravy; + float *gravx; + unsigned char (*bmap)[XRES/CELL]; + int ngrav_enable; + void grav_mask_r(int x, int y, char checkmap[YRES/CELL][XRES/CELL], char shape[YRES/CELL][XRES/CELL], char *shapeout); + void mask_free(mask_el *c_mask_el); + + void gravity_init(); + void gravity_cleanup(); + void gravity_update_async(); + + static void *update_grav_async_helper(void * context); + void update_grav_async(); + + void start_grav_async(); + void stop_grav_async(); + void update_grav(); + void gravity_mask(); + + void bilinear_interpolation(float *src, float *dst, int sw, int sh, int rw, int rh); + + #ifdef GRAVFFT + void grav_fft_init(); + void grav_fft_cleanup(); + #endif + + Gravity(); +}; + +/*extern int ngrav_enable; //Newtonian gravity +extern int gravwl_timeout; +extern int gravityMode;*/ + +/*float *gravmap;//Maps to be used by the main thread +float *gravp; +float *gravy; +float *gravx; +unsigned *gravmask; + +float *th_ogravmap;// Maps to be processed by the gravity thread +float *th_gravmap; +float *th_gravx; +float *th_gravy; +float *th_gravp;*/ + + +#endif diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp new file mode 100644 index 0000000..a1a785a --- /dev/null +++ b/src/simulation/Simulation.cpp @@ -0,0 +1,3593 @@ +#include +#include +#define _cplusplus +#include "Config.h" +#include "Simulation.h" +#include "Elements.h" +#include "ElementFunctions.h" +#include "Air.h" +#include "Gravity.h" +//#include "powder.h" + +void Simulation::clear_area(int area_x, int area_y, int area_w, int area_h) +{ + int cx = 0; + int cy = 0; + for (cy=0; cyx2) + { + i = x2; + x2 = x1; + x1 = i; + } + if (y1>y2) + { + j = y2; + y2 = y1; + y1 = j; + } + for (j=y1; j<=y2; j++) + for (i=x1; i<=x2; i++) + create_parts(i, j, 0, 0, c, flags); +} + +int Simulation::flood_prop_2(int x, int y, size_t propoffset, void * propvalue, int proptype, int parttype, char * bitmap) +{ + int x1, x2, i, dy = 1; + x1 = x2 = x; + while (x1>=CELL) + { + if ((pmap[y][x1-1]&0xFF)!=parttype || bitmap[(y*XRES)+x1-1]) + { + break; + } + x1--; + } + while (x2>8; + if(proptype==2){ + *((float*)(((char*)&parts[i])+propoffset)) = *((float*)propvalue); + } else if(proptype==0) { + *((int*)(((char*)&parts[i])+propoffset)) = *((int*)propvalue); + } else if(proptype==1) { + *((char*)(((char*)&parts[i])+propoffset)) = *((char*)propvalue); + } + bitmap[(y*XRES)+x] = 1; + } + if (y>=CELL+dy) + for (x=x1; x<=x2; x++) + if ((pmap[y-dy][x]&0xFF)==parttype && !bitmap[((y-dy)*XRES)+x]) + if (!flood_prop_2(x, y-dy, propoffset, propvalue, proptype, parttype, bitmap)) + return 0; + if (y=CELL) + { + if ((pmap[y][x1-1]&0xFF)!=cm || bmap[y/CELL][(x1-1)/CELL]!=bm) + { + break; + } + x1--; + } + while (x2=CELL+dy && x1==x2 && + ((pmap[y-1][x1-1]&0xFF)==PT_INST||(pmap[y-1][x1-1]&0xFF)==PT_SPRK) && ((pmap[y-1][x1]&0xFF)==PT_INST||(pmap[y-1][x1]&0xFF)==PT_SPRK) && ((pmap[y-1][x1+1]&0xFF)==PT_INST || (pmap[y-1][x1+1]&0xFF)==PT_SPRK) && + (pmap[y-2][x1-1]&0xFF)!=PT_INST && ((pmap[y-2][x1]&0xFF)==PT_INST ||(pmap[y-2][x1]&0xFF)==PT_SPRK) && (pmap[y-2][x1+1]&0xFF)!=PT_INST) + flood_parts(x1, y-2, fullc, cm, bm, flags); + else if (y>=CELL+dy) + for (x=x1; x<=x2; x++) + if ((pmap[y-1][x]&0xFF)!=PT_SPRK) + { + if (x==x1 || x==x2 || y>=YRES-CELL-1 || + (pmap[y-1][x-1]&0xFF)==PT_INST || (pmap[y-1][x+1]&0xFF)==PT_INST || + (pmap[y+1][x-1]&0xFF)==PT_INST || ((pmap[y+1][x]&0xFF)!=PT_INST&&(pmap[y+1][x]&0xFF)!=PT_SPRK) || (pmap[y+1][x+1]&0xFF)==PT_INST) + flood_parts(x, y-dy, fullc, cm, bm, flags); + + } + + if (y=CELL+dy) + for (x=x1; x<=x2; x++) + if ((pmap[y-dy][x]&0xFF)==cm && bmap[(y-dy)/CELL][x/CELL]==bm) + if (!flood_parts(x, y-dy, fullc, cm, bm, flags)) + return 0; + if (y=CELL) + { + if ((ptypes[(pmap[y][x1-1]&0xFF)].falldown)!=2) + { + break; + } + x1--; + } + while (x2>8].tmp2 = !check;//flag it as checked, maybe shouldn't use .tmp2 + //check above, maybe around other sides too? + if ( ((y-1) > originaly) && !pmap[y-1][x] && eval_move(parts[i].type, x, y-1, NULL)) + { + int oldx = (int)(parts[i].x + 0.5f); + int oldy = (int)(parts[i].y + 0.5f); + pmap[y-1][x] = pmap[oldy][oldx]; + pmap[oldy][oldx] = 0; + parts[i].x = x; + parts[i].y = y-1; + return 0; + } + } + // fill children + + if (y>=CELL+1) + for (x=x1; x<=x2; x++) + if ((ptypes[(pmap[y-1][x]&0xFF)].falldown)==2 && parts[pmap[y-1][x]>>8].tmp2 == check) + if (!flood_water(x, y-1, i, originaly, check)) + return 0; + if (y>8].tmp2 == check) + if (!flood_water(x, y+1, i, originaly, check)) + return 0; + return 1; +} + +//wrapper around create_part to create TESC with correct tmp value +int Simulation::create_part_add_props(int p, int x, int y, int tv, int rx, int ry) +{ + p=create_part(p, x, y, tv); + if (tv==PT_TESC) + { + parts[p].tmp=rx*4+ry*4+7; + if (parts[p].tmp>300) + parts[p].tmp=300; + } + return p; +} + +//this creates particles from a brush, don't use if you want to create one particle +int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags) +{ + int i, j, r, f = 0, u, v, oy, ox, b = 0, dw = 0, stemp = 0, p;//n; + + int wall = c - 100; + if (c==SPC_WIND || c==PT_FIGH) + return 0; + + //if(c==SPC_PROP){ + // prop_edit_ui(vid_buf, x, y); + // return 0; + //} + for (r=UI_ACTUALSTART; r<=UI_ACTUALSTART+UI_WALLCOUNT; r++) + { + if (wall==r) + { + if (c == SPC_AIR || c == SPC_HEAT || c == SPC_COOL || c == SPC_VACUUM || c == SPC_PGRV || c == SPC_NGRV || wall == WL_SIGN) + break; + if (wall == WL_ERASE) + b = 0; + else + b = wall; + dw = 1; + } + } + if (c == WL_FANHELPER) + { + b = WL_FANHELPER; + dw = 1; + } + if (wall == WL_GRAV) + { + gravwl_timeout = 60; + } + if (c==PT_LIGH) + { + if (lighting_recreate>0 && rx+ry>0) + return 0; + p=create_part(-2, x, y, c); + if (p!=-1) + { + parts[p].life=rx+ry; + if (parts[p].life>55) + parts[p].life=55; + parts[p].temp=parts[p].life*150; // temperature of the lighting shows the power of the lighting + lighting_recreate+=parts[p].life/2+1; + return 1; + } + else return 0; + } + + if (dw==1) + { + ry = ry/CELL; + rx = rx/CELL; + x = x/CELL; + y = y/CELL; + x -= rx/2; + y -= ry/2; + for (ox=x; ox<=x+rx; ox++) + { + for (oy=y; oy<=y+rx; oy++) + { + if (ox>=0&&ox=0&&oy=0 && i+u=0 && j+v=XRES || y+j>=YRES) + continue; + //if (!REPLACE_MODE) + create_part(-2, x+i, y+j, c); + /*else if ((pmap[y+j][x+i]&0xFF)==SLALT&&SLALT!=0) + create_part(-2, x+i, y+j, c);*/ + } + return 1; + } + + /*if (flags&BRUSH_REPLACEMODE) + { + if (rx==0&&ry==0) + { + if ((pmap[y][x]&0xFF)==SLALT || SLALT==0) + { + if ((pmap[y][x])) + { + delete_part(x, y, 0); + if (c!=0) + create_part_add_props(-2, x, y, c, rx, ry); + } + } + } + else + for (j=-ry; j<=ry; j++) + for (i=-rx; i<=rx; i++) + if (InCurrentBrush(i ,j ,rx ,ry)) + { + if ( x+i<0 || y+j<0 || x+i>=XRES || y+j>=YRES) + continue; + if ((pmap[y+j][x+i]&0xFF)!=SLALT&&SLALT!=0) + continue; + if ((pmap[y+j][x+i])) + { + delete_part(x+i, y+j, 0); + if (c!=0) + create_part_add_props(-2, x+i, y+j, c, rx, ry); + } + } + return 1; + + }*/ + //else, no special modes, draw element like normal. + if (rx==0&&ry==0)//workaround for 1pixel brush/floodfill crashing. todo: find a better fix later. + { + if (create_part_add_props(-2, x, y, c, rx, ry)==-1) + f = 1; + } + else + for (j=-ry; j<=ry; j++) + for (i=-rx; i<=rx; i++) + //if (InCurrentBrush(i ,j ,rx ,ry)) + if (create_part_add_props(-2, x+i, y+j, c, rx, ry)==-1) + f = 1; + return !f; +} +/*int Simulation::InCurrentBrush(int i, int j, int rx, int ry) +{ + switch(CURRENT_BRUSH) + { + case CIRCLE_BRUSH: + return (pow(i,2)*pow(ry,2)+pow(j,2)*pow(rx,2)<=pow(rx,2)*pow(ry,2)); + break; + case SQUARE_BRUSH: + return (i*j<=ry*rx); + break; + case TRI_BRUSH: + return (j <= ry ) && ( j >= (((-2.0*ry)/rx)*i) -ry) && ( j >= (((-2.0*ry)/(-rx))*i)-ry ) ; + break; + } + return 0; +} +int Simulation::get_brush_flags() +{ + int flags = 0; + if (REPLACE_MODE) + flags |= BRUSH_REPLACEMODE; + if (sdl_mod & KMOD_CAPS) + flags |= BRUSH_SPECIFIC_DELETE; + if ((sdl_mod & KMOD_LALT) && (sdl_mod & (KMOD_CTRL))) + flags |= BRUSH_SPECIFIC_DELETE; + return flags; +}*/ +void Simulation::create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags) +{ + int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; + float e, de; + if (c==SPC_PROP) + return; + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1= 0.5f) + { + y += sy; + if ((c==WL_EHOLE+100 || c==WL_ALLOWGAS+100 || c==WL_ALLOWENERGY+100 || c==WL_ALLOWALLELEC+100 || c==WL_ALLOWSOLID+100 || c==WL_ALLOWAIR+100 || c==WL_WALL+100 || c==WL_DESTROYALL+100 || c==WL_ALLOWLIQUID+100 || c==WL_FAN+100 || c==WL_STREAM+100 || c==WL_DETECT+100 || c==WL_EWALL+100 || c==WL_WALLELEC+100 || !(rx+ry)) + && ((y1=y2))) + { + if (cp) + create_parts(y, x, rx, ry, c, flags); + else + create_parts(x, y, rx, ry, c, flags); + } + e -= 1.0f; + } + } +} + +void *Simulation::transform_save(void *odata, int *size, matrix2d transform, vector2d translate) +{ + void *ndata; + unsigned char (*bmapo)[XRES/CELL] = (unsigned char (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(unsigned char)); + unsigned char (*bmapn)[XRES/CELL] = (unsigned char (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(unsigned char)); + Particle *partst = (Particle *)calloc(sizeof(Particle), NPART); + sign *signst = (sign *)calloc(MAXSIGNS, sizeof(sign)); + unsigned (*pmapt)[XRES] = (unsigned (*)[XRES])calloc(YRES*XRES, sizeof(unsigned)); + float (*fvxo)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*fvyo)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*fvxn)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*fvyn)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + int i, x, y, nx, ny, w, h, nw, nh; + vector2d pos, tmp, ctl, cbr; + vector2d cornerso[4]; + unsigned char *odatac = (unsigned char *)odata; + //*if (parse_save(odata, *size, 0, 0, 0, bmapo, fvxo, fvyo, signst, partst, pmapt)) TODO: IMPLEMENT + { + free(bmapo); + free(bmapn); + free(partst); + free(signst); + free(pmapt); + free(fvxo); + free(fvyo); + free(fvxn); + free(fvyn); + return odata; + } + w = odatac[6]*CELL; + h = odatac[7]*CELL; + // undo any translation caused by rotation + cornerso[0] = v2d_new(0,0); + cornerso[1] = v2d_new(w-1,0); + cornerso[2] = v2d_new(0,h-1); + cornerso[3] = v2d_new(w-1,h-1); + for (i=0; i<4; i++) + { + tmp = m2d_multiply_v2d(transform,cornerso[i]); + if (i==0) ctl = cbr = tmp; // top left, bottom right corner + if (tmp.xcbr.x) cbr.x = tmp.x; + if (tmp.y>cbr.y) cbr.y = tmp.y; + } + // casting as int doesn't quite do what we want with negative numbers, so use floor() + tmp = v2d_new(floor(ctl.x+0.5f),floor(ctl.y+0.5f)); + translate = v2d_sub(translate,tmp); + nw = floor(cbr.x+0.5f)-floor(ctl.x+0.5f)+1; + nh = floor(cbr.y+0.5f)-floor(ctl.y+0.5f)+1; + if (nw>XRES) nw = XRES; + if (nh>YRES) nh = YRES; + // rotate and translate signs, parts, walls + for (i=0; i=nw || ny<0 || ny>=nh) + { + signst[i].text[0] = 0; + continue; + } + signst[i].x = nx; + signst[i].y = ny; + } + for (i=0; i=nw || ny<0 || ny>=nh) + { + partst[i].type = PT_NONE; + continue; + } + partst[i].x = nx; + partst[i].y = ny; + } + for (y=0; y=nw || ny<0 || ny>=nh) + continue; + if (bmapo[y][x]) + { + bmapn[ny][nx] = bmapo[y][x]; + if (bmapo[y][x]==WL_FAN) + { + fvxn[ny][nx] = fvxo[y][x]; + fvyn[ny][nx] = fvyo[y][x]; + } + } + } + //ndata = build_save(size,0,0,nw,nh,bmapn,fvxn,fvyn,signst,partst); TODO: IMPLEMENT + free(bmapo); + free(bmapn); + free(partst); + free(signst); + free(pmapt); + free(fvxo); + free(fvyo); + free(fvxn); + free(fvyn); + return ndata; +} + +void Simulation::orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]) +{ + resblock1[0] = (block1&0x000000FF); + resblock1[1] = (block1&0x0000FF00)>>8; + resblock1[2] = (block1&0x00FF0000)>>16; + resblock1[3] = (block1&0xFF000000)>>24; + + resblock2[0] = (block2&0x000000FF); + resblock2[1] = (block2&0x0000FF00)>>8; + resblock2[2] = (block2&0x00FF0000)>>16; + resblock2[3] = (block2&0xFF000000)>>24; +} + +void Simulation::orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]) +{ + int block1tmp = 0; + int block2tmp = 0; + + block1tmp = (resblock1[0]&0xFF); + block1tmp |= (resblock1[1]&0xFF)<<8; + block1tmp |= (resblock1[2]&0xFF)<<16; + block1tmp |= (resblock1[3]&0xFF)<<24; + + block2tmp = (resblock2[0]&0xFF); + block2tmp |= (resblock2[1]&0xFF)<<8; + block2tmp |= (resblock2[2]&0xFF)<<16; + block2tmp |= (resblock2[3]&0xFF)<<24; + + *block1 = block1tmp; + *block2 = block2tmp; +} + +inline int Simulation::is_wire(int x, int y) +{ + return bmap[y][x]==WL_DETECT || bmap[y][x]==WL_EWALL || bmap[y][x]==WL_ALLOWLIQUID || bmap[y][x]==WL_WALLELEC || bmap[y][x]==WL_ALLOWALLELEC || bmap[y][x]==WL_EHOLE; +} + +inline int Simulation::is_wire_off(int x, int y) +{ + return (bmap[y][x]==WL_DETECT || bmap[y][x]==WL_EWALL || bmap[y][x]==WL_ALLOWLIQUID || bmap[y][x]==WL_WALLELEC || bmap[y][x]==WL_ALLOWALLELEC || bmap[y][x]==WL_EHOLE) && emap[y][x]<8; +} + +int Simulation::get_wavelength_bin(int *wm) +{ + int i, w0=30, wM=0; + + if (!*wm) + return -1; + + for (i=0; i<30; i++) + if (*wm & (1< wM) + wM = i; + } + + if (wM-w0 < 5) + return (wM+w0)/2; + + i = rand() % (wM-w0-3); + i += w0; + + *wm &= 0x1F << i; + return i + 2; +} + +void Simulation::set_emap(int x, int y) +{ + int x1, x2; + + if (!is_wire_off(x, y)) + return; + + // go left as far as possible + x1 = x2 = x; + while (x1>0) + { + if (!is_wire_off(x1-1, y)) + break; + x1--; + } + while (x21 && x1==x2 && + is_wire(x1-1, y-1) && is_wire(x1, y-1) && is_wire(x1+1, y-1) && + !is_wire(x1-1, y-2) && is_wire(x1, y-2) && !is_wire(x1+1, y-2)) + set_emap(x1, y-2); + else if (y>0) + for (x=x1; x<=x2; x++) + if (is_wire_off(x, y-1)) + { + if (x==x1 || x==x2 || y>=YRES/CELL-1 || + is_wire(x-1, y-1) || is_wire(x+1, y-1) || + is_wire(x-1, y+1) || !is_wire(x, y+1) || is_wire(x+1, y+1)) + set_emap(x, y-1); + } + + if (y>8].type; + else + return PT_NONE; + } + else + { + int pmr2 = pmap[(int)((parts[ci].y + parts[ni].y)/2+0.5f)][(int)((parts[ci].x + parts[ni].x)/2+0.5f)];//seems to be more accurate. + if (pmr2) + { + if (parts[pmr2>>8].type==t) + return t; + } + else + return PT_NONE; + } + return PT_NONE; +} + + +int Simulation::nearest_part(int ci, int t, int max_d) +{ + int distance = (max_d!=-1)?max_d:MAX_DISTANCE; + int ndistance = 0; + int id = -1; + int i = 0; + int cx = (int)parts[ci].x; + int cy = (int)parts[ci].y; + for (i=0; i<=parts_lastActiveIndex; i++) + { + if ((parts[i].type==t||(t==-1&&parts[i].type))&&!parts[i].life&&i!=ci) + { + ndistance = abs(cx-parts[i].x)+abs(cy-parts[i].y);// Faster but less accurate Older: sqrt(pow(cx-parts[i].x, 2)+pow(cy-parts[i].y, 2)); + if (ndistance=XRES || ny>=YRES) + return 0; + + r = pmap[ny][nx]; + if (r) + r = (r&~0xFF) | parts[r>>8].type; + if (rr) + *rr = r; + if (pt>=PT_NUM || (r&0xFF)>=PT_NUM) + return 0; + result = can_move[pt][r&0xFF]; + if (result==3) + { + if ((pt==PT_PHOT || pt==PT_ELEC) && (r&0xFF)==PT_LCRY) + result = (parts[r>>8].life > 5)? 2 : 0; + if ((r&0xFF)==PT_INVIS) + { + if (pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f) result = 2; + else result = 0; + } + if ((r&0xFF)==PT_PVOD) + { + if (parts[r>>8].life == 10) result = 1; + else result = 0; + } + } + if (bmap[ny/CELL][nx/CELL]) + { + if (bmap[ny/CELL][nx/CELL]==WL_ALLOWGAS && !(ptypes[pt].properties&TYPE_GAS))// && ptypes[pt].falldown!=0 && pt!=PT_FIRE && pt!=PT_SMKE) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_ALLOWENERGY && !(ptypes[pt].properties&TYPE_ENERGY))// && ptypes[pt].falldown!=0 && pt!=PT_FIRE && pt!=PT_SMKE) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_ALLOWLIQUID && ptypes[pt].falldown!=2) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_ALLOWSOLID && ptypes[pt].falldown!=1) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_ALLOWAIR || bmap[ny/CELL][nx/CELL]==WL_WALL || bmap[ny/CELL][nx/CELL]==WL_WALLELEC) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_EWALL && !emap[ny/CELL][nx/CELL]) + return 0; + if (bmap[ny/CELL][nx/CELL]==WL_EHOLE && !emap[ny/CELL][nx/CELL]) + return 2; + } + return result; +} + +int Simulation::try_move(int i, int x, int y, int nx, int ny) +{ + unsigned r, e; + + if (x==nx && y==ny) + return 1; + if (nx<0 || ny<0 || nx>=XRES || ny>=YRES) + return 1; + + e = eval_move(parts[i].type, nx, ny, &r); + + if ((r&0xFF)==PT_BOMB && parts[i].type==PT_BOMB && parts[i].tmp == 1) + e = 2; + + /* half-silvered mirror */ + if (!e && parts[i].type==PT_PHOT && + (((r&0xFF)==PT_BMTL && rand()>8].temp = parts[i].temp; + + if ((r & 0xFF) < PT_NUM && ptypes[r&0xFF].hconduct && ((r&0xFF)!=PT_HSWC||parts[r>>8].life==10) && (r&0xFF)!=PT_FILT) + parts[i].temp = parts[r>>8].temp = restrict_flt((parts[r>>8].temp+parts[i].temp)/2, MIN_TEMP, MAX_TEMP); + } + if ((parts[i].type==PT_NEUT || parts[i].type==PT_ELEC) && ((r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN || (r&0xFF)==PT_BCLN || (r&0xFF)==PT_PBCN)) { + if (!parts[r>>8].ctype) + parts[r>>8].ctype = parts[i].type; + } + if ((r&0xFF)==PT_PRTI && (parts[i].type==PT_PHOT || parts[i].type==PT_NEUT || parts[i].type==PT_ELEC)) + { + int nnx, count; + for (count=0; count<8; count++) + { + if (isign(x-nx)==isign(portal_rx[count]) && isign(y-ny)==isign(portal_ry[count])) + break; + } + count = count%8; + parts[r>>8].tmp = (int)((parts[r>>8].temp-73.15f)/100+1); + if (parts[r>>8].tmp>=CHANNELS) parts[r>>8].tmp = CHANNELS-1; + else if (parts[r>>8].tmp<0) parts[r>>8].tmp = 0; + for ( nnx=0; nnx<80; nnx++) + if (!portalp[parts[r>>8].tmp][count][nnx].type) + { + portalp[parts[r>>8].tmp][count][nnx] = parts[i]; + parts[i].type=PT_NONE; + break; + } + } + return 0; + } + + if (e == 2) //if occupy same space + { + if (parts[i].type == PT_PHOT && (r&0xFF)==PT_GLOW && !parts[r>>8].life) + if (rand() < RAND_MAX/30) + { + parts[r>>8].life = 120; + create_gain_photon(i); + } + if (parts[i].type == PT_PHOT && (r&0xFF)==PT_FILT) + { + int temp_bin = (int)((parts[r>>8].temp-273.0f)*0.025f); + if (temp_bin < 0) temp_bin = 0; + if (temp_bin > 25) temp_bin = 25; + if(!parts[r>>8].tmp){ + parts[i].ctype = 0x1F << temp_bin; //Assign Colour + } else if(parts[r>>8].tmp==1){ + parts[i].ctype &= 0x1F << temp_bin; //Filter Colour + } else if(parts[r>>8].tmp==2){ + parts[i].ctype |= 0x1F << temp_bin; //Add Colour + } else if(parts[r>>8].tmp==3){ + parts[i].ctype &= ~(0x1F << temp_bin); //Subtract Colour + } + } + if (parts[i].type == PT_NEUT && (r&0xFF)==PT_GLAS) { + if (rand() < RAND_MAX/10) + create_cherenkov_photon(i); + } + if (parts[i].type == PT_PHOT && (r&0xFF)==PT_INVIS && pv[ny/CELL][nx/CELL]<=4.0f && pv[ny/CELL][nx/CELL]>=-4.0f) { + part_change_type(i,x,y,PT_NEUT); + parts[i].ctype = 0; + } + if ((parts[i].type==PT_BIZR||parts[i].type==PT_BIZRG) && (r&0xFF)==PT_FILT) + { + int temp_bin = (int)((parts[r>>8].temp-273.0f)*0.025f); + if (temp_bin < 0) temp_bin = 0; + if (temp_bin > 25) temp_bin = 25; + parts[i].ctype = 0x1F << temp_bin; + } + return 1; + } + //else e=1 , we are trying to swap the particles, return 0 no swap/move, 1 is still overlap/move, because the swap takes place later + + if ((r&0xFF)==PT_VOID || (r&0xFF)==PT_PVOD) //this is where void eats particles + { + if (parts[i].type == PT_STKM) + { + player.spwn = 0; + } + if (parts[i].type == PT_STKM2) + { + player2.spwn = 0; + } + if (parts[i].type == PT_FIGH) + { + fighters[(unsigned char)parts[i].tmp].spwn = 0; + fighcount--; + } + parts[i].type=PT_NONE; + return 0; + } + if ((r&0xFF)==PT_BHOL || (r&0xFF)==PT_NBHL) //this is where blackhole eats particles + { + if (parts[i].type == PT_STKM) + { + player.spwn = 0; + } + if (parts[i].type == PT_STKM2) + { + player2.spwn = 0; + } + if (parts[i].type == PT_FIGH) + { + fighters[(unsigned char)parts[i].tmp].spwn = 0; + fighcount--; + } + parts[i].type=PT_NONE; + if (!legacy_enable) + { + parts[r>>8].temp = restrict_flt(parts[r>>8].temp+parts[i].temp/2, MIN_TEMP, MAX_TEMP);//3.0f; + } + + return 0; + } + if (((r&0xFF)==PT_WHOL||(r&0xFF)==PT_NWHL) && parts[i].type==PT_ANAR) //whitehole eats anar + { + parts[i].type=PT_NONE; + if (!legacy_enable) + { + parts[r>>8].temp = restrict_flt(parts[r>>8].temp- (MAX_TEMP-parts[i].temp)/2, MIN_TEMP, MAX_TEMP); + } + + return 0; + } + + if (parts[i].type==PT_CNCT && y0) + return 0; + + e = r >> 8; //e is now the particle number at r (pmap[ny][nx]) + if (r)//the swap part, if we make it this far, swap + { + if (parts[i].type==PT_NEUT) { + // target material is NEUTPENETRATE, meaning it gets moved around when neutron passes + unsigned s = pmap[y][x]; + if (!(ptypes[s&0xFF].properties&PROP_NEUTPENETRATE)) + return 1; // if the element currently underneath neutron isn't NEUTPENETRATE, don't move anything except the neutron + // if nothing is currently underneath neutron, only move target particle + if (s) + { + pmap[ny][nx] = (s&~(0xFF))|parts[s>>8].type; + parts[s>>8].x = nx; + parts[s>>8].y = ny; + } + else pmap[ny][nx] = 0; + parts[e].x = x; + parts[e].y = y; + pmap[y][x] = (e<<8)|parts[e].type; + return 1; + } + + if ((pmap[ny][nx]>>8)==e) pmap[ny][nx] = 0; + parts[e].x += x-nx; + parts[e].y += y-ny; + pmap[(int)(parts[e].y+0.5f)][(int)(parts[e].x+0.5f)] = (e<<8)|parts[e].type; + } + return 1; +} + +// try to move particle, and if successful update pmap and parts[i].x,y +int Simulation::do_move(int i, int x, int y, float nxf, float nyf) +{ + int nx = (int)(nxf+0.5f), ny = (int)(nyf+0.5f); + int result = try_move(i, x, y, nx, ny); + if (result) + { + int t = parts[i].type; + parts[i].x = nxf; + parts[i].y = nyf; + if (ny!=y || nx!=x) + { + if ((pmap[y][x]>>8)==i) pmap[y][x] = 0; + else if ((photons[y][x]>>8)==i) photons[y][x] = 0; + if (nx=XRES-CELL || ny=YRES-CELL)//kill_part if particle is out of bounds + { + kill_part(i); + return -1; + } + if (t==PT_PHOT||t==PT_NEUT||t==PT_ELEC) + photons[ny][nx] = t|(i<<8); + else if (t) + pmap[ny][nx] = t|(i<<8); + } + } + return result; +} + +int Simulation::pn_junction_sprk(int x, int y, int pt) +{ + unsigned r = pmap[y][x]; + if ((r & 0xFF) != pt) + return 0; + r >>= 8; + if (parts[r].type != pt) + return 0; + if (parts[r].life != 0) + return 0; + + parts[r].ctype = pt; + part_change_type(r,x,y,PT_SPRK); + parts[r].life = 4; + return 1; +} + +void Simulation::photoelectric_effect(int nx, int ny)//create sparks from PHOT when hitting PSCN and NSCN +{ + unsigned r = pmap[ny][nx]; + + if ((r&0xFF) == PT_PSCN) { + if ((pmap[ny][nx-1] & 0xFF) == PT_NSCN || + (pmap[ny][nx+1] & 0xFF) == PT_NSCN || + (pmap[ny-1][nx] & 0xFF) == PT_NSCN || + (pmap[ny+1][nx] & 0xFF) == PT_NSCN) + pn_junction_sprk(nx, ny, PT_PSCN); + } +} + +unsigned Simulation::direction_to_map(float dx, float dy, int t) +{ + // TODO: + // Adding extra directions causes some inaccuracies. + // Not adding them causes problems with some diagonal surfaces (photons absorbed instead of reflected). + // For now, don't add them. + // Solution may involve more intelligent setting of initial i0 value in find_next_boundary? + // or rewriting normal/boundary finding code + + return (dx >= 0) | + (((dx + dy) >= 0) << 1) | /* 567 */ + ((dy >= 0) << 2) | /* 4+0 */ + (((dy - dx) >= 0) << 3) | /* 321 */ + ((dx <= 0) << 4) | + (((dx + dy) <= 0) << 5) | + ((dy <= 0) << 6) | + (((dy - dx) <= 0) << 7); + /* + return (dx >= -0.001) | + (((dx + dy) >= -0.001) << 1) | // 567 + ((dy >= -0.001) << 2) | // 4+0 + (((dy - dx) >= -0.001) << 3) | // 321 + ((dx <= 0.001) << 4) | + (((dx + dy) <= 0.001) << 5) | + ((dy <= 0.001) << 6) | + (((dy - dx) <= 0.001) << 7); + }*/ +} + +int Simulation::is_blocking(int t, int x, int y) +{ + if (t & REFRACT) { + if (x<0 || y<0 || x>=XRES || y>=YRES) + return 0; + if ((pmap[y][x] & 0xFF) == PT_GLAS) + return 1; + return 0; + } + + return !eval_move(t, x, y, NULL); +} + +int Simulation::is_boundary(int pt, int x, int y) +{ + if (!is_blocking(pt,x,y)) + return 0; + if (is_blocking(pt,x,y-1) && is_blocking(pt,x,y+1) && is_blocking(pt,x-1,y) && is_blocking(pt,x+1,y)) + return 0; + return 1; +} + +int Simulation::find_next_boundary(int pt, int *x, int *y, int dm, int *em) +{ + static int dx[8] = {1,1,0,-1,-1,-1,0,1}; + static int dy[8] = {0,1,1,1,0,-1,-1,-1}; + static int de[8] = {0x83,0x07,0x0E,0x1C,0x38,0x70,0xE0,0xC1}; + int i, ii, i0; + + if (*x <= 0 || *x >= XRES-1 || *y <= 0 || *y >= YRES-1) + return 0; + + if (*em != -1) { + i0 = *em; + dm &= de[i0]; + } else + i0 = 0; + + for (ii=0; ii<8; ii++) { + i = (ii + i0) & 7; + if ((dm & (1 << i)) && is_boundary(pt, *x+dx[i], *y+dy[i])) { + *x += dx[i]; + *y += dy[i]; + *em = i; + return 1; + } + } + + return 0; +} + +int Simulation::get_normal(int pt, int x, int y, float dx, float dy, float *nx, float *ny) +{ + int ldm, rdm, lm, rm; + int lx, ly, lv, rx, ry, rv; + int i, j; + float r, ex, ey; + + if (!dx && !dy) + return 0; + + if (!is_boundary(pt, x, y)) + return 0; + + ldm = direction_to_map(-dy, dx, pt); + rdm = direction_to_map(dy, -dx, pt); + lx = rx = x; + ly = ry = y; + lv = rv = 1; + lm = rm = -1; + + j = 0; + for (i=0; i= NORMAL_INTERP) + return 0; + + if (pt == PT_PHOT) + photoelectric_effect(x, y); + + return get_normal(pt, x, y, dx, dy, nx, ny); +} + +//For soap only +void Simulation::detach(int i) +{ + if ((parts[i].ctype&2) == 2) + { + if ((parts[parts[i].tmp].ctype&4) == 4) + parts[parts[i].tmp].ctype ^= 4; + } + + if ((parts[i].ctype&4) == 4) + { + if ((parts[parts[i].tmp2].ctype&2) == 2) + parts[parts[i].tmp2].ctype ^= 2; + } + + parts[i].ctype = 0; +} + +void Simulation::kill_part(int i)//kills particle number i +{ + int x, y; + + if(elementCount[parts[i].type] && parts[i].type) + elementCount[parts[i].type]--; + x = (int)(parts[i].x+0.5f); + y = (int)(parts[i].y+0.5f); + if (parts[i].type == PT_STKM) + { + player.spwn = 0; + } + if (parts[i].type == PT_STKM2) + { + player2.spwn = 0; + } + if (parts[i].type == PT_FIGH) + { + fighters[(unsigned char)parts[i].tmp].spwn = 0; + fighcount--; + } + if (parts[i].type == PT_SOAP) + { + detach(i); + } + if (x>=0 && y>=0 && x>8)==i) + pmap[y][x] = 0; + else if ((photons[y][x]>>8)==i) + photons[y][x] = 0; + } + + parts[i].type = PT_NONE; + parts[i].life = pfree; + pfree = i; +} + +void Simulation::part_change_type(int i, int x, int y, int t)//changes the type of particle number i, to t. This also changes pmap at the same time. +{ + if (x<0 || y<0 || x>=XRES || y>=YRES || i>=NPART || t<0 || t>=PT_NUM) + return; + if (!ptypes[t].enabled) + t = PT_NONE; + + if (parts[i].type == PT_STKM) + player.spwn = 0; + + if (parts[i].type == PT_STKM2) + player2.spwn = 0; + + if (parts[i].type == PT_FIGH) + { + fighters[(unsigned char)parts[i].tmp].spwn = 0; + fighcount--; + } + + parts[i].type = t; + if (t==PT_PHOT || t==PT_NEUT || t==PT_ELEC) + { + photons[y][x] = t|(i<<8); + if ((pmap[y][x]>>8)==i) + pmap[y][x] = 0; + } + else + { + pmap[y][x] = t|(i<<8); + if ((photons[y][x]>>8)==i) + photons[y][x] = 0; + } +} + +int Simulation::create_part(int p, int x, int y, int tv)//the function for creating a particle, use p=-1 for creating a new particle, -2 is from a brush, or a particle number to replace a particle. +{ + int i; + + int t = tv & 0xFF; + int v = (tv >> 8) & 0xFF; + + if (x<0 || y<0 || x>=XRES || y>=YRES || ((t<0 || t>=PT_NUM)&&t!=SPC_HEAT&&t!=SPC_COOL&&t!=SPC_AIR&&t!=SPC_VACUUM&&t!=SPC_PGRV&&t!=SPC_NGRV)) + return -1; + if (t>=0 && t>8].temp>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 0.1f, MIN_TEMP, MAX_TEMP); + } else if ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL))) { + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 50.0f, MIN_TEMP, MAX_TEMP); + } else { + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 4.0f, MIN_TEMP, MAX_TEMP); + } + } + if (t==SPC_COOL&&parts[pmap[y][x]>>8].temp>MIN_TEMP) + { + if ((pmap[y][x]&0xFF)==PT_PUMP || (pmap[y][x]&0xFF)==PT_GPMP) { + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 0.1f, MIN_TEMP, MAX_TEMP); + } else if ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL))) { + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 50.0f, MIN_TEMP, MAX_TEMP); + } else { + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 4.0f, MIN_TEMP, MAX_TEMP); + } + } + return pmap[y][x]>>8; + } + else + { + return -1; + } + }*/ + if (t==SPC_AIR) + { + pv[y/CELL][x/CELL] += 0.03f; + if (y+CELL>8].ctype=PT_DUST; + } + if (!((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS))) + return -1; + if (parts[pmap[y][x]>>8].life!=0) + return -1; + parts[pmap[y][x]>>8].type = PT_SPRK; + parts[pmap[y][x]>>8].life = 4; + parts[pmap[y][x]>>8].ctype = pmap[y][x]&0xFF; + pmap[y][x] = (pmap[y][x]&~0xFF) | PT_SPRK; + return pmap[y][x]>>8; + } + if (t==PT_SPAWN&&elementCount[PT_SPAWN]) + return -1; + if (t==PT_SPAWN2&&elementCount[PT_SPAWN2]) + return -1; + if (p==-1)//creating from anything but brush + { + if (pmap[y][x] || (bmap[y/CELL][x/CELL] && !eval_move(t, x, y, NULL))) + { + if ((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2) + { + if (t!=PT_STKM&&t!=PT_STKM2&&t!=PT_FIGH) + { + return -1; + } + } + } + if (pfree == -1) + return -1; + i = pfree; + pfree = parts[i].life; + } + else if (p==-2)//creating from brush + { + if (pmap[y][x]) + { + if (( + ((pmap[y][x]&0xFF)==PT_STOR&&!(ptypes[t].properties&TYPE_SOLID))|| + (pmap[y][x]&0xFF)==PT_CLNE|| + (pmap[y][x]&0xFF)==PT_BCLN|| + (pmap[y][x]&0xFF)==PT_CONV|| + ((pmap[y][x]&0xFF)==PT_PCLN&&t!=PT_PSCN&&t!=PT_NSCN)|| + ((pmap[y][x]&0xFF)==PT_PBCN&&t!=PT_PSCN&&t!=PT_NSCN) + )&&( + t!=PT_CLNE&&t!=PT_PCLN&& + t!=PT_BCLN&&t!=PT_STKM&& + t!=PT_STKM2&&t!=PT_PBCN&& + t!=PT_STOR&&t!=PT_FIGH) + ) + { + parts[pmap[y][x]>>8].ctype = t; + if (t==PT_LIFE && v>8].tmp = v; + } + return -1; + } + if (photons[y][x] && (t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)) + return -1; + if (pfree == -1) + return -1; + i = pfree; + pfree = parts[i].life; + } + else if (p==-3)//skip pmap checks, e.g. for sing explosion + { + if (pfree == -1) + return -1; + i = pfree; + pfree = parts[i].life; + } + else + { + int oldX = (int)(parts[p].x+0.5f); + int oldY = (int)(parts[p].y+0.5f); + if ((pmap[oldY][oldX]>>8)==p) + pmap[oldY][oldX] = 0; + if ((photons[oldY][oldX]>>8)==p) + photons[oldY][oldX] = 0; + i = p; + } + + if (i>parts_lastActiveIndex) parts_lastActiveIndex = i; + + parts[i].dcolour = 0; + if (t==PT_GLAS) + { + parts[i].pavg[1] = pv[y/CELL][x/CELL]; + } + else if (t==PT_QRTZ) + { + parts[i].pavg[1] = pv[y/CELL][x/CELL]; + } + else + { + parts[i].pavg[0] = 0.0f; + parts[i].pavg[1] = 0.0f; + } + if (t!=PT_STKM&&t!=PT_STKM2&&t!=PT_FIGH)//set everything to default values first, except for stickman. + { + parts[i].x = (float)x; + parts[i].y = (float)y; + parts[i].type = t; + parts[i].vx = 0; + parts[i].vy = 0; + parts[i].life = 0; + parts[i].ctype = 0; + parts[i].temp = ptypes[t].heat; + parts[i].tmp = 0; + parts[i].tmp2 = 0; + } + if (t==PT_LIGH && p==-2) + { + switch (gravityMode) + { + default: + case 0: + parts[i].tmp= 270+rand()%40-20; + break; + case 1: + parts[i].tmp = rand()%360; + break; + case 2: + parts[i].tmp = atan2(x-XCNTR, y-YCNTR)*(180.0f/M_PI)+90; + break; + } + parts[i].tmp2 = 4; + } + if (t==PT_SOAP) + { + parts[i].tmp = -1; + parts[i].tmp2 = -1; + } + //now set various properties that we want at spawn. + if (t==PT_ACID || t==PT_CAUS) + { + parts[i].life = 75; + } + /*Testing + if(t==PT_WOOD){ + parts[i].life = 150; + } + End Testing*/ + if (t==PT_WARP) { + parts[i].life = rand()%95+70; + } + if (t==PT_FUSE) { + parts[i].life = 50; + parts[i].tmp = 50; + } + /*if (ptypes[t].properties&PROP_LIFE) { + int r; + for (r = 0; r255 ? 255 : (colr<0 ? 0 : colr); + colg = colg>255 ? 255 : (colg<0 ? 0 : colg); + colb = colb>255 ? 255 : (colb<0 ? 0 : colb); + parts[i].dcolour = 0xFF000000 | (colr<<16) | (colg<<8) | colb; + } + elementCount[t]++; + return i; +} + +void Simulation::create_gain_photon(int pp)//photons from PHOT going through GLOW +{ + float xx, yy; + int i, lr, temp_bin, nx, ny; + + if (pfree == -1) + return; + i = pfree; + + lr = rand() % 2; + + if (lr) { + xx = parts[pp].x - 0.3*parts[pp].vy; + yy = parts[pp].y + 0.3*parts[pp].vx; + } else { + xx = parts[pp].x + 0.3*parts[pp].vy; + yy = parts[pp].y - 0.3*parts[pp].vx; + } + + nx = (int)(xx + 0.5f); + ny = (int)(yy + 0.5f); + + if (nx<0 || ny<0 || nx>=XRES || ny>=YRES) + return; + + if ((pmap[ny][nx] & 0xFF) != PT_GLOW) + return; + + pfree = parts[i].life; + if (i>parts_lastActiveIndex) parts_lastActiveIndex = i; + + parts[i].type = PT_PHOT; + parts[i].life = 680; + parts[i].x = xx; + parts[i].y = yy; + parts[i].vx = parts[pp].vx; + parts[i].vy = parts[pp].vy; + parts[i].temp = parts[pmap[ny][nx] >> 8].temp; + parts[i].tmp = 0; + parts[i].pavg[0] = parts[i].pavg[1] = 0.0f; + photons[ny][nx] = PT_PHOT|(i<<8); + + temp_bin = (int)((parts[i].temp-273.0f)*0.25f); + if (temp_bin < 0) temp_bin = 0; + if (temp_bin > 25) temp_bin = 25; + parts[i].ctype = 0x1F << temp_bin; +} + +void Simulation::create_cherenkov_photon(int pp)//photons from NEUT going through GLAS +{ + int i, lr, nx, ny; + float r, eff_ior; + + if (pfree == -1) + return; + i = pfree; + + nx = (int)(parts[pp].x + 0.5f); + ny = (int)(parts[pp].y + 0.5f); + if ((pmap[ny][nx] & 0xFF) != PT_GLAS) + return; + + if (hypotf(parts[pp].vx, parts[pp].vy) < 1.44f) + return; + + pfree = parts[i].life; + if (i>parts_lastActiveIndex) parts_lastActiveIndex = i; + + lr = rand() % 2; + + parts[i].type = PT_PHOT; + parts[i].ctype = 0x00000F80; + parts[i].life = 680; + parts[i].x = parts[pp].x; + parts[i].y = parts[pp].y; + parts[i].temp = parts[pmap[ny][nx] >> 8].temp; + parts[i].tmp = 0; + parts[i].pavg[0] = parts[i].pavg[1] = 0.0f; + photons[ny][nx] = PT_PHOT|(i<<8); + + if (lr) { + parts[i].vx = parts[pp].vx - 2.5f*parts[pp].vy; + parts[i].vy = parts[pp].vy + 2.5f*parts[pp].vx; + } else { + parts[i].vx = parts[pp].vx + 2.5f*parts[pp].vy; + parts[i].vy = parts[pp].vy - 2.5f*parts[pp].vx; + } + + /* photons have speed of light. no discussion. */ + r = 1.269 / hypotf(parts[i].vx, parts[i].vy); + parts[i].vx *= r; + parts[i].vy *= r; +} + +void Simulation::delete_part(int x, int y, int flags)//calls kill_part with the particle located at x,y +{ + unsigned i; + + if (x<0 || y<0 || x>=XRES || y>=YRES) + return; + if (photons[y][x]) { + i = photons[y][x]; + } else { + i = pmap[y][x]; + } + + if (!i) + return; + kill_part(i>>8); +} + +void Simulation::update_particles_i(int start, int inc) +{ + int i, j, x, y, t, nx, ny, r, surround_space, s, lt, rt, nt, nnx, nny, q, golnum, goldelete, z, neighbors, createdsomething; + float mv, dx, dy, ix, iy, lx, ly, nrx, nry, dp, ctemph, ctempl, gravtot; + int fin_x, fin_y, clear_x, clear_y, stagnant; + float fin_xf, fin_yf, clear_xf, clear_yf; + float nn, ct1, ct2, swappage; + float pt = R_TEMP; + float c_heat = 0.0f; + int h_count = 0; + int starti = (start*-1); + int surround[8]; + int surround_hconduct[8]; + int lighting_ok=1; + float pGravX, pGravY, pGravD; + + if (sys_pause&&lighting_recreate>0) + { + for (i=0; i<=parts_lastActiveIndex; i++) + { + if (parts[i].type==PT_LIGH && parts[i].tmp2>0) + { + lighting_ok=0; + break; + } + } + } + + if (lighting_ok) + lighting_recreate--; + + if (lighting_recreate<0) + lighting_recreate=1; + + if (lighting_recreate>21) + lighting_recreate=21; + + if (sys_pause&&!framerender)//do nothing if paused + return; + + //wire! + if(elementCount[PT_WIRE] > 0) + { + for (nx=0; nx>8].type==PT_WIRE) + parts[r>>8].tmp=parts[r>>8].ctype; + } + } + } + //game of life! + if (elementCount[PT_LIFE]>0&&++CGOL>=GSPEED)//GSPEED is frames per generation + { + int createdsomething = 0; + CGOL=0; + ISGOL=0; + for (nx=CELL; nx>8].type==PT_LIFE/* && parts[r>>8].ctype==golnum-1*/) + { + golnum = parts[r>>8].ctype+1; + if (golnum<=0 || golnum>NGOLALT) { + parts[r>>8].type = PT_NONE; + continue; + } + if (parts[r>>8].tmp == grule[golnum][9]-1) { + gol[nx][ny] = golnum; + for ( nnx=-1; nnx<2; nnx++) + { + for ( nny=-1; nny<2; nny++)//it will count itself as its own neighbor, which is needed, but will have 1 extra for delete check + { + rt = pmap[((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL]; + if (!rt || (rt&0xFF)==PT_LIFE) + { + gol2[((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL][((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][golnum] ++; + gol2[((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL][((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][0] ++; + } + } + } + } else { + parts[r>>8].tmp --; + if (parts[r>>8].tmp<=0) + parts[r>>8].type = PT_NONE;//using kill_part makes it not work + } + } + //} + } + } + } + for (nx=CELL; nx=2&&gol2[nx][ny][golnum]>=(goldelete%2)+goldelete/2) + { + if (create_part(-1, nx, ny, PT_LIFE|((golnum-1)<<8))) + createdsomething = 1; + } + else if (gol[nx][ny]==golnum&&(grule[golnum][goldelete-1]==0||grule[golnum][goldelete-1]==2))//subtract 1 because it counted itself + { + if (parts[r>>8].tmp==grule[golnum][9]-1) + parts[r>>8].tmp --; + } + if (r && parts[r>>8].tmp<=0) + parts[r>>8].type = PT_NONE;//using kill_part makes it not work + } + for ( z = 0; z<=NGOL; z++) + gol2[nx][ny][z] = 0;//this improves performance A LOT compared to the memset, i was getting ~23 more fps with this. + } + } + //memset(gol2, 0, sizeof(gol2)); + } + if (ISWIRE==1)//wifi channel reseting + { + for ( q = 0; q<(int)(MAX_TEMP-73.15f)/100+2; q++) + if (!wireless[q][1]) + { + wireless[q][0] = 0; + } + else + wireless[q][1] = 0; + } + //the main particle loop function, goes over all particles. + for (i=0; i<=parts_lastActiveIndex; i++) + if (parts[i].type) + { + lx = parts[i].x; + ly = parts[i].y; + t = parts[i].type; + if (t<0 || t>=PT_NUM) + { + kill_part(i); + continue; + } + //printf("parts[%d].type: %d\n", i, parts[i].type); + + if (parts[i].life>0 && (ptypes[t].properties&PROP_LIFE_DEC)) + { + // automatically decrease life + parts[i].life--; + if (parts[i].life<=0 && (ptypes[t].properties&(PROP_LIFE_KILL_DEC|PROP_LIFE_KILL))) + { + // kill on change to no life + kill_part(i); + continue; + } + } + else if (parts[i].life<=0 && (ptypes[t].properties&PROP_LIFE_KILL)) + { + // kill if no life + kill_part(i); + continue; + } + + x = (int)(parts[i].x+0.5f); + y = (int)(parts[i].y+0.5f); + + //this kills any particle out of the screen, or in a wall where it isn't supposed to go + if (x=XRES-CELL || y>=YRES-CELL || + (bmap[y/CELL][x/CELL] && + (bmap[y/CELL][x/CELL]==WL_WALL || + bmap[y/CELL][x/CELL]==WL_WALLELEC || + bmap[y/CELL][x/CELL]==WL_ALLOWAIR || + (bmap[y/CELL][x/CELL]==WL_DESTROYALL) || + (bmap[y/CELL][x/CELL]==WL_ALLOWLIQUID && ptypes[t].falldown!=2) || + (bmap[y/CELL][x/CELL]==WL_ALLOWSOLID && ptypes[t].falldown!=1) || + (bmap[y/CELL][x/CELL]==WL_ALLOWGAS && !(ptypes[t].properties&TYPE_GAS)) || //&& ptypes[t].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE && parts[i].type!=PT_HFLM) || + (bmap[y/CELL][x/CELL]==WL_ALLOWENERGY && !(ptypes[t].properties&TYPE_ENERGY)) || + (bmap[y/CELL][x/CELL]==WL_DETECT && (t==PT_METL || t==PT_SPRK)) || + (bmap[y/CELL][x/CELL]==WL_EWALL && !emap[y/CELL][x/CELL])) && (t!=PT_STKM) && (t!=PT_STKM2) && (t!=PT_FIGH))) + { + kill_part(i); + continue; + } + if (bmap[y/CELL][x/CELL]==WL_DETECT && emap[y/CELL][x/CELL]<8) + set_emap(x/CELL, y/CELL); + + //adding to velocity from the particle's velocity + vx[y/CELL][x/CELL] = vx[y/CELL][x/CELL]*ptypes[t].airloss + ptypes[t].airdrag*parts[i].vx; + vy[y/CELL][x/CELL] = vy[y/CELL][x/CELL]*ptypes[t].airloss + ptypes[t].airdrag*parts[i].vy; + + if (t==PT_GAS||t==PT_NBLE) + { + if (pv[y/CELL][x/CELL]<3.5f) + pv[y/CELL][x/CELL] += ptypes[t].hotair*(3.5f-pv[y/CELL][x/CELL]); + if (y+CELL= 0 && y-2 < YRES && (ptypes[t].properties&TYPE_LIQUID)) {//some heat convection for liquids + r = pmap[y-2][x]; + if (!(!r || parts[i].type != (r&0xFF))) { + if (parts[i].temp>parts[r>>8].temp) { + swappage = parts[i].temp; + parts[i].temp = parts[r>>8].temp; + parts[r>>8].temp = swappage; + } + } + } + + //heat transfer code + h_count = 0; +#ifdef REALHEAT + if (t&&(t!=PT_HSWC||parts[i].life==10)) + { + float c_Cm = 0.0f; +#else + if (t&&(t!=PT_HSWC||parts[i].life==10)&&ptypes[t].hconduct>(rand()%250)) + { + float c_Cm = 0.0f; +#endif + if (aheat_enable) + { + c_heat = (hv[y/CELL][x/CELL]-parts[i].temp)*0.04; + c_heat = restrict_flt(c_heat, -MAX_TEMP+MIN_TEMP, MAX_TEMP-MIN_TEMP); + parts[i].temp += c_heat; + hv[y/CELL][x/CELL] -= c_heat; + } + c_heat = 0.0f; + for (j=0; j<8; j++) + { + surround_hconduct[j] = i; + r = surround[j]; + if (!r) + continue; + rt = r&0xFF; + if (rt&&ptypes[rt].hconduct&&(rt!=PT_HSWC||parts[r>>8].life==10) + &&(t!=PT_FILT||(rt!=PT_BRAY&&rt!=PT_BIZR&&rt!=PT_BIZRG)) + &&(rt!=PT_FILT||(t!=PT_BRAY&&t!=PT_PHOT&&t!=PT_BIZR&&t!=PT_BIZRG))) + { + surround_hconduct[j] = r>>8; +#ifdef REALHEAT + c_heat += parts[r>>8].temp*96.645/ptypes[rt].hconduct*fabs(ptypes[rt].weight); + c_Cm += 96.645/ptypes[rt].hconduct*fabs(ptypes[rt].weight); +#else + c_heat += parts[r>>8].temp; +#endif + h_count++; + } + } +#ifdef REALHEAT + if (t == PT_PHOT) + pt = (c_heat+parts[i].temp*96.645)/(c_Cm+96.645); + else + pt = (c_heat+parts[i].temp*96.645/ptypes[t].hconduct*fabs(ptypes[t].weight))/(c_Cm+96.645/ptypes[t].hconduct*fabs(ptypes[t].weight)); + +#else + pt = (c_heat+parts[i].temp)/(h_count+1); +#endif + pt = parts[i].temp = restrict_flt(pt, MIN_TEMP, MAX_TEMP); + for (j=0; j<8; j++) + { + parts[surround_hconduct[j]].temp = pt; + } + + ctemph = ctempl = pt; + // change boiling point with pressure + if ((ptypes[t].state==ST_LIQUID && ptransitions[t].tht>-1 && ptransitions[t].tht-1 && ptransitions[t].tltptransitions[t].thv&&ptransitions[t].tht>-1) { + // particle type change due to high temperature + if (ptransitions[t].tht!=PT_NUM) + t = ptransitions[t].tht; + else if (t==PT_ICEI) { + if (parts[i].ctype>0&&parts[i].ctype274.0f) t = PT_WATR; + else s = 0; + } + else if (t==PT_SLTW) { + if (1>rand()%6) t = PT_SALT; + else t = PT_WTRV; + } + else s = 0; + } else if (ctempl-1) { + // particle type change due to low temperature + if (ptransitions[t].tlt!=PT_NUM) + t = ptransitions[t].tlt; + else if (t==PT_WTRV) { + if (pt<273.0f) t = PT_RIME; + else t = PT_DSTW; + } + else if (t==PT_LAVA) { + if (parts[i].ctype>0 && parts[i].ctype=ptransitions[PT_BMTL].thv) s = 0; + else if (ptransitions[parts[i].ctype].tht==PT_LAVA) { + if (pt>=ptransitions[parts[i].ctype].thv) s = 0; + } + else if (pt>=973.0f) s = 0; // freezing point for lava with any other (not listed in ptransitions as turning into lava) ctype + if (s) { + t = parts[i].ctype; + parts[i].ctype = PT_NONE; + if (t==PT_THRM) { + parts[i].tmp = 0; + t = PT_BMTL; + } + if (t==PT_PLUT) + { + parts[i].tmp = 0; + t = PT_LAVA; + } + } + } + else if (pt<973.0f) t = PT_STNE; + else s = 0; + } + else s = 0; + } + else s = 0; + if (s) { // particle type change occurred + if (t==PT_ICEI||t==PT_LAVA) + parts[i].ctype = parts[i].type; + if (!(t==PT_ICEI&&parts[i].ctype==PT_FRZW)) parts[i].life = 0; + if (ptypes[t].state==ST_GAS&&ptypes[parts[i].type].state!=ST_GAS) + pv[y/CELL][x/CELL] += 0.50f; + part_change_type(i,x,y,t); + if (t==PT_FIRE||t==PT_PLSM||t==PT_HFLM) + parts[i].life = rand()%50+120; + if (t==PT_LAVA) { + if (parts[i].ctype==PT_BRMT) parts[i].ctype = PT_BMTL; + else if (parts[i].ctype==PT_SAND) parts[i].ctype = PT_GLAS; + else if (parts[i].ctype==PT_BGLA) parts[i].ctype = PT_GLAS; + else if (parts[i].ctype==PT_PQRT) parts[i].ctype = PT_QRTZ; + parts[i].life = rand()%120+240; + } + if (t==PT_NONE) { + kill_part(i); + goto killed; + } + } + + pt = parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); + if (t==PT_LAVA) { + parts[i].life = restrict_flt((parts[i].temp-700)/7, 0.0f, 400.0f); + if (parts[i].ctype==PT_THRM&&parts[i].tmp>0) + { + parts[i].tmp--; + parts[i].temp = 3500; + } + if (parts[i].ctype==PT_PLUT&&parts[i].tmp>0) + { + parts[i].tmp--; + parts[i].temp = MAX_TEMP; + } + } + } + } + + if (t==PT_LIFE) + { + parts[i].temp = restrict_flt(parts[i].temp-50.0f, MIN_TEMP, MAX_TEMP); + //ISGOL=1;//means there is a life particle on screen + } + if (t==PT_WIRE) + { + //wire_placed = 1; + } + //spark updates from walls + if ((ptypes[t].properties&PROP_CONDUCTS) || t==PT_SPRK) + { + nx = x % CELL; + if (nx == 0) + nx = x/CELL - 1; + else if (nx == CELL-1) + nx = x/CELL + 1; + else + nx = x/CELL; + ny = y % CELL; + if (ny == 0) + ny = y/CELL - 1; + else if (ny == CELL-1) + ny = y/CELL + 1; + else + ny = y/CELL; + if (nx>=0 && ny>=0 && nx2.5f) + { + parts[i].life = rand()%80+180; + parts[i].temp = restrict_flt(ptypes[PT_FIRE].heat + (ptypes[t].flammable/2), MIN_TEMP, MAX_TEMP); + t = PT_FIRE; + part_change_type(i,x,y,t); + pv[y/CELL][x/CELL] += 0.25f * CFDS; + } + + + s = 1; + gravtot = fabs(gravy[(y/CELL)*(XRES/CELL)+(x/CELL)])+fabs(gravx[(y/CELL)*(XRES/CELL)+(x/CELL)]); + if (pv[y/CELL][x/CELL]>ptransitions[t].phv&&ptransitions[t].pht>-1) { + // particle type change due to high pressure + if (ptransitions[t].pht!=PT_NUM) + t = ptransitions[t].pht; + else if (t==PT_BMTL) { + if (pv[y/CELL][x/CELL]>2.5f) + t = PT_BRMT; + else if (pv[y/CELL][x/CELL]>1.0f && parts[i].tmp==1) + t = PT_BRMT; + else s = 0; + } + else s = 0; + } else if (pv[y/CELL][x/CELL]-1) { + // particle type change due to low pressure + if (ptransitions[t].plt!=PT_NUM) + t = ptransitions[t].plt; + else s = 0; + } else if (gravtot>(ptransitions[t].phv/4.0f)&&ptransitions[t].pht>-1) { + // particle type change due to high gravity + if (ptransitions[t].pht!=PT_NUM) + t = ptransitions[t].pht; + else if (t==PT_BMTL) { + if (gravtot>0.625f) + t = PT_BRMT; + else if (gravtot>0.25f && parts[i].tmp==1) + t = PT_BRMT; + else s = 0; + } + else s = 0; + } else s = 0; + if (s) { // particle type change occurred + parts[i].life = 0; + part_change_type(i,x,y,t); + if (t==PT_FIRE) + parts[i].life = rand()%50+120; + if (t==PT_NONE) { + kill_part(i); + goto killed; + } + } + + //call the particle update function, if there is one +#ifdef LUACONSOLE + if (ptypes[t].update_func && lua_el_mode[t] != 2) +#else + if (ptypes[t].update_func) +#endif + { + if ((*(ptypes[t].update_func))(this, i,x,y,surround_space,nt, parts, pmap)) + continue; + } +#ifdef LUACONSOLE + if(lua_el_mode[t]) + { + if(luacon_part_update(t,i,x,y,surround_space,nt)) + continue; + } +#endif + if (legacy_enable)//if heat sim is off + update_legacy_all(this, i,x,y,surround_space,nt, parts, pmap); + +killed: + if (parts[i].type == PT_NONE)//if its dead, skip to next particle + continue; + + if (!parts[i].vx&&!parts[i].vy)//if its not moving, skip to next particle, movement code it next + continue; + +#if defined(WIN32) && !defined(__GNUC__) + mv = max(fabsf(parts[i].vx), fabsf(parts[i].vy)); +#else + mv = fmaxf(fabsf(parts[i].vx), fabsf(parts[i].vy)); +#endif + if (mv < ISTP) + { + clear_x = x; + clear_y = y; + clear_xf = parts[i].x; + clear_yf = parts[i].y; + fin_xf = clear_xf + parts[i].vx; + fin_yf = clear_yf + parts[i].vy; + fin_x = (int)(fin_xf+0.5f); + fin_y = (int)(fin_yf+0.5f); + } + else + { + // interpolate to see if there is anything in the way + dx = parts[i].vx*ISTP/mv; + dy = parts[i].vy*ISTP/mv; + fin_xf = parts[i].x; + fin_yf = parts[i].y; + while (1) + { + mv -= ISTP; + fin_xf += dx; + fin_yf += dy; + fin_x = (int)(fin_xf+0.5f); + fin_y = (int)(fin_yf+0.5f); + if (mv <= 0.0f) + { + // nothing found + fin_xf = parts[i].x + parts[i].vx; + fin_yf = parts[i].y + parts[i].vy; + fin_x = (int)(fin_xf+0.5f); + fin_y = (int)(fin_yf+0.5f); + clear_xf = fin_xf-dx; + clear_yf = fin_yf-dy; + clear_x = (int)(clear_xf+0.5f); + clear_y = (int)(clear_yf+0.5f); + break; + } + if (fin_x=XRES-CELL || fin_y>=YRES-CELL || pmap[fin_y][fin_x] || (bmap[fin_y/CELL][fin_x/CELL] && (bmap[fin_y/CELL][fin_x/CELL]==WL_DESTROYALL || bmap[fin_y/CELL][fin_x/CELL]==WL_DETECT || !eval_move(t,fin_x,fin_y,NULL)))) + { + // found an obstacle + clear_xf = fin_xf-dx; + clear_yf = fin_yf-dy; + clear_x = (int)(clear_xf+0.5f); + clear_y = (int)(clear_yf+0.5f); + break; + } + + } + } + + stagnant = parts[i].flags & FLAG_STAGNANT; + parts[i].flags &= ~FLAG_STAGNANT; + + if ((t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)) { + if (t == PT_PHOT) { + rt = pmap[fin_y][fin_x] & 0xFF; + lt = pmap[y][x] & 0xFF; + + r = eval_move(PT_PHOT, fin_x, fin_y, NULL); + if (((rt==PT_GLAS && lt!=PT_GLAS) || (rt!=PT_GLAS && lt==PT_GLAS)) && r) { + if (!get_normal_interp(REFRACT|t, parts[i].x, parts[i].y, parts[i].vx, parts[i].vy, &nrx, &nry)) { + kill_part(i); + continue; + } + + r = get_wavelength_bin(&parts[i].ctype); + if (r == -1) { + kill_part(i); + continue; + } + nn = GLASS_IOR - GLASS_DISP*(r-15)/15.0f; + nn *= nn; + nrx = -nrx; + nry = -nry; + if (rt==PT_GLAS && lt!=PT_GLAS) + nn = 1.0f/nn; + ct1 = parts[i].vx*nrx + parts[i].vy*nry; + ct2 = 1.0f - (nn*nn)*(1.0f-(ct1*ct1)); + if (ct2 < 0.0f) { + // total internal reflection + parts[i].vx -= 2.0f*ct1*nrx; + parts[i].vy -= 2.0f*ct1*nry; + fin_xf = parts[i].x; + fin_yf = parts[i].y; + fin_x = x; + fin_y = y; + } else { + // refraction + ct2 = sqrtf(ct2); + ct2 = ct2 - nn*ct1; + parts[i].vx = nn*parts[i].vx + ct2*nrx; + parts[i].vy = nn*parts[i].vy + ct2*nry; + } + } + } + if (stagnant)//FLAG_STAGNANT set, was reflected on previous frame + { + // cast coords as int then back to float for compatibility with existing saves + if (!do_move(i, x, y, (float)fin_x, (float)fin_y)) { + kill_part(i); + continue; + } + } + else if (!do_move(i, x, y, fin_xf, fin_yf)) + { + // reflection + parts[i].flags |= FLAG_STAGNANT; + if (t==PT_NEUT && 100>(rand()%1000)) + { + kill_part(i); + continue; + } + r = pmap[fin_y][fin_x]; + + if ((r & 0xFF) == PT_PIPE && !(parts[r>>8].tmp&0xFF)) + { + parts[r>>8].tmp = (parts[r>>8].tmp&~0xFF) | parts[i].type; + parts[r>>8].temp = parts[i].temp; + parts[r>>8].flags = parts[i].life; + parts[r>>8].pavg[0] = parts[i].tmp; + parts[r>>8].pavg[1] = parts[i].ctype; + kill_part(i); + continue; + } + + // this should be replaced with a particle type attribute ("photwl" or something) + if ((r & 0xFF) == PT_PSCN) parts[i].ctype = 0x00000000; + if ((r & 0xFF) == PT_NSCN) parts[i].ctype = 0x00000000; + if ((r & 0xFF) == PT_SPRK) parts[i].ctype = 0x00000000; + if ((r & 0xFF) == PT_COAL) parts[i].ctype = 0x00000000; + if ((r & 0xFF) == PT_BCOL) parts[i].ctype = 0x00000000; + if ((r & 0xFF) == PT_PLEX) parts[i].ctype &= 0x1F00003E; + if ((r & 0xFF) == PT_NITR) parts[i].ctype &= 0x0007C000; + if ((r & 0xFF) == PT_NBLE) parts[i].ctype &= 0x3FFF8000; + if ((r & 0xFF) == PT_LAVA) parts[i].ctype &= 0x3FF00000; + if ((r & 0xFF) == PT_ACID) parts[i].ctype &= 0x1FE001FE; + if ((r & 0xFF) == PT_DUST) parts[i].ctype &= 0x3FFFFFC0; + if ((r & 0xFF) == PT_SNOW) parts[i].ctype &= 0x03FFFFFF; + if ((r & 0xFF) == PT_GOO) parts[i].ctype &= 0x3FFAAA00; + if ((r & 0xFF) == PT_PLNT) parts[i].ctype &= 0x0007C000; + if ((r & 0xFF) == PT_PLUT) parts[i].ctype &= 0x001FCE00; + if ((r & 0xFF) == PT_URAN) parts[i].ctype &= 0x003FC000; + + if (get_normal_interp(t, parts[i].x, parts[i].y, parts[i].vx, parts[i].vy, &nrx, &nry)) { + dp = nrx*parts[i].vx + nry*parts[i].vy; + parts[i].vx -= 2.0f*dp*nrx; + parts[i].vy -= 2.0f*dp*nry; + // leave the actual movement until next frame so that reflection of fast particles and refraction happen correctly + } else { + if (t!=PT_NEUT) + kill_part(i); + continue; + } + if (!parts[i].ctype&&t!=PT_NEUT&&t!=PT_ELEC) { + kill_part(i); + continue; + } + } + } + else if (ptypes[t].falldown==0) + { + // gasses and solids (but not powders) + if (!do_move(i, x, y, fin_xf, fin_yf)) + { + // can't move there, so bounce off + // TODO + if (fin_x>x+ISTP) fin_x=x+ISTP; + if (fin_xy+ISTP) fin_y=y+ISTP; + if (fin_y= rand()%400)//checking stagnant is cool, but then it doesn't update when you change it later. + { + if (!flood_water(x,y,i,y, parts[i].tmp2)) + goto movedone; + } + // liquids and powders + if (!do_move(i, x, y, fin_xf, fin_yf)) + { + if (fin_x!=x && do_move(i, x, y, fin_xf, clear_yf)) + { + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + } + else if (fin_y!=y && do_move(i, x, y, clear_xf, fin_yf)) + { + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + } + else + { + s = 1; + r = (rand()%2)*2-1; + if ((clear_x!=x || clear_y!=y || nt || surround_space) && + (fabsf(parts[i].vx)>0.01f || fabsf(parts[i].vy)>0.01f)) + { + // allow diagonal movement if target position is blocked + // but no point trying this if particle is stuck in a block of identical particles + dx = parts[i].vx - parts[i].vy*r; + dy = parts[i].vy + parts[i].vx*r; + if (fabsf(dy)>fabsf(dx)) + mv = fabsf(dy); + else + mv = fabsf(dx); + dx /= mv; + dy /= mv; + if (do_move(i, x, y, clear_xf+dx, clear_yf+dy)) + { + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + goto movedone; + } + swappage = dx; + dx = dy*r; + dy = -swappage*r; + if (do_move(i, x, y, clear_xf+dx, clear_yf+dy)) + { + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + goto movedone; + } + } + if (ptypes[t].falldown>1 && !ngrav_enable && gravityMode==0 && parts[i].vy>fabsf(parts[i].vx)) + { + s = 0; + // stagnant is true if FLAG_STAGNANT was set for this particle in previous frame + if (!stagnant || nt) //nt is if there is an something else besides the current particle type, around the particle + rt = 30;//slight less water lag, although it changes how it moves a lot + else + rt = 10; + for (j=clear_x+r; j>=0 && j>=clear_x-rt && j0) + r = 1; + else + r = -1; + if (s==1) + for (j=ny+r; j>=0 && j=ny-rt && j1 && fabsf(pGravX*parts[i].vx+pGravY*parts[i].vy)>fabsf(pGravY*parts[i].vx-pGravX*parts[i].vy)) + { + float nxf, nyf, prev_pGravX, prev_pGravY, ptGrav = ptypes[t].gravity; + s = 0; + // stagnant is true if FLAG_STAGNANT was set for this particle in previous frame + if (!stagnant || nt) //nt is if there is an something else besides the current particle type, around the particle + rt = 30;//slight less water lag, although it changes how it moves a lot + else + rt = 10; + nxf = clear_xf; + nyf = clear_yf; + for (j=0;jfabsf(pGravX)) + mv = fabsf(pGravY); + else + mv = fabsf(pGravX); + if (mv<0.0001f) break; + pGravX /= mv; + pGravY /= mv; + if (j) + { + nxf += r*(pGravY*2.0f-prev_pGravY); + nyf += -r*(pGravX*2.0f-prev_pGravX); + } + else + { + nxf += r*pGravY; + nyf += -r*pGravX; + } + prev_pGravX = pGravX; + prev_pGravY = pGravY; + nx = (int)(nxf+0.5f); + ny = (int)(nyf+0.5f); + if (nx<0 || ny<0 || nx>=XRES || ny >=YRES) + break; + if ((pmap[ny][nx]&0xFF)!=t || bmap[ny/CELL][nx/CELL]) + { + s = do_move(i, x, y, nxf, nyf); + if (s) + { + nx = (int)(parts[i].x+0.5f); + ny = (int)(parts[i].y+0.5f); + break; + } + if (bmap[ny/CELL][nx/CELL]!=WL_STREAM) + break; + } + } + if (s==1) + { + clear_x = nx; + clear_y = ny; + for (j=0;jfabsf(pGravX)) + mv = fabsf(pGravY); + else + mv = fabsf(pGravX); + if (mv<0.0001f) break; + pGravX /= mv; + pGravY /= mv; + nxf += pGravX; + nyf += pGravY; + nx = (int)(nxf+0.5f); + ny = (int)(nyf+0.5f); + if (nx<0 || ny<0 || nx>=XRES || ny>=YRES) + break; + if ((pmap[ny][nx]&0xFF)!=t || bmap[ny/CELL][nx/CELL]) + { + s = do_move(i, clear_x, clear_y, nxf, nyf); + if (s || bmap[ny/CELL][nx/CELL]!=WL_STREAM) + break; + } + } + } + else if (s==-1) {} // particle is out of bounds + else if ((clear_x!=x||clear_y!=y) && do_move(i, x, y, clear_xf, clear_yf)) {} + else parts[i].flags |= FLAG_STAGNANT; + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + } + else + { + // if interpolation was done, try moving to last clear position + if ((clear_x!=x||clear_y!=y) && do_move(i, x, y, clear_xf, clear_yf)) {} + else parts[i].flags |= FLAG_STAGNANT; + parts[i].vx *= ptypes[t].collision; + parts[i].vy *= ptypes[t].collision; + } + } + } + } +movedone: + continue; + } +} + +void Simulation::update_particles()//doesn't update the particles themselves, but some other things +{ + int i, j, x, y, t, nx, ny, r, cr,cg,cb, l = -1; + float lx, ly; + int lastPartUsed = 0; + int lastPartUnused = -1; +#ifdef MT + int pt = 0, pc = 0; + pthread_t *InterThreads; +#endif + + air->update_air(); + + memset(pmap, 0, sizeof(pmap)); + memset(photons, 0, sizeof(photons)); + NUM_PARTS = 0; + for (i=0; i<=parts_lastActiveIndex; i++)//the particle loop that resets the pmap/photon maps every frame, to update them. + { + if (parts[i].type) + { + t = parts[i].type; + x = (int)(parts[i].x+0.5f); + y = (int)(parts[i].y+0.5f); + if (x>=0 && y>=0 && x=NPART-1) pfree = -1; + else pfree = parts_lastActiveIndex+1; + } + else + { + if (parts_lastActiveIndex>=NPART-1) parts[lastPartUnused].life = -1; + else parts[lastPartUnused].life = parts_lastActiveIndex+1; + } + parts_lastActiveIndex = lastPartUsed; + if (!sys_pause||framerender) + { + for (y=0; y=XRES || ny<0 || ny>=YRES) + break; + addpixel(vid, nx, ny, 255, 255, 255, 64); + i = nx/CELL; + j = ny/CELL; + lx += vx[j][i]*0.125f; + ly += vy[j][i]*0.125f; + if (bmap[j][i]==WL_STREAM && i!=x && j!=y) + break; + } + drawtext(vid, x*CELL, y*CELL-2, "\x8D", 255, 255, 255, 128); + } +*/ +} + +Simulation::Simulation() +{ + //Create and attach gravity simulation + grav = new Gravity(); + //Give air sim references to our data + grav->bmap = bmap; + //Gravity sim gives us maps to use + gravx = grav->gravx; + gravy = grav->gravy; + gravp = grav->gravp; + gravmap = grav->gravmap; + + //Create and attach air simulation + air = new Air(); + //Give air sim references to our data + air->bmap = bmap; + air->emap = emap; + air->fvx = fvx; + air->fvy = fvy; + //Air sim gives us maps to use + vx = air->vx; + vy = air->vy; + pv = air->pv; + hv = air->hv; + + //ptypes[0] = {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, 0, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}; + //ptypes[1] = {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, 0, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}; + //ptypes[2] = {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, 0, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}; + +#define SC_WALL 0 +#define SC_ELEC 1 +#define SC_POWERED 2 +#define SC_EXPLOSIVE 3 +#define SC_GAS 4 +#define SC_LIQUID 5 +#define SC_POWDERS 6 +#define SC_SOLIDS 7 +#define SC_NUCLEAR 8 +#define SC_SPECIAL 9 +#define SC_LIFE 10 +#define SC_TOOL 11 +#define SC_CRACKER 13 +#define SC_CRACKER2 14 +#define SC_TOTAL 12 + + part_type ptypest[PT_NUM] = + { + //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description + {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}, + {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}, + {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}, + {"OIL", PIXPACK(0x404010), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 20, 0, 0, 5, 1, 1, 20, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Flammable.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"FIRE", PIXPACK(0xFF1000), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, R_TEMP+400.0f+273.15f, 88, "Ignites flammable materials. Heats air.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_FIRE}, + {"STNE", PIXPACK(0xA0A0A0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Heavy particles. Meltable.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"LAVA", PIXPACK(0xE05010), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.0003f * CFDS, 2, 0, 0, 0, 2, 1, 1, 45, SC_LIQUID, R_TEMP+1500.0f+273.15f, 60, "Heavy liquid. Ignites flammable materials. Solidifies when cold.", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC, &update_PYRO, &graphics_LAVA}, + {"GUN", PIXPACK(0xC0C0D0), 0.7f, 0.02f * CFDS, 0.94f, 0.80f, -0.1f, 0.1f, 0.00f, 0.000f * CFDS, 1, 600, 1, 0, 10, 1, 1, 85, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 97, "Light dust. Explosive.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"NITR", PIXPACK(0x20E010), 0.5f, 0.02f * CFDS, 0.92f, 0.97f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 2, 1000, 2, 0, 3, 1, 1, 23, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 50, "Liquid. Pressure sensitive explosive.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"CLNE", PIXPACK(0xFFD010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Solid. Duplicates any particles it touches.", ST_SOLID, TYPE_SOLID, &update_CLNE, NULL}, + {"GAS", PIXPACK(0xE0FF20), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 600, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Gas. Diffuses. Flammable. Liquefies under pressure.", ST_GAS, TYPE_GAS, NULL, NULL}, + {"C-4", PIXPACK(0xD080E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 2, 50, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Solid. Pressure sensitive explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, NULL, NULL}, + {"GOO", PIXPACK(0x804000), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 75, "Solid. Deforms and disappears under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GOO, NULL}, + {"ICE", PIXPACK(0xA0C0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP-50.0f+273.15f, 46, "Solid. Freezes water. Crushes under pressure. Cools down air.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ICEI, NULL}, + {"METL", PIXPACK(0x404060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Conducts electricity. Meltable.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, + {"SPRK", PIXPACK(0xFFFF80), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electricity. Conducted by metal and water.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SPRK, &graphics_SPRK}, + {"SNOW", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f, -0.00005f* CFDS,1, 0, 0, 0, 20, 1, 1, 50, SC_POWDERS, R_TEMP-30.0f+273.15f, 46, "Light particles.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_ICEI, NULL}, + {"WOOD", PIXPACK(0xC0A040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 15, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Solid. Flammable.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, NULL, NULL}, + {"NEUT", PIXPACK(0x20E0FF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 60, "Neutrons. Interact with matter in odd ways.", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_NEUT, &graphics_NEUT}, + {"PLUT", PIXPACK(0x407020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 251, "Heavy particles. Fissile. Generates neutrons under pressure.", ST_SOLID, TYPE_PART|PROP_NEUTPENETRATE|PROP_RADIOACTIVE, &update_PLUT, NULL}, + {"PLNT", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 65, "Plant, drinks water and grows.", ST_SOLID, TYPE_SOLID|PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_PLNT, NULL}, + {"ACID", PIXPACK(0xED55FF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 40, 0, 0, 1, 1, 1, 10, SC_LIQUID, R_TEMP+0.0f +273.15f, 34, "Dissolves almost everything.", ST_LIQUID, TYPE_LIQUID|PROP_DEADLY, &update_ACID, &graphics_ACID}, + {"VOID", PIXPACK(0x790B0B), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Hole, will drain away any particles.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"WTRV", PIXPACK(0xA0A0FF), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, -0.1f, 0.75f, 0.0003f * CFDS, 0, 0, 0, 0, 4, 1, 1, 1, SC_GAS, R_TEMP+100.0f+273.15f, 48, "Steam, heats up air, produced from hot water.", ST_GAS, TYPE_GAS, &update_WTRV, NULL}, + {"CNCT", PIXPACK(0xC0C0C0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 100, "Concrete, stronger than stone.", ST_SOLID, TYPE_PART|PROP_HOT_GLOW, NULL, NULL}, + {"DSTW", PIXPACK(0x1020C0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 23, "Distilled water, does not conduct electricity.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_DSTW, NULL}, + {"SALT", PIXPACK(0xFFFFFF), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 75, SC_POWDERS, R_TEMP+0.0f +273.15f, 110, "Salt, dissolves in water.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"SLTW", PIXPACK(0x4050F0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP+0.0f +273.15f, 75, "Saltwater, conducts electricity, difficult to freeze.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_SLTW, NULL}, + {"DMND", PIXPACK(0xCCFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 186, "Diamond. Indestructible.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"BMTL", PIXPACK(0x505070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Breakable metal.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_BMTL, NULL}, + {"BRMT", PIXPACK(0x705060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken metal.", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_BRMT, NULL}, + {"PHOT", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+900.0f+273.15f, 251, "Photons. Travel in straight lines.", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_PHOT, &graphics_PHOT}, + {"URAN", PIXPACK(0x707020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_NUCLEAR, R_TEMP+30.0f+273.15f, 251, "Heavy particles. Generates heat under pressure.", ST_SOLID, TYPE_PART | PROP_RADIOACTIVE, &update_URAN, NULL}, + {"WAX", PIXPACK(0xF0F0BB), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 44, "Wax. Melts at moderately high temperatures.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"MWAX", PIXPACK(0xE0E0AA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 5, 0, 0, 2, 1, 1, 25, SC_LIQUID, R_TEMP+28.0f+273.15f, 44, "Liquid Wax.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"PSCN", PIXPACK(0x805050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "P-Type Silicon, Will transfer current to any conductor.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"NSCN", PIXPACK(0x505080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "N-Type Silicon, Will not transfer current to P-Type Silicon.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"LN2", PIXPACK(0x80A0DF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 1, 30, SC_LIQUID, 70.15f, 70, "Liquid Nitrogen. Very cold.", ST_SOLID, TYPE_LIQUID, NULL, NULL}, + {"INSL", PIXPACK(0x9EA3B6), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 7, 0, 0, 10, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Insulator, does not conduct heat or electricity.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"VACU", PIXPACK(0x303030), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, -0.01f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+70.0f+273.15f, 255, "Vacuum, sucks in other particles and heats up.", ST_NONE, TYPE_SOLID, NULL, NULL}, + {"VENT", PIXPACK(0xEFEFEF), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.010f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP-16.0f+273.15f, 255, "Air vent, creates pressure and pushes other particles away.", ST_NONE, TYPE_SOLID, NULL, NULL}, + {"RBDM", PIXPACK(0xCCCCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 1, 50, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 240, "Rubidium, explosive, especially on contact with water, low melting point", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"LRBD", PIXPACK(0xAAAAAA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 1000, 1, 0, 2, 1, 1, 45, SC_EXPLOSIVE, R_TEMP+45.0f+273.15f, 170, "Liquid Rubidium.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"NTCT", PIXPACK(0x505040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when hot (More than 100C)", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NPTCT, NULL}, + {"SAND", PIXPACK(0xFFD090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Sand, Heavy particles. Meltable.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"GLAS", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 150, "Solid. Meltable. Shatters under pressure", ST_SOLID, TYPE_SOLID | PROP_NEUTPASS | PROP_HOT_GLOW | PROP_SPARKSETTLE, &update_GLAS, NULL}, + {"PTCT", PIXPACK(0x405050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when cold (Less than 100C)", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NPTCT, NULL}, + {"BGLA", PIXPACK(0x606060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Glass, Heavy particles. Meltable. Bagels.", ST_SOLID, TYPE_PART | PROP_HOT_GLOW, NULL, NULL}, + {"THDR", PIXPACK(0xFFFFA0), 0.0f, 0.00f * CFDS, 1.0f, 0.30f, -0.99f, 0.6f, 0.62f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_EXPLOSIVE, 9000.0f +273.15f, 1, "Lightning! Very hot, inflicts damage upon most materials, transfers current to metals.", ST_NONE, TYPE_ENERGY, &update_THDR, &graphics_THDR}, + {"PLSM", PIXPACK(0xBB99FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.30f, 0.001f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, 10000.0f +273.15f, 5, "Plasma, extremely hot.", ST_NONE, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_PLSM}, + {"ETRD", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)", ST_NONE, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"NICE", PIXPACK(0xC0E0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 35.0f, 46, "Nitrogen Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"NBLE", PIXPACK(0xEB4917), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 106, "Noble Gas. Diffuses. Conductive. Ionizes into plasma when introduced to electricity", ST_GAS, TYPE_GAS|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"BTRY", PIXPACK(0x858505), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Generates Electricity.", ST_SOLID, TYPE_SOLID, &update_BTRY, NULL}, + {"LCRY", PIXPACK(0x505050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)", ST_SOLID, TYPE_SOLID, &update_LCRY, &graphics_LCRY}, + {"STKM", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM, &graphics_STKM}, + {"SWCH", PIXPACK(0x103B11), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Only conducts when switched on. (PSCN switches on, NSCN switches off)", ST_SOLID, TYPE_SOLID, &update_SWCH, &graphics_SWCH}, + {"SMKE", PIXPACK(0x222222), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+320.0f+273.15f, 88, "Smoke", ST_SOLID, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_SMKE}, + {"DESL", PIXPACK(0x440000), 1.0f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.0f, 0.0f * CFDS, 2, 2, 0, 0, 5, 1, 1, 15, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Explodes under high pressure and temperatures", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"COAL", PIXPACK(0x222222), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly.", ST_SOLID, TYPE_SOLID, &update_COAL, &graphics_COAL}, + {"LOXY", PIXPACK(0x80A0EF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 5000, 0, 0, 0, 1, 1, 30, SC_LIQUID, 80.0f, 70, "Liquid Oxygen. Very cold. Reacts with fire", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"OXYG", PIXPACK(0x80A0FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 3.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Gas. Ignites easily.", ST_GAS, TYPE_GAS, &update_O2, NULL}, + {"INWR", PIXPACK(0x544141), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Insulated Wire. Doesn't conduct to metal or semiconductors.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"YEST", PIXPACK(0xEEE0C0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 15, 0, 0, 30, 1, 1, 80, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Yeast, grows when warm (~37C).", ST_SOLID, TYPE_PART, &update_YEST, NULL}, + {"DYST", PIXPACK(0xBBB0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 20, 0, 0, 30, 0, 1, 80, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Dead Yeast.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"THRM", PIXPACK(0xA08090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 211, "Thermite. Burns at extremely high temperature.", ST_SOLID, TYPE_PART, &update_THRM, NULL}, + {"GLOW", PIXPACK(0x445464), 0.3f, 0.02f * CFDS, 0.98f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 2, 1, 1, 40, SC_LIQUID, R_TEMP+20.0f+273.15f, 44, "Glow, Glows under pressure", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC, &update_GLOW, &graphics_GLOW}, + {"BRCK", PIXPACK(0x808080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Brick, breakable building material.", ST_SOLID, TYPE_SOLID|PROP_HOT_GLOW, NULL, NULL}, + {"CFLM", PIXPACK(0x8080FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.0005f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, 0.0f, 88, "Sub-zero flame.", ST_LIQUID, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, NULL, &graphics_HFLM}, + {"FIRW", PIXPACK(0xFFA040), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, -0.99f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 55, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 70, "Fireworks!", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_FIRW, &graphics_FIRW}, + {"FUSE", PIXPACK(0x0A5706), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly. Ignites at somewhat high temperatures and electricity.", ST_SOLID, TYPE_SOLID, &update_FUSE, NULL}, + {"FSEP", PIXPACK(0x63AD5F), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 70, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Fuse Powder. See FUSE.", ST_SOLID, TYPE_PART, &update_FSEP, NULL}, + {"AMTR", PIXPACK(0x808080), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.00f, 0.10f, 1.00f, 0.0000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Anti-Matter, Destroys a majority of particles", ST_NONE, TYPE_PART, &update_AMTR, NULL}, //Maybe TYPE_ENERGY? + {"BCOL", PIXPACK(0x333333), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Coal. Heavy particles. See COAL", ST_SOLID, TYPE_PART, &update_BCOL, NULL}, + {"PCLN", PIXPACK(0x3B3B0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, duplicates any particles it touches.", ST_NONE, TYPE_SOLID, &update_PCLN, &graphics_PCLN}, + {"HSWC", PIXPACK(0x3B0A0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Heat switch. Conducts Heat only when activated", ST_NONE, TYPE_SOLID, &update_HSWC, &graphics_HSWC}, + {"IRON", PIXPACK(0x707070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 50, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Rusts with salt, can be used for electrolysis of WATR", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_IRON, NULL}, + {"MORT", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_CRACKER2, R_TEMP+4.0f +273.15f, 60, "Steam Train.", ST_NONE, TYPE_PART, &update_MORT, NULL}, + {"LIFE", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 1, 100, SC_LIFE, 9000.0f, 40, "Game Of Life! B3/S23", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, &graphics_LIFE}, + {"DLAY", PIXPACK(0x753590), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, 4.0f+273.15f, 0, "Conducts with temperature-dependent delay. (use HEAT/COOL).", ST_SOLID, TYPE_SOLID, &update_DLAY, &graphics_DLAY}, + {"CO2", PIXPACK(0x666666), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.1f, 1.0f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+273.15f, 88, "Carbon Dioxide", ST_GAS, TYPE_GAS, &update_CO2, NULL}, + {"DRIC", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 172.65f, 2, "Dry Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"BUBW", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Carbonated water. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_CBNW, &graphics_CBNW}, + {"STOR", PIXPACK(0x50DFDF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. Stores a single particle, releases when charged with PSCN, also passes to PIPE", ST_NONE, TYPE_SOLID, &update_STOR, &graphics_STOR}, + {"PVOD", PIXPACK(0x792020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, destroys entering particles", ST_NONE, TYPE_SOLID, &update_PVOD, &graphics_PVOD}, + {"CONV", PIXPACK(0x0AAB0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Solid. Converts whatever touches it into its ctype.", ST_NONE, TYPE_SOLID, &update_CONV, NULL}, + {"CAUS", PIXPACK(0x80FFA0), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 1.50f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Caustic Gas, acts like Acid", ST_GAS, TYPE_GAS|PROP_DEADLY, &update_CAUS, NULL}, + {"LIGH", PIXPACK(0xFFFFC0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "More realistic lightning. Set pen size to set the size of the lightning.", ST_SOLID, TYPE_SOLID, &update_LIGH, &graphics_LIGH}, + {"TESC", PIXPACK(0x707040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Tesla coil!", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, + {"DEST", PIXPACK(0xFF3311), -0.05f, 0.00f * CFDS, 0.95f, 0.95f, -0.1f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 101, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 150, "More destructive Bomb.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_DEST, &graphics_DEST}, + {"SPNG", PIXPACK(0xFFBE30), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 1, 30, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "A sponge, absorbs water.", ST_SOLID, TYPE_SOLID, &update_SPNG, &graphics_SPNG}, + {"RIME", PIXPACK(0xCCCCCC), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 100, SC_CRACKER2, 243.15f, 100, "Not quite Ice", ST_SOLID, TYPE_SOLID, &update_RIME, NULL}, + {"FOG", PIXPACK(0xAAAAAA), 0.8f, 0.00f * CFDS, 0.4f, 0.70f, -0.1f, 0.0f, 0.99f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 1, SC_CRACKER2, 243.15f, 100, "Not quite Steam", ST_GAS, TYPE_GAS|PROP_LIFE_DEC, &update_FOG, NULL}, + {"BCLN", PIXPACK(0xFFD040), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Breakable Clone.", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_BCLN, NULL}, + {"LOVE", PIXPACK(0xFF30FF), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_CRACKER2, 373.0f, 40, "Love...", ST_GAS, TYPE_SOLID, &update_MISC, NULL}, + {"DEUT", PIXPACK(0x00153F), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 31, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 251, "Deuterium oxide. Volume changes with temp, radioactive with neutrons.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_DEUT, &graphics_DEUT}, + {"WARP", PIXPACK(0x000000), 0.8f, 0.00f * CFDS, 0.9f, 0.70f, -0.1f, 0.0f, 3.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 1, SC_NUCLEAR, R_TEMP +273.15f, 100, "Displaces other elements.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_WARP, NULL}, + {"PUMP", PIXPACK(0x0A0A3B), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 1, 100, SC_POWERED, 273.15f, 0, "Changes pressure to its temp when activated. (use HEAT/COOL).", ST_SOLID, TYPE_SOLID, &update_PUMP, &graphics_PUMP}, + {"FWRK", PIXPACK(0x666666), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 1, 1, 1, 97, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 100, "First fireworks made, activated by heat/neutrons.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_FWRK, NULL}, + {"PIPE", PIXPACK(0x444444), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, 273.15f, 0, "Moves elements around, read FAQ on website for help.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_PIPE, &graphics_PIPE}, + {"FRZZ", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f, -0.00005f* CFDS,1, 0, 0, 0, 20, 1, 1, 50, SC_POWDERS, 90.0f, 46, "FREEZE", ST_SOLID, TYPE_PART, &update_FRZZ, NULL}, + {"FRZW", PIXPACK(0x1020C0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_CRACKER2, 120.0f, 29, "FREEZE WATER", ST_LIQUID, TYPE_LIQUID||PROP_LIFE_DEC, &update_FRZW, NULL}, + {"GRAV", PIXPACK(0xFFE0A0), 0.7f, 0.00f * CFDS, 1.00f, 1.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Changes colour based on velocity.", ST_SOLID, TYPE_PART, &update_MISC, &graphics_GRAV}, + {"BIZR", PIXPACK(0x00FF77), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP+0.0f +273.15f, 29, "Bizarre... contradicts the normal state changes.", ST_LIQUID, TYPE_LIQUID, &update_BIZR, &graphics_BIZR}, + {"BIZG", PIXPACK(0x00FFBB), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 2.75f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_CRACKER2, R_TEMP-200.0f+273.15f, 42, "Bizarre gas", ST_GAS, TYPE_GAS, &update_BIZR, &graphics_BIZR}, + {"BIZS", PIXPACK(0x00E455), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_CRACKER2, R_TEMP+300.0f+273.15f, 251, "Bizarre solid", ST_SOLID, TYPE_SOLID, &update_BIZR, &graphics_BIZR}, + {"INST", PIXPACK(0x404039), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Instantly conducts, PSCN to charge, NSCN to take.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, NULL, NULL}, + {"ISOZ", PIXPACK(0xAA30D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 1, 24, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 29, "Radioactive liquid", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_ISZ, NULL}, + {"ISZS", PIXPACK(0x662089), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0007f* CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_NUCLEAR, 140.00f, 251, "Solid form of ISOZ, slowly decays.", ST_SOLID, TYPE_SOLID, &update_ISZ, NULL}, + {"PRTI", PIXPACK(0xEB5917), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.005f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Portal IN. Things go in here, now with channels (same as WIFI)", ST_SOLID, TYPE_SOLID, &update_PRTI, &graphics_PRTI}, + {"PRTO", PIXPACK(0x0020EB), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.005f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Portal OUT. Things come out here, now with channels (same as WIFI)", ST_SOLID, TYPE_SOLID, &update_PRTO, &graphics_PRTO}, + {"PSTE", PIXPACK(0xAA99AA), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 31, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Colloid, Hardens under pressure", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"PSTS", PIXPACK(0x776677), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 20, 0, 1, 100, SC_CRACKER, R_TEMP-2.0f +273.15f, 29, "Solid form of PSTE, temporary", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"ANAR", PIXPACK(0xFFFFEE), -0.7f, -0.02f * CFDS, 0.96f, 0.80f, 0.1f, -0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Behaves opposite gravity", ST_SOLID, TYPE_PART, &update_ANAR, NULL}, + {"VINE", PIXPACK(0x079A00), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 65, "Vine, grows", ST_SOLID, TYPE_SOLID, &update_VINE, NULL}, + {"INVS", PIXPACK(0x00CCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 15, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Invisible to everything while under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPASS, NULL, &graphics_INVS}, + {"EQVE", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 0, 1, 85, SC_CRACKER2, R_TEMP+0.0f +273.15f, 70, "Shared velocity test", ST_SOLID, TYPE_PART, NULL, NULL}, + {"SPWN2", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "STK2 spawn point", ST_SOLID, TYPE_SOLID, &update_SPAWN2, NULL}, + {"SPWN", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "STKM spawn point", ST_SOLID, TYPE_SOLID, &update_SPAWN, NULL}, + {"SHLD", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "Shield, spark it to grow", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD1, NULL}, + {"SHD2", PIXPACK(0x777777), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 2", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD2, NULL}, + {"SHD3", PIXPACK(0x444444), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 3", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD3, NULL}, + {"SHD4", PIXPACK(0x212121), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 4", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD4, NULL}, + {"LOLZ", PIXPACK(0x569212), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_CRACKER2, 373.0f, 40, "Lolz", ST_GAS, TYPE_SOLID, &update_MISC, NULL}, + {"WIFI", PIXPACK(0x40A060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 2, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Wireless transmitter, color coded.", ST_SOLID, TYPE_SOLID, &update_WIFI, &graphics_WIFI}, + {"FILT", PIXPACK(0x000056), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Filter for photons, changes the color.", ST_SOLID, TYPE_SOLID, NULL, &graphics_FILT}, + {"ARAY", PIXPACK(0xFFBB00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Ray Emitter. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ARAY, NULL}, + {"BRAY", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 0, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Ray Point. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, NULL, &graphics_BRAY}, + {"STK2", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM2, &graphics_STKM2}, + {"BOMB", PIXPACK(0xFFF288), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Bomb.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC|PROP_SPARKSETTLE, &update_BOMB, &graphics_BOMB}, + {"C-5", PIXPACK(0x2050E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Cold explosive", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_C5, NULL}, + {"SING", PIXPACK(0x242424), 0.7f, 0.36f * CFDS, 0.96f, 0.80f, 0.1f, 0.12f, 0.00f, -0.001f * CFDS, 1, 0, 0, 0, 0, 1, 1, 86, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Singularity", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_SING, NULL}, + {"QRTZ", PIXPACK(0xAADDDD), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 3, "Quartz, breakable mineral. Conducts but becomes brittle at lower temperatures.", ST_SOLID, TYPE_SOLID|PROP_HOT_GLOW|PROP_LIFE_DEC, &update_QRTZ, &graphics_QRTZ}, + {"PQRT", PIXPACK(0x88BBBB), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.27f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 3, "Broken quartz.", ST_SOLID, TYPE_PART| PROP_HOT_GLOW, &update_QRTZ, &graphics_QRTZ}, + {"EMP", PIXPACK(0x66AAFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 3, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 121, "Breaks activated electronics.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_EMP, &graphics_EMP}, + {"BREL", PIXPACK(0x707060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.18f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken electronics", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, + {"ELEC", PIXPACK(0xDFEFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+200.0f+273.15f, 251, "Electrons", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_ELEC, &graphics_ELEC}, + {"ACEL", PIXPACK(0x0099CC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Accelerator", ST_NONE, TYPE_SOLID, &update_ACEL, &graphics_ACEL}, + {"DCEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Decelerator", ST_NONE, TYPE_SOLID, &update_DCEL, &graphics_DCEL}, + {"TNT", PIXPACK(0xC05050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_BANG, NULL}, + {"IGNC", PIXPACK(0xC0B050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Ignition cord.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL, &update_IGNT, NULL}, + {"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL}, + /*FREE*/{"LOTE", PIXPACK(0xFF0000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Behaves kinda like Living on the Edge S3458/B37/4", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"FRG2", PIXPACK(0x00FF00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Frogs rule S124/B3/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"STAR", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Star Wars rule S3456/B278/6", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"FROG", PIXPACK(0x00AA00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Frogs S12/B34/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"BRAN", PIXPACK(0xCCCC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Brian 6 S6/B246/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"WIND", PIXPACK(0x101010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_SPECIAL, 0.0f, 40, "", ST_NONE, ST_NONE, NULL, NULL}, + {"HYGN", PIXPACK(0x5070FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.10f, 0.00f, 3.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 251, "Combines with O2 to make WATR", ST_GAS, TYPE_GAS, &update_H2, NULL}, + {"SOAP", PIXPACK(0xF5F5DC), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Soap. Creates bubbles.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_SOAP, NULL}, + {"BHOL", PIXPACK(0x202020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "Black hole (Requires newtonian gravity)", ST_SOLID, TYPE_SOLID, &update_NBHL, NULL}, + {"WHOL", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "White hole (Requires newtonian gravity)", ST_SOLID, TYPE_SOLID, &update_NWHL, NULL}, + {"MERC", PIXPACK(0x736B6D), 0.4f, 0.04f * CFDS, 0.94f, 0.80f, 0.0f, 0.3f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 91, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Mercury. Volume changes with temperature, Conductive.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_NEUTABSORB|PROP_LIFE_DEC, &update_MERC, NULL}, + {"PBCN", PIXPACK(0x3B1D0A), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Powered breakable clone", ST_NONE, TYPE_SOLID, &update_PBCN, &graphics_PBCN}, + {"GPMP", PIXPACK(0x0A3B3B), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, 0.0f +273.15f, 0, "Changes gravity to its temp when activated. (use HEAT/COOL).", ST_NONE, TYPE_SOLID, &update_GPMP, &graphics_GPMP}, + {"CLST", PIXPACK(0xE4A4A4), 0.7f, 0.02f * CFDS, 0.94f, 0.95f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Clay dust. Produces paste when mixed with water.", ST_SOLID, TYPE_PART, &update_CLST, &graphics_CLST}, + {"WIRE", PIXPACK(0xFFCC00), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 250, "WireWorld wires.",ST_SOLID,TYPE_SOLID,&update_WIRE, &graphics_WIRE}, + {"GBMB", PIXPACK(0x1144BB), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Sticks to first object it touches then produces strong gravity push.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GBMB, &graphics_GBMB}, + {"FIGH", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Fighter. Tries to kill stickmen.", ST_NONE, 0, &update_FIGH, &graphics_FIGH}, + //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description + }; + memcpy(ptypes, ptypest, sizeof(part_type)*PT_NUM); + +#define IPL -257.0f +#define IPH 257.0f +#define ITL MIN_TEMP-1 +#define ITH MAX_TEMP+1 +// no transition (PT_NONE means kill part) +#define NT -1 +// special transition - lava ctypes etc need extra code, which is only found and run if ST is given +#define ST PT_NUM +part_transition ptransitionst[PT_NUM] = +{ // if low pressure if high pressure if low temperature if high temperature + // Name plv plt phv pht tlv tlt thv tht + /* NONE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DUST */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WATR */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, + /* OIL */ {IPL, NT, IPH, NT, ITL, NT, 333.0f, PT_GAS}, + /* FIRE */ {IPL, NT, IPH, NT, ITL, NT, 2773.0f,PT_PLSM}, + /* STNE */ {IPL, NT, IPH, NT, ITL, NT, 983.0f, PT_LAVA}, + /* LAVA */ {IPL, NT, IPH, NT, 2573.15f,ST, ITH, NT}, // 2573.15f is highest melt pt of possible ctypes + /* GUN */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* NITR */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* CLNE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GAS */ {IPL, NT, 6.0f, PT_OIL, ITL, NT, 573.0f, PT_FIRE}, + /* C-4 */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* GOO */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ICE */ {IPL, NT, 0.8f, PT_SNOW, ITL, NT, 233.0f, ST}, + /* METL */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_LAVA}, + /* SPRK */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SNOW */ {IPL, NT, IPH, NT, ITL, NT, 273.0f, PT_WATR}, + /* WOOD */ {IPL, NT, IPH, NT, ITL, NT, 873.0f, PT_FIRE}, + /* NEUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PLUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PLNT */ {IPL, NT, IPH, NT, ITL, NT, 573.0f, PT_FIRE}, + /* ACID */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VOID */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WTRV */ {IPL, NT, IPH, NT, 371.0f, ST, ITH, NT}, + /* CNCT */ {IPL, NT, IPH, NT, ITL, NT, 1123.0f,PT_LAVA}, + /* DSTW */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, + /* SALT */ {IPL, NT, IPH, NT, ITL, NT, 1173.0f,PT_LAVA}, + /* SLTW */ {IPL, NT, IPH, NT, 233.0f, PT_ICEI, 483.0f, ST}, + /* DMND */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BMTL */ {IPL, NT, 1.0f, ST, ITL, NT, 1273.0f,PT_LAVA}, + /* BRMT */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_LAVA}, + /* PHOT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* URAN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WAX */ {IPL, NT, IPH, NT, ITL, NT, 319.0f, PT_MWAX}, + /* MWAX */ {IPL, NT, IPH, NT, 318.0f, PT_WAX, 673.0f, PT_FIRE}, + /* PSCN */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* NSCN */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* LN2 */ {IPL, NT, IPH, NT, 63.0f, PT_NICE, 77.0f, PT_NONE}, + /* INSL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VACU */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VENT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* RBDM */ {IPL, NT, IPH, NT, ITL, NT, 312.0f, PT_LRBD}, + /* LRBD */ {IPL, NT, IPH, NT, 311.0f, PT_RBDM, 961.0f, PT_FIRE}, + /* NTCT */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* SAND */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, + /* GLAS */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, + /* PTCT */ {IPL, NT, IPH, NT, ITL, NT, 1414.0f,PT_LAVA}, + /* BGLA */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, + /* THDR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PLSM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ETRD */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* NICE */ {IPL, NT, IPH, NT, ITL, NT, 63.1f, PT_LNTG}, + /* NBLE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BTRY */ {IPL, NT, IPH, NT, ITL, NT, 2273.0f,PT_PLSM}, + /* LCRY */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_BGLA}, + /* STKM */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, + /* SWCH */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SMKE */ {IPL, NT, IPH, NT, ITL, NT, 625.0f, PT_FIRE}, + /* DESL */ {IPL, NT, 5.0f, PT_FIRE, ITL, NT, 335.0f, PT_FIRE}, + /* COAL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* LO2 */ {IPL, NT, IPH, NT, ITL, NT, 90.1f, PT_O2}, + /* O2 */ {IPL, NT, IPH, NT, 90.0f, PT_LO2, ITH, NT}, + /* INWR */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* YEST */ {IPL, NT, IPH, NT, ITL, NT, 373.0f, PT_DYST}, + /* DYST */ {IPL, NT, IPH, NT, ITL, NT, 473.0f, PT_DUST}, + /* THRM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GLOW */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BRCK */ {IPL, NT, 8.8f, PT_STNE, ITL, NT, 1223.0f,PT_LAVA}, + /* CFLM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FIRW */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FUSE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FSEP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* AMTR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BCOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PCLN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* HSWC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* IRON */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* MORT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* LIFE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DLAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* CO2 */ {IPL, NT, IPH, NT, 194.65f,PT_DRIC, ITH, NT}, + /* DRIC */ {IPL, NT, IPH, NT, ITL, NT, 195.65f,PT_CO2}, + /* CBNW */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, + /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SPNG */ {IPL, NT, IPH, NT, ITL, NT, 2730.0f,PT_FIRE}, + /* RIME */ {IPL, NT, IPH, NT, ITL, NT, 273.15f,PT_WATR}, + /* FOG */ {IPL, NT, IPH, NT, ITL, NT, 373.15f,PT_WTRV}, + /* BCLN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* LOVE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DEUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WARP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PUMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FWRK */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PIPE */ {IPL, NT, 10.0f, PT_BRMT, ITL, NT, ITH, NT}, + /* FRZZ */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FRZW */ {IPL, NT, IPH, NT, ITL, NT, 53.0f, PT_ICEI}, + /* GRAV */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BIZR */ {IPL, NT, IPH, NT, 100.0f, PT_BIZRG, 400.0f, PT_BIZRS}, + /* BIZRG*/ {IPL, NT, IPH, NT, ITL, NT, 100.0f, PT_BIZR},//, 400.0f, PT_BIZRS}, + /* BIZRS*/ {IPL, NT, IPH, NT, 400.0f, PT_BIZR, ITH, NT},// 100.0f, PT_BIZRG}, + /* INST */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ISOZ */ {IPL, NT, IPH, NT, 160.0f, PT_ISZS, ITH, NT}, + /* ISZS */ {IPL, NT, IPH, NT, ITL, NT, 300.0f, PT_ISOZ}, + /* PRTI */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PRTO */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PSTE */ {IPL, NT, 0.5f, PT_PSTS, ITL, NT, 747.0f, PT_BRCK}, + /* PSTS */ {0.5f, PT_PSTE, IPH, NT, ITL, NT, ITH, NT}, + /* ANAR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VINE */ {IPL, NT, IPH, NT, ITL, NT, 573.0f, PT_FIRE}, + /* INVS */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* EQVE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SPWN2*/ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SPAWN*/ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SHLD1*/ {IPL, NT, 7.0f, PT_NONE, ITL, NT, ITH, NT}, + /* SHLD2*/ {IPL, NT, 15.0f, PT_NONE, ITL, NT, ITH, NT}, + /* SHLD3*/ {IPL, NT, 25.0f, PT_NONE, ITL, NT, ITH, NT}, + /* SHLD4*/ {IPL, NT, 40.0f, PT_NONE, ITL, NT, ITH, NT}, + /* LOlZ */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WIFI */ {IPL, NT, 15.0f, PT_BRMT, ITL, NT, ITH, NT}, + /* FILT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ARAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BRAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* STKM2*/ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, + /* BOMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* C-5 */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SING */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* QRTZ */ {IPL, NT, IPH, NT, ITL, NT, 2573.15f,PT_LAVA}, + /* PQRT */ {IPL, NT, IPH, NT, ITL, NT, 2573.15f,PT_LAVA}, + /* EMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BREL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ELEC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ACEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DCEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* TNT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* IGNP */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* BOYL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WIND */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* H2 */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SOAP */ {IPL, NT, IPH, NT, ITL, NT, ITL, NT}, + /* NBHL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* NWHL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* MERC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PBCN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GPMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* CLST */ {IPL, NT, IPH, NT, ITL, NT, 1256.0f, PT_LAVA}, + /* WIRE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GBMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FIGH */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, +}; +#undef IPL +#undef IPH +#undef ITL +#undef ITH +#undef NT +#undef ST*/ + memcpy(ptransitions, ptransitionst, sizeof(part_transition) * PT_NUM); + init_can_move(); + clear_sim(); +} diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h new file mode 100644 index 0000000..b3c51af --- /dev/null +++ b/src/simulation/Simulation.h @@ -0,0 +1,241 @@ +/* + * Simulation.h + * + * Created on: Jan 2, 2012 + * Author: Simon + */ + +#ifndef SIMULATION_H_ +#define SIMULATION_H_ +#include +#include "Config.h" +#include "Renderer.h" +#include "Graphics.h" +#include "Elements.h" +#include "misc.h" + +#define CHANNELS ((int)(MAX_TEMP-73)/100+2) + +class Simulation; +class Renderer; +class Gravity; +class Air; + +struct Particle +{ + int type; + int life, ctype; + float x, y, vx, vy; + float temp; + float pavg[2]; + int flags; + int tmp; + int tmp2; + unsigned int dcolour; +}; +typedef struct Particle Particle; + +struct sign +{ + int x,y,ju; + char text[256]; +}; +typedef struct sign sign; + +struct part_type +{ + char *name; + pixel pcolors; + float advection; + float airdrag; + float airloss; + float loss; + float collision; + float gravity; + float diffusion; + float hotair; + int falldown; + int flammable; + int explosive; + int meltable; + int hardness; + int menu; + int enabled; + int weight; + int menusection; + float heat; + unsigned char hconduct; + char *descs; + char state; + unsigned int properties; + int (*update_func) (UPDATE_FUNC_ARGS); + int (*graphics_func) (GRAPHICS_FUNC_ARGS); +}; +typedef struct part_type part_type; + +struct part_transition +{ + float plv; // transition occurs if pv is lower than this + int plt; + float phv; // transition occurs if pv is higher than this + int pht; + float tlv; // transition occurs if t is lower than this + int tlt; + float thv; // transition occurs if t is higher than this + int tht; +}; +typedef struct part_transition part_transition; + +struct playerst +{ + char comm; //command cell + char pcomm; //previous command + int elem; //element power + float legs[16]; //legs' positions + float accs[8]; //accelerations + char spwn; //if stick man was spawned + unsigned int frames; //frames since last particle spawn - used when spawning LIGH +}; +typedef struct playerst playerst; + +struct wall_type +{ + pixel colour; + pixel eglow; // if emap set, add this to fire glow + int drawstyle; + const char *descs; +}; +typedef struct wall_type wall_type; + +struct gol_menu +{ + const char *name; + pixel colour; + int goltype; + const char *description; +}; +typedef struct gol_menu gol_menu; + +//#ifdef _cplusplus +class Simulation +{ +private: +public: + + Gravity * grav; + Air * air; + part_type ptypes[PT_NUM]; + part_transition ptransitions[PT_NUM]; + wall_type wtypes[UI_WALLCOUNT]; + gol_menu gmenu[NGOL]; + int goltype[NGOL]; + int grule[NGOL+1][10]; + playerst player; + playerst player2; + playerst fighters[256]; //255 is the maximum number of fighters + unsigned char fighcount; //Contains the number of fighters + int lighting_recreate; + int gravwl_timeout; + Particle portalp[CHANNELS][8][80]; + Particle emptyparticle; + int portal_rx[8]; + int portal_ry[8]; + int wireless[CHANNELS][2]; + char can_move[PT_NUM][PT_NUM]; + int parts_lastActiveIndex;// = NPART-1; + int pfree; + int NUM_PARTS; + int elementCount[PT_NUM]; + int ISWIRE; + sign * signs; + //Gol sim + int CGOL; + int ISGOL; + int GSPEED; + unsigned char gol[XRES][YRES]; + unsigned char gol2[XRES][YRES][NGOL+1]; + //Air sim + float (*vx)[XRES/CELL]; + float (*vy)[XRES/CELL]; + float (*pv)[XRES/CELL]; + float (*hv)[XRES/CELL]; + //Gravity sim + float *gravx;//gravx[(YRES/CELL) * (XRES/CELL)]; + float *gravy;//gravy[(YRES/CELL) * (XRES/CELL)]; + float *gravp;//gravp[(YRES/CELL) * (XRES/CELL)]; + float *gravmap;//gravmap[(YRES/CELL) * (XRES/CELL)]; + //Walls + unsigned char bmap[YRES/CELL][XRES/CELL]; + unsigned char emap[YRES/CELL][XRES/CELL]; + float fvx[YRES/CELL][XRES/CELL]; + float fvy[YRES/CELL][XRES/CELL]; + //Particles + Particle parts[NPART]; + int pmap[YRES][XRES]; + int photons[YRES][XRES]; + // + int gravityMode; + int airMode; + int ngrav_enable; + int legacy_enable; + int aheat_enable; + int VINE_MODE; + int water_equal_test; + int sys_pause; + int framerender; + int pretty_powder; + // + int sandcolour_r; + int sandcolour_g; + int sandcolour_b; //TODO: Make a single variable + //Stuff + int is_blocking(int t, int x, int y); + int is_boundary(int pt, int x, int y); + int find_next_boundary(int pt, int *x, int *y, int dm, int *em); + int pn_junction_sprk(int x, int y, int pt); + void photoelectric_effect(int nx, int ny); + unsigned direction_to_map(float dx, float dy, int t); + int do_move(int i, int x, int y, float nxf, float nyf); + int try_move(int i, int x, int y, int nx, int ny); + int eval_move(int pt, int nx, int ny, unsigned *rr); + void init_can_move(); + void create_cherenkov_photon(int pp); + void create_gain_photon(int pp); + void kill_part(int i); + int flood_prop(int x, int y, size_t propoffset, void * propvalue, int proptype); + int flood_prop_2(int x, int y, size_t propoffset, void * propvalue, int proptype, int parttype, char * bitmap); + int flood_water(int x, int y, int i, int originaly, int check); + void detach(int i); + void part_change_type(int i, int x, int y, int t); + int create_part_add_props(int p, int x, int y, int tv, int rx, int ry); + //int InCurrentBrush(int i, int j, int rx, int ry); + //int get_brush_flags(); + int create_part(int p, int x, int y, int t); + void delete_part(int x, int y, int flags); + int is_wire(int x, int y); + int is_wire_off(int x, int y); + void set_emap(int x, int y); + int parts_avg(int ci, int ni, int t); + void create_arc(int sx, int sy, int dx, int dy, int midpoints, int variance, int type, int flags); + int nearest_part(int ci, int t, int max_d); + void update_particles_i(int start, int inc); + void update_particles(); + void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert); + void clear_area(int area_x, int area_y, int area_w, int area_h); + void create_box(int x1, int y1, int x2, int y2, int c, int flags); + int flood_parts(int x, int y, int c, int cm, int bm, int flags); + int create_parts(int x, int y, int rx, int ry, int c, int flags); + void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags); + void *transform_save(void *odata, int *size, matrix2d transform, vector2d translate); + void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]); + void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]); + int get_wavelength_bin(int *wm); + int get_normal(int pt, int x, int y, float dx, float dy, float *nx, float *ny); + int get_normal_interp(int pt, float x0, float y0, float dx, float dy, float *nx, float *ny); + void clear_sim(); + void UpdateParticles(); + Simulation(); +}; +//#endif + +#endif /* SIMULATION_H_ */ -- cgit v0.9.2-21-gd62e From 6d3b447f8e32fdaccdb3727af4d72d341e191e94 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 19 Jan 2012 17:59:00 +0000 Subject: Changes to thumbnail retreival diff --git a/src/Config.h b/src/Config.h index 4cb2da3..facb598 100644 --- a/src/Config.h +++ b/src/Config.h @@ -34,6 +34,7 @@ #define APPDATA_SUBDIR "\\HardWIRED" +//Number of unique thumbnails to have in cache at one time #define THUMB_CACHE_SIZE 256 #ifndef M_PI @@ -43,8 +44,11 @@ #define M_GRAV 6.67300e-1 #endif -#define IMGCONNS 3 +//Number of asynchronous connections used to retrieve thumnails +#define IMGCONNS 5 +//Not sure #define TIMEOUT 100 +//HTTP request timeout in seconds #define HTTP_TIMEOUT 10 #ifdef RENDERER diff --git a/src/Console.cpp b/src/Console.cpp index f861fd1..51f1155 100644 --- a/src/Console.cpp +++ b/src/Console.cpp @@ -48,10 +48,9 @@ std::vector * Console::GetPreviousCommands() } -Console::Console(ui::Sandbox * sandbox) +Console::Console() { - this->sandbox = sandbox; - sim = sandbox->GetSimulation(); + //sim = sandbox->GetSimulation(); } Console::~Console() diff --git a/src/Console.h b/src/Console.h index 8f7a072..247d89c 100644 --- a/src/Console.h +++ b/src/Console.h @@ -4,7 +4,6 @@ #include #include -#include "interface/Sandbox.h" #include "simulation/Simulation.h" class ConsoleCommand @@ -29,7 +28,6 @@ private: bool file_script; std::vector * previousCommands; std::string * lastError; - ui::Sandbox * sandbox; Simulation * sim; public: virtual void Tick(float * dt); @@ -41,7 +39,7 @@ public: virtual int ProcessCommand(char * console); virtual std::string * GetLastError(); virtual std::vector * GetPreviousCommands(); - Console(ui::Sandbox * sandbox); + Console(); virtual ~Console(); }; diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 0ee1648..5d1db34 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -10,7 +10,6 @@ #include "interface/Engine.h" #include "interface/Button.h" -#include "interface/Sandbox.h" #include "interface/Panel.h" #include "interface/ControlFactory.h" #include "interface/Point.h" diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 3545414..2b742f4 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -2,30 +2,25 @@ #include #include #include +#include #include "Config.h" #include "Client.h" #include "interface/Point.h" #include "Graphics.h" -/* - static Thumbnail* thumbnailCache[120]; - static void * activeThumbRequests[5]; - static int activeThumbRequestTimes[5]; - static std::string activeThumbRequestIDs[5]; -*/ - Client::Client() { int i = 0; http_init(NULL); - for(i = 0; i < 120; i++) + for(i = 0; i < THUMB_CACHE_SIZE; i++) { thumbnailCache[i] = NULL; } - for(i = 0; i < 5; i++) + for(i = 0; i < IMGCONNS; i++) { activeThumbRequests[i] = NULL; activeThumbRequestTimes[i] = 0; + activeThumbRequestCompleteTimes[i] = 0; } } @@ -36,12 +31,14 @@ Client::~Client() void Client::ClearThumbnailRequests() { - for(int i = 0; i < 5; i++) + for(int i = 0; i < IMGCONNS; i++) { if(activeThumbRequests[i]) { http_async_req_close(activeThumbRequests[i]); activeThumbRequests[i] = NULL; + activeThumbRequestTimes[i] = 0; + activeThumbRequestCompleteTimes[i] = 0; } } } @@ -50,8 +47,28 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) { std::stringstream urlStream; std::stringstream idStream; - int i = 0; - for(i = 0; i < 120; i++) + int i = 0, currentTime = time(NULL); + //Check active requests for any "forgotten" requests + for(i = 0; i < IMGCONNS; i++) + { + //If the request is active, and we've recieved a response + if(activeThumbRequests[i] && http_async_req_status(activeThumbRequests[i])) + { + //If we haven't already, mark the request as completed + if(!activeThumbRequestCompleteTimes[i]) + { + activeThumbRequestCompleteTimes[i] = time(NULL); + } + else if(activeThumbRequestCompleteTimes[i] < (currentTime-20)) //Otherwise, if it completed more than 10 seconds ago, destroy it. + { + http_async_req_close(activeThumbRequests[i]); + activeThumbRequests[i] = NULL; + activeThumbRequestTimes[i] = 0; + activeThumbRequestCompleteTimes[i] = 0; + } + } + } + for(i = 0; i < THUMB_CACHE_SIZE; i++) { if(thumbnailCache[i] && thumbnailCache[i]->ID == saveID && thumbnailCache[i]->Datestamp == saveDate) return thumbnailCache[i]; @@ -64,7 +81,7 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) idStream << saveID << ":" << saveDate; std::string idString = idStream.str(); bool found = false; - for(i = 0; i < 5; i++) + for(i = 0; i < IMGCONNS; i++) { if(activeThumbRequests[i] && activeThumbRequestIDs[i] == idString) { @@ -83,7 +100,7 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) { free(data); } - thumbnailCacheNextID %= 120; + thumbnailCacheNextID %= THUMB_CACHE_SIZE; if(thumbnailCache[thumbnailCacheNextID]) { delete thumbnailCache[thumbnailCacheNextID]; @@ -104,7 +121,7 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) { free(data); } - thumbnailCacheNextID %= 120; + thumbnailCacheNextID %= THUMB_CACHE_SIZE; if(thumbnailCache[thumbnailCacheNextID]) { delete thumbnailCache[thumbnailCacheNextID]; @@ -113,15 +130,21 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) return thumbnailCache[thumbnailCacheNextID++]; } } + else if(activeThumbRequestTimes[i] < currentTime-HTTP_TIMEOUT) + { + // + } } } if(!found) { - for(i = 0; i < 5; i++) + for(i = 0; i < IMGCONNS; i++) { if(!activeThumbRequests[i]) { activeThumbRequests[i] = http_async_req_start(NULL, (char *)urlStream.str().c_str(), NULL, 0, 1); + activeThumbRequestTimes[i] = currentTime; + activeThumbRequestCompleteTimes[i] = 0; std::cout << "ThumbCache: Requesting " << urlStream.str() << " : " << idString << std::endl; activeThumbRequestIDs[i] = idString; return NULL; diff --git a/src/client/Client.h b/src/client/Client.h index 37d0ad6..3aa2333 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -2,6 +2,7 @@ #define CLIENT_H #include +#include "Config.h" #include "HTTP.h" #include "search/Thumbnail.h" #include "Singleton.h" @@ -10,10 +11,11 @@ class Client: public Singleton { private: int thumbnailCacheNextID; - Thumbnail * thumbnailCache[120]; - void * activeThumbRequests[5]; - int activeThumbRequestTimes[5]; - std::string activeThumbRequestIDs[5]; + Thumbnail * thumbnailCache[THUMB_CACHE_SIZE]; + void * activeThumbRequests[IMGCONNS]; + int activeThumbRequestTimes[IMGCONNS]; + int activeThumbRequestCompleteTimes[IMGCONNS]; + std::string activeThumbRequestIDs[IMGCONNS]; public: Client(); ~Client(); -- cgit v0.9.2-21-gd62e From c5e8b345219cd7d8ca4b0aa638f59a1fed2cd83b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 19 Jan 2012 20:10:05 +0000 Subject: Add "cajun" for JSON reading and writing, Save searching in client and some more stuff for searcg diff --git a/PowderToy++.files b/PowderToy++.files index af47ebb..765f380 100644 --- a/PowderToy++.files +++ b/PowderToy++.files @@ -326,3 +326,10 @@ src/simulation/Air.h src/simulation/Simulation.cpp src/simulation/Gravity.cpp src/simulation/Air.cpp +src/cajun/writer.h +src/cajun/visitor.h +src/cajun/reader.h +src/cajun/elements.h +src/cajun/writer.inl +src/cajun/reader.inl +src/cajun/elements.inl diff --git a/src/cajun/elements.h b/src/cajun/elements.h new file mode 100644 index 0000000..df1a0ca --- /dev/null +++ b/src/cajun/elements.h @@ -0,0 +1,299 @@ +/****************************************************************************** + +Copyright (c) 2009-2010, Terry Caton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the projecct nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + +#pragma once + +#include +#include +#include +#include + +/* + +TODO: +* better documentation (doxygen?) +* Unicode support +* parent element accessors + +*/ + +namespace json +{ + +namespace Version +{ + enum { MAJOR = 2 }; + enum { MINOR = 0 }; + enum {ENGINEERING = 2 }; +} + +///////////////////////////////////////////////// +// forward declarations (more info further below) + + +class Visitor; +class ConstVisitor; + +template +class TrivialType_T; + +typedef TrivialType_T Number; +typedef TrivialType_T Boolean; +typedef TrivialType_T String; + +class Object; +class Array; +class Null; + + + +///////////////////////////////////////////////////////////////////////// +// Exception - base class for all JSON-related runtime errors + +class Exception : public std::runtime_error +{ +public: + Exception(const std::string& sMessage); +}; + + + + +///////////////////////////////////////////////////////////////////////// +// UnknownElement - provides a typesafe surrogate for any of the JSON- +// sanctioned element types. This class allows the Array and Object +// class to effectively contain a heterogeneous set of child elements. +// The cast operators provide convenient implicit downcasting, while +// preserving dynamic type safety by throwing an exception during a +// a bad cast. +// The object & array element index operators (operators [std::string] +// and [size_t]) provide convenient, quick access to child elements. +// They are a logical extension of the cast operators. These child +// element accesses can be chained together, allowing the following +// (when document structure is well-known): +// String str = objInvoices[1]["Customer"]["Company"]; + + +class UnknownElement +{ +public: + UnknownElement(); + UnknownElement(const UnknownElement& unknown); + UnknownElement(const Object& object); + UnknownElement(const Array& array); + UnknownElement(const Number& number); + UnknownElement(const Boolean& boolean); + UnknownElement(const String& string); + UnknownElement(const Null& null); + + ~UnknownElement(); + + UnknownElement& operator = (const UnknownElement& unknown); + + // implicit cast to actual element type. throws on failure + operator const Object& () const; + operator const Array& () const; + operator const Number& () const; + operator const Boolean& () const; + operator const String& () const; + operator const Null& () const; + + // implicit cast to actual element type. *converts* on failure, and always returns success + operator Object& (); + operator Array& (); + operator Number& (); + operator Boolean& (); + operator String& (); + operator Null& (); + + // provides quick access to children when real element type is object + UnknownElement& operator[] (const std::string& key); + const UnknownElement& operator[] (const std::string& key) const; + + // provides quick access to children when real element type is array + UnknownElement& operator[] (size_t index); + const UnknownElement& operator[] (size_t index) const; + + // implements visitor pattern + void Accept(ConstVisitor& visitor) const; + void Accept(Visitor& visitor); + + // tests equality. first checks type, then value if possible + bool operator == (const UnknownElement& element) const; + +private: + class Imp; + + template + class Imp_T; + + class CastVisitor; + class ConstCastVisitor; + + template + class CastVisitor_T; + + template + class ConstCastVisitor_T; + + template + const ElementTypeT& CastTo() const; + + template + ElementTypeT& ConvertTo(); + + Imp* m_pImp; +}; + + +///////////////////////////////////////////////////////////////////////////////// +// Array - mimics std::deque. The array contents are effectively +// heterogeneous thanks to the ElementUnknown class. push_back has been replaced +// by more generic insert functions. + +class Array +{ +public: + typedef std::deque Elements; + typedef Elements::iterator iterator; + typedef Elements::const_iterator const_iterator; + + iterator Begin(); + iterator End(); + const_iterator Begin() const; + const_iterator End() const; + + iterator Insert(const UnknownElement& element, iterator itWhere); + iterator Insert(const UnknownElement& element); + iterator Erase(iterator itWhere); + void Resize(size_t newSize); + void Clear(); + + size_t Size() const; + bool Empty() const; + + UnknownElement& operator[] (size_t index); + const UnknownElement& operator[] (size_t index) const; + + bool operator == (const Array& array) const; + +private: + Elements m_Elements; +}; + + +///////////////////////////////////////////////////////////////////////////////// +// Object - mimics std::map. The member value +// contents are effectively heterogeneous thanks to the UnknownElement class + +class Object +{ +public: + struct Member { + Member(const std::string& nameIn = std::string(), const UnknownElement& elementIn = UnknownElement()); + + bool operator == (const Member& member) const; + + std::string name; + UnknownElement element; + }; + + typedef std::list Members; // map faster, but does not preserve order + typedef Members::iterator iterator; + typedef Members::const_iterator const_iterator; + + bool operator == (const Object& object) const; + + iterator Begin(); + iterator End(); + const_iterator Begin() const; + const_iterator End() const; + + size_t Size() const; + bool Empty() const; + + iterator Find(const std::string& name); + const_iterator Find(const std::string& name) const; + + iterator Insert(const Member& member); + iterator Insert(const Member& member, iterator itWhere); + iterator Erase(iterator itWhere); + void Clear(); + + UnknownElement& operator [](const std::string& name); + const UnknownElement& operator [](const std::string& name) const; + +private: + class Finder; + + Members m_Members; +}; + + +///////////////////////////////////////////////////////////////////////////////// +// TrivialType_T - class template for encapsulates a simple data type, such as +// a string, number, or boolean. Provides implicit const & noncost cast operators +// for that type, allowing "DataTypeT type = trivialType;" + + +template +class TrivialType_T +{ +public: + TrivialType_T(const DataTypeT& t = DataTypeT()); + + operator DataTypeT&(); + operator const DataTypeT&() const; + + DataTypeT& Value(); + const DataTypeT& Value() const; + + bool operator == (const TrivialType_T& trivial) const; + +private: + DataTypeT m_tValue; +}; + + + +///////////////////////////////////////////////////////////////////////////////// +// Null - doesn't do much of anything but satisfy the JSON spec. It is the default +// element type of UnknownElement + +class Null +{ +public: + bool operator == (const Null& trivial) const; +}; + + +} // End namespace + + +#include "elements.inl" diff --git a/src/cajun/elements.inl b/src/cajun/elements.inl new file mode 100644 index 0000000..dbfbf2a --- /dev/null +++ b/src/cajun/elements.inl @@ -0,0 +1,442 @@ +/****************************************************************************** + +Copyright (c) 2009-2010, Terry Caton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the projecct nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + +#include "visitor.h" +#include "reader.h" +#include +#include +#include + +/* + +TODO: +* better documentation + +*/ + +namespace json +{ + + +inline Exception::Exception(const std::string& sMessage) : + std::runtime_error(sMessage) {} + + +///////////////////////// +// UnknownElement members + +class UnknownElement::Imp +{ +public: + virtual ~Imp() {} + virtual Imp* Clone() const = 0; + + virtual bool Compare(const Imp& imp) const = 0; + + virtual void Accept(ConstVisitor& visitor) const = 0; + virtual void Accept(Visitor& visitor) = 0; +}; + + +template +class UnknownElement::Imp_T : public UnknownElement::Imp +{ +public: + Imp_T(const ElementTypeT& element) : m_Element(element) {} + virtual Imp* Clone() const { return new Imp_T(*this); } + + virtual void Accept(ConstVisitor& visitor) const { visitor.Visit(m_Element); } + virtual void Accept(Visitor& visitor) { visitor.Visit(m_Element); } + + virtual bool Compare(const Imp& imp) const + { + ConstCastVisitor_T castVisitor; + imp.Accept(castVisitor); + return castVisitor.m_pElement && + m_Element == *castVisitor.m_pElement; + } + +private: + ElementTypeT m_Element; +}; + + +class UnknownElement::ConstCastVisitor : public ConstVisitor +{ + virtual void Visit(const Array& array) {} + virtual void Visit(const Object& object) {} + virtual void Visit(const Number& number) {} + virtual void Visit(const String& string) {} + virtual void Visit(const Boolean& boolean) {} + virtual void Visit(const Null& null) {} +}; + +template +class UnknownElement::ConstCastVisitor_T : public ConstCastVisitor +{ +public: + ConstCastVisitor_T() : m_pElement(0) {} + virtual void Visit(const ElementTypeT& element) { m_pElement = &element; } // we don't know what this is, but it overrides one of the base's no-op functions + const ElementTypeT* m_pElement; +}; + + +class UnknownElement::CastVisitor : public Visitor +{ + virtual void Visit(Array& array) {} + virtual void Visit(Object& object) {} + virtual void Visit(Number& number) {} + virtual void Visit(String& string) {} + virtual void Visit(Boolean& boolean) {} + virtual void Visit(Null& null) {} +}; + +template +class UnknownElement::CastVisitor_T : public CastVisitor +{ +public: + CastVisitor_T() : m_pElement(0) {} + virtual void Visit(ElementTypeT& element) { m_pElement = &element; } // we don't know what this is, but it overrides one of the base's no-op functions + ElementTypeT* m_pElement; +}; + + + + +inline UnknownElement::UnknownElement() : m_pImp( new Imp_T( Null() ) ) {} +inline UnknownElement::UnknownElement(const UnknownElement& unknown) : m_pImp( unknown.m_pImp->Clone()) {} +inline UnknownElement::UnknownElement(const Object& object) : m_pImp( new Imp_T(object) ) {} +inline UnknownElement::UnknownElement(const Array& array) : m_pImp( new Imp_T(array) ) {} +inline UnknownElement::UnknownElement(const Number& number) : m_pImp( new Imp_T(number) ) {} +inline UnknownElement::UnknownElement(const Boolean& boolean) : m_pImp( new Imp_T(boolean) ) {} +inline UnknownElement::UnknownElement(const String& string) : m_pImp( new Imp_T(string) ) {} +inline UnknownElement::UnknownElement(const Null& null) : m_pImp( new Imp_T(null) ) {} + +inline UnknownElement::~UnknownElement() { delete m_pImp; } + +inline UnknownElement::operator const Object& () const { return CastTo(); } +inline UnknownElement::operator const Array& () const { return CastTo(); } +inline UnknownElement::operator const Number& () const { return CastTo(); } +inline UnknownElement::operator const Boolean& () const { return CastTo(); } +inline UnknownElement::operator const String& () const { return CastTo(); } +inline UnknownElement::operator const Null& () const { return CastTo(); } + +inline UnknownElement::operator Object& () { return ConvertTo(); } +inline UnknownElement::operator Array& () { return ConvertTo(); } +inline UnknownElement::operator Number& () { return ConvertTo(); } +inline UnknownElement::operator Boolean& () { return ConvertTo(); } +inline UnknownElement::operator String& () { return ConvertTo(); } +inline UnknownElement::operator Null& () { return ConvertTo(); } + +inline UnknownElement& UnknownElement::operator = (const UnknownElement& unknown) +{ + // always check for this + if (&unknown != this) + { + // we might be copying from a subtree of ourselves. delete the old imp + // only after the clone operation is complete. yes, this could be made + // more efficient, but isn't worth the complexity + Imp* pOldImp = m_pImp; + m_pImp = unknown.m_pImp->Clone(); + delete pOldImp; + } + + return *this; +} + +inline UnknownElement& UnknownElement::operator[] (const std::string& key) +{ + // the people want an object. make us one if we aren't already + Object& object = ConvertTo(); + return object[key]; +} + +inline const UnknownElement& UnknownElement::operator[] (const std::string& key) const +{ + // throws if we aren't an object + const Object& object = CastTo(); + return object[key]; +} + +inline UnknownElement& UnknownElement::operator[] (size_t index) +{ + // the people want an array. make us one if we aren't already + Array& array = ConvertTo(); + return array[index]; +} + +inline const UnknownElement& UnknownElement::operator[] (size_t index) const +{ + // throws if we aren't an array + const Array& array = CastTo(); + return array[index]; +} + + +template +const ElementTypeT& UnknownElement::CastTo() const +{ + ConstCastVisitor_T castVisitor; + m_pImp->Accept(castVisitor); + if (castVisitor.m_pElement == 0) + throw Exception("Bad cast"); + return *castVisitor.m_pElement; +} + + + +template +ElementTypeT& UnknownElement::ConvertTo() +{ + CastVisitor_T castVisitor; + m_pImp->Accept(castVisitor); + if (castVisitor.m_pElement == 0) + { + // we're not the right type. fix it & try again + *this = ElementTypeT(); + m_pImp->Accept(castVisitor); + } + + return *castVisitor.m_pElement; +} + + +inline void UnknownElement::Accept(ConstVisitor& visitor) const { m_pImp->Accept(visitor); } +inline void UnknownElement::Accept(Visitor& visitor) { m_pImp->Accept(visitor); } + + +inline bool UnknownElement::operator == (const UnknownElement& element) const +{ + return m_pImp->Compare(*element.m_pImp); +} + + + +////////////////// +// Object members + + +inline Object::Member::Member(const std::string& nameIn, const UnknownElement& elementIn) : + name(nameIn), element(elementIn) {} + +inline bool Object::Member::operator == (const Member& member) const +{ + return name == member.name && + element == member.element; +} + +class Object::Finder : public std::unary_function +{ +public: + Finder(const std::string& name) : m_name(name) {} + bool operator () (const Object::Member& member) { + return member.name == m_name; + } + +private: + std::string m_name; +}; + + + +inline Object::iterator Object::Begin() { return m_Members.begin(); } +inline Object::iterator Object::End() { return m_Members.end(); } +inline Object::const_iterator Object::Begin() const { return m_Members.begin(); } +inline Object::const_iterator Object::End() const { return m_Members.end(); } + +inline size_t Object::Size() const { return m_Members.size(); } +inline bool Object::Empty() const { return m_Members.empty(); } + +inline Object::iterator Object::Find(const std::string& name) +{ + return std::find_if(m_Members.begin(), m_Members.end(), Finder(name)); +} + +inline Object::const_iterator Object::Find(const std::string& name) const +{ + return std::find_if(m_Members.begin(), m_Members.end(), Finder(name)); +} + +inline Object::iterator Object::Insert(const Member& member) +{ + return Insert(member, End()); +} + +inline Object::iterator Object::Insert(const Member& member, iterator itWhere) +{ + iterator it = Find(member.name); + if (it != m_Members.end()) + throw Exception(std::string("Object member already exists: ") + member.name); + + it = m_Members.insert(itWhere, member); + return it; +} + +inline Object::iterator Object::Erase(iterator itWhere) +{ + return m_Members.erase(itWhere); +} + +inline UnknownElement& Object::operator [](const std::string& name) +{ + + iterator it = Find(name); + if (it == m_Members.end()) + { + Member member(name); + it = Insert(member, End()); + } + return it->element; +} + +inline const UnknownElement& Object::operator [](const std::string& name) const +{ + const_iterator it = Find(name); + if (it == End()) + throw Exception(std::string("Object member not found: ") + name); + return it->element; +} + +inline void Object::Clear() +{ + m_Members.clear(); +} + +inline bool Object::operator == (const Object& object) const +{ + return m_Members == object.m_Members; +} + + +///////////////// +// Array members + +inline Array::iterator Array::Begin() { return m_Elements.begin(); } +inline Array::iterator Array::End() { return m_Elements.end(); } +inline Array::const_iterator Array::Begin() const { return m_Elements.begin(); } +inline Array::const_iterator Array::End() const { return m_Elements.end(); } + +inline Array::iterator Array::Insert(const UnknownElement& element, iterator itWhere) +{ + return m_Elements.insert(itWhere, element); +} + +inline Array::iterator Array::Insert(const UnknownElement& element) +{ + return Insert(element, End()); +} + +inline Array::iterator Array::Erase(iterator itWhere) +{ + return m_Elements.erase(itWhere); +} + +inline void Array::Resize(size_t newSize) +{ + m_Elements.resize(newSize); +} + +inline size_t Array::Size() const { return m_Elements.size(); } +inline bool Array::Empty() const { return m_Elements.empty(); } + +inline UnknownElement& Array::operator[] (size_t index) +{ + size_t nMinSize = index + 1; // zero indexed + if (m_Elements.size() < nMinSize) + m_Elements.resize(nMinSize); + return m_Elements[index]; +} + +inline const UnknownElement& Array::operator[] (size_t index) const +{ + if (index >= m_Elements.size()) + throw Exception("Array out of bounds"); + return m_Elements[index]; +} + +inline void Array::Clear() { + m_Elements.clear(); +} + +inline bool Array::operator == (const Array& array) const +{ + return m_Elements == array.m_Elements; +} + + +//////////////////////// +// TrivialType_T members + +template +TrivialType_T::TrivialType_T(const DataTypeT& t) : + m_tValue(t) {} + +template +TrivialType_T::operator DataTypeT&() +{ + return Value(); +} + +template +TrivialType_T::operator const DataTypeT&() const +{ + return Value(); +} + +template +DataTypeT& TrivialType_T::Value() +{ + return m_tValue; +} + +template +const DataTypeT& TrivialType_T::Value() const +{ + return m_tValue; +} + +template +bool TrivialType_T::operator == (const TrivialType_T& trivial) const +{ + return m_tValue == trivial.m_tValue; +} + + + +////////////////// +// Null members + +inline bool Null::operator == (const Null& trivial) const +{ + return true; +} + + + +} // End namespace diff --git a/src/cajun/reader.h b/src/cajun/reader.h new file mode 100644 index 0000000..f431670 --- /dev/null +++ b/src/cajun/reader.h @@ -0,0 +1,148 @@ +/****************************************************************************** + +Copyright (c) 2009-2010, Terry Caton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the projecct nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + + + +#pragma once + +#include "elements.h" +#include +#include + +namespace json +{ + +class Reader +{ +public: + // this structure will be reported in one of the exceptions defined below + struct Location + { + Location(); + + unsigned int m_nLine; // document line, zero-indexed + unsigned int m_nLineOffset; // character offset from beginning of line, zero indexed + unsigned int m_nDocOffset; // character offset from entire document, zero indexed + }; + + // thrown during the first phase of reading. generally catches low-level problems such + // as errant characters or corrupt/incomplete documents + class ScanException : public Exception + { + public: + ScanException(const std::string& sMessage, const Reader::Location& locError) : + Exception(sMessage), + m_locError(locError) {} + + Reader::Location m_locError; + }; + + // thrown during the second phase of reading. generally catches higher-level problems such + // as missing commas or brackets + class ParseException : public Exception + { + public: + ParseException(const std::string& sMessage, const Reader::Location& locTokenBegin, const Reader::Location& locTokenEnd) : + Exception(sMessage), + m_locTokenBegin(locTokenBegin), + m_locTokenEnd(locTokenEnd) {} + + Reader::Location m_locTokenBegin; + Reader::Location m_locTokenEnd; + }; + + + // if you know what the document looks like, call one of these... + static void Read(Object& object, std::istream& istr); + static void Read(Array& array, std::istream& istr); + static void Read(String& string, std::istream& istr); + static void Read(Number& number, std::istream& istr); + static void Read(Boolean& boolean, std::istream& istr); + static void Read(Null& null, std::istream& istr); + + // ...otherwise, if you don't know, call this & visit it + static void Read(UnknownElement& elementRoot, std::istream& istr); + +private: + struct Token + { + enum Type + { + TOKEN_OBJECT_BEGIN, // { + TOKEN_OBJECT_END, // } + TOKEN_ARRAY_BEGIN, // [ + TOKEN_ARRAY_END, // ] + TOKEN_NEXT_ELEMENT, // , + TOKEN_MEMBER_ASSIGN, // : + TOKEN_STRING, // "xxx" + TOKEN_NUMBER, // [+/-]000.000[e[+/-]000] + TOKEN_BOOLEAN, // true -or- false + TOKEN_NULL, // null + }; + + Type nType; + std::string sValue; + + // for malformed file debugging + Reader::Location locBegin; + Reader::Location locEnd; + }; + + class InputStream; + class TokenStream; + typedef std::vector Tokens; + + template + static void Read_i(ElementTypeT& element, std::istream& istr); + + // scanning istream into token sequence + void Scan(Tokens& tokens, InputStream& inputStream); + + void EatWhiteSpace(InputStream& inputStream); + std::string MatchString(InputStream& inputStream); + std::string MatchNumber(InputStream& inputStream); + std::string MatchExpectedString(InputStream& inputStream, const std::string& sExpected); + + // parsing token sequence into element structure + void Parse(UnknownElement& element, TokenStream& tokenStream); + void Parse(Object& object, TokenStream& tokenStream); + void Parse(Array& array, TokenStream& tokenStream); + void Parse(String& string, TokenStream& tokenStream); + void Parse(Number& number, TokenStream& tokenStream); + void Parse(Boolean& boolean, TokenStream& tokenStream); + void Parse(Null& null, TokenStream& tokenStream); + + const std::string& MatchExpectedToken(Token::Type nExpected, TokenStream& tokenStream); +}; + + +} // End namespace + + +#include "reader.inl" \ No newline at end of file diff --git a/src/cajun/reader.inl b/src/cajun/reader.inl new file mode 100644 index 0000000..47311ad --- /dev/null +++ b/src/cajun/reader.inl @@ -0,0 +1,533 @@ +/****************************************************************************** + +Copyright (c) 2009-2010, Terry Caton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the projecct nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + +#include +#include +#include + +/* + +TODO: +* better documentation +* unicode character decoding + +*/ + +namespace json +{ + +inline std::istream& operator >> (std::istream& istr, UnknownElement& elementRoot) { + Reader::Read(elementRoot, istr); + return istr; +} + +inline Reader::Location::Location() : + m_nLine(0), + m_nLineOffset(0), + m_nDocOffset(0) +{} + + +////////////////////// +// Reader::InputStream + +class Reader::InputStream // would be cool if we could inherit from std::istream & override "get" +{ +public: + InputStream(std::istream& iStr) : + m_iStr(iStr) {} + + // protect access to the input stream, so we can keeep track of document/line offsets + char Get(); // big, define outside + char Peek() { + assert(m_iStr.eof() == false); // enforce reading of only valid stream data + return m_iStr.peek(); + } + + bool EOS() { + m_iStr.peek(); // apparently eof flag isn't set until a character read is attempted. whatever. + return m_iStr.eof(); + } + + const Location& GetLocation() const { return m_Location; } + +private: + std::istream& m_iStr; + Location m_Location; +}; + + +inline char Reader::InputStream::Get() +{ + assert(m_iStr.eof() == false); // enforce reading of only valid stream data + char c = m_iStr.get(); + + ++m_Location.m_nDocOffset; + if (c == '\n') { + ++m_Location.m_nLine; + m_Location.m_nLineOffset = 0; + } + else { + ++m_Location.m_nLineOffset; + } + + return c; +} + + + +////////////////////// +// Reader::TokenStream + +class Reader::TokenStream +{ +public: + TokenStream(const Tokens& tokens); + + const Token& Peek(); + const Token& Get(); + + bool EOS() const; + +private: + const Tokens& m_Tokens; + Tokens::const_iterator m_itCurrent; +}; + + +inline Reader::TokenStream::TokenStream(const Tokens& tokens) : + m_Tokens(tokens), + m_itCurrent(tokens.begin()) +{} + +inline const Reader::Token& Reader::TokenStream::Peek() { + if (EOS()) + { + const Token& lastToken = *m_Tokens.rbegin(); + std::string sMessage = "Unexpected end of token stream"; + throw ParseException(sMessage, lastToken.locBegin, lastToken.locEnd); // nowhere to point to + } + return *(m_itCurrent); +} + +inline const Reader::Token& Reader::TokenStream::Get() { + const Token& token = Peek(); + ++m_itCurrent; + return token; +} + +inline bool Reader::TokenStream::EOS() const { + return m_itCurrent == m_Tokens.end(); +} + +/////////////////// +// Reader (finally) + + +inline void Reader::Read(Object& object, std::istream& istr) { Read_i(object, istr); } +inline void Reader::Read(Array& array, std::istream& istr) { Read_i(array, istr); } +inline void Reader::Read(String& string, std::istream& istr) { Read_i(string, istr); } +inline void Reader::Read(Number& number, std::istream& istr) { Read_i(number, istr); } +inline void Reader::Read(Boolean& boolean, std::istream& istr) { Read_i(boolean, istr); } +inline void Reader::Read(Null& null, std::istream& istr) { Read_i(null, istr); } +inline void Reader::Read(UnknownElement& unknown, std::istream& istr) { Read_i(unknown, istr); } + + +template +void Reader::Read_i(ElementTypeT& element, std::istream& istr) +{ + Reader reader; + + Tokens tokens; + InputStream inputStream(istr); + reader.Scan(tokens, inputStream); + + TokenStream tokenStream(tokens); + reader.Parse(element, tokenStream); + + if (tokenStream.EOS() == false) + { + const Token& token = tokenStream.Peek(); + std::string sMessage = std::string("Expected End of token stream; found ") + token.sValue; + throw ParseException(sMessage, token.locBegin, token.locEnd); + } +} + + +inline void Reader::Scan(Tokens& tokens, InputStream& inputStream) +{ + while (EatWhiteSpace(inputStream), // ignore any leading white space... + inputStream.EOS() == false) // ...before checking for EOS + { + // if all goes well, we'll create a token each pass + Token token; + token.locBegin = inputStream.GetLocation(); + + // gives us null-terminated string + char sChar = inputStream.Peek(); + switch (sChar) + { + case '{': + token.sValue = MatchExpectedString(inputStream, "{"); + token.nType = Token::TOKEN_OBJECT_BEGIN; + break; + + case '}': + token.sValue = MatchExpectedString(inputStream, "}"); + token.nType = Token::TOKEN_OBJECT_END; + break; + + case '[': + token.sValue = MatchExpectedString(inputStream, "["); + token.nType = Token::TOKEN_ARRAY_BEGIN; + break; + + case ']': + token.sValue = MatchExpectedString(inputStream, "]"); + token.nType = Token::TOKEN_ARRAY_END; + break; + + case ',': + token.sValue = MatchExpectedString(inputStream, ","); + token.nType = Token::TOKEN_NEXT_ELEMENT; + break; + + case ':': + token.sValue = MatchExpectedString(inputStream, ":"); + token.nType = Token::TOKEN_MEMBER_ASSIGN; + break; + + case '"': + token.sValue = MatchString(inputStream); + token.nType = Token::TOKEN_STRING; + break; + + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + token.sValue = MatchNumber(inputStream); + token.nType = Token::TOKEN_NUMBER; + break; + + case 't': + token.sValue = MatchExpectedString(inputStream, "true"); + token.nType = Token::TOKEN_BOOLEAN; + break; + + case 'f': + token.sValue = MatchExpectedString(inputStream, "false"); + token.nType = Token::TOKEN_BOOLEAN; + break; + + case 'n': + token.sValue = MatchExpectedString(inputStream, "null"); + token.nType = Token::TOKEN_NULL; + break; + + default: + { + std::string sErrorMessage = std::string("Unexpected character in stream: ") + sChar; + throw ScanException(sErrorMessage, inputStream.GetLocation()); + } + } + + token.locEnd = inputStream.GetLocation(); + tokens.push_back(token); + } +} + + +inline void Reader::EatWhiteSpace(InputStream& inputStream) +{ + while (inputStream.EOS() == false && + ::isspace(inputStream.Peek())) + inputStream.Get(); +} + +inline std::string Reader::MatchExpectedString(InputStream& inputStream, const std::string& sExpected) +{ + std::string::const_iterator it(sExpected.begin()), + itEnd(sExpected.end()); + for ( ; it != itEnd; ++it) { + if (inputStream.EOS() || // did we reach the end before finding what we're looking for... + inputStream.Get() != *it) // ...or did we find something different? + { + std::string sMessage = std::string("Expected string: ") + sExpected; + throw ScanException(sMessage, inputStream.GetLocation()); + } + } + + // all's well if we made it here + return sExpected; +} + + +inline std::string Reader::MatchString(InputStream& inputStream) +{ + MatchExpectedString(inputStream, "\""); + + std::string string; + while (inputStream.EOS() == false && + inputStream.Peek() != '"') + { + char c = inputStream.Get(); + + // escape? + if (c == '\\' && + inputStream.EOS() == false) // shouldn't have reached the end yet + { + c = inputStream.Get(); + switch (c) { + case '/': string.push_back('/'); break; + case '"': string.push_back('"'); break; + case '\\': string.push_back('\\'); break; + case 'b': string.push_back('\b'); break; + case 'f': string.push_back('\f'); break; + case 'n': string.push_back('\n'); break; + case 'r': string.push_back('\r'); break; + case 't': string.push_back('\t'); break; + //case 'u': string.push_back('\u'); break; // TODO: what do we do with this? + default: { + std::string sMessage = std::string("Unrecognized escape sequence found in string: \\") + c; + throw ScanException(sMessage, inputStream.GetLocation()); + } + } + } + else { + string.push_back(c); + } + } + + // eat the last '"' that we just peeked + MatchExpectedString(inputStream, "\""); + + // all's well if we made it here + return string; +} + + +inline std::string Reader::MatchNumber(InputStream& inputStream) +{ + const char sNumericChars[] = "0123456789.eE-+"; + std::set numericChars; + numericChars.insert(sNumericChars, sNumericChars + sizeof(sNumericChars)); + + std::string sNumber; + while (inputStream.EOS() == false && + numericChars.find(inputStream.Peek()) != numericChars.end()) + { + sNumber.push_back(inputStream.Get()); + } + + return sNumber; +} + + +inline void Reader::Parse(UnknownElement& element, Reader::TokenStream& tokenStream) +{ + const Token& token = tokenStream.Peek(); + switch (token.nType) { + case Token::TOKEN_OBJECT_BEGIN: + { + // implicit non-const cast will perform conversion for us (if necessary) + Object& object = element; + Parse(object, tokenStream); + break; + } + + case Token::TOKEN_ARRAY_BEGIN: + { + Array& array = element; + Parse(array, tokenStream); + break; + } + + case Token::TOKEN_STRING: + { + String& string = element; + Parse(string, tokenStream); + break; + } + + case Token::TOKEN_NUMBER: + { + Number& number = element; + Parse(number, tokenStream); + break; + } + + case Token::TOKEN_BOOLEAN: + { + Boolean& boolean = element; + Parse(boolean, tokenStream); + break; + } + + case Token::TOKEN_NULL: + { + Null& null = element; + Parse(null, tokenStream); + break; + } + + default: + { + std::string sMessage = std::string("Unexpected token: ") + token.sValue; + throw ParseException(sMessage, token.locBegin, token.locEnd); + } + } +} + + +inline void Reader::Parse(Object& object, Reader::TokenStream& tokenStream) +{ + MatchExpectedToken(Token::TOKEN_OBJECT_BEGIN, tokenStream); + + bool bContinue = (tokenStream.EOS() == false && + tokenStream.Peek().nType != Token::TOKEN_OBJECT_END); + while (bContinue) + { + Object::Member member; + + // first the member name. save the token in case we have to throw an exception + const Token& tokenName = tokenStream.Peek(); + member.name = MatchExpectedToken(Token::TOKEN_STRING, tokenStream); + + // ...then the key/value separator... + MatchExpectedToken(Token::TOKEN_MEMBER_ASSIGN, tokenStream); + + // ...then the value itself (can be anything). + Parse(member.element, tokenStream); + + // try adding it to the object (this could throw) + try + { + object.Insert(member); + } + catch (Exception&) + { + // must be a duplicate name + std::string sMessage = std::string("Duplicate object member token: ") + member.name; + throw ParseException(sMessage, tokenName.locBegin, tokenName.locEnd); + } + + bContinue = (tokenStream.EOS() == false && + tokenStream.Peek().nType == Token::TOKEN_NEXT_ELEMENT); + if (bContinue) + MatchExpectedToken(Token::TOKEN_NEXT_ELEMENT, tokenStream); + } + + MatchExpectedToken(Token::TOKEN_OBJECT_END, tokenStream); +} + + +inline void Reader::Parse(Array& array, Reader::TokenStream& tokenStream) +{ + MatchExpectedToken(Token::TOKEN_ARRAY_BEGIN, tokenStream); + + bool bContinue = (tokenStream.EOS() == false && + tokenStream.Peek().nType != Token::TOKEN_ARRAY_END); + while (bContinue) + { + // ...what's next? could be anything + Array::iterator itElement = array.Insert(UnknownElement()); + UnknownElement& element = *itElement; + Parse(element, tokenStream); + + bContinue = (tokenStream.EOS() == false && + tokenStream.Peek().nType == Token::TOKEN_NEXT_ELEMENT); + if (bContinue) + MatchExpectedToken(Token::TOKEN_NEXT_ELEMENT, tokenStream); + } + + MatchExpectedToken(Token::TOKEN_ARRAY_END, tokenStream); +} + + +inline void Reader::Parse(String& string, Reader::TokenStream& tokenStream) +{ + string = MatchExpectedToken(Token::TOKEN_STRING, tokenStream); +} + + +inline void Reader::Parse(Number& number, Reader::TokenStream& tokenStream) +{ + const Token& currentToken = tokenStream.Peek(); // might need this later for throwing exception + const std::string& sValue = MatchExpectedToken(Token::TOKEN_NUMBER, tokenStream); + + std::istringstream iStr(sValue); + double dValue; + iStr >> dValue; + + // did we consume all characters in the token? + if (iStr.eof() == false) + { + char c = iStr.peek(); + std::string sMessage = std::string("Unexpected character in NUMBER token: ") + c; + throw ParseException(sMessage, currentToken.locBegin, currentToken.locEnd); + } + + number = dValue; +} + + +inline void Reader::Parse(Boolean& boolean, Reader::TokenStream& tokenStream) +{ + const std::string& sValue = MatchExpectedToken(Token::TOKEN_BOOLEAN, tokenStream); + boolean = (sValue == "true" ? true : false); +} + + +inline void Reader::Parse(Null&, Reader::TokenStream& tokenStream) +{ + MatchExpectedToken(Token::TOKEN_NULL, tokenStream); +} + + +inline const std::string& Reader::MatchExpectedToken(Token::Type nExpected, Reader::TokenStream& tokenStream) +{ + const Token& token = tokenStream.Get(); + if (token.nType != nExpected) + { + std::string sMessage = std::string("Unexpected token: ") + token.sValue; + throw ParseException(sMessage, token.locBegin, token.locEnd); + } + + return token.sValue; +} + +} // End namespace diff --git a/src/cajun/visitor.h b/src/cajun/visitor.h new file mode 100644 index 0000000..a06299d --- /dev/null +++ b/src/cajun/visitor.h @@ -0,0 +1,65 @@ +/****************************************************************************** + +Copyright (c) 2009-2010, Terry Caton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the projecct nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + +#pragma once + +#include "elements.h" + +namespace json +{ + + +class Visitor +{ +public: + virtual ~Visitor() {} + + virtual void Visit(Array& array) = 0; + virtual void Visit(Object& object) = 0; + virtual void Visit(Number& number) = 0; + virtual void Visit(String& string) = 0; + virtual void Visit(Boolean& boolean) = 0; + virtual void Visit(Null& null) = 0; +}; + +class ConstVisitor +{ +public: + virtual ~ConstVisitor() {} + + virtual void Visit(const Array& array) = 0; + virtual void Visit(const Object& object) = 0; + virtual void Visit(const Number& number) = 0; + virtual void Visit(const String& string) = 0; + virtual void Visit(const Boolean& boolean) = 0; + virtual void Visit(const Null& null) = 0; +}; + + +} // End namespace diff --git a/src/cajun/writer.h b/src/cajun/writer.h new file mode 100644 index 0000000..594d541 --- /dev/null +++ b/src/cajun/writer.h @@ -0,0 +1,78 @@ +/****************************************************************************** + +Copyright (c) 2009-2010, Terry Caton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the projecct nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + +#pragma once + +#include "elements.h" +#include "visitor.h" + +namespace json +{ + +class Writer : private ConstVisitor +{ +public: + static void Write(const Object& object, std::ostream& ostr); + static void Write(const Array& array, std::ostream& ostr); + static void Write(const String& string, std::ostream& ostr); + static void Write(const Number& number, std::ostream& ostr); + static void Write(const Boolean& boolean, std::ostream& ostr); + static void Write(const Null& null, std::ostream& ostr); + static void Write(const UnknownElement& elementRoot, std::ostream& ostr); + +private: + Writer(std::ostream& ostr); + + template + static void Write_i(const ElementTypeT& element, std::ostream& ostr); + + void Write_i(const Object& object); + void Write_i(const Array& array); + void Write_i(const String& string); + void Write_i(const Number& number); + void Write_i(const Boolean& boolean); + void Write_i(const Null& null); + void Write_i(const UnknownElement& unknown); + + virtual void Visit(const Array& array); + virtual void Visit(const Object& object); + virtual void Visit(const Number& number); + virtual void Visit(const String& string); + virtual void Visit(const Boolean& boolean); + virtual void Visit(const Null& null); + + std::ostream& m_ostr; + int m_nTabDepth; +}; + + +} // End namespace + + +#include "writer.inl" \ No newline at end of file diff --git a/src/cajun/writer.inl b/src/cajun/writer.inl new file mode 100644 index 0000000..71145da --- /dev/null +++ b/src/cajun/writer.inl @@ -0,0 +1,178 @@ +/****************************************************************************** + +Copyright (c) 2009-2010, Terry Caton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the projecct nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + +#include "writer.h" +#include +#include + +/* + +TODO: +* better documentation +* unicode character encoding + +*/ + +namespace json +{ + + +inline void Writer::Write(const UnknownElement& elementRoot, std::ostream& ostr) { Write_i(elementRoot, ostr); } +inline void Writer::Write(const Object& object, std::ostream& ostr) { Write_i(object, ostr); } +inline void Writer::Write(const Array& array, std::ostream& ostr) { Write_i(array, ostr); } +inline void Writer::Write(const Number& number, std::ostream& ostr) { Write_i(number, ostr); } +inline void Writer::Write(const String& string, std::ostream& ostr) { Write_i(string, ostr); } +inline void Writer::Write(const Boolean& boolean, std::ostream& ostr) { Write_i(boolean, ostr); } +inline void Writer::Write(const Null& null, std::ostream& ostr) { Write_i(null, ostr); } + + +inline Writer::Writer(std::ostream& ostr) : + m_ostr(ostr), + m_nTabDepth(0) +{} + +template +void Writer::Write_i(const ElementTypeT& element, std::ostream& ostr) +{ + Writer writer(ostr); + writer.Write_i(element); + ostr.flush(); // all done +} + +inline void Writer::Write_i(const Array& array) +{ + if (array.Empty()) + m_ostr << "[]"; + else + { + m_ostr << '[' << std::endl; + ++m_nTabDepth; + + Array::const_iterator it(array.Begin()), + itEnd(array.End()); + while (it != itEnd) { + m_ostr << std::string(m_nTabDepth, '\t'); + + Write_i(*it); + + if (++it != itEnd) + m_ostr << ','; + m_ostr << std::endl; + } + + --m_nTabDepth; + m_ostr << std::string(m_nTabDepth, '\t') << ']'; + } +} + +inline void Writer::Write_i(const Object& object) +{ + if (object.Empty()) + m_ostr << "{}"; + else + { + m_ostr << '{' << std::endl; + ++m_nTabDepth; + + Object::const_iterator it(object.Begin()), + itEnd(object.End()); + while (it != itEnd) { + m_ostr << std::string(m_nTabDepth, '\t'); + + Write_i(it->name); + + m_ostr << " : "; + Write_i(it->element); + + if (++it != itEnd) + m_ostr << ','; + m_ostr << std::endl; + } + + --m_nTabDepth; + m_ostr << std::string(m_nTabDepth, '\t') << '}'; + } +} + +inline void Writer::Write_i(const Number& numberElement) +{ + m_ostr << std::setprecision(20) << numberElement.Value(); +} + +inline void Writer::Write_i(const Boolean& booleanElement) +{ + m_ostr << (booleanElement.Value() ? "true" : "false"); +} + +inline void Writer::Write_i(const String& stringElement) +{ + m_ostr << '"'; + + const std::string& s = stringElement.Value(); + std::string::const_iterator it(s.begin()), + itEnd(s.end()); + for (; it != itEnd; ++it) + { + switch (*it) + { + case '"': m_ostr << "\\\""; break; + case '\\': m_ostr << "\\\\"; break; + case '\b': m_ostr << "\\b"; break; + case '\f': m_ostr << "\\f"; break; + case '\n': m_ostr << "\\n"; break; + case '\r': m_ostr << "\\r"; break; + case '\t': m_ostr << "\\t"; break; + //case '\u': m_ostr << "\\u"; break; // uh... + default: m_ostr << *it; break; + } + } + + m_ostr << '"'; +} + +inline void Writer::Write_i(const Null& ) +{ + m_ostr << "null"; +} + +inline void Writer::Write_i(const UnknownElement& unknown) +{ + unknown.Accept(*this); +} + +inline void Writer::Visit(const Array& array) { Write_i(array); } +inline void Writer::Visit(const Object& object) { Write_i(object); } +inline void Writer::Visit(const Number& number) { Write_i(number); } +inline void Writer::Visit(const String& string) { Write_i(string); } +inline void Writer::Visit(const Boolean& boolean) { Write_i(boolean); } +inline void Writer::Visit(const Null& null) { Write_i(null); } + + + +} // End namespace diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 2b742f4..1e2e76f 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -2,12 +2,21 @@ #include #include #include +#include #include + #include "Config.h" #include "Client.h" -#include "interface/Point.h" #include "Graphics.h" +#include "interface/Point.h" + +#include "search/Save.h" + +#include "cajun/reader.h" +#include "cajun/writer.h" +#include "cajun/elements.h" + Client::Client() { int i = 0; @@ -29,6 +38,69 @@ Client::~Client() http_done(); } +std::vector Client::SearchSaves(int start, int count, string query, string sort) +{ + lastError = ""; + std::vector saveArray; + std::stringstream urlStream; + char * data; + int dataStatus, dataLength; + urlStream << "http://" << SERVER << "/Browse.json?Start=" << start << "&Count=" << cout; + if(query.length() || sort.length()) + { + urlStream << "&Search_Query="; + if(query.length()) + urlStream << query; + if(sort.length()) + { + if(query.length()) + urlStream << " "; + urlStream << "sort:" << sort; + } + + } + data = http_simple_get((char *)urlStream.str().c_str(), &dataStatus, &dataLength); + if(dataStatus == 200 && data) + { + try + { + std::istringstream dataStream(data); // missing comma! + json::Object objDocument; + json::Reader::Read(objDocument, dataStream); + + json::Array savesArray = objDocument["Saves"]; + for(int j = 0; j < savesArray.Size(); j++) + { + json::Number tempID = savesArray[j]["ID"]; + json::Number tempScoreUp = savesArray[j]["ScoreUp"]; + json::Number tempScoreDown = savesArray[j]["ScoreDown"]; + json::String tempUsername = savesArray[j]["Username"]; + json::String tempName = savesArray[j]["Name"]; + saveArray.push_back( + Save( + tempID.Value(), + tempScoreUp.Value(), + tempScoreDown.Value(), + tempUsername.Value(), + tempName.Value() + ) + ); + } + } + catch (json::Exception &e) + { + lastError = "Could not read response"; + } + } + else + { + lastError = http_ret_text(dataStatus); + } + if(data) + free(data); + return saveArray; +} + void Client::ClearThumbnailRequests() { for(int i = 0; i < IMGCONNS; i++) diff --git a/src/client/Client.h b/src/client/Client.h index 3aa2333..9a86bfb 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -2,14 +2,18 @@ #define CLIENT_H #include +#include + #include "Config.h" #include "HTTP.h" #include "search/Thumbnail.h" +#include "search/Save.h" #include "Singleton.h" class Client: public Singleton { private: + std::string lastError; int thumbnailCacheNextID; Thumbnail * thumbnailCache[THUMB_CACHE_SIZE]; void * activeThumbRequests[IMGCONNS]; @@ -20,7 +24,9 @@ public: Client(); ~Client(); void ClearThumbnailRequests(); + std::vector SearchSaves(int start, int count, string query, string sort); Thumbnail * GetThumbnail(int saveID, int saveDate); + std::string GetLastError() { return lastError; } }; #endif // CLIENT_H diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index 494d490..16a99d4 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -1,18 +1,26 @@ #include "SearchModel.h" #include "Save.h" +#include "client/Client.h" + SearchModel::SearchModel() { } void SearchModel::UpdateSaveList() { + lastError = ""; saveList.clear(); notifySaveListChanged(); - for(int i = 0; i < 16; i++) + saveList = Client::Ref().SearchSaves(0, 12, "", ""); + if(!saveList.size()) { - saveList.push_back(Save(2198, 2333, 315, "dima-gord", "Destroyable city 5 (wth metro)")); + lastError = Client::Ref().GetLastError(); } + /*for(int i = 0; i < 16; i++) + { + saveList.push_back(Save(2198, 2333, 315, "dima-gord", "Destroyable city 5 (wth metro)")); + }*/ notifySaveListChanged(); } diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index 85d4177..e65c15e 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -2,6 +2,7 @@ #define SEARCHMODEL_H #include +#include #include "Save.h" #include "SearchView.h" @@ -11,6 +12,7 @@ class SearchView; class SearchModel { private: + string lastError; vector observers; vector saveList; void notifySaveListChanged(); @@ -19,6 +21,7 @@ public: void AddObserver(SearchView * observer); void UpdateSaveList(); vector GetSaveList(); + string GetLastError() { return lastError; } }; #endif // SEARCHMODEL_H diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 29d6eef..63a579e 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -1,10 +1,12 @@ #include "SearchView.h" #include "interface/SaveButton.h" +#include "interface/Label.h" #include "Misc.h" SearchView::SearchView(): ui::Window(ui::Point(0, 0), ui::Point(XRES+BARSIZE, YRES+MENUSIZE)), - saveButtons(vector()) + saveButtons(vector()), + errorLabel(NULL) { nextButton = new ui::Button(ui::Point(XRES+BARSIZE-52, YRES+MENUSIZE-18), ui::Point(50, 16), "Next \x95"); previousButton = new ui::Button(ui::Point(1, YRES+MENUSIZE-18), ui::Point(50, 16), "\x96 Prev"); @@ -24,37 +26,59 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) int i = 0; int buttonWidth, buttonHeight, saveX = 0, saveY = 0, savesX = 4, savesY = 3, buttonPadding = 2; int buttonAreaWidth, buttonAreaHeight, buttonXOffset, buttonYOffset; - buttonXOffset = 0; - buttonYOffset = 50; - buttonAreaWidth = Size.X; - buttonAreaHeight = Size.Y - buttonYOffset - 18; - buttonWidth = (buttonAreaWidth/savesX) - buttonPadding*2; - buttonHeight = (buttonAreaHeight/savesY) - buttonPadding*2; - for(i = 0; i < saveButtons.size(); i++) + + vector saves = sender->GetSaveList(); + if(!saves.size()) { - RemoveComponent(saveButtons[i]); - delete saveButtons[i]; + if(!errorLabel) + { + errorLabel = new ui::Label(ui::Point(((XRES+BARSIZE)/2)-100, ((YRES+MENUSIZE)/2)-6), ui::Point(200, 12), "Error"); + AddComponent(errorLabel); + } + if(sender->GetLastError().length()) + errorLabel->LabelText = sender->GetLastError(); + else + errorLabel->LabelText = "No saves found"; } - vector saves = sender->GetSaveList(); - for(i = 0; i < saves.size(); i++) + else { - if(saveX == savesX) + if(errorLabel) + { + RemoveComponent(errorLabel); + delete errorLabel; + errorLabel = NULL; + } + buttonXOffset = 0; + buttonYOffset = 50; + buttonAreaWidth = Size.X; + buttonAreaHeight = Size.Y - buttonYOffset - 18; + buttonWidth = (buttonAreaWidth/savesX) - buttonPadding*2; + buttonHeight = (buttonAreaHeight/savesY) - buttonPadding*2; + for(i = 0; i < saveButtons.size(); i++) + { + RemoveComponent(saveButtons[i]); + delete saveButtons[i]; + } + for(i = 0; i < saves.size(); i++) { - if(saveY == savesY-1) - break; - saveX = 0; - saveY++; + if(saveX == savesX) + { + if(saveY == savesY-1) + break; + saveX = 0; + saveY++; + } + ui::SaveButton * saveButton; + saveButton = new ui::SaveButton( + ui::Point( + buttonXOffset + buttonPadding + saveX*(buttonWidth+buttonPadding*2), + buttonYOffset + buttonPadding + saveY*(buttonHeight+buttonPadding*2) + ), + ui::Point(buttonWidth, buttonHeight), + saves[i]); + saveButtons.push_back(saveButton); + AddComponent(saveButton); + saveX++; } - ui::SaveButton * saveButton; - saveButton = new ui::SaveButton( - ui::Point( - buttonXOffset + buttonPadding + saveX*(buttonWidth+buttonPadding*2), - buttonYOffset + buttonPadding + saveY*(buttonHeight+buttonPadding*2) - ), - ui::Point(buttonWidth, buttonHeight), - saves[i]); - saveButtons.push_back(saveButton); - AddComponent(saveButton); - saveX++; } } diff --git a/src/search/SearchView.h b/src/search/SearchView.h index c68d42c..795fb74 100644 --- a/src/search/SearchView.h +++ b/src/search/SearchView.h @@ -5,6 +5,7 @@ #include "SearchController.h" #include "interface/SaveButton.h" #include "interface/Button.h" +#include "interface/Label.h" using namespace std; @@ -18,6 +19,7 @@ private: vector saveButtons; ui::Button * nextButton; ui::Button * previousButton; + ui::Label * errorLabel; public: void NotifySaveListChanged(SearchModel * sender); SearchView(); -- cgit v0.9.2-21-gd62e From c8073657fcbfd1bfa72538d7babe4964857e7101 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 20 Jan 2012 22:07:49 +0000 Subject: More stuff, need to fix memory leak diff --git a/Makefile b/Makefile index 43fa157..af59a9b 100644 --- a/Makefile +++ b/Makefile @@ -1,36 +1,45 @@ HEADERS := $(wildcard src/*.h) $(wildcard src/*/*.h) SOURCES := $(wildcard src/*.cpp) $(wildcard src/*/*.cpp) -OBJS += $(patsubst src/%.cpp,build/obj/powder.exe/%.o,$(SOURCES)) +OBJS := $(patsubst src/%.cpp,build/obj/%.o,$(SOURCES)) -FOLDERS := $(sort $(dir $(OBJS))) +FOLDERS := -CFLAGS := -w -Isrc/ -Idata/ -DWIN32 -DWINCONSOLE +CFLAGS := -w -Isrc/ -Idata/ OFLAGS := -fkeep-inline-functions #-O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -msse2 -LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 # -mwindows - -CFLAGS += $(OFLAGS) CPPC := g++ CPPC_WIN := i686-w64-mingw32-gcc WIN_RES := i686-w64-mingw32-windres -all: build/powder.exe +all: build/powder + powder.exe: build/powder.exe +powder: build/powder + +build/powder.exe: CFLAGS += -DWIN32 -DWINCONSOLE +build/powder.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 #-mwindows +build/powder: CFLAGS += -DLIN32 +build/powder: LFLAGS := -lSDL -lm -lbz2 + -build/powder.exe: buildpaths $(OBJS) - echo $(OBJS) - $(CPPC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LFLAGS) -o $@ -ggdb +build/powder.exe: buildpaths-powder.exe $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) + $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) $(LFLAGS) -o $@ -ggdb build/obj/powder.exe/%.o: src/%.cpp $(HEADERS) - $(CPPC) -c $(CFLAGS) -o $@ $< -ggdb -buildpaths: + $(CPPC) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb +buildpaths-powder.exe: $(shell mkdir build/obj/powder.exe/) - $(shell mkdir $(FOLDERS)) + $(shell mkdir $(sort $(dir $(OBJS)))) + +build/powder: buildpaths-powder $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS)) + $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS)) $(LFLAGS) -o $@ -ggdb +build/obj/powder/%.o: src/%.cpp $(HEADERS) + $(CPPC) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb +buildpaths-powder: + $(shell mkdir build/obj/powder/) + $(shell mkdir $(sort $(dir $(OBJS)))) clean: - rm build/obj/core/*.o - rm build/obj/ui/*.o - rm build/obj/elements/*.o - rm build/obj/*.o + rm -r build/obj/* rm build/*.exe \ No newline at end of file diff --git a/PowderToy++.files b/PowderToy++.files index 765f380..022927d 100644 --- a/PowderToy++.files +++ b/PowderToy++.files @@ -333,3 +333,6 @@ src/cajun/elements.h src/cajun/writer.inl src/cajun/reader.inl src/cajun/elements.inl +src/interface/Textbox.h +src/interface/Textbox.cpp +src/interface/Keys.h diff --git a/build/obj/.empty b/build/obj/.empty new file mode 100644 index 0000000..e69de29 diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 5d1db34..c6f5caf 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -63,28 +63,14 @@ int main(int argc, char * argv[]) int elapsedTime = 0, currentTime = 0, lastTime = 0, currentFrame = 0; float fps = 0, fpsLimit = 30, delta = 1.0f; - //Renderer * ren; - //Simulation * sim = new Simulation(); - //ren = new Renderer(g, sim); - ui::Engine::Ref().g = new Graphics(); ui::Engine::Ref().g->AttachSDLSurface(SDLOpen()); - ui::Engine * engine = &ui::Engine::Ref();//new ui::Engine(); - //ui::State * engineState = new ui::State(); - ui::Label * fpsLabel = new ui::Label(ui::Point(2, 2), ui::Point(200, 14), std::string("FPS: 0")); - //engineState->AddComponent(fpsLabel); + ui::Engine * engine = &ui::Engine::Ref(); engine->Begin(XRES, YRES); -// engine->SetState(engineState); GameController * gameController = new GameController(); engine->ShowWindow(gameController->GetView()); - /*ui::Sandbox * sandbox = new ui::Sandbox(); - ui::Button * button = new ui::Button(ui::Point(100, 100), ui::Point(100, 100), std::string("poP")); - engineState->AddComponent(fpsLabel); - engineState->AddComponent(sandbox); - engineState->AddComponent(button); - engineState->AddComponent(ControlFactory::MainMenu(0, YRES+MENUSIZE-17, XRES+BARSIZE, 16));*/ SDL_Event event; while(engine->Running()) @@ -98,6 +84,7 @@ int main(int argc, char * argv[]) engine->Exit(); break; case SDL_KEYDOWN: + engine->onKeyPress(event.key.keysym.sym, false, false, false); break; case SDL_KEYUP: break; @@ -113,11 +100,6 @@ int main(int argc, char * argv[]) } event.type = 0; //Clear last event } - //mouseButton = SDL_GetMouseState(&mouseX, &mouseY); - fpsLabel->LabelText = ""; - stringstream fpsText; - fpsText << "FPS: " << fps; - fpsLabel->LabelText = fpsText.str(); engine->Tick(delta); engine->Draw(); diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 1e2e76f..a3319b6 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -217,7 +217,6 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) activeThumbRequests[i] = http_async_req_start(NULL, (char *)urlStream.str().c_str(), NULL, 0, 1); activeThumbRequestTimes[i] = currentTime; activeThumbRequestCompleteTimes[i] = 0; - std::cout << "ThumbCache: Requesting " << urlStream.str() << " : " << idString << std::endl; activeThumbRequestIDs[i] = idString; return NULL; } diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index affa75d..783c297 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -130,34 +130,6 @@ void Button::Draw(const Point& screenPos) g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 255, 255, 255, 255); } - /*sf::RenderWindow* rw = reinterpret_cast(userdata); //it better be a RenderWindow or so help your god - - //Draw component here - sf::Text textGraphic(ButtonText); - textGraphic.SetCharacterSize(11); - if(isButtonDown) - textGraphic.SetColor(sf::Color::Black); - else - textGraphic.SetColor(sf::Color::White); - sf::FloatRect tempRect = textGraphic.GetRect(); - textGraphic.SetPosition(ceil(X + Width/2 - tempRect.Width/2), ceil(Y + Height/2 - tempRect.Height/2)); - - if(isMouseInside) - { - if(isButtonDown) - rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::White, 2.f, sf::Color::Black)); - else - rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::Black, 2.f, sf::Color::White)); - } - else - { - if(isButtonDown) - rw->Draw(sf::Shape::Rectangle(X+2, Y+2, Width-4, Width-4, sf::Color::White, 2.f, sf::Color::Black)); - else - rw->Draw(sf::Shape::Rectangle(X+1, Y+1, Width-2, Width-2, sf::Color::Black, 1.f, sf::Color::White)); - } - - rw->Draw(textGraphic);*/ } void Button::OnMouseUnclick(int x, int y, unsigned int button) @@ -218,6 +190,8 @@ void Button::SetActionCallback(ButtonAction * action) Button::~Button() { + if(actionCallback) + delete actionCallback; } } /* namespace ui */ diff --git a/src/interface/Keys.h b/src/interface/Keys.h new file mode 100644 index 0000000..e923703 --- /dev/null +++ b/src/interface/Keys.h @@ -0,0 +1,8 @@ +#define KEY_UP SDLK_UP +#define KEY_DOWN SDLK_DOWN +#define KEY_RIGHT SDLK_RIGHT +#define KEY_LEFT SDLK_LEFT +#define KEY_HOME SDLK_HOME +#define KEY_END SDLK_END +#define KEY_BACKSPACE SDLK_BACKSPACE +#define KEY_DELETE SDLK_DELETE diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp index cf09d4e..6fc47e2 100644 --- a/src/interface/Label.cpp +++ b/src/interface/Label.cpp @@ -1,30 +1,39 @@ #include #include "Config.h" #include "Global.h" -#include "interface/Point.h" -#include "interface/Label.h" +#include "Point.h" +#include "Label.h" using namespace ui; Label::Label(Window* parent_state, std::string labelText): Component(parent_state), - LabelText(labelText) + text(labelText), + textPosition(ui::Point(0, 0)), + textVAlign(AlignMiddle), + textHAlign(AlignCentre) { - + TextPosition(); } Label::Label(Point position, Point size, std::string labelText): Component(position, size), - LabelText(labelText) + text(labelText), + textPosition(ui::Point(0, 0)), + textVAlign(AlignMiddle), + textHAlign(AlignCentre) { - + TextPosition(); } Label::Label(std::string labelText): Component(), - LabelText(labelText) + text(labelText), + textPosition(ui::Point(0, 0)), + textVAlign(AlignMiddle), + textHAlign(AlignCentre) { - + TextPosition(); } Label::~Label() @@ -32,9 +41,45 @@ Label::~Label() } +void Label::TextPosition() +{ + //Position.X+(Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2, Position.Y+(Size.Y-10)/2 + switch(textVAlign) + { + case AlignTop: + textPosition.Y = 3; + break; + case AlignMiddle: + textPosition.Y = (Size.Y-10)/2; + break; + case AlignBottom: + textPosition.Y = Size.Y-11; + break; + } + + switch(textHAlign) + { + case AlignLeft: + textPosition.X = 3; + break; + case AlignCentre: + textPosition.X = (Size.X-Graphics::textwidth((char *)text.c_str()))/2; + break; + case AlignRight: + textPosition.X = (Size.X-Graphics::textwidth((char *)text.c_str()))-2; + break; + } +} + +void Label::SetText(std::string text) +{ + this->text = text; + TextPosition(); +} void Label::Draw(const Point& screenPos) { Graphics * g = Engine::Ref().g; - g->drawtext(Position.X+(Size.X-Graphics::textwidth((char *)LabelText.c_str()))/2, Position.Y+(Size.Y-10)/2, LabelText, 255, 255, 255, 255); + g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, text, 255, 255, 255, 255); } + diff --git a/src/interface/Label.h b/src/interface/Label.h index e56852e..9b5a454 100644 --- a/src/interface/Label.h +++ b/src/interface/Label.h @@ -4,20 +4,28 @@ #include #include "Component.h" +#include "Misc.h" namespace ui { class Label : public Component { + std::string text; + ui::Point textPosition; + HorizontalAlignment textHAlign; + VerticalAlignment textVAlign; public: Label(Window* parent_state, std::string labelText); - Label(Point position, Point size, std::string labelText); - Label(std::string labelText); virtual ~Label(); - std::string LabelText; + void TextPosition(); + void SetText(std::string text); + HorizontalAlignment GetHAlignment() { return textHAlign; } + VerticalAlignment GetVAlignment() { return textVAlign; } + void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign) { textHAlign = hAlign; textVAlign = vAlign; TextPosition(); } + virtual void Draw(const Point& screenPos); }; diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index 18f3281..cf1c0f2 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -58,6 +58,7 @@ void SaveButton::Tick(float dt) if(tempThumb) { thumbnail = tempThumb; //Store a local copy of the thumbnail + cout << (void *)(tempThumb) << " " << (void *)(&thumbnail) << endl; if(thumbnail->Data) { if(thumbnail->Size.Y > (Size.Y-25)) diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp new file mode 100644 index 0000000..3cedc15 --- /dev/null +++ b/src/interface/Textbox.cpp @@ -0,0 +1,192 @@ +#include +#include +#include "Config.h" +#include "Global.h" +#include "interface/Point.h" +#include "interface/Textbox.h" +#include "interface/Keys.h" + +using namespace ui; + +Textbox::Textbox(Window* parent_state, std::string textboxText): + Component(parent_state), + text(textboxText), + textPosition(ui::Point(0, 0)), + textVAlign(AlignMiddle), + textHAlign(AlignCentre), + actionCallback(NULL) +{ + TextPosition(); + cursor = text.length(); +} + +Textbox::Textbox(Point position, Point size, std::string textboxText): + Component(position, size), + text(textboxText), + textPosition(ui::Point(0, 0)), + textVAlign(AlignMiddle), + textHAlign(AlignCentre), + actionCallback(NULL) +{ + TextPosition(); + cursor = text.length(); +} + +Textbox::Textbox(std::string textboxText): + Component(), + text(textboxText), + textPosition(ui::Point(0, 0)), + textVAlign(AlignMiddle), + textHAlign(AlignCentre), + actionCallback(NULL) +{ + TextPosition(); + cursor = text.length(); +} + +Textbox::~Textbox() +{ + if(actionCallback) + delete actionCallback; +} + +void Textbox::TextPosition() +{ + std::string tempText = text; + if(tempText.length() && cursor) + { + tempText.erase(cursor, tempText.length()-cursor); + cursorPosition = Graphics::textwidth((char *)tempText.c_str()); + } + else + { + cursorPosition = 0; + } + //Position.X+(Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2, Position.Y+(Size.Y-10)/2 + switch(textVAlign) + { + case AlignTop: + textPosition.Y = 3; + break; + case AlignMiddle: + textPosition.Y = (Size.Y-10)/2; + break; + case AlignBottom: + textPosition.Y = Size.Y-11; + break; + } + + switch(textHAlign) + { + case AlignLeft: + textPosition.X = 3; + break; + case AlignCentre: + textPosition.X = (Size.X-Graphics::textwidth((char *)text.c_str()))/2; + break; + case AlignRight: + textPosition.X = (Size.X-Graphics::textwidth((char *)text.c_str()))-2; + break; + } +} + +void Textbox::SetText(std::string text) +{ + this->text = text; + TextPosition(); +} + +std::string Textbox::GetText() +{ + return text; +} + +void Textbox::OnKeyPress(int key, bool shift, bool ctrl, bool alt) +{ + bool changed = false; + try + { + switch(key) + { + case KEY_HOME: + cursor = 0; + break; + case KEY_END: + cursor = text.length(); + break; + case KEY_LEFT: + if(cursor > 0) + cursor--; + break; + case KEY_RIGHT: + if(cursor < text.length()) + cursor++; + break; + case KEY_DELETE: + if(text.length() && cursor < text.length()) + { + if(ctrl) + text.erase(cursor, text.length()-cursor); + else + text.erase(cursor, 1); + changed = true; + } + break; + case KEY_BACKSPACE: + if(text.length() && cursor > 0) + { + if(ctrl) + { + text.erase(0, cursor); + cursor = 0; + } + else + { + text.erase(cursor-1, 1); + cursor--; + } + changed = true; + } + break; + default: + if(key >= ' ' && key < 127) + { + if(cursor == text.length()) + { + text += key; + } + else + { + text.insert(cursor, 1, (char)key); + } + cursor++; + changed = true; + } + } + if(changed && actionCallback) + { + actionCallback->TextChangedCallback(this); + } + } + catch(std::out_of_range e) + { + cursor = 0; + text = ""; + } + TextPosition(); +} + +void Textbox::Draw(const Point& screenPos) +{ + Graphics * g = Engine::Ref().g; + if(IsFocused()) + { + g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); + g->draw_line(screenPos.X+textPosition.X+cursorPosition, screenPos.Y+3, screenPos.X+textPosition.X+cursorPosition, screenPos.Y+12, 255, 255, 255, XRES+BARSIZE); + } + else + { + g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 160, 160, 160, 255); + } + g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, text, 255, 255, 255, 255); +} diff --git a/src/interface/Textbox.h b/src/interface/Textbox.h new file mode 100644 index 0000000..5cd14f4 --- /dev/null +++ b/src/interface/Textbox.h @@ -0,0 +1,44 @@ +#ifndef TEXTBOX_H +#define TEXTBOX_H + +#include + +#include "Component.h" +#include "Misc.h" + +namespace ui +{ +class Textbox; +class TextboxAction +{ +public: + virtual void TextChangedCallback(ui::Textbox * sender) {} +}; +class Textbox : public Component +{ + std::string text; + ui::Point textPosition; + HorizontalAlignment textHAlign; + VerticalAlignment textVAlign; + int cursor, cursorPosition; + TextboxAction *actionCallback; +public: + Textbox(Window* parent_state, std::string textboxText); + Textbox(Point position, Point size, std::string textboxText); + Textbox(std::string textboxText); + virtual ~Textbox(); + + void TextPosition(); + void SetText(std::string text); + std::string GetText(); + HorizontalAlignment GetHAlignment() { return textHAlign; } + VerticalAlignment GetVAlignment() { return textVAlign; } + void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign) { textHAlign = hAlign; textVAlign = vAlign; TextPosition(); } + void SetActionCallback(TextboxAction * action) { actionCallback = action; } + virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + + virtual void Draw(const Point& screenPos); +}; +} + +#endif // TEXTBOX_H diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 90750e0..11871fd 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -1,3 +1,4 @@ +#include #include "SearchController.h" #include "SearchModel.h" #include "SearchView.h" @@ -10,8 +11,13 @@ SearchController::SearchController() searchModel->AddObserver(searchView); searchView->AttachController(this); - searchModel->UpdateSaveList(); + searchModel->UpdateSaveList(""); //Set up interface //windowPanel.AddChild(); } + +void SearchController::DoSearch(std::string query) +{ + searchModel->UpdateSaveList(query); +} diff --git a/src/search/SearchController.h b/src/search/SearchController.h index 10dd9bd..8676145 100644 --- a/src/search/SearchController.h +++ b/src/search/SearchController.h @@ -14,6 +14,7 @@ private: public: SearchController(); SearchView * GetView() { return searchView; } + void DoSearch(std::string query); }; #endif // SEARCHCONTROLLER_H diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index 16a99d4..96d340a 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -7,12 +7,12 @@ SearchModel::SearchModel() { } -void SearchModel::UpdateSaveList() +void SearchModel::UpdateSaveList(std::string query) { lastError = ""; saveList.clear(); notifySaveListChanged(); - saveList = Client::Ref().SearchSaves(0, 12, "", ""); + saveList = Client::Ref().SearchSaves(0, 12, query, ""); if(!saveList.size()) { lastError = Client::Ref().GetLastError(); diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index e65c15e..ca6a293 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -19,7 +19,7 @@ private: public: SearchModel(); void AddObserver(SearchView * observer); - void UpdateSaveList(); + void UpdateSaveList(std::string query); vector GetSaveList(); string GetLastError() { return lastError; } }; diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 63a579e..2ddd76c 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -1,6 +1,7 @@ #include "SearchView.h" #include "interface/SaveButton.h" #include "interface/Label.h" +#include "interface/Textbox.h" #include "Misc.h" SearchView::SearchView(): @@ -11,10 +12,34 @@ SearchView::SearchView(): nextButton = new ui::Button(ui::Point(XRES+BARSIZE-52, YRES+MENUSIZE-18), ui::Point(50, 16), "Next \x95"); previousButton = new ui::Button(ui::Point(1, YRES+MENUSIZE-18), ui::Point(50, 16), "\x96 Prev"); + class SearchAction : public ui::TextboxAction + { + SearchView * v; + public: + SearchAction(SearchView * _v) { v = _v; } + void TextChangedCallback(ui::Textbox * sender) + { + v->doSearch(); + } + }; + searchField = new ui::Textbox(ui::Point(60, 10), ui::Point((XRES+BARSIZE)-((50*2)+16+10+50+10), 16), ""); + searchField->SetAlignment(AlignLeft, AlignBottom); + searchField->SetActionCallback(new SearchAction(this)); + nextButton->SetAlignment(AlignRight, AlignBottom); previousButton->SetAlignment(AlignLeft, AlignBottom); AddComponent(nextButton); AddComponent(previousButton); + AddComponent(searchField); + + ui::Label * searchPrompt = new ui::Label(ui::Point(10, 10), ui::Point(50, 16), "Search:"); + searchPrompt->SetAlignment(AlignLeft, AlignBottom); + AddComponent(searchPrompt); +} + +void SearchView::doSearch() +{ + c->DoSearch(searchField->GetText()); } SearchView::~SearchView() @@ -36,9 +61,9 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) AddComponent(errorLabel); } if(sender->GetLastError().length()) - errorLabel->LabelText = sender->GetLastError(); + errorLabel->SetText(sender->GetLastError()); else - errorLabel->LabelText = "No saves found"; + errorLabel->SetText("No saves found"); } else { diff --git a/src/search/SearchView.h b/src/search/SearchView.h index 795fb74..8777c30 100644 --- a/src/search/SearchView.h +++ b/src/search/SearchView.h @@ -6,6 +6,7 @@ #include "interface/SaveButton.h" #include "interface/Button.h" #include "interface/Label.h" +#include "interface/Textbox.h" using namespace std; @@ -20,6 +21,8 @@ private: ui::Button * nextButton; ui::Button * previousButton; ui::Label * errorLabel; + ui::Textbox * searchField; + void doSearch(); public: void NotifySaveListChanged(SearchModel * sender); SearchView(); -- cgit v0.9.2-21-gd62e From 4949a5eac05339a4a82280588c97e948f134dfcb Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 20 Jan 2012 22:10:42 +0000 Subject: Fix case for header files diff --git a/src/Misc.cpp b/src/Misc.cpp index 44770d1..a6ac711 100644 --- a/src/Misc.cpp +++ b/src/Misc.cpp @@ -4,13 +4,9 @@ #include #include #include -#include "misc.h" #include "Config.h" -//#include "interface.h" -//#include "graphics.h" -//#include "powder.h" -//#include -//#include +#include "Misc.h" +#include "icondoc.h" #if defined WIN32 #include #include @@ -47,7 +43,7 @@ char *exe_name(void) } res = 1; #else - char fn[64], *name=malloc(64); + char fn[64], *name=(char *)malloc(64); size_t max=64, res; sprintf(fn, "/proc/self/exe"); memset(name, 0, max); @@ -544,7 +540,7 @@ int register_extension() "Comment=Physics sandbox game\n" "MimeType=application/vnd.powdertoy.save;\n" "NoDisplay=true\n"; - char *desktopfiledata = malloc(strlen(desktopfiledata_tmp)+strlen(currentfilename)+100); + char *desktopfiledata = (char *)malloc(strlen(desktopfiledata_tmp)+strlen(currentfilename)+100); strcpy(desktopfiledata, desktopfiledata_tmp); strappend(desktopfiledata, "Exec="); strappend(desktopfiledata, currentfilename); diff --git a/src/elements/watr.cpp b/src/elements/watr.cpp index b44fa22..9451a82 100644 --- a/src/elements/watr.cpp +++ b/src/elements/watr.cpp @@ -1,4 +1,4 @@ -#include "simulation/element.h" +#include "simulation/Element.h" int update_WATR(UPDATE_FUNC_ARGS) { int r, rx, ry; diff --git a/src/simulation/Air.cpp b/src/simulation/Air.cpp index 2d8d1b5..b3826ab 100644 --- a/src/simulation/Air.cpp +++ b/src/simulation/Air.cpp @@ -3,7 +3,7 @@ #include "Air.h" //#include //#include -#include "gravity.h" +#include "Gravity.h" /*float kernel[9]; diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index a1a785a..96b9d44 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1,13 +1,11 @@ #include #include -#define _cplusplus #include "Config.h" #include "Simulation.h" #include "Elements.h" #include "ElementFunctions.h" #include "Air.h" #include "Gravity.h" -//#include "powder.h" void Simulation::clear_area(int area_x, int area_y, int area_w, int area_h) { diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index b3c51af..969b030 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -12,7 +12,7 @@ #include "Renderer.h" #include "Graphics.h" #include "Elements.h" -#include "misc.h" +#include "Misc.h" #define CHANNELS ((int)(MAX_TEMP-73)/100+2) -- cgit v0.9.2-21-gd62e From 6a331fdaf848ce82adc930ad24ac15c5259d2262 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 20 Jan 2012 22:19:45 +0000 Subject: Makefile for Linux and finished fixing case issues with includes diff --git a/Makefile b/Makefile index af59a9b..bb1879e 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ build/obj/powder.exe/%.o: src/%.cpp $(HEADERS) $(CPPC) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb buildpaths-powder.exe: $(shell mkdir build/obj/powder.exe/) - $(shell mkdir $(sort $(dir $(OBJS)))) + $(shell mkdir $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS))))) build/powder: buildpaths-powder $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS)) $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS)) $(LFLAGS) -o $@ -ggdb @@ -38,8 +38,8 @@ build/obj/powder/%.o: src/%.cpp $(HEADERS) $(CPPC) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb buildpaths-powder: $(shell mkdir build/obj/powder/) - $(shell mkdir $(sort $(dir $(OBJS)))) + $(shell mkdir $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS))))) clean: rm -r build/obj/* - rm build/*.exe \ No newline at end of file + rm build/*.exe diff --git a/data/hmap.h b/data/hmap.h index 7de3fa3..605f28b 100644 --- a/data/hmap.h +++ b/data/hmap.h @@ -19,7 +19,7 @@ */ #ifndef HMAP_H #define HMAP_H -#include +#include static char color_data[] = {0x2B,0x00,0xFF,0x2B,0x00,0xFF,0x28,0x04,0xFF,0x24,0x08,0xFF,0x20,0x0D,0xFF,0x1C,0x12,0xFF,0x17,0x18,0xFF,0x12,0x1E,0xFF,0x0D,0x25,0xFF,0x07,0x2D,0xFF,0x03,0x35,0xFF,0x01,0x3E,0xFF,0x00,0x42,0xFF,0x00,0x44,0xFF,0x00,0x48,0xFF,0x00,0x4A,0xFF,0x00,0x4D,0xFF,0x00,0x51,0xFF,0x00,0x54,0xFF,0x00,0x58,0xFF,0x00,0x5C,0xFF,0x00,0x5E,0xFF,0x00,0x62,0xFF,0x00,0x66,0xFF,0x00,0x6A,0xFF,0x00,0x6D,0xFF,0x00,0x71,0xFF,0x00,0x75,0xFF,0x00,0x79,0xFF,0x00,0x7C,0xFF,0x00,0x7F,0xFF,0x00,0x83,0xFF,0x00,0x87,0xFF,0x00,0x8B,0xFF,0x00,0x8F,0xFF,0x00,0x92,0xFF,0x00,0x96,0xFF,0x00,0x99,0xFF,0x00,0x9C,0xFF,0x00,0xA0,0xFF,0x00,0xA3,0xFF,0x00,0xA7,0xFF,0x00,0xAA,0xFF,0x00,0xAD,0xFF,0x00,0xAE,0xFE,0x00,0xB1,0xFE,0x00,0xB3,0xFE,0x00,0xB6,0xFE,0x00,0xB9,0xFE,0x00,0xBB,0xFD,0x00,0xBD,0xFD,0x00,0xC0,0xFD,0x00,0xC2,0xFD,0x00,0xC5,0xFD,0x00,0xC7,0xFD,0x00,0xC9,0xFD,0x00,0xCC,0xFC,0x00,0xCF,0xFD,0x00,0xD0,0xFC,0x00,0xD3,0xFC,0x00,0xD5,0xFC,0x00,0xD7,0xFB,0x00,0xDA,0xFB,0x00,0xDC,0xFB,0x00,0xDE,0xFB,0x00,0xE1,0xFA,0x00,0xE3,0xF9,0x00,0xE6,0xF9,0x00,0xE7,0xF9,0x00,0xEA,0xF8,0x00,0xEB,0xF7,0x00,0xED,0xF7,0x00,0xEF,0xF6,0x00,0xF1,0xF5,0x00,0xF2,0xF4,0x00,0xF5,0xF3,0x00,0xF6,0xF2,0x00,0xF7,0xF2,0x00,0xFA,0xF0,0x00,0xFA,0xEF,0x00,0xFC,0xEE,0x00,0xFD,0xEC,0x00,0xFF,0xEB,0x00,0xFF,0xE9,0x00,0xFF,0xE8,0x00,0xFF,0xE7,0x00,0xFF,0xE6,0x00,0xFF,0xE3,0x00,0xFF,0xE3,0x00,0xFF,0xE1,0x00,0xFF,0xDF,0x00,0xFF,0xDE,0x00,0xFF,0xDC,0x00,0xFF,0xDA,0x00,0xFF,0xD8,0x00,0xFF,0xD6,0x00,0xFF,0xD4,0x00,0xFF,0xD2,0x00,0xFF,0xD0,0x00,0xFF,0xCF,0x00,0xFF,0xCC,0x00,0xFF,0xCA,0x00,0xFF,0xC8,0x00,0xFF,0xC5,0x00,0xFF,0xC3,0x00,0xFF,0xC1,0x00,0xFF,0xBF,0x00,0xFF,0xBD,0x00,0xFF,0xBB,0x00,0xFF,0xB9,0x00,0xFF,0xB5,0x00,0xFF,0xB3,0x00,0xFF,0xB1,0x00,0xFF,0xAF,0x00,0xFF,0xAC,0x00,0xFF,0xAA,0x00,0xFF,0xA8,0x00,0xFF,0xA5,0x00,0xFF,0xA3,0x00,0xFF,0xA1,0x00,0xFF,0x9F,0x00,0xFF,0x9C,0x00,0xFF,0x99,0x00,0xFF,0x97,0x00,0xFF,0x95,0x00,0xFF,0x93,0x00,0xFF,0x90,0x00,0xFF,0x8F,0x00,0xFF,0x8C,0x00,0xFF,0x8A,0x00,0xFF,0x88,0x00,0xFF,0x86,0x00,0xFF,0x83,0x00,0xFF,0x81,0x00,0xFF,0x7F,0x00,0xFF,0x7D,0x00,0xFF,0x7C,0x00,0xFF,0x7A,0x00,0xFF,0x78,0x00,0xFF,0x76,0x00,0xFF,0x74,0x00,0xFF,0x72,0x00,0xFF,0x71,0x00,0xFF,0x6F,0x00,0xFF,0x6D,0x00,0xFF,0x6A,0x00,0xFF,0x69,0x00,0xFF,0x67,0x00,0xFF,0x65,0x00,0xFF,0x64,0x00,0xFF,0x61,0x00,0xFF,0x5F,0x00,0xFF,0x5D,0x00,0xFF,0x5B,0x00,0xFF,0x5A,0x00,0xFF,0x57,0x00,0xFF,0x56,0x00,0xFF,0x54,0x00,0xFF,0x51,0x00,0xFF,0x4F,0x00,0xFF,0x4E,0x00,0xFF,0x4C,0x00,0xFF,0x4A,0x00,0xFF,0x48,0x00,0xFF,0x46,0x00,0xFF,0x45,0x00,0xFF,0x43,0x00,0xFF,0x40,0x00,0xFF,0x3F,0x00,0xFF,0x3C,0x00,0xFF,0x3B,0x00,0xFF,0x39,0x00,0xFF,0x37,0x00,0xFF,0x35,0x00,0xFF,0x33,0x00,0xFF,0x32,0x00,0xFF,0x30,0x00,0xFF,0x2F,0x00,0xFF,0x2D,0x00,0xFF,0x2B,0x00,0xFF,0x2A,0x00,0xFF,0x28,0x00,0xFF,0x27,0x00,0xFF,0x25,0x00,0xFF,0x23,0x00,0xFF,0x22,0x00,0xFF,0x21,0x00,0xFF,0x1F,0x00,0xFF,0x1E,0x00,0xFF,0x1C,0x00,0xFF,0x1B,0x00,0xFF,0x1A,0x00,0xFF,0x19,0x00,0xFF,0x18,0x00,0xFF,0x16,0x00,0xFF,0x16,0x01,0xFF,0x15,0x02,0xFF,0x14,0x02,0xFF,0x12,0x02,0xFF,0x12,0x03,0xFF,0x12,0x04,0xFF,0x10,0x05,0xFF,0x10,0x06,0xFF,0x0F,0x06,0xFF,0x0F,0x07,0xFF,0x0D,0x08,0xFF,0x0D,0x09,0xFF,0x0C,0x0A,0xFF,0x0C,0x0B,0xFF,0x0C,0x0C,0xFF,0x0B,0x0C,0xFF,0x0B,0x0E,0xFF,0x0A,0x0F,0xFF,0x09,0x10,0xFF,0x09,0x11,0xFF,0x08,0x12,0xFF,0x08,0x13,0xFF,0x08,0x14,0xFF,0x07,0x15,0xFF,0x07,0x16,0xFF,0x06,0x18,0xFF,0x06,0x19,0xFF,0x06,0x1A,0xFF,0x06,0x1C,0xFF,0x06,0x1D,0xFF,0x06,0x1E,0xFF,0x05,0x1F,0xFF,0x05,0x20,0xFF,0x05,0x21,0xFF,0x05,0x23,0xFF,0x04,0x24,0xFF,0x04,0x25,0xFF,0x04,0x26,0xFF,0x04,0x28,0xFF,0x03,0x29,0xFF,0x03,0x2B,0xFF,0x03,0x2B,0xFF,0x03,0x2D,0xFF,0x03,0x2E,0xFF,0x03,0x30,0xFF,0x03,0x31,0xFF,0x02,0x32,0xFF,0x03,0x34,0xFF,0x03,0x35,0xFF,0x02,0x37,0xFF,0x03,0x39,0xFF,0x02,0x3A,0xFF,0x02,0x3B,0xFF,0x01,0x3C,0xFF,0x01,0x3E,0xFF,0x01,0x3F,0xFF,0x01,0x40,0xFF,0x02,0x42,0xFF,0x02,0x44,0xFF,0x01,0x45,0xFF,0x01,0x46,0xFF,0x01,0x48,0xFF,0x01,0x49,0xFF,0x01,0x4A,0xFF,0x01,0x4C,0xFF,0x00,0x4E,0xFF,0x01,0x4E,0xFF,0x00,0x50,0xFF,0x01,0x52,0xFF,0x01,0x52,0xFF,0x00,0x54,0xFF,0x00,0x55,0xFF,0x00,0x56,0xFF,0x00,0x58,0xFF,0x00,0x58,0xFF,0x00,0x59,0xFF,0x00,0x5A,0xFF,0x00,0x5B,0xFF,0x00,0x5C,0xFF,0x00,0x5D,0xFF,0x00,0x5E,0xFF,0x00,0x5F,0xFF,0x00,0x60,0xFF,0x00,0x61,0xFF,0x00,0x62,0xFF,0x00,0x63,0xFF,0x00,0x64,0xFF,0x00,0x65,0xFF,0x00,0x66,0xFF,0x00,0x67,0xFF,0x00,0x69,0xFF,0x00,0x6A,0xFF,0x00,0x6A,0xFF,0x00,0x6B,0xFF,0x00,0x6C,0xFF,0x00,0x6E,0xFF,0x00,0x6F,0xFF,0x00,0x70,0xFF,0x00,0x71,0xFF,0x00,0x72,0xFF,0x00,0x73,0xFF,0x00,0x74,0xFF,0x00,0x75,0xFF,0x00,0x76,0xFF,0x00,0x77,0xFF,0x00,0x79,0xFF,0x00,0x7A,0xFF,0x00,0x7B,0xFF,0x00,0x7B,0xFF,0x00,0x7D,0xFF,0x00,0x7E,0xFF,0x00,0x7F,0xFF,0x00,0x80,0xFF,0x00,0x82,0xFF,0x00,0x83,0xFF,0x00,0x83,0xFF,0x00,0x84,0xFF,0x00,0x86,0xFF,0x00,0x87,0xFF,0x00,0x88,0xFF,0x00,0x89,0xFF,0x00,0x8A,0xFF,0x00,0x8C,0xFF,0x00,0x8D,0xFF,0x00,0x8E,0xFF,0x00,0x8F,0xFF,0x00,0x90,0xFF,0x00,0x92,0xFF,0x00,0x93,0xFF,0x00,0x93,0xFF,0x00,0x94,0xFF,0x00,0x96,0xFF,0x00,0x97,0xFF,0x00,0x98,0xFF,0x00,0x99,0xFF,0x00,0x9A,0xFF,0x00,0x9B,0xFF,0x00,0x9C,0xFF,0x00,0x9E,0xFF,0x00,0x9E,0xFF,0x00,0x9F,0xFF,0x00,0xA0,0xFF,0x00,0xA1,0xFF,0x00,0xA3,0xFF,0x00,0xA4,0xFF,0x00,0xA4,0xFF,0x00,0xA6,0xFF,0x00,0xA7,0xFF,0x00,0xA7,0xFF,0x00,0xA9,0xFF,0x00,0xAA,0xFF,0x00,0xAB,0xFF,0x00,0xAC,0xFF,0x00,0xAD,0xFF,0x00,0xAE,0xFF,0x00,0xAE,0xFF,0x00,0xB0,0xFF,0x00,0xB1,0xFF,0x00,0xB1,0xFF,0x00,0xB2,0xFF,0x00,0xB3,0xFF,0x00,0xB5,0xFF,0x00,0xB6,0xFF,0x00,0xB7,0xFF,0x00,0xB8,0xFF,0x00,0xB8,0xFF,0x00,0xBA,0xFF,0x00,0xBB,0xFF,0x00,0xBB,0xFF,0x00,0xBC,0xFF,0x00,0xBD,0xFF,0x00,0xBD,0xFF,0x00,0xBE,0xFF,0x00,0xBF,0xFF,0x00,0xC0,0xFE,0x00,0xC1,0xFE,0x00,0xC2,0xFE,0x00,0xC2,0xFF,0x00,0xC3,0xFE,0x00,0xC4,0xFE,0x00,0xC5,0xFE,0x00,0xC6,0xFD,0x00,0xC7,0xFD,0x00,0xC8,0xFD,0x00,0xC8,0xFC,0x00,0xC9,0xFC,0x00,0xCA,0xFC,0x00,0xCB,0xFC,0x00,0xCC,0xFB,0x00,0xCC,0xFC,0x00,0xCD,0xFB,0x00,0xCE,0xFB,0x00,0xCF,0xFB,0x00,0xCF,0xFA,0x00,0xD0,0xFA,0x00,0xD1,0xFA,0x00,0xD1,0xFA,0x00,0xD3,0xF9,0x00,0xD3,0xFA,0x00,0xD4,0xF9,0x00,0xD5,0xF9,0x00,0xD5,0xF8,0x00,0xD6,0xF8,0x00,0xD7,0xF8,0x00,0xD8,0xF7,0x00,0xD9,0xF7,0x00,0xD9,0xF6,0x00,0xDA,0xF7,0x00,0xDB,0xF6,0x00,0xDC,0xF5,0x00,0xDC,0xF5,0x00,0xDD,0xF5,0x00,0xDD,0xF5,0x00,0xDE,0xF5,0x00,0xDF,0xF4,0x00,0xDF,0xF4,0x00,0xE0,0xF3,0x00,0xE1,0xF4,0x00,0xE2,0xF2,0x00,0xE2,0xF3,0x00,0xE3,0xF2,0x00,0xE3,0xF1,0x00,0xE4,0xF1,0x00,0xE5,0xF1,0x00,0xE6,0xF0,0x00,0xE6,0xF0,0x00,0xE7,0xF0,0x00,0xE7,0xEF,0x00,0xE8,0xEF,0x00,0xE9,0xEE,0x00,0xEA,0xEE,0x00,0xEA,0xEE,0x00,0xEB,0xED,0x00,0xEC,0xED,0x00,0xEC,0xED,0x00,0xED,0xEB,0x00,0xED,0xEC,0x00,0xED,0xEB,0x00,0xEE,0xEA,0x00,0xEF,0xEB,0x00,0xF0,0xE9,0x00,0xF0,0xEA,0x00,0xF1,0xE9,0x00,0xF1,0xE8,0x00,0xF2,0xE7,0x00,0xF2,0xE7,0x00,0xF3,0xE6,0x00,0xF3,0xE6,0x00,0xF4,0xE6,0x00,0xF4,0xE5,0x00,0xF5,0xE5,0x00,0xF6,0xE4,0x00,0xF5,0xE3,0x00,0xF7,0xE3,0x00,0xF6,0xE2,0x00,0xF8,0xE1,0x00,0xF8,0xE1,0x00,0xF8,0xE1,0x00,0xF9,0xDF,0x00,0xF9,0xDF,0x00,0xFA,0xDE,0x00,0xFA,0xDE,0x00,0xFA,0xDE,0x00,0xFA,0xDD,0x00,0xFB,0xDC,0x00,0xFC,0xDB,0x00,0xFC,0xDB,0x00,0xFD,0xDB,0x00,0xFD,0xDA,0x00,0xFD,0xD8,0x00,0xFD,0xD8,0x00,0xFE,0xD8,0x00,0xFE,0xD7,0x00,0xFF,0xD6,0x00,0xFE,0xD5,0x00,0xFF,0xD5,0x00,0xFF,0xD3,0x00,0xFF,0xD3,0x00,0xFF,0xD2,0x00,0xFF,0xD2,0x00,0xFF,0xD2,0x00,0xFF,0xD0,0x00,0xFF,0xD0,0x00,0xFF,0xCF,0x00,0xFF,0xCF,0x00,0xFF,0xCE,0x00,0xFF,0xCD,0x00,0xFF,0xCC,0x00,0xFF,0xCC,0x00,0xFF,0xCB,0x00,0xFF,0xCA,0x00,0xFF,0xC9,0x00,0xFF,0xC9,0x00,0xFF,0xC8,0x00,0xFF,0xC7,0x00,0xFF,0xC7,0x00,0xFF,0xC6,0x00,0xFF,0xC5,0x00,0xFF,0xC5,0x00,0xFF,0xC4,0x00,0xFF,0xC3,0x00,0xFF,0xC2,0x00,0xFF,0xC2,0x00,0xFF,0xC1,0x00,0xFF,0xC0,0x00,0xFF,0xBF,0x00,0xFF,0xBE,0x00,0xFF,0xBD,0x00,0xFF,0xBC,0x00,0xFF,0xBC,0x00,0xFF,0xBB,0x00,0xFF,0xBA,0x00,0xFF,0xB9,0x00,0xFF,0xB9,0x00,0xFF,0xB8,0x00,0xFF,0xB6,0x00,0xFF,0xB6,0x00,0xFF,0xB5,0x00,0xFF,0xB4,0x00,0xFF,0xB3,0x00,0xFF,0xB2,0x00,0xFF,0xB1,0x00,0xFF,0xB0,0x00,0xFF,0xB0,0x00,0xFF,0xAF,0x00,0xFF,0xAE,0x00,0xFF,0xAD,0x00,0xFF,0xAC,0x00,0xFF,0xAB,0x00,0xFF,0xAA,0x00,0xFF,0xA9,0x00,0xFF,0xA8,0x00,0xFF,0xA8,0x00,0xFF,0xA6,0x00,0xFF,0xA6,0x00,0xFF,0xA5,0x00,0xFF,0xA4,0x00,0xFF,0xA3,0x00,0xFF,0xA2,0x00,0xFF,0xA1,0x00,0xFF,0xA0,0x00,0xFF,0x9F,0x00,0xFF,0x9E,0x00,0xFF,0x9D,0x00,0xFF,0x9D,0x00,0xFF,0x9B,0x00,0xFF,0x9B,0x00,0xFF,0x99,0x00,0xFF,0x98,0x00,0xFF,0x98,0x00,0xFF,0x97,0x00,0xFF,0x95,0x00,0xFF,0x94,0x00,0xFF,0x93,0x00,0xFF,0x93,0x00,0xFF,0x92,0x00,0xFF,0x91,0x00,0xFF,0x90,0x00,0xFF,0x8F,0x00,0xFF,0x8E,0x00,0xFF,0x8D,0x00,0xFF,0x8C,0x00,0xFF,0x8B,0x00,0xFF,0x8A,0x00,0xFF,0x89,0x00,0xFF,0x89,0x00,0xFF,0x88,0x00,0xFF,0x87,0x00,0xFF,0x86,0x00,0xFF,0x84,0x00,0xFF,0x84,0x00,0xFF,0x82,0x00,0xFF,0x82,0x00,0xFF,0x81,0x00,0xFF,0x80,0x00,0xFF,0x7F,0x00,0xFF,0x7E,0x00,0xFF,0x7D,0x00,0xFF,0x7C,0x00,0xFF,0x7B,0x00,0xFF,0x7B,0x00,0xFF,0x7A,0x00,0xFF,0x78,0x00,0xFF,0x78,0x00,0xFF,0x77,0x00,0xFF,0x76,0x00,0xFF,0x74,0x00,0xFF,0x74,0x00,0xFF,0x73,0x00,0xFF,0x72,0x00,0xFF,0x71,0x00,0xFF,0x70,0x00,0xFF,0x70,0x00,0xFF,0x6E,0x00,0xFF,0x6D,0x00,0xFF,0x6C,0x00,0xFF,0x6C,0x00,0xFF,0x6B,0x00,0xFF,0x6A,0x00,0xFF,0x6A,0x00,0xFF,0x68,0x00,0xFF,0x67,0x00,0xFF,0x66,0x00,0xFF,0x66,0x00,0xFF,0x65,0x00,0xFF,0x64,0x00,0xFF,0x64,0x00,0xFF,0x62,0x00,0xFF,0x62,0x00,0xFF,0x61,0x00,0xFF,0x60,0x00,0xFF,0x5F,0x00,0xFF,0x5E,0x00,0xFF,0x5D,0x00,0xFF,0x5D,0x00,0xFF,0x5C,0x00,0xFF,0x5A,0x00,0xFF,0x5A,0x00,0xFF,0x59,0x00,0xFF,0x58,0x00,0xFF,0x57,0x00,0xFF,0x56,0x00,0xFF,0x55,0x00,0xFF,0x54,0x00,0xFF,0x54,0x00,0xFF,0x53,0x00,0xFF,0x52,0x00,0xFF,0x51,0x00,0xFF,0x50,0x00,0xFF,0x4F,0x00,0xFF,0x4E,0x00,0xFF,0x4D,0x00,0xFF,0x4D,0x00,0xFF,0x4C,0x00,0xFF,0x4A,0x00,0xFF,0x4A,0x00,0xFF,0x48,0x00,0xFF,0x47,0x00,0xFF,0x47,0x00,0xFF,0x45,0x00,0xFF,0x45,0x00,0xFF,0x44,0x00,0xFF,0x43,0x00,0xFF,0x43,0x00,0xFF,0x41,0x00,0xFF,0x40,0x00,0xFF,0x40,0x00,0xFF,0x3F,0x00,0xFF,0x3E,0x00,0xFF,0x3C,0x00,0xFF,0x3C,0x00,0xFF,0x3B,0x00,0xFF,0x3A,0x00,0xFF,0x38,0x00,0xFF,0x38,0x00,0xFF,0x37,0x00,0xFF,0x36,0x00,0xFF,0x35,0x00,0xFF,0x34,0x00,0xFF,0x34,0x00,0xFF,0x33,0x00,0xFF,0x31,0x00,0xFF,0x31,0x00,0xFF,0x2F,0x00,0xFF,0x2F,0x00,0xFF,0x2E,0x00,0xFF,0x2C,0x00,0xFF,0x2C,0x00,0xFF,0x2B,0x00,0xFF,0x2A,0x00,0xFF,0x29,0x00,0xFF,0x28,0x00,0xFF,0x27,0x00,0xFF,0x26,0x00,0xFF,0x26,0x00,0xFF,0x25,0x00,0xFF,0x25,0x00,0xFF,0x23,0x00,0xFF,0x23,0x00,0xFF,0x22,0x00,0xFF,0x21,0x00,0xFF,0x20,0x00,0xFF,0x1F,0x00,0xFF,0x1E,0x00,0xFF,0x1D,0x00,0xFF,0x1D,0x00,0xFF,0x1C,0x00,0xFF,0x1B,0x00,0xFF,0x1A,0x00,0xFF,0x19,0x00,0xFF,0x19,0x00,0xFF,0x18,0x00,0xFF,0x17,0x00,0xFF,0x16,0x00,0xFF,0x15,0x00,0xFF,0x15,0x00,0xFF,0x14,0x00,0xFF,0x14,0x00,0xFF,0x12,0x00,0xFF,0x12,0x00,0xFF,0x12,0x00,0xFF,0x10,0x00,0xFF,0x10,0x00,0xFF,0x0F,0x00,0xFF,0x0E,0x00,0xFF,0x0E,0x00,0xFF,0x0D,0x00,0xFF,0x0C,0x00,0xFF,0x0B,0x00,0xFF,0x0B,0x00,0xFF,0x0B,0x00,0xFF,0x0A,0x00,0xFF,0x09,0x00,0xFF,0x09,0x00,0xFF,0x08,0x00,0xFF,0x07,0x00,0xFF,0x07,0x00,0xFF,0x06,0x00,0xFF,0x06,0x00,0xFF,0x05,0x00,0xFF,0x04,0x00,0xFF,0x04,0x00,0xFF,0x04,0x00,0xFF,0x04,0x00,0xFF,0x03,0x00,0xFF,0x03,0x00,0xFF,0x02,0x00,0xFF,0x01,0x00,0xFF,0x01,0x00,0xFF,0x01,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x01,0xFF,0x00,0x01,0xFF,0x00,0x02,0xFF,0x00,0x01,0xFF,0x00,0x02,0xFF,0x00,0x03,0xFF,0x00,0x03,0xFF,0x00,0x03,0xFF,0x00,0x04,0xFF,0x00,0x05,0xFF,0x00,0x05,0xFF,0x00,0x05,0xFF,0x00,0x06,0xFF,0x00,0x07,0xFF,0x00,0x06,0xFF,0x00,0x07,0xFF,0x00,0x08,0xFF,0x00,0x09,0xFF,0x00,0x09,0xFF,0x00,0x09,0xFF,0x00,0x0B,0xFF,0x00,0x0B,0xFF,0x00,0x0C,0xFF,0x00,0x0B,0xFF,0x00,0x0C,0xFF,0x00,0x0E,0xFF,0x00,0x0D,0xFF,0x00,0x0E,0xFF,0x00,0x0F,0xFF,0x00,0x0F,0xFF,0x00,0x10,0xFF,0x00,0x11,0xFF,0x00,0x11,0xFF,0x00,0x12,0xFF,0x00,0x13,0xFF,0x00,0x14,0xFF,0x00,0x14,0xFF,0x00,0x15,0xFF,0x00,0x16,0xFF,0x00,0x16,0xFF,0x00,0x17,0xFF,0x00,0x17,0xFF,0x00,0x18,0xFF,0x00,0x19,0xFF,0x00,0x1A,0xFF,0x00,0x1A,0xFF,0x00,0x1B,0xFF,0x00,0x1C,0xFF,0x00,0x1D,0xFF,0x00,0x1E,0xFF,0x00,0x1E,0xFF,0x00,0x1F,0xFF,0x00,0x20,0xFF,0x00,0x21,0xFF,0x00,0x22,0xFF,0x00,0x22,0xFF,0x00,0x22,0xFF,0x00,0x24,0xFF,0x00,0x25,0xFF,0x00,0x26,0xFF,0x00,0x26,0xFF,0x00,0x27,0xFF,0x00,0x27,0xFF,0x00,0x28,0xFF,0x00,0x2A,0xFF,0x00,0x2A,0xFF,0x00,0x2B,0xFF,0x00,0x2C,0xFF,0x00,0x2C,0xFF,0x00,0x2E,0xFF,0x00,0x2E,0xFF,0x00,0x2F,0xFF,0x00,0x30,0xFF,0x00,0x31,0xFF,0x00,0x31,0xFF,0x00,0x32,0xFF,0x00,0x33,0xFF,0x00,0x34,0xFF,0x00,0x35,0xFF,0x00,0x36,0xFF,0x00,0x37,0xFF,0x00,0x37,0xFF,0x00,0x39,0xFF,0x00,0x3A,0xFF,0x00,0x3A,0xFF,0x00,0x3B,0xFF,0x00,0x3C,0xFF,0x00,0x3D,0xFF,0x00,0x3E,0xFF,0x00,0x3E,0xFF,0x00,0x3F,0xFF,0x00,0x40,0xFF,0x00,0x41,0xFF,0x00,0x42,0xFF,0x00,0x43,0xFF,0x00,0x43,0xFF,0x00,0x45,0xFF,0x00,0x46,0xFF,0x00,0x46,0xFF,0x00,0x47,0xFF,0x00,0x48,0xFF,0x00,0x49,0xFF,0x00,0x4A,0xFF,0x00,0x4B,0xFF,0x00,0x4C,0xFF,0x00,0x4C,0xFF,0x00,0x4D,0xFF,0x00,0x4E,0xFF,0x00,0x4F,0xFF,0x00,0x50,0xFF,0x00,0x51,0xFF,0x00,0x51,0xFF,0x00,0x52,0xFF,0x00,0x53,0xFF,0x00,0x54,0xFF,0x00,0x54,0xFF,0x00,0x56,0xFF,0x00,0x56,0xFF,0x00,0x57,0xFF,0x00,0x59,0xFF,0x00,0x59,0xFF,0x00,0x5A,0xFF,0x00,0x5A,0xFF,0x00,0x5C,0xFF,0x00,0x5D,0xFF,0x00,0x5D,0xFF,0x00,0x5E,0xFF,0x00,0x5F,0xFF,0x00,0x60,0xFF,0x00,0x61,0xFF,0x00,0x61,0xFF,0x00,0x62,0xFF,0x00,0x63,0xFF,0x00,0x64,0xFF,0x00,0x64,0xFF,0x00,0x65,0xFF,0x00,0x66,0xFF,0x00,0x67,0xFF,0x00,0x67,0xFF,0x00,0x68,0xFF,0x00,0x69,0xFF,0x00,0x6A,0xFF,0x00,0x6B,0xFF,0x00,0x6B,0xFF,0x00,0x6C,0xFF,0x00,0x6C,0xFF,0x00,0x6D,0xFF,0x00,0x6E,0xFF,0x00,0x6F,0xFF,0x00,0x6F,0xFF,0x00,0x70,0xFF,0x00,0x71,0xFF,0x00,0x72,0xFF,0x00,0x72,0xFF,0x00,0x73,0xFF,0x00,0x74,0xFF,0x00,0x74,0xFF,0x00,0x75,0xFF,0x00,0x76,0xFF,0x00,0x77,0xFF,0x00,0x78,0xFF,0x00,0x78,0xFF,0x00,0x79,0xFF,0x00,0x7A,0xFF,0x00,0x7A,0xFF,0x00,0x7B,0xFF,0x00,0x7C,0xFF,0x00,0x7D,0xFF,0x00,0x7E,0xFF,0x00,0x7E,0xFF,0x00,0x80,0xFF,0x00,0x80,0xFF,0x00,0x81,0xFF,0x00,0x82,0xFF,0x00,0x82,0xFF,0x00,0x83,0xFF,0x00,0x84,0xFF,0x00,0x85,0xFF,0x00,0x85,0xFF,0x00,0x87,0xFF,0x00,0x87,0xFF,0x00,0x88,0xFF,0x00,0x89,0xFF,0x00,0x8A,0xFF,0x00,0x8A,0xFF,0x00,0x8B,0xFF,0x00,0x8C,0xFF,0x00,0x8D,0xFF,0x00,0x8E,0xFF,0x00,0x8F,0xFF,0x00,0x90,0xFF,0x00,0x90,0xFF,0x00,0x91,0xFF,0x00,0x92,0xFF,0x00,0x92,0xFF,0x00,0x94,0xFF,0x00,0x94,0xFF,0x00,0x95,0xFF,0x00,0x95,0xFF,0x00,0x97,0xFF,0x00,0x98,0xFF,0x00,0x98,0xFF,0x00,0x99,0xFF,0x00,0x9A,0xFF,0x00,0x9B,0xFF,0x00,0x9B,0xFF,0x00,0x9C,0xFF,0x00,0x9D,0xFF,0x00,0x9E,0xFF,0x00,0x9F,0xFF,0x00,0x9F,0xFF,0x00,0xA0,0xFF,0x00,0xA1,0xFF,0x00,0xA2,0xFF,0x00,0xA2,0xFF,0x00,0xA3,0xFF,0x00,0xA4,0xFF,0x00,0xA5,0xFF,0x00,0xA6,0xFF,0x00,0xA6,0xFF,0x00,0xA7,0xFF,0x00,0xA8,0xFF,0x00,0xA9,0xFF,0x00,0xAA,0xFF,0x00,0xAA,0xFF,0x00,0xAB,0xFF,0x00,0xAC,0xFF,0x00,0xAD,0xFF,0x00,0xAE,0xFF,0x00,0xAE,0xFF,0x00,0xAF,0xFF,0x00,0xB0,0xFF,0x00,0xB1,0xFF,0x00,0xB1,0xFF,0x00,0xB2,0xFF,0x00,0xB3,0xFF,0x00,0xB4,0xFF,0x00,0xB4,0xFF,0x00,0xB5,0xFF,0x00,0xB6,0xFF,0x00,0xB7,0xFF,0x00,0xB7,0xFF,0x00,0xB8,0xFF,0x00,0xB9,0xFF,0x00,0xB9,0xFF,0x00,0xBA,0xFF,0x00,0xBA,0xFF,0x00,0xBC,0xFF,0x00,0xBC,0xFF,0x00,0xBC,0xFF,0x00,0xBD,0xFF,0x00,0xBE,0xFF,0x00,0xBE,0xFF,0x00,0xBF,0xFF,0x00,0xC0,0xFF,0x00,0xC1,0xFF,0x00,0xC1,0xFF,0x00,0xC1,0xFF,0x00,0xC2,0xFF,0x00,0xC2,0xFF,0x00,0xC4,0xFF,0x00,0xC4,0xFF,0x00,0xC5,0xFF,0x00,0xC5,0xFF,0x00,0xC6,0xFF,0x00,0xC7,0xFF,0x00,0xC7,0xFF,0x00,0xC7,0xFF,0x00,0xC8,0xFF,0x00,0xC9,0xFF,0x00,0xC9,0xFF,0x00,0xCA,0xFF,0x00,0xCA,0xFF,0x00,0xCB,0xFF,0x00,0xCC,0xFF,0x00,0xCC,0xFF,0x00,0xCC,0xFF,0x00,0xCD,0xFF,0x00,0xCD,0xFF,0x00,0xCE,0xFF,0x00,0xCE,0xFF,0x00,0xCF,0xFF,0x00,0xCF,0xFF,0x00,0xD0,0xFF,0x00,0xD0,0xFF,0x00,0xD1,0xFF,0x00,0xD1,0xFF,0x00,0xD1,0xFF,0x00,0xD2,0xFF,0x00,0xD2,0xFF,0x00,0xD3,0xFF,0x00,0xD3,0xFF,0x00,0xD4,0xFF,0x00,0xD3,0xFF,0x00,0xD4,0xFF,0x00,0xD4}; //1024 Pixels //static char plasma_data[] = {0x00,0x00,0x00,0x03,0x00,0x00,0x05,0x00,0x00,0x09,0x00,0x00,0x0E,0x00,0x00,0x12,0x00,0x00,0x17,0x00,0x00,0x1C,0x00,0x00,0x22,0x00,0x00,0x27,0x00,0x00,0x2C,0x00,0x00,0x32,0x00,0x00,0x37,0x00,0x00,0x3C,0x00,0x00,0x41,0x00,0x00,0x45,0x00,0x00,0x4A,0x00,0x00,0x4D,0x00,0x00,0x51,0x00,0x00,0x53,0x00,0x00,0x55,0x00,0x00,0x55,0x00,0x02,0x55,0x02,0x03,0x55,0x03,0x06,0x55,0x03,0x07,0x55,0x05,0x09,0x55,0x06,0x0C,0x55,0x06,0x0F,0x55,0x07,0x10,0x55,0x09,0x13,0x55,0x0A,0x16,0x55,0x0C,0x1A,0x55,0x0C,0x1D,0x54,0x0E,0x20,0x53,0x10,0x23,0x54,0x11,0x26,0x53,0x13,0x2A,0x52,0x14,0x2E,0x51,0x15,0x31,0x50,0x17,0x35,0x50,0x19,0x38,0x4E,0x1A,0x3D,0x4D,0x1C,0x40,0x4D,0x1D,0x44,0x4C,0x1F,0x47,0x4B,0x21,0x4C,0x4A,0x23,0x4F,0x49,0x24,0x54,0x48,0x25,0x57,0x47,0x28,0x5B,0x46,0x29,0x5F,0x45,0x2B,0x62,0x44,0x2D,0x66,0x44,0x2E,0x6A,0x43,0x30,0x6E,0x42,0x32,0x72,0x41,0x33,0x76,0x40,0x35,0x79,0x3F,0x38,0x7C,0x3F,0x39,0x7F,0x3E,0x3B,0x83,0x3D,0x3D,0x86,0x3C,0x3F,0x8A,0x3B,0x40,0x8C,0x3B,0x43,0x8F,0x3B,0x44,0x92,0x3A,0x46,0x95,0x39,0x48,0x98,0x39,0x4A,0x9B,0x39,0x4C,0x9C,0x39,0x4E,0x9F,0x3A,0x4F,0xA1,0x39,0x51,0xA3,0x39,0x52,0xA4,0x39,0x54,0xA6,0x39,0x56,0xA7,0x39,0x57,0xA8,0x39,0x58,0xA8,0x3A,0x5A,0xA9,0x3A,0x5C,0xA8,0x3A,0x5D,0xA8,0x3B,0x5F,0xA8,0x3C,0x61,0xA8,0x3D,0x62,0xA8,0x3D,0x64,0xA9,0x3E,0x66,0xA8,0x3E,0x67,0xA9,0x3F,0x68,0xA8,0x40,0x6A,0xA8,0x41,0x6C,0xA8,0x42,0x6E,0xA8,0x42,0x70,0xA8,0x43,0x71,0xA8,0x44,0x73,0xA8,0x45,0x74,0xA9,0x46,0x76,0xA8,0x48,0x79,0xA8,0x49,0x7A,0xA7,0x4A,0x7C,0xA6,0x4A,0x7D,0xA5,0x4C,0x7F,0xA4,0x4D,0x81,0xA3,0x4E,0x83,0xA2,0x4E,0x85,0xA1,0x50,0x86,0xA0,0x51,0x88,0x9F,0x52,0x8A,0x9D,0x53,0x8B,0x9D,0x55,0x8D,0x9B,0x56,0x8F,0x9A,0x57,0x91,0x98,0x58,0x92,0x98,0x5A,0x94,0x97,0x5B,0x96,0x95,0x5C,0x97,0x94,0x5E,0x99,0x93,0x5F,0x9A,0x91,0x60,0x9C,0x90,0x61,0x9D,0x90,0x62,0x9F,0x8E,0x64,0xA1,0x8D,0x65,0xA2,0x8C,0x67,0xA3,0x8B,0x68,0xA5,0x8A,0x6A,0xA6,0x89,0x6A,0xA7,0x88,0x6B,0xA9,0x87,0x6D,0xAB,0x86,0x6E,0xAB,0x86,0x6F,0xAE,0x85,0x71,0xAE,0x85,0x72,0xAF,0x85,0x73,0xB0,0x84,0x75,0xB2,0x83,0x75,0xB2,0x83,0x77,0xB4,0x83,0x77,0xB5,0x83,0x79,0xB6,0x83,0x7A,0xB6,0x83,0x7B,0xB8,0x83,0x7D,0xB9,0x84,0x7E,0xB9,0x83,0x7F,0xBA,0x84,0x7F,0xBB,0x85,0x82,0xBC,0x85,0x83,0xBD,0x86,0x84,0xBD,0x87,0x85,0xBD,0x87,0x86,0xBE,0x88,0x88,0xBF,0x88,0x89,0xBF,0x89,0x8A,0xC0,0x8B,0x8B,0xC0,0x8C,0x8D,0xC1,0x8D,0x8F,0xC1,0x8E,0x90,0xC2,0x8F,0x91,0xC1,0x90,0x92,0xC2,0x91,0x94,0xC3,0x93,0x95,0xC3,0x93,0x97,0xC3,0x95,0x98,0xC3,0x96,0x99,0xC3,0x98,0x9B,0xC4,0x99,0x9C,0xC3,0x9A,0x9E,0xC4,0x9B,0x9F,0xC4,0x9D,0xA0,0xC4,0x9E,0xA2,0xC4,0x9F,0xA4,0xC4,0xA0,0xA5,0xC4,0xA2,0xA6,0xC4,0xA4,0xA8,0xC4,0xA5,0xA9,0xC5,0xA6,0xAA,0xC5,0xA8,0xAB,0xC4,0xA9,0xAC,0xC4,0xAA,0xAE,0xC4,0xAC,0xAF,0xC4,0xAD,0xB0,0xC4,0xAE,0xB2,0xC4,0xB0,0xB3,0xC4,0xB1,0xB4,0xC4,0xB3,0xB5,0xC5,0xB4,0xB6,0xC4,0xB6,0xB7,0xC4,0xB7,0xB8,0xC4,0xB7,0xBA,0xC4,0xB9,0xBA,0xC4,0xBA,0xBC,0xC4,0xBB,0xBC,0xC4,0xBC,0xBE,0xC4,0xBD,0xBF,0xC4,0xBE,0xBF,0xC4,0xBF,0xC0,0xC4,0xC0,0xC1,0xC4,0xC1,0xC2,0xC4,0xC2,0xC2,0xC4,0xC3,0xC4,0xC4,0xC3,0xC4,0xC4,0xC4}; //200 Pixels static char hflm_data[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x01,0x01,0x02,0x02,0x01,0x04,0x02,0x01,0x04,0x02,0x03,0x05,0x03,0x03,0x07,0x04,0x04,0x08,0x04,0x03,0x09,0x04,0x04,0x0B,0x05,0x04,0x0C,0x05,0x05,0x0D,0x06,0x05,0x0E,0x07,0x06,0x10,0x07,0x07,0x11,0x08,0x07,0x12,0x09,0x08,0x14,0x09,0x08,0x15,0x0A,0x09,0x17,0x0A,0x09,0x19,0x0B,0x0A,0x1A,0x0C,0x0A,0x1C,0x0D,0x0B,0x1D,0x0D,0x0B,0x1F,0x0D,0x0C,0x22,0x0F,0x0D,0x23,0x0F,0x0E,0x25,0x10,0x0E,0x26,0x11,0x0F,0x28,0x12,0x10,0x2A,0x13,0x10,0x2C,0x13,0x11,0x2E,0x14,0x12,0x2F,0x15,0x12,0x31,0x15,0x13,0x33,0x16,0x14,0x35,0x17,0x15,0x36,0x18,0x15,0x39,0x19,0x16,0x3B,0x19,0x17,0x3D,0x1B,0x17,0x3E,0x1B,0x18,0x40,0x1C,0x19,0x42,0x1D,0x1A,0x43,0x1D,0x1B,0x45,0x1E,0x1C,0x47,0x1F,0x1C,0x49,0x20,0x1D,0x4B,0x21,0x1F,0x4C,0x21,0x1F,0x4E,0x22,0x20,0x50,0x23,0x21,0x52,0x23,0x22,0x53,0x24,0x23,0x55,0x25,0x23,0x56,0x26,0x24,0x59,0x26,0x25,0x5A,0x27,0x26,0x5B,0x28,0x27,0x5D,0x28,0x28,0x5E,0x29,0x29,0x60,0x29,0x2A,0x62,0x2A,0x2B,0x63,0x2B,0x2C,0x64,0x2C,0x2E,0x65,0x2C,0x2E,0x66,0x2C,0x2F,0x68,0x2D,0x31,0x69,0x2E,0x32,0x6A,0x2F,0x32,0x6B,0x2F,0x34,0x6C,0x30,0x34,0x6D,0x30,0x35,0x6F,0x31,0x37,0x70,0x31,0x38,0x71,0x32,0x39,0x72,0x33,0x3B,0x73,0x33,0x3C,0x74,0x34,0x3D,0x75,0x35,0x3E,0x76,0x35,0x3F,0x78,0x36,0x41,0x78,0x36,0x42,0x79,0x36,0x43,0x7A,0x37,0x44,0x7B,0x37,0x46,0x7C,0x38,0x48,0x7D,0x39,0x48,0x7E,0x3A,0x49,0x7F,0x39,0x4B,0x80,0x3A,0x4C,0x81,0x3B,0x4E,0x82,0x3C,0x4F,0x83,0x3C,0x51,0x84,0x3C,0x52,0x84,0x3D,0x54,0x86,0x3E,0x55,0x87,0x3E,0x56,0x88,0x3F,0x57,0x89,0x40,0x59,0x8A,0x40,0x5A,0x8A,0x41,0x5C,0x8B,0x41,0x5D,0x8C,0x42,0x5F,0x8D,0x41,0x60,0x8E,0x42,0x62,0x8E,0x42,0x62,0x8F,0x44,0x65,0x90,0x43,0x65,0x91,0x45,0x67,0x91,0x44,0x69,0x92,0x45,0x6A,0x93,0x46,0x6B,0x94,0x46,0x6C,0x94,0x46,0x6E,0x96,0x47,0x70,0x96,0x48,0x70,0x97,0x48,0x72,0x98,0x48,0x73,0x99,0x49,0x74,0x99,0x49,0x76,0x9A,0x4A,0x77,0x9A,0x4B,0x78,0x9B,0x4B,0x7A,0x9C,0x4B,0x7B,0x9D,0x4B,0x7C,0x9E,0x4C,0x7D,0x9F,0x4C,0x7E,0x9F,0x4D,0x7F,0xA0,0x4E,0x80,0xA0,0x4E,0x82,0xA1,0x4E,0x83,0xA2,0x4F,0x84,0xA3,0x4F,0x85,0xA3,0x4F,0x86,0xA4,0x4F,0x88,0xA5,0x50,0x89,0xA5,0x50,0x89,0xA6,0x51,0x8B,0xA6,0x51,0x8B,0xA7,0x51,0x8D,0xA8,0x51,0x8E,0xA9,0x52,0x8F,0xAA,0x52,0x90,0xAA,0x53,0x92,0xAB,0x53,0x92,0xAB,0x53,0x93,0xAC,0x54,0x95,0xAD,0x53,0x95,0xAE,0x54,0x96,0xAE,0x55,0x98,0xAE,0x54,0x98,0xAF,0x55,0x9A,0xB0,0x56,0x9B,0xB0,0x56,0x9C,0xB1,0x56,0x9D,0xB1,0x56,0x9E,0xB2,0x56,0xA0,0xB3,0x57,0xA0,0xB3,0x57,0xA1,0xB3,0x57,0xA2,0xB4,0x58,0xA3,0xB4,0x58,0xA4,0xB5,0x57,0xA5,0xB6,0x58,0xA6,0xB6,0x58,0xA7,0xB7,0x58,0xA8,0xB7,0x59,0xA9,0xB8,0x58,0xAA,0xB9,0x5A,0xAB,0xB9,0x59,0xAC,0xBA,0x5A,0xAD,0xBA,0x5A,0xAE,0xBB,0x5A,0xAF,0xBB,0x5A,0xB0,0xBC,0x5B,0xB0,0xBC,0x5A,0xB1,0xBD,0x5B,0xB2,0xBD,0x5B,0xB3,0xBD,0x5B,0xB4,0xBE,0x5C,0xB5,0xBE,0x5B,0xB5,0xBE,0x5B,0xB7,0xBF,0x5C,0xB7,0xBF,0x5C,0xB8,0xBF,0x5C,0xB9,0xC0,0x5C,0xB9,0xC0,0x5C,0xBA,0xC0,0x5C,0xBA,0xC1,0x5D,0xBB,0xC2,0x5D,0xBC,0xC2,0x5D,0xBC,0xC2,0x5D,0xBD,0xC2,0x5E,0xBE,0xC3,0x5E,0xBE,0xC3,0x5E,0xBF,0xC3,0x5E,0xC0,0xC3,0x5E,0xC0,0xC4,0x5E,0xC1,0xC4,}; //200 Pixels diff --git a/src/Graphics.cpp b/src/Graphics.cpp index 65d198f..0aee464 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -28,7 +28,7 @@ //#include "ElementGraphics.h" #define INCLUDE_FONTDATA #include "font.h" -#include "misc.h" +#include "Misc.h" #include "hmap.h" //unsigned cmode = CM_FIRE; -- cgit v0.9.2-21-gd62e From fa201a7aeb6c645801a11a115ef6baeed9edf1e5 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 20 Jan 2012 23:42:17 +0000 Subject: Fix some uninitialised variables diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index e029fc9..07f2722 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -54,7 +54,7 @@ void GameController::DrawPoints(queue & pointQueue) void GameController::Tick() { - gameModel->GetSimulation()->update_particles(); + //gameModel->GetSimulation()->update_particles(); } void GameController::SetPaused(bool pauseState) diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 3d5a800..50f266f 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -5,7 +5,9 @@ #include "Renderer.h" GameModel::GameModel(): - activeElement(1) + activeElement(1), + sim(NULL), + ren(NULL) { sim = new Simulation(); ren = new Renderer(ui::Engine::Ref().g, sim); diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 783c297..659aeed 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -21,6 +21,7 @@ Button::Button(Window* parent_state, std::string buttonText): isMouseInside(false), isButtonDown(false), isTogglable(false), + toggle(false), actionCallback(NULL), textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), @@ -35,6 +36,7 @@ Button::Button(Point position, Point size, std::string buttonText): isMouseInside(false), isButtonDown(false), isTogglable(false), + toggle(false), actionCallback(NULL), textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), @@ -49,6 +51,7 @@ Button::Button(std::string buttonText): isMouseInside(false), isButtonDown(false), isTogglable(false), + toggle(false), actionCallback(NULL), textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), diff --git a/src/interface/Window.cpp b/src/interface/Window.cpp index e28d34b..ca29be0 100644 --- a/src/interface/Window.cpp +++ b/src/interface/Window.cpp @@ -7,7 +7,8 @@ using namespace ui; Window::Window(Point _position, Point _size): Position(_position), Size(_size), - focusedComponent_(NULL) + focusedComponent_(NULL), + AllowExclusiveDrawing(true) { } diff --git a/src/simulation/Air.cpp b/src/simulation/Air.cpp index b3826ab..3c88e91 100644 --- a/src/simulation/Air.cpp +++ b/src/simulation/Air.cpp @@ -117,8 +117,8 @@ void Air::update_airh(void) void Air::update_air(void) { - int x, y, i, j; - float dp, dx, dy, f, tx, ty; + int x = 0, y = 0, i = 0, j = 0; + float dp = 0.0f, dx = 0.0f, dy = 0.0f, f = 0.0f, tx = 0.0f, ty = 0.0f; for (y=0; ypv; hv = air->hv; + signs = (sign*)calloc(MAXSIGNS, sizeof(sign)); + //ptypes[0] = {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, 0, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}; //ptypes[1] = {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, 0, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}; //ptypes[2] = {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, 0, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}; -- cgit v0.9.2-21-gd62e From 0e5a46aa64bd9c53b0eb02aadd67637d9488b765 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 20 Jan 2012 23:52:19 +0000 Subject: Ensure action class is freed diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index cf1c0f2..efbbccb 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -46,6 +46,8 @@ SaveButton::~SaveButton() { if(thumbnail) delete thumbnail; + if(actionCallback) + delete actionCallback; } void SaveButton::Tick(float dt) -- cgit v0.9.2-21-gd62e From 36a952ca4dfc4672e1f0d2f7d255ef9c3bd046eb Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 21 Jan 2012 00:17:42 +0000 Subject: Better handling of save vector from client diff --git a/.gitignore b/.gitignore index bd12740..33ad7a8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ *.user *.dll *.a -*.la \ No newline at end of file +*.la +*~ diff --git a/src/client/Client.cpp b/src/client/Client.cpp index a3319b6..9d65fda 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -38,10 +38,10 @@ Client::~Client() http_done(); } -std::vector Client::SearchSaves(int start, int count, string query, string sort) +std::vector * Client::SearchSaves(int start, int count, string query, string sort) { lastError = ""; - std::vector saveArray; + std::vector * saveArray = new std::vector(); std::stringstream urlStream; char * data; int dataStatus, dataLength; @@ -76,8 +76,8 @@ std::vector Client::SearchSaves(int start, int count, string query, string json::Number tempScoreDown = savesArray[j]["ScoreDown"]; json::String tempUsername = savesArray[j]["Username"]; json::String tempName = savesArray[j]["Name"]; - saveArray.push_back( - Save( + saveArray->push_back( + new Save( tempID.Value(), tempScoreUp.Value(), tempScoreDown.Value(), diff --git a/src/client/Client.h b/src/client/Client.h index 9a86bfb..7f6ca2c 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -24,7 +24,7 @@ public: Client(); ~Client(); void ClearThumbnailRequests(); - std::vector SearchSaves(int start, int count, string query, string sort); + std::vector * SearchSaves(int start, int count, string query, string sort); Thumbnail * GetThumbnail(int saveID, int saveDate); std::string GetLastError() { return lastError; } }; diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index efbbccb..658a969 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -9,7 +9,7 @@ namespace ui { -SaveButton::SaveButton(Window* parent_state, Save save): +SaveButton::SaveButton(Window* parent_state, Save * save): Component(parent_state), save(save), thumbnail(NULL), @@ -20,7 +20,7 @@ SaveButton::SaveButton(Window* parent_state, Save save): } -SaveButton::SaveButton(Point position, Point size, Save save): +SaveButton::SaveButton(Point position, Point size, Save * save): Component(position, size), save(save), thumbnail(NULL), @@ -31,7 +31,7 @@ SaveButton::SaveButton(Point position, Point size, Save save): } -SaveButton::SaveButton(Save save): +SaveButton::SaveButton(Save * save): Component(), save(save), thumbnail(NULL), @@ -48,6 +48,8 @@ SaveButton::~SaveButton() delete thumbnail; if(actionCallback) delete actionCallback; + if(save) + delete save; } void SaveButton::Tick(float dt) @@ -56,7 +58,7 @@ void SaveButton::Tick(float dt) float scaleFactorY = 1.0f, scaleFactorX = 1.0f; if(!thumbnail) { - tempThumb = Client::Ref().GetThumbnail(save.GetID(), 0); + tempThumb = Client::Ref().GetThumbnail(save->GetID(), 0); if(tempThumb) { thumbnail = tempThumb; //Store a local copy of the thumbnail @@ -104,13 +106,13 @@ void SaveButton::Draw(const Point& screenPos) if(isMouseInside) { g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); - g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save.name.c_str()))/2, screenPos.Y+Size.Y - 21, save.name, 255, 255, 255, 255); - g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save.userName.c_str()))/2, screenPos.Y+Size.Y - 10, save.userName, 200, 230, 255, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->name.c_str()))/2, screenPos.Y+Size.Y - 21, save->name, 255, 255, 255, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->userName.c_str()))/2, screenPos.Y+Size.Y - 10, save->userName, 200, 230, 255, 255); } else { - g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save.name.c_str()))/2, screenPos.Y+Size.Y - 21, save.name, 180, 180, 180, 255); - g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save.userName.c_str()))/2, screenPos.Y+Size.Y - 10, save.userName, 100, 130, 160, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->name.c_str()))/2, screenPos.Y+Size.Y - 21, save->name, 180, 180, 180, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->userName.c_str()))/2, screenPos.Y+Size.Y - 10, save->userName, 100, 130, 160, 255); } } diff --git a/src/interface/SaveButton.h b/src/interface/SaveButton.h index 8834d8a..34652c1 100644 --- a/src/interface/SaveButton.h +++ b/src/interface/SaveButton.h @@ -19,14 +19,14 @@ public: class SaveButton : public Component { - Save save; + Save * save; Thumbnail * thumbnail; public: - SaveButton(Window* parent_state, Save save); + SaveButton(Window* parent_state, Save * save); - SaveButton(Point position, Point size, Save save); + SaveButton(Point position, Point size, Save * save); - SaveButton(Save save); + SaveButton(Save * save); virtual ~SaveButton(); virtual void OnMouseClick(int x, int y, unsigned int button); diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index 96d340a..3b2d0e0 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -12,7 +12,9 @@ void SearchModel::UpdateSaveList(std::string query) lastError = ""; saveList.clear(); notifySaveListChanged(); - saveList = Client::Ref().SearchSaves(0, 12, query, ""); + vector * tempSaveList = Client::Ref().SearchSaves(0, 12, query, ""); + saveList = *tempSaveList; + delete tempSaveList; if(!saveList.size()) { lastError = Client::Ref().GetLastError(); @@ -24,7 +26,7 @@ void SearchModel::UpdateSaveList(std::string query) notifySaveListChanged(); } -vector SearchModel::GetSaveList() +vector SearchModel::GetSaveList() { return saveList; } diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index ca6a293..a2d73cb 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -14,13 +14,13 @@ class SearchModel private: string lastError; vector observers; - vector saveList; + vector saveList; void notifySaveListChanged(); public: SearchModel(); void AddObserver(SearchView * observer); void UpdateSaveList(std::string query); - vector GetSaveList(); + vector GetSaveList(); string GetLastError() { return lastError; } }; diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 2ddd76c..c50169d 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -52,7 +52,7 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) int buttonWidth, buttonHeight, saveX = 0, saveY = 0, savesX = 4, savesY = 3, buttonPadding = 2; int buttonAreaWidth, buttonAreaHeight, buttonXOffset, buttonYOffset; - vector saves = sender->GetSaveList(); + vector saves = sender->GetSaveList(); if(!saves.size()) { if(!errorLabel) -- cgit v0.9.2-21-gd62e From d364a27ed6da5d75d1880c98c3fb2be683c5b915 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 21 Jan 2012 00:21:51 +0000 Subject: Fix search crash diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index c50169d..53ab443 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -82,8 +82,10 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) for(i = 0; i < saveButtons.size(); i++) { RemoveComponent(saveButtons[i]); + delete saveButtons[i]; } + saveButtons.clear(); for(i = 0; i < saves.size(); i++) { if(saveX == savesX) -- cgit v0.9.2-21-gd62e From 8ec6aae617525d13697d1c2a612ac37be0f341d5 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 21 Jan 2012 13:19:10 +0000 Subject: Better cleanup for simulation - fix memory leaks diff --git a/src/Graphics.cpp b/src/Graphics.cpp index 0aee464..ae4926a 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -2366,3 +2366,7 @@ Graphics::Graphics() { vid = (pixel *)malloc(PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE))); } +Graphics::~Graphics() +{ + free(vid); +} diff --git a/src/Graphics.h b/src/Graphics.h index 6cd5b36..82117a7 100644 --- a/src/Graphics.h +++ b/src/Graphics.h @@ -167,6 +167,7 @@ public: void ogl_blit(int x, int y, int w, int h, pixel *src, int pitch, int scale); #endif Graphics(); + ~Graphics(); }; #endif diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index c6f5caf..f8be793 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -124,4 +124,7 @@ int main(int argc, char * argv[]) delta = 60.0f/fps; } } + ui::Engine::Ref().CloseWindow(); + delete gameController; + delete ui::Engine::Ref().g; } diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 2644924..9d6076f 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -1697,3 +1697,12 @@ Renderer::Renderer(Graphics * g, Simulation * sim): flm_data = Graphics::generate_gradient(flm_data_colours, flm_data_pos, flm_data_points, 200); plasma_data = Graphics::generate_gradient(plasma_data_colours, plasma_data_pos, plasma_data_points, 200); } + +Renderer::~Renderer() +{ + free(graphicscache); + free(flm_data); + free(plasma_data); + free(render_modes); + free(display_modes); +} diff --git a/src/Renderer.h b/src/Renderer.h index a756f13..8592e41 100644 --- a/src/Renderer.h +++ b/src/Renderer.h @@ -55,6 +55,7 @@ public: void get_sign_pos(int i, int *x0, int *y0, int *w, int *h); void prepare_graphicscache(); Renderer(Graphics * g, Simulation * sim); + ~Renderer(); }; #endif diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 9d65fda..1d450c7 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -35,6 +35,7 @@ Client::Client() Client::~Client() { + ClearThumbnailRequests(); http_done(); } diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 07f2722..d8cff8b 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -17,7 +17,13 @@ GameController::GameController() gameView->AttachController(this); gameModel->AddObserver(gameView); - sim = new Simulation(); + //sim = new Simulation(); +} + +GameController::~GameController() +{ + delete gameView; + delete gameModel; } GameView * GameController::GetView() diff --git a/src/game/GameController.h b/src/game/GameController.h index d9755a1..63d8e5e 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -14,11 +14,12 @@ class GameView; class GameController { private: - Simulation * sim; + //Simulation * sim; GameView * gameView; GameModel * gameModel; public: - GameController(); + GameController(); + ~GameController(); GameView * GetView(); void DrawPoints(queue & pointQueue); void Tick(); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 50f266f..54c8dd4 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -13,6 +13,12 @@ GameModel::GameModel(): ren = new Renderer(ui::Engine::Ref().g, sim); } +GameModel::~GameModel() +{ + delete sim; + delete ren; +} + void GameModel::AddObserver(GameView * observer){ observers.push_back(observer); diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 6cb74cb..c709535 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -23,7 +23,8 @@ private: void notifySimulationChanged(); void notifyPausedChanged(); public: - GameModel(); + GameModel(); + ~GameModel(); void AddObserver(GameView * observer); int GetActiveElement(); void SetActiveElement(int element); diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 130fc8e..6f81f56 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -27,6 +27,12 @@ Engine::~Engine() { if(state_ != NULL) delete state_; + //Dispose of any Windows. + while(!windows.empty()) + { + delete windows.top(); + windows.pop(); + } } void Engine::Begin(int width, int height) diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 11871fd..a9b346f 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -17,6 +17,12 @@ SearchController::SearchController() //windowPanel.AddChild(); } +SearchController::~SearchController() +{ + delete searchModel; + delete searchView; +} + void SearchController::DoSearch(std::string query) { searchModel->UpdateSaveList(query); diff --git a/src/search/SearchController.h b/src/search/SearchController.h index 8676145..cbef93a 100644 --- a/src/search/SearchController.h +++ b/src/search/SearchController.h @@ -13,6 +13,7 @@ private: SearchView * searchView; public: SearchController(); + ~SearchController(); SearchView * GetView() { return searchView; } void DoSearch(std::string query); }; diff --git a/src/simulation/Gravity.cpp b/src/simulation/Gravity.cpp index cc20b2f..43ca8e6 100644 --- a/src/simulation/Gravity.cpp +++ b/src/simulation/Gravity.cpp @@ -48,6 +48,9 @@ void Gravity::gravity_init() gravx = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); gravp = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); gravmask = (unsigned int *)calloc((XRES/CELL)*(YRES/CELL), sizeof(unsigned)); +#ifdef GRAVFFT + grav_fft_init(); +#endif } void Gravity::gravity_cleanup() @@ -55,6 +58,17 @@ void Gravity::gravity_cleanup() #ifdef GRAVFFT grav_fft_cleanup(); #endif + //Free gravity info + free(th_ogravmap); + free(th_gravmap); + free(th_gravy); + free(th_gravx); + free(th_gravp); + free(gravmap); + free(gravy); + free(gravx); + free(gravp); + free(gravmask); } void Gravity::gravity_update_async() @@ -124,9 +138,6 @@ void Gravity::update_grav_async() //memset(th_gravy, 0, XRES*YRES*sizeof(float)); //memset(th_gravx, 0, XRES*YRES*sizeof(float)); //memset(th_gravp, 0, XRES*YRES*sizeof(float)); -#ifdef GRAVFFT - grav_fft_init(); -#endif while(!thread_done){ if(!done){ update_grav(); @@ -486,3 +497,8 @@ Gravity::Gravity() { gravity_init(); } + +Gravity::~Gravity() +{ + gravity_cleanup(); +} diff --git a/src/simulation/Gravity.h b/src/simulation/Gravity.h index 9f36240..72b387d 100644 --- a/src/simulation/Gravity.h +++ b/src/simulation/Gravity.h @@ -86,6 +86,7 @@ public: #endif Gravity(); + ~Gravity(); }; /*extern int ngrav_enable; //Newtonian gravity diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index f7dec79..7ee0391 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3197,7 +3197,15 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu */ } -Simulation::Simulation() +Simulation::~Simulation() +{ + free(signs); + delete grav; + delete air; +} + +Simulation::Simulation(): + sys_pause(0) { //Create and attach gravity simulation grav = new Gravity(); diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index 969b030..f6fd1b0 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -235,6 +235,7 @@ public: void clear_sim(); void UpdateParticles(); Simulation(); + ~Simulation(); }; //#endif -- cgit v0.9.2-21-gd62e From 1cee908c165ead0fcecba4519d4584f3935988b5 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 21 Jan 2012 18:51:28 +0000 Subject: Fix thumbnail crash, turns out SaveButton was storing a Thumbnail pointer, not a Thumbnail as I thought diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index f8be793..a13a817 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -92,10 +92,22 @@ int main(int argc, char * argv[]) engine->onMouseMove(event.motion.x, event.motion.y); break; case SDL_MOUSEBUTTONDOWN: - engine->onMouseClick(event.motion.x, event.motion.y, event.button.button); + if(event.button.button == SDL_BUTTON_WHEELUP) + { + engine->onMouseWheel(event.motion.x, event.motion.y, 1); + } + else if (event.button.button == SDL_BUTTON_WHEELDOWN) + { + engine->onMouseWheel(event.motion.x, event.motion.y, -1); + } + else + { + engine->onMouseClick(event.motion.x, event.motion.y, event.button.button); + } break; case SDL_MOUSEBUTTONUP: - engine->onMouseUnclick(event.motion.x, event.motion.y, event.button.button); + if(event.button.button != SDL_BUTTON_WHEELUP && event.button.button != SDL_BUTTON_WHEELDOWN) + engine->onMouseUnclick(event.motion.x, event.motion.y, event.button.button); break; } event.type = 0; //Clear last event diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 1d450c7..ff6fb97 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -39,9 +39,10 @@ Client::~Client() http_done(); } -std::vector * Client::SearchSaves(int start, int count, string query, string sort) +std::vector * Client::SearchSaves(int start, int count, string query, string sort, int & resultCount) { lastError = ""; + resultCount = 0; std::vector * saveArray = new std::vector(); std::stringstream urlStream; char * data; @@ -52,7 +53,7 @@ std::vector * Client::SearchSaves(int start, int count, string query, str urlStream << "&Search_Query="; if(query.length()) urlStream << query; - if(sort.length()) + if(sort == "date") { if(query.length()) urlStream << " "; @@ -69,6 +70,8 @@ std::vector * Client::SearchSaves(int start, int count, string query, str json::Object objDocument; json::Reader::Read(objDocument, dataStream); + json::Number tempCount = objDocument["Count"]; + resultCount = tempCount.Value(); json::Array savesArray = objDocument["Saves"]; for(int j = 0; j < savesArray.Size(); j++) { @@ -132,7 +135,7 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) { activeThumbRequestCompleteTimes[i] = time(NULL); } - else if(activeThumbRequestCompleteTimes[i] < (currentTime-20)) //Otherwise, if it completed more than 10 seconds ago, destroy it. + else if(activeThumbRequestCompleteTimes[i] < (currentTime-2)) //Otherwise, if it completed more than 2 seconds ago, destroy it. { http_async_req_close(activeThumbRequests[i]); activeThumbRequests[i] = NULL; @@ -165,6 +168,7 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) char * data; int status, data_size, imgw, imgh; data = http_async_req_stop(activeThumbRequests[i], &status, &data_size); + free(activeThumbRequests[i]); activeThumbRequests[i] = NULL; if (status == 200 && data) { @@ -203,10 +207,6 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) return thumbnailCache[thumbnailCacheNextID++]; } } - else if(activeThumbRequestTimes[i] < currentTime-HTTP_TIMEOUT) - { - // - } } } if(!found) diff --git a/src/client/Client.h b/src/client/Client.h index 7f6ca2c..678b3e7 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -24,7 +24,7 @@ public: Client(); ~Client(); void ClearThumbnailRequests(); - std::vector * SearchSaves(int start, int count, string query, string sort); + std::vector * SearchSaves(int start, int count, string query, string sort, int & resultCount); Thumbnail * GetThumbnail(int saveID, int saveDate); std::string GetLastError() { return lastError; } }; diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index d8cff8b..571833a 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -9,7 +9,8 @@ using namespace std; -GameController::GameController() +GameController::GameController(): + search(NULL) { gameView = new GameView(); gameModel = new GameModel(); @@ -22,6 +23,11 @@ GameController::GameController() GameController::~GameController() { + if(search) + { + ui::Engine::Ref().CloseWindow(); + delete search; + } delete gameView; delete gameModel; } @@ -70,6 +76,6 @@ void GameController::SetPaused(bool pauseState) void GameController::OpenSearch() { - SearchController * search = new SearchController(); + search = new SearchController(); ui::Engine::Ref().ShowWindow(search->GetView()); } diff --git a/src/game/GameController.h b/src/game/GameController.h index 63d8e5e..c2c578d 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -6,6 +6,7 @@ #include "GameModel.h" #include "interface/Point.h" #include "simulation/Simulation.h" +#include "search/SearchController.h" using namespace std; @@ -17,6 +18,7 @@ private: //Simulation * sim; GameView * gameView; GameModel * gameModel; + SearchController * search; public: GameController(); ~GameController(); diff --git a/src/interface/Button.h b/src/interface/Button.h index aabca91..41a057b 100644 --- a/src/interface/Button.h +++ b/src/interface/Button.h @@ -19,6 +19,7 @@ class ButtonAction { public: virtual void ActionCallback(ui::Button * sender) {} + virtual ~ButtonAction() {} }; class Button : public Component diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index 658a969..38fb974 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -61,8 +61,7 @@ void SaveButton::Tick(float dt) tempThumb = Client::Ref().GetThumbnail(save->GetID(), 0); if(tempThumb) { - thumbnail = tempThumb; //Store a local copy of the thumbnail - cout << (void *)(tempThumb) << " " << (void *)(&thumbnail) << endl; + thumbnail = new Thumbnail(*tempThumb); //Store a local copy of the thumbnail if(thumbnail->Data) { if(thumbnail->Size.Y > (Size.Y-25)) diff --git a/src/interface/SaveButton.h b/src/interface/SaveButton.h index 34652c1..8019a3c 100644 --- a/src/interface/SaveButton.h +++ b/src/interface/SaveButton.h @@ -15,6 +15,7 @@ class SaveButtonAction { public: virtual void ActionCallback(ui::SaveButton * sender) {} + virtual ~SaveButtonAction() {} }; class SaveButton : public Component diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp index 3cedc15..f087241 100644 --- a/src/interface/Textbox.cpp +++ b/src/interface/Textbox.cpp @@ -162,13 +162,14 @@ void Textbox::OnKeyPress(int key, bool shift, bool ctrl, bool alt) cursor++; changed = true; } + break; } if(changed && actionCallback) { actionCallback->TextChangedCallback(this); } } - catch(std::out_of_range e) + catch(std::out_of_range &e) { cursor = 0; text = ""; diff --git a/src/interface/Textbox.h b/src/interface/Textbox.h index 5cd14f4..099368f 100644 --- a/src/interface/Textbox.h +++ b/src/interface/Textbox.h @@ -13,6 +13,7 @@ class TextboxAction { public: virtual void TextChangedCallback(ui::Textbox * sender) {} + virtual ~TextboxAction() {} }; class Textbox : public Component { diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index a9b346f..7103591 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -11,7 +11,7 @@ SearchController::SearchController() searchModel->AddObserver(searchView); searchView->AttachController(this); - searchModel->UpdateSaveList(""); + searchModel->UpdateSaveList(1, ""); //Set up interface //windowPanel.AddChild(); @@ -25,5 +25,34 @@ SearchController::~SearchController() void SearchController::DoSearch(std::string query) { - searchModel->UpdateSaveList(query); + searchModel->UpdateSaveList(1, query); +} + +void SearchController::PrevPage() +{ + if(searchModel->GetPageNum()>1) + searchModel->UpdateSaveList(searchModel->GetPageNum()-1, searchModel->GetLastQuery()); +} + +void SearchController::NextPage() +{ + if(searchModel->GetPageNum() <= searchModel->GetPageCount()) + searchModel->UpdateSaveList(searchModel->GetPageNum()+1, searchModel->GetLastQuery()); +} + +void SearchController::ChangeSort() +{ + if(searchModel->GetSort() == "date") + { + searchModel->SetSort("votes"); + } + else + { + searchModel->SetSort("date"); + } +} + +void SearchController::ShowOwn(bool show) +{ + } diff --git a/src/search/SearchController.h b/src/search/SearchController.h index cbef93a..c9fdb21 100644 --- a/src/search/SearchController.h +++ b/src/search/SearchController.h @@ -16,6 +16,10 @@ public: ~SearchController(); SearchView * GetView() { return searchView; } void DoSearch(std::string query); + void NextPage(); + void PrevPage(); + void ChangeSort(); + void ShowOwn(bool show); }; #endif // SEARCHCONTROLLER_H diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index 3b2d0e0..adb8cad 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -3,26 +3,30 @@ #include "client/Client.h" -SearchModel::SearchModel() +SearchModel::SearchModel(): + currentSort("votes"), + showOwn(false) { } -void SearchModel::UpdateSaveList(std::string query) +void SearchModel::UpdateSaveList(int pageNumber, std::string query) { + lastQuery = query; lastError = ""; saveList.clear(); + currentPage = 1; + resultCount = 0; notifySaveListChanged(); - vector * tempSaveList = Client::Ref().SearchSaves(0, 12, query, ""); + notifyPageChanged(); + vector * tempSaveList = Client::Ref().SearchSaves((pageNumber-1)*12, 12, query, currentSort, resultCount); saveList = *tempSaveList; delete tempSaveList; if(!saveList.size()) { lastError = Client::Ref().GetLastError(); } - /*for(int i = 0; i < 16; i++) - { - saveList.push_back(Save(2198, 2333, 315, "dima-gord", "Destroyable city 5 (wth metro)")); - }*/ + currentPage = pageNumber; + notifyPageChanged(); notifySaveListChanged(); } @@ -35,6 +39,9 @@ void SearchModel::AddObserver(SearchView * observer) { observers.push_back(observer); observer->NotifySaveListChanged(this); + observer->NotifyPageChanged(this); + observer->NotifySortChanged(this); + observer->NotifyShowOwnChanged(this); } void SearchModel::notifySaveListChanged() @@ -45,3 +52,30 @@ void SearchModel::notifySaveListChanged() cObserver->NotifySaveListChanged(this); } } + +void SearchModel::notifyPageChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + SearchView* cObserver = observers[i]; + cObserver->NotifyPageChanged(this); + } +} + +void SearchModel::notifySortChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + SearchView* cObserver = observers[i]; + cObserver->NotifySortChanged(this); + } +} + +void SearchModel::notifyShowOwnChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + SearchView* cObserver = observers[i]; + cObserver->NotifyShowOwnChanged(this); + } +} diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index a2d73cb..dbd6757 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -3,6 +3,7 @@ #include #include +#include #include "Save.h" #include "SearchView.h" @@ -12,16 +13,31 @@ class SearchView; class SearchModel { private: + string currentSort; + string lastQuery; string lastError; vector observers; vector saveList; + int currentPage; + int resultCount; + bool showOwn; void notifySaveListChanged(); + void notifyPageChanged(); + void notifySortChanged(); + void notifyShowOwnChanged(); public: SearchModel(); void AddObserver(SearchView * observer); - void UpdateSaveList(std::string query); + void UpdateSaveList(int pageNumber, std::string query); vector GetSaveList(); string GetLastError() { return lastError; } + int GetPageCount() { return max(1, (int)(ceil(resultCount/16))); } + int GetPageNum() { return currentPage; } + std::string GetLastQuery() { return lastQuery; } + void SetSort(string sort) { currentSort = sort; UpdateSaveList(currentPage, lastQuery); notifySortChanged(); } + string GetSort() { return currentSort; } + void SetShowOwn(bool show) { showOwn = show; UpdateSaveList(currentPage, lastQuery); notifyShowOwnChanged(); } + bool GetShowOwn() { return showOwn; } }; #endif // SEARCHMODEL_H diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 53ab443..ca848b5 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -1,4 +1,7 @@ +#include + #include "SearchView.h" +#include "client/Client.h" #include "interface/SaveButton.h" #include "interface/Label.h" #include "interface/Textbox.h" @@ -9,8 +12,10 @@ SearchView::SearchView(): saveButtons(vector()), errorLabel(NULL) { + nextButton = new ui::Button(ui::Point(XRES+BARSIZE-52, YRES+MENUSIZE-18), ui::Point(50, 16), "Next \x95"); previousButton = new ui::Button(ui::Point(1, YRES+MENUSIZE-18), ui::Point(50, 16), "\x96 Prev"); + infoLabel = new ui::Label(ui::Point(51, YRES+MENUSIZE-18), ui::Point(XRES+BARSIZE-102, 16), "Loading..."); class SearchAction : public ui::TextboxAction { @@ -26,11 +31,65 @@ SearchView::SearchView(): searchField->SetAlignment(AlignLeft, AlignBottom); searchField->SetActionCallback(new SearchAction(this)); + class SortAction : public ui::ButtonAction + { + SearchView * v; + public: + SortAction(SearchView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->ChangeSort(); + } + }; + sortButton = new ui::Button(ui::Point(XRES+BARSIZE-50-50-16-10, 10), ui::Point(50, 16), "Sort"); + sortButton->SetActionCallback(new SortAction(this)); + sortButton->SetAlignment(AlignLeft, AlignBottom); + AddComponent(sortButton); + + class MyOwnAction : public ui::ButtonAction + { + SearchView * v; + public: + MyOwnAction(SearchView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->ShowOwn(sender->GetToggleState()); + } + }; + ownButton = new ui::Button(ui::Point(XRES+BARSIZE-50-16-10, 10), ui::Point(50, 16), "My Own"); + ownButton->SetTogglable(true); + ownButton->SetActionCallback(new MyOwnAction(this)); + ownButton->SetAlignment(AlignLeft, AlignBottom); + AddComponent(ownButton); + + class NextPageAction : public ui::ButtonAction + { + SearchView * v; + public: + NextPageAction(SearchView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->NextPage(); + } + }; + nextButton->SetActionCallback(new NextPageAction(this)); nextButton->SetAlignment(AlignRight, AlignBottom); + class PrevPageAction : public ui::ButtonAction + { + SearchView * v; + public: + PrevPageAction(SearchView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->PrevPage(); + } + }; + previousButton->SetActionCallback(new PrevPageAction(this)); previousButton->SetAlignment(AlignLeft, AlignBottom); AddComponent(nextButton); AddComponent(previousButton); AddComponent(searchField); + AddComponent(infoLabel); ui::Label * searchPrompt = new ui::Label(ui::Point(10, 10), ui::Point(50, 16), "Search:"); searchPrompt->SetAlignment(AlignLeft, AlignBottom); @@ -46,6 +105,39 @@ SearchView::~SearchView() { } +void SearchView::NotifySortChanged(SearchModel * sender) +{ + sortButton->SetText("Sort: "+sender->GetSort()); +} + +void SearchView::NotifyShowOwnChanged(SearchModel * sender) +{ + sortButton->SetToggleState(sender->GetShowOwn()); +} + +void SearchView::NotifyPageChanged(SearchModel * sender) +{ + std::stringstream pageInfo; + pageInfo << "Page " << sender->GetPageNum() << " of " << sender->GetPageCount(); + infoLabel->SetText(pageInfo.str()); + if(sender->GetPageNum() == 1) + { + previousButton->Visible = false; + } + else + { + previousButton->Visible = true; + } + if(sender->GetPageNum() == sender->GetPageCount()) + { + nextButton->Visible = false; + } + else + { + nextButton->Visible = true; + } +} + void SearchView::NotifySaveListChanged(SearchModel * sender) { int i = 0; @@ -53,6 +145,13 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) int buttonAreaWidth, buttonAreaHeight, buttonXOffset, buttonYOffset; vector saves = sender->GetSaveList(); + Client::Ref().ClearThumbnailRequests(); + for(i = 0; i < saveButtons.size(); i++) + { + RemoveComponent(saveButtons[i]); + delete saveButtons[i]; + } + saveButtons.clear(); if(!saves.size()) { if(!errorLabel) @@ -61,9 +160,9 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) AddComponent(errorLabel); } if(sender->GetLastError().length()) - errorLabel->SetText(sender->GetLastError()); + errorLabel->SetText("\bo" + sender->GetLastError()); else - errorLabel->SetText("No saves found"); + errorLabel->SetText("\boNo saves found"); } else { @@ -79,13 +178,6 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) buttonAreaHeight = Size.Y - buttonYOffset - 18; buttonWidth = (buttonAreaWidth/savesX) - buttonPadding*2; buttonHeight = (buttonAreaHeight/savesY) - buttonPadding*2; - for(i = 0; i < saveButtons.size(); i++) - { - RemoveComponent(saveButtons[i]); - - delete saveButtons[i]; - } - saveButtons.clear(); for(i = 0; i < saves.size(); i++) { if(saveX == savesX) diff --git a/src/search/SearchView.h b/src/search/SearchView.h index 8777c30..370877e 100644 --- a/src/search/SearchView.h +++ b/src/search/SearchView.h @@ -22,9 +22,15 @@ private: ui::Button * previousButton; ui::Label * errorLabel; ui::Textbox * searchField; + ui::Label * infoLabel; + ui::Button * sortButton; + ui::Button * ownButton; void doSearch(); public: void NotifySaveListChanged(SearchModel * sender); + void NotifyPageChanged(SearchModel * sender); + void NotifySortChanged(SearchModel * sender); + void NotifyShowOwnChanged(SearchModel * sender); SearchView(); virtual ~SearchView(); void AttachController(SearchController * _c) { c = _c; } diff --git a/src/search/Thumbnail.h b/src/search/Thumbnail.h index 3b865ca..6311a23 100644 --- a/src/search/Thumbnail.h +++ b/src/search/Thumbnail.h @@ -1,6 +1,7 @@ #ifndef THUMBNAIL_H #define THUMBNAIL_H +#include #include "Graphics.h" #include "interface/Point.h" -- cgit v0.9.2-21-gd62e From 984d39f8cc6e2fd54c1a1b4aa217334f04a5e479 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 21 Jan 2012 19:43:36 +0000 Subject: Reset page on sort change diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index dbd6757..0ed7d86 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -34,9 +34,9 @@ public: int GetPageCount() { return max(1, (int)(ceil(resultCount/16))); } int GetPageNum() { return currentPage; } std::string GetLastQuery() { return lastQuery; } - void SetSort(string sort) { currentSort = sort; UpdateSaveList(currentPage, lastQuery); notifySortChanged(); } + void SetSort(string sort) { currentSort = sort; UpdateSaveList(1, lastQuery); notifySortChanged(); } string GetSort() { return currentSort; } - void SetShowOwn(bool show) { showOwn = show; UpdateSaveList(currentPage, lastQuery); notifyShowOwnChanged(); } + void SetShowOwn(bool show) { showOwn = show; UpdateSaveList(1, lastQuery); notifyShowOwnChanged(); } bool GetShowOwn() { return showOwn; } }; -- cgit v0.9.2-21-gd62e From dea70befcf770a767f1cbeecdd149930f6d4c0b8 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 21 Jan 2012 22:48:37 +0000 Subject: Basic skeleton for save preview diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 6f81f56..19da36e 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -51,6 +51,14 @@ void Engine::Exit() void Engine::ShowWindow(Window * window) { + if(window->Position.X==-1) + { + window->Position.X = (width_-window->Size.X)/2; + } + if(window->Position.Y==-1) + { + window->Position.Y = (height_-window->Size.Y)/2; + } if(state_) { windows.push(state_); diff --git a/src/interface/SaveButton.h b/src/interface/SaveButton.h index 8019a3c..65cff52 100644 --- a/src/interface/SaveButton.h +++ b/src/interface/SaveButton.h @@ -39,6 +39,7 @@ public: virtual void Draw(const Point& screenPos); virtual void Tick(float dt); + Save * GetSave() { return save; } inline bool GetState() { return state; } virtual void DoAction(); void SetActionCallback(SaveButtonAction * action); diff --git a/src/interface/Window.h b/src/interface/Window.h index 581b91f..4fc2b14 100644 --- a/src/interface/Window.h +++ b/src/interface/Window.h @@ -23,6 +23,9 @@ enum ChromeStyle class Window { public: + Point Position; + Point Size; + Window(Point _position, Point _size); virtual ~Window(); @@ -74,9 +77,6 @@ enum ChromeStyle virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {} std::vector Components; Component* focusedComponent_; - - Point Position; - Point Size; ChromeStyle chrome; }; diff --git a/src/preview/PreviewController.cpp b/src/preview/PreviewController.cpp new file mode 100644 index 0000000..04c4dd6 --- /dev/null +++ b/src/preview/PreviewController.cpp @@ -0,0 +1,26 @@ +/* + * PreviewController.cpp + * + * Created on: Jan 21, 2012 + * Author: Simon + */ + +#include "PreviewController.h" +#include "PreviewView.h" +#include "PreviewModel.h" + +PreviewController::PreviewController(int saveID) { + // TODO Auto-generated constructor stub + previewModel = new PreviewModel(); + previewView = new PreviewView(); + previewModel->AddObserver(previewView); + previewView->AttachController(this); + + previewModel->UpdateSave(saveID); +} + +PreviewController::~PreviewController() { + delete previewView; + delete previewModel; +} + diff --git a/src/preview/PreviewController.h b/src/preview/PreviewController.h new file mode 100644 index 0000000..373ff03 --- /dev/null +++ b/src/preview/PreviewController.h @@ -0,0 +1,25 @@ +/* + * PreviewController.h + * + * Created on: Jan 21, 2012 + * Author: Simon + */ + +#ifndef PREVIEWCONTROLLER_H_ +#define PREVIEWCONTROLLER_H_ + +#include "preview/PreviewModel.h" +#include "preview/PreviewView.h" + +class PreviewModel; +class PreviewView; +class PreviewController { + PreviewModel * previewModel; + PreviewView * previewView; +public: + PreviewController(int saveID); + PreviewView * GetView() { return previewView; } + virtual ~PreviewController(); +}; + +#endif /* PREVIEWCONTROLLER_H_ */ diff --git a/src/preview/PreviewModel.cpp b/src/preview/PreviewModel.cpp new file mode 100644 index 0000000..bf51ff0 --- /dev/null +++ b/src/preview/PreviewModel.cpp @@ -0,0 +1,29 @@ +/* + * PreviewModel.cpp + * + * Created on: Jan 21, 2012 + * Author: Simon + */ + +#include "PreviewModel.h" + +PreviewModel::PreviewModel(): + save(NULL) +{ + // TODO Auto-generated constructor stub + +} + +void PreviewModel::UpdateSave(int saveID) +{ + +} + +void PreviewModel::AddObserver(PreviewView * observer) { + observers.push_back(observer); +} + +PreviewModel::~PreviewModel() { + // TODO Auto-generated destructor stub +} + diff --git a/src/preview/PreviewModel.h b/src/preview/PreviewModel.h new file mode 100644 index 0000000..ba11390 --- /dev/null +++ b/src/preview/PreviewModel.h @@ -0,0 +1,28 @@ +/* + * PreviewModel.h + * + * Created on: Jan 21, 2012 + * Author: Simon + */ + +#ifndef PREVIEWMODEL_H_ +#define PREVIEWMODEL_H_ + +#include +#include "PreviewView.h" +#include "search/Save.h" + +using namespace std; + +class PreviewView; +class PreviewModel { + vector observers; + Save * save; +public: + PreviewModel(); + void AddObserver(PreviewView * observer); + void UpdateSave(int saveID); + virtual ~PreviewModel(); +}; + +#endif /* PREVIEWMODEL_H_ */ diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp new file mode 100644 index 0000000..c5dbfac --- /dev/null +++ b/src/preview/PreviewView.cpp @@ -0,0 +1,28 @@ +/* + * PreviewView.cpp + * + * Created on: Jan 21, 2012 + * Author: Simon + */ + +#include "PreviewView.h" +#include "interface/Point.h" +#include "interface/Window.h" + +PreviewView::PreviewView(): + ui::Window(ui::Point(-1, -1), ui::Point(200, 200)) +{ + // TODO Auto-generated constructor stub + +} + +void PreviewView::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); +} + +PreviewView::~PreviewView() { + // TODO Auto-generated destructor stub +} + diff --git a/src/preview/PreviewView.h b/src/preview/PreviewView.h new file mode 100644 index 0000000..728d547 --- /dev/null +++ b/src/preview/PreviewView.h @@ -0,0 +1,23 @@ +/* + * PreviewView.h + * + * Created on: Jan 21, 2012 + * Author: Simon + */ + +#ifndef PREVIEWVIEW_H_ +#define PREVIEWVIEW_H_ +#include "interface/Window.h" +#include "preview/PreviewController.h" + +class PreviewController; +class PreviewView: public ui::Window { + PreviewController * c; +public: + void AttachController(PreviewController * controller) { c = controller;} + PreviewView(); + virtual void OnDraw(); + virtual ~PreviewView(); +}; + +#endif /* PREVIEWVIEW_H_ */ diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 7103591..46a353c 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -3,8 +3,10 @@ #include "SearchModel.h" #include "SearchView.h" #include "interface/Panel.h" +#include "preview/PreviewController.h" -SearchController::SearchController() +SearchController::SearchController(): + activePreview(NULL) { searchModel = new SearchModel(); searchView = new SearchView(); @@ -19,6 +21,11 @@ SearchController::SearchController() SearchController::~SearchController() { + if(activePreview) + { + ui::Engine::Ref().CloseWindow(); + delete activePreview; + } delete searchModel; delete searchView; } @@ -54,5 +61,11 @@ void SearchController::ChangeSort() void SearchController::ShowOwn(bool show) { + //TODO: Implement +} +void SearchController::OpenSave(int saveID) +{ + activePreview = new PreviewController(saveID); + ui::Engine::Ref().ShowWindow(activePreview->GetView()); } diff --git a/src/search/SearchController.h b/src/search/SearchController.h index c9fdb21..d67743e 100644 --- a/src/search/SearchController.h +++ b/src/search/SearchController.h @@ -4,6 +4,7 @@ #include "interface/Panel.h" #include "SearchModel.h" #include "SearchView.h" +#include "preview/PreviewController.h" class SearchView; class SearchModel; class SearchController @@ -11,6 +12,7 @@ class SearchController private: SearchModel * searchModel; SearchView * searchView; + PreviewController * activePreview; public: SearchController(); ~SearchController(); @@ -20,6 +22,7 @@ public: void PrevPage(); void ChangeSort(); void ShowOwn(bool show); + void OpenSave(int saveID); }; #endif // SEARCHCONTROLLER_H diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index ca848b5..4a61099 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -178,6 +178,16 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) buttonAreaHeight = Size.Y - buttonYOffset - 18; buttonWidth = (buttonAreaWidth/savesX) - buttonPadding*2; buttonHeight = (buttonAreaHeight/savesY) - buttonPadding*2; + class SaveOpenAction: public ui::SaveButtonAction + { + SearchView * v; + public: + SaveOpenAction(SearchView * _v) { v = _v; } + virtual void ActionCallback(ui::SaveButton * sender) + { + v->c->OpenSave(sender->GetSave()->GetID()); + } + }; for(i = 0; i < saves.size(); i++) { if(saveX == savesX) @@ -195,6 +205,7 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) ), ui::Point(buttonWidth, buttonHeight), saves[i]); + saveButton->SetActionCallback(new SaveOpenAction(this)); saveButtons.push_back(saveButton); AddComponent(saveButton); saveX++; -- cgit v0.9.2-21-gd62e From 3a283d4f3c571dc8a891f2cdc348c204f7f9300b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 21 Jan 2012 23:29:40 +0000 Subject: Nice graphics for Showing windows diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index a13a817..2918a05 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -67,7 +67,7 @@ int main(int argc, char * argv[]) ui::Engine::Ref().g->AttachSDLSurface(SDLOpen()); ui::Engine * engine = &ui::Engine::Ref(); - engine->Begin(XRES, YRES); + engine->Begin(XRES+BARSIZE, YRES+MENUSIZE); GameController * gameController = new GameController(); engine->ShowWindow(gameController->GetView()); diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 19da36e..85a6293 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -19,7 +19,9 @@ Engine::Engine(): mousexp_(0), mouseyp_(0), FpsLimit(60.0f), - windows(stack()) + windows(stack()), + lastBuffer(NULL), + prevBuffers(stack()) { } @@ -61,15 +63,34 @@ void Engine::ShowWindow(Window * window) } if(state_) { + if(lastBuffer) + { + prevBuffers.push(lastBuffer); + } + lastBuffer = (pixel*)malloc((width_ * height_) * PIXELSIZE); + g->fillrect(0, 0, width_, height_, 0, 0, 0, 100); + memcpy(lastBuffer, g->vid, (width_ * height_) * PIXELSIZE); + windows.push(state_); } state_ = window; + } void Engine::CloseWindow() { if(!windows.empty()) { + if(!prevBuffers.empty()) + { + lastBuffer = prevBuffers.top(); + prevBuffers.pop(); + } + else + { + free(lastBuffer); + lastBuffer = NULL; + } state_ = windows.top(); windows.pop(); } @@ -120,10 +141,17 @@ void Engine::Tick(float dt) void Engine::Draw() { + if(lastBuffer && !(state_->Position.X == 0 && state_->Position.Y == 0 && state_->Size.X == width_ && state_->Size.Y == height_)) + { + memcpy(g->vid, lastBuffer, (width_ * height_) * PIXELSIZE); + } + else + { + g->Clear(); + } if(state_) state_->DoDraw(); g->Blit(); - g->Clear(); } void Engine::onKeyPress(int key, bool shift, bool ctrl, bool alt) diff --git a/src/interface/Engine.h b/src/interface/Engine.h index 7bf78f9..a648119 100644 --- a/src/interface/Engine.h +++ b/src/interface/Engine.h @@ -54,6 +54,8 @@ namespace ui float FpsLimit; Graphics * g; private: + pixel * lastBuffer; + std::stack prevBuffers; std::stack windows; //Window* statequeued_; Window* state_; diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index c5dbfac..886dd67 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -19,6 +19,7 @@ PreviewView::PreviewView(): void PreviewView::OnDraw() { Graphics * g = ui::Engine::Ref().g; + g->clearrect(Position.X-2, Position.Y-2, Size.X+4, Size.Y+4); g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); } -- cgit v0.9.2-21-gd62e From 43cebb5780ecb3baf4c5ae8207f62287f9aa9844 Mon Sep 17 00:00:00 2001 From: FrankBro Date: Sat, 21 Jan 2012 22:56:29 -0500 Subject: This qtcreator project files can build and run. diff --git a/Test.pro b/Test.pro new file mode 100644 index 0000000..3c9fe6b --- /dev/null +++ b/Test.pro @@ -0,0 +1,27 @@ +QMAKE_CXXFLAGS_RELEASE += -fkeep-inline-functions +QMAKE_CXXFLAGS_DEBUG += -fkeep-inline-functions + +LIBS += -lSDL -lm -lbz2 + +INCLUDEPATH += data/ \ + src/ + +SOURCES += $$files(src/*.cpp) \ + $$files(src/client/*.cpp) \ + $$files(src/elements/*.cpp) \ + $$files(src/game/*.cpp) \ + $$files(src/interface/*.cpp) \ + $$files(src/search/*.cpp) \ + $$files(src/simulation/*.cpp) \ + $$files(src/cajun/*.cpp) + +HEADERS += src/*.h \ + src/client/*.h \ + src/elements/*.h \ + src/game/*.h \ + src/interface/*.h \ + src/search/*.h \ + src/simulation/*.h \ + src/cajun/*.h + + -- cgit v0.9.2-21-gd62e From cb92acd0b7dd9e958330a9b8e3c4b302f236542c Mon Sep 17 00:00:00 2001 From: FrankBro Date: Sun, 22 Jan 2012 00:45:03 -0500 Subject: Started the rest of the UI diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 2fbed31..336acf9 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -39,6 +39,100 @@ GameView::GameView(): searchButton->SetTogglable(false); searchButton->SetActionCallback(new SearchAction(this)); AddComponent(searchButton); + + class ReloadAction : public ui::ButtonAction + { + GameView * v; + public: + ReloadAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->OpenSearch(); // TODO call proper function + } + }; + reloadButton = new ui::Button(ui::Point(16, Size.Y-18), ui::Point(16, 16), "\x91"); // TODO Position? + reloadButton->SetTogglable(false); + reloadButton->SetActionCallback(new ReloadAction(this)); + AddComponent(reloadButton); + + class SaveSimulationAction : public ui::ButtonAction + { + GameView * v; + public: + SaveSimulationAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->OpenSearch(); // TODO call proper function + } + }; + saveSimulationButton = new ui::Button(ui::Point(32, Size.Y-18), ui::Point(152, 16), "\x82"); // TODO All arguments + saveSimulationButton->SetTogglable(false); + saveSimulationButton->SetActionCallback(new SaveSimulationAction(this)); + AddComponent(saveSimulationButton); + + class UpVoteAction : public ui::ButtonAction + { + GameView * v; + public: + UpVoteAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->OpenSearch(); // TODO call proper function + } + }; + upVoteButton = new ui::Button(ui::Point(184, Size.Y-18), ui::Point(16, 16), "\xCB"); // TODO All arguments + upVoteButton->SetTogglable(false); + upVoteButton->SetActionCallback(new UpVoteAction(this)); + AddComponent(upVoteButton); + + class DownVoteAction : public ui::ButtonAction + { + GameView * v; + public: + DownVoteAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->OpenSearch(); // TODO call proper function + } + }; + downVoteButton = new ui::Button(ui::Point(200, Size.Y-18), ui::Point(16, 16), "\xCA"); // TODO All arguments + downVoteButton->SetTogglable(false); + downVoteButton->SetActionCallback(new DownVoteAction(this)); + AddComponent(downVoteButton); + + class TagSimulationAction : public ui::ButtonAction + { + GameView * v; + public: + TagSimulationAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->OpenSearch(); // TODO call proper function + } + }; + tagSimulationButton = new ui::Button(ui::Point(216, Size.Y-18), ui::Point(152, 16), "\x83"); // TODO All arguments + tagSimulationButton->SetTogglable(false); + tagSimulationButton->SetActionCallback(new TagSimulationAction(this)); + AddComponent(tagSimulationButton); + + //simul option + //erase all + // login + + class DisplayModeAction : public ui::ButtonAction + { + GameView * v; + public: + DisplayModeAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->SetPaused(sender->GetToggleState()); // TODO call proper function + } + }; + displayModeButton = new ui::Button(ui::Point(Size.X-34, Size.Y-18), ui::Point(16, 16), "\xDA"); // TODO All arguments + displayModeButton->SetTogglable(true); + displayModeButton->SetActionCallback(new DisplayModeAction(this)); + AddComponent(displayModeButton); } void GameView::NotifyRendererChanged(GameModel * sender) diff --git a/src/game/GameView.h b/src/game/GameView.h index f34aedc..772aa8a 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -22,6 +22,13 @@ private: //UI Elements ui::Button * pauseButton; ui::Button * searchButton; + ui::Button * reloadButton; + ui::Button * saveSimulationButton; + ui::Button * downVoteButton; + ui::Button * upVoteButton; + ui::Button * tagSimulationButton; + + ui::Button * displayModeButton; public: GameView(); void AttachController(GameController * _c){ c = _c; } diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index ca848b5..57e5558 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -107,12 +107,12 @@ SearchView::~SearchView() void SearchView::NotifySortChanged(SearchModel * sender) { - sortButton->SetText("Sort: "+sender->GetSort()); + sortButton->SetText("Sort: "+sender->GetSort()); } void SearchView::NotifyShowOwnChanged(SearchModel * sender) { - sortButton->SetToggleState(sender->GetShowOwn()); + sortButton->SetToggleState(sender->GetShowOwn()); } void SearchView::NotifyPageChanged(SearchModel * sender) -- cgit v0.9.2-21-gd62e From 91bb5a8b781fba33901c0a2804b86055ed588aa4 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 22 Jan 2012 11:15:34 +0000 Subject: Add remaining buttons for game screen diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 336acf9..619d827 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -9,22 +9,8 @@ GameView::GameView(): isMouseDown(false), ren(NULL) { + int currentX = 1; //Set up UI - class PauseAction : public ui::ButtonAction - { - GameView * v; - public: - PauseAction(GameView * _v) { v = _v; } - void ActionCallback(ui::Button * sender) - { - v->c->SetPaused(sender->GetToggleState()); - } - }; - pauseButton = new ui::Button(ui::Point(Size.X-18, Size.Y-18), ui::Point(16, 16), "\x90"); //Pause - pauseButton->SetTogglable(true); - pauseButton->SetActionCallback(new PauseAction(this)); - AddComponent(pauseButton); - class SearchAction : public ui::ButtonAction { GameView * v; @@ -35,7 +21,8 @@ GameView::GameView(): v->c->OpenSearch(); } }; - searchButton = new ui::Button(ui::Point(1, Size.Y-18), ui::Point(16, 16), "\x81"); //Open + searchButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\x81"); //Open + currentX+=18; searchButton->SetTogglable(false); searchButton->SetActionCallback(new SearchAction(this)); AddComponent(searchButton); @@ -50,8 +37,8 @@ GameView::GameView(): v->c->OpenSearch(); // TODO call proper function } }; - reloadButton = new ui::Button(ui::Point(16, Size.Y-18), ui::Point(16, 16), "\x91"); // TODO Position? - reloadButton->SetTogglable(false); + reloadButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\x91"); // TODO Position? + currentX+=18; reloadButton->SetActionCallback(new ReloadAction(this)); AddComponent(reloadButton); @@ -65,8 +52,8 @@ GameView::GameView(): v->c->OpenSearch(); // TODO call proper function } }; - saveSimulationButton = new ui::Button(ui::Point(32, Size.Y-18), ui::Point(152, 16), "\x82"); // TODO All arguments - saveSimulationButton->SetTogglable(false); + saveSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X/5, 16), "\x82"); // TODO All arguments + currentX+=(Size.X/5)+2; saveSimulationButton->SetActionCallback(new SaveSimulationAction(this)); AddComponent(saveSimulationButton); @@ -80,8 +67,8 @@ GameView::GameView(): v->c->OpenSearch(); // TODO call proper function } }; - upVoteButton = new ui::Button(ui::Point(184, Size.Y-18), ui::Point(16, 16), "\xCB"); // TODO All arguments - upVoteButton->SetTogglable(false); + upVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\xCB"); // TODO All arguments + currentX+=16; upVoteButton->SetActionCallback(new UpVoteAction(this)); AddComponent(upVoteButton); @@ -95,8 +82,8 @@ GameView::GameView(): v->c->OpenSearch(); // TODO call proper function } }; - downVoteButton = new ui::Button(ui::Point(200, Size.Y-18), ui::Point(16, 16), "\xCA"); // TODO All arguments - downVoteButton->SetTogglable(false); + downVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\xCA"); // TODO All arguments + currentX+=18; downVoteButton->SetActionCallback(new DownVoteAction(this)); AddComponent(downVoteButton); @@ -110,14 +97,52 @@ GameView::GameView(): v->c->OpenSearch(); // TODO call proper function } }; - tagSimulationButton = new ui::Button(ui::Point(216, Size.Y-18), ui::Point(152, 16), "\x83"); // TODO All arguments - tagSimulationButton->SetTogglable(false); + tagSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X-(currentX+176), 16), "\x83"); // TODO All arguments + currentX+=Size.X-(currentX+176); tagSimulationButton->SetActionCallback(new TagSimulationAction(this)); AddComponent(tagSimulationButton); - //simul option - //erase all - // login + class ClearSimAction : public ui::ButtonAction + { + GameView * v; + public: + ClearSimAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->SetPaused(sender->GetToggleState()); // TODO call proper function + } + }; + clearSimButton = new ui::Button(ui::Point(Size.X-174, Size.Y-18), ui::Point(16, 16), "C"); // TODO All arguments + clearSimButton->SetActionCallback(new ClearSimAction(this)); + AddComponent(clearSimButton); + + class LoginAction : public ui::ButtonAction + { + GameView * v; + public: + LoginAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->SetPaused(sender->GetToggleState()); // TODO call proper function + } + }; + loginButton = new ui::Button(ui::Point(Size.X-156, Size.Y-18), ui::Point(100, 16), "\xDA Login"); // TODO All arguments + loginButton->SetActionCallback(new LoginAction(this)); + AddComponent(loginButton); + + class SimulationOptionAction : public ui::ButtonAction + { + GameView * v; + public: + SimulationOptionAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->SetPaused(sender->GetToggleState()); // TODO call proper function + } + }; + simulationOptionButton = new ui::Button(ui::Point(Size.X-54, Size.Y-18), ui::Point(16, 16), "\xDA"); // TODO All arguments + simulationOptionButton->SetActionCallback(new SimulationOptionAction(this)); + AddComponent(simulationOptionButton); class DisplayModeAction : public ui::ButtonAction { @@ -129,10 +154,24 @@ GameView::GameView(): v->c->SetPaused(sender->GetToggleState()); // TODO call proper function } }; - displayModeButton = new ui::Button(ui::Point(Size.X-34, Size.Y-18), ui::Point(16, 16), "\xDA"); // TODO All arguments - displayModeButton->SetTogglable(true); + displayModeButton = new ui::Button(ui::Point(Size.X-36, Size.Y-18), ui::Point(16, 16), "\xDA"); // TODO All arguments displayModeButton->SetActionCallback(new DisplayModeAction(this)); AddComponent(displayModeButton); + + class PauseAction : public ui::ButtonAction + { + GameView * v; + public: + PauseAction(GameView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->SetPaused(sender->GetToggleState()); + } + }; + pauseButton = new ui::Button(ui::Point(Size.X-18, Size.Y-18), ui::Point(16, 16), "\x90"); //Pause + pauseButton->SetTogglable(true); + pauseButton->SetActionCallback(new PauseAction(this)); + AddComponent(pauseButton); } void GameView::NotifyRendererChanged(GameModel * sender) diff --git a/src/game/GameView.h b/src/game/GameView.h index 772aa8a..284fd82 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -20,15 +20,17 @@ private: GameController * c; Renderer * ren; //UI Elements - ui::Button * pauseButton; ui::Button * searchButton; ui::Button * reloadButton; ui::Button * saveSimulationButton; ui::Button * downVoteButton; ui::Button * upVoteButton; ui::Button * tagSimulationButton; - + ui::Button * clearSimButton; + ui::Button * loginButton; + ui::Button * simulationOptionButton; ui::Button * displayModeButton; + ui::Button * pauseButton; public: GameView(); void AttachController(GameController * _c){ c = _c; } -- cgit v0.9.2-21-gd62e From 19c1fa5dcb4c4a2ba9d692e136b17da316a2631b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 22 Jan 2012 14:45:37 +0000 Subject: Brush class for drawing on simulation, more interface for game diff --git a/src/game/Brush.h b/src/game/Brush.h new file mode 100644 index 0000000..cc5e819 --- /dev/null +++ b/src/game/Brush.h @@ -0,0 +1,65 @@ +/* + * Brush.h + * + * Created on: Jan 22, 2012 + * Author: Simon + */ + +#ifndef BRUSH_H_ +#define BRUSH_H_ + +#include "interface/Point.h" + +class Brush +{ + bool * bitmap; + ui::Point size; +public: + Brush(ui::Point size_): + bitmap(NULL), + size(size_) + { + + }; + ui::Point GetRadius() + { + return size; + } + void SetRadius(ui::Point size) + { + this->size = size; + GenerateBitmap(); + } + virtual ~Brush() { + if(bitmap) + delete bitmap; + } + //Draw the brush outline onto the screen + virtual void Render(Graphics * g, ui::Point position) + { + g->fillrect(position.X-size.X-1, position.Y-size.Y-1, (size.X*2)+2, (size.Y*2)+2, 255, 0, 255, 70); + } + virtual void GenerateBitmap() + { + if(bitmap) + free(bitmap); + bitmap = (bool *)malloc(sizeof(bool)*(((size.X*2)+1)*((size.Y*2)+1))); + for(int x = 0; x <= size.X*2; x++) + { + for(int y = 0; y <= size.Y*2; y++) + { + bitmap[y*(size.X*2)+x] = true; + } + } + } + //Get a bitmap for drawing particles + bool * GetBitmap() + { + if(!bitmap) + GenerateBitmap(); + return bitmap; + } +}; + + +#endif /* BRUSH_H_ */ diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 571833a..b9c534c 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -37,10 +37,21 @@ GameView * GameController::GetView() return gameView; } +void GameController::AdjustBrushSize(int direction) +{ + ui::Point newSize = gameModel->GetBrush()->GetRadius() + ui::Point(direction, direction); + if(newSize.X<0) + newSize.X = 0; + if(newSize.Y<0) + newSize.Y = 0; + gameModel->GetBrush()->SetRadius(newSize); +} + void GameController::DrawPoints(queue & pointQueue) { Simulation * sim = gameModel->GetSimulation(); int activeElement = gameModel->GetActiveElement(); + Brush * cBrush = gameModel->GetBrush(); if(!pointQueue.empty()) { ui::Point * sPoint = NULL; @@ -50,12 +61,12 @@ void GameController::DrawPoints(queue & pointQueue) pointQueue.pop(); if(sPoint) { - sim->create_line(fPoint->X, fPoint->Y, sPoint->X, sPoint->Y, 1, 1, activeElement, 0); + sim->create_line(fPoint->X, fPoint->Y, sPoint->X, sPoint->Y, 1, 1, activeElement, 0, cBrush); delete sPoint; } else { - sim->create_parts(fPoint->X, fPoint->Y, 1, 1, activeElement, 0); + sim->create_parts(fPoint->X, fPoint->Y, 1, 1, activeElement, 0, cBrush); } sPoint = fPoint; } @@ -79,3 +90,46 @@ void GameController::OpenSearch() search = new SearchController(); ui::Engine::Ref().ShowWindow(search->GetView()); } + +void GameController::OpenLogin() +{ + //TODO: Implement +} + +void GameController::OpenTags() +{ + //TODO: Implement +} + +void GameController::OpenDisplayOptions() +{ + //TODO: Implement +} + +void GameController::OpenRenderOptions() +{ + //TODO: Implement +} + +void GameController::OpenSaveWindow() +{ + //TODO: Implement +} + +void GameController::Vote(int direction) +{ + //TODO: Implement +} + + +void GameController::ClearSim() +{ + gameModel->ClearSimulation(); +} + +void GameController::ReloadSim() +{ + //TODO: Implement +} + + diff --git a/src/game/GameController.h b/src/game/GameController.h index c2c578d..03d12e9 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -23,10 +23,19 @@ public: GameController(); ~GameController(); GameView * GetView(); + void AdjustBrushSize(int direction); void DrawPoints(queue & pointQueue); void Tick(); void SetPaused(bool pauseState); void OpenSearch(); + void OpenLogin(); + void OpenTags(); + void OpenDisplayOptions(); + void OpenRenderOptions(); + void OpenSaveWindow(); + void ClearSim(); + void ReloadSim(); + void Vote(int direction); }; #endif // GAMECONTROLLER_H diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 54c8dd4..3070093 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -3,11 +3,15 @@ #include "GameView.h" #include "simulation/Simulation.h" #include "Renderer.h" +#include "interface/Point.h" +#include "Brush.h" GameModel::GameModel(): activeElement(1), sim(NULL), - ren(NULL) + ren(NULL), + currentSave(NULL), + currentBrush(new Brush(ui::Point(4, 4))) { sim = new Simulation(); ren = new Renderer(ui::Engine::Ref().g, sim); @@ -19,12 +23,19 @@ GameModel::~GameModel() delete ren; } +Brush * GameModel::GetBrush() +{ + return currentBrush; +} + void GameModel::AddObserver(GameView * observer){ observers.push_back(observer); observer->NotifySimulationChanged(this); observer->NotifyRendererChanged(this); observer->NotifyPausedChanged(this); + observer->NotifySaveChanged(this); + observer->NotifyBrushChanged(this); } int GameModel::GetActiveElement() @@ -37,6 +48,16 @@ void GameModel::SetActiveElement(int element) activeElement = element; } +Save * GameModel::GetSave() +{ + return currentSave; +} +void GameModel::SetSave(Save * newSave) +{ + currentSave = newSave; + notifySaveChanged(); +} + Simulation * GameModel::GetSimulation() { return sim; @@ -58,6 +79,11 @@ bool GameModel::GetPaused() return sim->sys_pause?true:false; } +void GameModel::ClearSimulation() +{ + sim->clear_sim(); +} + void GameModel::notifyRendererChanged() { for(int i = 0; i < observers.size(); i++) @@ -66,6 +92,14 @@ void GameModel::notifyRendererChanged() } } +void GameModel::notifySaveChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifySaveChanged(this); + } +} + void GameModel::notifySimulationChanged() { for(int i = 0; i < observers.size(); i++) @@ -81,3 +115,11 @@ void GameModel::notifyPausedChanged() observers[i]->NotifyPausedChanged(this); } } + +void GameModel::notifyBrushChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyBrushChanged(this); + } +} diff --git a/src/game/GameModel.h b/src/game/GameModel.h index c709535..753e19d 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -2,9 +2,11 @@ #define GAMEMODEL_H #include +#include "search/Save.h" #include "simulation/Simulation.h" #include "Renderer.h" #include "GameView.h" +#include "Brush.h" using namespace std; @@ -16,20 +18,28 @@ class GameModel { private: vector observers; + Brush * currentBrush; + Save * currentSave; Simulation * sim; Renderer * ren; int activeElement; void notifyRendererChanged(); void notifySimulationChanged(); void notifyPausedChanged(); + void notifySaveChanged(); + void notifyBrushChanged(); public: GameModel(); ~GameModel(); + Save * GetSave(); + Brush * GetBrush(); + void SetSave(Save * newSave); void AddObserver(GameView * observer); int GetActiveElement(); void SetActiveElement(int element); bool GetPaused(); void SetPaused(bool pauseState); + void ClearSimulation(); Simulation * GetSimulation(); Renderer * GetRenderer(); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 619d827..7fe4fa5 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -7,7 +7,8 @@ GameView::GameView(): ui::Window(ui::Point(0, 0), ui::Point(XRES+BARSIZE, YRES+MENUSIZE)), pointQueue(queue()), isMouseDown(false), - ren(NULL) + ren(NULL), + activeBrush(NULL) { int currentX = 1; //Set up UI @@ -34,10 +35,10 @@ GameView::GameView(): ReloadAction(GameView * _v) { v = _v; } void ActionCallback(ui::Button * sender) { - v->c->OpenSearch(); // TODO call proper function + v->c->ReloadSim(); } }; - reloadButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\x91"); // TODO Position? + reloadButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\x91"); currentX+=18; reloadButton->SetActionCallback(new ReloadAction(this)); AddComponent(reloadButton); @@ -49,10 +50,10 @@ GameView::GameView(): SaveSimulationAction(GameView * _v) { v = _v; } void ActionCallback(ui::Button * sender) { - v->c->OpenSearch(); // TODO call proper function + v->c->OpenSaveWindow(); } }; - saveSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X/5, 16), "\x82"); // TODO All arguments + saveSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X/5, 16), "\x82"); currentX+=(Size.X/5)+2; saveSimulationButton->SetActionCallback(new SaveSimulationAction(this)); AddComponent(saveSimulationButton); @@ -64,10 +65,10 @@ GameView::GameView(): UpVoteAction(GameView * _v) { v = _v; } void ActionCallback(ui::Button * sender) { - v->c->OpenSearch(); // TODO call proper function + v->c->Vote(1); } }; - upVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\xCB"); // TODO All arguments + upVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\xCB"); currentX+=16; upVoteButton->SetActionCallback(new UpVoteAction(this)); AddComponent(upVoteButton); @@ -79,10 +80,10 @@ GameView::GameView(): DownVoteAction(GameView * _v) { v = _v; } void ActionCallback(ui::Button * sender) { - v->c->OpenSearch(); // TODO call proper function + v->c->Vote(-1); } }; - downVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\xCA"); // TODO All arguments + downVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\xCA"); currentX+=18; downVoteButton->SetActionCallback(new DownVoteAction(this)); AddComponent(downVoteButton); @@ -94,10 +95,10 @@ GameView::GameView(): TagSimulationAction(GameView * _v) { v = _v; } void ActionCallback(ui::Button * sender) { - v->c->OpenSearch(); // TODO call proper function + v->c->OpenTags(); } }; - tagSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X-(currentX+176), 16), "\x83"); // TODO All arguments + tagSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X-(currentX+176), 16), "\x83"); currentX+=Size.X-(currentX+176); tagSimulationButton->SetActionCallback(new TagSimulationAction(this)); AddComponent(tagSimulationButton); @@ -109,10 +110,10 @@ GameView::GameView(): ClearSimAction(GameView * _v) { v = _v; } void ActionCallback(ui::Button * sender) { - v->c->SetPaused(sender->GetToggleState()); // TODO call proper function + v->c->ClearSim(); } }; - clearSimButton = new ui::Button(ui::Point(Size.X-174, Size.Y-18), ui::Point(16, 16), "C"); // TODO All arguments + clearSimButton = new ui::Button(ui::Point(Size.X-174, Size.Y-18), ui::Point(16, 16), "C"); clearSimButton->SetActionCallback(new ClearSimAction(this)); AddComponent(clearSimButton); @@ -123,10 +124,10 @@ GameView::GameView(): LoginAction(GameView * _v) { v = _v; } void ActionCallback(ui::Button * sender) { - v->c->SetPaused(sender->GetToggleState()); // TODO call proper function + v->c->OpenLogin(); } }; - loginButton = new ui::Button(ui::Point(Size.X-156, Size.Y-18), ui::Point(100, 16), "\xDA Login"); // TODO All arguments + loginButton = new ui::Button(ui::Point(Size.X-156, Size.Y-18), ui::Point(100, 16), "\xDA Login"); loginButton->SetActionCallback(new LoginAction(this)); AddComponent(loginButton); @@ -137,10 +138,10 @@ GameView::GameView(): SimulationOptionAction(GameView * _v) { v = _v; } void ActionCallback(ui::Button * sender) { - v->c->SetPaused(sender->GetToggleState()); // TODO call proper function + v->c->OpenDisplayOptions(); } }; - simulationOptionButton = new ui::Button(ui::Point(Size.X-54, Size.Y-18), ui::Point(16, 16), "\xDA"); // TODO All arguments + simulationOptionButton = new ui::Button(ui::Point(Size.X-54, Size.Y-18), ui::Point(16, 16), "\xDA"); simulationOptionButton->SetActionCallback(new SimulationOptionAction(this)); AddComponent(simulationOptionButton); @@ -151,10 +152,10 @@ GameView::GameView(): DisplayModeAction(GameView * _v) { v = _v; } void ActionCallback(ui::Button * sender) { - v->c->SetPaused(sender->GetToggleState()); // TODO call proper function + v->c->OpenRenderOptions(); } }; - displayModeButton = new ui::Button(ui::Point(Size.X-36, Size.Y-18), ui::Point(16, 16), "\xDA"); // TODO All arguments + displayModeButton = new ui::Button(ui::Point(Size.X-36, Size.Y-18), ui::Point(16, 16), "\xDA"); displayModeButton->SetActionCallback(new DisplayModeAction(this)); AddComponent(displayModeButton); @@ -189,6 +190,38 @@ void GameView::NotifyPausedChanged(GameModel * sender) pauseButton->SetToggleState(sender->GetPaused()); } +void GameView::NotifySaveChanged(GameModel * sender) +{ + if(sender->GetSave()) + { + reloadButton->Enabled = true; + if(sender->GetSave()->GetID()) //Online saves have an ID, local saves have an ID of 0 and a filename + { + upVoteButton->Enabled = true; + downVoteButton->Enabled = true; + tagSimulationButton->Enabled = true; + } + else + { + upVoteButton->Enabled = false; + downVoteButton->Enabled = false; + tagSimulationButton->Enabled = false; + } + } + else + { + reloadButton->Enabled = false; + upVoteButton->Enabled = false; + downVoteButton->Enabled = false; + tagSimulationButton->Enabled = false; + } +} + +void GameView::NotifyBrushChanged(GameModel * sender) +{ + activeBrush = sender->GetBrush(); +} + void GameView::OnMouseMove(int x, int y, int dx, int dy) { if(isMouseDown) @@ -213,6 +246,17 @@ void GameView::OnMouseUp(int x, int y, unsigned button) } } +void GameView::OnMouseWheel(int x, int y, int d) +{ + if(!d) + return; + c->AdjustBrushSize(d); + if(isMouseDown) + { + pointQueue.push(new ui::Point(x, y)); + } +} + void GameView::OnTick(float dt) { if(!pointQueue.empty()) @@ -228,4 +272,8 @@ void GameView::OnDraw() { ren->render_parts(); } + if(activeBrush) + { + activeBrush->Render(ui::Engine::Ref().g, ui::Point(ui::Engine::Ref().GetMouseX(),ui::Engine::Ref().GetMouseY())); + } } diff --git a/src/game/GameView.h b/src/game/GameView.h index 284fd82..85a96e7 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -7,6 +7,7 @@ #include "interface/Window.h" #include "interface/Point.h" #include "interface/Button.h" +#include "Brush.h" using namespace std; @@ -19,6 +20,7 @@ private: queue pointQueue; GameController * c; Renderer * ren; + Brush * activeBrush; //UI Elements ui::Button * searchButton; ui::Button * reloadButton; @@ -37,10 +39,12 @@ public: void NotifyRendererChanged(GameModel * sender); void NotifySimulationChanged(GameModel * sender); void NotifyPausedChanged(GameModel * sender); + void NotifySaveChanged(GameModel * sender); + void NotifyBrushChanged(GameModel * sender); virtual void OnMouseMove(int x, int y, int dx, int dy); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); - //virtual void OnMouseWheel(int x, int y, int d) {} + virtual void OnMouseWheel(int x, int y, int d); //virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt) {} //virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {} virtual void OnTick(float dt); diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 659aeed..e0f5172 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -25,7 +25,8 @@ Button::Button(Window* parent_state, std::string buttonText): actionCallback(NULL), textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), - textHAlign(AlignCentre) + textHAlign(AlignCentre), + Enabled(true) { TextPosition(); } @@ -40,7 +41,8 @@ Button::Button(Point position, Point size, std::string buttonText): actionCallback(NULL), textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), - textHAlign(AlignCentre) + textHAlign(AlignCentre), + Enabled(true) { TextPosition(); } @@ -55,7 +57,8 @@ Button::Button(std::string buttonText): actionCallback(NULL), textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), - textHAlign(AlignCentre) + textHAlign(AlignCentre), + Enabled(true) { TextPosition(); } @@ -121,17 +124,25 @@ void Button::Draw(const Point& screenPos) { Graphics * g = ui::Engine::Ref().g; Point Position = screenPos; - if(isButtonDown || (isTogglable && toggle)) + if(Enabled) { - g->fillrect(Position.X-1, Position.Y-1, Size.X+2, Size.Y+2, 255, 255, 255, 255); - g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 0, 0, 0, 255); + if(isButtonDown || (isTogglable && toggle)) + { + g->fillrect(Position.X-1, Position.Y-1, Size.X+2, Size.Y+2, 255, 255, 255, 255); + g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 0, 0, 0, 255); + } + else + { + if(isMouseInside) + g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 20, 20, 20, 255); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); + g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 255, 255, 255, 255); + } } else { - if(isMouseInside) - g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 20, 20, 20, 255); - g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); - g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 255, 255, 255, 255); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 180, 180, 180, 255); + g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 180, 180, 180, 255); } } @@ -179,9 +190,8 @@ void Button::OnMouseLeave(int x, int y) void Button::DoAction() { - std::cout << "Do action!"<ActionCallback(this); } diff --git a/src/interface/Button.h b/src/interface/Button.h index 41a057b..7728218 100644 --- a/src/interface/Button.h +++ b/src/interface/Button.h @@ -33,6 +33,7 @@ public: virtual ~Button(); bool Toggleable; + bool Enabled; std::string ButtonText; diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 7ee0391..cd10def 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -290,10 +290,16 @@ int Simulation::create_part_add_props(int p, int x, int y, int tv, int rx, int r } //this creates particles from a brush, don't use if you want to create one particle -int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags) +int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush) { int i, j, r, f = 0, u, v, oy, ox, b = 0, dw = 0, stemp = 0, p;//n; + if(cBrush) + { + rx = cBrush->GetRadius().X; + ry = cBrush->GetRadius().Y; + } + int wall = c - 100; if (c==SPC_WIND || c==PT_FIGH) return 0; @@ -357,16 +363,6 @@ int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags) { i = ox; j = oy; - /*if ((flags&BRUSH_SPECIFIC_DELETE) && b!=WL_FANHELPER) - { - if (bmap[j][i]==SLALT-100) - { - b = 0; - if (SLALT==WL_GRAV) gravwl_timeout = 60; - } - else - continue; - }*/ if (b==WL_FAN) { fvx[j][i] = 0.0f; @@ -394,132 +390,86 @@ int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags) } //eraser - if (c == 0/* && !(flags&BRUSH_REPLACEMODE)*/) + if (c == 0) { if (rx==0&&ry==0) { delete_part(x, y, 0); } - else + else if(cBrush) + { + bool *bitmap = cBrush->GetBitmap(); for (j=-ry; j<=ry; j++) for (i=-rx; i<=rx; i++) - //if (InCurrentBrush(i ,j ,rx ,ry)) + if(bitmap[(j+ry)*(rx*2)+(i+rx)]) delete_part(x+i, y+j, 0); - return 1; - } - - //specific deletion - /*if ((flags&BRUSH_SPECIFIC_DELETE)&& !(flags&BRUSH_REPLACEMODE)) - { - if (rx==0&&ry==0) - { - delete_part(x, y, flags); } else + { for (j=-ry; j<=ry; j++) for (i=-rx; i<=rx; i++) - if (InCurrentBrush(i ,j ,rx ,ry)) - delete_part(x+i, y+j, flags); + delete_part(x+i, y+j, 0); + } return 1; - }*/ + } - //why do these need a special if if (c == SPC_AIR || c == SPC_HEAT || c == SPC_COOL || c == SPC_VACUUM || c == SPC_PGRV || c == SPC_NGRV) { if (rx==0&&ry==0) { create_part(-2, x, y, c); } - else + else if(cBrush) + { + bool *bitmap = cBrush->GetBitmap(); for (j=-ry; j<=ry; j++) for (i=-rx; i<=rx; i++) - //if (InCurrentBrush(i ,j ,rx ,ry)) + if(bitmap[(j+ry)*(rx*2)+(i+rx)]) { if ( x+i<0 || y+j<0 || x+i>=XRES || y+j>=YRES) continue; - //if (!REPLACE_MODE) - create_part(-2, x+i, y+j, c); - /*else if ((pmap[y+j][x+i]&0xFF)==SLALT&&SLALT!=0) - create_part(-2, x+i, y+j, c);*/ + create_part(-2, x+i, y+j, c); } - return 1; - } - - /*if (flags&BRUSH_REPLACEMODE) - { - if (rx==0&&ry==0) - { - if ((pmap[y][x]&0xFF)==SLALT || SLALT==0) - { - if ((pmap[y][x])) - { - delete_part(x, y, 0); - if (c!=0) - create_part_add_props(-2, x, y, c, rx, ry); - } - } } else + { for (j=-ry; j<=ry; j++) for (i=-rx; i<=rx; i++) - if (InCurrentBrush(i ,j ,rx ,ry)) - { - if ( x+i<0 || y+j<0 || x+i>=XRES || y+j>=YRES) - continue; - if ((pmap[y+j][x+i]&0xFF)!=SLALT&&SLALT!=0) - continue; - if ((pmap[y+j][x+i])) - { - delete_part(x+i, y+j, 0); - if (c!=0) - create_part_add_props(-2, x+i, y+j, c, rx, ry); - } - } + { + if ( x+i<0 || y+j<0 || x+i>=XRES || y+j>=YRES) + continue; + create_part(-2, x+i, y+j, c); + } + } return 1; + } - }*/ //else, no special modes, draw element like normal. if (rx==0&&ry==0)//workaround for 1pixel brush/floodfill crashing. todo: find a better fix later. { if (create_part_add_props(-2, x, y, c, rx, ry)==-1) f = 1; } - else + else if(cBrush) + { + bool *bitmap = cBrush->GetBitmap(); for (j=-ry; j<=ry; j++) for (i=-rx; i<=rx; i++) - //if (InCurrentBrush(i ,j ,rx ,ry)) + if(bitmap[(j+ry)*(rx*2)+(i+rx)]) if (create_part_add_props(-2, x+i, y+j, c, rx, ry)==-1) f = 1; - return !f; -} -/*int Simulation::InCurrentBrush(int i, int j, int rx, int ry) -{ - switch(CURRENT_BRUSH) + } + else { - case CIRCLE_BRUSH: - return (pow(i,2)*pow(ry,2)+pow(j,2)*pow(rx,2)<=pow(rx,2)*pow(ry,2)); - break; - case SQUARE_BRUSH: - return (i*j<=ry*rx); - break; - case TRI_BRUSH: - return (j <= ry ) && ( j >= (((-2.0*ry)/rx)*i) -ry) && ( j >= (((-2.0*ry)/(-rx))*i)-ry ) ; - break; + for (j=-ry; j<=ry; j++) + for (i=-rx; i<=rx; i++) + if (create_part_add_props(-2, x+i, y+j, c, rx, ry)==-1) + f = 1; } - return 0; + return !f; } -int Simulation::get_brush_flags() -{ - int flags = 0; - if (REPLACE_MODE) - flags |= BRUSH_REPLACEMODE; - if (sdl_mod & KMOD_CAPS) - flags |= BRUSH_SPECIFIC_DELETE; - if ((sdl_mod & KMOD_LALT) && (sdl_mod & (KMOD_CTRL))) - flags |= BRUSH_SPECIFIC_DELETE; - return flags; -}*/ -void Simulation::create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags) + +void Simulation::create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags, Brush * cBrush) { int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; float e, de; @@ -555,9 +505,9 @@ void Simulation::create_line(int x1, int y1, int x2, int y2, int rx, int ry, int for (x=x1; x<=x2; x++) { if (cp) - create_parts(y, x, rx, ry, c, flags); + create_parts(y, x, rx, ry, c, flags, cBrush); else - create_parts(x, y, rx, ry, c, flags); + create_parts(x, y, rx, ry, c, flags, cBrush); e += de; if (e >= 0.5f) { @@ -566,9 +516,9 @@ void Simulation::create_line(int x1, int y1, int x2, int y2, int rx, int ry, int && ((y1=y2))) { if (cp) - create_parts(y, x, rx, ry, c, flags); + create_parts(y, x, rx, ry, c, flags, cBrush); else - create_parts(x, y, rx, ry, c, flags); + create_parts(x, y, rx, ry, c, flags, cBrush); } e -= 1.0f; } diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index f6fd1b0..86f9b8f 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -13,6 +13,7 @@ #include "Graphics.h" #include "Elements.h" #include "Misc.h" +#include "game/Brush.h" #define CHANNELS ((int)(MAX_TEMP-73)/100+2) @@ -224,8 +225,8 @@ public: void clear_area(int area_x, int area_y, int area_w, int area_h); void create_box(int x1, int y1, int x2, int y2, int c, int flags); int flood_parts(int x, int y, int c, int cm, int bm, int flags); - int create_parts(int x, int y, int rx, int ry, int c, int flags); - void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags); + int create_parts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush = NULL); + void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags, Brush * cBrush = NULL); void *transform_save(void *odata, int *size, matrix2d transform, vector2d translate); void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]); void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]); -- cgit v0.9.2-21-gd62e From 8c0678fa48f9598a5ade2d4960c46bfea7e6abef Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 22 Jan 2012 23:24:49 +0000 Subject: Begining menu, tool diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index b9c534c..5749fd4 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -50,8 +50,19 @@ void GameController::AdjustBrushSize(int direction) void GameController::DrawPoints(queue & pointQueue) { Simulation * sim = gameModel->GetSimulation(); - int activeElement = gameModel->GetActiveElement(); + Tool * activeTool = gameModel->GetActiveTool(); Brush * cBrush = gameModel->GetBrush(); + if(!activeTool || !cBrush) + { + if(!pointQueue.empty()) + { + while(!pointQueue.empty()) + { + delete pointQueue.front(); + pointQueue.pop(); + } + } + } if(!pointQueue.empty()) { ui::Point * sPoint = NULL; @@ -61,12 +72,12 @@ void GameController::DrawPoints(queue & pointQueue) pointQueue.pop(); if(sPoint) { - sim->create_line(fPoint->X, fPoint->Y, sPoint->X, sPoint->Y, 1, 1, activeElement, 0, cBrush); + activeTool->DrawLine(sim, cBrush, *fPoint, *sPoint); delete sPoint; } else { - sim->create_parts(fPoint->X, fPoint->Y, 1, 1, activeElement, 0, cBrush); + activeTool->Draw(sim, cBrush, *fPoint); } sPoint = fPoint; } @@ -85,6 +96,11 @@ void GameController::SetPaused(bool pauseState) gameModel->SetPaused(pauseState); } +void GameController::SetActiveMenu(Menu * menu) +{ + gameModel->SetActiveMenu(menu); +} + void GameController::OpenSearch() { search = new SearchController(); diff --git a/src/game/GameController.h b/src/game/GameController.h index 03d12e9..d83c459 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -7,6 +7,7 @@ #include "interface/Point.h" #include "simulation/Simulation.h" #include "search/SearchController.h" +#include "Menu.h" using namespace std; @@ -27,6 +28,7 @@ public: void DrawPoints(queue & pointQueue); void Tick(); void SetPaused(bool pauseState); + void SetActiveMenu(Menu * menu); void OpenSearch(); void OpenLogin(); void OpenTags(); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 3070093..090f46a 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -7,7 +7,7 @@ #include "Brush.h" GameModel::GameModel(): - activeElement(1), + activeTool(NULL), sim(NULL), ren(NULL), currentSave(NULL), @@ -15,10 +15,35 @@ GameModel::GameModel(): { sim = new Simulation(); ren = new Renderer(ui::Engine::Ref().g, sim); + + menuList.clear(); + for(int i = 0; i < 12; i++) + { + menuList.push_back(new Menu('q', "Simon")); + } + //Build menus from Simulation elements + for(int i = 0; i < PT_NUM; i++) + { + if(sim->ptypes[i].menusection < 12) + { + Tool * tempTool = new ElementTool(i, sim->ptypes[i].name, 0, 0, 0); + menuList[sim->ptypes[i].menusection]->AddTool(tempTool); + } + } + + activeTool = new ElementTool(1, "TURD", 0, 0, 0); } GameModel::~GameModel() { + for(int i = 0; i < menuList.size(); i++) + { + for(int j = 0; i < menuList[i]->GetToolList().size(); i++) + { + delete menuList[i]->GetToolList()[j]; + } + delete menuList[i]; + } delete sim; delete ren; } @@ -36,22 +61,53 @@ void GameModel::AddObserver(GameView * observer){ observer->NotifyPausedChanged(this); observer->NotifySaveChanged(this); observer->NotifyBrushChanged(this); + observer->NotifyMenuListChanged(this); + observer->NotifyToolListChanged(this); +} + +void GameModel::SetActiveMenu(Menu * menu) +{ + for(int i = 0; i < menuList.size(); i++) + { + if(menuList[i]==menu) + { + activeMenu = menu; + toolList = menu->GetToolList(); + notifyToolListChanged(); + } + } } -int GameModel::GetActiveElement() +vector GameModel::GetToolList() { - return activeElement; + return toolList; } -void GameModel::SetActiveElement(int element) +Menu * GameModel::GetActiveMenu() { - activeElement = element; + return activeMenu; +} + +Tool * GameModel::GetActiveTool() +{ + return activeTool; +} + +void GameModel::SetActiveTool(Tool * tool) +{ + activeTool = tool; +} + +vector GameModel::GetMenuList() +{ + return menuList; } Save * GameModel::GetSave() { return currentSave; } + void GameModel::SetSave(Save * newSave) { currentSave = newSave; @@ -123,3 +179,19 @@ void GameModel::notifyBrushChanged() observers[i]->NotifyBrushChanged(this); } } + +void GameModel::notifyMenuListChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyMenuListChanged(this); + } +} + +void GameModel::notifyToolListChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyToolListChanged(this); + } +} diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 753e19d..d65165b 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -8,6 +8,9 @@ #include "GameView.h" #include "Brush.h" +#include "Tool.h" +#include "Menu.h" + using namespace std; class GameView; @@ -18,16 +21,21 @@ class GameModel { private: vector observers; + vector toolList; + vector menuList; + Menu * activeMenu; Brush * currentBrush; Save * currentSave; Simulation * sim; Renderer * ren; - int activeElement; + Tool * activeTool; void notifyRendererChanged(); void notifySimulationChanged(); void notifyPausedChanged(); void notifySaveChanged(); void notifyBrushChanged(); + void notifyMenuListChanged(); + void notifyToolListChanged(); public: GameModel(); ~GameModel(); @@ -35,11 +43,15 @@ public: Brush * GetBrush(); void SetSave(Save * newSave); void AddObserver(GameView * observer); - int GetActiveElement(); - void SetActiveElement(int element); + Tool * GetActiveTool(); + void SetActiveTool(Tool * tool); bool GetPaused(); void SetPaused(bool pauseState); void ClearSimulation(); + vector GetMenuList(); + vector GetToolList(); + void SetActiveMenu(Menu * menu); + Menu * GetActiveMenu(); Simulation * GetSimulation(); Renderer * GetRenderer(); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 7fe4fa5..ed2094d 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -175,6 +175,62 @@ GameView::GameView(): AddComponent(pauseButton); } +class GameView::MenuAction: public ui::ButtonAction +{ + GameView * v; +public: + Menu * menu; + MenuAction(GameView * _v, Menu * menu_) { v = _v; menu = menu_; } + void ActionCallback(ui::Button * sender) + { + v->c->SetActiveMenu(menu); + } +}; + +void GameView::NotifyMenuListChanged(GameModel * sender) +{ + int currentY = YRES+MENUSIZE-36; + for(int i = 0; i < menuButtons.size(); i++) + { + RemoveComponent(menuButtons[i]); + delete menuButtons[i]; + } + menuButtons.clear(); + for(int i = 0; i < toolButtons.size(); i++) + { + RemoveComponent(toolButtons[i]); + delete toolButtons[i]; + } + toolButtons.clear(); + vector menuList = sender->GetMenuList(); + for(int i = 0; i < menuList.size(); i++) + { + std::string tempString = ""; + tempString += menuList[i]->GetIcon(); + ui::Button * tempButton = new ui::Button(ui::Point(XRES+BARSIZE-18, currentY), ui::Point(16, 16), tempString); + tempButton->SetTogglable(true); + tempButton->SetActionCallback(new MenuAction(this, menuList[i])); + currentY-=18; + AddComponent(tempButton); + menuButtons.push_back(tempButton); + } +} + +void GameView::NotifyToolListChanged(GameModel * sender) +{ + for(int i = 0; i < menuButtons.size(); i++) + { + if(((MenuAction*)menuButtons[i]->GetActionCallback())->menu==sender->GetActiveMenu()) + { + menuButtons[i]->SetToggleState(true); + } + else + { + menuButtons[i]->SetToggleState(false); + } + } +} + void GameView::NotifyRendererChanged(GameModel * sender) { ren = sender->GetRenderer(); diff --git a/src/game/GameView.h b/src/game/GameView.h index 85a96e7..c27c2cc 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -1,6 +1,7 @@ #ifndef GAMEVIEW_H #define GAMEVIEW_H +#include #include #include "GameController.h" #include "GameModel.h" @@ -22,6 +23,8 @@ private: Renderer * ren; Brush * activeBrush; //UI Elements + vector menuButtons; + vector toolButtons; ui::Button * searchButton; ui::Button * reloadButton; ui::Button * saveSimulationButton; @@ -41,6 +44,8 @@ public: void NotifyPausedChanged(GameModel * sender); void NotifySaveChanged(GameModel * sender); void NotifyBrushChanged(GameModel * sender); + void NotifyMenuListChanged(GameModel * sender); + void NotifyToolListChanged(GameModel * sender); virtual void OnMouseMove(int x, int y, int dx, int dy); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); @@ -49,6 +54,7 @@ public: //virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {} virtual void OnTick(float dt); virtual void OnDraw(); + class MenuAction; }; #endif // GAMEVIEW_H diff --git a/src/game/Menu.h b/src/game/Menu.h new file mode 100644 index 0000000..1824190 --- /dev/null +++ b/src/game/Menu.h @@ -0,0 +1,49 @@ +/* + * Menu.h + * + * Created on: Jan 22, 2012 + * Author: Simon + */ + +#ifndef MENU_H_ +#define MENU_H_ + +#include "Tool.h" + +class Menu +{ + char icon; + string description; + vector tools; +public: + Menu(char icon_, string description_): + icon(icon_), + description(description_), + tools(vector()) + { + + } + + vector GetToolList() + { + return tools; + } + + char GetIcon() + { + return icon; + } + + string GetDescription() + { + return description; + } + + void AddTool(Tool * tool_) + { + tools.push_back(tool_); + } +}; + + +#endif /* MENU_H_ */ diff --git a/src/game/Tool.h b/src/game/Tool.h new file mode 100644 index 0000000..842f4a2 --- /dev/null +++ b/src/game/Tool.h @@ -0,0 +1,53 @@ +/* + * Tool.h + * + * Created on: Jan 22, 2012 + * Author: Simon + */ + +#ifndef TOOL_H_ +#define TOOL_H_ + +#include + +using namespace std; + +class Tool +{ +protected: + int toolID, colRed, colBlue, colGreen; + string toolName; +public: + Tool(int id, string name, int r, int b, int g): + toolID(id), + toolName(name), + colRed(r), + colGreen(g), + colBlue(b) + { + } + virtual ~Tool() {} + virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) {} + virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {} + virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {} +}; + +class ElementTool: public Tool +{ +public: + ElementTool(int id, string name, int r, int b, int g): + Tool(id, name, r, g, b) + { + } + virtual ~ElementTool() {} + virtual void Draw(Simulation * sim, Brush * brush, ui::Point position){ + sim->create_parts(position.X, position.Y, 1, 1, toolID, 0, brush); + } + virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + std::cout << position1.X << toolID << brush << std::endl; + sim->create_line(position1.X, position1.Y, position2.X, position2.Y, 1, 1, toolID, 0, brush); + } + virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {} +}; + +#endif /* TOOL_H_ */ diff --git a/src/interface/Button.h b/src/interface/Button.h index 7728218..a137aac 100644 --- a/src/interface/Button.h +++ b/src/interface/Button.h @@ -53,6 +53,7 @@ public: inline bool GetToggleState(); inline void SetToggleState(bool state); void SetActionCallback(ButtonAction * action); + ButtonAction * GetActionCallback() { return actionCallback; } void TextPosition(); void SetText(std::string buttonText); HorizontalAlignment GetHAlignment() { return textHAlign; } -- cgit v0.9.2-21-gd62e From 8a65c395f490baea3b55f1418207c4ee172a2b3a Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 23 Jan 2012 10:50:48 +0000 Subject: Element menu diff --git a/Makefile b/Makefile index bb1879e..1296d14 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ OBJS := $(patsubst src/%.cpp,build/obj/%.o,$(SOURCES)) FOLDERS := CFLAGS := -w -Isrc/ -Idata/ -OFLAGS := -fkeep-inline-functions #-O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -msse2 +OFLAGS := -fkeep-inline-functions -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -msse2 CPPC := g++ CPPC_WIN := i686-w64-mingw32-gcc diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 5749fd4..9056ba8 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -88,7 +88,7 @@ void GameController::DrawPoints(queue & pointQueue) void GameController::Tick() { - //gameModel->GetSimulation()->update_particles(); + gameModel->GetSimulation()->update_particles(); } void GameController::SetPaused(bool pauseState) @@ -96,11 +96,21 @@ void GameController::SetPaused(bool pauseState) gameModel->SetPaused(pauseState); } +void GameController::SetPaused() +{ + gameModel->SetPaused(!gameModel->GetPaused()); +} + void GameController::SetActiveMenu(Menu * menu) { gameModel->SetActiveMenu(menu); } +void GameController::SetActiveTool(Tool * tool) +{ + gameModel->SetActiveTool(tool); +} + void GameController::OpenSearch() { search = new SearchController(); diff --git a/src/game/GameController.h b/src/game/GameController.h index d83c459..d7232d2 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -28,7 +28,9 @@ public: void DrawPoints(queue & pointQueue); void Tick(); void SetPaused(bool pauseState); + void SetPaused(); void SetActiveMenu(Menu * menu); + void SetActiveTool(Tool * tool); void OpenSearch(); void OpenLogin(); void OpenTags(); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 090f46a..91b1c8d 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -26,7 +26,7 @@ GameModel::GameModel(): { if(sim->ptypes[i].menusection < 12) { - Tool * tempTool = new ElementTool(i, sim->ptypes[i].name, 0, 0, 0); + Tool * tempTool = new ElementTool(i, sim->ptypes[i].name, PIXR(sim->ptypes[i].pcolors), PIXG(sim->ptypes[i].pcolors), PIXB(sim->ptypes[i].pcolors)); menuList[sim->ptypes[i].menusection]->AddTool(tempTool); } } @@ -96,6 +96,7 @@ Tool * GameModel::GetActiveTool() void GameModel::SetActiveTool(Tool * tool) { activeTool = tool; + notifyActiveToolChanged(); } vector GameModel::GetMenuList() @@ -195,3 +196,11 @@ void GameModel::notifyToolListChanged() observers[i]->NotifyToolListChanged(this); } } + +void GameModel::notifyActiveToolChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyActiveToolChanged(this); + } +} diff --git a/src/game/GameModel.h b/src/game/GameModel.h index d65165b..14319e7 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -36,6 +36,7 @@ private: void notifyBrushChanged(); void notifyMenuListChanged(); void notifyToolListChanged(); + void notifyActiveToolChanged(); public: GameModel(); ~GameModel(); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index ed2094d..80965ce 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -187,6 +187,18 @@ public: } }; +class GameView::ToolAction: public ui::ButtonAction +{ + GameView * v; +public: + Tool * tool; + ToolAction(GameView * _v, Tool * tool_) { v = _v; tool = tool_; } + void ActionCallback(ui::Button * sender) + { + v->c->SetActiveTool(tool); + } +}; + void GameView::NotifyMenuListChanged(GameModel * sender) { int currentY = YRES+MENUSIZE-36; @@ -216,8 +228,24 @@ void GameView::NotifyMenuListChanged(GameModel * sender) } } +void GameView::NotifyActiveToolChanged(GameModel * sender) +{ + for(int i = 0; i < toolButtons.size(); i++) + { + if(((ToolAction*)toolButtons[i]->GetActionCallback())->tool==sender->GetActiveTool()) + { + toolButtons[i]->SetToggleState(true); + } + else + { + toolButtons[i]->SetToggleState(false); + } + } +} + void GameView::NotifyToolListChanged(GameModel * sender) { + int currentX = XRES+BARSIZE-56; for(int i = 0; i < menuButtons.size(); i++) { if(((MenuAction*)menuButtons[i]->GetActionCallback())->menu==sender->GetActiveMenu()) @@ -229,6 +257,25 @@ void GameView::NotifyToolListChanged(GameModel * sender) menuButtons[i]->SetToggleState(false); } } + for(int i = 0; i < toolButtons.size(); i++) + { + RemoveComponent(toolButtons[i]); + delete toolButtons[i]; + } + toolButtons.clear(); + vector toolList = sender->GetToolList(); + for(int i = 0; i < toolList.size(); i++) + { + ui::Button * tempButton = new ui::Button(ui::Point(currentX, YRES), ui::Point(32, 16), toolList[i]->GetName()); + currentX -= 36; + tempButton->SetTogglable(true); + tempButton->SetActionCallback(new ToolAction(this, toolList[i])); + tempButton->SetBackgroundColour(toolList[i]->colRed, toolList[i]->colGreen, toolList[i]->colBlue); + tempButton->SetAlignment(AlignCentre, AlignBottom); + AddComponent(tempButton); + toolButtons.push_back(tempButton); + } + } void GameView::NotifyRendererChanged(GameModel * sender) @@ -313,6 +360,15 @@ void GameView::OnMouseWheel(int x, int y, int d) } } +void GameView::OnKeyPress(int key, bool shift, bool ctrl, bool alt) +{ + switch(key) + { + case ' ': + c->SetPaused(); + } +} + void GameView::OnTick(float dt) { if(!pointQueue.empty()) @@ -327,6 +383,8 @@ void GameView::OnDraw() if(ren) { ren->render_parts(); + ren->render_fire(); + ren->render_signs(); } if(activeBrush) { diff --git a/src/game/GameView.h b/src/game/GameView.h index c27c2cc..3881795 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -46,15 +46,18 @@ public: void NotifyBrushChanged(GameModel * sender); void NotifyMenuListChanged(GameModel * sender); void NotifyToolListChanged(GameModel * sender); + void NotifyActiveToolChanged(GameModel * sender); virtual void OnMouseMove(int x, int y, int dx, int dy); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); virtual void OnMouseWheel(int x, int y, int d); + virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); //virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt) {} //virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {} virtual void OnTick(float dt); virtual void OnDraw(); class MenuAction; + class ToolAction; }; #endif // GAMEVIEW_H diff --git a/src/game/Tool.h b/src/game/Tool.h index 842f4a2..4777e6d 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -15,10 +15,10 @@ using namespace std; class Tool { protected: - int toolID, colRed, colBlue, colGreen; + int toolID; string toolName; public: - Tool(int id, string name, int r, int b, int g): + Tool(int id, string name, int r, int g, int b): toolID(id), toolName(name), colRed(r), @@ -26,16 +26,18 @@ public: colBlue(b) { } + string GetName() { return toolName; } virtual ~Tool() {} virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) {} virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {} virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {} + int colRed, colBlue, colGreen; }; class ElementTool: public Tool { public: - ElementTool(int id, string name, int r, int b, int g): + ElementTool(int id, string name, int r, int g, int b): Tool(id, name, r, g, b) { } diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index e0f5172..2694de5 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -26,7 +26,10 @@ Button::Button(Window* parent_state, std::string buttonText): textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), textHAlign(AlignCentre), - Enabled(true) + Enabled(true), + colr(0), + colg(0), + colb(0) { TextPosition(); } @@ -42,7 +45,10 @@ Button::Button(Point position, Point size, std::string buttonText): textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), textHAlign(AlignCentre), - Enabled(true) + Enabled(true), + colr(0), + colg(0), + colb(0) { TextPosition(); } @@ -58,7 +64,10 @@ Button::Button(std::string buttonText): textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), textHAlign(AlignCentre), - Enabled(true) + Enabled(true), + colr(0), + colg(0), + colb(0) { TextPosition(); } @@ -135,6 +144,8 @@ void Button::Draw(const Point& screenPos) { if(isMouseInside) g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 20, 20, 20, 255); + else + g->fillrect(Position.X, Position.Y, Size.X, Size.Y, colr, colg, colb, 255); g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 255, 255, 255, 255); } diff --git a/src/interface/Button.h b/src/interface/Button.h index a137aac..bff54c9 100644 --- a/src/interface/Button.h +++ b/src/interface/Button.h @@ -59,7 +59,9 @@ public: HorizontalAlignment GetHAlignment() { return textHAlign; } VerticalAlignment GetVAlignment() { return textVAlign; } void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign) { textHAlign = hAlign; textVAlign = vAlign; TextPosition(); } + void SetBackgroundColour(int colr, int colg, int colb) { this->colr = colr; this->colg = colg; this->colb = colb; } protected: + int colr, colg, colb; bool isButtonDown, state, isMouseInside, isTogglable, toggle; ButtonAction * actionCallback; ui::Point textPosition; -- cgit v0.9.2-21-gd62e From 27755b2f277f14a5428219fe2b7eceddcdfc17fe Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 23 Jan 2012 11:44:20 +0000 Subject: Render options diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 9056ba8..09f8f6c 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -5,6 +5,7 @@ #include "GameController.h" #include "GameModel.h" #include "search/SearchController.h" +#include "render/RenderController.h" #include "interface/Point.h" using namespace std; @@ -134,7 +135,8 @@ void GameController::OpenDisplayOptions() void GameController::OpenRenderOptions() { - //TODO: Implement + RenderController * renderController = new RenderController(gameModel->GetRenderer()); + ui::Engine::Ref().ShowWindow(renderController->GetView()); } void GameController::OpenSaveWindow() diff --git a/src/render/RenderController.cpp b/src/render/RenderController.cpp new file mode 100644 index 0000000..6f7f72e --- /dev/null +++ b/src/render/RenderController.cpp @@ -0,0 +1,24 @@ +/* + * RenderController.cpp + * + * Created on: Jan 23, 2012 + * Author: Simon + */ + +#include "RenderController.h" + +RenderController::RenderController(Renderer * ren) { + renderView = new RenderView(); + renderModel = new RenderModel(); + + renderView->AttachController(this); + renderModel->AddObserver(renderView); + + renderModel->SetRenderer(ren); +} + +RenderController::~RenderController() { + delete renderView; + delete renderModel; +} + diff --git a/src/render/RenderController.h b/src/render/RenderController.h new file mode 100644 index 0000000..1c574c1 --- /dev/null +++ b/src/render/RenderController.h @@ -0,0 +1,26 @@ +/* + * RenderController.h + * + * Created on: Jan 23, 2012 + * Author: Simon + */ + +#ifndef RENDERCONTROLLER_H_ +#define RENDERCONTROLLER_H_ + +#include "RenderView.h" +#include "RenderModel.h" +#include "Renderer.h" + +class RenderView; +class RenderModel; +class RenderController { + RenderView * renderView; + RenderModel * renderModel; +public: + RenderController(Renderer * ren); + RenderView * GetView() { return renderView; } + virtual ~RenderController(); +}; + +#endif /* RENDERCONTROLLER_H_ */ diff --git a/src/render/RenderModel.cpp b/src/render/RenderModel.cpp new file mode 100644 index 0000000..6bd9bdd --- /dev/null +++ b/src/render/RenderModel.cpp @@ -0,0 +1,42 @@ +/* + * RenderModel.cpp + * + * Created on: Jan 23, 2012 + * Author: Simon + */ + +#include "RenderModel.h" + +RenderModel::RenderModel() { + // TODO Auto-generated constructor stub + +} + +void RenderModel::AddObserver(RenderView * observer) +{ + observers.push_back(observer); + observer->NotifyRendererChanged(this); +} + +void RenderModel::SetRenderer(Renderer * ren) +{ + renderer = ren; + notifyRendererChanged(); +} + +Renderer * RenderModel::GetRenderer() +{ + return renderer; +} + +void RenderModel::notifyRendererChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyRendererChanged(this); + } +} + +RenderModel::~RenderModel() { + // TODO Auto-generated destructor stub +} diff --git a/src/render/RenderModel.h b/src/render/RenderModel.h new file mode 100644 index 0000000..b4f9ee8 --- /dev/null +++ b/src/render/RenderModel.h @@ -0,0 +1,30 @@ +/* + * RenderModel.h + * + * Created on: Jan 23, 2012 + * Author: Simon + */ + +#ifndef RENDERMODEL_H_ +#define RENDERMODEL_H_ + +#include +#include "RenderView.h" +#include "Renderer.h" + +using namespace std; + +class RenderView; +class RenderModel { + vector observers; + Renderer * renderer; + void notifyRendererChanged(); +public: + RenderModel(); + Renderer * GetRenderer(); + void AddObserver(RenderView * observer); + void SetRenderer(Renderer * ren); + virtual ~RenderModel(); +}; + +#endif /* RENDERMODEL_H_ */ diff --git a/src/render/RenderView.cpp b/src/render/RenderView.cpp new file mode 100644 index 0000000..93c0dec --- /dev/null +++ b/src/render/RenderView.cpp @@ -0,0 +1,38 @@ +/* + * RenderView.cpp + * + * Created on: Jan 23, 2012 + * Author: Simon + */ + +#include "RenderView.h" +#include "Graphics.h" + +RenderView::RenderView(): + ui::Window(ui::Point(0, 0), ui::Point(XRES, YRES+MENUSIZE)), + ren(NULL) +{ + // TODO Auto-generated constructor stub + +} + +void RenderView::NotifyRendererChanged(RenderModel * sender) +{ + ren = sender->GetRenderer(); +} + +void RenderView::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + g->clearrect(0, 0, XRES, YRES+MENUSIZE); + g->draw_line(XRES-1, 0, XRES-1, YRES+MENUSIZE, 255, 255, 255, XRES+BARSIZE); + if(ren) + { + ren->render_parts(); + ren->render_fire(); + } +} + +RenderView::~RenderView() { + // TODO Auto-generated destructor stub +} diff --git a/src/render/RenderView.h b/src/render/RenderView.h new file mode 100644 index 0000000..37f023a --- /dev/null +++ b/src/render/RenderView.h @@ -0,0 +1,29 @@ +/* + * RenderView.h + * + * Created on: Jan 23, 2012 + * Author: Simon + */ + +#ifndef RENDERVIEW_H_ +#define RENDERVIEW_H_ + +#include "interface/Window.h" +#include "RenderController.h" +#include "RenderModel.h" +#include "Renderer.h" + +class RenderController; +class RenderModel; +class RenderView: public ui::Window { + RenderController * c; + Renderer * ren; +public: + RenderView(); + void NotifyRendererChanged(RenderModel * sender); + void AttachController(RenderController * c_) { c = c_; } + virtual void OnDraw(); + virtual ~RenderView(); +}; + +#endif /* RENDERVIEW_H_ */ -- cgit v0.9.2-21-gd62e From 2bd571e1598e6baffc717bcb086d89d01929604b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 23 Jan 2012 11:48:08 +0000 Subject: GameController shut down any render options open diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 09f8f6c..b79da06 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -11,7 +11,8 @@ using namespace std; GameController::GameController(): - search(NULL) + search(NULL), + renderOptions(NULL) { gameView = new GameView(); gameModel = new GameModel(); @@ -29,6 +30,11 @@ GameController::~GameController() ui::Engine::Ref().CloseWindow(); delete search; } + if(renderOptions) + { + ui::Engine::Ref().CloseWindow(); + delete renderOptions; + } delete gameView; delete gameModel; } @@ -135,8 +141,8 @@ void GameController::OpenDisplayOptions() void GameController::OpenRenderOptions() { - RenderController * renderController = new RenderController(gameModel->GetRenderer()); - ui::Engine::Ref().ShowWindow(renderController->GetView()); + renderOptions = new RenderController(gameModel->GetRenderer()); + ui::Engine::Ref().ShowWindow(renderOptions->GetView()); } void GameController::OpenSaveWindow() diff --git a/src/game/GameController.h b/src/game/GameController.h index d7232d2..f945cce 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -7,6 +7,7 @@ #include "interface/Point.h" #include "simulation/Simulation.h" #include "search/SearchController.h" +#include "render/RenderController.h" #include "Menu.h" using namespace std; @@ -20,6 +21,7 @@ private: GameView * gameView; GameModel * gameModel; SearchController * search; + RenderController * renderOptions; public: GameController(); ~GameController(); -- cgit v0.9.2-21-gd62e From df72f2580f68a7d0055fcf20dcd65c0be90c52dd Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 23 Jan 2012 22:53:57 +0000 Subject: Better element buttons, Save preview WIP diff --git a/src/client/Client.cpp b/src/client/Client.cpp index ff6fb97..c2e82ea 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -39,6 +39,97 @@ Client::~Client() http_done(); } +Save * Client::GetSave(int saveID, int saveDate) +{ + lastError = ""; + std::stringstream urlStream; + urlStream << "http://" << SERVER << "/Browse/View.json?ID=" << saveID; + if(saveDate) + { + urlStream << "&Date=" << saveDate; + } + char * data; + int dataStatus, dataLength; + //Save(int _id, int _votesUp, int _votesDown, string _userName, string _name, string description_, string date_, bool published_): + data = http_simple_get((char *)urlStream.str().c_str(), &dataStatus, &dataLength); + if(dataStatus == 200 && data) + { + try + { + std::istringstream dataStream(data); + json::Object objDocument; + json::Reader::Read(objDocument, dataStream); + + json::Number tempID = objDocument["ID"]; + json::Number tempScoreUp = objDocument["ScoreUp"]; + json::Number tempScoreDown = objDocument["ScoreDown"]; + json::String tempUsername = objDocument["Username"]; + json::String tempName = objDocument["Name"]; + json::String tempDescription = objDocument["Description"]; + json::String tempDate = objDocument["Date"]; + json::Boolean tempPublished = objDocument["Published"]; + return new Save( + tempID.Value(), + tempScoreUp.Value(), + tempScoreDown.Value(), + tempUsername.Value(), + tempName.Value(), + tempDescription.Value(), + tempDate.Value(), + tempPublished.Value() + ); + } + catch (json::Exception &e) + { + lastError = "Could not read response"; + return NULL; + } + } + else + { + lastError = http_ret_text(dataStatus); + } + return NULL; +} + +Thumbnail * Client::GetPreview(int saveID, int saveDate) +{ + std::stringstream urlStream; + urlStream << "http://" << SERVER << "/Get.api?Op=thumblarge&ID=" << saveID; + if(saveDate) + { + urlStream << "&Date=" << saveDate; + } + pixel * thumbData; + char * data; + int status, data_size, imgw, imgh; + data = http_simple_get((char *)urlStream.str().c_str(), &status, &data_size); + if (status == 200 && data) + { + thumbData = Graphics::ptif_unpack(data, data_size, &imgw, &imgh); + if(data) + { + free(data); + } + if(thumbData) + { + return new Thumbnail(saveID, saveDate, thumbData, ui::Point(imgw, imgh)); + } + else + { + return new Thumbnail(saveID, saveDate, (pixel *)malloc((128*128) * PIXELSIZE), ui::Point(128, 128)); + } + } + else + { + if(data) + { + free(data); + } + return new Thumbnail(saveID, saveDate, (pixel *)malloc((128*128) * PIXELSIZE), ui::Point(128, 128)); + } +} + std::vector * Client::SearchSaves(int start, int count, string query, string sort, int & resultCount) { lastError = ""; @@ -66,7 +157,7 @@ std::vector * Client::SearchSaves(int start, int count, string query, str { try { - std::istringstream dataStream(data); // missing comma! + std::istringstream dataStream(data); json::Object objDocument; json::Reader::Read(objDocument, dataStream); diff --git a/src/client/Client.h b/src/client/Client.h index 678b3e7..c974524 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -25,7 +25,9 @@ public: ~Client(); void ClearThumbnailRequests(); std::vector * SearchSaves(int start, int count, string query, string sort, int & resultCount); + Thumbnail * GetPreview(int saveID, int saveDate); Thumbnail * GetThumbnail(int saveID, int saveDate); + Save * GetSave(int saveID, int saveDate); std::string GetLastError() { return lastError; } }; diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 80965ce..f7e0682 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -2,6 +2,7 @@ #include "GameView.h" #include "interface/Window.h" #include "interface/Button.h" +#include "interface/Colour.h" GameView::GameView(): ui::Window(ui::Point(0, 0), ui::Point(XRES+BARSIZE, YRES+MENUSIZE)), @@ -246,6 +247,7 @@ void GameView::NotifyActiveToolChanged(GameModel * sender) void GameView::NotifyToolListChanged(GameModel * sender) { int currentX = XRES+BARSIZE-56; + int totalColour; for(int i = 0; i < menuButtons.size(); i++) { if(((MenuAction*)menuButtons[i]->GetActionCallback())->menu==sender->GetActiveMenu()) @@ -270,7 +272,22 @@ void GameView::NotifyToolListChanged(GameModel * sender) currentX -= 36; tempButton->SetTogglable(true); tempButton->SetActionCallback(new ToolAction(this, toolList[i])); - tempButton->SetBackgroundColour(toolList[i]->colRed, toolList[i]->colGreen, toolList[i]->colBlue); + + totalColour = toolList[i]->colRed + 3*toolList[i]->colGreen + 2*toolList[i]->colBlue; + + tempButton->SetBackgroundColour(ui::Colour(toolList[i]->colRed, toolList[i]->colGreen, toolList[i]->colBlue)); + if (totalColour<544) + { + tempButton->SetTextColour(ui::Colour(255, 255, 255)); + } + else + { + tempButton->SetTextColour(ui::Colour(0, 0, 0)); + } + tempButton->SetBorderColour(ui::Colour(0, 0, 0)); + tempButton->SetActiveBackgroundColour(ui::Colour(toolList[i]->colRed, toolList[i]->colGreen, toolList[i]->colBlue)); + tempButton->SetActiveBorderColour(ui::Colour(0, 0, 255)); + tempButton->SetAlignment(AlignCentre, AlignBottom); AddComponent(tempButton); toolButtons.push_back(tempButton); @@ -366,6 +383,7 @@ void GameView::OnKeyPress(int key, bool shift, bool ctrl, bool alt) { case ' ': c->SetPaused(); + break; } } diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 2694de5..782d89b 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -26,11 +26,10 @@ Button::Button(Window* parent_state, std::string buttonText): textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), textHAlign(AlignCentre), - Enabled(true), - colr(0), - colg(0), - colb(0) + Enabled(true) { + activeText = background = Colour(0, 0, 0); + text = activeBackground = border = activeBorder = Colour(255, 255, 255); TextPosition(); } @@ -45,11 +44,10 @@ Button::Button(Point position, Point size, std::string buttonText): textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), textHAlign(AlignCentre), - Enabled(true), - colr(0), - colg(0), - colb(0) + Enabled(true) { + activeText = background = Colour(0, 0, 0); + text = activeBackground = border = activeBorder = Colour(255, 255, 255); TextPosition(); } @@ -64,11 +62,10 @@ Button::Button(std::string buttonText): textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), textHAlign(AlignCentre), - Enabled(true), - colr(0), - colg(0), - colb(0) + Enabled(true) { + activeText = background = Colour(0, 0, 0); + text = activeBackground = border = activeBorder = Colour(255, 255, 255); TextPosition(); } @@ -137,17 +134,15 @@ void Button::Draw(const Point& screenPos) { if(isButtonDown || (isTogglable && toggle)) { - g->fillrect(Position.X-1, Position.Y-1, Size.X+2, Size.Y+2, 255, 255, 255, 255); - g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 0, 0, 0, 255); + g->fillrect(Position.X-1, Position.Y-1, Size.X+2, Size.Y+2, activeBackground.Red, activeBackground.Green, activeBackground.Blue, 255); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, activeBorder.Red, activeBorder.Green, activeBorder.Blue, 255); + g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, activeText.Red, activeText.Green, activeText.Blue, 255); } else { - if(isMouseInside) - g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 20, 20, 20, 255); - else - g->fillrect(Position.X, Position.Y, Size.X, Size.Y, colr, colg, colb, 255); - g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); - g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 255, 255, 255, 255); + g->fillrect(Position.X, Position.Y, Size.X, Size.Y, background.Red, background.Green, background.Blue, 255); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, border.Red, border.Green, border.Blue, 255); + g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, text.Red, text.Green, text.Blue, 255); } } else diff --git a/src/interface/Button.h b/src/interface/Button.h index bff54c9..fe4e9f9 100644 --- a/src/interface/Button.h +++ b/src/interface/Button.h @@ -11,6 +11,7 @@ #include #include "Misc.h" #include "Component.h" +#include "Colour.h" namespace ui { @@ -56,12 +57,22 @@ public: ButtonAction * GetActionCallback() { return actionCallback; } void TextPosition(); void SetText(std::string buttonText); + HorizontalAlignment GetHAlignment() { return textHAlign; } VerticalAlignment GetVAlignment() { return textVAlign; } void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign) { textHAlign = hAlign; textVAlign = vAlign; TextPosition(); } - void SetBackgroundColour(int colr, int colg, int colb) { this->colr = colr; this->colg = colg; this->colb = colb; } + + void SetBackgroundColour(Colour background) { this->background = background; } + void SetActiveBackgroundColour(Colour background) { this->activeBackground = background; } + void SetBorderColour(Colour border) { this->border = border; } + void SetActiveBorderColour(Colour border) { this->activeBorder = border; } + void SetTextColour(Colour text) { this->text = text; } + void SetActiveTextColour(Colour text) { this->activeText = text; } protected: - int colr, colg, colb; + Colour background, activeBackground; + Colour border, activeBorder; + Colour text, activeText; + bool isButtonDown, state, isMouseInside, isTogglable, toggle; ButtonAction * actionCallback; ui::Point textPosition; diff --git a/src/interface/Colour.h b/src/interface/Colour.h new file mode 100644 index 0000000..ad7d8a1 --- /dev/null +++ b/src/interface/Colour.h @@ -0,0 +1,20 @@ +#ifndef COLOUR_H +#define COLOUR_H + +namespace ui +{ +class Colour +{ +public: + unsigned char Red, Green, Blue; + Colour(unsigned char red, unsigned char green, unsigned char blue): + Red(red), Green(green), Blue(blue) + { + } + Colour() + { + } +}; +} + +#endif diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 85a6293..7eec6b5 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -21,7 +21,8 @@ Engine::Engine(): FpsLimit(60.0f), windows(stack()), lastBuffer(NULL), - prevBuffers(stack()) + prevBuffers(stack()), + windowTargetPosition(0, 0) { } @@ -53,6 +54,7 @@ void Engine::Exit() void Engine::ShowWindow(Window * window) { + windowOpenState = 0.0f; if(window->Position.X==-1) { window->Position.X = (width_-window->Size.X)/2; @@ -61,6 +63,11 @@ void Engine::ShowWindow(Window * window) { window->Position.Y = (height_-window->Size.Y)/2; } + /*if(window->Position.Y > 0) + { + windowTargetPosition = window->Position; + window->Position = Point(windowTargetPosition.X, height_); + }*/ if(state_) { if(lastBuffer) @@ -68,7 +75,6 @@ void Engine::ShowWindow(Window * window) prevBuffers.push(lastBuffer); } lastBuffer = (pixel*)malloc((width_ * height_) * PIXELSIZE); - g->fillrect(0, 0, width_, height_, 0, 0, 0, 100); memcpy(lastBuffer, g->vid, (width_ * height_) * PIXELSIZE); windows.push(state_); @@ -123,6 +129,24 @@ void Engine::Tick(float dt) if(state_ != NULL) state_->DoTick(dt); + + if(windowOpenState<1.0f) + { + if(lastBuffer) + { + pixel * vid = g->vid; + g->vid = lastBuffer; + g->fillrect(0, 0, width_, height_, 0, 0, 0, 5); + g->vid = vid; + + } + /*if(windowTargetPosition.Y < state_->Position.Y) + { + state_->Position.Y += windowTargetPosition.Y/20; + }*/ + windowOpenState += 0.05f*dt; + } + /*if(statequeued_ != NULL) { if(state_ != NULL) diff --git a/src/interface/Engine.h b/src/interface/Engine.h index a648119..8f599b7 100644 --- a/src/interface/Engine.h +++ b/src/interface/Engine.h @@ -59,6 +59,8 @@ namespace ui std::stack windows; //Window* statequeued_; Window* state_; + Point windowTargetPosition; + float windowOpenState; bool running_; diff --git a/src/interface/Window.cpp b/src/interface/Window.cpp index ca29be0..b399ab8 100644 --- a/src/interface/Window.cpp +++ b/src/interface/Window.cpp @@ -90,13 +90,14 @@ void Window::DoInitialized() void Window::DoDraw() { + OnDraw(); //draw for(int i = 0, sz = Components.size(); i < sz; ++i) if(Components[i]->Visible) { if(AllowExclusiveDrawing) { - Point scrpos(Components[i]->Position.X, Components[i]->Position.Y); + Point scrpos(Components[i]->Position.X + Position.X, Components[i]->Position.Y + Position.Y); Components[i]->Draw(scrpos); } else @@ -112,7 +113,6 @@ void Window::DoDraw() } } - OnDraw(); } void Window::DoTick(float dt) @@ -164,9 +164,11 @@ void Window::DoKeyRelease(int key, bool shift, bool ctrl, bool alt) OnKeyRelease(key, shift, ctrl, alt); } -void Window::DoMouseDown(int x, int y, unsigned button) +void Window::DoMouseDown(int x_, int y_, unsigned button) { //on mouse click + int x = x_ - Position.X; + int y = y_ - Position.Y; bool clickState = false; for(int i = Components.size() - 1; i > -1 ; --i) { @@ -192,12 +194,14 @@ void Window::DoMouseDown(int x, int y, unsigned button) Components[i]->OnMouseDown(x, y, button); } - OnMouseDown(x, y, button); + OnMouseDown(x_, y_, button); } -void Window::DoMouseMove(int x, int y, int dx, int dy) +void Window::DoMouseMove(int x_, int y_, int dx, int dy) { //on mouse move (if true, and inside) + int x = x_ - Position.X; + int y = y_ - Position.Y; for(int i = Components.size() - 1; i > -1 ; --i) { if(!Components[i]->Locked) @@ -239,11 +243,13 @@ void Window::DoMouseMove(int x, int y, int dx, int dy) } } - OnMouseMove(x, y, dx, dy); + OnMouseMove(x_, y_, dx, dy); } -void Window::DoMouseUp(int x, int y, unsigned button) +void Window::DoMouseUp(int x_, int y_, unsigned button) { + int x = x_ - Position.X; + int y = y_ - Position.Y; //on mouse unclick for(int i = Components.size() - 1; i >= 0 ; --i) { @@ -264,11 +270,13 @@ void Window::DoMouseUp(int x, int y, unsigned button) Components[i]->OnMouseUp(x, y, button); } - OnMouseUp(x, y, button); + OnMouseUp(x_, y_, button); } -void Window::DoMouseWheel(int x, int y, int d) +void Window::DoMouseWheel(int x_, int y_, int d) { + int x = x_ - Position.X; + int y = y_ - Position.Y; //on mouse wheel focused for(int i = Components.size() - 1; i >= 0 ; --i) { @@ -287,6 +295,6 @@ void Window::DoMouseWheel(int x, int y, int d) Components[i]->OnMouseWheel(x - Components[i]->Position.X, y - Components[i]->Position.Y, d); } - OnMouseWheel(x, y, d); + OnMouseWheel(x_, y_, d); } diff --git a/src/preview/PreviewController.cpp b/src/preview/PreviewController.cpp index 04c4dd6..ef5da4e 100644 --- a/src/preview/PreviewController.cpp +++ b/src/preview/PreviewController.cpp @@ -16,7 +16,7 @@ PreviewController::PreviewController(int saveID) { previewModel->AddObserver(previewView); previewView->AttachController(this); - previewModel->UpdateSave(saveID); + previewModel->UpdateSave(saveID, 0); } PreviewController::~PreviewController() { diff --git a/src/preview/PreviewModel.cpp b/src/preview/PreviewModel.cpp index bf51ff0..0e03490 100644 --- a/src/preview/PreviewModel.cpp +++ b/src/preview/PreviewModel.cpp @@ -6,21 +6,54 @@ */ #include "PreviewModel.h" +#include "client/Client.h" PreviewModel::PreviewModel(): - save(NULL) + save(NULL), + savePreview(NULL) { // TODO Auto-generated constructor stub } -void PreviewModel::UpdateSave(int saveID) +void PreviewModel::UpdateSave(int saveID, int saveDate) { + save = Client::Ref().GetSave(saveID, saveDate); + notifySaveChanged(); + savePreview = Client::Ref().GetPreview(saveID, saveDate); + notifyPreviewChanged(); +} + +Thumbnail * PreviewModel::GetPreview() +{ + return savePreview; +} +Save * PreviewModel::GetSave() +{ + return save; +} + +void PreviewModel::notifyPreviewChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyPreviewChanged(this); + } +} + +void PreviewModel::notifySaveChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifySaveChanged(this); + } } void PreviewModel::AddObserver(PreviewView * observer) { observers.push_back(observer); + observer->NotifyPreviewChanged(this); + observer->NotifySaveChanged(this); } PreviewModel::~PreviewModel() { diff --git a/src/preview/PreviewModel.h b/src/preview/PreviewModel.h index ba11390..764771a 100644 --- a/src/preview/PreviewModel.h +++ b/src/preview/PreviewModel.h @@ -11,6 +11,7 @@ #include #include "PreviewView.h" #include "search/Save.h" +#include "search/Thumbnail.h" using namespace std; @@ -18,10 +19,15 @@ class PreviewView; class PreviewModel { vector observers; Save * save; + Thumbnail * savePreview; + void notifyPreviewChanged(); + void notifySaveChanged(); public: PreviewModel(); + Thumbnail * GetPreview(); + Save * GetSave(); void AddObserver(PreviewView * observer); - void UpdateSave(int saveID); + void UpdateSave(int saveID, int saveDate); virtual ~PreviewModel(); }; diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index 886dd67..c37ebd2 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -8,22 +8,66 @@ #include "PreviewView.h" #include "interface/Point.h" #include "interface/Window.h" +#include "search/Thumbnail.h" PreviewView::PreviewView(): - ui::Window(ui::Point(-1, -1), ui::Point(200, 200)) + ui::Window(ui::Point(-1, -1), ui::Point((XRES/2)+200, (YRES/2)+150)), + savePreview(NULL) { // TODO Auto-generated constructor stub + openButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(100, 16), "Open"); + AddComponent(openButton); + saveNameLabel = new ui::Label(ui::Point(0, 0), ui::Point(50, 50), ""); + AddComponent(saveNameLabel); } void PreviewView::OnDraw() { Graphics * g = ui::Engine::Ref().g; + + //Window Background+Outline g->clearrect(Position.X-2, Position.Y-2, Size.X+4, Size.Y+4); g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); + + //Save preview (top-left) + if(savePreview && savePreview->Data) + { + g->draw_image(savePreview->Data, (Position.X+1)+(((XRES/2)-savePreview->Size.X)/2), (Position.Y+1)+(((YRES/2)-savePreview->Size.Y)/2), savePreview->Size.X, savePreview->Size.Y, 255); + } + g->drawrect(Position.X, Position.Y, XRES/2, YRES/2, 255, 255, 255, 100); +} + +void PreviewView::NotifySaveChanged(PreviewModel * sender) +{ + Save * save = sender->GetSave(); + if(save) + { + saveNameLabel->SetText(save->name); + } + else + { + saveNameLabel->SetText(""); + } +} + +void PreviewView::NotifyPreviewChanged(PreviewModel * sender) +{ + savePreview = sender->GetPreview(); + if(savePreview && savePreview->Data && !(savePreview->Size.X == XRES/2 && savePreview->Size.Y == YRES/2)) + { + int newSizeX, newSizeY; + float factorX = ((float)XRES/2)/((float)savePreview->Size.X); + float factorY = ((float)YRES/2)/((float)savePreview->Size.Y); + float scaleFactor = factorY < factorX ? factorY : factorX; + savePreview->Data = Graphics::resample_img(savePreview->Data, savePreview->Size.X, savePreview->Size.Y, savePreview->Size.X*scaleFactor, savePreview->Size.Y*scaleFactor); + savePreview->Size.X *= scaleFactor; + savePreview->Size.Y *= scaleFactor; + } } PreviewView::~PreviewView() { - // TODO Auto-generated destructor stub + delete openButton; + delete saveNameLabel; } diff --git a/src/preview/PreviewView.h b/src/preview/PreviewView.h index 728d547..616bffc 100644 --- a/src/preview/PreviewView.h +++ b/src/preview/PreviewView.h @@ -9,13 +9,23 @@ #define PREVIEWVIEW_H_ #include "interface/Window.h" #include "preview/PreviewController.h" +#include "preview/PreviewModel.h" +#include "interface/Button.h" +#include "search/Thumbnail.h" +#include "interface/Label.h" +class PreviewModel; class PreviewController; class PreviewView: public ui::Window { PreviewController * c; + Thumbnail * savePreview; + ui::Button * openButton; + ui::Label * saveNameLabel; public: void AttachController(PreviewController * controller) { c = controller;} PreviewView(); + void NotifyPreviewChanged(PreviewModel * sender); + void NotifySaveChanged(PreviewModel * sender); virtual void OnDraw(); virtual ~PreviewView(); }; diff --git a/src/search/Save.h b/src/search/Save.h index 91a1ec4..0a011ab 100644 --- a/src/search/Save.h +++ b/src/search/Save.h @@ -10,19 +10,40 @@ class Save private: int id; int votesUp, votesDown; + unsigned char * data; public: Save(int _id, int _votesUp, int _votesDown, string _userName, string _name): id(_id), votesUp(_votesUp), votesDown(_votesDown), userName(_userName), - name(_name) + name(_name), + Description("No description provided"), + Date("0/0/0"), + Published(true) + { + } + + Save(int _id, int _votesUp, int _votesDown, string _userName, string _name, string description_, string date_, bool published_): + id(_id), + votesUp(_votesUp), + votesDown(_votesDown), + userName(_userName), + name(_name), + Description(description_), + Date(date_), + Published(published_) { } string userName; string name; + string Description; + string Date; + + bool Published; + void SetName(string name){ this->name = name; } string GetName(){ return name; } @@ -37,6 +58,8 @@ public: void SetVotesDown(int votesDown){ this->votesDown = votesDown; } int GetVotesDown(){ return votesDown; } + + unsigned char * GetData() { return data; } }; #endif // SAVE_H -- cgit v0.9.2-21-gd62e From 04488081d3fa0cd3dfb2939e5d902bc894df150d Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 23 Jan 2012 22:59:35 +0000 Subject: Save name label position and alignment diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index c37ebd2..9d76fe7 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -18,7 +18,8 @@ PreviewView::PreviewView(): openButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(100, 16), "Open"); AddComponent(openButton); - saveNameLabel = new ui::Label(ui::Point(0, 0), ui::Point(50, 50), ""); + saveNameLabel = new ui::Label(ui::Point(5, (YRES/2)+5), ui::Point(100, 16), ""); + saveNameLabel->SetAlignment(AlignLeft, AlignBottom); AddComponent(saveNameLabel); } -- cgit v0.9.2-21-gd62e From 97b35bc47059315d4138c8e0827842d2c03de152 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 24 Jan 2012 20:19:19 +0000 Subject: Various diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 2918a05..0d3c75c 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -61,7 +61,7 @@ SDL_Surface * SDLOpen() int main(int argc, char * argv[]) { int elapsedTime = 0, currentTime = 0, lastTime = 0, currentFrame = 0; - float fps = 0, fpsLimit = 30, delta = 1.0f; + float fps = 0, delta = 1.0f; ui::Engine::Ref().g = new Graphics(); ui::Engine::Ref().g->AttachSDLSurface(SDLOpen()); @@ -119,7 +119,7 @@ int main(int argc, char * argv[]) currentFrame++; currentTime = SDL_GetTicks(); elapsedTime = currentTime - lastTime; - if((currentFrame>2 || elapsedTime > 1000*2/ui::Engine::Ref().FpsLimit) && elapsedTime && currentFrame*1000/elapsedTime > ui::Engine::Ref().FpsLimit) + if(ui::Engine::Ref().FpsLimit > 2.0f && (currentFrame>2 || elapsedTime > 1000*2/ui::Engine::Ref().FpsLimit) && elapsedTime && currentFrame*1000/elapsedTime > ui::Engine::Ref().FpsLimit) { while (currentFrame*1000/elapsedTime > ui::Engine::Ref().FpsLimit) { diff --git a/src/client/Client.cpp b/src/client/Client.cpp index c2e82ea..94c3dbc 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -20,7 +20,7 @@ Client::Client() { int i = 0; - http_init(NULL); + http_init("wwwcache.lancs.ac.uk:8080"); for(i = 0; i < THUMB_CACHE_SIZE; i++) { thumbnailCache[i] = NULL; @@ -39,6 +39,41 @@ Client::~Client() http_done(); } +LoginStatus Client::Login(string username, string password) +{ + std::stringstream urlStream; + char * data; + int dataStatus, dataLength; + data = http_auth_get("http://" SERVER "/Login.json", (char*)username.c_str(), (char*)password.c_str(), NULL, &dataStatus, &dataLength); + std::cout << data << std::endl; + if(dataStatus == 200 && data) + { + std::istringstream dataStream(data); + json::Object objDocument; + json::Reader::Read(objDocument, dataStream); + json::Number tempStatus = objDocument["Status"]; + + free(data); + if(tempStatus.Value() == 1) + { + return LoginOkay; + } + else if(tempStatus.Value() == 0) + { + return LoginPasswordInvalid; + } + else + { + return LoginError; + } + } + if(data) + { + free(data); + } + return LoginError; +} + Save * Client::GetSave(int saveID, int saveDate) { lastError = ""; diff --git a/src/client/Client.h b/src/client/Client.h index c974524..644fb06 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -10,6 +10,11 @@ #include "search/Save.h" #include "Singleton.h" +enum LoginStatus +{ + LoginPasswordInvalid, LoginUsernameInvalid, LoginOkay, LoginBanned, LoginError +}; + class Client: public Singleton { private: @@ -23,6 +28,7 @@ private: public: Client(); ~Client(); + LoginStatus Login(string username, string password); void ClearThumbnailRequests(); std::vector * SearchSaves(int start, int count, string query, string sort, int & resultCount); Thumbnail * GetPreview(int saveID, int saveDate); diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index b79da06..5358c4b 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -6,6 +6,7 @@ #include "GameModel.h" #include "search/SearchController.h" #include "render/RenderController.h" +#include "login/LoginController.h" #include "interface/Point.h" using namespace std; @@ -126,7 +127,8 @@ void GameController::OpenSearch() void GameController::OpenLogin() { - //TODO: Implement + loginWindow = new LoginController(); + ui::Engine::Ref().ShowWindow(loginWindow->GetView()); } void GameController::OpenTags() diff --git a/src/game/GameController.h b/src/game/GameController.h index f945cce..67afdc4 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -8,6 +8,7 @@ #include "simulation/Simulation.h" #include "search/SearchController.h" #include "render/RenderController.h" +#include "login/LoginController.h" #include "Menu.h" using namespace std; @@ -22,6 +23,7 @@ private: GameModel * gameModel; SearchController * search; RenderController * renderOptions; + LoginController * loginWindow; public: GameController(); ~GameController(); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 91b1c8d..8f16f49 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -19,12 +19,12 @@ GameModel::GameModel(): menuList.clear(); for(int i = 0; i < 12; i++) { - menuList.push_back(new Menu('q', "Simon")); + menuList.push_back(new Menu((const char)sim->msections[i].icon[0], sim->msections[i].name)); } //Build menus from Simulation elements for(int i = 0; i < PT_NUM; i++) { - if(sim->ptypes[i].menusection < 12) + if(sim->ptypes[i].menusection < 12 && sim->ptypes[i].enabled && sim->ptypes[i].menu) { Tool * tempTool = new ElementTool(i, sim->ptypes[i].name, PIXR(sim->ptypes[i].pcolors), PIXG(sim->ptypes[i].pcolors), PIXB(sim->ptypes[i].pcolors)); menuList[sim->ptypes[i].menusection]->AddTool(tempTool); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index f7e0682..8438e1b 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -9,7 +9,8 @@ GameView::GameView(): pointQueue(queue()), isMouseDown(false), ren(NULL), - activeBrush(NULL) + activeBrush(NULL), + currentMouse(0, 0) { int currentX = 1; //Set up UI @@ -344,6 +345,7 @@ void GameView::NotifyBrushChanged(GameModel * sender) void GameView::OnMouseMove(int x, int y, int dx, int dy) { + currentMouse = ui::Point(x, y); if(isMouseDown) { pointQueue.push(new ui::Point(x-dx, y-dy)); @@ -353,8 +355,11 @@ void GameView::OnMouseMove(int x, int y, int dx, int dy) void GameView::OnMouseDown(int x, int y, unsigned button) { - isMouseDown = true; - pointQueue.push(new ui::Point(x, y)); + if(currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) + { + isMouseDown = true; + pointQueue.push(new ui::Point(x, y)); + } } void GameView::OnMouseUp(int x, int y, unsigned button) @@ -389,6 +394,10 @@ void GameView::OnKeyPress(int key, bool shift, bool ctrl, bool alt) void GameView::OnTick(float dt) { + if(isMouseDown) + { + pointQueue.push(new ui::Point(currentMouse)); + } if(!pointQueue.empty()) { c->DrawPoints(pointQueue); @@ -404,8 +413,8 @@ void GameView::OnDraw() ren->render_fire(); ren->render_signs(); } - if(activeBrush) + if(activeBrush && currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) { - activeBrush->Render(ui::Engine::Ref().g, ui::Point(ui::Engine::Ref().GetMouseX(),ui::Engine::Ref().GetMouseY())); + activeBrush->Render(ui::Engine::Ref().g, currentMouse); } } diff --git a/src/game/GameView.h b/src/game/GameView.h index 3881795..ef35536 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -36,6 +36,7 @@ private: ui::Button * simulationOptionButton; ui::Button * displayModeButton; ui::Button * pauseButton; + ui::Point currentMouse; public: GameView(); void AttachController(GameController * _c){ c = _c; } diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 7eec6b5..a505635 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -18,7 +18,7 @@ Engine::Engine(): mousey_(0), mousexp_(0), mouseyp_(0), - FpsLimit(60.0f), + FpsLimit(0.0f), windows(stack()), lastBuffer(NULL), prevBuffers(stack()), diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp index f087241..380ad59 100644 --- a/src/interface/Textbox.cpp +++ b/src/interface/Textbox.cpp @@ -14,7 +14,8 @@ Textbox::Textbox(Window* parent_state, std::string textboxText): textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), textHAlign(AlignCentre), - actionCallback(NULL) + actionCallback(NULL), + masked(false) { TextPosition(); cursor = text.length(); @@ -26,7 +27,8 @@ Textbox::Textbox(Point position, Point size, std::string textboxText): textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), textHAlign(AlignCentre), - actionCallback(NULL) + actionCallback(NULL), + masked(false) { TextPosition(); cursor = text.length(); @@ -38,7 +40,8 @@ Textbox::Textbox(std::string textboxText): textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), textHAlign(AlignCentre), - actionCallback(NULL) + actionCallback(NULL), + masked(false) { TextPosition(); cursor = text.length(); @@ -189,5 +192,15 @@ void Textbox::Draw(const Point& screenPos) { g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 160, 160, 160, 255); } - g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, text, 255, 255, 255, 255); + if(masked) + { + char tempText[text.length()]; + memset(tempText, 'a', text.length()); + tempText[text.length()] = 0; + g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, tempText, 255, 255, 255, 255); + } + else + { + g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, text, 255, 255, 255, 255); + } } diff --git a/src/interface/Textbox.h b/src/interface/Textbox.h index 099368f..82ed648 100644 --- a/src/interface/Textbox.h +++ b/src/interface/Textbox.h @@ -23,6 +23,7 @@ class Textbox : public Component VerticalAlignment textVAlign; int cursor, cursorPosition; TextboxAction *actionCallback; + bool masked; public: Textbox(Window* parent_state, std::string textboxText); Textbox(Point position, Point size, std::string textboxText); @@ -38,6 +39,9 @@ public: void SetActionCallback(TextboxAction * action) { actionCallback = action; } virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + void SetHidden(bool hidden) { masked = hidden; } + bool GetHidden() { return masked; } + virtual void Draw(const Point& screenPos); }; } diff --git a/src/login/LoginController.cpp b/src/login/LoginController.cpp new file mode 100644 index 0000000..3172398 --- /dev/null +++ b/src/login/LoginController.cpp @@ -0,0 +1,28 @@ +/* + * LoginController.cpp + * + * Created on: Jan 24, 2012 + * Author: Simon + */ + +#include "LoginController.h" + +LoginController::LoginController() { + // TODO Auto-generated constructor stub + loginView = new LoginView(); + loginModel = new LoginModel(); + + loginView->AttachController(this); + loginModel->AddObserver(loginView); + +} + +void LoginController::Login(string username, string password) +{ + loginModel->Login(username, password); +} + +LoginController::~LoginController() { + // TODO Auto-generated destructor stub +} + diff --git a/src/login/LoginController.h b/src/login/LoginController.h new file mode 100644 index 0000000..ecd30a3 --- /dev/null +++ b/src/login/LoginController.h @@ -0,0 +1,30 @@ +/* + * LoginController.h + * + * Created on: Jan 24, 2012 + * Author: Simon + */ + +#ifndef LOGINCONTROLLER_H_ +#define LOGINCONTROLLER_H_ + +#include +#include "LoginView.h" +#include "LoginModel.h" + +using namespace std; + +class LoginView; +class LoginModel; +class LoginController { + LoginView * loginView; + LoginModel * loginModel; +public: + LoginController(); + void Login(string username, string password); + LoginView * GetView() { return loginView; } + + virtual ~LoginController(); +}; + +#endif /* LOGINCONTROLLER_H_ */ diff --git a/src/login/LoginModel.cpp b/src/login/LoginModel.cpp new file mode 100644 index 0000000..7940cf0 --- /dev/null +++ b/src/login/LoginModel.cpp @@ -0,0 +1,69 @@ +/* + * LoginModel.cpp + * + * Created on: Jan 24, 2012 + * Author: Simon + */ + +#include "LoginModel.h" + +LoginModel::LoginModel() { + // TODO Auto-generated constructor stub + +} + +void LoginModel::Login(string username, string password) +{ + statusText = "Logging in..."; + loginStatus = false; + notifyStatusChanged(); + LoginStatus status = Client::Ref().Login(username, password); + switch(status) + { + case LoginOkay: + statusText = "Logged in"; + loginStatus = true; + break; + case LoginPasswordInvalid: + statusText = "Username or Password incorrect"; + break; + case LoginUsernameInvalid: + statusText = "Username incorrect"; + break; + case LoginBanned: + statusText = "Banned: " + Client::Ref().GetLastError(); + break; + default: + statusText = "Error"; + break; + } + notifyStatusChanged(); +} + +void LoginModel::AddObserver(LoginView * observer) +{ + observers.push_back(observer); +} + +string LoginModel::GetStatusText() +{ + return statusText; +} + +bool LoginModel::GetStatus() +{ + return loginStatus; +} + +void LoginModel::notifyStatusChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyStatusChanged(this); + } +} + +LoginModel::~LoginModel() { + // TODO Auto-generated destructor stub +} + diff --git a/src/login/LoginModel.h b/src/login/LoginModel.h new file mode 100644 index 0000000..cd10a5d --- /dev/null +++ b/src/login/LoginModel.h @@ -0,0 +1,33 @@ +/* + * LoginModel.h + * + * Created on: Jan 24, 2012 + * Author: Simon + */ + +#ifndef LOGINMODEL_H_ +#define LOGINMODEL_H_ + +#include +#include +#include "LoginView.h" +#include "client/Client.h" + +using namespace std; + +class LoginView; +class LoginModel { + vector observers; + string statusText; + bool loginStatus; + void notifyStatusChanged(); +public: + LoginModel(); + void Login(string username, string password); + void AddObserver(LoginView * observer); + string GetStatusText(); + bool GetStatus(); + virtual ~LoginModel(); +}; + +#endif /* LOGINMODEL_H_ */ diff --git a/src/login/LoginView.cpp b/src/login/LoginView.cpp new file mode 100644 index 0000000..bb88c15 --- /dev/null +++ b/src/login/LoginView.cpp @@ -0,0 +1,72 @@ +/* + * LoginView.cpp + * + * Created on: Jan 24, 2012 + * Author: Simon + */ + +#include "LoginView.h" + +class LoginView::LoginAction : public ui::ButtonAction +{ + LoginView * v; +public: + LoginAction(LoginView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->Login(v->usernameField->GetText(), v->passwordField->GetText()); + } +}; + +LoginView::LoginView(): + ui::Window(ui::Point(-1, -1), ui::Point(200, 100)), + loginButton(new ui::Button(ui::Point(200-50, 100-16), ui::Point(50, 16), "Login")), + cancelButton(new ui::Button(ui::Point(0, 100-16), ui::Point(50, 16), "Cancel")), + titleLabel(new ui::Label(ui::Point(4, 2), ui::Point(200-16, 16), "Server login")), + usernameField(new ui::Textbox(ui::Point(8, 20), ui::Point(200-16, 16), "")), + passwordField(new ui::Textbox(ui::Point(8, 40), ui::Point(200-16, 16), "")), + infoLabel(new ui::Label(ui::Point(8, 60), ui::Point(200-16, 16), "")) +{ + AddComponent(loginButton); + loginButton->SetAlignment(AlignCentre, AlignBottom); + loginButton->SetActionCallback(new LoginAction(this)); + AddComponent(cancelButton); + cancelButton->SetAlignment(AlignCentre, AlignBottom); + AddComponent(titleLabel); + titleLabel->SetAlignment(AlignLeft, AlignBottom); + AddComponent(usernameField); + usernameField->SetAlignment(AlignLeft, AlignBottom); + AddComponent(passwordField); + passwordField->SetAlignment(AlignLeft, AlignBottom); + passwordField->SetHidden(true); + infoLabel->SetAlignment(AlignCentre, AlignBottom); + AddComponent(infoLabel); +} + +void LoginView::NotifyStatusChanged(LoginModel * sender) +{ + infoLabel->SetText(sender->GetStatusText()); +} + +void LoginView::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + g->clearrect(Position.X-2, Position.Y-2, Size.X+3, Size.Y+3); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); +} + +LoginView::~LoginView() { + RemoveComponent(titleLabel); + RemoveComponent(loginButton); + RemoveComponent(cancelButton); + RemoveComponent(usernameField); + RemoveComponent(passwordField); + RemoveComponent(infoLabel); + delete cancelButton; + delete loginButton; + delete titleLabel; + delete usernameField; + delete passwordField; + delete infoLabel; +} + diff --git a/src/login/LoginView.h b/src/login/LoginView.h new file mode 100644 index 0000000..2646e99 --- /dev/null +++ b/src/login/LoginView.h @@ -0,0 +1,37 @@ +/* + * LoginView.h + * + * Created on: Jan 24, 2012 + * Author: Simon + */ + +#ifndef LOGINVIEW_H_ +#define LOGINVIEW_H_ + +#include "interface/Button.h" +#include "interface/Window.h" +#include "interface/Label.h" +#include "interface/Textbox.h" +#include "LoginController.h" +#include "LoginModel.h" + +class LoginController; +class LoginMode; +class LoginView: public ui::Window { + LoginController * c; + ui::Button * loginButton; + ui::Button * cancelButton; + ui::Label * titleLabel; + ui::Label * infoLabel; + ui::Textbox * usernameField; + ui::Textbox * passwordField; +public: + class LoginAction; + LoginView(); + void AttachController(LoginController * c_) { c = c_; } + void NotifyStatusChanged(LoginModel * sender); + virtual void OnDraw(); + virtual ~LoginView(); +}; + +#endif /* LOGINVIEW_H_ */ diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index cd10def..e938efd 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3182,370 +3182,17 @@ Simulation::Simulation(): signs = (sign*)calloc(MAXSIGNS, sizeof(sign)); - //ptypes[0] = {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, 0, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}; - //ptypes[1] = {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, 0, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}; - //ptypes[2] = {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, 0, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}; - -#define SC_WALL 0 -#define SC_ELEC 1 -#define SC_POWERED 2 -#define SC_EXPLOSIVE 3 -#define SC_GAS 4 -#define SC_LIQUID 5 -#define SC_POWDERS 6 -#define SC_SOLIDS 7 -#define SC_NUCLEAR 8 -#define SC_SPECIAL 9 -#define SC_LIFE 10 -#define SC_TOOL 11 -#define SC_CRACKER 13 -#define SC_CRACKER2 14 -#define SC_TOTAL 12 - - part_type ptypest[PT_NUM] = - { - //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description - {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}, - {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}, - {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}, - {"OIL", PIXPACK(0x404010), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 20, 0, 0, 5, 1, 1, 20, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Flammable.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"FIRE", PIXPACK(0xFF1000), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, R_TEMP+400.0f+273.15f, 88, "Ignites flammable materials. Heats air.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_FIRE}, - {"STNE", PIXPACK(0xA0A0A0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Heavy particles. Meltable.", ST_SOLID, TYPE_PART, NULL, NULL}, - {"LAVA", PIXPACK(0xE05010), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.0003f * CFDS, 2, 0, 0, 0, 2, 1, 1, 45, SC_LIQUID, R_TEMP+1500.0f+273.15f, 60, "Heavy liquid. Ignites flammable materials. Solidifies when cold.", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC, &update_PYRO, &graphics_LAVA}, - {"GUN", PIXPACK(0xC0C0D0), 0.7f, 0.02f * CFDS, 0.94f, 0.80f, -0.1f, 0.1f, 0.00f, 0.000f * CFDS, 1, 600, 1, 0, 10, 1, 1, 85, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 97, "Light dust. Explosive.", ST_SOLID, TYPE_PART, NULL, NULL}, - {"NITR", PIXPACK(0x20E010), 0.5f, 0.02f * CFDS, 0.92f, 0.97f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 2, 1000, 2, 0, 3, 1, 1, 23, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 50, "Liquid. Pressure sensitive explosive.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"CLNE", PIXPACK(0xFFD010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Solid. Duplicates any particles it touches.", ST_SOLID, TYPE_SOLID, &update_CLNE, NULL}, - {"GAS", PIXPACK(0xE0FF20), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 600, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Gas. Diffuses. Flammable. Liquefies under pressure.", ST_GAS, TYPE_GAS, NULL, NULL}, - {"C-4", PIXPACK(0xD080E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 2, 50, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Solid. Pressure sensitive explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, NULL, NULL}, - {"GOO", PIXPACK(0x804000), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 75, "Solid. Deforms and disappears under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GOO, NULL}, - {"ICE", PIXPACK(0xA0C0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP-50.0f+273.15f, 46, "Solid. Freezes water. Crushes under pressure. Cools down air.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ICEI, NULL}, - {"METL", PIXPACK(0x404060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Conducts electricity. Meltable.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, - {"SPRK", PIXPACK(0xFFFF80), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electricity. Conducted by metal and water.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SPRK, &graphics_SPRK}, - {"SNOW", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f, -0.00005f* CFDS,1, 0, 0, 0, 20, 1, 1, 50, SC_POWDERS, R_TEMP-30.0f+273.15f, 46, "Light particles.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_ICEI, NULL}, - {"WOOD", PIXPACK(0xC0A040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 15, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Solid. Flammable.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, NULL, NULL}, - {"NEUT", PIXPACK(0x20E0FF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 60, "Neutrons. Interact with matter in odd ways.", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_NEUT, &graphics_NEUT}, - {"PLUT", PIXPACK(0x407020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 251, "Heavy particles. Fissile. Generates neutrons under pressure.", ST_SOLID, TYPE_PART|PROP_NEUTPENETRATE|PROP_RADIOACTIVE, &update_PLUT, NULL}, - {"PLNT", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 65, "Plant, drinks water and grows.", ST_SOLID, TYPE_SOLID|PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_PLNT, NULL}, - {"ACID", PIXPACK(0xED55FF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 40, 0, 0, 1, 1, 1, 10, SC_LIQUID, R_TEMP+0.0f +273.15f, 34, "Dissolves almost everything.", ST_LIQUID, TYPE_LIQUID|PROP_DEADLY, &update_ACID, &graphics_ACID}, - {"VOID", PIXPACK(0x790B0B), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Hole, will drain away any particles.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"WTRV", PIXPACK(0xA0A0FF), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, -0.1f, 0.75f, 0.0003f * CFDS, 0, 0, 0, 0, 4, 1, 1, 1, SC_GAS, R_TEMP+100.0f+273.15f, 48, "Steam, heats up air, produced from hot water.", ST_GAS, TYPE_GAS, &update_WTRV, NULL}, - {"CNCT", PIXPACK(0xC0C0C0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 100, "Concrete, stronger than stone.", ST_SOLID, TYPE_PART|PROP_HOT_GLOW, NULL, NULL}, - {"DSTW", PIXPACK(0x1020C0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 23, "Distilled water, does not conduct electricity.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_DSTW, NULL}, - {"SALT", PIXPACK(0xFFFFFF), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 75, SC_POWDERS, R_TEMP+0.0f +273.15f, 110, "Salt, dissolves in water.", ST_SOLID, TYPE_PART, NULL, NULL}, - {"SLTW", PIXPACK(0x4050F0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP+0.0f +273.15f, 75, "Saltwater, conducts electricity, difficult to freeze.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_SLTW, NULL}, - {"DMND", PIXPACK(0xCCFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 186, "Diamond. Indestructible.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"BMTL", PIXPACK(0x505070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Breakable metal.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_BMTL, NULL}, - {"BRMT", PIXPACK(0x705060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken metal.", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_BRMT, NULL}, - {"PHOT", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+900.0f+273.15f, 251, "Photons. Travel in straight lines.", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_PHOT, &graphics_PHOT}, - {"URAN", PIXPACK(0x707020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_NUCLEAR, R_TEMP+30.0f+273.15f, 251, "Heavy particles. Generates heat under pressure.", ST_SOLID, TYPE_PART | PROP_RADIOACTIVE, &update_URAN, NULL}, - {"WAX", PIXPACK(0xF0F0BB), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 44, "Wax. Melts at moderately high temperatures.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"MWAX", PIXPACK(0xE0E0AA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 5, 0, 0, 2, 1, 1, 25, SC_LIQUID, R_TEMP+28.0f+273.15f, 44, "Liquid Wax.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"PSCN", PIXPACK(0x805050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "P-Type Silicon, Will transfer current to any conductor.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"NSCN", PIXPACK(0x505080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "N-Type Silicon, Will not transfer current to P-Type Silicon.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"LN2", PIXPACK(0x80A0DF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 1, 30, SC_LIQUID, 70.15f, 70, "Liquid Nitrogen. Very cold.", ST_SOLID, TYPE_LIQUID, NULL, NULL}, - {"INSL", PIXPACK(0x9EA3B6), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 7, 0, 0, 10, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Insulator, does not conduct heat or electricity.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"VACU", PIXPACK(0x303030), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, -0.01f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+70.0f+273.15f, 255, "Vacuum, sucks in other particles and heats up.", ST_NONE, TYPE_SOLID, NULL, NULL}, - {"VENT", PIXPACK(0xEFEFEF), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.010f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP-16.0f+273.15f, 255, "Air vent, creates pressure and pushes other particles away.", ST_NONE, TYPE_SOLID, NULL, NULL}, - {"RBDM", PIXPACK(0xCCCCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 1, 50, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 240, "Rubidium, explosive, especially on contact with water, low melting point", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"LRBD", PIXPACK(0xAAAAAA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 1000, 1, 0, 2, 1, 1, 45, SC_EXPLOSIVE, R_TEMP+45.0f+273.15f, 170, "Liquid Rubidium.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"NTCT", PIXPACK(0x505040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when hot (More than 100C)", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NPTCT, NULL}, - {"SAND", PIXPACK(0xFFD090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Sand, Heavy particles. Meltable.", ST_SOLID, TYPE_PART, NULL, NULL}, - {"GLAS", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 150, "Solid. Meltable. Shatters under pressure", ST_SOLID, TYPE_SOLID | PROP_NEUTPASS | PROP_HOT_GLOW | PROP_SPARKSETTLE, &update_GLAS, NULL}, - {"PTCT", PIXPACK(0x405050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when cold (Less than 100C)", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NPTCT, NULL}, - {"BGLA", PIXPACK(0x606060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Glass, Heavy particles. Meltable. Bagels.", ST_SOLID, TYPE_PART | PROP_HOT_GLOW, NULL, NULL}, - {"THDR", PIXPACK(0xFFFFA0), 0.0f, 0.00f * CFDS, 1.0f, 0.30f, -0.99f, 0.6f, 0.62f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_EXPLOSIVE, 9000.0f +273.15f, 1, "Lightning! Very hot, inflicts damage upon most materials, transfers current to metals.", ST_NONE, TYPE_ENERGY, &update_THDR, &graphics_THDR}, - {"PLSM", PIXPACK(0xBB99FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.30f, 0.001f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, 10000.0f +273.15f, 5, "Plasma, extremely hot.", ST_NONE, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_PLSM}, - {"ETRD", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)", ST_NONE, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"NICE", PIXPACK(0xC0E0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 35.0f, 46, "Nitrogen Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"NBLE", PIXPACK(0xEB4917), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 106, "Noble Gas. Diffuses. Conductive. Ionizes into plasma when introduced to electricity", ST_GAS, TYPE_GAS|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"BTRY", PIXPACK(0x858505), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Generates Electricity.", ST_SOLID, TYPE_SOLID, &update_BTRY, NULL}, - {"LCRY", PIXPACK(0x505050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)", ST_SOLID, TYPE_SOLID, &update_LCRY, &graphics_LCRY}, - {"STKM", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM, &graphics_STKM}, - {"SWCH", PIXPACK(0x103B11), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Only conducts when switched on. (PSCN switches on, NSCN switches off)", ST_SOLID, TYPE_SOLID, &update_SWCH, &graphics_SWCH}, - {"SMKE", PIXPACK(0x222222), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+320.0f+273.15f, 88, "Smoke", ST_SOLID, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_SMKE}, - {"DESL", PIXPACK(0x440000), 1.0f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.0f, 0.0f * CFDS, 2, 2, 0, 0, 5, 1, 1, 15, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Explodes under high pressure and temperatures", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"COAL", PIXPACK(0x222222), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly.", ST_SOLID, TYPE_SOLID, &update_COAL, &graphics_COAL}, - {"LOXY", PIXPACK(0x80A0EF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 5000, 0, 0, 0, 1, 1, 30, SC_LIQUID, 80.0f, 70, "Liquid Oxygen. Very cold. Reacts with fire", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"OXYG", PIXPACK(0x80A0FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 3.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Gas. Ignites easily.", ST_GAS, TYPE_GAS, &update_O2, NULL}, - {"INWR", PIXPACK(0x544141), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Insulated Wire. Doesn't conduct to metal or semiconductors.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, - {"YEST", PIXPACK(0xEEE0C0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 15, 0, 0, 30, 1, 1, 80, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Yeast, grows when warm (~37C).", ST_SOLID, TYPE_PART, &update_YEST, NULL}, - {"DYST", PIXPACK(0xBBB0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 20, 0, 0, 30, 0, 1, 80, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Dead Yeast.", ST_SOLID, TYPE_PART, NULL, NULL}, - {"THRM", PIXPACK(0xA08090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 211, "Thermite. Burns at extremely high temperature.", ST_SOLID, TYPE_PART, &update_THRM, NULL}, - {"GLOW", PIXPACK(0x445464), 0.3f, 0.02f * CFDS, 0.98f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 2, 1, 1, 40, SC_LIQUID, R_TEMP+20.0f+273.15f, 44, "Glow, Glows under pressure", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC, &update_GLOW, &graphics_GLOW}, - {"BRCK", PIXPACK(0x808080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Brick, breakable building material.", ST_SOLID, TYPE_SOLID|PROP_HOT_GLOW, NULL, NULL}, - {"CFLM", PIXPACK(0x8080FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.0005f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, 0.0f, 88, "Sub-zero flame.", ST_LIQUID, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, NULL, &graphics_HFLM}, - {"FIRW", PIXPACK(0xFFA040), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, -0.99f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 55, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 70, "Fireworks!", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_FIRW, &graphics_FIRW}, - {"FUSE", PIXPACK(0x0A5706), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly. Ignites at somewhat high temperatures and electricity.", ST_SOLID, TYPE_SOLID, &update_FUSE, NULL}, - {"FSEP", PIXPACK(0x63AD5F), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 70, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Fuse Powder. See FUSE.", ST_SOLID, TYPE_PART, &update_FSEP, NULL}, - {"AMTR", PIXPACK(0x808080), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.00f, 0.10f, 1.00f, 0.0000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Anti-Matter, Destroys a majority of particles", ST_NONE, TYPE_PART, &update_AMTR, NULL}, //Maybe TYPE_ENERGY? - {"BCOL", PIXPACK(0x333333), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Coal. Heavy particles. See COAL", ST_SOLID, TYPE_PART, &update_BCOL, NULL}, - {"PCLN", PIXPACK(0x3B3B0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, duplicates any particles it touches.", ST_NONE, TYPE_SOLID, &update_PCLN, &graphics_PCLN}, - {"HSWC", PIXPACK(0x3B0A0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Heat switch. Conducts Heat only when activated", ST_NONE, TYPE_SOLID, &update_HSWC, &graphics_HSWC}, - {"IRON", PIXPACK(0x707070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 50, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Rusts with salt, can be used for electrolysis of WATR", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_IRON, NULL}, - {"MORT", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_CRACKER2, R_TEMP+4.0f +273.15f, 60, "Steam Train.", ST_NONE, TYPE_PART, &update_MORT, NULL}, - {"LIFE", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 1, 100, SC_LIFE, 9000.0f, 40, "Game Of Life! B3/S23", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, &graphics_LIFE}, - {"DLAY", PIXPACK(0x753590), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, 4.0f+273.15f, 0, "Conducts with temperature-dependent delay. (use HEAT/COOL).", ST_SOLID, TYPE_SOLID, &update_DLAY, &graphics_DLAY}, - {"CO2", PIXPACK(0x666666), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.1f, 1.0f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+273.15f, 88, "Carbon Dioxide", ST_GAS, TYPE_GAS, &update_CO2, NULL}, - {"DRIC", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 172.65f, 2, "Dry Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"BUBW", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Carbonated water. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_CBNW, &graphics_CBNW}, - {"STOR", PIXPACK(0x50DFDF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. Stores a single particle, releases when charged with PSCN, also passes to PIPE", ST_NONE, TYPE_SOLID, &update_STOR, &graphics_STOR}, - {"PVOD", PIXPACK(0x792020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, destroys entering particles", ST_NONE, TYPE_SOLID, &update_PVOD, &graphics_PVOD}, - {"CONV", PIXPACK(0x0AAB0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Solid. Converts whatever touches it into its ctype.", ST_NONE, TYPE_SOLID, &update_CONV, NULL}, - {"CAUS", PIXPACK(0x80FFA0), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 1.50f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Caustic Gas, acts like Acid", ST_GAS, TYPE_GAS|PROP_DEADLY, &update_CAUS, NULL}, - {"LIGH", PIXPACK(0xFFFFC0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "More realistic lightning. Set pen size to set the size of the lightning.", ST_SOLID, TYPE_SOLID, &update_LIGH, &graphics_LIGH}, - {"TESC", PIXPACK(0x707040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Tesla coil!", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, - {"DEST", PIXPACK(0xFF3311), -0.05f, 0.00f * CFDS, 0.95f, 0.95f, -0.1f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 101, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 150, "More destructive Bomb.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_DEST, &graphics_DEST}, - {"SPNG", PIXPACK(0xFFBE30), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 1, 30, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "A sponge, absorbs water.", ST_SOLID, TYPE_SOLID, &update_SPNG, &graphics_SPNG}, - {"RIME", PIXPACK(0xCCCCCC), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 100, SC_CRACKER2, 243.15f, 100, "Not quite Ice", ST_SOLID, TYPE_SOLID, &update_RIME, NULL}, - {"FOG", PIXPACK(0xAAAAAA), 0.8f, 0.00f * CFDS, 0.4f, 0.70f, -0.1f, 0.0f, 0.99f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 1, SC_CRACKER2, 243.15f, 100, "Not quite Steam", ST_GAS, TYPE_GAS|PROP_LIFE_DEC, &update_FOG, NULL}, - {"BCLN", PIXPACK(0xFFD040), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Breakable Clone.", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_BCLN, NULL}, - {"LOVE", PIXPACK(0xFF30FF), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_CRACKER2, 373.0f, 40, "Love...", ST_GAS, TYPE_SOLID, &update_MISC, NULL}, - {"DEUT", PIXPACK(0x00153F), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 31, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 251, "Deuterium oxide. Volume changes with temp, radioactive with neutrons.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_DEUT, &graphics_DEUT}, - {"WARP", PIXPACK(0x000000), 0.8f, 0.00f * CFDS, 0.9f, 0.70f, -0.1f, 0.0f, 3.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 1, SC_NUCLEAR, R_TEMP +273.15f, 100, "Displaces other elements.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_WARP, NULL}, - {"PUMP", PIXPACK(0x0A0A3B), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 1, 100, SC_POWERED, 273.15f, 0, "Changes pressure to its temp when activated. (use HEAT/COOL).", ST_SOLID, TYPE_SOLID, &update_PUMP, &graphics_PUMP}, - {"FWRK", PIXPACK(0x666666), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 1, 1, 1, 97, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 100, "First fireworks made, activated by heat/neutrons.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_FWRK, NULL}, - {"PIPE", PIXPACK(0x444444), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, 273.15f, 0, "Moves elements around, read FAQ on website for help.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_PIPE, &graphics_PIPE}, - {"FRZZ", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f, -0.00005f* CFDS,1, 0, 0, 0, 20, 1, 1, 50, SC_POWDERS, 90.0f, 46, "FREEZE", ST_SOLID, TYPE_PART, &update_FRZZ, NULL}, - {"FRZW", PIXPACK(0x1020C0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_CRACKER2, 120.0f, 29, "FREEZE WATER", ST_LIQUID, TYPE_LIQUID||PROP_LIFE_DEC, &update_FRZW, NULL}, - {"GRAV", PIXPACK(0xFFE0A0), 0.7f, 0.00f * CFDS, 1.00f, 1.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Changes colour based on velocity.", ST_SOLID, TYPE_PART, &update_MISC, &graphics_GRAV}, - {"BIZR", PIXPACK(0x00FF77), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP+0.0f +273.15f, 29, "Bizarre... contradicts the normal state changes.", ST_LIQUID, TYPE_LIQUID, &update_BIZR, &graphics_BIZR}, - {"BIZG", PIXPACK(0x00FFBB), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 2.75f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_CRACKER2, R_TEMP-200.0f+273.15f, 42, "Bizarre gas", ST_GAS, TYPE_GAS, &update_BIZR, &graphics_BIZR}, - {"BIZS", PIXPACK(0x00E455), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_CRACKER2, R_TEMP+300.0f+273.15f, 251, "Bizarre solid", ST_SOLID, TYPE_SOLID, &update_BIZR, &graphics_BIZR}, - {"INST", PIXPACK(0x404039), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Instantly conducts, PSCN to charge, NSCN to take.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, NULL, NULL}, - {"ISOZ", PIXPACK(0xAA30D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 1, 24, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 29, "Radioactive liquid", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_ISZ, NULL}, - {"ISZS", PIXPACK(0x662089), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0007f* CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_NUCLEAR, 140.00f, 251, "Solid form of ISOZ, slowly decays.", ST_SOLID, TYPE_SOLID, &update_ISZ, NULL}, - {"PRTI", PIXPACK(0xEB5917), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.005f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Portal IN. Things go in here, now with channels (same as WIFI)", ST_SOLID, TYPE_SOLID, &update_PRTI, &graphics_PRTI}, - {"PRTO", PIXPACK(0x0020EB), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.005f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Portal OUT. Things come out here, now with channels (same as WIFI)", ST_SOLID, TYPE_SOLID, &update_PRTO, &graphics_PRTO}, - {"PSTE", PIXPACK(0xAA99AA), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 31, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Colloid, Hardens under pressure", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"PSTS", PIXPACK(0x776677), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 20, 0, 1, 100, SC_CRACKER, R_TEMP-2.0f +273.15f, 29, "Solid form of PSTE, temporary", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"ANAR", PIXPACK(0xFFFFEE), -0.7f, -0.02f * CFDS, 0.96f, 0.80f, 0.1f, -0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Behaves opposite gravity", ST_SOLID, TYPE_PART, &update_ANAR, NULL}, - {"VINE", PIXPACK(0x079A00), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 65, "Vine, grows", ST_SOLID, TYPE_SOLID, &update_VINE, NULL}, - {"INVS", PIXPACK(0x00CCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 15, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Invisible to everything while under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPASS, NULL, &graphics_INVS}, - {"EQVE", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 0, 1, 85, SC_CRACKER2, R_TEMP+0.0f +273.15f, 70, "Shared velocity test", ST_SOLID, TYPE_PART, NULL, NULL}, - {"SPWN2", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "STK2 spawn point", ST_SOLID, TYPE_SOLID, &update_SPAWN2, NULL}, - {"SPWN", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "STKM spawn point", ST_SOLID, TYPE_SOLID, &update_SPAWN, NULL}, - {"SHLD", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "Shield, spark it to grow", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD1, NULL}, - {"SHD2", PIXPACK(0x777777), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 2", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD2, NULL}, - {"SHD3", PIXPACK(0x444444), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 3", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD3, NULL}, - {"SHD4", PIXPACK(0x212121), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 4", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD4, NULL}, - {"LOLZ", PIXPACK(0x569212), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_CRACKER2, 373.0f, 40, "Lolz", ST_GAS, TYPE_SOLID, &update_MISC, NULL}, - {"WIFI", PIXPACK(0x40A060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 2, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Wireless transmitter, color coded.", ST_SOLID, TYPE_SOLID, &update_WIFI, &graphics_WIFI}, - {"FILT", PIXPACK(0x000056), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Filter for photons, changes the color.", ST_SOLID, TYPE_SOLID, NULL, &graphics_FILT}, - {"ARAY", PIXPACK(0xFFBB00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Ray Emitter. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ARAY, NULL}, - {"BRAY", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 0, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Ray Point. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, NULL, &graphics_BRAY}, - {"STK2", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM2, &graphics_STKM2}, - {"BOMB", PIXPACK(0xFFF288), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Bomb.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC|PROP_SPARKSETTLE, &update_BOMB, &graphics_BOMB}, - {"C-5", PIXPACK(0x2050E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Cold explosive", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_C5, NULL}, - {"SING", PIXPACK(0x242424), 0.7f, 0.36f * CFDS, 0.96f, 0.80f, 0.1f, 0.12f, 0.00f, -0.001f * CFDS, 1, 0, 0, 0, 0, 1, 1, 86, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Singularity", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_SING, NULL}, - {"QRTZ", PIXPACK(0xAADDDD), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 3, "Quartz, breakable mineral. Conducts but becomes brittle at lower temperatures.", ST_SOLID, TYPE_SOLID|PROP_HOT_GLOW|PROP_LIFE_DEC, &update_QRTZ, &graphics_QRTZ}, - {"PQRT", PIXPACK(0x88BBBB), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.27f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 3, "Broken quartz.", ST_SOLID, TYPE_PART| PROP_HOT_GLOW, &update_QRTZ, &graphics_QRTZ}, - {"EMP", PIXPACK(0x66AAFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 3, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 121, "Breaks activated electronics.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_EMP, &graphics_EMP}, - {"BREL", PIXPACK(0x707060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.18f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken electronics", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, - {"ELEC", PIXPACK(0xDFEFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+200.0f+273.15f, 251, "Electrons", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_ELEC, &graphics_ELEC}, - {"ACEL", PIXPACK(0x0099CC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Accelerator", ST_NONE, TYPE_SOLID, &update_ACEL, &graphics_ACEL}, - {"DCEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Decelerator", ST_NONE, TYPE_SOLID, &update_DCEL, &graphics_DCEL}, - {"TNT", PIXPACK(0xC05050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_BANG, NULL}, - {"IGNC", PIXPACK(0xC0B050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Ignition cord.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL, &update_IGNT, NULL}, - {"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL}, - /*FREE*/{"LOTE", PIXPACK(0xFF0000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Behaves kinda like Living on the Edge S3458/B37/4", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"FRG2", PIXPACK(0x00FF00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Frogs rule S124/B3/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"STAR", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Star Wars rule S3456/B278/6", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"FROG", PIXPACK(0x00AA00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Frogs S12/B34/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"BRAN", PIXPACK(0xCCCC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Brian 6 S6/B246/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"WIND", PIXPACK(0x101010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_SPECIAL, 0.0f, 40, "", ST_NONE, ST_NONE, NULL, NULL}, - {"HYGN", PIXPACK(0x5070FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.10f, 0.00f, 3.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 251, "Combines with O2 to make WATR", ST_GAS, TYPE_GAS, &update_H2, NULL}, - {"SOAP", PIXPACK(0xF5F5DC), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Soap. Creates bubbles.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_SOAP, NULL}, - {"BHOL", PIXPACK(0x202020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "Black hole (Requires newtonian gravity)", ST_SOLID, TYPE_SOLID, &update_NBHL, NULL}, - {"WHOL", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "White hole (Requires newtonian gravity)", ST_SOLID, TYPE_SOLID, &update_NWHL, NULL}, - {"MERC", PIXPACK(0x736B6D), 0.4f, 0.04f * CFDS, 0.94f, 0.80f, 0.0f, 0.3f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 91, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Mercury. Volume changes with temperature, Conductive.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_NEUTABSORB|PROP_LIFE_DEC, &update_MERC, NULL}, - {"PBCN", PIXPACK(0x3B1D0A), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Powered breakable clone", ST_NONE, TYPE_SOLID, &update_PBCN, &graphics_PBCN}, - {"GPMP", PIXPACK(0x0A3B3B), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, 0.0f +273.15f, 0, "Changes gravity to its temp when activated. (use HEAT/COOL).", ST_NONE, TYPE_SOLID, &update_GPMP, &graphics_GPMP}, - {"CLST", PIXPACK(0xE4A4A4), 0.7f, 0.02f * CFDS, 0.94f, 0.95f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Clay dust. Produces paste when mixed with water.", ST_SOLID, TYPE_PART, &update_CLST, &graphics_CLST}, - {"WIRE", PIXPACK(0xFFCC00), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 250, "WireWorld wires.",ST_SOLID,TYPE_SOLID,&update_WIRE, &graphics_WIRE}, - {"GBMB", PIXPACK(0x1144BB), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Sticks to first object it touches then produces strong gravity push.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GBMB, &graphics_GBMB}, - {"FIGH", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Fighter. Tries to kill stickmen.", ST_NONE, 0, &update_FIGH, &graphics_FIGH}, - //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description - }; - memcpy(ptypes, ptypest, sizeof(part_type)*PT_NUM); - -#define IPL -257.0f -#define IPH 257.0f -#define ITL MIN_TEMP-1 -#define ITH MAX_TEMP+1 -// no transition (PT_NONE means kill part) -#define NT -1 -// special transition - lava ctypes etc need extra code, which is only found and run if ST is given -#define ST PT_NUM -part_transition ptransitionst[PT_NUM] = -{ // if low pressure if high pressure if low temperature if high temperature - // Name plv plt phv pht tlv tlt thv tht - /* NONE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* DUST */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WATR */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, - /* OIL */ {IPL, NT, IPH, NT, ITL, NT, 333.0f, PT_GAS}, - /* FIRE */ {IPL, NT, IPH, NT, ITL, NT, 2773.0f,PT_PLSM}, - /* STNE */ {IPL, NT, IPH, NT, ITL, NT, 983.0f, PT_LAVA}, - /* LAVA */ {IPL, NT, IPH, NT, 2573.15f,ST, ITH, NT}, // 2573.15f is highest melt pt of possible ctypes - /* GUN */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, - /* NITR */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, - /* CLNE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* GAS */ {IPL, NT, 6.0f, PT_OIL, ITL, NT, 573.0f, PT_FIRE}, - /* C-4 */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, - /* GOO */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ICE */ {IPL, NT, 0.8f, PT_SNOW, ITL, NT, 233.0f, ST}, - /* METL */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_LAVA}, - /* SPRK */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SNOW */ {IPL, NT, IPH, NT, ITL, NT, 273.0f, PT_WATR}, - /* WOOD */ {IPL, NT, IPH, NT, ITL, NT, 873.0f, PT_FIRE}, - /* NEUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PLUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PLNT */ {IPL, NT, IPH, NT, ITL, NT, 573.0f, PT_FIRE}, - /* ACID */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* VOID */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WTRV */ {IPL, NT, IPH, NT, 371.0f, ST, ITH, NT}, - /* CNCT */ {IPL, NT, IPH, NT, ITL, NT, 1123.0f,PT_LAVA}, - /* DSTW */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, - /* SALT */ {IPL, NT, IPH, NT, ITL, NT, 1173.0f,PT_LAVA}, - /* SLTW */ {IPL, NT, IPH, NT, 233.0f, PT_ICEI, 483.0f, ST}, - /* DMND */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BMTL */ {IPL, NT, 1.0f, ST, ITL, NT, 1273.0f,PT_LAVA}, - /* BRMT */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_LAVA}, - /* PHOT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* URAN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WAX */ {IPL, NT, IPH, NT, ITL, NT, 319.0f, PT_MWAX}, - /* MWAX */ {IPL, NT, IPH, NT, 318.0f, PT_WAX, 673.0f, PT_FIRE}, - /* PSCN */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, - /* NSCN */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, - /* LN2 */ {IPL, NT, IPH, NT, 63.0f, PT_NICE, 77.0f, PT_NONE}, - /* INSL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* VACU */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* VENT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* RBDM */ {IPL, NT, IPH, NT, ITL, NT, 312.0f, PT_LRBD}, - /* LRBD */ {IPL, NT, IPH, NT, 311.0f, PT_RBDM, 961.0f, PT_FIRE}, - /* NTCT */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, - /* SAND */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, - /* GLAS */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, - /* PTCT */ {IPL, NT, IPH, NT, ITL, NT, 1414.0f,PT_LAVA}, - /* BGLA */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, - /* THDR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PLSM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ETRD */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* NICE */ {IPL, NT, IPH, NT, ITL, NT, 63.1f, PT_LNTG}, - /* NBLE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BTRY */ {IPL, NT, IPH, NT, ITL, NT, 2273.0f,PT_PLSM}, - /* LCRY */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_BGLA}, - /* STKM */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, - /* SWCH */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SMKE */ {IPL, NT, IPH, NT, ITL, NT, 625.0f, PT_FIRE}, - /* DESL */ {IPL, NT, 5.0f, PT_FIRE, ITL, NT, 335.0f, PT_FIRE}, - /* COAL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* LO2 */ {IPL, NT, IPH, NT, ITL, NT, 90.1f, PT_O2}, - /* O2 */ {IPL, NT, IPH, NT, 90.0f, PT_LO2, ITH, NT}, - /* INWR */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, - /* YEST */ {IPL, NT, IPH, NT, ITL, NT, 373.0f, PT_DYST}, - /* DYST */ {IPL, NT, IPH, NT, ITL, NT, 473.0f, PT_DUST}, - /* THRM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* GLOW */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BRCK */ {IPL, NT, 8.8f, PT_STNE, ITL, NT, 1223.0f,PT_LAVA}, - /* CFLM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FIRW */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FUSE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FSEP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* AMTR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BCOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PCLN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* HSWC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* IRON */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, - /* MORT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* LIFE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* DLAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* CO2 */ {IPL, NT, IPH, NT, 194.65f,PT_DRIC, ITH, NT}, - /* DRIC */ {IPL, NT, IPH, NT, ITL, NT, 195.65f,PT_CO2}, - /* CBNW */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, - /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SPNG */ {IPL, NT, IPH, NT, ITL, NT, 2730.0f,PT_FIRE}, - /* RIME */ {IPL, NT, IPH, NT, ITL, NT, 273.15f,PT_WATR}, - /* FOG */ {IPL, NT, IPH, NT, ITL, NT, 373.15f,PT_WTRV}, - /* BCLN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* LOVE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* DEUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WARP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PUMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FWRK */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PIPE */ {IPL, NT, 10.0f, PT_BRMT, ITL, NT, ITH, NT}, - /* FRZZ */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FRZW */ {IPL, NT, IPH, NT, ITL, NT, 53.0f, PT_ICEI}, - /* GRAV */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BIZR */ {IPL, NT, IPH, NT, 100.0f, PT_BIZRG, 400.0f, PT_BIZRS}, - /* BIZRG*/ {IPL, NT, IPH, NT, ITL, NT, 100.0f, PT_BIZR},//, 400.0f, PT_BIZRS}, - /* BIZRS*/ {IPL, NT, IPH, NT, 400.0f, PT_BIZR, ITH, NT},// 100.0f, PT_BIZRG}, - /* INST */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ISOZ */ {IPL, NT, IPH, NT, 160.0f, PT_ISZS, ITH, NT}, - /* ISZS */ {IPL, NT, IPH, NT, ITL, NT, 300.0f, PT_ISOZ}, - /* PRTI */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PRTO */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PSTE */ {IPL, NT, 0.5f, PT_PSTS, ITL, NT, 747.0f, PT_BRCK}, - /* PSTS */ {0.5f, PT_PSTE, IPH, NT, ITL, NT, ITH, NT}, - /* ANAR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* VINE */ {IPL, NT, IPH, NT, ITL, NT, 573.0f, PT_FIRE}, - /* INVS */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* EQVE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SPWN2*/ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SPAWN*/ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SHLD1*/ {IPL, NT, 7.0f, PT_NONE, ITL, NT, ITH, NT}, - /* SHLD2*/ {IPL, NT, 15.0f, PT_NONE, ITL, NT, ITH, NT}, - /* SHLD3*/ {IPL, NT, 25.0f, PT_NONE, ITL, NT, ITH, NT}, - /* SHLD4*/ {IPL, NT, 40.0f, PT_NONE, ITL, NT, ITH, NT}, - /* LOlZ */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WIFI */ {IPL, NT, 15.0f, PT_BRMT, ITL, NT, ITH, NT}, - /* FILT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ARAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BRAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* STKM2*/ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, - /* BOMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* C-5 */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SING */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* QRTZ */ {IPL, NT, IPH, NT, ITL, NT, 2573.15f,PT_LAVA}, - /* PQRT */ {IPL, NT, IPH, NT, ITL, NT, 2573.15f,PT_LAVA}, - /* EMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* BREL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ELEC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* ACEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* DCEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* TNT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* IGNP */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, - /* BOYL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* WIND */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* H2 */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SOAP */ {IPL, NT, IPH, NT, ITL, NT, ITL, NT}, - /* NBHL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* NWHL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* MERC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* PBCN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* GPMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* CLST */ {IPL, NT, IPH, NT, ITL, NT, 1256.0f, PT_LAVA}, - /* WIRE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* GBMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* FIGH */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, -}; -#undef IPL -#undef IPH -#undef ITL -#undef ITH -#undef NT -#undef ST*/ - memcpy(ptransitions, ptransitionst, sizeof(part_transition) * PT_NUM); + int menuCount; + menu_section * msectionsT = LoadMenus(menuCount); + memcpy(msections, msectionsT, menuCount * sizeof(menu_section)); + + int elementCount; + part_type * ptypesT = LoadElements(elementCount); + memcpy(ptypes, ptypesT, elementCount * sizeof(part_type)); + + int transitionCount; + part_transition * ptransitionsT = LoadTransitions(transitionCount); + memcpy(ptransitions, ptransitionsT, sizeof(part_transition) * transitionCount); init_can_move(); clear_sim(); } diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index 86f9b8f..c36a18f 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -14,6 +14,8 @@ #include "Elements.h" #include "Misc.h" #include "game/Brush.h" +#include "SimulationData.h" +//#include "ElementFunctions.h" #define CHANNELS ((int)(MAX_TEMP-73)/100+2) @@ -36,13 +38,6 @@ struct Particle }; typedef struct Particle Particle; -struct sign -{ - int x,y,ju; - char text[256]; -}; -typedef struct sign sign; - struct part_type { char *name; @@ -87,17 +82,6 @@ struct part_transition }; typedef struct part_transition part_transition; -struct playerst -{ - char comm; //command cell - char pcomm; //previous command - int elem; //element power - float legs[16]; //legs' positions - float accs[8]; //accelerations - char spwn; //if stick man was spawned - unsigned int frames; //frames since last particle spawn - used when spawning LIGH -}; -typedef struct playerst playerst; struct wall_type { @@ -117,6 +101,34 @@ struct gol_menu }; typedef struct gol_menu gol_menu; +struct menu_section +{ + char *icon; + const char *name; + int itemcount; + int doshow; +}; +typedef struct menu_section menu_section; + +struct sign +{ + int x,y,ju; + char text[256]; +}; +typedef struct sign sign; + +struct playerst +{ + char comm; //command cell + char pcomm; //previous command + int elem; //element power + float legs[16]; //legs' positions + float accs[8]; //accelerations + char spwn; //if stick man was spawned + unsigned int frames; //frames since last particle spawn - used when spawning LIGH +}; +typedef struct playerst playerst; + //#ifdef _cplusplus class Simulation { @@ -125,12 +137,15 @@ public: Gravity * grav; Air * air; + part_type ptypes[PT_NUM]; part_transition ptransitions[PT_NUM]; wall_type wtypes[UI_WALLCOUNT]; gol_menu gmenu[NGOL]; int goltype[NGOL]; int grule[NGOL+1][10]; + menu_section msections[SC_TOTAL]; + playerst player; playerst player2; playerst fighters[256]; //255 is the maximum number of fighters diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp new file mode 100644 index 0000000..f5a3ff7 --- /dev/null +++ b/src/simulation/SimulationData.cpp @@ -0,0 +1,393 @@ +/* + * SimulationData.cpp + * + * Created on: Jan 24, 2012 + * Author: Simon + */ +#include "SimulationData.h" +#include "ElementFunctions.h" +#include "ElementGraphics.h" + +menu_section * LoadMenus(int & menuCount) +{ + menu_section msections[] = //doshow does not do anything currently. + { + {"\xC1", "Walls", 0, 1}, + {"\xC2", "Electronics", 0, 1}, + {"\xD6", "Powered Materials", 0, 1}, + {"\xC3", "Explosives", 0, 1}, + {"\xC5", "Gasses", 0, 1}, + {"\xC4", "Liquids", 0, 1}, + {"\xD0", "Powders", 0, 1}, + {"\xD1", "Solids", 0, 1}, + {"\xC6", "Radioactive", 0, 1}, + {"\xCC", "Special", 0, 1}, + {"\xD2", "Life", 0, 1}, + {"\xD7", "Tools", 0, 1}, + {"\xD2", "More Life", 0, 1}, + {"\xC8", "", 0, 0}, + {"\xC8", "Cracker", 0, 0}, + {"\xC8", "Cracker!", 0, 0}, + }; + menuCount = SC_TOTAL; + menu_section * msectionsT = (menu_section*)malloc(SC_TOTAL*sizeof(menu_section)); + memcpy(msectionsT, msections, SC_TOTAL*sizeof(menu_section)); + return msectionsT; +} + +part_type * LoadElements(int & elementCount) +{ + part_type ptypes[PT_NUM] = + { + //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description + {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}, + {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}, + {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}, + {"OIL", PIXPACK(0x404010), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 20, 0, 0, 5, 1, 1, 20, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Flammable.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"FIRE", PIXPACK(0xFF1000), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, R_TEMP+400.0f+273.15f, 88, "Ignites flammable materials. Heats air.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_FIRE}, + {"STNE", PIXPACK(0xA0A0A0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Heavy particles. Meltable.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"LAVA", PIXPACK(0xE05010), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.0003f * CFDS, 2, 0, 0, 0, 2, 1, 1, 45, SC_LIQUID, R_TEMP+1500.0f+273.15f, 60, "Heavy liquid. Ignites flammable materials. Solidifies when cold.", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC, &update_PYRO, &graphics_LAVA}, + {"GUN", PIXPACK(0xC0C0D0), 0.7f, 0.02f * CFDS, 0.94f, 0.80f, -0.1f, 0.1f, 0.00f, 0.000f * CFDS, 1, 600, 1, 0, 10, 1, 1, 85, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 97, "Light dust. Explosive.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"NITR", PIXPACK(0x20E010), 0.5f, 0.02f * CFDS, 0.92f, 0.97f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 2, 1000, 2, 0, 3, 1, 1, 23, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 50, "Liquid. Pressure sensitive explosive.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"CLNE", PIXPACK(0xFFD010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Solid. Duplicates any particles it touches.", ST_SOLID, TYPE_SOLID, &update_CLNE, NULL}, + {"GAS", PIXPACK(0xE0FF20), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 600, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Gas. Diffuses. Flammable. Liquefies under pressure.", ST_GAS, TYPE_GAS, NULL, NULL}, + {"C-4", PIXPACK(0xD080E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 2, 50, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Solid. Pressure sensitive explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, NULL, NULL}, + {"GOO", PIXPACK(0x804000), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 75, "Solid. Deforms and disappears under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GOO, NULL}, + {"ICE", PIXPACK(0xA0C0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP-50.0f+273.15f, 46, "Solid. Freezes water. Crushes under pressure. Cools down air.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ICEI, NULL}, + {"METL", PIXPACK(0x404060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Conducts electricity. Meltable.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, + {"SPRK", PIXPACK(0xFFFF80), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electricity. Conducted by metal and water.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SPRK, &graphics_SPRK}, + {"SNOW", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f, -0.00005f* CFDS,1, 0, 0, 0, 20, 1, 1, 50, SC_POWDERS, R_TEMP-30.0f+273.15f, 46, "Light particles.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_ICEI, NULL}, + {"WOOD", PIXPACK(0xC0A040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 15, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Solid. Flammable.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, NULL, NULL}, + {"NEUT", PIXPACK(0x20E0FF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 60, "Neutrons. Interact with matter in odd ways.", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_NEUT, &graphics_NEUT}, + {"PLUT", PIXPACK(0x407020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_NUCLEAR, R_TEMP+4.0f +273.15f, 251, "Heavy particles. Fissile. Generates neutrons under pressure.", ST_SOLID, TYPE_PART|PROP_NEUTPENETRATE|PROP_RADIOACTIVE, &update_PLUT, NULL}, + {"PLNT", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 65, "Plant, drinks water and grows.", ST_SOLID, TYPE_SOLID|PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_PLNT, NULL}, + {"ACID", PIXPACK(0xED55FF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 40, 0, 0, 1, 1, 1, 10, SC_LIQUID, R_TEMP+0.0f +273.15f, 34, "Dissolves almost everything.", ST_LIQUID, TYPE_LIQUID|PROP_DEADLY, &update_ACID, &graphics_ACID}, + {"VOID", PIXPACK(0x790B0B), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Hole, will drain away any particles.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"WTRV", PIXPACK(0xA0A0FF), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, -0.1f, 0.75f, 0.0003f * CFDS, 0, 0, 0, 0, 4, 1, 1, 1, SC_GAS, R_TEMP+100.0f+273.15f, 48, "Steam, heats up air, produced from hot water.", ST_GAS, TYPE_GAS, &update_WTRV, NULL}, + {"CNCT", PIXPACK(0xC0C0C0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 100, "Concrete, stronger than stone.", ST_SOLID, TYPE_PART|PROP_HOT_GLOW, NULL, NULL}, + {"DSTW", PIXPACK(0x1020C0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 23, "Distilled water, does not conduct electricity.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_DSTW, NULL}, + {"SALT", PIXPACK(0xFFFFFF), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 75, SC_POWDERS, R_TEMP+0.0f +273.15f, 110, "Salt, dissolves in water.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"SLTW", PIXPACK(0x4050F0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP+0.0f +273.15f, 75, "Saltwater, conducts electricity, difficult to freeze.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_SLTW, NULL}, + {"DMND", PIXPACK(0xCCFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 186, "Diamond. Indestructible.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"BMTL", PIXPACK(0x505070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Breakable metal.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_BMTL, NULL}, + {"BRMT", PIXPACK(0x705060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken metal.", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_BRMT, NULL}, + {"PHOT", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+900.0f+273.15f, 251, "Photons. Travel in straight lines.", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_PHOT, &graphics_PHOT}, + {"URAN", PIXPACK(0x707020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_NUCLEAR, R_TEMP+30.0f+273.15f, 251, "Heavy particles. Generates heat under pressure.", ST_SOLID, TYPE_PART | PROP_RADIOACTIVE, &update_URAN, NULL}, + {"WAX", PIXPACK(0xF0F0BB), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 44, "Wax. Melts at moderately high temperatures.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"MWAX", PIXPACK(0xE0E0AA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 5, 0, 0, 2, 1, 1, 25, SC_LIQUID, R_TEMP+28.0f+273.15f, 44, "Liquid Wax.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"PSCN", PIXPACK(0x805050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "P-Type Silicon, Will transfer current to any conductor.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"NSCN", PIXPACK(0x505080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "N-Type Silicon, Will not transfer current to P-Type Silicon.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"LN2", PIXPACK(0x80A0DF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 1, 30, SC_LIQUID, 70.15f, 70, "Liquid Nitrogen. Very cold.", ST_SOLID, TYPE_LIQUID, NULL, NULL}, + {"INSL", PIXPACK(0x9EA3B6), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 7, 0, 0, 10, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Insulator, does not conduct heat or electricity.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"VACU", PIXPACK(0x303030), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, -0.01f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+70.0f+273.15f, 255, "Vacuum, sucks in other particles and heats up.", ST_NONE, TYPE_SOLID, NULL, NULL}, + {"VENT", PIXPACK(0xEFEFEF), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.010f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP-16.0f+273.15f, 255, "Air vent, creates pressure and pushes other particles away.", ST_NONE, TYPE_SOLID, NULL, NULL}, + {"RBDM", PIXPACK(0xCCCCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 1, 50, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 240, "Rubidium, explosive, especially on contact with water, low melting point", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"LRBD", PIXPACK(0xAAAAAA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 1000, 1, 0, 2, 1, 1, 45, SC_EXPLOSIVE, R_TEMP+45.0f+273.15f, 170, "Liquid Rubidium.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"NTCT", PIXPACK(0x505040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when hot (More than 100C)", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NPTCT, NULL}, + {"SAND", PIXPACK(0xFFD090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Sand, Heavy particles. Meltable.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"GLAS", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 150, "Solid. Meltable. Shatters under pressure", ST_SOLID, TYPE_SOLID | PROP_NEUTPASS | PROP_HOT_GLOW | PROP_SPARKSETTLE, &update_GLAS, NULL}, + {"PTCT", PIXPACK(0x405050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when cold (Less than 100C)", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NPTCT, NULL}, + {"BGLA", PIXPACK(0x606060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Glass, Heavy particles. Meltable. Bagels.", ST_SOLID, TYPE_PART | PROP_HOT_GLOW, NULL, NULL}, + {"THDR", PIXPACK(0xFFFFA0), 0.0f, 0.00f * CFDS, 1.0f, 0.30f, -0.99f, 0.6f, 0.62f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_EXPLOSIVE, 9000.0f +273.15f, 1, "Lightning! Very hot, inflicts damage upon most materials, transfers current to metals.", ST_NONE, TYPE_ENERGY, &update_THDR, &graphics_THDR}, + {"PLSM", PIXPACK(0xBB99FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.30f, 0.001f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, 10000.0f +273.15f, 5, "Plasma, extremely hot.", ST_NONE, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_PLSM}, + {"ETRD", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)", ST_NONE, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"NICE", PIXPACK(0xC0E0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 35.0f, 46, "Nitrogen Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"NBLE", PIXPACK(0xEB4917), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 106, "Noble Gas. Diffuses. Conductive. Ionizes into plasma when introduced to electricity", ST_GAS, TYPE_GAS|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"BTRY", PIXPACK(0x858505), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Generates Electricity.", ST_SOLID, TYPE_SOLID, &update_BTRY, NULL}, + {"LCRY", PIXPACK(0x505050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)", ST_SOLID, TYPE_SOLID, &update_LCRY, &graphics_LCRY}, + {"STKM", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM, &graphics_STKM}, + {"SWCH", PIXPACK(0x103B11), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Only conducts when switched on. (PSCN switches on, NSCN switches off)", ST_SOLID, TYPE_SOLID, &update_SWCH, &graphics_SWCH}, + {"SMKE", PIXPACK(0x222222), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+320.0f+273.15f, 88, "Smoke", ST_SOLID, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_SMKE}, + {"DESL", PIXPACK(0x440000), 1.0f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.0f, 0.0f * CFDS, 2, 2, 0, 0, 5, 1, 1, 15, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Explodes under high pressure and temperatures", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"COAL", PIXPACK(0x222222), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly.", ST_SOLID, TYPE_SOLID, &update_COAL, &graphics_COAL}, + {"LOXY", PIXPACK(0x80A0EF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 5000, 0, 0, 0, 1, 1, 30, SC_LIQUID, 80.0f, 70, "Liquid Oxygen. Very cold. Reacts with fire", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"OXYG", PIXPACK(0x80A0FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 3.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Gas. Ignites easily.", ST_GAS, TYPE_GAS, &update_O2, NULL}, + {"INWR", PIXPACK(0x544141), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Insulated Wire. Doesn't conduct to metal or semiconductors.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"YEST", PIXPACK(0xEEE0C0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 15, 0, 0, 30, 1, 1, 80, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Yeast, grows when warm (~37C).", ST_SOLID, TYPE_PART, &update_YEST, NULL}, + {"DYST", PIXPACK(0xBBB0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 20, 0, 0, 30, 0, 1, 80, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Dead Yeast.", ST_SOLID, TYPE_PART, NULL, NULL}, + {"THRM", PIXPACK(0xA08090), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 211, "Thermite. Burns at extremely high temperature.", ST_SOLID, TYPE_PART, &update_THRM, NULL}, + {"GLOW", PIXPACK(0x445464), 0.3f, 0.02f * CFDS, 0.98f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 2, 1, 1, 40, SC_LIQUID, R_TEMP+20.0f+273.15f, 44, "Glow, Glows under pressure", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC, &update_GLOW, &graphics_GLOW}, + {"BRCK", PIXPACK(0x808080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Brick, breakable building material.", ST_SOLID, TYPE_SOLID|PROP_HOT_GLOW, NULL, NULL}, + {"CFLM", PIXPACK(0x8080FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.0005f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, 0.0f, 88, "Sub-zero flame.", ST_LIQUID, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, NULL, &graphics_HFLM}, + {"FIRW", PIXPACK(0xFFA040), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, -0.99f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 55, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 70, "Fireworks!", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_FIRW, &graphics_FIRW}, + {"FUSE", PIXPACK(0x0A5706), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly. Ignites at somewhat high temperatures and electricity.", ST_SOLID, TYPE_SOLID, &update_FUSE, NULL}, + {"FSEP", PIXPACK(0x63AD5F), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 70, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Fuse Powder. See FUSE.", ST_SOLID, TYPE_PART, &update_FSEP, NULL}, + {"AMTR", PIXPACK(0x808080), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.00f, 0.10f, 1.00f, 0.0000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Anti-Matter, Destroys a majority of particles", ST_NONE, TYPE_PART, &update_AMTR, NULL}, //Maybe TYPE_ENERGY? + {"BCOL", PIXPACK(0x333333), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Coal. Heavy particles. See COAL", ST_SOLID, TYPE_PART, &update_BCOL, NULL}, + {"PCLN", PIXPACK(0x3B3B0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, duplicates any particles it touches.", ST_NONE, TYPE_SOLID, &update_PCLN, &graphics_PCLN}, + {"HSWC", PIXPACK(0x3B0A0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Heat switch. Conducts Heat only when activated", ST_NONE, TYPE_SOLID, &update_HSWC, &graphics_HSWC}, + {"IRON", PIXPACK(0x707070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 50, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Rusts with salt, can be used for electrolysis of WATR", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_IRON, NULL}, + {"MORT", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.01f, 0.002f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_CRACKER2, R_TEMP+4.0f +273.15f, 60, "Steam Train.", ST_NONE, TYPE_PART, &update_MORT, NULL}, + {"LIFE", PIXPACK(0x0CAC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 1, 100, SC_LIFE, 9000.0f, 40, "Game Of Life! B3/S23", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, &graphics_LIFE}, + {"DLAY", PIXPACK(0x753590), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, 4.0f+273.15f, 0, "Conducts with temperature-dependent delay. (use HEAT/COOL).", ST_SOLID, TYPE_SOLID, &update_DLAY, &graphics_DLAY}, + {"CO2", PIXPACK(0x666666), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.1f, 1.0f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+273.15f, 88, "Carbon Dioxide", ST_GAS, TYPE_GAS, &update_CO2, NULL}, + {"DRIC", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 172.65f, 2, "Dry Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"BUBW", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Carbonated water. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_CBNW, &graphics_CBNW}, + {"STOR", PIXPACK(0x50DFDF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. Stores a single particle, releases when charged with PSCN, also passes to PIPE", ST_NONE, TYPE_SOLID, &update_STOR, &graphics_STOR}, + {"PVOD", PIXPACK(0x792020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, destroys entering particles", ST_NONE, TYPE_SOLID, &update_PVOD, &graphics_PVOD}, + {"CONV", PIXPACK(0x0AAB0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Solid. Converts whatever touches it into its ctype.", ST_NONE, TYPE_SOLID, &update_CONV, NULL}, + {"CAUS", PIXPACK(0x80FFA0), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 1.50f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Caustic Gas, acts like Acid", ST_GAS, TYPE_GAS|PROP_DEADLY, &update_CAUS, NULL}, + {"LIGH", PIXPACK(0xFFFFC0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "More realistic lightning. Set pen size to set the size of the lightning.", ST_SOLID, TYPE_SOLID, &update_LIGH, &graphics_LIGH}, + {"TESC", PIXPACK(0x707040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Tesla coil!", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, + {"DEST", PIXPACK(0xFF3311), -0.05f, 0.00f * CFDS, 0.95f, 0.95f, -0.1f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 101, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 150, "More destructive Bomb.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_DEST, &graphics_DEST}, + {"SPNG", PIXPACK(0xFFBE30), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 1, 30, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "A sponge, absorbs water.", ST_SOLID, TYPE_SOLID, &update_SPNG, &graphics_SPNG}, + {"RIME", PIXPACK(0xCCCCCC), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 100, SC_CRACKER2, 243.15f, 100, "Not quite Ice", ST_SOLID, TYPE_SOLID, &update_RIME, NULL}, + {"FOG", PIXPACK(0xAAAAAA), 0.8f, 0.00f * CFDS, 0.4f, 0.70f, -0.1f, 0.0f, 0.99f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 1, SC_CRACKER2, 243.15f, 100, "Not quite Steam", ST_GAS, TYPE_GAS|PROP_LIFE_DEC, &update_FOG, NULL}, + {"BCLN", PIXPACK(0xFFD040), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Breakable Clone.", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_BCLN, NULL}, + {"LOVE", PIXPACK(0xFF30FF), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_CRACKER2, 373.0f, 40, "Love...", ST_GAS, TYPE_SOLID, &update_MISC, NULL}, + {"DEUT", PIXPACK(0x00153F), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 31, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 251, "Deuterium oxide. Volume changes with temp, radioactive with neutrons.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_DEUT, &graphics_DEUT}, + {"WARP", PIXPACK(0x000000), 0.8f, 0.00f * CFDS, 0.9f, 0.70f, -0.1f, 0.0f, 3.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 1, SC_NUCLEAR, R_TEMP +273.15f, 100, "Displaces other elements.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_WARP, NULL}, + {"PUMP", PIXPACK(0x0A0A3B), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 1, 100, SC_POWERED, 273.15f, 0, "Changes pressure to its temp when activated. (use HEAT/COOL).", ST_SOLID, TYPE_SOLID, &update_PUMP, &graphics_PUMP}, + {"FWRK", PIXPACK(0x666666), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 1, 1, 1, 97, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 100, "First fireworks made, activated by heat/neutrons.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_FWRK, NULL}, + {"PIPE", PIXPACK(0x444444), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, 273.15f, 0, "Moves elements around, read FAQ on website for help.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_PIPE, &graphics_PIPE}, + {"FRZZ", PIXPACK(0xC0E0FF), 0.7f, 0.01f * CFDS, 0.96f, 0.90f, -0.1f, 0.05f, 0.01f, -0.00005f* CFDS,1, 0, 0, 0, 20, 1, 1, 50, SC_POWDERS, 90.0f, 46, "FREEZE", ST_SOLID, TYPE_PART, &update_FRZZ, NULL}, + {"FRZW", PIXPACK(0x1020C0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_CRACKER2, 120.0f, 29, "FREEZE WATER", ST_LIQUID, TYPE_LIQUID||PROP_LIFE_DEC, &update_FRZW, NULL}, + {"GRAV", PIXPACK(0xFFE0A0), 0.7f, 0.00f * CFDS, 1.00f, 1.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Changes colour based on velocity.", ST_SOLID, TYPE_PART, &update_MISC, &graphics_GRAV}, + {"BIZR", PIXPACK(0x00FF77), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP+0.0f +273.15f, 29, "Bizarre... contradicts the normal state changes.", ST_LIQUID, TYPE_LIQUID, &update_BIZR, &graphics_BIZR}, + {"BIZG", PIXPACK(0x00FFBB), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 2.75f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_CRACKER2, R_TEMP-200.0f+273.15f, 42, "Bizarre gas", ST_GAS, TYPE_GAS, &update_BIZR, &graphics_BIZR}, + {"BIZS", PIXPACK(0x00E455), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_CRACKER2, R_TEMP+300.0f+273.15f, 251, "Bizarre solid", ST_SOLID, TYPE_SOLID, &update_BIZR, &graphics_BIZR}, + {"INST", PIXPACK(0x404039), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Instantly conducts, PSCN to charge, NSCN to take.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, NULL, NULL}, + {"ISOZ", PIXPACK(0xAA30D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 1, 24, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 29, "Radioactive liquid", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE, &update_ISZ, NULL}, + {"ISZS", PIXPACK(0x662089), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0007f* CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_NUCLEAR, 140.00f, 251, "Solid form of ISOZ, slowly decays.", ST_SOLID, TYPE_SOLID, &update_ISZ, NULL}, + {"PRTI", PIXPACK(0xEB5917), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.005f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Portal IN. Things go in here, now with channels (same as WIFI)", ST_SOLID, TYPE_SOLID, &update_PRTI, &graphics_PRTI}, + {"PRTO", PIXPACK(0x0020EB), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.005f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Portal OUT. Things come out here, now with channels (same as WIFI)", ST_SOLID, TYPE_SOLID, &update_PRTO, &graphics_PRTO}, + {"PSTE", PIXPACK(0xAA99AA), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 31, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Colloid, Hardens under pressure", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, + {"PSTS", PIXPACK(0x776677), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 20, 0, 1, 100, SC_CRACKER, R_TEMP-2.0f +273.15f, 29, "Solid form of PSTE, temporary", ST_SOLID, TYPE_SOLID, NULL, NULL}, + {"ANAR", PIXPACK(0xFFFFEE), -0.7f, -0.02f * CFDS, 0.96f, 0.80f, 0.1f, -0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Behaves opposite gravity", ST_SOLID, TYPE_PART, &update_ANAR, NULL}, + {"VINE", PIXPACK(0x079A00), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 0, 10, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 65, "Vine, grows", ST_SOLID, TYPE_SOLID, &update_VINE, NULL}, + {"INVS", PIXPACK(0x00CCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 15, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Invisible to everything while under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPASS, NULL, &graphics_INVS}, + {"EQVE", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 0, 1, 85, SC_CRACKER2, R_TEMP+0.0f +273.15f, 70, "Shared velocity test", ST_SOLID, TYPE_PART, NULL, NULL}, + {"SPWN2", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "STK2 spawn point", ST_SOLID, TYPE_SOLID, &update_SPAWN2, NULL}, + {"SPWN", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "STKM spawn point", ST_SOLID, TYPE_SOLID, &update_SPAWN, NULL}, + {"SHLD", PIXPACK(0xAAAAAA), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 0, "Shield, spark it to grow", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD1, NULL}, + {"SHD2", PIXPACK(0x777777), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 2", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD2, NULL}, + {"SHD3", PIXPACK(0x444444), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 3", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD3, NULL}, + {"SHD4", PIXPACK(0x212121), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 0, 1, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 0, "Shield lvl 4", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SHLD4, NULL}, + {"LOLZ", PIXPACK(0x569212), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.0f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_CRACKER2, 373.0f, 40, "Lolz", ST_GAS, TYPE_SOLID, &update_MISC, NULL}, + {"WIFI", PIXPACK(0x40A060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 2, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Wireless transmitter, color coded.", ST_SOLID, TYPE_SOLID, &update_WIFI, &graphics_WIFI}, + {"FILT", PIXPACK(0x000056), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Filter for photons, changes the color.", ST_SOLID, TYPE_SOLID, NULL, &graphics_FILT}, + {"ARAY", PIXPACK(0xFFBB00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "Ray Emitter. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ARAY, NULL}, + {"BRAY", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 0, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Ray Point. Rays create points when they collide", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, NULL, &graphics_BRAY}, + {"STK2", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM2, &graphics_STKM2}, + {"BOMB", PIXPACK(0xFFF288), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Bomb.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC|PROP_SPARKSETTLE, &update_BOMB, &graphics_BOMB}, + {"C-5", PIXPACK(0x2050E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Cold explosive", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_C5, NULL}, + {"SING", PIXPACK(0x242424), 0.7f, 0.36f * CFDS, 0.96f, 0.80f, 0.1f, 0.12f, 0.00f, -0.001f * CFDS, 1, 0, 0, 0, 0, 1, 1, 86, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Singularity", ST_SOLID, TYPE_PART|PROP_LIFE_DEC, &update_SING, NULL}, + {"QRTZ", PIXPACK(0xAADDDD), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 3, "Quartz, breakable mineral. Conducts but becomes brittle at lower temperatures.", ST_SOLID, TYPE_SOLID|PROP_HOT_GLOW|PROP_LIFE_DEC, &update_QRTZ, &graphics_QRTZ}, + {"PQRT", PIXPACK(0x88BBBB), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.27f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 3, "Broken quartz.", ST_SOLID, TYPE_PART| PROP_HOT_GLOW, &update_QRTZ, &graphics_QRTZ}, + {"EMP", PIXPACK(0x66AAFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 3, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 121, "Breaks activated electronics.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_EMP, &graphics_EMP}, + {"BREL", PIXPACK(0x707060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.18f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken electronics", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, + {"ELEC", PIXPACK(0xDFEFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+200.0f+273.15f, 251, "Electrons", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_ELEC, &graphics_ELEC}, + {"ACEL", PIXPACK(0x0099CC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Accelerator", ST_NONE, TYPE_SOLID, &update_ACEL, &graphics_ACEL}, + {"DCEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Decelerator", ST_NONE, TYPE_SOLID, &update_DCEL, &graphics_DCEL}, + {"TNT", PIXPACK(0xC05050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_BANG, NULL}, + {"IGNC", PIXPACK(0xC0B050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Ignition cord.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL, &update_IGNT, NULL}, + {"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL}, + /*FREE*/{"LOTE", PIXPACK(0xFF0000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Behaves kinda like Living on the Edge S3458/B37/4", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"FRG2", PIXPACK(0x00FF00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Frogs rule S124/B3/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"STAR", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Star Wars rule S3456/B278/6", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"FROG", PIXPACK(0x00AA00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Frogs S12/B34/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"BRAN", PIXPACK(0xCCCC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Brian 6 S6/B246/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + /*FREE*/{"WIND", PIXPACK(0x101010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_SPECIAL, 0.0f, 40, "", ST_NONE, ST_NONE, NULL, NULL}, + {"HYGN", PIXPACK(0x5070FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.10f, 0.00f, 3.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 251, "Combines with O2 to make WATR", ST_GAS, TYPE_GAS, &update_H2, NULL}, + {"SOAP", PIXPACK(0xF5F5DC), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Soap. Creates bubbles.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_SOAP, NULL}, + {"BHOL", PIXPACK(0x202020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "Black hole (Requires newtonian gravity)", ST_SOLID, TYPE_SOLID, &update_NBHL, NULL}, + {"WHOL", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "White hole (Requires newtonian gravity)", ST_SOLID, TYPE_SOLID, &update_NWHL, NULL}, + {"MERC", PIXPACK(0x736B6D), 0.4f, 0.04f * CFDS, 0.94f, 0.80f, 0.0f, 0.3f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 91, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Mercury. Volume changes with temperature, Conductive.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_NEUTABSORB|PROP_LIFE_DEC, &update_MERC, NULL}, + {"PBCN", PIXPACK(0x3B1D0A), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Powered breakable clone", ST_NONE, TYPE_SOLID, &update_PBCN, &graphics_PBCN}, + {"GPMP", PIXPACK(0x0A3B3B), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, 0.0f +273.15f, 0, "Changes gravity to its temp when activated. (use HEAT/COOL).", ST_NONE, TYPE_SOLID, &update_GPMP, &graphics_GPMP}, + {"CLST", PIXPACK(0xE4A4A4), 0.7f, 0.02f * CFDS, 0.94f, 0.95f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Clay dust. Produces paste when mixed with water.", ST_SOLID, TYPE_PART, &update_CLST, &graphics_CLST}, + {"WIRE", PIXPACK(0xFFCC00), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 250, "WireWorld wires.",ST_SOLID,TYPE_SOLID,&update_WIRE, &graphics_WIRE}, + {"GBMB", PIXPACK(0x1144BB), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Sticks to first object it touches then produces strong gravity push.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GBMB, &graphics_GBMB}, + {"FIGH", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Fighter. Tries to kill stickmen.", ST_NONE, 0, &update_FIGH, &graphics_FIGH}, + //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description + }; + elementCount = PT_NUM; + part_type * ptypesT = (part_type*)malloc(PT_NUM*sizeof(part_type)); + memcpy(ptypesT, ptypes, PT_NUM*sizeof(part_type)); + return ptypesT; +} + +part_transition * LoadTransitions(int & transitionCount) +{ + #define IPL -257.0f + #define IPH 257.0f + #define ITL MIN_TEMP-1 + #define ITH MAX_TEMP+1 + // no transition (PT_NONE means kill part) + #define NT -1 + // special transition - lava ctypes etc need extra code, which is only found and run if ST is given + #define ST PT_NUM + part_transition ptransitions[PT_NUM] = + { // if low pressure if high pressure if low temperature if high temperature + // Name plv plt phv pht tlv tlt thv tht + /* NONE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DUST */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WATR */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, + /* OIL */ {IPL, NT, IPH, NT, ITL, NT, 333.0f, PT_GAS}, + /* FIRE */ {IPL, NT, IPH, NT, ITL, NT, 2773.0f,PT_PLSM}, + /* STNE */ {IPL, NT, IPH, NT, ITL, NT, 983.0f, PT_LAVA}, + /* LAVA */ {IPL, NT, IPH, NT, 2573.15f,ST, ITH, NT}, // 2573.15f is highest melt pt of possible ctypes + /* GUN */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* NITR */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* CLNE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GAS */ {IPL, NT, 6.0f, PT_OIL, ITL, NT, 573.0f, PT_FIRE}, + /* C-4 */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* GOO */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ICE */ {IPL, NT, 0.8f, PT_SNOW, ITL, NT, 233.0f, ST}, + /* METL */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_LAVA}, + /* SPRK */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SNOW */ {IPL, NT, IPH, NT, ITL, NT, 273.0f, PT_WATR}, + /* WOOD */ {IPL, NT, IPH, NT, ITL, NT, 873.0f, PT_FIRE}, + /* NEUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PLUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PLNT */ {IPL, NT, IPH, NT, ITL, NT, 573.0f, PT_FIRE}, + /* ACID */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VOID */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WTRV */ {IPL, NT, IPH, NT, 371.0f, ST, ITH, NT}, + /* CNCT */ {IPL, NT, IPH, NT, ITL, NT, 1123.0f,PT_LAVA}, + /* DSTW */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, + /* SALT */ {IPL, NT, IPH, NT, ITL, NT, 1173.0f,PT_LAVA}, + /* SLTW */ {IPL, NT, IPH, NT, 233.0f, PT_ICEI, 483.0f, ST}, + /* DMND */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BMTL */ {IPL, NT, 1.0f, ST, ITL, NT, 1273.0f,PT_LAVA}, + /* BRMT */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_LAVA}, + /* PHOT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* URAN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WAX */ {IPL, NT, IPH, NT, ITL, NT, 319.0f, PT_MWAX}, + /* MWAX */ {IPL, NT, IPH, NT, 318.0f, PT_WAX, 673.0f, PT_FIRE}, + /* PSCN */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* NSCN */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* LN2 */ {IPL, NT, IPH, NT, 63.0f, PT_NICE, 77.0f, PT_NONE}, + /* INSL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VACU */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VENT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* RBDM */ {IPL, NT, IPH, NT, ITL, NT, 312.0f, PT_LRBD}, + /* LRBD */ {IPL, NT, IPH, NT, 311.0f, PT_RBDM, 961.0f, PT_FIRE}, + /* NTCT */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* SAND */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, + /* GLAS */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, + /* PTCT */ {IPL, NT, IPH, NT, ITL, NT, 1414.0f,PT_LAVA}, + /* BGLA */ {IPL, NT, IPH, NT, ITL, NT, 1973.0f,PT_LAVA}, + /* THDR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PLSM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ETRD */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* NICE */ {IPL, NT, IPH, NT, ITL, NT, 63.1f, PT_LNTG}, + /* NBLE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BTRY */ {IPL, NT, IPH, NT, ITL, NT, 2273.0f,PT_PLSM}, + /* LCRY */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_BGLA}, + /* STKM */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, + /* SWCH */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SMKE */ {IPL, NT, IPH, NT, ITL, NT, 625.0f, PT_FIRE}, + /* DESL */ {IPL, NT, 5.0f, PT_FIRE, ITL, NT, 335.0f, PT_FIRE}, + /* COAL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* LO2 */ {IPL, NT, IPH, NT, ITL, NT, 90.1f, PT_O2}, + /* O2 */ {IPL, NT, IPH, NT, 90.0f, PT_LO2, ITH, NT}, + /* INWR */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* YEST */ {IPL, NT, IPH, NT, ITL, NT, 373.0f, PT_DYST}, + /* DYST */ {IPL, NT, IPH, NT, ITL, NT, 473.0f, PT_DUST}, + /* THRM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GLOW */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BRCK */ {IPL, NT, 8.8f, PT_STNE, ITL, NT, 1223.0f,PT_LAVA}, + /* CFLM */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FIRW */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FUSE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FSEP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* AMTR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BCOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PCLN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* HSWC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* IRON */ {IPL, NT, IPH, NT, ITL, NT, 1687.0f,PT_LAVA}, + /* MORT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* LIFE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DLAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* CO2 */ {IPL, NT, IPH, NT, 194.65f,PT_DRIC, ITH, NT}, + /* DRIC */ {IPL, NT, IPH, NT, ITL, NT, 195.65f,PT_CO2}, + /* CBNW */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, + /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SPNG */ {IPL, NT, IPH, NT, ITL, NT, 2730.0f,PT_FIRE}, + /* RIME */ {IPL, NT, IPH, NT, ITL, NT, 273.15f,PT_WATR}, + /* FOG */ {IPL, NT, IPH, NT, ITL, NT, 373.15f,PT_WTRV}, + /* BCLN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* LOVE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DEUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WARP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PUMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FWRK */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PIPE */ {IPL, NT, 10.0f, PT_BRMT, ITL, NT, ITH, NT}, + /* FRZZ */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FRZW */ {IPL, NT, IPH, NT, ITL, NT, 53.0f, PT_ICEI}, + /* GRAV */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BIZR */ {IPL, NT, IPH, NT, 100.0f, PT_BIZRG, 400.0f, PT_BIZRS}, + /* BIZRG*/ {IPL, NT, IPH, NT, ITL, NT, 100.0f, PT_BIZR},//, 400.0f, PT_BIZRS}, + /* BIZRS*/ {IPL, NT, IPH, NT, 400.0f, PT_BIZR, ITH, NT},// 100.0f, PT_BIZRG}, + /* INST */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ISOZ */ {IPL, NT, IPH, NT, 160.0f, PT_ISZS, ITH, NT}, + /* ISZS */ {IPL, NT, IPH, NT, ITL, NT, 300.0f, PT_ISOZ}, + /* PRTI */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PRTO */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PSTE */ {IPL, NT, 0.5f, PT_PSTS, ITL, NT, 747.0f, PT_BRCK}, + /* PSTS */ {0.5f, PT_PSTE, IPH, NT, ITL, NT, ITH, NT}, + /* ANAR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* VINE */ {IPL, NT, IPH, NT, ITL, NT, 573.0f, PT_FIRE}, + /* INVS */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* EQVE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SPWN2*/ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SPAWN*/ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SHLD1*/ {IPL, NT, 7.0f, PT_NONE, ITL, NT, ITH, NT}, + /* SHLD2*/ {IPL, NT, 15.0f, PT_NONE, ITL, NT, ITH, NT}, + /* SHLD3*/ {IPL, NT, 25.0f, PT_NONE, ITL, NT, ITH, NT}, + /* SHLD4*/ {IPL, NT, 40.0f, PT_NONE, ITL, NT, ITH, NT}, + /* LOlZ */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WIFI */ {IPL, NT, 15.0f, PT_BRMT, ITL, NT, ITH, NT}, + /* FILT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ARAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BRAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* STKM2*/ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, + /* BOMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* C-5 */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SING */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* QRTZ */ {IPL, NT, IPH, NT, ITL, NT, 2573.15f,PT_LAVA}, + /* PQRT */ {IPL, NT, IPH, NT, ITL, NT, 2573.15f,PT_LAVA}, + /* EMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* BREL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ELEC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* ACEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* DCEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* TNT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* IGNP */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, + /* BOYL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* WIND */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* H2 */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* SOAP */ {IPL, NT, IPH, NT, ITL, NT, ITL, NT}, + /* NBHL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* NWHL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* MERC */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* PBCN */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GPMP */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* CLST */ {IPL, NT, IPH, NT, ITL, NT, 1256.0f, PT_LAVA}, + /* WIRE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GBMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FIGH */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, + }; + #undef IPL + #undef IPH + #undef ITL + #undef ITH + #undef NT + #undef ST + transitionCount = PT_NUM; + part_transition * ptransitionsT = (part_transition*)malloc(PT_NUM*sizeof(part_transition)); + memcpy(ptransitionsT, ptransitions, PT_NUM*sizeof(part_transition)); + return ptransitionsT; +} diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h new file mode 100644 index 0000000..e327094 --- /dev/null +++ b/src/simulation/SimulationData.h @@ -0,0 +1,49 @@ +/* + * SimulationData.h + * + * Created on: Jan 24, 2012 + * Author: Simon + */ + +#define SC_WALL 0 +#define SC_ELEC 1 +#define SC_POWERED 2 +#define SC_EXPLOSIVE 3 +#define SC_GAS 4 +#define SC_LIQUID 5 +#define SC_POWDERS 6 +#define SC_SOLIDS 7 +#define SC_NUCLEAR 8 +#define SC_SPECIAL 9 +#define SC_LIFE 10 +#define SC_TOOL 11 +#define SC_CRACKER 13 +#define SC_CRACKER2 14 +#define SC_TOTAL 12 + +#ifndef SIMULATIONDATA_H_ +#define SIMULATIONDATA_H_ + +#include "Simulation.h" + +/*class Simulation; +class Renderer; +struct Particle;*/ + +struct part_type; + +struct part_transition; + +struct wall_type; + +struct gol_menu; + +struct menu_section; + +menu_section * LoadMenus(int & menuCount); + +part_type * LoadElements(int & elementCount); + +part_transition * LoadTransitions(int & transitionCount); + +#endif /* SIMULATIONDATA_H_ */ -- cgit v0.9.2-21-gd62e From 04e4a2346d3d7ef6e0f0b38d8eafc928dc6e30bd Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 24 Jan 2012 21:19:29 +0000 Subject: Wall menus diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 8f16f49..3271f3a 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -30,6 +30,13 @@ GameModel::GameModel(): menuList[sim->ptypes[i].menusection]->AddTool(tempTool); } } + //Build other menus from wall data + for(int i = 0; i < UI_WALLCOUNT; i++) + { + Tool * tempTool = new ElementTool(i+UI_WALLSTART, "", PIXR(sim->wtypes[i].colour), PIXG(sim->wtypes[i].colour), PIXB(sim->wtypes[i].colour)); + menuList[SC_WALL]->AddTool(tempTool); + //sim->wtypes[i] + } activeTool = new ElementTool(1, "TURD", 0, 0, 0); } diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 8438e1b..d452756 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -412,6 +412,7 @@ void GameView::OnDraw() ren->render_parts(); ren->render_fire(); ren->render_signs(); + ren->draw_walls(); } if(activeBrush && currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) { diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index e938efd..61d8ae7 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3186,6 +3186,10 @@ Simulation::Simulation(): menu_section * msectionsT = LoadMenus(menuCount); memcpy(msections, msectionsT, menuCount * sizeof(menu_section)); + int wallCount; + wall_type * wtypesT = LoadWalls(wallCount); + memcpy(wtypes, wtypesT, wallCount * sizeof(wall_type)); + int elementCount; part_type * ptypesT = LoadElements(elementCount); memcpy(ptypes, ptypesT, elementCount * sizeof(part_type)); diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index f5a3ff7..6b19727 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -8,6 +8,42 @@ #include "ElementFunctions.h" #include "ElementGraphics.h" +wall_type * LoadWalls(int & wallCount) +{ + wall_type wtypes[] = + { + {PIXPACK(0xC0C0C0), PIXPACK(0x101010), 0, "Wall. Indestructible. Blocks everything. Conductive."}, + {PIXPACK(0x808080), PIXPACK(0x808080), 0, "E-Wall. Becomes transparent when electricity is connected."}, + {PIXPACK(0xFF8080), PIXPACK(0xFF2008), 1, "Detector. Generates electricity when a particle is inside."}, + {PIXPACK(0x808080), PIXPACK(0x000000), 0, "Streamline. Set start point of a streamline."}, + {PIXPACK(0x808080), PIXPACK(0x000000), 0, "Sign. Click on a sign to edit it or anywhere else to place a new one."}, + {PIXPACK(0x8080FF), PIXPACK(0x000000), 1, "Fan. Accelerates air. Use line tool to set direction and strength."}, + {PIXPACK(0xC0C0C0), PIXPACK(0x101010), 2, "Wall. Blocks most particles but lets liquids through. Conductive."}, + {PIXPACK(0x808080), PIXPACK(0x000000), 1, "Wall. Absorbs particles but lets air currents through."}, + {PIXPACK(0x808080), PIXPACK(0x000000), 0, "Erases walls."}, + {PIXPACK(0x808080), PIXPACK(0x000000), 3, "Wall. Indestructible. Blocks everything."}, + {PIXPACK(0x3C3C3C), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks particles, allows air"}, + {PIXPACK(0x575757), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks liquids and gasses, allows solids"}, + {PIXPACK(0xFFFF22), PIXPACK(0x101010), 2, "Conductor, allows particles, conducts electricity"}, + {PIXPACK(0x242424), PIXPACK(0x101010), 0, "E-Hole, absorbs particles, release them when powered"}, + {PIXPACK(0xFFFFFF), PIXPACK(0x000000), -1, "Air, creates airflow and pressure"}, + {PIXPACK(0xFFBB00), PIXPACK(0x000000), -1, "Heats the targetted element."}, + {PIXPACK(0x00BBFF), PIXPACK(0x000000), -1, "Cools the targetted element."}, + {PIXPACK(0x303030), PIXPACK(0x000000), -1, "Vacuum, reduces air pressure."}, + {PIXPACK(0x579777), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks liquids and solids, allows gasses"}, + {PIXPACK(0x000000), PIXPACK(0x000000), -1, "Drag tool"}, + {PIXPACK(0xFFEE00), PIXPACK(0xAA9900), 4, "Gravity wall"}, + {PIXPACK(0x0000BB), PIXPACK(0x000000), -1, "Postive gravity tool."}, + {PIXPACK(0x000099), PIXPACK(0x000000), -1, "Negative gravity tool."}, + {PIXPACK(0xFFAA00), PIXPACK(0xAA5500), 4, "Energy wall, allows only energy type particles to pass"}, + {PIXPACK(0xFFAA00), PIXPACK(0xAA5500), -1, "Property edit tool"}, + }; + wallCount = SC_TOTAL; + wall_type * wtypesT = (wall_type*)malloc(SC_TOTAL*sizeof(wall_type)); + memcpy(wtypesT, wtypes, SC_TOTAL*sizeof(wall_type)); + return wtypesT; +} + menu_section * LoadMenus(int & menuCount) { menu_section msections[] = //doshow does not do anything currently. diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index e327094..37bfb37 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -21,6 +21,39 @@ #define SC_CRACKER2 14 #define SC_TOTAL 12 +#define UI_WALLSTART 222 +#define UI_ACTUALSTART 122 +#define UI_WALLCOUNT 25 + +#define WL_WALLELEC 122 +#define WL_EWALL 123 +#define WL_DETECT 124 +#define WL_STREAM 125 +#define WL_SIGN 126 +#define WL_FAN 127 +#define WL_FANHELPER 255 +#define WL_ALLOWLIQUID 128 +#define WL_DESTROYALL 129 +#define WL_ERASE 130 +#define WL_WALL 131 +#define WL_ALLOWAIR 132 +#define WL_ALLOWSOLID 133 +#define WL_ALLOWALLELEC 134 +#define WL_EHOLE 135 + +#define SPC_AIR 236 +#define SPC_HEAT 237 +#define SPC_COOL 238 +#define SPC_VACUUM 239 +#define SPC_WIND 241 +#define SPC_PGRV 243 +#define SPC_NGRV 244 +#define SPC_PROP 246 + +#define WL_ALLOWGAS 140 +#define WL_GRAV 142 +#define WL_ALLOWENERGY 145 + #ifndef SIMULATIONDATA_H_ #define SIMULATIONDATA_H_ @@ -40,6 +73,10 @@ struct gol_menu; struct menu_section; +struct wall_type; + +wall_type * LoadWalls(int & wallCount); + menu_section * LoadMenus(int & menuCount); part_type * LoadElements(int & elementCount); -- cgit v0.9.2-21-gd62e From 35858ef6073092f8447bbec8b18b768061cf8bd0 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 24 Jan 2012 23:33:32 +0000 Subject: Fix textbox diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 0d3c75c..c7b6da0 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -32,6 +32,7 @@ SDL_Surface * SDLOpen() fprintf(stderr, "Initializing SDL: %s\n", SDL_GetError()); return 0; } + SDL_EnableUNICODE(1); #if defined(WIN32) && defined(WINCONSOLE) //On Windows, SDL redirects stdout to stdout.txt, which can be annoying when debugging, here we redirect back to the console if (console) @@ -84,7 +85,7 @@ int main(int argc, char * argv[]) engine->Exit(); break; case SDL_KEYDOWN: - engine->onKeyPress(event.key.keysym.sym, false, false, false); + engine->onKeyPress(event.key.keysym.unicode, false, false, false); break; case SDL_KEYUP: break; @@ -133,7 +134,14 @@ int main(int argc, char * argv[]) fps = (((float)currentFrame)/((float)elapsedTime))*1000.0f; currentFrame = 0; lastTime = currentTime; - delta = 60.0f/fps; + if(ui::Engine::Ref().FpsLimit > 2.0f) + { + delta = ui::Engine::Ref().FpsLimit/fps; + } + else + { + delta = 1.0f; + } } } ui::Engine::Ref().CloseWindow(); diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 94c3dbc..d0bfd97 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -20,7 +20,7 @@ Client::Client() { int i = 0; - http_init("wwwcache.lancs.ac.uk:8080"); + http_init(NULL); for(i = 0; i < THUMB_CACHE_SIZE; i++) { thumbnailCache[i] = NULL; diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 5358c4b..b00c802 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -28,14 +28,22 @@ GameController::~GameController() { if(search) { - ui::Engine::Ref().CloseWindow(); + if(ui::Engine::Ref().GetWindow() == search->GetView()) + ui::Engine::Ref().CloseWindow(); delete search; } if(renderOptions) { - ui::Engine::Ref().CloseWindow(); + if(ui::Engine::Ref().GetWindow() == renderOptions->GetView()) + ui::Engine::Ref().CloseWindow(); delete renderOptions; } + if(loginWindow) + { + if(ui::Engine::Ref().GetWindow() == loginWindow->GetView()) + ui::Engine::Ref().CloseWindow(); + delete loginWindow; + } delete gameView; delete gameModel; } diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index a505635..9778a5d 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -144,7 +144,7 @@ void Engine::Tick(float dt) { state_->Position.Y += windowTargetPosition.Y/20; }*/ - windowOpenState += 0.05f*dt; + windowOpenState += 0.05f;//*dt; } /*if(statequeued_ != NULL) diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp index 380ad59..328ccb5 100644 --- a/src/interface/Textbox.cpp +++ b/src/interface/Textbox.cpp @@ -1,4 +1,5 @@ #include +#include #include #include "Config.h" #include "Global.h" @@ -157,6 +158,7 @@ void Textbox::OnKeyPress(int key, bool shift, bool ctrl, bool alt) if(cursor == text.length()) { text += key; + //std::cout << key << std::endl; } else { diff --git a/src/login/LoginController.cpp b/src/login/LoginController.cpp index 3172398..64c8221 100644 --- a/src/login/LoginController.cpp +++ b/src/login/LoginController.cpp @@ -22,7 +22,18 @@ void LoginController::Login(string username, string password) loginModel->Login(username, password); } +void LoginController::Exit() +{ + if(ui::Engine::Ref().GetWindow() == loginView) + { + ui::Engine::Ref().CloseWindow(); + loginView = NULL; + } +} + LoginController::~LoginController() { - // TODO Auto-generated destructor stub + if(loginView) + delete loginView; + delete loginModel; } diff --git a/src/login/LoginController.h b/src/login/LoginController.h index ecd30a3..2df28ab 100644 --- a/src/login/LoginController.h +++ b/src/login/LoginController.h @@ -22,6 +22,7 @@ class LoginController { public: LoginController(); void Login(string username, string password); + void Exit(); LoginView * GetView() { return loginView; } virtual ~LoginController(); diff --git a/src/login/LoginView.cpp b/src/login/LoginView.cpp index bb88c15..9becd17 100644 --- a/src/login/LoginView.cpp +++ b/src/login/LoginView.cpp @@ -18,6 +18,17 @@ public: } }; +class LoginView::CancelAction : public ui::ButtonAction +{ + LoginView * v; +public: + CancelAction(LoginView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->Exit(); + } +}; + LoginView::LoginView(): ui::Window(ui::Point(-1, -1), ui::Point(200, 100)), loginButton(new ui::Button(ui::Point(200-50, 100-16), ui::Point(50, 16), "Login")), @@ -32,6 +43,7 @@ LoginView::LoginView(): loginButton->SetActionCallback(new LoginAction(this)); AddComponent(cancelButton); cancelButton->SetAlignment(AlignCentre, AlignBottom); + cancelButton->SetActionCallback(new CancelAction(this)); AddComponent(titleLabel); titleLabel->SetAlignment(AlignLeft, AlignBottom); AddComponent(usernameField); diff --git a/src/login/LoginView.h b/src/login/LoginView.h index 2646e99..1099278 100644 --- a/src/login/LoginView.h +++ b/src/login/LoginView.h @@ -27,6 +27,7 @@ class LoginView: public ui::Window { ui::Textbox * passwordField; public: class LoginAction; + class CancelAction; LoginView(); void AttachController(LoginController * c_) { c = c_; } void NotifyStatusChanged(LoginModel * sender); -- cgit v0.9.2-21-gd62e From 9cdf2b5902b692bed2d27c28bd51a506d052bbfb Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 25 Jan 2012 00:57:39 +0000 Subject: Login complete (minus brokenness) diff --git a/src/client/Client.cpp b/src/client/Client.cpp index d0bfd97..0070e65 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -7,6 +7,7 @@ #include "Config.h" #include "Client.h" +#include "MD5.h" #include "Graphics.h" #include "interface/Point.h" @@ -41,29 +42,60 @@ Client::~Client() LoginStatus Client::Login(string username, string password) { + lastError = ""; std::stringstream urlStream; + std::stringstream hashStream; + unsigned char cHashData[16]; + + //Build hash of username + password + struct md5_context md5; + md5_init(&md5); + md5_update(&md5, (unsigned char *)username.c_str(), username.length()); + md5_update(&md5, (unsigned char *)"-", 1); + md5_update(&md5, (unsigned char *)password.c_str(), password.length()); + md5_final(cHashData, &md5); + //Make sure hash is Hex + //char * cHashHex = (char *)malloc(33); + for(int i = 0; i < 16; i++) + { + hashStream << hexChars[cHashData[i]>>4] << hexChars[cHashData[i]&15]; + //cHashHex[i*2] = hex[cHashData[i]>>4]; + //cHashHex[i*2+1] = hex[cHashData[i]&15]; + } + //cHashHex[32] = 0; + char * data; int dataStatus, dataLength; - data = http_auth_get("http://" SERVER "/Login.json", (char*)username.c_str(), (char*)password.c_str(), NULL, &dataStatus, &dataLength); + char * postNames[] = { "Username", "Hash", NULL }; + char * postDatas[] = { (char*)username.c_str(), (char*)hashStream.str().c_str() }; + int postLengths[] = { username.length(), hashStream.str().length() }; + data = http_multipart_post("http://" SERVER "/Login.json", postNames, postDatas, postLengths, NULL, NULL, NULL, &dataStatus, &dataLength); + //data = http_auth_get("http://" SERVER "/Login.json", (char*)username.c_str(), (char*)password.c_str(), NULL, &dataStatus, &dataLength); std::cout << data << std::endl; if(dataStatus == 200 && data) { - std::istringstream dataStream(data); - json::Object objDocument; - json::Reader::Read(objDocument, dataStream); - json::Number tempStatus = objDocument["Status"]; - - free(data); - if(tempStatus.Value() == 1) - { - return LoginOkay; - } - else if(tempStatus.Value() == 0) + try { - return LoginPasswordInvalid; + std::istringstream dataStream(data); + json::Object objDocument; + json::Reader::Read(objDocument, dataStream); + json::Number tempStatus = objDocument["Status"]; + + free(data); + if(tempStatus.Value() == 1) + { + return LoginOkay; + } + else + { + json::String tempError = objDocument["Error"]; + lastError = tempError.Value(); + return LoginError; + } } - else + catch (json::Exception &e) { + lastError = "Server responded with crap"; return LoginError; } } diff --git a/src/client/Client.h b/src/client/Client.h index 644fb06..ef6a35e 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -12,7 +12,7 @@ enum LoginStatus { - LoginPasswordInvalid, LoginUsernameInvalid, LoginOkay, LoginBanned, LoginError + LoginOkay, LoginError }; class Client: public Singleton diff --git a/src/client/HTTP.cpp b/src/client/HTTP.cpp index 7514515..a94ac73 100644 --- a/src/client/HTTP.cpp +++ b/src/client/HTTP.cpp @@ -679,7 +679,6 @@ char *http_simple_get(char *uri, int *ret, int *len) } return http_async_req_stop(ctx, ret, len); } -static char hex[] = "0123456789abcdef"; void http_auth_headers(void *ctx, char *user, char *pass, char *session_id) { char *tmp; @@ -702,8 +701,8 @@ void http_auth_headers(void *ctx, char *user, char *pass, char *session_id) tmp = (char *)malloc(33); for (i=0; i<16; i++) { - tmp[i*2] = hex[hash[i]>>4]; - tmp[i*2+1] = hex[hash[i]&15]; + tmp[i*2] = hexChars[hash[i]>>4]; + tmp[i*2+1] = hexChars[hash[i]&15]; } tmp[32] = 0; http_async_add_header(ctx, "X-Auth-Hash", tmp); @@ -1032,8 +1031,8 @@ retry: tmp = (char *)malloc(33); for (i=0; i<16; i++) { - tmp[i*2] = hex[hash[i]>>4]; - tmp[i*2+1] = hex[hash[i]&15]; + tmp[i*2] = hexChars[hash[i]>>4]; + tmp[i*2+1] = hexChars[hash[i]&15]; } tmp[32] = 0; http_async_add_header(ctx, "X-Auth-Hash", tmp); diff --git a/src/client/HTTP.h b/src/client/HTTP.h index af0971c..51b9438 100644 --- a/src/client/HTTP.h +++ b/src/client/HTTP.h @@ -20,6 +20,8 @@ #ifndef HTTP_H #define HTTP_H +static char hexChars[] = "0123456789abcdef"; + void http_init(char *proxy); void http_done(void); diff --git a/src/login/LoginModel.cpp b/src/login/LoginModel.cpp index 7940cf0..185df68 100644 --- a/src/login/LoginModel.cpp +++ b/src/login/LoginModel.cpp @@ -24,17 +24,8 @@ void LoginModel::Login(string username, string password) statusText = "Logged in"; loginStatus = true; break; - case LoginPasswordInvalid: - statusText = "Username or Password incorrect"; - break; - case LoginUsernameInvalid: - statusText = "Username incorrect"; - break; - case LoginBanned: - statusText = "Banned: " + Client::Ref().GetLastError(); - break; - default: - statusText = "Error"; + case LoginError: + statusText = "Error: " + Client::Ref().GetLastError(); break; } notifyStatusChanged(); -- cgit v0.9.2-21-gd62e From 3505bcc275dc2e276386e51b1dc13325d4eefa07 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 25 Jan 2012 00:59:19 +0000 Subject: Login window close on success diff --git a/src/login/LoginView.cpp b/src/login/LoginView.cpp index 9becd17..e73d014 100644 --- a/src/login/LoginView.cpp +++ b/src/login/LoginView.cpp @@ -58,6 +58,10 @@ LoginView::LoginView(): void LoginView::NotifyStatusChanged(LoginModel * sender) { infoLabel->SetText(sender->GetStatusText()); + if(sender->GetStatus()) + { + c->Exit(); + } } void LoginView::OnDraw() -- cgit v0.9.2-21-gd62e From 8b80942b16fd6292884fb3208bc52c29a25cfff8 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 25 Jan 2012 17:21:55 +0000 Subject: Login working, segfaults sometimes diff --git a/src/Controller.h b/src/Controller.h new file mode 100644 index 0000000..5d18f36 --- /dev/null +++ b/src/Controller.h @@ -0,0 +1,19 @@ +/* + * Controller.h + * + * Created on: Jan 25, 2012 + * Author: Simon + */ + +#ifndef CONTROLLER_H_ +#define CONTROLLER_H_ + +class ControllerCallback +{ +public: + ControllerCallback() {} + virtual void ControllerExit() {} + virtual ~ControllerCallback() {} +}; + +#endif /* CONTROLLER_H_ */ diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 0070e65..b6fe2a4 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -40,35 +40,31 @@ Client::~Client() http_done(); } -LoginStatus Client::Login(string username, string password) +LoginStatus Client::Login(string username, string password, User & user) { lastError = ""; std::stringstream urlStream; std::stringstream hashStream; - unsigned char cHashData[16]; + char passwordHash[33]; + char totalHash[33]; - //Build hash of username + password - struct md5_context md5; - md5_init(&md5); - md5_update(&md5, (unsigned char *)username.c_str(), username.length()); - md5_update(&md5, (unsigned char *)"-", 1); - md5_update(&md5, (unsigned char *)password.c_str(), password.length()); - md5_final(cHashData, &md5); - //Make sure hash is Hex - //char * cHashHex = (char *)malloc(33); - for(int i = 0; i < 16; i++) - { - hashStream << hexChars[cHashData[i]>>4] << hexChars[cHashData[i]&15]; - //cHashHex[i*2] = hex[cHashData[i]>>4]; - //cHashHex[i*2+1] = hex[cHashData[i]&15]; - } - //cHashHex[32] = 0; + user.ID = 0; + user.Username = ""; + user.SessionID = ""; + user.SessionKey = ""; + + //Doop + md5_ascii(passwordHash, (const unsigned char *)password.c_str(), password.length()); + passwordHash[32] = 0; + hashStream << username << "-" << passwordHash; + md5_ascii(totalHash, (const unsigned char *)(hashStream.str().c_str()), hashStream.str().length()); + totalHash[32] = 0; char * data; int dataStatus, dataLength; char * postNames[] = { "Username", "Hash", NULL }; - char * postDatas[] = { (char*)username.c_str(), (char*)hashStream.str().c_str() }; - int postLengths[] = { username.length(), hashStream.str().length() }; + char * postDatas[] = { (char*)username.c_str(), totalHash }; + int postLengths[] = { username.length(), 32 }; data = http_multipart_post("http://" SERVER "/Login.json", postNames, postDatas, postLengths, NULL, NULL, NULL, &dataStatus, &dataLength); //data = http_auth_get("http://" SERVER "/Login.json", (char*)username.c_str(), (char*)password.c_str(), NULL, &dataStatus, &dataLength); std::cout << data << std::endl; @@ -84,6 +80,13 @@ LoginStatus Client::Login(string username, string password) free(data); if(tempStatus.Value() == 1) { + json::Number userIDTemp = objDocument["UserID"]; + json::String sessionIDTemp = objDocument["SessionID"]; + json::String sessionKeyTemp = objDocument["SessionKey"]; + user.Username = username; + user.ID = userIDTemp.Value(); + user.SessionID = sessionIDTemp.Value(); + user.SessionKey = sessionKeyTemp.Value(); return LoginOkay; } else @@ -99,6 +102,10 @@ LoginStatus Client::Login(string username, string password) return LoginError; } } + else + { + lastError = http_ret_text(dataStatus); + } if(data) { free(data); diff --git a/src/client/Client.h b/src/client/Client.h index ef6a35e..15ab03a 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -9,6 +9,7 @@ #include "search/Thumbnail.h" #include "search/Save.h" #include "Singleton.h" +#include "User.h" enum LoginStatus { @@ -28,7 +29,7 @@ private: public: Client(); ~Client(); - LoginStatus Login(string username, string password); + LoginStatus Login(string username, string password, User & user); void ClearThumbnailRequests(); std::vector * SearchSaves(int start, int count, string query, string sort, int & resultCount); Thumbnail * GetPreview(int saveID, int saveDate); diff --git a/src/client/MD5.cpp b/src/client/MD5.cpp index 9cb398c..d921bfa 100644 --- a/src/client/MD5.cpp +++ b/src/client/MD5.cpp @@ -208,7 +208,7 @@ void md5_transform(unsigned buf[4], const unsigned char inraw[64]) buf[3] += d; } -static char hex[] = "0123456789abcdef"; +static char hexChars[] = "0123456789abcdef"; void md5_ascii(char *result, unsigned char const *buf, unsigned len) { struct md5_context md5; @@ -224,8 +224,8 @@ void md5_ascii(char *result, unsigned char const *buf, unsigned len) for (i=0; i<16; i++) { - result[i*2] = hex[(hash[i]>>4)&0xF]; - result[i*2+1] = hex[hash[i]&0x0F]; + result[i*2] = hexChars[(hash[i]>>4)&0xF]; + result[i*2+1] = hexChars[hash[i]&0x0F]; } result[32] = 0; } diff --git a/src/client/User.h b/src/client/User.h new file mode 100644 index 0000000..9dd231c --- /dev/null +++ b/src/client/User.h @@ -0,0 +1,29 @@ +/* + * User.h + * + * Created on: Jan 25, 2012 + * Author: Simon + */ + +#ifndef USER_H_ +#define USER_H_ + +#include + +class User +{ +public: + int ID; + std::string Username; + std::string SessionID; + std::string SessionKey; + User(int id, std::string username): + ID(id), + Username(username) + { + + } +}; + + +#endif /* USER_H_ */ diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index b00c802..d7c9633 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -11,9 +11,23 @@ using namespace std; +class GameController::LoginCallback: public ControllerCallback +{ + GameController * cc; +public: + LoginCallback(GameController * cc_) { cc = cc_; } + virtual void ControllerExit() + { + cc->gameModel->SetUser(cc->loginWindow->GetUser()); + delete cc->loginWindow; + cc->loginWindow = NULL; + } +}; + GameController::GameController(): search(NULL), - renderOptions(NULL) + renderOptions(NULL), + loginWindow(NULL) { gameView = new GameView(); gameModel = new GameModel(); @@ -135,7 +149,7 @@ void GameController::OpenSearch() void GameController::OpenLogin() { - loginWindow = new LoginController(); + loginWindow = new LoginController(new LoginCallback(this)); ui::Engine::Ref().ShowWindow(loginWindow->GetView()); } diff --git a/src/game/GameController.h b/src/game/GameController.h index 67afdc4..157df99 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -25,6 +25,7 @@ private: RenderController * renderOptions; LoginController * loginWindow; public: + class LoginCallback; GameController(); ~GameController(); GameView * GetView(); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 3271f3a..8062c64 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -11,7 +11,8 @@ GameModel::GameModel(): sim(NULL), ren(NULL), currentSave(NULL), - currentBrush(new Brush(ui::Point(4, 4))) + currentBrush(new Brush(ui::Point(4, 4))), + currentUser(0, "") { sim = new Simulation(); ren = new Renderer(ui::Engine::Ref().g, sim); @@ -132,6 +133,17 @@ Renderer * GameModel::GetRenderer() return ren; } +User GameModel::GetUser() +{ + return currentUser; +} + +void GameModel::SetUser(User user) +{ + currentUser = user; + notifyUserChanged(); +} + void GameModel::SetPaused(bool pauseState) { sim->sys_pause = pauseState?1:0; @@ -211,3 +223,11 @@ void GameModel::notifyActiveToolChanged() observers[i]->NotifyActiveToolChanged(this); } } + +void GameModel::notifyUserChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyUserChanged(this); + } +} diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 14319e7..b8f5217 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -7,6 +7,7 @@ #include "Renderer.h" #include "GameView.h" #include "Brush.h" +#include "client/User.h" #include "Tool.h" #include "Menu.h" @@ -29,6 +30,7 @@ private: Simulation * sim; Renderer * ren; Tool * activeTool; + User currentUser; void notifyRendererChanged(); void notifySimulationChanged(); void notifyPausedChanged(); @@ -37,6 +39,7 @@ private: void notifyMenuListChanged(); void notifyToolListChanged(); void notifyActiveToolChanged(); + void notifyUserChanged(); public: GameModel(); ~GameModel(); @@ -53,7 +56,8 @@ public: vector GetToolList(); void SetActiveMenu(Menu * menu); Menu * GetActiveMenu(); - + User GetUser(); + void SetUser(User user); Simulation * GetSimulation(); Renderer * GetRenderer(); }; diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index d452756..70f6663 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -305,6 +305,18 @@ void GameView::NotifySimulationChanged(GameModel * sender) { } +void GameView::NotifyUserChanged(GameModel * sender) +{ + if(!sender->GetUser().ID) + { + loginButton->SetText("Login"); + } + else + { + loginButton->SetText(sender->GetUser().Username); + } +} + void GameView::NotifyPausedChanged(GameModel * sender) { diff --git a/src/game/GameView.h b/src/game/GameView.h index ef35536..f0c3e82 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -48,6 +48,7 @@ public: void NotifyMenuListChanged(GameModel * sender); void NotifyToolListChanged(GameModel * sender); void NotifyActiveToolChanged(GameModel * sender); + void NotifyUserChanged(GameModel * sender); virtual void OnMouseMove(int x, int y, int dx, int dy); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 9778a5d..a822079 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -18,7 +18,7 @@ Engine::Engine(): mousey_(0), mousexp_(0), mouseyp_(0), - FpsLimit(0.0f), + FpsLimit(60.0f), windows(stack()), lastBuffer(NULL), prevBuffers(stack()), diff --git a/src/login/LoginController.cpp b/src/login/LoginController.cpp index 64c8221..5a81a55 100644 --- a/src/login/LoginController.cpp +++ b/src/login/LoginController.cpp @@ -6,8 +6,9 @@ */ #include "LoginController.h" +#include "client/User.h" -LoginController::LoginController() { +LoginController::LoginController(ControllerCallback * callback) { // TODO Auto-generated constructor stub loginView = new LoginView(); loginModel = new LoginModel(); @@ -15,6 +16,8 @@ LoginController::LoginController() { loginView->AttachController(this); loginModel->AddObserver(loginView); + this->callback = callback; + } void LoginController::Login(string username, string password) @@ -22,6 +25,11 @@ void LoginController::Login(string username, string password) loginModel->Login(username, password); } +User LoginController::GetUser() +{ + return loginModel->GetUser(); +} + void LoginController::Exit() { if(ui::Engine::Ref().GetWindow() == loginView) @@ -29,6 +37,8 @@ void LoginController::Exit() ui::Engine::Ref().CloseWindow(); loginView = NULL; } + if(callback) + callback->ControllerExit(); } LoginController::~LoginController() { diff --git a/src/login/LoginController.h b/src/login/LoginController.h index 2df28ab..eb15d64 100644 --- a/src/login/LoginController.h +++ b/src/login/LoginController.h @@ -11,6 +11,8 @@ #include #include "LoginView.h" #include "LoginModel.h" +#include "Controller.h" +#include "client/User.h" using namespace std; @@ -19,12 +21,13 @@ class LoginModel; class LoginController { LoginView * loginView; LoginModel * loginModel; + ControllerCallback * callback; public: - LoginController(); + LoginController(ControllerCallback * callback = NULL); void Login(string username, string password); void Exit(); LoginView * GetView() { return loginView; } - + User GetUser(); virtual ~LoginController(); }; diff --git a/src/login/LoginModel.cpp b/src/login/LoginModel.cpp index 185df68..3015613 100644 --- a/src/login/LoginModel.cpp +++ b/src/login/LoginModel.cpp @@ -7,7 +7,9 @@ #include "LoginModel.h" -LoginModel::LoginModel() { +LoginModel::LoginModel(): + currentUser(0, "") +{ // TODO Auto-generated constructor stub } @@ -17,7 +19,7 @@ void LoginModel::Login(string username, string password) statusText = "Logging in..."; loginStatus = false; notifyStatusChanged(); - LoginStatus status = Client::Ref().Login(username, password); + LoginStatus status = Client::Ref().Login(username, password, currentUser); switch(status) { case LoginOkay: @@ -41,6 +43,11 @@ string LoginModel::GetStatusText() return statusText; } +User LoginModel::GetUser() +{ + return currentUser; +} + bool LoginModel::GetStatus() { return loginStatus; diff --git a/src/login/LoginModel.h b/src/login/LoginModel.h index cd10a5d..121d78e 100644 --- a/src/login/LoginModel.h +++ b/src/login/LoginModel.h @@ -21,12 +21,14 @@ class LoginModel { string statusText; bool loginStatus; void notifyStatusChanged(); + User currentUser; public: LoginModel(); void Login(string username, string password); void AddObserver(LoginView * observer); string GetStatusText(); bool GetStatus(); + User GetUser(); virtual ~LoginModel(); }; -- cgit v0.9.2-21-gd62e From c5cc1870f3ec0d9b6499b04b4ab2123bcf58db84 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 25 Jan 2012 18:42:35 +0000 Subject: Fix some memory leaks diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 9d6076f..4226483 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -1682,6 +1682,9 @@ Renderer::Renderer(Graphics * g, Simulation * sim): this->g = g; this->sim = sim; + memset(fire_r, 0, sizeof(fire_r)); + memset(fire_g, 0, sizeof(fire_g)); + memset(fire_b, 0, sizeof(fire_b)); prepare_alpha(CELL, 1.0f); init_display_modes(); prepare_graphicscache(); diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index d7c9633..85518f7 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -118,7 +118,7 @@ void GameController::DrawPoints(queue & pointQueue) void GameController::Tick() { - gameModel->GetSimulation()->update_particles(); + //gameModel->GetSimulation()->update_particles(); } void GameController::SetPaused(bool pauseState) diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 8062c64..33eb143 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -54,6 +54,8 @@ GameModel::~GameModel() } delete sim; delete ren; + if(activeTool) + delete activeTool; } Brush * GameModel::GetBrush() diff --git a/src/login/LoginController.cpp b/src/login/LoginController.cpp index 5a81a55..a3162be 100644 --- a/src/login/LoginController.cpp +++ b/src/login/LoginController.cpp @@ -35,7 +35,6 @@ void LoginController::Exit() if(ui::Engine::Ref().GetWindow() == loginView) { ui::Engine::Ref().CloseWindow(); - loginView = NULL; } if(callback) callback->ControllerExit(); diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 61d8ae7..243b903 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3185,18 +3185,23 @@ Simulation::Simulation(): int menuCount; menu_section * msectionsT = LoadMenus(menuCount); memcpy(msections, msectionsT, menuCount * sizeof(menu_section)); + free(msectionsT); int wallCount; wall_type * wtypesT = LoadWalls(wallCount); memcpy(wtypes, wtypesT, wallCount * sizeof(wall_type)); + free(wtypesT); int elementCount; part_type * ptypesT = LoadElements(elementCount); memcpy(ptypes, ptypesT, elementCount * sizeof(part_type)); + free(ptypesT); int transitionCount; part_transition * ptransitionsT = LoadTransitions(transitionCount); memcpy(ptransitions, ptransitionsT, sizeof(part_transition) * transitionCount); + free(ptransitionsT); + init_can_move(); clear_sim(); } -- cgit v0.9.2-21-gd62e From b2d3257ae944a3ea3b57dc8ee4171b1b2f85483e Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 25 Jan 2012 19:18:24 +0000 Subject: Better way of managing Controllers diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 85518f7..5399cf8 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -19,8 +19,6 @@ public: virtual void ControllerExit() { cc->gameModel->SetUser(cc->loginWindow->GetUser()); - delete cc->loginWindow; - cc->loginWindow = NULL; } }; @@ -116,9 +114,14 @@ void GameController::DrawPoints(queue & pointQueue) } } -void GameController::Tick() +void GameController::Update() { //gameModel->GetSimulation()->update_particles(); + if(loginWindow && loginWindow->HasExited) + { + delete loginWindow; + loginWindow = NULL; + } } void GameController::SetPaused(bool pauseState) diff --git a/src/game/GameController.h b/src/game/GameController.h index 157df99..4f076fd 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -31,7 +31,7 @@ public: GameView * GetView(); void AdjustBrushSize(int direction); void DrawPoints(queue & pointQueue); - void Tick(); + void Update(); void SetPaused(bool pauseState); void SetPaused(); void SetActiveMenu(Menu * menu); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 70f6663..4695227 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -414,7 +414,7 @@ void GameView::OnTick(float dt) { c->DrawPoints(pointQueue); } - c->Tick(); + c->Update(); } void GameView::OnDraw() diff --git a/src/login/LoginController.cpp b/src/login/LoginController.cpp index a3162be..1a21fc6 100644 --- a/src/login/LoginController.cpp +++ b/src/login/LoginController.cpp @@ -8,7 +8,9 @@ #include "LoginController.h" #include "client/User.h" -LoginController::LoginController(ControllerCallback * callback) { +LoginController::LoginController(ControllerCallback * callback): + HasExited(false) +{ // TODO Auto-generated constructor stub loginView = new LoginView(); loginModel = new LoginModel(); @@ -38,6 +40,7 @@ void LoginController::Exit() } if(callback) callback->ControllerExit(); + HasExited = true; } LoginController::~LoginController() { diff --git a/src/login/LoginController.h b/src/login/LoginController.h index eb15d64..b20e187 100644 --- a/src/login/LoginController.h +++ b/src/login/LoginController.h @@ -23,6 +23,7 @@ class LoginController { LoginModel * loginModel; ControllerCallback * callback; public: + bool HasExited; LoginController(ControllerCallback * callback = NULL); void Login(string username, string password); void Exit(); -- cgit v0.9.2-21-gd62e From 9e1be78bc21d1fb76a19ce12ef36193aea6e2b93 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 26 Jan 2012 01:13:33 +0000 Subject: I've got to a point where I can no longer be bothered to think of a proper commit comment diff --git a/src/client/Client.cpp b/src/client/Client.cpp index b6fe2a4..ad12da4 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -40,6 +40,12 @@ Client::~Client() http_done(); } +unsigned char * Client::GetSaveData(int saveID, int saveDate, int & dataLength) +{ + dataLength = 0; + return NULL; +} + LoginStatus Client::Login(string username, string password, User & user) { lastError = ""; @@ -140,16 +146,16 @@ Save * Client::GetSave(int saveID, int saveDate) json::String tempUsername = objDocument["Username"]; json::String tempName = objDocument["Name"]; json::String tempDescription = objDocument["Description"]; - json::String tempDate = objDocument["Date"]; + json::Number tempDate = objDocument["Date"]; json::Boolean tempPublished = objDocument["Published"]; return new Save( tempID.Value(), + tempDate.Value(), tempScoreUp.Value(), tempScoreDown.Value(), tempUsername.Value(), tempName.Value(), tempDescription.Value(), - tempDate.Value(), tempPublished.Value() ); } @@ -241,6 +247,7 @@ std::vector * Client::SearchSaves(int start, int count, string query, str for(int j = 0; j < savesArray.Size(); j++) { json::Number tempID = savesArray[j]["ID"]; + json::Number tempDate = savesArray[j]["Date"]; json::Number tempScoreUp = savesArray[j]["ScoreUp"]; json::Number tempScoreDown = savesArray[j]["ScoreDown"]; json::String tempUsername = savesArray[j]["Username"]; @@ -248,6 +255,7 @@ std::vector * Client::SearchSaves(int start, int count, string query, str saveArray->push_back( new Save( tempID.Value(), + tempDate.Value(), tempScoreUp.Value(), tempScoreDown.Value(), tempUsername.Value(), diff --git a/src/client/Client.h b/src/client/Client.h index 15ab03a..1b3bb02 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -29,6 +29,7 @@ private: public: Client(); ~Client(); + unsigned char * GetSaveData(int saveID, int saveDate, int & dataLength); LoginStatus Login(string username, string password, User & user); void ClearThumbnailRequests(); std::vector * SearchSaves(int start, int count, string query, string sort, int & resultCount); diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 5399cf8..e8efe0b 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -4,6 +4,7 @@ #include "Config.h" #include "GameController.h" #include "GameModel.h" +#include "search/Save.h" #include "search/SearchController.h" #include "render/RenderController.h" #include "login/LoginController.h" @@ -22,6 +23,37 @@ public: } }; + +class GameController::SearchCallback: public ControllerCallback +{ + GameController * cc; +public: + SearchCallback(GameController * cc_) { cc = cc_; } + virtual void ControllerExit() + { + if(cc->search->GetLoadedSave()) + { + if(cc->gameModel->GetSave()) + { + delete cc->gameModel->GetSave(); + } + cc->gameModel->SetSave(new Save(*(cc->search->GetLoadedSave()))); + } + } +}; + + +class GameController::RenderCallback: public ControllerCallback +{ + GameController * cc; +public: + RenderCallback(GameController * cc_) { cc = cc_; } + virtual void ControllerExit() + { + //cc->gameModel->SetUser(cc->loginWindow->GetUser()); + } +}; + GameController::GameController(): search(NULL), renderOptions(NULL), @@ -117,6 +149,18 @@ void GameController::DrawPoints(queue & pointQueue) void GameController::Update() { //gameModel->GetSimulation()->update_particles(); + if(renderOptions && renderOptions->HasExited) + { + delete renderOptions; + renderOptions = NULL; + } + + if(search && search->HasExited) + { + delete search; + search = NULL; + } + if(loginWindow && loginWindow->HasExited) { delete loginWindow; @@ -146,7 +190,7 @@ void GameController::SetActiveTool(Tool * tool) void GameController::OpenSearch() { - search = new SearchController(); + search = new SearchController(new SearchCallback(this)); ui::Engine::Ref().ShowWindow(search->GetView()); } @@ -168,7 +212,7 @@ void GameController::OpenDisplayOptions() void GameController::OpenRenderOptions() { - renderOptions = new RenderController(gameModel->GetRenderer()); + renderOptions = new RenderController(gameModel->GetRenderer(), new RenderCallback(this)); ui::Engine::Ref().ShowWindow(renderOptions->GetView()); } diff --git a/src/game/GameController.h b/src/game/GameController.h index 4f076fd..28edd86 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -26,6 +26,8 @@ private: LoginController * loginWindow; public: class LoginCallback; + class SearchCallback; + class RenderCallback; GameController(); ~GameController(); GameView * GetView(); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 33eb143..3085b09 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -122,6 +122,7 @@ Save * GameModel::GetSave() void GameModel::SetSave(Save * newSave) { currentSave = newSave; + sim->Load(currentSave->GetData(), currentSave->GetDataLength()); notifySaveChanged(); } diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 4695227..163c2f7 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -327,6 +327,7 @@ void GameView::NotifySaveChanged(GameModel * sender) { if(sender->GetSave()) { + saveSimulationButton->SetText(sender->GetSave()->name); reloadButton->Enabled = true; if(sender->GetSave()->GetID()) //Online saves have an ID, local saves have an ID of 0 and a filename { diff --git a/src/game/Tool.h b/src/game/Tool.h index 4777e6d..1cf8ce4 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -46,7 +46,6 @@ public: sim->create_parts(position.X, position.Y, 1, 1, toolID, 0, brush); } virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { - std::cout << position1.X << toolID << brush << std::endl; sim->create_line(position1.X, position1.Y, position2.X, position2.Y, 1, 1, toolID, 0, brush); } virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {} diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 782d89b..8fe847e 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -152,7 +152,7 @@ void Button::Draw(const Point& screenPos) } } -void Button::OnMouseUnclick(int x, int y, unsigned int button) +void Button::OnMouseUp(int x, int y, unsigned int button) { if(button != 1) { diff --git a/src/interface/Button.h b/src/interface/Button.h index fe4e9f9..1075b32 100644 --- a/src/interface/Button.h +++ b/src/interface/Button.h @@ -39,7 +39,7 @@ public: std::string ButtonText; virtual void OnMouseClick(int x, int y, unsigned int button); - virtual void OnMouseUnclick(int x, int y, unsigned int button); + virtual void OnMouseUp(int x, int y, unsigned int button); //virtual void OnMouseUp(int x, int y, unsigned int button); virtual void OnMouseEnter(int x, int y); diff --git a/src/preview/PreviewController.cpp b/src/preview/PreviewController.cpp index ef5da4e..db3cdee 100644 --- a/src/preview/PreviewController.cpp +++ b/src/preview/PreviewController.cpp @@ -8,8 +8,11 @@ #include "PreviewController.h" #include "PreviewView.h" #include "PreviewModel.h" +#include "Controller.h" -PreviewController::PreviewController(int saveID) { +PreviewController::PreviewController(int saveID, ControllerCallback * callback): + HasExited(false) +{ // TODO Auto-generated constructor stub previewModel = new PreviewModel(); previewView = new PreviewView(); @@ -17,6 +20,34 @@ PreviewController::PreviewController(int saveID) { previewView->AttachController(this); previewModel->UpdateSave(saveID, 0); + + this->callback = callback; +} + +Save * PreviewController::GetSave() +{ + return previewModel->GetSave(); +} + +bool PreviewController::GetDoOpen() +{ + return previewModel->GetDoOpen(); +} + +void PreviewController::DoOpen() +{ + previewModel->SetDoOpen(true); +} + +void PreviewController::Exit() +{ + if(ui::Engine::Ref().GetWindow() == previewView) + { + ui::Engine::Ref().CloseWindow(); + } + if(callback) + callback->ControllerExit(); + HasExited = true; } PreviewController::~PreviewController() { diff --git a/src/preview/PreviewController.h b/src/preview/PreviewController.h index 373ff03..452d686 100644 --- a/src/preview/PreviewController.h +++ b/src/preview/PreviewController.h @@ -10,14 +10,22 @@ #include "preview/PreviewModel.h" #include "preview/PreviewView.h" +#include "Controller.h" +#include "search/Save.h" class PreviewModel; class PreviewView; class PreviewController { PreviewModel * previewModel; PreviewView * previewView; + ControllerCallback * callback; public: - PreviewController(int saveID); + bool HasExited; + PreviewController(int saveID, ControllerCallback * callback); + void Exit(); + void DoOpen(); + bool GetDoOpen(); + Save * GetSave(); PreviewView * GetView() { return previewView; } virtual ~PreviewController(); }; diff --git a/src/preview/PreviewModel.cpp b/src/preview/PreviewModel.cpp index 0e03490..07396cb 100644 --- a/src/preview/PreviewModel.cpp +++ b/src/preview/PreviewModel.cpp @@ -10,7 +10,8 @@ PreviewModel::PreviewModel(): save(NULL), - savePreview(NULL) + savePreview(NULL), + doOpen(false) { // TODO Auto-generated constructor stub @@ -24,6 +25,16 @@ void PreviewModel::UpdateSave(int saveID, int saveDate) notifyPreviewChanged(); } +void PreviewModel::SetDoOpen(bool doOpen) +{ + this->doOpen = doOpen; +} + +bool PreviewModel::GetDoOpen() +{ + return doOpen; +} + Thumbnail * PreviewModel::GetPreview() { return savePreview; @@ -57,6 +68,9 @@ void PreviewModel::AddObserver(PreviewView * observer) { } PreviewModel::~PreviewModel() { - // TODO Auto-generated destructor stub + if(save) + delete save; + if(savePreview) + delete savePreview; } diff --git a/src/preview/PreviewModel.h b/src/preview/PreviewModel.h index 764771a..23ac2d7 100644 --- a/src/preview/PreviewModel.h +++ b/src/preview/PreviewModel.h @@ -17,6 +17,7 @@ using namespace std; class PreviewView; class PreviewModel { + bool doOpen; vector observers; Save * save; Thumbnail * savePreview; @@ -28,6 +29,8 @@ public: Save * GetSave(); void AddObserver(PreviewView * observer); void UpdateSave(int saveID, int saveDate); + bool GetDoOpen(); + void SetDoOpen(bool doOpen); virtual ~PreviewModel(); }; diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index 9d76fe7..d0bd6da 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -14,8 +14,19 @@ PreviewView::PreviewView(): ui::Window(ui::Point(-1, -1), ui::Point((XRES/2)+200, (YRES/2)+150)), savePreview(NULL) { - // TODO Auto-generated constructor stub + class OpenAction: public ui::ButtonAction + { + PreviewView * v; + public: + OpenAction(PreviewView * v_){ v = v_; } + virtual void ActionCallback(ui::Button * sender) + { + v->c->DoOpen(); + v->c->Exit(); + } + }; openButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(100, 16), "Open"); + openButton->SetActionCallback(new OpenAction(this)); AddComponent(openButton); saveNameLabel = new ui::Label(ui::Point(5, (YRES/2)+5), ui::Point(100, 16), ""); diff --git a/src/render/RenderController.cpp b/src/render/RenderController.cpp index 6f7f72e..01a5d4e 100644 --- a/src/render/RenderController.cpp +++ b/src/render/RenderController.cpp @@ -7,7 +7,9 @@ #include "RenderController.h" -RenderController::RenderController(Renderer * ren) { +RenderController::RenderController(Renderer * ren, ControllerCallback * callback): + HasExited(false) +{ renderView = new RenderView(); renderModel = new RenderModel(); @@ -15,6 +17,18 @@ RenderController::RenderController(Renderer * ren) { renderModel->AddObserver(renderView); renderModel->SetRenderer(ren); + this->callback = callback; +} + +void RenderController::Exit() +{ + if(ui::Engine::Ref().GetWindow() == renderView) + { + ui::Engine::Ref().CloseWindow(); + } + if(callback) + callback->ControllerExit(); + HasExited = true; } RenderController::~RenderController() { diff --git a/src/render/RenderController.h b/src/render/RenderController.h index 1c574c1..704d6d4 100644 --- a/src/render/RenderController.h +++ b/src/render/RenderController.h @@ -11,14 +11,18 @@ #include "RenderView.h" #include "RenderModel.h" #include "Renderer.h" +#include "Controller.h" class RenderView; class RenderModel; class RenderController { RenderView * renderView; RenderModel * renderModel; + ControllerCallback * callback; public: - RenderController(Renderer * ren); + bool HasExited; + RenderController(Renderer * ren, ControllerCallback * callback = NULL); + void Exit(); RenderView * GetView() { return renderView; } virtual ~RenderController(); }; diff --git a/src/search/Save.cpp b/src/search/Save.cpp new file mode 100644 index 0000000..6a5925d --- /dev/null +++ b/src/search/Save.cpp @@ -0,0 +1,87 @@ +/* + * Save.cpp + * + * Created on: Jan 26, 2012 + * Author: Simon + */ + +#include "Save.h" +#include "client/Client.h" + +Save::Save(Save & save) : + userName(save.userName), name(save.name), Description(save.Description), date( + save.date), Published(save.Published), id(save.id), votesUp( + save.votesUp), votesDown(save.votesDown), data(NULL) { + if (save.data) { + std::cout << data << " " << save.data << std::endl; + data = (unsigned char *) malloc(save.dataLength); + memcpy(data, save.data, save.dataLength); + dataLength = save.dataLength; + } +} + +Save::Save(int _id, int _date, int _votesUp, int _votesDown, string _userName, + string _name) : + id(_id), votesUp(_votesUp), votesDown(_votesDown), userName(_userName), name( + _name), Description("No description provided"), date(_date), Published( + true), data(NULL) { +} + +Save::Save(int _id, int date_, int _votesUp, int _votesDown, string _userName, + string _name, string description_, bool published_) : + id(_id), votesUp(_votesUp), votesDown(_votesDown), userName(_userName), name( + _name), Description(description_), date(date_), Published( + published_), data(NULL) { +} + +void Save::SetName(string name) { + this->name = name; +} +string Save::GetName() { + return name; +} + +void Save::SetUserName(string userName) { + this->userName = userName; +} +string Save::GetUserName() { + return userName; +} + +void Save::SetID(int id) { + this->id = id; +} +int Save::GetID() { + return id; +} + +void Save::SetVotesUp(int votesUp) { + this->votesUp = votesUp; +} +int Save::GetVotesUp() { + return votesUp; +} + +void Save::SetVotesDown(int votesDown) { + this->votesDown = votesDown; +} +int Save::GetVotesDown() { + return votesDown; +} + +unsigned char * Save::GetData() { + if (!data) { + data = Client::Ref().GetSaveData(id, date, dataLength); + } + return data; +} +void Save::SetData(unsigned char * data_) { + data = data_; +} + +int Save::GetDataLength() { + if (!data) { + data = Client::Ref().GetSaveData(id, date, dataLength); + } + return dataLength; +} diff --git a/src/search/Save.h b/src/search/Save.h index 0a011ab..3186e2a 100644 --- a/src/search/Save.h +++ b/src/search/Save.h @@ -2,6 +2,9 @@ #define SAVE_H #include +#include +#include +#include using namespace std; @@ -9,57 +12,43 @@ class Save { private: int id; + int date; int votesUp, votesDown; unsigned char * data; + int dataLength; public: - Save(int _id, int _votesUp, int _votesDown, string _userName, string _name): - id(_id), - votesUp(_votesUp), - votesDown(_votesDown), - userName(_userName), - name(_name), - Description("No description provided"), - Date("0/0/0"), - Published(true) - { - } - - Save(int _id, int _votesUp, int _votesDown, string _userName, string _name, string description_, string date_, bool published_): - id(_id), - votesUp(_votesUp), - votesDown(_votesDown), - userName(_userName), - name(_name), - Description(description_), - Date(date_), - Published(published_) - { - } + Save(Save & save); + + Save(int _id, int _date, int _votesUp, int _votesDown, string _userName, string _name); + + Save(int _id, int date_, int _votesUp, int _votesDown, string _userName, string _name, string description_, bool published_); string userName; string name; string Description; - string Date; bool Published; - void SetName(string name){ this->name = name; } - string GetName(){ return name; } + void SetName(string name); + string GetName(); + + void SetUserName(string userName); + string GetUserName(); - void SetUserName(string userName){ this->userName = userName; } - string GetUserName(){ return userName; } + void SetID(int id); + int GetID(); - void SetID(int id){ this->id = id; } - int GetID(){ return id; } + void SetVotesUp(int votesUp); + int GetVotesUp(); - void SetVotesUp(int votesUp){ this->votesUp = votesUp; } - int GetVotesUp(){ return votesUp; } + void SetVotesDown(int votesDown); + int GetVotesDown(); - void SetVotesDown(int votesDown){ this->votesDown = votesDown; } - int GetVotesDown(){ return votesDown; } + unsigned char * GetData(); + void SetData(unsigned char * data_); - unsigned char * GetData() { return data; } + int GetDataLength(); }; #endif // SAVE_H diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 46a353c..96f759e 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -5,8 +5,24 @@ #include "interface/Panel.h" #include "preview/PreviewController.h" -SearchController::SearchController(): - activePreview(NULL) +class SearchController::OpenCallback: public ControllerCallback +{ + SearchController * cc; +public: + OpenCallback(SearchController * cc_) { cc = cc_; } + virtual void ControllerExit() + { + if(cc->activePreview->GetDoOpen()) + { + cc->searchModel->SetLoadedSave(new Save(*(cc->activePreview->GetSave()))); + cc->Exit(); + } + } +}; + +SearchController::SearchController(ControllerCallback * callback): + activePreview(NULL), + HasExited(false) { searchModel = new SearchModel(); searchView = new SearchView(); @@ -15,19 +31,42 @@ SearchController::SearchController(): searchModel->UpdateSaveList(1, ""); + this->callback = callback; + //Set up interface //windowPanel.AddChild(); } -SearchController::~SearchController() +Save * SearchController::GetLoadedSave() { - if(activePreview) + return searchModel->GetLoadedSave(); +} + +void SearchController::Update() +{ + if(activePreview && activePreview->HasExited) { - ui::Engine::Ref().CloseWindow(); delete activePreview; + activePreview = NULL; } +} + +void SearchController::Exit() +{ + if(ui::Engine::Ref().GetWindow() == searchView) + { + ui::Engine::Ref().CloseWindow(); + } + if(callback) + callback->ControllerExit(); + HasExited = true; +} + +SearchController::~SearchController() +{ delete searchModel; - delete searchView; + if(searchView) + delete searchView; } void SearchController::DoSearch(std::string query) @@ -66,6 +105,6 @@ void SearchController::ShowOwn(bool show) void SearchController::OpenSave(int saveID) { - activePreview = new PreviewController(saveID); + activePreview = new PreviewController(saveID, new OpenCallback(this)); ui::Engine::Ref().ShowWindow(activePreview->GetView()); } diff --git a/src/search/SearchController.h b/src/search/SearchController.h index d67743e..e015648 100644 --- a/src/search/SearchController.h +++ b/src/search/SearchController.h @@ -5,6 +5,9 @@ #include "SearchModel.h" #include "SearchView.h" #include "preview/PreviewController.h" +#include "Controller.h" +#include "Save.h" + class SearchView; class SearchModel; class SearchController @@ -13,16 +16,22 @@ private: SearchModel * searchModel; SearchView * searchView; PreviewController * activePreview; + ControllerCallback * callback; public: - SearchController(); + class OpenCallback; + bool HasExited; + SearchController(ControllerCallback * callback = NULL); ~SearchController(); SearchView * GetView() { return searchView; } + void Exit(); void DoSearch(std::string query); void NextPage(); void PrevPage(); void ChangeSort(); void ShowOwn(bool show); void OpenSave(int saveID); + void Update(); + Save * GetLoadedSave(); }; #endif // SEARCHCONTROLLER_H diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index adb8cad..d9a4a1e 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -5,7 +5,8 @@ SearchModel::SearchModel(): currentSort("votes"), - showOwn(false) + showOwn(false), + loadedSave(NULL) { } @@ -30,6 +31,15 @@ void SearchModel::UpdateSaveList(int pageNumber, std::string query) notifySaveListChanged(); } +void SearchModel::SetLoadedSave(Save * save) +{ + loadedSave = save; +} + +Save * SearchModel::GetLoadedSave(){ + return loadedSave; +} + vector SearchModel::GetSaveList() { return saveList; @@ -79,3 +89,9 @@ void SearchModel::notifyShowOwnChanged() cObserver->NotifyShowOwnChanged(this); } } + +SearchModel::~SearchModel() +{ + if(loadedSave) + delete loadedSave; +} diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index 0ed7d86..e99e4ca 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -13,6 +13,7 @@ class SearchView; class SearchModel { private: + Save * loadedSave; string currentSort; string lastQuery; string lastError; @@ -27,6 +28,7 @@ private: void notifyShowOwnChanged(); public: SearchModel(); + virtual ~SearchModel(); void AddObserver(SearchView * observer); void UpdateSaveList(int pageNumber, std::string query); vector GetSaveList(); @@ -38,6 +40,8 @@ public: string GetSort() { return currentSort; } void SetShowOwn(bool show) { showOwn = show; UpdateSaveList(1, lastQuery); notifyShowOwnChanged(); } bool GetShowOwn() { return showOwn; } + void SetLoadedSave(Save * save); + Save * GetLoadedSave(); }; #endif // SEARCHMODEL_H diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index e589d20..8e5360f 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -212,3 +212,8 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) } } } + +void SearchView::OnTick(float dt) +{ + c->Update(); +} diff --git a/src/search/SearchView.h b/src/search/SearchView.h index 370877e..a2a5297 100644 --- a/src/search/SearchView.h +++ b/src/search/SearchView.h @@ -34,6 +34,7 @@ public: SearchView(); virtual ~SearchView(); void AttachController(SearchController * _c) { c = _c; } + virtual void OnTick(float dt); }; #endif // SEARCHVIEW_H diff --git a/src/simulation/SaveLoader.cpp b/src/simulation/SaveLoader.cpp new file mode 100644 index 0000000..350b54a --- /dev/null +++ b/src/simulation/SaveLoader.cpp @@ -0,0 +1,38 @@ +/* + * SaveLoader.cpp + * + * Created on: Jan 26, 2012 + * Author: Simon + */ + +#include "SaveLoader.h" + +int SaveLoader::LoadSave(unsigned char * data, int dataLength, Simulation * sim) +{ + return 0; +} + +unsigned char * SaveLoader::BuildSave(int & dataLength, Simulation * sim) +{ + return 0; +} + +int SaveLoader::OPSLoadSave(unsigned char * data, int dataLength, Simulation * sim) +{ + return 0; +} + +unsigned char * SaveLoader::OPSBuildSave(int & dataLength, Simulation * sim) +{ + return 0; +} + +int SaveLoader::PSVLoadSave(unsigned char * data, int dataLength, Simulation * sim) +{ + return 0; +} + +unsigned char * PSVBuildSave(int & dataLength, Simulation * sim) +{ + return 0; +} diff --git a/src/simulation/SaveLoader.h b/src/simulation/SaveLoader.h new file mode 100644 index 0000000..e517a2b --- /dev/null +++ b/src/simulation/SaveLoader.h @@ -0,0 +1,23 @@ +/* + * SaveLoader.h + * + * Created on: Jan 26, 2012 + * Author: Simon + */ + +#ifndef SAVELOADER_H_ +#define SAVELOADER_H_ + +#include "Simulation.h" + +class SaveLoader { +public: + static int LoadSave(unsigned char * data, int dataLength, Simulation * sim); + static unsigned char * BuildSave(int & dataLength, Simulation * sim); + static int OPSLoadSave(unsigned char * data, int dataLength, Simulation * sim); + static unsigned char * OPSBuildSave(int & dataLength, Simulation * sim); + static int PSVLoadSave(unsigned char * data, int dataLength, Simulation * sim); + static unsigned char * PSVBuildSave(int & dataLength, Simulation * sim); +}; + +#endif /* SAVELOADER_H_ */ diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 243b903..8932863 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -6,6 +6,17 @@ #include "ElementFunctions.h" #include "Air.h" #include "Gravity.h" +#include "SaveLoader.h" + +int Simulation::Load(unsigned char * data, int dataLength) +{ + return SaveLoader::LoadSave(data, dataLength, this); +} + +unsigned char * Simulation::Save(int & dataLength) +{ + return SaveLoader::BuildSave(dataLength, this); +} void Simulation::clear_area(int area_x, int area_y, int area_w, int area_h) { diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index c36a18f..8a1ed16 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -204,7 +204,9 @@ public: int sandcolour_r; int sandcolour_g; int sandcolour_b; //TODO: Make a single variable - //Stuff + //TODO: Inlines for performance + int Load(unsigned char * data, int dataLength); + unsigned char * Save(int & dataLength); int is_blocking(int t, int x, int y); int is_boundary(int pt, int x, int y); int find_next_boundary(int pt, int *x, int *y, int dm, int *em); -- cgit v0.9.2-21-gd62e From d520a70acfdf7ba5a007aee1f92453642b474c08 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 26 Jan 2012 16:18:43 +0000 Subject: Save loading and reloading diff --git a/src/Config.h b/src/Config.h index facb598..b113143 100644 --- a/src/Config.h +++ b/src/Config.h @@ -29,6 +29,7 @@ #define SERVER "powdertoy.co.uk" #define SCRIPTSERVER "powdertoy.co.uk" +#define STATICSERVER "static.powdertoy.co.uk" #define LOCAL_SAVE_DIR "Saves" diff --git a/src/client/Client.cpp b/src/client/Client.cpp index ad12da4..1d550ff 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -42,7 +42,28 @@ Client::~Client() unsigned char * Client::GetSaveData(int saveID, int saveDate, int & dataLength) { + lastError = ""; + int dataStatus; + unsigned char * data; dataLength = 0; + std::stringstream urlStream; + if(saveDate) + { + urlStream << "http://" << STATICSERVER << "/" << saveID << "_" << saveDate << ".cps"; + } + else + { + urlStream << "http://" << STATICSERVER << "/" << saveID << ".cps"; + } + data = (unsigned char *)http_simple_get((char *)urlStream.str().c_str(), &dataStatus, &dataLength); + if(data && dataStatus == 200) + { + return data; + } + else if(data) + { + free(data); + } return NULL; } @@ -175,11 +196,12 @@ Save * Client::GetSave(int saveID, int saveDate) Thumbnail * Client::GetPreview(int saveID, int saveDate) { std::stringstream urlStream; - urlStream << "http://" << SERVER << "/Get.api?Op=thumblarge&ID=" << saveID; + urlStream << "http://" << STATICSERVER << "/" << saveID; if(saveDate) { - urlStream << "&Date=" << saveDate; + urlStream << "_" << saveDate; } + urlStream << "_large.pti"; pixel * thumbData; char * data; int status, data_size, imgw, imgh; @@ -322,11 +344,12 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) if(thumbnailCache[i] && thumbnailCache[i]->ID == saveID && thumbnailCache[i]->Datestamp == saveDate) return thumbnailCache[i]; } - urlStream << "http://" << SERVER << "/Get.api?Op=thumbsmall&ID=" << saveID; + urlStream << "http://" << STATICSERVER << "/" << saveID; if(saveDate) { - urlStream << "&Date=" << saveDate; + urlStream << "_" << saveDate; } + urlStream << "_small.pti"; idStream << saveID << ":" << saveDate; std::string idString = idStream.str(); bool found = false; diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index e8efe0b..90ef70c 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -148,7 +148,7 @@ void GameController::DrawPoints(queue & pointQueue) void GameController::Update() { - //gameModel->GetSimulation()->update_particles(); + gameModel->GetSimulation()->update_particles(); if(renderOptions && renderOptions->HasExited) { delete renderOptions; @@ -234,7 +234,8 @@ void GameController::ClearSim() void GameController::ReloadSim() { - //TODO: Implement + if(gameModel->GetSave() && gameModel->GetSave()->GetData()) + gameModel->GetSimulation()->Load(gameModel->GetSave()->GetData(), gameModel->GetSave()->GetDataLength()); } diff --git a/src/search/Save.cpp b/src/search/Save.cpp index 6a5925d..5bcb0e9 100644 --- a/src/search/Save.cpp +++ b/src/search/Save.cpp @@ -34,6 +34,14 @@ Save::Save(int _id, int date_, int _votesUp, int _votesDown, string _userName, published_), data(NULL) { } +Save::~Save() +{ + if(data) + { + free(data); + } +} + void Save::SetName(string name) { this->name = name; } diff --git a/src/search/Save.h b/src/search/Save.h index 3186e2a..42cbb62 100644 --- a/src/search/Save.h +++ b/src/search/Save.h @@ -23,6 +23,8 @@ public: Save(int _id, int date_, int _votesUp, int _votesDown, string _userName, string _name, string description_, bool published_); + ~Save(); + string userName; string name; diff --git a/src/simulation/SaveLoader.cpp b/src/simulation/SaveLoader.cpp index 350b54a..5d92300 100644 --- a/src/simulation/SaveLoader.cpp +++ b/src/simulation/SaveLoader.cpp @@ -5,16 +5,32 @@ * Author: Simon */ +#include #include "SaveLoader.h" -int SaveLoader::LoadSave(unsigned char * data, int dataLength, Simulation * sim) +//!TODO: enum for LoadSave return + +int SaveLoader::LoadSave(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x, int y) { - return 0; + unsigned char * saveData = data; + if (dataLength<16) + { + return 1; + } + if(saveData[0] == 'O' && saveData[1] == 'P' && saveData[2] == 'S') + { + return OPSLoadSave(data, dataLength, sim); + } + else if((saveData[0]==0x66 && saveData[1]==0x75 && saveData[2]==0x43) || (saveData[0]==0x50 && saveData[1]==0x53 && saveData[2]==0x76)) + { + return PSVLoadSave(data, dataLength, sim, replace, x, y); + } + return 1; } unsigned char * SaveLoader::BuildSave(int & dataLength, Simulation * sim) { - return 0; + return OPSBuildSave(dataLength, sim); } int SaveLoader::OPSLoadSave(unsigned char * data, int dataLength, Simulation * sim) @@ -27,9 +43,598 @@ unsigned char * SaveLoader::OPSBuildSave(int & dataLength, Simulation * sim) return 0; } -int SaveLoader::PSVLoadSave(unsigned char * data, int dataLength, Simulation * sim) +int SaveLoader::PSVLoadSave(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x0, int y0) { + unsigned char * d = NULL, * c = data; + int q,i,j,k,x,y,p=0,*m=NULL, ver, pty, ty, legacy_beta=0, tempGrav = 0; + int bx0=x0/CELL, by0=y0/CELL, bw, bh, w, h; + int nf=0, new_format = 0, ttv = 0; + Particle *parts = sim->parts; + int *fp = (int *)malloc(NPART*sizeof(int)); + + //New file header uses PSv, replacing fuC. This is to detect if the client uses a new save format for temperatures + //This creates a problem for old clients, that display and "corrupt" error instead of a "newer version" error + + if (dataLength<16) + return 1; + if (!(c[2]==0x43 && c[1]==0x75 && c[0]==0x66) && !(c[2]==0x76 && c[1]==0x53 && c[0]==0x50)) + return 1; + if (c[2]==0x76 && c[1]==0x53 && c[0]==0x50) { + new_format = 1; + } + if (c[4]>SAVE_VERSION) + return 2; + ver = c[4]; + + if (ver<34) + { + sim->legacy_enable = 1; + } + else + { + if (ver>=44) { + sim->legacy_enable = c[3]&0x01; + if (!sim->sys_pause) { + sim->sys_pause = (c[3]>>1)&0x01; + } + if (ver>=46 && replace) { + sim->gravityMode = ((c[3]>>2)&0x03);// | ((c[3]>>2)&0x01); + sim->airMode = ((c[3]>>4)&0x07);// | ((c[3]>>4)&0x02) | ((c[3]>>4)&0x01); + } + if (ver>=49 && replace) { + tempGrav = ((c[3]>>7)&0x01); + } + } else { + if (c[3]==1||c[3]==0) { + sim->legacy_enable = c[3]; + } else { + legacy_beta = 1; + } + } + } + + bw = c[6]; + bh = c[7]; + if (bx0+bw > XRES/CELL) + bx0 = XRES/CELL - bw; + if (by0+bh > YRES/CELL) + by0 = YRES/CELL - bh; + if (bx0 < 0) + bx0 = 0; + if (by0 < 0) + by0 = 0; + + if (c[5]!=CELL || bx0+bw>XRES/CELL || by0+bh>YRES/CELL) + return 3; + i = (unsigned)c[8]; + i |= ((unsigned)c[9])<<8; + i |= ((unsigned)c[10])<<16; + i |= ((unsigned)c[11])<<24; + d = (unsigned char *)malloc(i); + if (!d) + return 1; + + if (BZ2_bzBuffToBuffDecompress((char *)d, (unsigned *)&i, (char *)(c+12), dataLength-12, 0, 0)) + return 1; + dataLength = i; + + if (dataLength < bw*bh) + return 1; + + // normalize coordinates + x0 = bx0*CELL; + y0 = by0*CELL; + w = bw *CELL; + h = bh *CELL; + + if (replace) + { + if (ver<46) { + sim->gravityMode = 0; + sim->airMode = 0; + } + sim->clear_sim(); + } + sim->parts_lastActiveIndex = NPART-1; + m = (int *)calloc(XRES*YRES, sizeof(int)); + + // make a catalog of free parts + //memset(pmap, 0, sizeof(pmap)); "Using sizeof for array given as function argument returns the size of pointer." + memset(sim->pmap, 0, sizeof(unsigned)*(XRES*YRES)); + for (i=0; ipmap[y][x] = (i<<8)|1; + } + else + fp[nf++] = i; + + // load the required air state + for (y=by0; ybmap[y][x] = d[p]; + if (sim->bmap[y][x]==1) + sim->bmap[y][x]=WL_WALL; + if (sim->bmap[y][x]==2) + sim->bmap[y][x]=WL_DESTROYALL; + if (sim->bmap[y][x]==3) + sim->bmap[y][x]=WL_ALLOWLIQUID; + if (sim->bmap[y][x]==4) + sim->bmap[y][x]=WL_FAN; + if (sim->bmap[y][x]==5) + sim->bmap[y][x]=WL_STREAM; + if (sim->bmap[y][x]==6) + sim->bmap[y][x]=WL_DETECT; + if (sim->bmap[y][x]==7) + sim->bmap[y][x]=WL_EWALL; + if (sim->bmap[y][x]==8) + sim->bmap[y][x]=WL_WALLELEC; + if (sim->bmap[y][x]==9) + sim->bmap[y][x]=WL_ALLOWAIR; + if (sim->bmap[y][x]==10) + sim->bmap[y][x]=WL_ALLOWSOLID; + if (sim->bmap[y][x]==11) + sim->bmap[y][x]=WL_ALLOWALLELEC; + if (sim->bmap[y][x]==12) + sim->bmap[y][x]=WL_EHOLE; + if (sim->bmap[y][x]==13) + sim->bmap[y][x]=WL_ALLOWGAS; + } + + p++; + } + for (y=by0; y= dataLength) + goto corrupt; + sim->fvx[y][x] = (d[p++]-127.0f)/64.0f; + } + for (y=by0; y= dataLength) + goto corrupt; + sim->fvy[y][x] = (d[p++]-127.0f)/64.0f; + } + + // load the particle map + i = 0; + pty = p; + for (y=y0; y= dataLength) + goto corrupt; + j=d[p++]; + if (j >= PT_NUM) { + //TODO: Possibly some server side translation + j = PT_DUST;//goto corrupt; + } + sim->gol[x][y]=0; + if (j) + { + if (sim->pmap[y][x]) + { + k = sim->pmap[y][x]>>8; + } + else if (i= dataLength) + goto corrupt; + if (i < NPART) + { + parts[i].vx = (d[p++]-127.0f)/16.0f; + parts[i].vy = (d[p++]-127.0f)/16.0f; + } + else + p += 2; + } + } + for (j=0; j=44) { + if (p >= dataLength) { + goto corrupt; + } + if (i <= NPART) { + ttv = (d[p++])<<8; + ttv |= (d[p++]); + parts[i-1].life = ttv; + } else { + p+=2; + } + } else { + if (p >= dataLength) + goto corrupt; + if (i <= NPART) + parts[i-1].life = d[p++]*4; + else + p++; + } + } + } + if (ver>=44) { + for (j=0; j= dataLength) { + goto corrupt; + } + if (i <= NPART) { + ttv = (d[p++])<<8; + ttv |= (d[p++]); + parts[i-1].tmp = ttv; + if (ver<53 && !parts[i-1].tmp) + for (q = 1; q<=NGOLALT; q++) { + if (parts[i-1].type==sim->goltype[q-1] && sim->grule[q][9]==2) + parts[i-1].tmp = sim->grule[q][9]-1; + } + if (ver>=51 && ver<53 && parts[i-1].type==PT_PBCN) + { + parts[i-1].tmp2 = parts[i-1].tmp; + parts[i-1].tmp = 0; + } + } else { + p+=2; + } + } + } + } + if (ver>=53) { + for (j=0; j= dataLength) + goto corrupt; + if (i <= NPART) + parts[i-1].tmp2 = d[p++]; + else + p++; + } + } + } + //Read ALPHA component + for (j=0; j=49) { + if (p >= dataLength) { + goto corrupt; + } + if (i <= NPART) { + parts[i-1].dcolour = d[p++]<<24; + } else { + p++; + } + } + } + } + //Read RED component + for (j=0; j=49) { + if (p >= dataLength) { + goto corrupt; + } + if (i <= NPART) { + parts[i-1].dcolour |= d[p++]<<16; + } else { + p++; + } + } + } + } + //Read GREEN component + for (j=0; j=49) { + if (p >= dataLength) { + goto corrupt; + } + if (i <= NPART) { + parts[i-1].dcolour |= d[p++]<<8; + } else { + p++; + } + } + } + } + //Read BLUE component + for (j=0; j=49) { + if (p >= dataLength) { + goto corrupt; + } + if (i <= NPART) { + parts[i-1].dcolour |= d[p++]; + } else { + p++; + } + } + } + } + for (j=0; j=34&&legacy_beta==0) + { + if (p >= dataLength) + { + goto corrupt; + } + if (i <= NPART) + { + if (ver>=42) { + if (new_format) { + ttv = (d[p++])<<8; + ttv |= (d[p++]); + if (parts[i-1].type==PT_PUMP) { + parts[i-1].temp = ttv + 0.15;//fix PUMP saved at 0, so that it loads at 0. + } else { + parts[i-1].temp = ttv; + } + } else { + parts[i-1].temp = (d[p++]*((MAX_TEMP+(-MIN_TEMP))/255))+MIN_TEMP; + } + } else { + parts[i-1].temp = ((d[p++]*((O_MAX_TEMP+(-O_MIN_TEMP))/255))+O_MIN_TEMP)+273; + } + } + else + { + p++; + if (new_format) { + p++; + } + } + } + else + { + parts[i-1].temp = sim->ptypes[parts[i-1].type].heat; + } + } + } + for (j=0; j=43) || (ty==PT_BCLN && ver>=44) || (ty==PT_SPRK && ver>=21) || (ty==PT_LAVA && ver>=34) || (ty==PT_PIPE && ver>=43) || (ty==PT_LIFE && ver>=51) || (ty==PT_PBCN && ver>=52) || (ty==PT_WIRE && ver>=55) || (ty==PT_STOR && ver>=59) || (ty==PT_CONV && ver>=60))) + { + if (p >= dataLength) + goto corrupt; + if (i <= NPART) + parts[i-1].ctype = d[p++]; + else + p++; + } + //TODO: STKM_init_legs + // no more particle properties to load, so we can change type here without messing up loading + if (i && i<=NPART) + { + if ((sim->player.spwn == 1 && ty==PT_STKM) || (sim->player2.spwn == 1 && ty==PT_STKM2)) + { + parts[i-1].type = PT_NONE; + } + else if (parts[i-1].type == PT_STKM) + { + //STKM_init_legs(&player, i-1); + sim->player.spwn = 1; + sim->player.elem = PT_DUST; + } + else if (parts[i-1].type == PT_STKM2) + { + //STKM_init_legs(&player2, i-1); + sim->player2.spwn = 1; + sim->player2.elem = PT_DUST; + } + else if (parts[i-1].type == PT_FIGH) + { + unsigned char fcount = 0; + while (fcount < 100 && fcount < (sim->fighcount+1) && sim->fighters[fcount].spwn==1) fcount++; + if (fcount < 100 && sim->fighters[fcount].spwn==0) + { + parts[i-1].tmp = fcount; + sim->fighters[fcount].spwn = 1; + sim->fighters[fcount].elem = PT_DUST; + sim->fighcount++; + //STKM_init_legs(&(fighters[fcount]), i-1); + } + } + + if (ver<48 && (ty==OLD_PT_WIND || (ty==PT_BRAY&&parts[i-1].life==0))) + { + // Replace invisible particles with something sensible and add decoration to hide it + x = (int)(parts[i-1].x+0.5f); + y = (int)(parts[i-1].y+0.5f); + parts[i-1].dcolour = 0xFF000000; + parts[i-1].type = PT_DMND; + } + if(ver<51 && ((ty>=78 && ty<=89) || (ty>=134 && ty<=146 && ty!=141))){ + //Replace old GOL + parts[i-1].type = PT_LIFE; + for (gnum = 0; gnumgoltype[gnum]) + parts[i-1].ctype = gnum; + } + ty = PT_LIFE; + } + if(ver<52 && (ty==PT_CLNE || ty==PT_PCLN || ty==PT_BCLN)){ + //Replace old GOL ctypes in clone + for (gnum = 0; gnumgoltype[gnum]) + { + parts[i-1].ctype = PT_LIFE; + parts[i-1].tmp = gnum; + } + } + } + if(ty==PT_LCRY){ + if(ver<67) + { + //New LCRY uses TMP not life + if(parts[i-1].life>=10) + { + parts[i-1].life = 10; + parts[i-1].tmp2 = 10; + parts[i-1].tmp = 3; + } + else if(parts[i-1].life<=0) + { + parts[i-1].life = 0; + parts[i-1].tmp2 = 0; + parts[i-1].tmp = 0; + } + else if(parts[i-1].life < 10 && parts[i-1].life > 0) + { + parts[i-1].tmp = 1; + } + } + else + { + parts[i-1].tmp2 = parts[i-1].life; + } + } + if (!sim->ptypes[parts[i-1].type].enabled) + parts[i-1].type = PT_NONE; + } + } + + #ifndef RENDERER + //Change the gravity state + if(sim->ngrav_enable != tempGrav && replace) + { + if(tempGrav) + sim->grav->start_grav_async(); + else + sim->grav->stop_grav_async(); + } + #endif + + sim->grav->gravity_mask(); + + if (p >= dataLength) + goto version1; + j = d[p++]; + for (i=0; i dataLength) + goto corrupt; + for (k=0; ksigns[k].text[0]) + break; + x = d[p++]; + x |= ((unsigned)d[p++])<<8; + if (ksigns[k].x = x+x0; + x = d[p++]; + x |= ((unsigned)d[p++])<<8; + if (ksigns[k].y = x+y0; + x = d[p++]; + if (ksigns[k].ju = x; + x = d[p++]; + if (p+x > dataLength) + goto corrupt; + if (ksigns[k].text, d+p, x); + sim->signs[k].text[x] = 0; + //clean_text(signs[k].text, 158-14 /* Current max sign length */); //TODO: Text cleanup for signs + } + p += x; + } + +version1: + if (m) free(m); + if (d) free(d); + if (fp) free(fp); + return 0; + +corrupt: + if (m) free(m); + if (d) free(d); + if (fp) free(fp); + if (replace) + { + sim->legacy_enable = 0; + sim->clear_sim(); + } + return 1; } unsigned char * PSVBuildSave(int & dataLength, Simulation * sim) diff --git a/src/simulation/SaveLoader.h b/src/simulation/SaveLoader.h index e517a2b..50b1401 100644 --- a/src/simulation/SaveLoader.h +++ b/src/simulation/SaveLoader.h @@ -12,11 +12,11 @@ class SaveLoader { public: - static int LoadSave(unsigned char * data, int dataLength, Simulation * sim); + static int LoadSave(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x, int y); static unsigned char * BuildSave(int & dataLength, Simulation * sim); static int OPSLoadSave(unsigned char * data, int dataLength, Simulation * sim); static unsigned char * OPSBuildSave(int & dataLength, Simulation * sim); - static int PSVLoadSave(unsigned char * data, int dataLength, Simulation * sim); + static int PSVLoadSave(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x, int y); static unsigned char * PSVBuildSave(int & dataLength, Simulation * sim); }; diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 8932863..ca9e411 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -10,7 +10,7 @@ int Simulation::Load(unsigned char * data, int dataLength) { - return SaveLoader::LoadSave(data, dataLength, this); + return SaveLoader::LoadSave(data, dataLength, this, true, 0, 0); } unsigned char * Simulation::Save(int & dataLength) diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index 8a1ed16..f03b189 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -14,6 +14,7 @@ #include "Elements.h" #include "Misc.h" #include "game/Brush.h" +#include "Gravity.h" #include "SimulationData.h" //#include "ElementFunctions.h" @@ -204,36 +205,36 @@ public: int sandcolour_r; int sandcolour_g; int sandcolour_b; //TODO: Make a single variable - //TODO: Inlines for performance + int Load(unsigned char * data, int dataLength); unsigned char * Save(int & dataLength); - int is_blocking(int t, int x, int y); - int is_boundary(int pt, int x, int y); - int find_next_boundary(int pt, int *x, int *y, int dm, int *em); - int pn_junction_sprk(int x, int y, int pt); - void photoelectric_effect(int nx, int ny); - unsigned direction_to_map(float dx, float dy, int t); - int do_move(int i, int x, int y, float nxf, float nyf); - int try_move(int i, int x, int y, int nx, int ny); - int eval_move(int pt, int nx, int ny, unsigned *rr); + inline int is_blocking(int t, int x, int y); + inline int is_boundary(int pt, int x, int y); + inline int find_next_boundary(int pt, int *x, int *y, int dm, int *em); + inline int pn_junction_sprk(int x, int y, int pt); + inline void photoelectric_effect(int nx, int ny); + inline unsigned direction_to_map(float dx, float dy, int t); + inline int do_move(int i, int x, int y, float nxf, float nyf); + inline int try_move(int i, int x, int y, int nx, int ny); + inline int eval_move(int pt, int nx, int ny, unsigned *rr); void init_can_move(); void create_cherenkov_photon(int pp); void create_gain_photon(int pp); - void kill_part(int i); + inline void kill_part(int i); int flood_prop(int x, int y, size_t propoffset, void * propvalue, int proptype); int flood_prop_2(int x, int y, size_t propoffset, void * propvalue, int proptype, int parttype, char * bitmap); int flood_water(int x, int y, int i, int originaly, int check); - void detach(int i); - void part_change_type(int i, int x, int y, int t); - int create_part_add_props(int p, int x, int y, int tv, int rx, int ry); + inline void detach(int i); + inline void part_change_type(int i, int x, int y, int t); + inline int create_part_add_props(int p, int x, int y, int tv, int rx, int ry); //int InCurrentBrush(int i, int j, int rx, int ry); //int get_brush_flags(); - int create_part(int p, int x, int y, int t); - void delete_part(int x, int y, int flags); - int is_wire(int x, int y); - int is_wire_off(int x, int y); - void set_emap(int x, int y); - int parts_avg(int ci, int ni, int t); + inline int create_part(int p, int x, int y, int t); + inline void delete_part(int x, int y, int flags); + inline int is_wire(int x, int y); + inline int is_wire_off(int x, int y); + inline void set_emap(int x, int y); + inline int parts_avg(int ci, int ni, int t); void create_arc(int sx, int sy, int dx, int dy, int midpoints, int variance, int type, int flags); int nearest_part(int ci, int t, int max_d); void update_particles_i(int start, int inc); @@ -245,11 +246,11 @@ public: int create_parts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush = NULL); void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags, Brush * cBrush = NULL); void *transform_save(void *odata, int *size, matrix2d transform, vector2d translate); - void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]); - void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]); - int get_wavelength_bin(int *wm); - int get_normal(int pt, int x, int y, float dx, float dy, float *nx, float *ny); - int get_normal_interp(int pt, float x0, float y0, float dx, float dy, float *nx, float *ny); + inline void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]); + inline void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]); + inline int get_wavelength_bin(int *wm); + inline int get_normal(int pt, int x, int y, float dx, float dy, float *nx, float *ny); + inline int get_normal_interp(int pt, float x0, float y0, float dx, float dy, float *nx, float *ny); void clear_sim(); void UpdateParticles(); Simulation(); -- cgit v0.9.2-21-gd62e From 824d3c069bc409d268a2a15352e96868a7731a56 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 26 Jan 2012 16:23:18 +0000 Subject: Clear air properly diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index ca9e411..81e394c 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -872,11 +872,11 @@ void Simulation::clear_sim(void) parts_lastActiveIndex = 0; memset(pmap, 0, sizeof(pmap)); if(pv) - memset(pv, 0, sizeof(pv)); + memset(pv, 0, (XRES/CELL) * (YRES/CELL)*sizeof(float)); if(vx) - memset(vx, 0, sizeof(vx)); + memset(vx, 0, (XRES/CELL) * (YRES/CELL)*sizeof(float)); if(vy) - memset(vy, 0, sizeof(vy)); + memset(vy, 0, (XRES/CELL) * (YRES/CELL)*sizeof(float)); if(fvx) memset(fvx, 0, sizeof(fvx)); if(fvy) -- cgit v0.9.2-21-gd62e From e84f0fc6e5301265708a99b13ab898ce45422611 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 26 Jan 2012 18:06:23 +0000 Subject: Ellipse cursor diff --git a/src/game/Brush.h b/src/game/Brush.h index cc5e819..9daf721 100644 --- a/src/game/Brush.h +++ b/src/game/Brush.h @@ -12,6 +12,7 @@ class Brush { +protected: bool * bitmap; ui::Point size; public: diff --git a/src/game/EllipseBrush.h b/src/game/EllipseBrush.h new file mode 100644 index 0000000..7e5825b --- /dev/null +++ b/src/game/EllipseBrush.h @@ -0,0 +1,60 @@ +/* + * ElipseBrush.h + * + * Created on: Jan 26, 2012 + * Author: Simon + */ + +#ifndef ELIPSEBRUSH_H_ +#define ELIPSEBRUSH_H_ + +#include "Brush.h" + +class EllipseBrush: public Brush +{ +public: + EllipseBrush(ui::Point size_): + Brush(size_) + { + + }; + //Draw the brush outline onto the screen + virtual void Render(Graphics * g, ui::Point position) + { + if(!bitmap) + GenerateBitmap(); + //g->fillrect(position.X-size.X-1, position.Y-size.Y-1, (size.X*2)+2, (size.Y*2)+2, 255, 0, 255, 70); + for(int x = 0; x <= size.X*2; x++) + { + for(int y = 0; y <= size.Y*2; y++) + { + if(bitmap[y*(size.X*2)+x]) + g->blendpixel(position.X-size.X+x, position.Y-size.Y+y, 255, 0, 255, 70); + } + } + } + virtual void GenerateBitmap() + { + if(bitmap) + free(bitmap); + bitmap = (bool *)malloc(sizeof(bool)*(((size.X*2)+1)*((size.Y*2)+1))); + int rx = size.X; + int ry = size.Y; + for(int x = 0; x <= size.X*2; x++) + { + for(int y = 0; y <= size.Y*2; y++) + { + if((pow(x-size.X,2)*pow(ry,2)+pow(y-size.Y,2)*pow(rx,2)<=pow(rx,2)*pow(ry,2))) + { + bitmap[y*(size.X*2)+x] = true; + } + else + { + bitmap[y*(size.X*2)+x] = false; + } + } + } + } +}; + +#endif /* ELIPSEBRUSH_H_ */ diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 90ef70c..277c32c 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -226,6 +226,10 @@ void GameController::Vote(int direction) //TODO: Implement } +void GameController::ChangeBrush() +{ + gameModel->SetBrush(gameModel->GetBrushID()+1); +} void GameController::ClearSim() { diff --git a/src/game/GameController.h b/src/game/GameController.h index 28edd86..2ec4523 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -47,6 +47,7 @@ public: void ClearSim(); void ReloadSim(); void Vote(int direction); + void ChangeBrush(); }; #endif // GAMECONTROLLER_H diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 3085b09..5dfc521 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -5,13 +5,14 @@ #include "Renderer.h" #include "interface/Point.h" #include "Brush.h" +#include "EllipseBrush.h" GameModel::GameModel(): activeTool(NULL), sim(NULL), ren(NULL), currentSave(NULL), - currentBrush(new Brush(ui::Point(4, 4))), + currentBrush(0), currentUser(0, "") { sim = new Simulation(); @@ -39,6 +40,9 @@ GameModel::GameModel(): //sim->wtypes[i] } + brushList.push_back(new Brush(ui::Point(4, 4))); + brushList.push_back(new EllipseBrush(ui::Point(4, 4))); + activeTool = new ElementTool(1, "TURD", 0, 0, 0); } @@ -52,6 +56,10 @@ GameModel::~GameModel() } delete menuList[i]; } + for(int i = 0; i < brushList.size(); i++) + { + delete brushList[i]; + } delete sim; delete ren; if(activeTool) @@ -60,9 +68,20 @@ GameModel::~GameModel() Brush * GameModel::GetBrush() { + return brushList[currentBrush]; +} + +int GameModel::GetBrushID() +{ return currentBrush; } +void GameModel::SetBrush(int i) +{ + currentBrush = i%brushList.size(); + notifyBrushChanged(); +} + void GameModel::AddObserver(GameView * observer){ observers.push_back(observer); diff --git a/src/game/GameModel.h b/src/game/GameModel.h index b8f5217..72e2875 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -25,7 +25,8 @@ private: vector toolList; vector menuList; Menu * activeMenu; - Brush * currentBrush; + int currentBrush; + vector brushList; Save * currentSave; Simulation * sim; Renderer * ren; @@ -43,6 +44,7 @@ private: public: GameModel(); ~GameModel(); + Save * GetSave(); Brush * GetBrush(); void SetSave(Save * newSave); @@ -58,6 +60,8 @@ public: Menu * GetActiveMenu(); User GetUser(); void SetUser(User user); + void SetBrush(int i); + int GetBrushID(); Simulation * GetSimulation(); Renderer * GetRenderer(); }; diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 163c2f7..ec87f64 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -3,6 +3,7 @@ #include "interface/Window.h" #include "interface/Button.h" #include "interface/Colour.h" +#include "interface/Keys.h" GameView::GameView(): ui::Window(ui::Point(0, 0), ui::Point(XRES+BARSIZE, YRES+MENUSIZE)), @@ -399,9 +400,12 @@ void GameView::OnKeyPress(int key, bool shift, bool ctrl, bool alt) { switch(key) { - case ' ': + case ' ': //Space c->SetPaused(); break; + case KEY_TAB: //Tab + c->ChangeBrush(); + break; } } diff --git a/src/interface/Keys.h b/src/interface/Keys.h index e923703..22fffa2 100644 --- a/src/interface/Keys.h +++ b/src/interface/Keys.h @@ -6,3 +6,4 @@ #define KEY_END SDLK_END #define KEY_BACKSPACE SDLK_BACKSPACE #define KEY_DELETE SDLK_DELETE +#define KEY_TAB SDLK_TAB -- cgit v0.9.2-21-gd62e From ebd80c73de6b02e1fcf731aa0f377b6085128e57 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 27 Jan 2012 09:38:56 +0000 Subject: Some inlines and Checkbox ui component diff --git a/src/Graphics.cpp b/src/Graphics.cpp index ae4926a..a48f6d6 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -70,7 +70,7 @@ int plasma_data_points = 5; pixel plasma_data_colours[] = {PIXPACK(0xAFFFFF), PIXPACK(0xAFFFFF), PIXPACK(0x301060), PIXPACK(0x301040), PIXPACK(0x000000)}; float plasma_data_pos[] = {1.0f, 0.9f, 0.5f, 0.25, 0.0f};*/ -char * Graphics::generate_gradient(pixel * colours, float * points, int pointcount, int size) +char * Graphics::GenerateGradient(pixel * colours, float * points, int pointcount, int size) { int cp, i, j; pixel ptemp; diff --git a/src/Graphics.h b/src/Graphics.h index 82117a7..25cb5d6 100644 --- a/src/Graphics.h +++ b/src/Graphics.h @@ -91,8 +91,8 @@ public: SDL_Surface * sdl_scrn; pixel *vid; pixel *render_packed_rgb(void *image, int width, int height, int cmp_size); - static char * generate_gradient(pixel * colours, float * points, int pointcount, int size); - void draw_other(); + static char * GenerateGradient(pixel * colours, float * points, int pointcount, int size); + //void draw_other(); void draw_rgba_image(unsigned char *data, int x, int y, float a); static void *ptif_pack(pixel *src, int w, int h, int *result_size); static pixel *ptif_unpack(void *datain, int size, int *w, int *h); @@ -103,13 +103,13 @@ public: //void sdl_blit_1(int x, int y, int w, int h, pixel *src, int pitch); //void sdl_blit_2(int x, int y, int w, int h, pixel *src, int pitch); //void sdl_blit(int x, int y, int w, int h, pixel *src, int pitch); - void drawblob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb); + inline void drawblob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb); void draw_tool(int b, int sl, int sr, unsigned pc, unsigned iswall); //int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc); //void draw_menu(pixel *vid_buf, int i, int hover); void drawpixel(int x, int y, int r, int g, int b, int a); - int addchar(int x, int y, int c, int r, int g, int b, int a); - int drawchar(int x, int y, int c, int r, int g, int b, int a); + inline int addchar(int x, int y, int c, int r, int g, int b, int a); + inline int drawchar(int x, int y, int c, int r, int g, int b, int a); int drawtext(int x, int y, std::string &s, int r, int g, int b, int a); int drawtext(int x, int y, const char *s, int r, int g, int b, int a); int drawtext_outline(int x, int y, const char *s, int r, int g, int b, int a, int olr, int olg, int olb, int ola); @@ -125,17 +125,17 @@ public: static int textwidthx(char *s, int w); static int textposxy(char *s, int width, int w, int h); static int textwrapheight(char *s, int width); - void blendpixel(int x, int y, int r, int g, int b, int a); + inline void blendpixel(int x, int y, int r, int g, int b, int a); void draw_icon(int x, int y, char ch, int flag); //void draw_air(); //void draw_grav_zones(pixel *vid); //void draw_grav(pixel *vid); void draw_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a); - void addpixel(int x, int y, int r, int g, int b, int a); + inline void addpixel(int x, int y, int r, int g, int b, int a); void xor_pixel(int x, int y); void xor_line(int x1, int y1, int x2, int y2); void xor_rect(int x, int y, int w, int h); - void blend_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a); + inline void blend_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a); //void render_parts(pixel *vid); // #ifdef OGLR // void draw_parts_fbo(); @@ -147,11 +147,11 @@ public: // void line_decorations(int x1, int y1, int x2, int y2, int rx, int ry, int r, int g, int b, int click, int tool); // void box_decorations(int x1, int y1, int x2, int y2, int r, int g, int b, int click, int tool); // void draw_color_menu(pixel *vid_buf, int i, int hover); - void draw_wavelengths(int x, int y, int h, int wl); - void render_signs(); + inline void draw_wavelengths(int x, int y, int h, int wl); + //void render_signs(); // void render_fire(pixel *dst); // void prepare_alpha(int size, float intensity); - void draw_image(pixel *img, int x, int y, int w, int h, int a); + inline void draw_image(pixel *img, int x, int y, int w, int h, int a); static void dim_copy(pixel *dst, pixel *src); static void dim_copy_pers(pixel *dst, pixel *src); //void render_zoom(pixel *img); diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 4226483..c602232 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -18,7 +18,7 @@ extern "C" #include "hmap.h" } -void Renderer::draw_walls() +void Renderer::DrawWalls() { int x, y, i, j, cr, cg, cb; unsigned char wt; @@ -250,7 +250,7 @@ void Renderer::get_sign_pos(int i, int *x0, int *y0, int *w, int *h) *y0 = (signs[i].y > 18) ? signs[i].y - 18 : signs[i].y + 4; } -void Renderer::render_signs() +void Renderer::DrawSigns() { int i, j, x, y, w, h, dx, dy,mx,my,b=1,bq; sign *signs = sim->signs; @@ -1429,12 +1429,6 @@ void Renderer::render_parts() #endif } -void Renderer::prepare_graphicscache() -{ - graphicscache = (gcache_item *)malloc(sizeof(gcache_item)*PT_NUM); - memset(graphicscache, 0, sizeof(gcache_item)*PT_NUM); -} - void Renderer::draw_other() // EMP effect { int i, j; @@ -1648,33 +1642,6 @@ void Renderer::draw_grav_zones() } } -void Renderer::init_display_modes() -{ - int i; - colour_mode = COLOUR_DEFAULT; - display_modes = (unsigned int*)calloc(1, sizeof(unsigned int)); - render_modes = (unsigned int*)calloc(2, sizeof(unsigned int)); - - display_modes[0] = 0; - render_modes[0] = RENDER_FIRE; - render_modes[1] = 0; - - display_mode = 0; - i = 0; - while(display_modes[i]) - { - display_mode |= display_modes[i]; - i++; - } - render_mode = 0; - i = 0; - while(render_modes[i]) - { - render_mode |= render_modes[i]; - i++; - } -} - Renderer::Renderer(Graphics * g, Simulation * sim): sim(NULL), g(NULL) @@ -1686,19 +1653,82 @@ Renderer::Renderer(Graphics * g, Simulation * sim): memset(fire_g, 0, sizeof(fire_g)); memset(fire_b, 0, sizeof(fire_b)); prepare_alpha(CELL, 1.0f); - init_display_modes(); - prepare_graphicscache(); - int flm_data_points = 4; - pixel flm_data_colours[] = {PIXPACK(0xAF9F0F), PIXPACK(0xDFBF6F), PIXPACK(0x60300F), PIXPACK(0x000000)}; - float flm_data_pos[] = {1.0f, 0.9f, 0.5f, 0.0f}; + //Set defauly display modes + SetColourMode(COLOUR_DEFAULT); + AddRenderMode(RENDER_FIRE); + + //Prepare the graphics cache + graphicscache = (gcache_item *)malloc(sizeof(gcache_item)*PT_NUM); + memset(graphicscache, 0, sizeof(gcache_item)*PT_NUM); + + int fireColoursCount = 4; + pixel fireColours[] = {PIXPACK(0xAF9F0F), PIXPACK(0xDFBF6F), PIXPACK(0x60300F), PIXPACK(0x000000)}; + float fireColoursPoints[] = {1.0f, 0.9f, 0.5f, 0.0f}; + + int plasmaColoursCount = 5; + pixel plasmaColours[] = {PIXPACK(0xAFFFFF), PIXPACK(0xAFFFFF), PIXPACK(0x301060), PIXPACK(0x301040), PIXPACK(0x000000)}; + float plasmaColoursPoints[] = {1.0f, 0.9f, 0.5f, 0.25, 0.0f}; - int plasma_data_points = 5; - pixel plasma_data_colours[] = {PIXPACK(0xAFFFFF), PIXPACK(0xAFFFFF), PIXPACK(0x301060), PIXPACK(0x301040), PIXPACK(0x000000)}; - float plasma_data_pos[] = {1.0f, 0.9f, 0.5f, 0.25, 0.0f}; + flm_data = Graphics::GenerateGradient(fireColours, fireColoursPoints, fireColoursCount, 200); + plasma_data = Graphics::GenerateGradient(plasmaColours, plasmaColoursPoints, plasmaColoursCount, 200); +} - flm_data = Graphics::generate_gradient(flm_data_colours, flm_data_pos, flm_data_points, 200); - plasma_data = Graphics::generate_gradient(plasma_data_colours, plasma_data_pos, plasma_data_points, 200); +void Renderer::CompileRenderMode() +{ + render_mode = 0; + for(int i = 0; i < render_modes.size(); i++) + render_mode |= render_modes[i]; +} + +void Renderer::AddRenderMode(unsigned int mode) +{ + render_modes.push_back(mode); + CompileRenderMode(); +} + +void Renderer::RemoveRenderMode(unsigned int mode) +{ + for(int i = 0; i < render_modes.size(); i++) + { + if(render_modes[i] == mode) + { + render_modes.erase(render_modes.begin() + i); + return; + } + } + CompileRenderMode(); +} + +void Renderer::CompileDisplayMode() +{ + display_mode = 0; + for(int i = 0; i < display_modes.size(); i++) + display_mode |= display_modes[i]; +} + +void Renderer::AddDisplayMode(unsigned int mode) +{ + display_modes.push_back(mode); + CompileDisplayMode(); +} + +void Renderer::RemoveDisplayMode(unsigned int mode) +{ + for(int i = 0; i < display_modes.size(); i++) + { + if(display_modes[i] == mode) + { + display_modes.erase(display_modes.begin() + i); + return; + } + } + CompileDisplayMode(); +} + +void Renderer::SetColourMode(unsigned int mode) +{ + colour_mode = mode; } Renderer::~Renderer() @@ -1706,6 +1736,4 @@ Renderer::~Renderer() free(graphicscache); free(flm_data); free(plasma_data); - free(render_modes); - free(display_modes); } diff --git a/src/Renderer.h b/src/Renderer.h index 8592e41..d43e0cb 100644 --- a/src/Renderer.h +++ b/src/Renderer.h @@ -1,6 +1,7 @@ #ifndef RENDERER_H #define RENDERER_H +#include #include "Config.h" #include "simulation/Simulation.h" #include "Graphics.h" @@ -21,11 +22,10 @@ typedef struct gcache_item gcache_item; class Renderer { public: - //TODO: Vectors! - unsigned int *render_modes; + std::vector render_modes; unsigned int render_mode; unsigned int colour_mode; - unsigned int *display_modes; + std::vector display_modes; unsigned int display_mode; // unsigned char fire_r[YRES/CELL][XRES/CELL]; @@ -40,9 +40,10 @@ public: Simulation * sim; Graphics * g; gcache_item *graphicscache; - // - void draw_walls(); - void render_signs(); + + //Renderers + void DrawWalls(); + void DrawSigns(); void render_gravlensing(); void render_fire(); void prepare_alpha(int size, float intensity); @@ -51,9 +52,19 @@ public: void draw_air(); void draw_grav(); void draw_other(); - void init_display_modes(); + + //... void get_sign_pos(int i, int *x0, int *y0, int *w, int *h); - void prepare_graphicscache(); + + //Display mode modifiers + void CompileDisplayMode(); + void CompileRenderMode(); + void AddRenderMode(unsigned int mode); + void RemoveRenderMode(unsigned int mode); + void AddDisplayMode(unsigned int mode); + void RemoveDisplayMode(unsigned int mode); + void SetColourMode(unsigned int mode); + Renderer(Graphics * g, Simulation * sim); ~Renderer(); }; diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index ec87f64..3f31554 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -428,8 +428,8 @@ void GameView::OnDraw() { ren->render_parts(); ren->render_fire(); - ren->render_signs(); - ren->draw_walls(); + ren->DrawSigns(); + ren->DrawWalls(); } if(activeBrush && currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) { diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 8fe847e..b145b38 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -204,6 +204,8 @@ void Button::DoAction() void Button::SetActionCallback(ButtonAction * action) { + if(actionCallback) + delete actionCallback; actionCallback = action; } diff --git a/src/interface/Checkbox.cpp b/src/interface/Checkbox.cpp new file mode 100644 index 0000000..3244552 --- /dev/null +++ b/src/interface/Checkbox.cpp @@ -0,0 +1,89 @@ +/* + * Checkbox.cpp + * + * Created on: Jan 26, 2012 + * Author: Simon + */ + +#include "Checkbox.h" + +using namespace ui; + +Checkbox::Checkbox(ui::Point position, ui::Point size, std::string text): + Component(position, size), + text(text), + isMouseOver(false), + checked(false), + actionCallback(NULL) +{ + // TODO Auto-generated constructor stub + +} + +void Checkbox::SetText(std::string text) +{ + this->text = text; +} + +void Checkbox::OnMouseClick(int x, int y, unsigned int button) +{ + if(checked) + { + checked = false; + } + else + { + checked = true; + } + if(actionCallback) + actionCallback->ActionCallback(this); +} + +void Checkbox::OnMouseUp(int x, int y, unsigned int button) +{ + +} + + +void Checkbox::OnMouseEnter(int x, int y) +{ + isMouseOver = true; +} + +void Checkbox::OnMouseLeave(int x, int y) +{ + isMouseOver = false; +} + +void Checkbox::Draw(const Point& screenPos) +{ + Graphics * g = Engine::Ref().g; + if(checked) + { + g->fillrect(screenPos.X+4, screenPos.Y+4, 8, 8, 255, 255, 255, 255); + } + if(isMouseOver) + { + g->drawrect(screenPos.X+2, screenPos.Y+2, 12, 12, 255, 255, 255, 255); + g->fillrect(screenPos.X+4, screenPos.Y+4, 8, 8, 255, 255, 255, 170); + g->drawtext(screenPos.X+18, screenPos.Y+4, text, 255, 255, 255, 255); + } + else + { + g->drawrect(screenPos.X+2, screenPos.Y+2, 12, 12, 255, 255, 255, 200); + g->drawtext(screenPos.X+18, screenPos.Y+4, text, 255, 255, 255, 200); + } +} + +void Checkbox::SetActionCallback(CheckboxAction * action) +{ + if(actionCallback) + delete actionCallback; + actionCallback = action; +} + +Checkbox::~Checkbox() { + if(actionCallback) + delete actionCallback; +} + diff --git a/src/interface/Checkbox.h b/src/interface/Checkbox.h new file mode 100644 index 0000000..ed7dc95 --- /dev/null +++ b/src/interface/Checkbox.h @@ -0,0 +1,40 @@ +/* + * Checkbox.h + * + * Created on: Jan 26, 2012 + * Author: Simon + */ + +#ifndef CHECKBOX_H_ +#define CHECKBOX_H_ + +#include +#include "Component.h" +namespace ui +{ +class Checkbox; +class CheckboxAction +{ +public: + virtual void ActionCallback(ui::Checkbox * sender) {} + virtual ~CheckboxAction() {} +}; +class Checkbox: public ui::Component { + std::string text; + bool checked; + bool isMouseOver; + CheckboxAction * actionCallback; +public: + Checkbox(ui::Point position, ui::Point size, std::string text); + void SetText(std::string text); + void Draw(const Point& screenPos); + virtual void OnMouseEnter(int x, int y); + virtual void OnMouseLeave(int x, int y); + virtual void OnMouseClick(int x, int y, unsigned int button); + virtual void OnMouseUp(int x, int y, unsigned int button); + void SetActionCallback(CheckboxAction * action); + virtual ~Checkbox(); +}; +} + +#endif /* CHECKBOX_H_ */ diff --git a/src/render/RenderView.cpp b/src/render/RenderView.cpp index 93c0dec..8412126 100644 --- a/src/render/RenderView.cpp +++ b/src/render/RenderView.cpp @@ -12,7 +12,10 @@ RenderView::RenderView(): ui::Window(ui::Point(0, 0), ui::Point(XRES, YRES+MENUSIZE)), ren(NULL) { - // TODO Auto-generated constructor stub + ui::Checkbox * tCheckbox; + tCheckbox = new ui::Checkbox(ui::Point(0, YRES+5), ui::Point(100, 16), "Thing"); + renderModes.push_back(tCheckbox); + AddComponent(tCheckbox); } diff --git a/src/render/RenderView.h b/src/render/RenderView.h index 37f023a..362bfb4 100644 --- a/src/render/RenderView.h +++ b/src/render/RenderView.h @@ -8,16 +8,20 @@ #ifndef RENDERVIEW_H_ #define RENDERVIEW_H_ + +#include #include "interface/Window.h" #include "RenderController.h" #include "RenderModel.h" #include "Renderer.h" +#include "interface/Checkbox.h" class RenderController; class RenderModel; class RenderView: public ui::Window { RenderController * c; Renderer * ren; + std::vector renderModes; public: RenderView(); void NotifyRendererChanged(RenderModel * sender); -- cgit v0.9.2-21-gd62e From 1c971e4b4210359e400511ad61b8e4eff2f7a79a Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 27 Jan 2012 11:05:26 +0000 Subject: Functional checkbox on render options screen diff --git a/src/Renderer.cpp b/src/Renderer.cpp index c602232..f6c1fed 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -6,6 +6,7 @@ */ #include +#include #include "Config.h" #include "Renderer.h" #include "Graphics.h" @@ -1683,6 +1684,13 @@ void Renderer::CompileRenderMode() void Renderer::AddRenderMode(unsigned int mode) { + for(int i = 0; i < render_modes.size(); i++) + { + if(render_modes[i] == mode) + { + return; + } + } render_modes.push_back(mode); CompileRenderMode(); } @@ -1694,7 +1702,7 @@ void Renderer::RemoveRenderMode(unsigned int mode) if(render_modes[i] == mode) { render_modes.erase(render_modes.begin() + i); - return; + i = 0; } } CompileRenderMode(); @@ -1709,6 +1717,13 @@ void Renderer::CompileDisplayMode() void Renderer::AddDisplayMode(unsigned int mode) { + for(int i = 0; i < display_modes.size(); i++) + { + if(display_modes[i] == mode) + { + return; + } + } display_modes.push_back(mode); CompileDisplayMode(); } @@ -1720,7 +1735,7 @@ void Renderer::RemoveDisplayMode(unsigned int mode) if(display_modes[i] == mode) { display_modes.erase(display_modes.begin() + i); - return; + i = 0; } } CompileDisplayMode(); diff --git a/src/interface/Checkbox.h b/src/interface/Checkbox.h index ed7dc95..8abbe1c 100644 --- a/src/interface/Checkbox.h +++ b/src/interface/Checkbox.h @@ -33,6 +33,8 @@ public: virtual void OnMouseClick(int x, int y, unsigned int button); virtual void OnMouseUp(int x, int y, unsigned int button); void SetActionCallback(CheckboxAction * action); + CheckboxAction * GetActionCallback() { return actionCallback; } + bool IsChecked() { return checked; } virtual ~Checkbox(); }; } diff --git a/src/render/RenderController.cpp b/src/render/RenderController.cpp index 01a5d4e..8477245 100644 --- a/src/render/RenderController.cpp +++ b/src/render/RenderController.cpp @@ -20,6 +20,16 @@ RenderController::RenderController(Renderer * ren, ControllerCallback * callback this->callback = callback; } +void RenderController::SetRenderMode(unsigned int renderMode) +{ + renderModel->SetRenderMode(renderMode); +} + +void RenderController::UnsetRenderMode(unsigned int renderMode) +{ + renderModel->UnsetRenderMode(renderMode); +} + void RenderController::Exit() { if(ui::Engine::Ref().GetWindow() == renderView) diff --git a/src/render/RenderController.h b/src/render/RenderController.h index 704d6d4..95a1bcc 100644 --- a/src/render/RenderController.h +++ b/src/render/RenderController.h @@ -25,6 +25,8 @@ public: void Exit(); RenderView * GetView() { return renderView; } virtual ~RenderController(); + void SetRenderMode(unsigned int renderMode); + void UnsetRenderMode(unsigned int renderMode); }; #endif /* RENDERCONTROLLER_H_ */ diff --git a/src/render/RenderModel.cpp b/src/render/RenderModel.cpp index 6bd9bdd..ef0f656 100644 --- a/src/render/RenderModel.cpp +++ b/src/render/RenderModel.cpp @@ -18,6 +18,16 @@ void RenderModel::AddObserver(RenderView * observer) observer->NotifyRendererChanged(this); } +void RenderModel::SetRenderMode(unsigned int renderMode) +{ + renderer->AddRenderMode(renderMode); +} + +void RenderModel::UnsetRenderMode(unsigned int renderMode) +{ + renderer->RemoveRenderMode(renderMode); +} + void RenderModel::SetRenderer(Renderer * ren) { renderer = ren; diff --git a/src/render/RenderModel.h b/src/render/RenderModel.h index b4f9ee8..048cfc5 100644 --- a/src/render/RenderModel.h +++ b/src/render/RenderModel.h @@ -24,6 +24,8 @@ public: Renderer * GetRenderer(); void AddObserver(RenderView * observer); void SetRenderer(Renderer * ren); + void SetRenderMode(unsigned int renderMode); + void UnsetRenderMode(unsigned int renderMode); virtual ~RenderModel(); }; diff --git a/src/render/RenderView.cpp b/src/render/RenderView.cpp index 8412126..5551615 100644 --- a/src/render/RenderView.cpp +++ b/src/render/RenderView.cpp @@ -5,16 +5,38 @@ * Author: Simon */ -#include "RenderView.h" +#include "simulation/ElementGraphics.h" #include "Graphics.h" +#include "Renderer.h" +#include "RenderView.h" + +class RenderView::RenderModeAction: public ui::CheckboxAction +{ + RenderView * v; + unsigned int renderMode; +public: + RenderModeAction(RenderView * v_, unsigned int renderMode_) + { + v = v_; + renderMode = renderMode_; + } + virtual void ActionCallback(ui::Checkbox * sender) + { + if(sender->IsChecked()) + v->c->SetRenderMode(renderMode); + else + v->c->UnsetRenderMode(renderMode); + } +}; RenderView::RenderView(): ui::Window(ui::Point(0, 0), ui::Point(XRES, YRES+MENUSIZE)), ren(NULL) { ui::Checkbox * tCheckbox; - tCheckbox = new ui::Checkbox(ui::Point(0, YRES+5), ui::Point(100, 16), "Thing"); + tCheckbox = new ui::Checkbox(ui::Point(0, YRES+5), ui::Point(100, 16), "Blob"); renderModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BLOB)); AddComponent(tCheckbox); } diff --git a/src/render/RenderView.h b/src/render/RenderView.h index 362bfb4..cdf0488 100644 --- a/src/render/RenderView.h +++ b/src/render/RenderView.h @@ -23,6 +23,7 @@ class RenderView: public ui::Window { Renderer * ren; std::vector renderModes; public: + class RenderModeAction; RenderView(); void NotifyRendererChanged(RenderModel * sender); void AttachController(RenderController * c_) { c = c_; } -- cgit v0.9.2-21-gd62e From 2a7628dfd0037fde1f504b276b262ebc9328df60 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 27 Jan 2012 13:27:40 +0000 Subject: Render options diff --git a/src/Renderer.cpp b/src/Renderer.cpp index f6c1fed..9d26378 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -1657,6 +1657,7 @@ Renderer::Renderer(Graphics * g, Simulation * sim): //Set defauly display modes SetColourMode(COLOUR_DEFAULT); + AddRenderMode(RENDER_BASC); AddRenderMode(RENDER_FIRE); //Prepare the graphics cache diff --git a/src/interface/Checkbox.h b/src/interface/Checkbox.h index 8abbe1c..ba96cc7 100644 --- a/src/interface/Checkbox.h +++ b/src/interface/Checkbox.h @@ -34,7 +34,8 @@ public: virtual void OnMouseUp(int x, int y, unsigned int button); void SetActionCallback(CheckboxAction * action); CheckboxAction * GetActionCallback() { return actionCallback; } - bool IsChecked() { return checked; } + bool GetChecked() { return checked; } + void SetChecked(bool checked_) { checked = checked_; } virtual ~Checkbox(); }; } diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index d0bd6da..983e730 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -50,6 +50,12 @@ void PreviewView::OnDraw() g->drawrect(Position.X, Position.Y, XRES/2, YRES/2, 255, 255, 255, 100); } +void PreviewView::OnMouseDown(int x, int y, unsigned button) +{ + if(!(x > Position.X && y > Position.Y && y < Position.Y+Size.Y && x < Position.X+Size.X)) //Clicked outside window + c->Exit(); +} + void PreviewView::NotifySaveChanged(PreviewModel * sender) { Save * save = sender->GetSave(); diff --git a/src/preview/PreviewView.h b/src/preview/PreviewView.h index 616bffc..ac17df5 100644 --- a/src/preview/PreviewView.h +++ b/src/preview/PreviewView.h @@ -27,6 +27,7 @@ public: void NotifyPreviewChanged(PreviewModel * sender); void NotifySaveChanged(PreviewModel * sender); virtual void OnDraw(); + virtual void OnMouseDown(int x, int y, unsigned button); virtual ~PreviewView(); }; diff --git a/src/render/RenderController.cpp b/src/render/RenderController.cpp index 8477245..e92f039 100644 --- a/src/render/RenderController.cpp +++ b/src/render/RenderController.cpp @@ -30,6 +30,21 @@ void RenderController::UnsetRenderMode(unsigned int renderMode) renderModel->UnsetRenderMode(renderMode); } +void RenderController::SetDisplayMode(unsigned int renderMode) +{ + renderModel->SetDisplayMode(renderMode); +} + +void RenderController::UnsetDisplayMode(unsigned int renderMode) +{ + renderModel->UnsetDisplayMode(renderMode); +} + +void RenderController::SetColourMode(unsigned int renderMode) +{ + renderModel->SetColourMode(renderMode); +} + void RenderController::Exit() { if(ui::Engine::Ref().GetWindow() == renderView) diff --git a/src/render/RenderController.h b/src/render/RenderController.h index 95a1bcc..81e29c2 100644 --- a/src/render/RenderController.h +++ b/src/render/RenderController.h @@ -27,6 +27,9 @@ public: virtual ~RenderController(); void SetRenderMode(unsigned int renderMode); void UnsetRenderMode(unsigned int renderMode); + void SetDisplayMode(unsigned int renderMode); + void UnsetDisplayMode(unsigned int renderMode); + void SetColourMode(unsigned int renderMode); }; #endif /* RENDERCONTROLLER_H_ */ diff --git a/src/render/RenderModel.cpp b/src/render/RenderModel.cpp index ef0f656..65f4a89 100644 --- a/src/render/RenderModel.cpp +++ b/src/render/RenderModel.cpp @@ -16,22 +16,77 @@ void RenderModel::AddObserver(RenderView * observer) { observers.push_back(observer); observer->NotifyRendererChanged(this); + observer->NotifyRenderChanged(this); + observer->NotifyDisplayChanged(this); + observer->NotifyColourChanged(this); } void RenderModel::SetRenderMode(unsigned int renderMode) { - renderer->AddRenderMode(renderMode); + if(renderer) + renderer->AddRenderMode(renderMode); + notifyRenderChanged(); } void RenderModel::UnsetRenderMode(unsigned int renderMode) { - renderer->RemoveRenderMode(renderMode); + if(renderer) + renderer->RemoveRenderMode(renderMode); + notifyRenderChanged(); +} + +unsigned int RenderModel::GetRenderMode() +{ + if(renderer) + return renderer->render_mode; + else + return 0; +} + +void RenderModel::SetDisplayMode(unsigned int displayMode) +{ + if(renderer) + renderer->AddDisplayMode(displayMode); + notifyDisplayChanged(); +} + +void RenderModel::UnsetDisplayMode(unsigned int displayMode) +{ + if(renderer) + renderer->RemoveDisplayMode(displayMode); + notifyDisplayChanged(); +} + +unsigned int RenderModel::GetDisplayMode() +{ + if(renderer) + return renderer->display_mode; + else + return 0; +} + +void RenderModel::SetColourMode(unsigned int colourMode) +{ + if(renderer) + renderer->SetColourMode(colourMode); + notifyColourChanged(); +} + +unsigned int RenderModel::GetColourMode() +{ + if(renderer) + return renderer->colour_mode; + else + return 0; } void RenderModel::SetRenderer(Renderer * ren) { renderer = ren; notifyRendererChanged(); + notifyRenderChanged(); + notifyDisplayChanged(); + notifyColourChanged(); } Renderer * RenderModel::GetRenderer() @@ -47,6 +102,30 @@ void RenderModel::notifyRendererChanged() } } +void RenderModel::notifyRenderChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyRenderChanged(this); + } +} + +void RenderModel::notifyDisplayChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyDisplayChanged(this); + } +} + +void RenderModel::notifyColourChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyColourChanged(this); + } +} + RenderModel::~RenderModel() { // TODO Auto-generated destructor stub } diff --git a/src/render/RenderModel.h b/src/render/RenderModel.h index 048cfc5..6bdf36e 100644 --- a/src/render/RenderModel.h +++ b/src/render/RenderModel.h @@ -19,6 +19,9 @@ class RenderModel { vector observers; Renderer * renderer; void notifyRendererChanged(); + void notifyRenderChanged(); + void notifyDisplayChanged(); + void notifyColourChanged(); public: RenderModel(); Renderer * GetRenderer(); @@ -26,6 +29,12 @@ public: void SetRenderer(Renderer * ren); void SetRenderMode(unsigned int renderMode); void UnsetRenderMode(unsigned int renderMode); + unsigned int GetRenderMode(); + void SetDisplayMode(unsigned int displayMode); + void UnsetDisplayMode(unsigned int displayMode); + unsigned int GetDisplayMode(); + void SetColourMode(unsigned int colourMode); + unsigned int GetColourMode(); virtual ~RenderModel(); }; diff --git a/src/render/RenderView.cpp b/src/render/RenderView.cpp index 5551615..25978bc 100644 --- a/src/render/RenderView.cpp +++ b/src/render/RenderView.cpp @@ -13,8 +13,8 @@ class RenderView::RenderModeAction: public ui::CheckboxAction { RenderView * v; - unsigned int renderMode; public: + unsigned int renderMode; RenderModeAction(RenderView * v_, unsigned int renderMode_) { v = v_; @@ -22,23 +22,145 @@ public: } virtual void ActionCallback(ui::Checkbox * sender) { - if(sender->IsChecked()) + if(sender->GetChecked()) v->c->SetRenderMode(renderMode); else v->c->UnsetRenderMode(renderMode); } }; +class RenderView::DisplayModeAction: public ui::CheckboxAction +{ + RenderView * v; +public: + unsigned int displayMode; + DisplayModeAction(RenderView * v_, unsigned int displayMode_) + { + v = v_; + displayMode = displayMode_; + } + virtual void ActionCallback(ui::Checkbox * sender) + { + if(sender->GetChecked()) + v->c->SetDisplayMode(displayMode); + else + v->c->UnsetDisplayMode(displayMode); + } +}; + +class RenderView::ColourModeAction: public ui::CheckboxAction +{ + RenderView * v; +public: + unsigned int colourMode; + ColourModeAction(RenderView * v_, unsigned int colourMode_) + { + v = v_; + colourMode = colourMode_; + } + virtual void ActionCallback(ui::Checkbox * sender) + { + //if(sender->GetChecked()) + v->c->SetColourMode(colourMode); + } +}; + RenderView::RenderView(): ui::Window(ui::Point(0, 0), ui::Point(XRES, YRES+MENUSIZE)), ren(NULL) { ui::Checkbox * tCheckbox; - tCheckbox = new ui::Checkbox(ui::Point(0, YRES+5), ui::Point(100, 16), "Blob"); + + tCheckbox = new ui::Checkbox(ui::Point(1, YRES+4), ui::Point(55, 16), "Effects"); + renderModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_EFFE)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(1, YRES+4+18), ui::Point(55, 16), "Fire"); + renderModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_FIRE)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(61, YRES+4), ui::Point(55, 16), "Glow"); + renderModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_GLOW)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(61, YRES+4+18), ui::Point(55, 16), "Blur"); + renderModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BLUR)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(121, YRES+4), ui::Point(55, 16), "Blob"); renderModes.push_back(tCheckbox); tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BLOB)); AddComponent(tCheckbox); + tCheckbox = new ui::Checkbox(ui::Point(121, YRES+4+18), ui::Point(55, 16), "Point"); + renderModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BASC)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(186, YRES+4), ui::Point(70, 16), "Alt. Air"); + displayModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRC)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(186, YRES+4+18), ui::Point(70, 16), "Pressure"); + displayModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRP)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(261, YRES+4), ui::Point(70, 16), "Velocity"); + displayModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRV)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(261, YRES+4+18), ui::Point(70, 16), "Air-heat"); + displayModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRH)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(336, YRES+4), ui::Point(70, 16), "Air"); + displayModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIR)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(336, YRES+4+18), ui::Point(70, 16), "Warp"); + displayModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_WARP)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(411, YRES+4), ui::Point(70, 16), "Persistent"); + displayModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_PERS)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(411, YRES+4+18), ui::Point(70, 16), "Effect"); + displayModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_EFFE)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(486, YRES+4), ui::Point(50, 16), "Heat"); + colourModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_HEAT)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(486, YRES+4+18), ui::Point(50, 16), "Life"); + colourModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_LIFE)); + AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(536, YRES+4+18), ui::Point(50, 16), "H-Gradient"); + colourModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_GRAD)); + AddComponent(tCheckbox); +} + +void RenderView::OnMouseDown(int x, int y, unsigned button) +{ + if(x > XRES || y < YRES) + c->Exit(); } void RenderView::NotifyRendererChanged(RenderModel * sender) @@ -46,10 +168,71 @@ void RenderView::NotifyRendererChanged(RenderModel * sender) ren = sender->GetRenderer(); } +void RenderView::NotifyRenderChanged(RenderModel * sender) +{ + for(int i = 0; i < renderModes.size(); i++) + { + if(renderModes[i]->GetActionCallback()) + { + //Compares bitmasks at the moment, this means that "Point" is always on when other options that depend on it are, this might confuse some users, TODO: get the full list and compare that? + RenderModeAction * action = (RenderModeAction *)(renderModes[i]->GetActionCallback()); + if(action->renderMode == (sender->GetRenderMode() & action->renderMode)) + { + renderModes[i]->SetChecked(true); + } + else + { + renderModes[i]->SetChecked(false); + } + } + } +} + +void RenderView::NotifyDisplayChanged(RenderModel * sender) +{ + for(int i = 0; i < displayModes.size(); i++) + { + if(displayModes[i]->GetActionCallback()) + { + DisplayModeAction * action = (DisplayModeAction *)(displayModes[i]->GetActionCallback()); + if(action->displayMode == (sender->GetDisplayMode() & action->displayMode)) + { + displayModes[i]->SetChecked(true); + } + else + { + displayModes[i]->SetChecked(false); + } + } + } +} + +void RenderView::NotifyColourChanged(RenderModel * sender) +{ + for(int i = 0; i < colourModes.size(); i++) + { + if(colourModes[i]->GetActionCallback()) + { + ColourModeAction * action = (ColourModeAction *)(colourModes[i]->GetActionCallback()); + if(action->colourMode == sender->GetColourMode()) + { + colourModes[i]->SetChecked(true); + } + else + { + colourModes[i]->SetChecked(false); + } + } + } +} + void RenderView::OnDraw() { Graphics * g = ui::Engine::Ref().g; g->clearrect(0, 0, XRES, YRES+MENUSIZE); + g->draw_line(0, YRES, XRES-1, YRES, 255, 255, 255, XRES+BARSIZE); + g->draw_line(180, YRES, 180, YRES+MENUSIZE, 200, 200, 200, XRES+BARSIZE); + g->draw_line(480, YRES, 480, YRES+MENUSIZE, 200, 200, 200, XRES+BARSIZE); g->draw_line(XRES-1, 0, XRES-1, YRES+MENUSIZE, 255, 255, 255, XRES+BARSIZE); if(ren) { diff --git a/src/render/RenderView.h b/src/render/RenderView.h index cdf0488..487a53e 100644 --- a/src/render/RenderView.h +++ b/src/render/RenderView.h @@ -22,11 +22,19 @@ class RenderView: public ui::Window { RenderController * c; Renderer * ren; std::vector renderModes; + std::vector displayModes; + std::vector colourModes; public: class RenderModeAction; + class DisplayModeAction; + class ColourModeAction; RenderView(); void NotifyRendererChanged(RenderModel * sender); + void NotifyRenderChanged(RenderModel * sender); + void NotifyDisplayChanged(RenderModel * sender); + void NotifyColourChanged(RenderModel * sender); void AttachController(RenderController * c_) { c = c_; } + void OnMouseDown(int x, int y, unsigned button); virtual void OnDraw(); virtual ~RenderView(); }; diff --git a/src/simulation/ElementGraphics.h b/src/simulation/ElementGraphics.h index a880e71..2f0946b 100644 --- a/src/simulation/ElementGraphics.h +++ b/src/simulation/ElementGraphics.h @@ -27,10 +27,10 @@ #define EFFECT_GRAVOUT 0x02000000 #define RENDER_EFFE OPTIONS | PSPEC_STICKMAN | EFFECT | PMODE_SPARK | PMODE_FLARE | PMODE_LFLARE -#define RENDER_FIRE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND | FIREMODE -#define RENDER_GLOW OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_GLOW | PMODE_ADD | PMODE_BLEND -#define RENDER_BLUR OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLUR | PMODE_ADD | PMODE_BLEND -#define RENDER_BLOB OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLOB | PMODE_ADD | PMODE_BLEND +#define RENDER_FIRE OPTIONS | PSPEC_STICKMAN | /*PMODE_FLAT |*/ PMODE_ADD | PMODE_BLEND | FIREMODE +#define RENDER_GLOW OPTIONS | PSPEC_STICKMAN | /*PMODE_FLAT |*/ PMODE_GLOW | PMODE_ADD | PMODE_BLEND +#define RENDER_BLUR OPTIONS | PSPEC_STICKMAN | /*PMODE_FLAT |*/ PMODE_BLUR | PMODE_ADD | PMODE_BLEND +#define RENDER_BLOB OPTIONS | PSPEC_STICKMAN | /*PMODE_FLAT |*/ PMODE_BLOB | PMODE_ADD | PMODE_BLEND #define RENDER_BASC OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND #define RENDER_NONE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT -- cgit v0.9.2-21-gd62e From 66c533229435ec12f280863cf7bce2a006b5bfb9 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 27 Jan 2012 13:28:46 +0000 Subject: Release option, which should encourage the compiler to inline more performance critical functions diff --git a/Makefile b/Makefile index 1296d14..821f7bf 100644 --- a/Makefile +++ b/Makefile @@ -14,15 +14,26 @@ WIN_RES := i686-w64-mingw32-windres all: build/powder +powder-release.exe: build/powder-release.exe powder.exe: build/powder.exe +powder-release: build/powder-release powder: build/powder +build/powder-release.exe: CFLAGS += -DWIN32 +build/powder-release.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -mwindows build/powder.exe: CFLAGS += -DWIN32 -DWINCONSOLE build/powder.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 #-mwindows +build/powder-release: CFLAGS += -DLIN32 +build/powder-release: LFLAGS := -lSDL -lm -lbz2 build/powder: CFLAGS += -DLIN32 build/powder: LFLAGS := -lSDL -lm -lbz2 - +build/powder-release.exe: $(SOURCES) + $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) -o $@ + strip $@ +build/powder-release: $(SOURCES) + $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) -o $@ + strip $@ build/powder.exe: buildpaths-powder.exe $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) $(LFLAGS) -o $@ -ggdb -- cgit v0.9.2-21-gd62e From 597d11f9f79c1486db4cdc1c0aca215cc4ab6074 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 27 Jan 2012 13:41:35 +0000 Subject: Icon for Windows diff --git a/Makefile b/Makefile index 821f7bf..490dda7 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ CFLAGS := -w -Isrc/ -Idata/ OFLAGS := -fkeep-inline-functions -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -msse2 CPPC := g++ -CPPC_WIN := i686-w64-mingw32-gcc -WIN_RES := i686-w64-mingw32-windres +CPPC_WIN := g++ +WIN_RES := windres all: build/powder @@ -28,17 +28,20 @@ build/powder-release: LFLAGS := -lSDL -lm -lbz2 build/powder: CFLAGS += -DLIN32 build/powder: LFLAGS := -lSDL -lm -lbz2 -build/powder-release.exe: $(SOURCES) - $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) -o $@ +build/powder-release.exe: $(SOURCES) build/powder-res.o + $(CPPC_WIN) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) build/powder-res.o -o $@ strip $@ +build/powder-res.o: resources/powder-res.rc resources/powder.ico resources/document.ico + cd resources && $(WIN_RES) powder-res.rc powder-res.o + mv resources/powder-res.o build/powder-res.o build/powder-release: $(SOURCES) $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) -o $@ strip $@ build/powder.exe: buildpaths-powder.exe $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) - $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) $(LFLAGS) -o $@ -ggdb + $(CPP_WINC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) $(LFLAGS) -o $@ -ggdb build/obj/powder.exe/%.o: src/%.cpp $(HEADERS) - $(CPPC) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb + $(CPPC_WIN) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb buildpaths-powder.exe: $(shell mkdir build/obj/powder.exe/) $(shell mkdir $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS))))) -- cgit v0.9.2-21-gd62e From 07525180c2f8065c61dfd38bb273ff0f0a8abc85 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 27 Jan 2012 20:19:42 +0000 Subject: Icon management, fix element menu order, fix renderer crash diff --git a/Makefile b/Makefile index 490dda7..4c11e2b 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ build/powder-release: $(SOURCES) strip $@ build/powder.exe: buildpaths-powder.exe $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) - $(CPP_WINC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) $(LFLAGS) -o $@ -ggdb + $(CPPC_WIN) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) $(LFLAGS) -o $@ -ggdb build/obj/powder.exe/%.o: src/%.cpp $(HEADERS) $(CPPC_WIN) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb buildpaths-powder.exe: diff --git a/src/Graphics.cpp b/src/Graphics.cpp index a48f6d6..678e138 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -1141,20 +1141,54 @@ TPT_INLINE void Graphics::blendpixel(int x, int y, int r, int g, int b, int a) #endif } -void Graphics::draw_icon(int x, int y, char ch, int flag) +void Graphics::draw_icon(int x, int y, Icon icon) { - char t[2]; - t[0] = ch; - t[1] = 0; - if (flag) + switch(icon) { - fillrect(x-1, y-1, 17, 17, 255, 255, 255, 255); - drawtext(x+3, y+2, t, 0, 0, 0, 255); - } - else - { - drawrect(x, y, 15, 15, 255, 255, 255, 255); - drawtext(x+3, y+2, t, 255, 255, 255, 255); + case IconOpen: + drawchar(x, y, 0x81, 255, 255, 255, 255); + break; + case IconReload: + drawchar(x, y, 0x91, 255, 255, 255, 255); + break; + case IconSave: + drawchar(x, y, 0x82, 255, 255, 255, 255); + break; + case IconVoteUp: + drawchar(x, y, 0xCB, 0, 187, 18, 255); + break; + case IconVoteDown: + drawchar(x, y, 0xCA, 187, 40, 0, 255); + break; + case IconTag: + drawchar(x, y, 0x83, 255, 255, 255, 255); + break; + case IconNew: + drawchar(x, y, 0x92, 255, 255, 255, 255); + break; + case IconLogin: + drawchar(x, y, 0x84, 255, 255, 255, 255); + break; + case IconSimulationSettings: + drawchar(x, y, 0xCF, 255, 255, 255, 255); + break; + case IconRenderSettings: + addchar(x, y, 0xD8, 255, 0, 0, 255); + addchar(x, y, 0xD9, 0, 255, 0, 255); + addchar(x, y, 0xDA, 0, 0, 255, 255); + break; + case IconPause: + drawchar(x, y, 0x90, 255, 255, 255, 255); + break; + case IconVoteSort: + case IconDateSort: + case IconFavourite: + case IconFolder: + case IconSearch: + case IconDelete: + default: + drawchar(x, y, 't', 255, 255, 255, 255); + break; } } diff --git a/src/Graphics.h b/src/Graphics.h index 25cb5d6..d2f9721 100644 --- a/src/Graphics.h +++ b/src/Graphics.h @@ -52,38 +52,28 @@ typedef unsigned short pixel; typedef unsigned int pixel; #endif -/*extern int emp_decor; - -extern unsigned int *render_modes; -extern unsigned int render_mode; -extern unsigned int colour_mode; -extern unsigned int *display_modes; -extern unsigned int display_mode; - -extern SDL_Surface *sdl_scrn; -extern int sdl_scale; - -extern int sandcolour_r; -extern int sandcolour_g; -extern int sandcolour_b; -extern int sandcolour_frame; - -extern unsigned char fire_r[YRES/CELL][XRES/CELL]; -extern unsigned char fire_g[YRES/CELL][XRES/CELL]; -extern unsigned char fire_b[YRES/CELL][XRES/CELL]; - -extern unsigned int fire_alpha[CELL*3][CELL*3]; -extern pixel *pers_bg; - -extern char * flm_data; -extern int flm_data_points; -extern pixel flm_data_colours[]; -extern float flm_data_pos[]; - -extern char * plasma_data; -extern int plasma_data_points; -extern pixel plasma_data_colours[]; -extern float plasma_data_pos[];*/ +//Icon names, see Graphics::draw_icon +enum Icon +{ + NoIcon = 0, + IconOpen, + IconReload, + IconSave, + IconVoteUp, + IconVoteDown, + IconTag, + IconNew, + IconLogin, + IconRenderSettings, + IconSimulationSettings, + IconPause, + IconVoteSort, + IconDateSort, + IconFavourite, + IconFolder, + IconSearch, + IconDelete +}; class Graphics { @@ -126,7 +116,7 @@ public: static int textposxy(char *s, int width, int w, int h); static int textwrapheight(char *s, int width); inline void blendpixel(int x, int y, int r, int g, int b, int a); - void draw_icon(int x, int y, char ch, int flag); + void draw_icon(int x, int y, Icon icon); //void draw_air(); //void draw_grav_zones(pixel *vid); //void draw_grav(pixel *vid); diff --git a/src/elements/bomb.cpp b/src/elements/bomb.cpp index b696b19..3b6db26 100644 --- a/src/elements/bomb.cpp +++ b/src/elements/bomb.cpp @@ -11,7 +11,7 @@ int update_BOMB(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if (sim->ptypes[r&0xFF].properties & (TYPE_SOLID | TYPE_PART | TYPE_LIQUID) && !(sim->ptypes[r&0xFF].properties & PROP_SPARKSETTLE)) { + if ((sim->ptypes[r&0xFF].properties & (TYPE_SOLID | TYPE_PART | TYPE_LIQUID)) && !(sim->ptypes[r&0xFF].properties & PROP_SPARKSETTLE)) { sim->kill_part(i); return 1; } diff --git a/src/elements/newgraphics.cpp b/src/elements/newgraphics.cpp index 036a6a7..efdf128 100644 --- a/src/elements/newgraphics.cpp +++ b/src/elements/newgraphics.cpp @@ -357,7 +357,7 @@ int graphics_GLOW(GRAPHICS_FUNC_ARGS) } int graphics_LCRY(GRAPHICS_FUNC_ARGS) { - if(ren->decorations_enable && cpart->dcolour && cpart->dcolour&0xFF000000) + if(ren->decorations_enable && cpart->dcolour && (cpart->dcolour&0xFF000000)) { *colr = (cpart->dcolour>>16)&0xFF; *colg = (cpart->dcolour>>8)&0xFF; diff --git a/src/elements/stkm.cpp b/src/elements/stkm.cpp index c457b62..68ef1ed 100644 --- a/src/elements/stkm.cpp +++ b/src/elements/stkm.cpp @@ -78,6 +78,7 @@ int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { gvx = ((float)(parts[i].x - XCNTR) / gravd); gvy = ((float)(parts[i].y - YCNTR) / gravd); } + break; } gvx += sim->gravx[((int)parts[i].y/CELL)*(XRES/CELL)+((int)parts[i].x/CELL)]; diff --git a/src/elements/wire.cpp b/src/elements/wire.cpp index f7202e4..c3c918b 100644 --- a/src/elements/wire.cpp +++ b/src/elements/wire.cpp @@ -64,4 +64,5 @@ int graphics_WIRE(GRAPHICS_FUNC_ARGS) //*pixel_mode |= PMODE_GLOW; return 0; } + return 0; } diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 3f31554..3a20b3e 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -25,7 +25,8 @@ GameView::GameView(): v->c->OpenSearch(); } }; - searchButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\x81"); //Open + searchButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16)); //Open + searchButton->SetIcon(IconOpen); currentX+=18; searchButton->SetTogglable(false); searchButton->SetActionCallback(new SearchAction(this)); @@ -41,7 +42,8 @@ GameView::GameView(): v->c->ReloadSim(); } }; - reloadButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\x91"); + reloadButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16)); + reloadButton->SetIcon(IconReload); currentX+=18; reloadButton->SetActionCallback(new ReloadAction(this)); AddComponent(reloadButton); @@ -56,7 +58,8 @@ GameView::GameView(): v->c->OpenSaveWindow(); } }; - saveSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X/5, 16), "\x82"); + saveSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X/5, 16)); + saveSimulationButton->SetIcon(IconSave); currentX+=(Size.X/5)+2; saveSimulationButton->SetActionCallback(new SaveSimulationAction(this)); AddComponent(saveSimulationButton); @@ -71,7 +74,8 @@ GameView::GameView(): v->c->Vote(1); } }; - upVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\xCB"); + upVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16)); + upVoteButton->SetIcon(IconVoteUp); currentX+=16; upVoteButton->SetActionCallback(new UpVoteAction(this)); AddComponent(upVoteButton); @@ -86,7 +90,8 @@ GameView::GameView(): v->c->Vote(-1); } }; - downVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16), "\xCA"); + downVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16)); + downVoteButton->SetIcon(IconVoteDown); currentX+=18; downVoteButton->SetActionCallback(new DownVoteAction(this)); AddComponent(downVoteButton); @@ -101,7 +106,8 @@ GameView::GameView(): v->c->OpenTags(); } }; - tagSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X-(currentX+176), 16), "\x83"); + tagSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X-(currentX+176), 16)); + tagSimulationButton->SetIcon(IconTag); currentX+=Size.X-(currentX+176); tagSimulationButton->SetActionCallback(new TagSimulationAction(this)); AddComponent(tagSimulationButton); @@ -116,7 +122,8 @@ GameView::GameView(): v->c->ClearSim(); } }; - clearSimButton = new ui::Button(ui::Point(Size.X-174, Size.Y-18), ui::Point(16, 16), "C"); + clearSimButton = new ui::Button(ui::Point(Size.X-174, Size.Y-18), ui::Point(16, 16)); + clearSimButton->SetIcon(IconNew); clearSimButton->SetActionCallback(new ClearSimAction(this)); AddComponent(clearSimButton); @@ -130,7 +137,8 @@ GameView::GameView(): v->c->OpenLogin(); } }; - loginButton = new ui::Button(ui::Point(Size.X-156, Size.Y-18), ui::Point(100, 16), "\xDA Login"); + loginButton = new ui::Button(ui::Point(Size.X-156, Size.Y-18), ui::Point(100, 16), "Login"); + loginButton->SetIcon(IconLogin); loginButton->SetActionCallback(new LoginAction(this)); AddComponent(loginButton); @@ -144,7 +152,8 @@ GameView::GameView(): v->c->OpenDisplayOptions(); } }; - simulationOptionButton = new ui::Button(ui::Point(Size.X-54, Size.Y-18), ui::Point(16, 16), "\xDA"); + simulationOptionButton = new ui::Button(ui::Point(Size.X-54, Size.Y-18), ui::Point(16, 16)); + simulationOptionButton->SetIcon(IconSimulationSettings); simulationOptionButton->SetActionCallback(new SimulationOptionAction(this)); AddComponent(simulationOptionButton); @@ -158,7 +167,8 @@ GameView::GameView(): v->c->OpenRenderOptions(); } }; - displayModeButton = new ui::Button(ui::Point(Size.X-36, Size.Y-18), ui::Point(16, 16), "\xDA"); + displayModeButton = new ui::Button(ui::Point(Size.X-36, Size.Y-18), ui::Point(16, 16)); + displayModeButton->SetIcon(IconRenderSettings); displayModeButton->SetActionCallback(new DisplayModeAction(this)); AddComponent(displayModeButton); @@ -172,7 +182,8 @@ GameView::GameView(): v->c->SetPaused(sender->GetToggleState()); } }; - pauseButton = new ui::Button(ui::Point(Size.X-18, Size.Y-18), ui::Point(16, 16), "\x90"); //Pause + pauseButton = new ui::Button(ui::Point(Size.X-18, Size.Y-18), ui::Point(16, 16)); //Pause + pauseButton->SetIcon(IconPause); pauseButton->SetTogglable(true); pauseButton->SetActionCallback(new PauseAction(this)); AddComponent(pauseButton); @@ -204,7 +215,7 @@ public: void GameView::NotifyMenuListChanged(GameModel * sender) { - int currentY = YRES+MENUSIZE-36; + int currentY = YRES+MENUSIZE-18-(sender->GetMenuList().size()*18); for(int i = 0; i < menuButtons.size(); i++) { RemoveComponent(menuButtons[i]); @@ -225,7 +236,7 @@ void GameView::NotifyMenuListChanged(GameModel * sender) ui::Button * tempButton = new ui::Button(ui::Point(XRES+BARSIZE-18, currentY), ui::Point(16, 16), tempString); tempButton->SetTogglable(true); tempButton->SetActionCallback(new MenuAction(this, menuList[i])); - currentY-=18; + currentY+=18; AddComponent(tempButton); menuButtons.push_back(tempButton); } diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index b145b38..b4e32b2 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -15,24 +15,6 @@ namespace ui { -Button::Button(Window* parent_state, std::string buttonText): - Component(parent_state), - ButtonText(buttonText), - isMouseInside(false), - isButtonDown(false), - isTogglable(false), - toggle(false), - actionCallback(NULL), - textPosition(ui::Point(0, 0)), - textVAlign(AlignMiddle), - textHAlign(AlignCentre), - Enabled(true) -{ - activeText = background = Colour(0, 0, 0); - text = activeBackground = border = activeBorder = Colour(255, 255, 255); - TextPosition(); -} - Button::Button(Point position, Point size, std::string buttonText): Component(position, size), ButtonText(buttonText), @@ -44,25 +26,8 @@ Button::Button(Point position, Point size, std::string buttonText): textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), textHAlign(AlignCentre), - Enabled(true) -{ - activeText = background = Colour(0, 0, 0); - text = activeBackground = border = activeBorder = Colour(255, 255, 255); - TextPosition(); -} - -Button::Button(std::string buttonText): - Component(), - ButtonText(buttonText), - isMouseInside(false), - isButtonDown(false), - isTogglable(false), - toggle(false), - actionCallback(NULL), - textPosition(ui::Point(0, 0)), - textVAlign(AlignMiddle), - textHAlign(AlignCentre), - Enabled(true) + Enabled(true), + icon(NoIcon) { activeText = background = Colour(0, 0, 0); text = activeBackground = border = activeBorder = Colour(255, 255, 255); @@ -71,7 +36,6 @@ Button::Button(std::string buttonText): void Button::TextPosition() { - //Position.X+(Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2, Position.Y+(Size.Y-10)/2 switch(textVAlign) { case AlignTop: @@ -85,20 +49,44 @@ void Button::TextPosition() break; } - switch(textHAlign) + if(icon) { - case AlignLeft: - textPosition.X = 3; - break; - case AlignCentre: - textPosition.X = (Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2; - break; - case AlignRight: - textPosition.X = (Size.X-Graphics::textwidth((char *)ButtonText.c_str()))-2; - break; + switch(textHAlign) + { + case AlignLeft: + textPosition.X = 3+17; + break; + case AlignCentre: + textPosition.X = (((Size.X-14)-Graphics::textwidth((char *)ButtonText.c_str()))/2)+17; + break; + case AlignRight: + textPosition.X = (((Size.X-14)-Graphics::textwidth((char *)ButtonText.c_str()))-2)+17; + break; + } + } + else + { + switch(textHAlign) + { + case AlignLeft: + textPosition.X = 3; + break; + case AlignCentre: + textPosition.X = (Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2; + break; + case AlignRight: + textPosition.X = (Size.X-Graphics::textwidth((char *)ButtonText.c_str()))-2; + break; + } } } +void Button::SetIcon(Icon icon) +{ + this->icon = icon; + TextPosition(); +} + void Button::SetText(std::string buttonText) { ButtonText = buttonText; @@ -150,13 +138,15 @@ void Button::Draw(const Point& screenPos) g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 180, 180, 180, 255); g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 180, 180, 180, 255); } + if(icon) + g->draw_icon(Position.X+3, Position.Y+textPosition.Y, icon); } void Button::OnMouseUp(int x, int y, unsigned int button) { if(button != 1) { - return; //left click only! + return; } if(isButtonDown) @@ -167,16 +157,9 @@ void Button::OnMouseUp(int x, int y, unsigned int button) isButtonDown = false; } -//void Button::OnMouseUp(int x, int y, unsigned int button) //mouse unclick is called before this -//{ - // if(button != 1) return; //left click only! - -// isButtonDown = false; -//} - void Button::OnMouseClick(int x, int y, unsigned int button) { - if(button != 1) return; //left click only! + if(button != 1) return; if(isTogglable) { toggle = !toggle; diff --git a/src/interface/Button.h b/src/interface/Button.h index 1075b32..4537e1f 100644 --- a/src/interface/Button.h +++ b/src/interface/Button.h @@ -26,13 +26,10 @@ public: class Button : public Component { public: - Button(Window* parent_state, std::string buttonText); - - Button(Point position, Point size, std::string buttonText); - - Button(std::string buttonText); + Button(Point position = Point(0, 0), Point size = Point(0, 0), std::string buttonText = ""); virtual ~Button(); + Icon icon; bool Toggleable; bool Enabled; @@ -68,6 +65,8 @@ public: void SetActiveBorderColour(Colour border) { this->activeBorder = border; } void SetTextColour(Colour text) { this->text = text; } void SetActiveTextColour(Colour text) { this->activeText = text; } + + void SetIcon(Icon icon); protected: Colour background, activeBackground; Colour border, activeBorder; diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index 983e730..8c69b7b 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -32,6 +32,10 @@ PreviewView::PreviewView(): saveNameLabel = new ui::Label(ui::Point(5, (YRES/2)+5), ui::Point(100, 16), ""); saveNameLabel->SetAlignment(AlignLeft, AlignBottom); AddComponent(saveNameLabel); + + authorDateLabel = new ui::Label(ui::Point(5, (YRES/2)+5+16), ui::Point(100, 16), ""); + authorDateLabel->SetAlignment(AlignLeft, AlignBottom); + AddComponent(authorDateLabel); } void PreviewView::OnDraw() diff --git a/src/preview/PreviewView.h b/src/preview/PreviewView.h index ac17df5..e788210 100644 --- a/src/preview/PreviewView.h +++ b/src/preview/PreviewView.h @@ -21,6 +21,7 @@ class PreviewView: public ui::Window { Thumbnail * savePreview; ui::Button * openButton; ui::Label * saveNameLabel; + ui::Label * authorDateLabel; public: void AttachController(PreviewController * controller) { c = controller;} PreviewView(); diff --git a/src/render/RenderModel.cpp b/src/render/RenderModel.cpp index 65f4a89..52a32ac 100644 --- a/src/render/RenderModel.cpp +++ b/src/render/RenderModel.cpp @@ -7,7 +7,9 @@ #include "RenderModel.h" -RenderModel::RenderModel() { +RenderModel::RenderModel(): + renderer(NULL) +{ // TODO Auto-generated constructor stub } -- cgit v0.9.2-21-gd62e From 58ba7f8800403c572bae99115facc808c6dc34a3 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 27 Jan 2012 22:01:22 +0000 Subject: Stop freeing memory twice, also clear signs correctly diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index 8c69b7b..4ab54b2 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -25,7 +25,9 @@ PreviewView::PreviewView(): v->c->Exit(); } }; - openButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(100, 16), "Open"); + openButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(75, 16), "Open"); + openButton->SetAlignment(AlignLeft, AlignMiddle); + openButton->SetIcon(IconOpen); openButton->SetActionCallback(new OpenAction(this)); AddComponent(openButton); @@ -33,7 +35,7 @@ PreviewView::PreviewView(): saveNameLabel->SetAlignment(AlignLeft, AlignBottom); AddComponent(saveNameLabel); - authorDateLabel = new ui::Label(ui::Point(5, (YRES/2)+5+16), ui::Point(100, 16), ""); + authorDateLabel = new ui::Label(ui::Point(5, (YRES/2)+5+14), ui::Point(100, 16), ""); authorDateLabel->SetAlignment(AlignLeft, AlignBottom); AddComponent(authorDateLabel); } @@ -52,6 +54,7 @@ void PreviewView::OnDraw() g->draw_image(savePreview->Data, (Position.X+1)+(((XRES/2)-savePreview->Size.X)/2), (Position.Y+1)+(((YRES/2)-savePreview->Size.Y)/2), savePreview->Size.X, savePreview->Size.Y, 255); } g->drawrect(Position.X, Position.Y, XRES/2, YRES/2, 255, 255, 255, 100); + g->draw_line(Position.X+XRES/2, Position.Y, Position.X+XRES/2, Position.Y+Size.Y, 255, 255, 255, XRES+BARSIZE); } void PreviewView::OnMouseDown(int x, int y, unsigned button) @@ -66,10 +69,12 @@ void PreviewView::NotifySaveChanged(PreviewModel * sender) if(save) { saveNameLabel->SetText(save->name); + authorDateLabel->SetText("\bgAuthor:\bw " + save->userName + " \bgDate:\bw "); } else { saveNameLabel->SetText(""); + authorDateLabel->SetText(""); } } @@ -89,7 +94,5 @@ void PreviewView::NotifyPreviewChanged(PreviewModel * sender) } PreviewView::~PreviewView() { - delete openButton; - delete saveNameLabel; } diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 96f759e..2102a7d 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -12,10 +12,9 @@ public: OpenCallback(SearchController * cc_) { cc = cc_; } virtual void ControllerExit() { - if(cc->activePreview->GetDoOpen()) + if(cc->activePreview->GetDoOpen() && cc->activePreview->GetSave()) { cc->searchModel->SetLoadedSave(new Save(*(cc->activePreview->GetSave()))); - cc->Exit(); } } }; @@ -48,6 +47,10 @@ void SearchController::Update() { delete activePreview; activePreview = NULL; + if(searchModel->GetLoadedSave()) + { + Exit(); + } } } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 81e394c..eb7d6a1 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -861,7 +861,7 @@ void Simulation::clear_sim(void) { int i, x, y; if(signs) - memset(signs, 0, sizeof(signs)); + memset(signs, 0, sizeof(sign)*MAXSIGNS); memset(bmap, 0, sizeof(bmap)); memset(emap, 0, sizeof(emap)); memset(parts, 0, sizeof(Particle)*NPART); -- cgit v0.9.2-21-gd62e From b5728a9e3e983460a957fa0e576b751ebfe87172 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 28 Jan 2012 14:51:39 +0000 Subject: Zoom diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index c7b6da0..406e334 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -88,6 +88,7 @@ int main(int argc, char * argv[]) engine->onKeyPress(event.key.keysym.unicode, false, false, false); break; case SDL_KEYUP: + engine->onKeyRelease(event.key.keysym.unicode, false, false, false); break; case SDL_MOUSEMOTION: engine->onMouseMove(event.motion.x, event.motion.y); diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 9d26378..5375d64 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -19,6 +19,118 @@ extern "C" #include "hmap.h" } +void Renderer::RenderZoom() +{ + if(!zoomEnabled) + return; + #ifdef OGLR + int origBlendSrc, origBlendDst; + float zcx1, zcx0, zcy1, zcy0, yfactor, xfactor, i; //X-Factor is shit, btw + xfactor = 1.0f/(float)XRES; + yfactor = 1.0f/(float)YRES; + + zcx0 = (zoom_x)*xfactor; + zcx1 = (zoom_x+ZSIZE)*xfactor; + zcy0 = (zoom_y)*yfactor; + zcy1 = ((zoom_y+ZSIZE))*yfactor; + + glGetIntegerv(GL_BLEND_SRC, &origBlendSrc); + glGetIntegerv(GL_BLEND_DST, &origBlendDst); + glBlendFunc(GL_ONE, GL_ZERO); + + glEnable( GL_TEXTURE_2D ); + //glReadBuffer(GL_AUX0); + glBindTexture(GL_TEXTURE_2D, partsFboTex); + + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glBegin(GL_QUADS); + glTexCoord2d(zcx1, zcy1); + glVertex3f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 1.0); + glTexCoord2d(zcx0, zcy1); + glVertex3f(zoom_wx*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 1.0); + glTexCoord2d(zcx0, zcy0); + glVertex3f(zoom_wx*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 1.0); + glTexCoord2d(zcx1, zcy0); + glVertex3f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 1.0); + glEnd(); + glBindTexture(GL_TEXTURE_2D, 0); + glDisable( GL_TEXTURE_2D ); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + glLineWidth(sdl_scale); + glEnable(GL_LINE_SMOOTH); + glBegin(GL_LINES); + glColor4f(0.0f, 0.0f, 0.0f, 1.0f); + for(i = 0; i < ZSIZE; i++) + { + glVertex2f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR)+i*ZFACTOR)*sdl_scale); + glVertex2f(zoom_wx*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR)+i*ZFACTOR)*sdl_scale); + glVertex2f((zoom_wx+i*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale); + glVertex2f((zoom_wx+i*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale); + } + glEnd(); + + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glBegin(GL_LINE_STRIP); + glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); + glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 0); + glVertex3i((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 0); + glVertex3i((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); + glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); + glEnd(); + glDisable(GL_LINE_SMOOTH); + + glDisable(GL_LINE_SMOOTH); + + if(zoom_en) + { + glEnable(GL_COLOR_LOGIC_OP); + //glEnable(GL_LINE_SMOOTH); + glLogicOp(GL_XOR); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glBegin(GL_LINE_STRIP); + glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); + glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y+ZSIZE))*sdl_scale, 0); + glVertex3i((zoom_x+ZSIZE)*sdl_scale, (YRES+MENUSIZE-(zoom_y+ZSIZE))*sdl_scale, 0); + glVertex3i((zoom_x+ZSIZE)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); + glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); + glEnd(); + glDisable(GL_COLOR_LOGIC_OP); + } + glLineWidth(1); + glBlendFunc(origBlendSrc, origBlendDst); + #else + int x, y, i, j; + pixel pix; + pixel * img = g->vid; + g->drawrect(zoomWindowPosition.X-2, zoomWindowPosition.Y-2, zoomScopeSize*ZFACTOR+2, zoomScopeSize*ZFACTOR+2, 192, 192, 192, 255); + g->drawrect(zoomWindowPosition.X-1, zoomWindowPosition.Y-1, zoomScopeSize*ZFACTOR, zoomScopeSize*ZFACTOR, 0, 0, 0, 255); + g->clearrect(zoomWindowPosition.X, zoomWindowPosition.Y, zoomScopeSize*ZFACTOR, zoomScopeSize*ZFACTOR); + for (j=0; jxor_pixel(zoomScopePosition.X+j, zoomScopePosition.Y-1); + g->xor_pixel(zoomScopePosition.X+j, zoomScopePosition.Y+zoomScopeSize); + } + for (j=0; jxor_pixel(zoomScopePosition.X-1, zoomScopePosition.Y+j); + g->xor_pixel(zoomScopePosition.X+zoomScopeSize, zoomScopePosition.Y+j); + } + } + #endif +} + void Renderer::DrawWalls() { int x, y, i, j, cr, cg, cb; @@ -1645,7 +1757,11 @@ void Renderer::draw_grav_zones() Renderer::Renderer(Graphics * g, Simulation * sim): sim(NULL), - g(NULL) + g(NULL), + zoomWindowPosition(0, 0), + zoomScopePosition(0, 0), + zoomScopeSize(10), + ZFACTOR(8) { this->g = g; this->sim = sim; diff --git a/src/Renderer.h b/src/Renderer.h index d43e0cb..9ed7dbb 100644 --- a/src/Renderer.h +++ b/src/Renderer.h @@ -5,6 +5,7 @@ #include "Config.h" #include "simulation/Simulation.h" #include "Graphics.h" +#include "interface/Point.h" class Simulation; @@ -41,7 +42,15 @@ public: Graphics * g; gcache_item *graphicscache; + //Zoom window + ui::Point zoomWindowPosition; + ui::Point zoomScopePosition; + int zoomScopeSize; + bool zoomEnabled; + int ZFACTOR; + //Renderers + void RenderZoom(); void DrawWalls(); void DrawSigns(); void render_gravlensing(); diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 277c32c..752a0ba 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -107,6 +107,36 @@ void GameController::AdjustBrushSize(int direction) gameModel->GetBrush()->SetRadius(newSize); } +void GameController::AdjustZoomSize(int direction) +{ + int newSize = gameModel->GetZoomSize()+direction; + if(newSize<5) + newSize = 5; + if(newSize>64) + newSize = 64; + gameModel->SetZoomSize(newSize); + + int newZoomFactor = 256/newSize; + if(newZoomFactor<3) + newZoomFactor = 3; + gameModel->SetZoomFactor(newZoomFactor); +} + +ui::Point GameController::PointTranslate(ui::Point point) +{ + bool zoomEnabled = gameModel->GetZoomEnabled(); + if(!zoomEnabled) + return point; + //If we try to draw inside the zoom window, normalise the coordinates + int zoomFactor = gameModel->GetZoomFactor(); + ui::Point zoomWindowPosition = gameModel->GetZoomWindowPosition(); + ui::Point zoomWindowSize = ui::Point(gameModel->GetZoomSize()*zoomFactor, gameModel->GetZoomSize()*zoomFactor); + + if(point.X > zoomWindowPosition.X && point.X > zoomWindowPosition.Y && point.X < zoomWindowPosition.X+zoomWindowSize.X && point.Y < zoomWindowPosition.Y+zoomWindowSize.Y) + return ((point-zoomWindowPosition)/gameModel->GetZoomFactor())+gameModel->GetZoomPosition(); + return point; +} + void GameController::DrawPoints(queue & pointQueue) { Simulation * sim = gameModel->GetSimulation(); @@ -123,26 +153,27 @@ void GameController::DrawPoints(queue & pointQueue) } } } + if(!pointQueue.empty()) { - ui::Point * sPoint = NULL; + ui::Point sPoint(0, 0); + bool first = true; while(!pointQueue.empty()) { - ui::Point * fPoint = pointQueue.front(); + ui::Point fPoint = PointTranslate(*pointQueue.front()); + delete pointQueue.front(); pointQueue.pop(); - if(sPoint) + if(!first) { - activeTool->DrawLine(sim, cBrush, *fPoint, *sPoint); - delete sPoint; + activeTool->DrawLine(sim, cBrush, fPoint, sPoint); } else { - activeTool->Draw(sim, cBrush, *fPoint); + first = false; + activeTool->Draw(sim, cBrush, fPoint); } sPoint = fPoint; } - if(sPoint) - delete sPoint; } } @@ -168,6 +199,25 @@ void GameController::Update() } } +void GameController::SetZoomEnabled(bool zoomEnabled) +{ + gameModel->SetZoomEnabled(zoomEnabled); +} + +void GameController::SetZoomPosition(ui::Point position) +{ + ui::Point zoomPosition = position-(gameModel->GetZoomSize()/2); + if(zoomPosition.X < 0) + zoomPosition.X = 0; + if(zoomPosition.Y < 0) + zoomPosition.Y = 0; + if(zoomPosition.X >= XRES-gameModel->GetZoomSize()) + zoomPosition.X = XRES-gameModel->GetZoomSize(); + if(zoomPosition.Y >= YRES-gameModel->GetZoomSize()) + zoomPosition.Y = YRES-gameModel->GetZoomSize(); + gameModel->SetZoomPosition(zoomPosition); +} + void GameController::SetPaused(bool pauseState) { gameModel->SetPaused(pauseState); diff --git a/src/game/GameController.h b/src/game/GameController.h index 2ec4523..7498e47 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -31,7 +31,10 @@ public: GameController(); ~GameController(); GameView * GetView(); + void SetZoomEnabled(bool zoomEnable); + void SetZoomPosition(ui::Point position); void AdjustBrushSize(int direction); + void AdjustZoomSize(int direction); void DrawPoints(queue & pointQueue); void Update(); void SetPaused(bool pauseState); @@ -48,6 +51,7 @@ public: void ReloadSim(); void Vote(int direction); void ChangeBrush(); + ui::Point PointTranslate(ui::Point point); }; #endif // GAMECONTROLLER_H diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 5dfc521..456d9c4 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -160,6 +160,61 @@ User GameModel::GetUser() return currentUser; } +void GameModel::SetZoomEnabled(bool enabled) +{ + ren->zoomEnabled = enabled; + notifyZoomChanged(); +} + +bool GameModel::GetZoomEnabled() +{ + return ren->zoomEnabled; +} + +void GameModel::SetZoomPosition(ui::Point position) +{ + ren->zoomScopePosition = position; + notifyZoomChanged(); +} + +ui::Point GameModel::GetZoomPosition() +{ + return ren->zoomScopePosition; +} + +void GameModel::SetZoomWindowPosition(ui::Point position) +{ + ren->zoomWindowPosition = position; + notifyZoomChanged(); +} + +ui::Point GameModel::GetZoomWindowPosition() +{ + return ren->zoomWindowPosition; +} + +void GameModel::SetZoomSize(int size) +{ + ren->zoomScopeSize = size; + notifyZoomChanged(); +} + +int GameModel::GetZoomSize() +{ + return ren->zoomScopeSize; +} + +void GameModel::SetZoomFactor(int factor) +{ + ren->ZFACTOR = factor; + notifyZoomChanged(); +} + +int GameModel::GetZoomFactor() +{ + return ren->ZFACTOR; +} + void GameModel::SetUser(User user) { currentUser = user; @@ -253,3 +308,11 @@ void GameModel::notifyUserChanged() observers[i]->NotifyUserChanged(this); } } + +void GameModel::notifyZoomChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyZoomChanged(this); + } +} diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 72e2875..3c26bf3 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -32,6 +32,7 @@ private: Renderer * ren; Tool * activeTool; User currentUser; + //bool zoomEnabled; void notifyRendererChanged(); void notifySimulationChanged(); void notifyPausedChanged(); @@ -41,6 +42,7 @@ private: void notifyToolListChanged(); void notifyActiveToolChanged(); void notifyUserChanged(); + void notifyZoomChanged(); public: GameModel(); ~GameModel(); @@ -64,6 +66,16 @@ public: int GetBrushID(); Simulation * GetSimulation(); Renderer * GetRenderer(); + void SetZoomEnabled(bool enabled); + bool GetZoomEnabled(); + void SetZoomSize(int size); + int GetZoomSize(); + void SetZoomFactor(int factor); + int GetZoomFactor(); + void SetZoomPosition(ui::Point position); + ui::Point GetZoomPosition(); + void SetZoomWindowPosition(ui::Point position); + ui::Point GetZoomWindowPosition(); }; #endif // GAMEMODEL_H diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 3a20b3e..3b1cd26 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -380,7 +380,7 @@ void GameView::OnMouseMove(int x, int y, int dx, int dy) void GameView::OnMouseDown(int x, int y, unsigned button) { - if(currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) + if(currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES && !(zoomEnabled && !zoomCursorFixed)) { isMouseDown = true; pointQueue.push(new ui::Point(x, y)); @@ -389,10 +389,15 @@ void GameView::OnMouseDown(int x, int y, unsigned button) void GameView::OnMouseUp(int x, int y, unsigned button) { - if(isMouseDown) + if(zoomEnabled && !zoomCursorFixed) + zoomCursorFixed = true; + else { - isMouseDown = false; - pointQueue.push(new ui::Point(x, y)); + if(isMouseDown) + { + isMouseDown = false; + pointQueue.push(new ui::Point(x, y)); + } } } @@ -400,10 +405,17 @@ void GameView::OnMouseWheel(int x, int y, int d) { if(!d) return; - c->AdjustBrushSize(d); - if(isMouseDown) + if(zoomEnabled && !zoomCursorFixed) { - pointQueue.push(new ui::Point(x, y)); + c->AdjustZoomSize(d); + } + else + { + c->AdjustBrushSize(d); + if(isMouseDown) + { + pointQueue.push(new ui::Point(x, y)); + } } } @@ -417,11 +429,29 @@ void GameView::OnKeyPress(int key, bool shift, bool ctrl, bool alt) case KEY_TAB: //Tab c->ChangeBrush(); break; + case 'z': + isMouseDown = false; + zoomCursorFixed = false; + c->SetZoomEnabled(true); + break; } } +void GameView::OnKeyRelease(int key, bool shift, bool ctrl, bool alt) +{ + //switch(key) + //{ + //case 'z': + if(!zoomCursorFixed) + c->SetZoomEnabled(false); + // break; + //} +} + void GameView::OnTick(float dt) { + if(zoomEnabled && !zoomCursorFixed) + c->SetZoomPosition(currentMouse); if(isMouseDown) { pointQueue.push(new ui::Point(currentMouse)); @@ -433,17 +463,23 @@ void GameView::OnTick(float dt) c->Update(); } +void GameView::NotifyZoomChanged(GameModel * sender) +{ + zoomEnabled = sender->GetZoomEnabled(); +} + void GameView::OnDraw() { if(ren) { ren->render_parts(); ren->render_fire(); - ren->DrawSigns(); ren->DrawWalls(); - } - if(activeBrush && currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) - { - activeBrush->Render(ui::Engine::Ref().g, currentMouse); + if(activeBrush && currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) + { + activeBrush->Render(ui::Engine::Ref().g, c->PointTranslate(currentMouse)); + } + ren->RenderZoom(); + ren->DrawSigns(); } } diff --git a/src/game/GameView.h b/src/game/GameView.h index f0c3e82..610b953 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -18,6 +18,8 @@ class GameView: public ui::Window { private: bool isMouseDown; + bool zoomEnabled; + bool zoomCursorFixed; queue pointQueue; GameController * c; Renderer * ren; @@ -49,11 +51,13 @@ public: void NotifyToolListChanged(GameModel * sender); void NotifyActiveToolChanged(GameModel * sender); void NotifyUserChanged(GameModel * sender); + void NotifyZoomChanged(GameModel * sender); virtual void OnMouseMove(int x, int y, int dx, int dy); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); virtual void OnMouseWheel(int x, int y, int d); virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); //virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt) {} //virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {} virtual void OnTick(float dt); diff --git a/src/interface/Point.h b/src/interface/Point.h index 0d0250c..d2eff6b 100644 --- a/src/interface/Point.h +++ b/src/interface/Point.h @@ -32,11 +32,21 @@ struct Point return Point(X + v.X, Y + v.Y); } + inline Point operator + (const int v) const + { + return Point(X + v, Y + v); + } + inline Point operator - (const Point& v) const { return Point(X - v.X, Y - v.Y); } + inline Point operator - (const int v) const + { + return Point(X - v, Y - v); + } + inline Point operator * (const Point& v) const { return Point(X * v.X, Y * v.Y); -- cgit v0.9.2-21-gd62e From 28d4aecb6c31ac1e450c1f073a0db13437d9d5d1 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 28 Jan 2012 14:56:52 +0000 Subject: Make zoom Window switch sides to avoid getting in the way diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 752a0ba..f0c575d 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -215,7 +215,13 @@ void GameController::SetZoomPosition(ui::Point position) zoomPosition.X = XRES-gameModel->GetZoomSize(); if(zoomPosition.Y >= YRES-gameModel->GetZoomSize()) zoomPosition.Y = YRES-gameModel->GetZoomSize(); + + ui::Point zoomWindowPosition = ui::Point(0, 0); + if(position.X < XRES/2) + zoomWindowPosition.X = XRES-(gameModel->GetZoomSize()*gameModel->GetZoomFactor()); + gameModel->SetZoomPosition(zoomPosition); + gameModel->SetZoomWindowPosition(zoomWindowPosition); } void GameController::SetPaused(bool pauseState) -- cgit v0.9.2-21-gd62e From 7c53ca7799832920066c23cfad2f1d7fa82233c7 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 28 Jan 2012 19:56:13 +0000 Subject: Voting, fix save browser diff --git a/resources/document.ico b/resources/document.ico new file mode 100644 index 0000000..83c57e7 Binary files /dev/null and b/resources/document.ico differ diff --git a/resources/powder-res.rc b/resources/powder-res.rc new file mode 100644 index 0000000..46208e2 --- /dev/null +++ b/resources/powder-res.rc @@ -0,0 +1,4 @@ +#define IDI_ICON1 101 +#define IDI_ICON2 102 +IDI_ICON1 ICON DISCARDABLE "powder.ico" +IDI_ICON2 ICON DISCARDABLE "document.ico" diff --git a/resources/powder.ico b/resources/powder.ico new file mode 100644 index 0000000..cd3f6e0 Binary files /dev/null and b/resources/powder.ico differ diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 1d550ff..9b8b9c2 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -18,7 +18,8 @@ #include "cajun/writer.h" #include "cajun/elements.h" -Client::Client() +Client::Client(): + authUser(0, "") { int i = 0; http_init(NULL); @@ -40,6 +41,68 @@ Client::~Client() http_done(); } +void Client::SetAuthUser(User user) +{ + authUser = user; +} + +User Client::GetAuthUser() +{ + return authUser; +} + +RequestStatus Client::ExecVote(int saveID, int direction) +{ + lastError = ""; + int dataStatus; + char * data; + int dataLength = 0; + std::stringstream idStream; + idStream << saveID; + std::string directionS; + if(direction==1) + { + directionS = "Up"; + } + else + { + directionS = "Down"; + } + std::stringstream userIDStream; + userIDStream << authUser.ID; + if(authUser.ID) + { + char * postNames[] = { "ID", "Action", NULL }; + char * postDatas[] = { (char*)(idStream.str().c_str()), (char*)(directionS.c_str()) }; + int postLengths[] = { idStream.str().length(), directionS.length() }; + //std::cout << postNames[0] << " " << postDatas[0] << " " << postLengths[0] << std::endl; + data = http_multipart_post("http://" SERVER "/Vote.api", postNames, postDatas, postLengths, (char *)(userIDStream.str().c_str()), NULL, (char *)(authUser.SessionID.c_str()), &dataStatus, &dataLength); + } + else + { + lastError = "Not authenticated"; + return RequestFailure; + } + std::cout << data << std::endl; + if(data && dataStatus == 200) + { + if(strncmp((const char *)data, "OK", 2)!=0) + { + free(data); + lastError = std::string((const char *)data); + return RequestFailure; + } + free(data); + return RequestOkay; + } + else if(data) + { + free(data); + } + lastError = http_ret_text(dataStatus); + return RequestFailure; +} + unsigned char * Client::GetSaveData(int saveID, int saveDate, int & dataLength) { lastError = ""; @@ -94,7 +157,6 @@ LoginStatus Client::Login(string username, string password, User & user) int postLengths[] = { username.length(), 32 }; data = http_multipart_post("http://" SERVER "/Login.json", postNames, postDatas, postLengths, NULL, NULL, NULL, &dataStatus, &dataLength); //data = http_auth_get("http://" SERVER "/Login.json", (char*)username.c_str(), (char*)password.c_str(), NULL, &dataStatus, &dataLength); - std::cout << data << std::endl; if(dataStatus == 200 && data) { try @@ -152,7 +214,16 @@ Save * Client::GetSave(int saveID, int saveDate) char * data; int dataStatus, dataLength; //Save(int _id, int _votesUp, int _votesDown, string _userName, string _name, string description_, string date_, bool published_): - data = http_simple_get((char *)urlStream.str().c_str(), &dataStatus, &dataLength); + if(authUser.ID) + { + std::stringstream userIDStream; + userIDStream << authUser.ID; + data = http_auth_get((char *)urlStream.str().c_str(), (char *)(userIDStream.str().c_str()), NULL, (char *)(authUser.SessionID.c_str()), &dataStatus, &dataLength); + } + else + { + data = http_simple_get((char *)urlStream.str().c_str(), &dataStatus, &dataLength); + } if(dataStatus == 200 && data) { try @@ -164,6 +235,7 @@ Save * Client::GetSave(int saveID, int saveDate) json::Number tempID = objDocument["ID"]; json::Number tempScoreUp = objDocument["ScoreUp"]; json::Number tempScoreDown = objDocument["ScoreDown"]; + json::Number tempMyScore = objDocument["ScoreMine"]; json::String tempUsername = objDocument["Username"]; json::String tempName = objDocument["Name"]; json::String tempDescription = objDocument["Description"]; @@ -174,6 +246,7 @@ Save * Client::GetSave(int saveID, int saveDate) tempDate.Value(), tempScoreUp.Value(), tempScoreDown.Value(), + tempMyScore.Value(), tempUsername.Value(), tempName.Value(), tempDescription.Value(), @@ -240,7 +313,7 @@ std::vector * Client::SearchSaves(int start, int count, string query, str std::stringstream urlStream; char * data; int dataStatus, dataLength; - urlStream << "http://" << SERVER << "/Browse.json?Start=" << start << "&Count=" << cout; + urlStream << "http://" << SERVER << "/Browse.json?Start=" << start << "&Count=" << count; if(query.length() || sort.length()) { urlStream << "&Search_Query="; diff --git a/src/client/Client.h b/src/client/Client.h index 1b3bb02..89c4e64 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -11,15 +11,22 @@ #include "Singleton.h" #include "User.h" -enum LoginStatus -{ +enum LoginStatus { LoginOkay, LoginError }; -class Client: public Singleton -{ +enum RequestStatus { + RequestOkay, RequestFailure +}; + +class Client: public Singleton { private: std::string lastError; + + //Auth session + User authUser; + + //Thumbnail retreival int thumbnailCacheNextID; Thumbnail * thumbnailCache[THUMB_CACHE_SIZE]; void * activeThumbRequests[IMGCONNS]; @@ -29,6 +36,9 @@ private: public: Client(); ~Client(); + + RequestStatus ExecVote(int saveID, int direction); + unsigned char * GetSaveData(int saveID, int saveDate, int & dataLength); LoginStatus Login(string username, string password, User & user); void ClearThumbnailRequests(); @@ -36,7 +46,11 @@ public: Thumbnail * GetPreview(int saveID, int saveDate); Thumbnail * GetThumbnail(int saveID, int saveDate); Save * GetSave(int saveID, int saveDate); - std::string GetLastError() { return lastError; } + void SetAuthUser(User user); + User GetAuthUser(); + std::string GetLastError() { + return lastError; + } }; #endif // CLIENT_H diff --git a/src/client/HTTP.cpp b/src/client/HTTP.cpp index a94ac73..b4f4777 100644 --- a/src/client/HTTP.cpp +++ b/src/client/HTTP.cpp @@ -731,6 +731,7 @@ char *http_auth_get(char *uri, char *user, char *pass, char *session_id, int *re *len = 0; return NULL; } + http_auth_headers(ctx, user, pass, session_id); return http_async_req_stop(ctx, ret, len); } diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index f0c575d..1e41542 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -33,10 +33,6 @@ public: { if(cc->search->GetLoadedSave()) { - if(cc->gameModel->GetSave()) - { - delete cc->gameModel->GetSave(); - } cc->gameModel->SetSave(new Save(*(cc->search->GetLoadedSave()))); } } @@ -279,7 +275,8 @@ void GameController::OpenSaveWindow() void GameController::Vote(int direction) { - //TODO: Implement + if(gameModel->GetSave() && gameModel->GetUser().ID && gameModel->GetSave()->GetID() && gameModel->GetSave()->GetVote()==0) + gameModel->SetVote(direction); } void GameController::ChangeBrush() @@ -289,6 +286,7 @@ void GameController::ChangeBrush() void GameController::ClearSim() { + gameModel->SetSave(NULL); gameModel->ClearSimulation(); } diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 456d9c4..34cae1d 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -6,14 +6,15 @@ #include "interface/Point.h" #include "Brush.h" #include "EllipseBrush.h" +#include "client/Client.h" GameModel::GameModel(): activeTool(NULL), sim(NULL), ren(NULL), - currentSave(NULL), currentBrush(0), - currentUser(0, "") + currentUser(0, ""), + currentSave(NULL) { sim = new Simulation(); ren = new Renderer(ui::Engine::Ref().g, sim); @@ -66,6 +67,19 @@ GameModel::~GameModel() delete activeTool; } +void GameModel::SetVote(int direction) +{ + if(currentSave) + { + RequestStatus status = Client::Ref().ExecVote(currentSave->GetID(), direction); + if(status == RequestOkay) + { + currentSave->vote = direction; + notifySaveChanged(); + } + } +} + Brush * GameModel::GetBrush() { return brushList[currentBrush]; @@ -140,8 +154,13 @@ Save * GameModel::GetSave() void GameModel::SetSave(Save * newSave) { + if(currentSave) + delete currentSave; currentSave = newSave; - sim->Load(currentSave->GetData(), currentSave->GetDataLength()); + if(currentSave) + { + sim->Load(currentSave->GetData(), currentSave->GetDataLength()); + } notifySaveChanged(); } @@ -218,6 +237,7 @@ int GameModel::GetZoomFactor() void GameModel::SetUser(User user) { currentUser = user; + Client::Ref().SetAuthUser(user); notifyUserChanged(); } diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 3c26bf3..39c7f4a 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -47,6 +47,7 @@ public: GameModel(); ~GameModel(); + void SetVote(int direction); Save * GetSave(); Brush * GetBrush(); void SetSave(Save * newSave); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 3b1cd26..9a2eb2d 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -327,6 +327,7 @@ void GameView::NotifyUserChanged(GameModel * sender) { loginButton->SetText(sender->GetUser().Username); } + NotifySaveChanged(sender); } @@ -339,26 +340,26 @@ void GameView::NotifySaveChanged(GameModel * sender) { if(sender->GetSave()) { - saveSimulationButton->SetText(sender->GetSave()->name); reloadButton->Enabled = true; - if(sender->GetSave()->GetID()) //Online saves have an ID, local saves have an ID of 0 and a filename - { - upVoteButton->Enabled = true; - downVoteButton->Enabled = true; - tagSimulationButton->Enabled = true; - } + upVoteButton->Enabled = (sender->GetSave()->GetID() && sender->GetUser().ID && sender->GetSave()->GetVote()==0); + if(sender->GetSave()->GetID() && sender->GetUser().ID && sender->GetSave()->GetVote()==1) + upVoteButton->SetBackgroundColour(ui::Colour(0, 200, 40)); else - { - upVoteButton->Enabled = false; - downVoteButton->Enabled = false; - tagSimulationButton->Enabled = false; - } + upVoteButton->SetBackgroundColour(ui::Colour(0, 0, 0)); + downVoteButton->Enabled = upVoteButton->Enabled; + if(sender->GetSave()->GetID() && sender->GetUser().ID && sender->GetSave()->GetVote()==-1) + downVoteButton->SetBackgroundColour(ui::Colour(200, 40, 40)); + else + downVoteButton->SetBackgroundColour(ui::Colour(0, 0, 0)); + tagSimulationButton->Enabled = (sender->GetSave()->GetID() && sender->GetUser().ID); } else { reloadButton->Enabled = false; upVoteButton->Enabled = false; + upVoteButton->SetBackgroundColour(ui::Colour(0, 0, 0)); downVoteButton->Enabled = false; + upVoteButton->SetBackgroundColour(ui::Colour(0, 0, 0)); tagSimulationButton->Enabled = false; } } diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index b4e32b2..fc3eda5 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -135,6 +135,7 @@ void Button::Draw(const Point& screenPos) } else { + g->fillrect(Position.X, Position.Y, Size.X, Size.Y, background.Red, background.Green, background.Blue, 180); g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 180, 180, 180, 255); g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 180, 180, 180, 255); } diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index 38fb974..877dfda 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -148,7 +148,6 @@ void SaveButton::OnMouseLeave(int x, int y) void SaveButton::DoAction() { - std::cout << "Do action!" << std::endl; if(actionCallback) actionCallback->ActionCallback(this); } diff --git a/src/render/RenderView.cpp b/src/render/RenderView.cpp index 25978bc..1702d63 100644 --- a/src/render/RenderView.cpp +++ b/src/render/RenderView.cpp @@ -60,8 +60,10 @@ public: } virtual void ActionCallback(ui::Checkbox * sender) { - //if(sender->GetChecked()) + if(sender->GetChecked()) v->c->SetColourMode(colourMode); + else + v->c->SetColourMode(0); } }; diff --git a/src/search/Save.cpp b/src/search/Save.cpp index 5bcb0e9..47ac61a 100644 --- a/src/search/Save.cpp +++ b/src/search/Save.cpp @@ -11,7 +11,7 @@ Save::Save(Save & save) : userName(save.userName), name(save.name), Description(save.Description), date( save.date), Published(save.Published), id(save.id), votesUp( - save.votesUp), votesDown(save.votesDown), data(NULL) { + save.votesUp), votesDown(save.votesDown), data(NULL), vote(save.vote) { if (save.data) { std::cout << data << " " << save.data << std::endl; data = (unsigned char *) malloc(save.dataLength); @@ -24,14 +24,14 @@ Save::Save(int _id, int _date, int _votesUp, int _votesDown, string _userName, string _name) : id(_id), votesUp(_votesUp), votesDown(_votesDown), userName(_userName), name( _name), Description("No description provided"), date(_date), Published( - true), data(NULL) { + true), data(NULL), vote(0) { } -Save::Save(int _id, int date_, int _votesUp, int _votesDown, string _userName, +Save::Save(int _id, int date_, int _votesUp, int _votesDown, int _vote, string _userName, string _name, string description_, bool published_) : id(_id), votesUp(_votesUp), votesDown(_votesDown), userName(_userName), name( _name), Description(description_), date(date_), Published( - published_), data(NULL) { + published_), data(NULL), vote(_vote) { } Save::~Save() @@ -49,6 +49,15 @@ string Save::GetName() { return name; } +void Save::SetVote(int vote) +{ + this->vote = vote; +} +int Save::GetVote() +{ + return vote; +} + void Save::SetUserName(string userName) { this->userName = userName; } diff --git a/src/search/Save.h b/src/search/Save.h index 42cbb62..5c471e1 100644 --- a/src/search/Save.h +++ b/src/search/Save.h @@ -21,7 +21,7 @@ public: Save(int _id, int _date, int _votesUp, int _votesDown, string _userName, string _name); - Save(int _id, int date_, int _votesUp, int _votesDown, string _userName, string _name, string description_, bool published_); + Save(int _id, int date_, int _votesUp, int _votesDown, int _vote, string _userName, string _name, string description_, bool published_); ~Save(); @@ -30,6 +30,8 @@ public: string Description; + int vote; + bool Published; void SetName(string name); @@ -41,6 +43,9 @@ public: void SetID(int id); int GetID(); + void SetVote(int vote); + int GetVote(); + void SetVotesUp(int votesUp); int GetVotesUp(); diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index d9a4a1e..d740620 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -19,7 +19,7 @@ void SearchModel::UpdateSaveList(int pageNumber, std::string query) resultCount = 0; notifySaveListChanged(); notifyPageChanged(); - vector * tempSaveList = Client::Ref().SearchSaves((pageNumber-1)*12, 12, query, currentSort, resultCount); + vector * tempSaveList = Client::Ref().SearchSaves((pageNumber-1)*20, 20, query, currentSort, resultCount); saveList = *tempSaveList; delete tempSaveList; if(!saveList.size()) diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 8e5360f..b1d9765 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -141,7 +141,7 @@ void SearchView::NotifyPageChanged(SearchModel * sender) void SearchView::NotifySaveListChanged(SearchModel * sender) { int i = 0; - int buttonWidth, buttonHeight, saveX = 0, saveY = 0, savesX = 4, savesY = 3, buttonPadding = 2; + int buttonWidth, buttonHeight, saveX = 0, saveY = 0, savesX = 5, savesY = 4, buttonPadding = 2; int buttonAreaWidth, buttonAreaHeight, buttonXOffset, buttonYOffset; vector saves = sender->GetSaveList(); -- cgit v0.9.2-21-gd62e From 680a36549adaed0c3ce7e8906fadbdf190b0b3b0 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 29 Jan 2012 14:44:36 +0000 Subject: Background retrieval of save info and save list. diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 406e334..9174ed0 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -18,6 +18,8 @@ #include "game/GameController.h" #include "game/GameView.h" +#include "dialogues/ErrorMessage.h" + #include "client/HTTP.h" using namespace std; @@ -73,6 +75,8 @@ int main(int argc, char * argv[]) GameController * gameController = new GameController(); engine->ShowWindow(gameController->GetView()); + new ErrorMessage("Error", "This is a test error message"); + SDL_Event event; while(engine->Running()) { diff --git a/src/dialogues/ErrorMessage.cpp b/src/dialogues/ErrorMessage.cpp new file mode 100644 index 0000000..bce0c33 --- /dev/null +++ b/src/dialogues/ErrorMessage.cpp @@ -0,0 +1,50 @@ +/* + * ErrorMessage.cpp + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#include "ErrorMessage.h" +#include "interface/Button.h" +#include "interface/Label.h" + +ErrorMessage::ErrorMessage(std::string title, std::string message): + ui::Window(ui::Point(-1, -1), ui::Point(200, 75)) +{ + ui::Label * titleLabel = new ui::Label(ui::Point(2, 1), ui::Point(Size.X-4, 16), title); + titleLabel->SetTextColour(ui::Colour(200, 100, 50)); + titleLabel->SetAlignment(AlignLeft, AlignBottom); + AddComponent(titleLabel); + + ui::Label * messageLabel = new ui::Label(ui::Point(4, 18), ui::Point(Size.X-8, 60), message); + messageLabel->SetAlignment(AlignLeft, AlignTop); + AddComponent(messageLabel); + + class DismissAction: public ui::ButtonAction + { + void ActionCallback(ui::Button * sender) + { + ui::Engine::Ref().CloseWindow(); + } + }; + + ui::Button * okayButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(Size.X, 16), "Dismiss"); + okayButton->SetAlignment(AlignRight, AlignBottom); + okayButton->SetBorderColour(ui::Colour(200, 200, 200)); + okayButton->SetActionCallback(new DismissAction()); + AddComponent(okayButton); + ui::Engine::Ref().ShowWindow(this); +} + +void ErrorMessage::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + + g->clearrect(Position.X-2, Position.Y-2, Size.X+4, Size.Y+4); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 200, 200, 200, 255); +} + +ErrorMessage::~ErrorMessage() { +} + diff --git a/src/dialogues/ErrorMessage.h b/src/dialogues/ErrorMessage.h new file mode 100644 index 0000000..f8575bd --- /dev/null +++ b/src/dialogues/ErrorMessage.h @@ -0,0 +1,20 @@ +/* + * ErrorMessage.h + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#ifndef ERRORMESSAGE_H_ +#define ERRORMESSAGE_H_ + +#include "interface/Window.h" + +class ErrorMessage: public ui::Window { +public: + ErrorMessage(std::string title, std::string message); + virtual void OnDraw(); + virtual ~ErrorMessage(); +}; + +#endif /* ERRORMESSAGE_H_ */ diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp index 6fc47e2..e5f99a2 100644 --- a/src/interface/Label.cpp +++ b/src/interface/Label.cpp @@ -6,7 +6,7 @@ using namespace ui; -Label::Label(Window* parent_state, std::string labelText): +/*Label::Label(Window* parent_state, std::string labelText): Component(parent_state), text(labelText), textPosition(ui::Point(0, 0)), @@ -14,19 +14,20 @@ Label::Label(Window* parent_state, std::string labelText): textHAlign(AlignCentre) { TextPosition(); -} +}*/ Label::Label(Point position, Point size, std::string labelText): Component(position, size), text(labelText), textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), - textHAlign(AlignCentre) + textHAlign(AlignCentre), + textColour(255, 255, 255) { TextPosition(); } -Label::Label(std::string labelText): +/*Label::Label(std::string labelText): Component(), text(labelText), textPosition(ui::Point(0, 0)), @@ -34,7 +35,7 @@ Label::Label(std::string labelText): textHAlign(AlignCentre) { TextPosition(); -} +}*/ Label::~Label() { @@ -80,6 +81,6 @@ void Label::SetText(std::string text) void Label::Draw(const Point& screenPos) { Graphics * g = Engine::Ref().g; - g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, text, 255, 255, 255, 255); + g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, text, textColour.Red, textColour.Green, textColour.Blue, 255); } diff --git a/src/interface/Label.h b/src/interface/Label.h index 9b5a454..b925140 100644 --- a/src/interface/Label.h +++ b/src/interface/Label.h @@ -5,6 +5,7 @@ #include "Component.h" #include "Misc.h" +#include "Colour.h" namespace ui { @@ -14,10 +15,12 @@ namespace ui ui::Point textPosition; HorizontalAlignment textHAlign; VerticalAlignment textVAlign; + + Colour textColour; public: - Label(Window* parent_state, std::string labelText); + //Label(Window* parent_state, std::string labelText); Label(Point position, Point size, std::string labelText); - Label(std::string labelText); + //Label(std::string labelText); virtual ~Label(); void TextPosition(); @@ -26,6 +29,8 @@ namespace ui VerticalAlignment GetVAlignment() { return textVAlign; } void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign) { textHAlign = hAlign; textVAlign = vAlign; TextPosition(); } + void SetTextColour(Colour textColour) { this->textColour = textColour; } + virtual void Draw(const Point& screenPos); }; diff --git a/src/preview/PreviewController.cpp b/src/preview/PreviewController.cpp index db3cdee..ac68e07 100644 --- a/src/preview/PreviewController.cpp +++ b/src/preview/PreviewController.cpp @@ -13,7 +13,6 @@ PreviewController::PreviewController(int saveID, ControllerCallback * callback): HasExited(false) { - // TODO Auto-generated constructor stub previewModel = new PreviewModel(); previewView = new PreviewView(); previewModel->AddObserver(previewView); @@ -24,6 +23,11 @@ PreviewController::PreviewController(int saveID, ControllerCallback * callback): this->callback = callback; } +void PreviewController::Update() +{ + previewModel->Update(); +} + Save * PreviewController::GetSave() { return previewModel->GetSave(); diff --git a/src/preview/PreviewController.h b/src/preview/PreviewController.h index 452d686..e9b0fb5 100644 --- a/src/preview/PreviewController.h +++ b/src/preview/PreviewController.h @@ -27,6 +27,7 @@ public: bool GetDoOpen(); Save * GetSave(); PreviewView * GetView() { return previewView; } + void Update(); virtual ~PreviewController(); }; diff --git a/src/preview/PreviewModel.cpp b/src/preview/PreviewModel.cpp index 07396cb..658a767 100644 --- a/src/preview/PreviewModel.cpp +++ b/src/preview/PreviewModel.cpp @@ -11,18 +11,63 @@ PreviewModel::PreviewModel(): save(NULL), savePreview(NULL), - doOpen(false) + doOpen(false), + updateSavePreviewWorking(false), + updateSavePreviewFinished(false), + updateSaveInfoWorking(false), + updateSaveInfoFinished(false) { // TODO Auto-generated constructor stub } +void * PreviewModel::updateSaveInfoTHelper(void * obj) +{ + return ((PreviewModel*)obj)->updateSaveInfoT(); +} + +void * PreviewModel::updateSavePreviewTHelper(void * obj) +{ + return ((PreviewModel*)obj)->updateSavePreviewT(); +} + +void * PreviewModel::updateSaveInfoT() +{ + Save * tempSave = Client::Ref().GetSave(tSaveID, tSaveDate); + updateSaveInfoFinished = true; + return tempSave; +} + +void * PreviewModel::updateSavePreviewT() +{ + Thumbnail * tempThumb = Client::Ref().GetPreview(tSaveID, tSaveDate); + updateSavePreviewFinished = true; + return tempThumb; +} + void PreviewModel::UpdateSave(int saveID, int saveDate) { - save = Client::Ref().GetSave(saveID, saveDate); - notifySaveChanged(); - savePreview = Client::Ref().GetPreview(saveID, saveDate); + this->tSaveID = saveID; + this->tSaveDate = saveDate; + + save = NULL; + savePreview = NULL; notifyPreviewChanged(); + notifySaveChanged(); + + if(!updateSavePreviewWorking) + { + updateSavePreviewWorking = true; + updateSavePreviewFinished = false; + pthread_create(&updateSavePreviewThread, 0, &PreviewModel::updateSavePreviewTHelper, this); + } + + if(!updateSaveInfoWorking) + { + updateSaveInfoWorking = true; + updateSaveInfoFinished = false; + pthread_create(&updateSaveInfoThread, 0, &PreviewModel::updateSaveInfoTHelper, this); + } } void PreviewModel::SetDoOpen(bool doOpen) @@ -67,6 +112,27 @@ void PreviewModel::AddObserver(PreviewView * observer) { observer->NotifySaveChanged(this); } +void PreviewModel::Update() +{ + if(updateSavePreviewWorking) + { + if(updateSavePreviewFinished) + { + pthread_join(updateSavePreviewThread, (void**)(&savePreview)); + notifyPreviewChanged(); + } + } + + if(updateSaveInfoWorking) + { + if(updateSaveInfoFinished) + { + pthread_join(updateSaveInfoThread, (void**)(&save)); + notifySaveChanged(); + } + } +} + PreviewModel::~PreviewModel() { if(save) delete save; diff --git a/src/preview/PreviewModel.h b/src/preview/PreviewModel.h index 23ac2d7..e0e5966 100644 --- a/src/preview/PreviewModel.h +++ b/src/preview/PreviewModel.h @@ -9,6 +9,7 @@ #define PREVIEWMODEL_H_ #include +#include #include "PreviewView.h" #include "search/Save.h" #include "search/Thumbnail.h" @@ -23,6 +24,22 @@ class PreviewModel { Thumbnail * savePreview; void notifyPreviewChanged(); void notifySaveChanged(); + + //Background retrieval + int tSaveID; + int tSaveDate; + + bool updateSavePreviewWorking; + volatile bool updateSavePreviewFinished; + pthread_t updateSavePreviewThread; + static void * updateSavePreviewTHelper(void * obj); + void * updateSavePreviewT(); + + bool updateSaveInfoWorking; + volatile bool updateSaveInfoFinished; + pthread_t updateSaveInfoThread; + static void * updateSaveInfoTHelper(void * obj); + void * updateSaveInfoT(); public: PreviewModel(); Thumbnail * GetPreview(); @@ -31,6 +48,7 @@ public: void UpdateSave(int saveID, int saveDate); bool GetDoOpen(); void SetDoOpen(bool doOpen); + void Update(); virtual ~PreviewModel(); }; diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index 4ab54b2..de58692 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -57,6 +57,11 @@ void PreviewView::OnDraw() g->draw_line(Position.X+XRES/2, Position.Y, Position.X+XRES/2, Position.Y+Size.Y, 255, 255, 255, XRES+BARSIZE); } +void PreviewView::OnTick(float dt) +{ + c->Update(); +} + void PreviewView::OnMouseDown(int x, int y, unsigned button) { if(!(x > Position.X && y > Position.Y && y < Position.Y+Size.Y && x < Position.X+Size.X)) //Clicked outside window diff --git a/src/preview/PreviewView.h b/src/preview/PreviewView.h index e788210..a526ef7 100644 --- a/src/preview/PreviewView.h +++ b/src/preview/PreviewView.h @@ -28,6 +28,7 @@ public: void NotifyPreviewChanged(PreviewModel * sender); void NotifySaveChanged(PreviewModel * sender); virtual void OnDraw(); + virtual void OnTick(float dt); virtual void OnMouseDown(int x, int y, unsigned button); virtual ~PreviewView(); }; diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 2102a7d..6aff962 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -43,6 +43,7 @@ Save * SearchController::GetLoadedSave() void SearchController::Update() { + searchModel->Update(); if(activePreview && activePreview->HasExited) { delete activePreview; diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index d740620..e40c4b0 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -6,29 +6,43 @@ SearchModel::SearchModel(): currentSort("votes"), showOwn(false), - loadedSave(NULL) + loadedSave(NULL), + updateSaveListWorking(false), + updateSaveListFinished(false), + saveListLoaded(false) { } +void * SearchModel::updateSaveListTHelper(void * obj) +{ + return ((SearchModel *)obj)->updateSaveListT(); +} + +void * SearchModel::updateSaveListT() +{ + vector * tempSaveList = Client::Ref().SearchSaves((currentPage-1)*20, 20, lastQuery, currentSort, resultCount); + updateSaveListFinished = true; + return tempSaveList; +} + void SearchModel::UpdateSaveList(int pageNumber, std::string query) { lastQuery = query; lastError = ""; + saveListLoaded = false; saveList.clear(); - currentPage = 1; - resultCount = 0; + //resultCount = 0; + currentPage = pageNumber; notifySaveListChanged(); notifyPageChanged(); - vector * tempSaveList = Client::Ref().SearchSaves((pageNumber-1)*20, 20, query, currentSort, resultCount); - saveList = *tempSaveList; - delete tempSaveList; - if(!saveList.size()) + + //Threading + if(!updateSaveListWorking) { - lastError = Client::Ref().GetLastError(); + updateSaveListFinished = false; + updateSaveListWorking = true; + pthread_create(&updateSaveListThread, 0, &SearchModel::updateSaveListTHelper, this); } - currentPage = pageNumber; - notifyPageChanged(); - notifySaveListChanged(); } void SearchModel::SetLoadedSave(Save * save) @@ -45,6 +59,30 @@ vector SearchModel::GetSaveList() return saveList; } +void SearchModel::Update() +{ + if(updateSaveListWorking) + { + if(updateSaveListFinished) + { + updateSaveListWorking = false; + lastError = ""; + saveListLoaded = true; + vector * tempSaveList; + pthread_join(updateSaveListThread, (void**)(&tempSaveList)); + saveList = *tempSaveList; + delete tempSaveList; + if(!saveList.size()) + { + lastError = Client::Ref().GetLastError(); + } + //currentPage = pageNumber; + notifyPageChanged(); + notifySaveListChanged(); + } + } +} + void SearchModel::AddObserver(SearchView * observer) { observers.push_back(observer); diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index e99e4ca..d52529d 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -3,6 +3,7 @@ #include #include +#include #include #include "Save.h" #include "SearchView.h" @@ -26,6 +27,14 @@ private: void notifyPageChanged(); void notifySortChanged(); void notifyShowOwnChanged(); + + //Variables and methods for backgroun save request + bool saveListLoaded; + bool updateSaveListWorking; + volatile bool updateSaveListFinished; + pthread_t updateSaveListThread; + static void * updateSaveListTHelper(void * obj); + void * updateSaveListT(); public: SearchModel(); virtual ~SearchModel(); @@ -42,6 +51,8 @@ public: bool GetShowOwn() { return showOwn; } void SetLoadedSave(Save * save); Save * GetLoadedSave(); + bool GetSavesLoaded() { return saveListLoaded; } + void Update(); }; #endif // SEARCHMODEL_H diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index b1d9765..b9c8bcb 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -152,6 +152,16 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) delete saveButtons[i]; } saveButtons.clear(); + if(!sender->GetSavesLoaded()) + { + nextButton->Enabled = false; + previousButton->Enabled = false; + } + else + { + nextButton->Enabled = true; + previousButton->Enabled = true; + } if(!saves.size()) { if(!errorLabel) @@ -159,10 +169,17 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) errorLabel = new ui::Label(ui::Point(((XRES+BARSIZE)/2)-100, ((YRES+MENUSIZE)/2)-6), ui::Point(200, 12), "Error"); AddComponent(errorLabel); } - if(sender->GetLastError().length()) - errorLabel->SetText("\bo" + sender->GetLastError()); + if(!sender->GetSavesLoaded()) + { + errorLabel->SetText("Loading..."); + } else - errorLabel->SetText("\boNo saves found"); + { + if(sender->GetLastError().length()) + errorLabel->SetText("\bo" + sender->GetLastError()); + else + errorLabel->SetText("\boNo saves found"); + } } else { -- cgit v0.9.2-21-gd62e From 80aa7219a2d47632efa5d72b79bbb4fc65721631 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 29 Jan 2012 17:12:35 +0000 Subject: Vote view in save preview, better handling of controller destruction diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 9174ed0..80eddb2 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -75,7 +75,7 @@ int main(int argc, char * argv[]) GameController * gameController = new GameController(); engine->ShowWindow(gameController->GetView()); - new ErrorMessage("Error", "This is a test error message"); + //new ErrorMessage("Error", "This is a test error message"); SDL_Event event; while(engine->Running()) diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 1e41542..65556db 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -68,23 +68,20 @@ GameController::~GameController() { if(search) { - if(ui::Engine::Ref().GetWindow() == search->GetView()) - ui::Engine::Ref().CloseWindow(); delete search; } if(renderOptions) { - if(ui::Engine::Ref().GetWindow() == renderOptions->GetView()) - ui::Engine::Ref().CloseWindow(); delete renderOptions; } if(loginWindow) { - if(ui::Engine::Ref().GetWindow() == loginWindow->GetView()) - ui::Engine::Ref().CloseWindow(); delete loginWindow; } - delete gameView; + if(ui::Engine::Ref().GetWindow() == gameView) + { + ui::Engine::Ref().CloseWindow(); + } delete gameModel; } diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index 877dfda..fa848bf 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -9,36 +9,29 @@ namespace ui { -SaveButton::SaveButton(Window* parent_state, Save * save): - Component(parent_state), - save(save), - thumbnail(NULL), - isMouseInside(false), - isButtonDown(false), - actionCallback(NULL) -{ - -} - SaveButton::SaveButton(Point position, Point size, Save * save): Component(position, size), save(save), thumbnail(NULL), isMouseInside(false), isButtonDown(false), - actionCallback(NULL) + actionCallback(NULL), + voteColour(255, 0, 0) { + if(save->votesUp==0) + voteRatio = 0.0f; + else if(save->votesDown==0) + voteRatio = 1.0f; + else + voteRatio = 1.0f-(float)(((float)(save->votesDown))/((float)(save->votesUp))); + if(voteRatio < 0.0f) + voteRatio = 0.0f; + if(voteRatio > 1.0f) //Not possible, but just in case the server were to give a negative value or something + voteRatio = 1.0f; -} -SaveButton::SaveButton(Save * save): - Component(), - save(save), - thumbnail(NULL), - isMouseInside(false), - isButtonDown(false), - actionCallback(NULL) -{ + voteColour.Red = (1.0f-voteRatio)*255; + voteColour.Green = voteRatio*255; } @@ -68,9 +61,9 @@ void SaveButton::Tick(float dt) { scaleFactorY = ((float)(Size.Y-25))/((float)thumbnail->Size.Y); } - if(thumbnail->Size.X > Size.X) + if(thumbnail->Size.X > Size.X-3) { - scaleFactorX = ((float)Size.X)/((float)thumbnail->Size.X); + scaleFactorX = ((float)Size.X-3)/((float)thumbnail->Size.X); } if(scaleFactorY < 1.0f || scaleFactorX < 1.0f) { @@ -90,16 +83,32 @@ void SaveButton::Draw(const Point& screenPos) { Graphics * g = ui::Engine::Ref().g; float scaleFactor; + ui::Point thumbBoxSize(0, 0); if(thumbnail) { - g->draw_image(thumbnail->Data, screenPos.X+(Size.X-thumbnail->Size.X)/2, screenPos.Y+((Size.Y-25)-thumbnail->Size.Y)/2, thumbnail->Size.X, thumbnail->Size.Y, 255); - g->drawrect(screenPos.X+(Size.X-thumbnail->Size.X)/2, screenPos.Y+((Size.Y-25)-thumbnail->Size.Y)/2, thumbnail->Size.X, thumbnail->Size.Y, 180, 180, 180, 255); + thumbBoxSize = ui::Point(thumbnail->Size.X, thumbnail->Size.Y); + if(save->id) + g->draw_image(thumbnail->Data, screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-25-thumbBoxSize.Y)/2, thumbnail->Size.X, thumbnail->Size.Y, 255); + else + g->draw_image(thumbnail->Data, screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-25-thumbBoxSize.Y)/2, thumbnail->Size.X, thumbnail->Size.Y, 255); } else { scaleFactor = (Size.Y-25)/((float)YRES); - g->drawrect(screenPos.X+(Size.X-((float)XRES)*scaleFactor)/2, screenPos.Y+((Size.Y-21)-((float)YRES)*scaleFactor)/2, ((float)XRES)*scaleFactor, ((float)YRES)*scaleFactor, 180, 180, 180, 255); + thumbBoxSize = ui::Point(((float)XRES)*scaleFactor, ((float)YRES)*scaleFactor); + } + if(save->id) + { + g->drawrect(screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); + g->drawrect(screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, 6, thumbBoxSize.Y, 180, 180, 180, 255); + + int voteBar = max(10.0f, ((float)(thumbBoxSize.Y))*voteRatio); + g->fillrect(screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(thumbBoxSize.Y-voteBar)+(Size.Y-21-thumbBoxSize.Y)/2, 6, voteBar, voteColour.Red, voteColour.Green, voteColour.Blue, 255); + } + else + { + g->drawrect(screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); } if(isMouseInside) diff --git a/src/interface/SaveButton.h b/src/interface/SaveButton.h index 65cff52..d4b2570 100644 --- a/src/interface/SaveButton.h +++ b/src/interface/SaveButton.h @@ -7,6 +7,7 @@ #include "search/Save.h" #include "Graphics.h" #include "search/Thumbnail.h" +#include "interface/Colour.h" namespace ui { @@ -23,11 +24,7 @@ class SaveButton : public Component Save * save; Thumbnail * thumbnail; public: - SaveButton(Window* parent_state, Save * save); - SaveButton(Point position, Point size, Save * save); - - SaveButton(Save * save); virtual ~SaveButton(); virtual void OnMouseClick(int x, int y, unsigned int button); @@ -45,6 +42,8 @@ public: void SetActionCallback(SaveButtonAction * action); protected: bool isButtonDown, state, isMouseInside; + float voteRatio; + Colour voteColour; SaveButtonAction * actionCallback; }; } diff --git a/src/login/LoginController.cpp b/src/login/LoginController.cpp index 1a21fc6..af1a66a 100644 --- a/src/login/LoginController.cpp +++ b/src/login/LoginController.cpp @@ -44,8 +44,10 @@ void LoginController::Exit() } LoginController::~LoginController() { - if(loginView) - delete loginView; + if(ui::Engine::Ref().GetWindow() == loginView) + { + ui::Engine::Ref().CloseWindow(); + } delete loginModel; } diff --git a/src/preview/PreviewController.cpp b/src/preview/PreviewController.cpp index ac68e07..558d705 100644 --- a/src/preview/PreviewController.cpp +++ b/src/preview/PreviewController.cpp @@ -55,7 +55,10 @@ void PreviewController::Exit() } PreviewController::~PreviewController() { - delete previewView; + if(ui::Engine::Ref().GetWindow() == previewView) + { + ui::Engine::Ref().CloseWindow(); + } delete previewModel; } diff --git a/src/preview/PreviewModel.cpp b/src/preview/PreviewModel.cpp index 658a767..dba7aa1 100644 --- a/src/preview/PreviewModel.cpp +++ b/src/preview/PreviewModel.cpp @@ -118,6 +118,7 @@ void PreviewModel::Update() { if(updateSavePreviewFinished) { + updateSavePreviewWorking = false; pthread_join(updateSavePreviewThread, (void**)(&savePreview)); notifyPreviewChanged(); } @@ -127,6 +128,7 @@ void PreviewModel::Update() { if(updateSaveInfoFinished) { + updateSaveInfoWorking = false; pthread_join(updateSaveInfoThread, (void**)(&save)); notifySaveChanged(); } diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index de58692..68a224b 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -31,11 +31,11 @@ PreviewView::PreviewView(): openButton->SetActionCallback(new OpenAction(this)); AddComponent(openButton); - saveNameLabel = new ui::Label(ui::Point(5, (YRES/2)+5), ui::Point(100, 16), ""); + saveNameLabel = new ui::Label(ui::Point(5, (YRES/2)+15), ui::Point(100, 16), ""); saveNameLabel->SetAlignment(AlignLeft, AlignBottom); AddComponent(saveNameLabel); - authorDateLabel = new ui::Label(ui::Point(5, (YRES/2)+5+14), ui::Point(100, 16), ""); + authorDateLabel = new ui::Label(ui::Point(5, (YRES/2)+15+14), ui::Point(100, 16), ""); authorDateLabel->SetAlignment(AlignLeft, AlignBottom); AddComponent(authorDateLabel); } @@ -55,6 +55,20 @@ void PreviewView::OnDraw() } g->drawrect(Position.X, Position.Y, XRES/2, YRES/2, 255, 255, 255, 100); g->draw_line(Position.X+XRES/2, Position.Y, Position.X+XRES/2, Position.Y+Size.Y, 255, 255, 255, XRES+BARSIZE); + + + g->draw_line(Position.X+1, Position.Y+10+YRES/2, Position.X-2+XRES/2, Position.Y+10+YRES/2, 100, 100, 100, XRES+BARSIZE); + float factor; + if(!votesUp && !votesDown) + return; + else + factor = (float)(((float)(XRES/2))/((float)(votesUp+votesDown))); + g->fillrect(Position.X, Position.Y+YRES/2, XRES/2, 10, 200, 50, 50, 255); + g->fillrect(Position.X, Position.Y+YRES/2, (int)(((float)votesUp)*factor), 10, 50, 200, 50, 255); + g->fillrect(Position.X, Position.Y+(YRES/2), 14, 10, 0, 0, 0, 100); + g->fillrect(Position.X+(XRES/2)-14, Position.Y+(YRES/2), 14, 10, 0, 0, 0, 100); + g->draw_icon(Position.X+2, Position.Y+(YRES/2)+2, IconVoteUp); + g->draw_icon(Position.X+(XRES/2)-12, Position.Y+(YRES/2), IconVoteDown); } void PreviewView::OnTick(float dt) @@ -73,11 +87,15 @@ void PreviewView::NotifySaveChanged(PreviewModel * sender) Save * save = sender->GetSave(); if(save) { + votesUp = save->votesUp; + votesDown = save->votesDown; saveNameLabel->SetText(save->name); authorDateLabel->SetText("\bgAuthor:\bw " + save->userName + " \bgDate:\bw "); } else { + votesUp = 0; + votesDown = 0; saveNameLabel->SetText(""); authorDateLabel->SetText(""); } diff --git a/src/preview/PreviewView.h b/src/preview/PreviewView.h index a526ef7..dbc3248 100644 --- a/src/preview/PreviewView.h +++ b/src/preview/PreviewView.h @@ -22,6 +22,8 @@ class PreviewView: public ui::Window { ui::Button * openButton; ui::Label * saveNameLabel; ui::Label * authorDateLabel; + int votesUp; + int votesDown; public: void AttachController(PreviewController * controller) { c = controller;} PreviewView(); diff --git a/src/render/RenderController.cpp b/src/render/RenderController.cpp index e92f039..c77f381 100644 --- a/src/render/RenderController.cpp +++ b/src/render/RenderController.cpp @@ -57,7 +57,10 @@ void RenderController::Exit() } RenderController::~RenderController() { - delete renderView; + if(ui::Engine::Ref().GetWindow() == renderView) + { + ui::Engine::Ref().CloseWindow(); + } delete renderModel; } diff --git a/src/search/Save.h b/src/search/Save.h index 5c471e1..4176e13 100644 --- a/src/search/Save.h +++ b/src/search/Save.h @@ -11,12 +11,13 @@ using namespace std; class Save { private: +public: int id; int date; int votesUp, votesDown; unsigned char * data; int dataLength; -public: + Save(Save & save); Save(int _id, int _date, int _votesUp, int _votesDown, string _userName, string _name); diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 6aff962..efd33ac 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -68,9 +68,13 @@ void SearchController::Exit() SearchController::~SearchController() { + if(activePreview) + delete activePreview; + if(ui::Engine::Ref().GetWindow() == searchView) + { + ui::Engine::Ref().CloseWindow(); + } delete searchModel; - if(searchView) - delete searchView; } void SearchController::DoSearch(std::string query) -- cgit v0.9.2-21-gd62e From 5efec8879767dbe973b38f7b026c9ace5c9b089b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 29 Jan 2012 17:54:53 +0000 Subject: Nice Icon settings for Windows diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 80eddb2..514fe9b 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -1,12 +1,18 @@ #include #include +#ifdef WIN32 +#include +#endif #include #include #include #include "Config.h" #include "Global.h" #include "Graphics.h" +#if defined(LIN32) || defined(LIN64) +#include "icon.h" +#endif #include "interface/Engine.h" #include "interface/Button.h" @@ -24,6 +30,10 @@ using namespace std; +#ifdef WIN32 +extern "C" IMAGE_DOS_HEADER __ImageBase; +#endif + SDL_Surface * SDLOpen() { #if defined(WIN32) && defined(WINCONSOLE) @@ -39,11 +49,30 @@ SDL_Surface * SDLOpen() //On Windows, SDL redirects stdout to stdout.txt, which can be annoying when debugging, here we redirect back to the console if (console) { + freopen("CON", "w", stdout); freopen("con", "w", stderr); fclose(console); } #endif +#ifdef WIN32 + SDL_SysWMinfo SysInfo; + SDL_VERSION(&SysInfo.version); + if(SDL_GetWMInfo(&SysInfo) <= 0) { + printf("%s : %d\n", SDL_GetError(), SysInfo.window); + exit(-1); + } + HWND WindowHandle = SysInfo.window; + HICON hIconSmall = (HICON)LoadImage(reinterpret_cast(&__ImageBase), MAKEINTRESOURCE(101), IMAGE_ICON, 16, 16, LR_SHARED); + HICON hIconBig = (HICON)LoadImage(reinterpret_cast(&__ImageBase), MAKEINTRESOURCE(101), IMAGE_ICON, 32, 32, LR_SHARED); + SendMessage(WindowHandle, WM_SETICON, ICON_SMALL, (LPARAM)hIconSmall); + SendMessage(WindowHandle, WM_SETICON, ICON_BIG, (LPARAM)hIconBig); +#elif defined(LIN32) || defined(LIN32) + SDL_Surface *icon = SDL_CreateRGBSurfaceFrom(app_icon, 16, 16, 32, 64, 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000); + SDL_WM_SetIcon(icon, NULL); +#endif + + SDL_WM_SetCaption("The Powder Toy", "Powder Toy"); atexit(SDL_Quit); return SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_SWSURFACE); } -- cgit v0.9.2-21-gd62e From fe329e9127ebcb8c89c505c4c120e175810d280c Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 29 Jan 2012 18:01:39 +0000 Subject: Stop printing crap from BRMT update method diff --git a/src/elements/brmt.cpp b/src/elements/brmt.cpp index 0e49cd1..c5be61f 100644 --- a/src/elements/brmt.cpp +++ b/src/elements/brmt.cpp @@ -4,7 +4,6 @@ int update_BRMT(UPDATE_FUNC_ARGS) { int r, rx, ry, rt, tempFactor; if (parts[i].temp > (250.0f+273.15f)) { - printf("%f\n", (250.0f+273.15f)-parts[i].temp); for (rx=-1; rx<2; rx++) for (ry=-1; ry<2; ry++) if (x+rx>=0 && y+ry>0 && x+rx Date: Mon, 30 Jan 2012 00:40:28 +0000 Subject: ASCII for key events, save and Textarea (no caret, yet) diff --git a/src/Config.h b/src/Config.h index b113143..436e8a2 100644 --- a/src/Config.h +++ b/src/Config.h @@ -148,4 +148,5 @@ extern unsigned char ZSIZE; #define DEBUG_PERFORMANCE_CALC 0x0008 #define DEBUG_PERFORMANCE_FRAME 0x0010 +#include "interface/Keys.h" //#endif /* CONFIG_H_ */ diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 514fe9b..a64270f 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -118,10 +118,10 @@ int main(int argc, char * argv[]) engine->Exit(); break; case SDL_KEYDOWN: - engine->onKeyPress(event.key.keysym.unicode, false, false, false); + engine->onKeyPress(event.key.keysym.sym, event.key.keysym.unicode, event.key.keysym.mod&KEY_MOD_SHIFT, event.key.keysym.mod&KEY_MOD_CONTROL, event.key.keysym.mod&KEY_MOD_ALT); break; case SDL_KEYUP: - engine->onKeyRelease(event.key.keysym.unicode, false, false, false); + engine->onKeyRelease(event.key.keysym.sym, event.key.keysym.unicode, event.key.keysym.mod&KEY_MOD_SHIFT, event.key.keysym.mod&KEY_MOD_CONTROL, event.key.keysym.mod&KEY_MOD_ALT); break; case SDL_MOUSEMOTION: engine->onMouseMove(event.motion.x, event.motion.y); diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 9b8b9c2..75b78c5 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -51,6 +51,60 @@ User Client::GetAuthUser() return authUser; } +RequestStatus Client::UploadSave(Save * save) +{ + lastError = ""; + int dataStatus; + char * data; + int dataLength = 0; + std::stringstream userIDStream; + userIDStream << authUser.ID; + if(authUser.ID) + { + char * postNames[] = { "Name", "Description", "Data:save.bin", "Publish", NULL }; + char * postDatas[] = { (char *)(save->name.c_str()), (char *)(save->Description.c_str()), (char *)(save->GetData()), (char *)(save->Published?"Public":"Private") }; + int postLengths[] = { save->name.length(), save->Description.length(), save->GetDataLength(), save->Published?6:7 }; + //std::cout << postNames[0] << " " << postDatas[0] << " " << postLengths[0] << std::endl; + data = http_multipart_post("http://" SERVER "/Save.api", postNames, postDatas, postLengths, (char *)(userIDStream.str().c_str()), NULL, (char *)(authUser.SessionID.c_str()), &dataStatus, &dataLength); + } + else + { + lastError = "Not authenticated"; + return RequestFailure; + } + if(data && dataStatus == 200) + { + if(strncmp((const char *)data, "OK", 2)!=0) + { + free(data); + lastError = std::string((const char *)data); + return RequestFailure; + } + else + { + int tempID; + std::stringstream saveIDStream((char *)(data+3)); + saveIDStream >> tempID; + if(!tempID) + { + lastError = "Server did not return Save ID"; + return RequestFailure; + } + else + { + save->id = tempID; + } + } + free(data); + return RequestOkay; + } + else if(data) + { + free(data); + } + return RequestFailure; +} + RequestStatus Client::ExecVote(int saveID, int direction) { lastError = ""; @@ -83,7 +137,6 @@ RequestStatus Client::ExecVote(int saveID, int direction) lastError = "Not authenticated"; return RequestFailure; } - std::cout << data << std::endl; if(data && dataStatus == 200) { if(strncmp((const char *)data, "OK", 2)!=0) diff --git a/src/client/Client.h b/src/client/Client.h index 89c4e64..0587d79 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -38,6 +38,7 @@ public: ~Client(); RequestStatus ExecVote(int saveID, int direction); + RequestStatus UploadSave(Save * save); unsigned char * GetSaveData(int saveID, int saveDate, int & dataLength); LoginStatus Login(string username, string password, User & user); diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 65556db..fd3572f 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -9,6 +9,7 @@ #include "render/RenderController.h" #include "login/LoginController.h" #include "interface/Point.h" +#include "dialogues/ErrorMessage.h" using namespace std; @@ -50,10 +51,26 @@ public: } }; +class GameController::SSaveCallback: public ControllerCallback +{ + GameController * cc; +public: + SSaveCallback(GameController * cc_) { cc = cc_; } + virtual void ControllerExit() + { + if(cc->ssave->GetSaveUploaded()) + { + cc->gameModel->SetSave(new Save(*(cc->ssave->GetSave()))); + } + //cc->gameModel->SetUser(cc->loginWindow->GetUser()); + } +}; + GameController::GameController(): search(NULL), renderOptions(NULL), - loginWindow(NULL) + loginWindow(NULL), + ssave(NULL) { gameView = new GameView(); gameModel = new GameModel(); @@ -267,7 +284,28 @@ void GameController::OpenRenderOptions() void GameController::OpenSaveWindow() { - //TODO: Implement + if(gameModel->GetUser().ID) + { + if(gameModel->GetSave()) + { + Save tempSave(*gameModel->GetSave()); + int tempSaveLength; + tempSave.SetData(gameModel->GetSimulation()->Save(tempSaveLength)); + ssave = new SSaveController(new SSaveCallback(this), tempSave); + } + else + { + Save tempSave(0, 0, 0, 0, gameModel->GetUser().Username, ""); + int tempSaveLength; + tempSave.SetData(gameModel->GetSimulation()->Save(tempSaveLength)); + ssave = new SSaveController(new SSaveCallback(this), tempSave); + } + ui::Engine::Ref().ShowWindow(ssave->GetView()); + } + else + { + new ErrorMessage("Error", "You need to login to upload saves."); + } } void GameController::Vote(int direction) diff --git a/src/game/GameController.h b/src/game/GameController.h index 7498e47..43c9bb2 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -9,6 +9,7 @@ #include "search/SearchController.h" #include "render/RenderController.h" #include "login/LoginController.h" +#include "ssave/SSaveController.h" #include "Menu.h" using namespace std; @@ -24,10 +25,12 @@ private: SearchController * search; RenderController * renderOptions; LoginController * loginWindow; + SSaveController * ssave; public: class LoginCallback; class SearchCallback; class RenderCallback; + class SSaveCallback; GameController(); ~GameController(); GameView * GetView(); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 9a2eb2d..560b1d5 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -340,6 +340,7 @@ void GameView::NotifySaveChanged(GameModel * sender) { if(sender->GetSave()) { + saveSimulationButton->SetText(sender->GetSave()->GetName()); reloadButton->Enabled = true; upVoteButton->Enabled = (sender->GetSave()->GetID() && sender->GetUser().ID && sender->GetSave()->GetVote()==0); if(sender->GetSave()->GetID() && sender->GetUser().ID && sender->GetSave()->GetVote()==1) @@ -355,6 +356,7 @@ void GameView::NotifySaveChanged(GameModel * sender) } else { + saveSimulationButton->SetText(""); reloadButton->Enabled = false; upVoteButton->Enabled = false; upVoteButton->SetBackgroundColour(ui::Colour(0, 0, 0)); @@ -420,7 +422,7 @@ void GameView::OnMouseWheel(int x, int y, int d) } } -void GameView::OnKeyPress(int key, bool shift, bool ctrl, bool alt) +void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { switch(key) { @@ -438,7 +440,7 @@ void GameView::OnKeyPress(int key, bool shift, bool ctrl, bool alt) } } -void GameView::OnKeyRelease(int key, bool shift, bool ctrl, bool alt) +void GameView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { //switch(key) //{ diff --git a/src/game/GameView.h b/src/game/GameView.h index 610b953..1cd69c0 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -56,10 +56,10 @@ public: virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); virtual void OnMouseWheel(int x, int y, int d); - virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); - virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); - //virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt) {} - //virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {} + virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + //virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) {} + //virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) {} virtual void OnTick(float dt); virtual void OnDraw(); class MenuAction; diff --git a/src/interface/Component.cpp b/src/interface/Component.cpp index 75e9c40..0efc2b1 100644 --- a/src/interface/Component.cpp +++ b/src/interface/Component.cpp @@ -94,11 +94,11 @@ void Component::Tick(float dt) { } -void Component::OnKeyPress(int key, bool shift, bool ctrl, bool alt) +void Component::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { } -void Component::OnKeyRelease(int key, bool shift, bool ctrl, bool alt) +void Component::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { } diff --git a/src/interface/Component.h b/src/interface/Component.h index 578aba6..2735736 100644 --- a/src/interface/Component.h +++ b/src/interface/Component.h @@ -56,8 +56,8 @@ namespace ui void OnMouseUnclick(int localx, int localy, unsigned int button); void OnMouseWheel(int localx, int localy, int d); void OnMouseWheelInside(int localx, int localy, int d); - void OnKeyPress(int key, bool shift, bool ctrl, bool alt); - void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); */ /// @@ -185,7 +185,7 @@ namespace ui // ctrl: Control key is down. // alt: Alternate key is down. /// - virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); /// // Called: When a key is released. @@ -195,7 +195,7 @@ namespace ui // ctrl: Control key is released. // alt: Alternate key is released. /// - virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); private: Window* parentstate_; diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index a822079..01a3e72 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -178,16 +178,16 @@ void Engine::Draw() g->Blit(); } -void Engine::onKeyPress(int key, bool shift, bool ctrl, bool alt) +void Engine::onKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { if(state_) - state_->DoKeyPress(key, shift, ctrl, alt); + state_->DoKeyPress(key, character, shift, ctrl, alt); } -void Engine::onKeyRelease(int key, bool shift, bool ctrl, bool alt) +void Engine::onKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { if(state_) - state_->DoKeyRelease(key, shift, ctrl, alt); + state_->DoKeyRelease(key, character, shift, ctrl, alt); } void Engine::onMouseClick(int x, int y, unsigned button) diff --git a/src/interface/Engine.h b/src/interface/Engine.h index 8f599b7..09fc222 100644 --- a/src/interface/Engine.h +++ b/src/interface/Engine.h @@ -29,8 +29,8 @@ namespace ui void onMouseClick(int x, int y, unsigned button); void onMouseUnclick(int x, int y, unsigned button); void onMouseWheel(int x, int y, int delta); - void onKeyPress(int key, bool shift, bool ctrl, bool alt); - void onKeyRelease(int key, bool shift, bool ctrl, bool alt); + void onKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + void onKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); void onResize(int newWidth, int newHeight); void onClose(); diff --git a/src/interface/Keys.h b/src/interface/Keys.h index 22fffa2..c0194ad 100644 --- a/src/interface/Keys.h +++ b/src/interface/Keys.h @@ -7,3 +7,8 @@ #define KEY_BACKSPACE SDLK_BACKSPACE #define KEY_DELETE SDLK_DELETE #define KEY_TAB SDLK_TAB + +#define KEY_MOD_CONTROL KMOD_CTRL +#define KEY_MOD_ALT KMOD_ALT +#define KEY_MOD_SHIFT KMOD_SHIFT + diff --git a/src/interface/Panel.cpp b/src/interface/Panel.cpp index acfcf53..d2de97e 100644 --- a/src/interface/Panel.cpp +++ b/src/interface/Panel.cpp @@ -116,14 +116,14 @@ void Panel::Tick(float dt) children[i]->Tick(dt); } -void Panel::OnKeyPress(int key, bool shift, bool ctrl, bool alt) +void Panel::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { - XOnKeyPress(key, shift, ctrl, alt); + XOnKeyPress(key, character, shift, ctrl, alt); } -void Panel::OnKeyRelease(int key, bool shift, bool ctrl, bool alt) +void Panel::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { - XOnKeyRelease(key, shift, ctrl, alt); + XOnKeyRelease(key, character, shift, ctrl, alt); } void Panel::OnMouseClick(int localx, int localy, unsigned button) @@ -339,11 +339,11 @@ void Panel::XTick(float dt) { } -void Panel::XOnKeyPress(int key, bool shift, bool ctrl, bool alt) +void Panel::XOnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { } -void Panel::XOnKeyRelease(int key, bool shift, bool ctrl, bool alt) +void Panel::XOnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { } diff --git a/src/interface/Panel.h b/src/interface/Panel.h index 51f52aa..a5d80e3 100644 --- a/src/interface/Panel.h +++ b/src/interface/Panel.h @@ -59,8 +59,8 @@ class Component; void OnMouseUnclick(int localx, int localy, unsigned button); void OnMouseWheel(int localx, int localy, int d); void OnMouseWheelInside(int localx, int localy, int d); - void OnKeyPress(int key, bool shift, bool ctrl, bool alt); - void OnKeyRelease(int key, bool shift, bool ctrl, bool alt); + void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); protected: // child components @@ -82,8 +82,8 @@ class Component; void XOnMouseUnclick(int localx, int localy, unsigned int button); void XOnMouseWheel(int localx, int localy, int d); void XOnMouseWheelInside(int localx, int localy, int d); - void XOnKeyPress(int key, bool shift, bool ctrl, bool alt); - void XOnKeyRelease(int key, bool shift, bool ctrl, bool alt); + void XOnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + void XOnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); */ // Overridable. Called by XComponent::Tick() @@ -127,10 +127,10 @@ class Component; virtual void XOnMouseWheelInside(int localx, int localy, int d); // Overridable. Called by XComponent::OnKeyPress() - virtual void XOnKeyPress(int key, bool shift, bool ctrl, bool alt); + virtual void XOnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); // Overridable. Called by XComponent::OnKeyRelease() - virtual void XOnKeyRelease(int key, bool shift, bool ctrl, bool alt); + virtual void XOnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); }; } diff --git a/src/interface/Textarea.cpp b/src/interface/Textarea.cpp new file mode 100644 index 0000000..fecc390 --- /dev/null +++ b/src/interface/Textarea.cpp @@ -0,0 +1,80 @@ +/* + * Textarea.cpp + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#include +#include "Textarea.h" + +using namespace ui; + +Textarea::Textarea(Point position, Point size, std::string textboxText): + Textbox(position, size, textboxText) +{ + updateMultiline(); +} + +void Textarea::SetText(std::string text) +{ + this->text = text; + updateMultiline(); +} + +void Textarea::updateMultiline() +{ + char * rawText = (char*)malloc(text.length()+1); + memcpy(rawText, text.c_str(), text.length()); + rawText[text.length()] = 0; + + int currentWidth = 0; + char * lastSpace = NULL; + char * currentWord = rawText; + char * nextSpace; + while(true) + { + nextSpace = strchr(currentWord+1, ' '); + if(nextSpace) + nextSpace[0] = 0; + int width = Graphics::textwidth(currentWord); + if(width+currentWidth > Size.X-6) + { + currentWidth = width; + currentWord[0] = '\n'; + } + else + currentWidth += width; + if(nextSpace) + nextSpace[0] = ' '; + if(!(currentWord = strchr(currentWord+1, ' '))) + break; + } + textLines = rawText; +} + +void Textarea::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + Textbox::OnKeyPress(key, character, shift, ctrl, alt); + updateMultiline(); +} + +void Textarea::Draw(const Point &screenPos) +{ + Graphics * g = ui::Engine::Ref().g; + if(IsFocused()) + { + g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); + g->drawtext(screenPos.X+3, screenPos.Y+3, textLines, 255, 255, 255, 255); + } + else + { + g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 160, 160, 160, 255); + g->drawtext(screenPos.X+3, screenPos.Y+3, textLines, 160, 160, 160, 255); + } +} + +Textarea::~Textarea() { + // TODO Auto-generated destructor stub +} + diff --git a/src/interface/Textarea.h b/src/interface/Textarea.h new file mode 100644 index 0000000..c5529d6 --- /dev/null +++ b/src/interface/Textarea.h @@ -0,0 +1,33 @@ +/* + * Textarea.h + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#ifndef TEXTAREA_H_ +#define TEXTAREA_H_ + +#include +#include +#include +#include "Textbox.h" + +namespace ui +{ + +class Textarea: public ui::Textbox +{ + void updateMultiline(); + std::string textLines; +public: + Textarea(Point position, Point size, std::string textboxText); + virtual void TextPosition() {} + virtual void SetText(std::string text); + virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void Draw(const Point& screenPos); + virtual ~Textarea(); +}; +} + +#endif /* TEXTAREA_H_ */ diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp index 328ccb5..1a54992 100644 --- a/src/interface/Textbox.cpp +++ b/src/interface/Textbox.cpp @@ -9,19 +9,6 @@ using namespace ui; -Textbox::Textbox(Window* parent_state, std::string textboxText): - Component(parent_state), - text(textboxText), - textPosition(ui::Point(0, 0)), - textVAlign(AlignMiddle), - textHAlign(AlignCentre), - actionCallback(NULL), - masked(false) -{ - TextPosition(); - cursor = text.length(); -} - Textbox::Textbox(Point position, Point size, std::string textboxText): Component(position, size), text(textboxText), @@ -35,19 +22,6 @@ Textbox::Textbox(Point position, Point size, std::string textboxText): cursor = text.length(); } -Textbox::Textbox(std::string textboxText): - Component(), - text(textboxText), - textPosition(ui::Point(0, 0)), - textVAlign(AlignMiddle), - textHAlign(AlignCentre), - actionCallback(NULL), - masked(false) -{ - TextPosition(); - cursor = text.length(); -} - Textbox::~Textbox() { if(actionCallback) @@ -105,7 +79,7 @@ std::string Textbox::GetText() return text; } -void Textbox::OnKeyPress(int key, bool shift, bool ctrl, bool alt) +void Textbox::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { bool changed = false; try @@ -152,22 +126,20 @@ void Textbox::OnKeyPress(int key, bool shift, bool ctrl, bool alt) changed = true; } break; - default: - if(key >= ' ' && key < 127) + } + if(character >= ' ' && character < 127) + { + if(cursor == text.length()) { - if(cursor == text.length()) - { - text += key; - //std::cout << key << std::endl; - } - else - { - text.insert(cursor, 1, (char)key); - } - cursor++; - changed = true; + text += character; + //std::cout << key << std::endl; } - break; + else + { + text.insert(cursor, 1, (char)character); + } + cursor++; + changed = true; } if(changed && actionCallback) { diff --git a/src/interface/Textbox.h b/src/interface/Textbox.h index 82ed648..ac138f4 100644 --- a/src/interface/Textbox.h +++ b/src/interface/Textbox.h @@ -17,6 +17,7 @@ public: }; class Textbox : public Component { +protected: std::string text; ui::Point textPosition; HorizontalAlignment textHAlign; @@ -25,19 +26,17 @@ class Textbox : public Component TextboxAction *actionCallback; bool masked; public: - Textbox(Window* parent_state, std::string textboxText); Textbox(Point position, Point size, std::string textboxText); - Textbox(std::string textboxText); virtual ~Textbox(); - void TextPosition(); - void SetText(std::string text); + virtual void TextPosition(); + virtual void SetText(std::string text); std::string GetText(); HorizontalAlignment GetHAlignment() { return textHAlign; } VerticalAlignment GetVAlignment() { return textVAlign; } void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign) { textHAlign = hAlign; textVAlign = vAlign; TextPosition(); } void SetActionCallback(TextboxAction * action) { actionCallback = action; } - virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); void SetHidden(bool hidden) { masked = hidden; } bool GetHidden() { return masked; } diff --git a/src/interface/Window.cpp b/src/interface/Window.cpp index b399ab8..5b603b9 100644 --- a/src/interface/Window.cpp +++ b/src/interface/Window.cpp @@ -140,28 +140,28 @@ void Window::DoTick(float dt) OnTick(dt); } -void Window::DoKeyPress(int key, bool shift, bool ctrl, bool alt) +void Window::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { //on key press if(focusedComponent_ != NULL) { if(!focusedComponent_->Locked) - focusedComponent_->OnKeyPress(key, shift, ctrl, alt); + focusedComponent_->OnKeyPress(key, character, shift, ctrl, alt); } - OnKeyPress(key, shift, ctrl, alt); + OnKeyPress(key, character, shift, ctrl, alt); } -void Window::DoKeyRelease(int key, bool shift, bool ctrl, bool alt) +void Window::DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { //on key unpress if(focusedComponent_ != NULL) { if(!focusedComponent_->Locked) - focusedComponent_->OnKeyRelease(key, shift, ctrl, alt); + focusedComponent_->OnKeyRelease(key, character, shift, ctrl, alt); } - OnKeyRelease(key, shift, ctrl, alt); + OnKeyRelease(key, character, shift, ctrl, alt); } void Window::DoMouseDown(int x_, int y_, unsigned button) diff --git a/src/interface/Window.h b/src/interface/Window.h index 4fc2b14..5fb5eec 100644 --- a/src/interface/Window.h +++ b/src/interface/Window.h @@ -55,8 +55,8 @@ enum ChromeStyle virtual void DoMouseDown(int x, int y, unsigned button); virtual void DoMouseUp(int x, int y, unsigned button); virtual void DoMouseWheel(int x, int y, int d); - virtual void DoKeyPress(int key, bool shift, bool ctrl, bool alt); - virtual void DoKeyRelease(int key, bool shift, bool ctrl, bool alt); + virtual void DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); bool IsFocused(const Component* c) const; void FocusComponent(Component* c); @@ -73,8 +73,8 @@ enum ChromeStyle virtual void OnMouseDown(int x, int y, unsigned button) {} virtual void OnMouseUp(int x, int y, unsigned button) {} virtual void OnMouseWheel(int x, int y, int d) {} - virtual void OnKeyPress(int key, bool shift, bool ctrl, bool alt) {} - virtual void OnKeyRelease(int key, bool shift, bool ctrl, bool alt) {} + virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) {} + virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) {} std::vector Components; Component* focusedComponent_; ChromeStyle chrome; diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index efd33ac..6fa9748 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -21,7 +21,9 @@ public: SearchController::SearchController(ControllerCallback * callback): activePreview(NULL), - HasExited(false) + HasExited(false), + nextQueryTime(0.0f), + nextQueryDone(true) { searchModel = new SearchModel(); searchView = new SearchView(); @@ -43,6 +45,11 @@ Save * SearchController::GetLoadedSave() void SearchController::Update() { + if(!nextQueryDone && nextQueryTime < clock()) + { + nextQueryDone = true; + searchModel->UpdateSaveList(1, nextQuery); + } searchModel->Update(); if(activePreview && activePreview->HasExited) { @@ -79,7 +86,10 @@ SearchController::~SearchController() void SearchController::DoSearch(std::string query) { - searchModel->UpdateSaveList(1, query); + nextQuery = query; + nextQueryTime = clock()+(0.6 * CLOCKS_PER_SEC); + nextQueryDone = false; + //searchModel->UpdateSaveList(1, query); } void SearchController::PrevPage() diff --git a/src/search/SearchController.h b/src/search/SearchController.h index e015648..cf34830 100644 --- a/src/search/SearchController.h +++ b/src/search/SearchController.h @@ -17,6 +17,10 @@ private: SearchView * searchView; PreviewController * activePreview; ControllerCallback * callback; + + double nextQueryTime; + std::string nextQuery; + bool nextQueryDone; public: class OpenCallback; bool HasExited; diff --git a/src/simulation/Gravity.cpp b/src/simulation/Gravity.cpp index 43ca8e6..d2d7295 100644 --- a/src/simulation/Gravity.cpp +++ b/src/simulation/Gravity.cpp @@ -124,6 +124,7 @@ void Gravity::gravity_update_async() void *Gravity::update_grav_async_helper(void * context) { ((Gravity *)context)->update_grav_async(); + return NULL; } void Gravity::update_grav_async() diff --git a/src/ssave/SSaveController.cpp b/src/ssave/SSaveController.cpp new file mode 100644 index 0000000..191a18c --- /dev/null +++ b/src/ssave/SSaveController.cpp @@ -0,0 +1,55 @@ +/* + * SSaveController.cpp + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#include "SSaveController.h" + +SSaveController::SSaveController(ControllerCallback * callback, Save save): + HasExited(false) +{ + ssaveView = new SSaveView(); + ssaveView->AttachController(this); + ssaveModel = new SSaveModel(); + ssaveModel->AddObserver(ssaveView); + ssaveModel->SetSave(new Save(save)); + + this->callback = callback; +} + +void SSaveController::UploadSave(std::string saveName, std::string saveDescription, bool publish) +{ + ssaveModel->UploadSave(saveName, saveDescription, publish); +} + +Save * SSaveController::GetSave() +{ + return ssaveModel->GetSave(); +} + +bool SSaveController::GetSaveUploaded() +{ + return ssaveModel->GetSaveUploaded(); +} + +void SSaveController::Update() +{ + ssaveModel->Update(); +} + +void SSaveController::Exit() +{ + if(ui::Engine::Ref().GetWindow() == ssaveView) + ui::Engine::Ref().CloseWindow(); + if(callback) + callback->ControllerExit(); + HasExited = true; +} + +SSaveController::~SSaveController() { + if(ui::Engine::Ref().GetWindow() == ssaveView) + ui::Engine::Ref().CloseWindow(); +} + diff --git a/src/ssave/SSaveController.h b/src/ssave/SSaveController.h new file mode 100644 index 0000000..d1b2388 --- /dev/null +++ b/src/ssave/SSaveController.h @@ -0,0 +1,34 @@ +/* + * SSaveController.h + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#ifndef SSAVECONTROLLER_H_ +#define SSAVECONTROLLER_H_ + +#include "SSaveModel.h" +#include "SSaveView.h" +#include "Controller.h" +#include "search/Save.h" + +class SSaveView; +class SSaveModel; +class SSaveController { + SSaveView * ssaveView; + SSaveModel * ssaveModel; + ControllerCallback * callback; +public: + bool HasExited; + SSaveController(ControllerCallback * callback, Save save); + Save * GetSave(); + bool GetSaveUploaded(); + void Exit(); + void Update(); + void UploadSave(std::string saveName, std::string saveDescription, bool publish); + SSaveView * GetView() { return ssaveView; } + virtual ~SSaveController(); +}; + +#endif /* SSAVECONTROLLER_H_ */ diff --git a/src/ssave/SSaveModel.cpp b/src/ssave/SSaveModel.cpp new file mode 100644 index 0000000..820c185 --- /dev/null +++ b/src/ssave/SSaveModel.cpp @@ -0,0 +1,85 @@ +/* + * SSaveModel.cpp + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#include "SSaveModel.h" +#include "client/Client.h" + +SSaveModel::SSaveModel(): + save(NULL), + saveUploaded(false) +{ + // TODO Auto-generated constructor stub + +} + +void SSaveModel::notifySaveChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifySaveChanged(this); + } +} + +void SSaveModel::notifySaveUploadChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifySaveUploadChanged(this); + } +} + +void SSaveModel::UploadSave(std::string saveName, std::string saveDescription, bool publish) +{ + save->name = saveName; + save->Description = saveDescription; + save->Published = publish; + saveUploaded = false; + notifySaveUploadChanged(); + + if(Client::Ref().UploadSave(save) == RequestOkay) + { + saveUploaded = true; + } + else + { + saveUploaded = false; + } + notifySaveUploadChanged(); +} + +void SSaveModel::SetSave(Save * save) +{ + this->save = save; + notifySaveChanged(); +} + +Save * SSaveModel::GetSave() +{ + return this->save; +} + +bool SSaveModel::GetSaveUploaded() +{ + return saveUploaded; +} + +void SSaveModel::AddObserver(SSaveView * observer) +{ + observers.push_back(observer); + observer->NotifySaveChanged(this); + observer->NotifySaveUploadChanged(this); +} + +void SSaveModel::Update() +{ + +} + +SSaveModel::~SSaveModel() { + delete save; +} + diff --git a/src/ssave/SSaveModel.h b/src/ssave/SSaveModel.h new file mode 100644 index 0000000..b2631bb --- /dev/null +++ b/src/ssave/SSaveModel.h @@ -0,0 +1,36 @@ +/* + * SSaveModel.h + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#ifndef SSAVEMODEL_H_ +#define SSAVEMODEL_H_ + +#include + +#include "SSaveView.h" +#include "search/Save.h" + +using namespace std; + +class SSaveView; +class SSaveModel { + vector observers; + Save * save; + void notifySaveChanged(); + void notifySaveUploadChanged(); + bool saveUploaded; +public: + SSaveModel(); + void AddObserver(SSaveView * observer); + void Update(); + Save * GetSave(); + void SetSave(Save * save); + void UploadSave(std::string saveName, std::string saveDescription, bool publish); + bool GetSaveUploaded(); + virtual ~SSaveModel(); +}; + +#endif /* SSAVEMODEL_H_ */ diff --git a/src/ssave/SSaveView.cpp b/src/ssave/SSaveView.cpp new file mode 100644 index 0000000..8a4a482 --- /dev/null +++ b/src/ssave/SSaveView.cpp @@ -0,0 +1,92 @@ +/* + * SSaveView.cpp + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#include "SSaveView.h" + +SSaveView::SSaveView(): + ui::Window(ui::Point(-1, -1), ui::Point(200, 200)), + publishCheckbox(NULL), + saveButton(NULL), + closeButton(NULL), + nameField(NULL), + titleLabel(NULL), + descriptionField(NULL) +{ + titleLabel = new ui::Label(ui::Point(2, 1), ui::Point(Size.X-4, 16), "Save to Server"); + titleLabel->SetAlignment(AlignLeft, AlignBottom); + AddComponent(titleLabel); + + nameField = new ui::Textbox(ui::Point(4, 18), ui::Point(Size.X-8, 16), ""); + nameField->SetAlignment(AlignLeft, AlignBottom); + AddComponent(nameField); + + descriptionField = new ui::Textarea(ui::Point(4, 54), ui::Point(Size.X-8, Size.Y-26-54), ""); + AddComponent(descriptionField); + + publishCheckbox = new ui::Checkbox(ui::Point(4, 36), ui::Point(Size.X-8, 16), "Publish"); + AddComponent(publishCheckbox); + + class CloseAction: public ui::ButtonAction + { + SSaveView * v; + public: + CloseAction(SSaveView * v_) { v = v_; }; + void ActionCallback(ui::Button * sender) + { + v->c->Exit(); + } + }; + closeButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(50, 16), "Cancel"); + closeButton->SetActionCallback(new CloseAction(this)); + AddComponent(closeButton); + + class SaveAction: public ui::ButtonAction + { + SSaveView * v; + public: + SaveAction(SSaveView * v_) { v = v_; }; + void ActionCallback(ui::Button * sender) + { + v->c->UploadSave(v->nameField->GetText(), "", v->publishCheckbox->GetChecked()); + } + }; + saveButton = new ui::Button(ui::Point(Size.X-50, Size.Y-16), ui::Point(50, 16), "Save"); + saveButton->SetActionCallback(new SaveAction(this)); + AddComponent(saveButton); +} + +void SSaveView::NotifySaveChanged(SSaveModel * sender) +{ + if(sender->GetSave()) + { + nameField->SetText(sender->GetSave()->GetName()); + publishCheckbox->SetChecked(sender->GetSave()->Published); + } + else + { + nameField->SetText(""); + //publishCheckbox->SetChecked(sender->GetSave()->GetPublished()); + } +} + +void SSaveView::NotifySaveUploadChanged(SSaveModel * sender) +{ + if(sender->GetSaveUploaded()) + c->Exit(); +} + +void SSaveView::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + + g->clearrect(Position.X, Position.Y, Size.X, Size.Y); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 200, 200, 200, 255); +} + +SSaveView::~SSaveView() { +} + diff --git a/src/ssave/SSaveView.h b/src/ssave/SSaveView.h new file mode 100644 index 0000000..f8e051d --- /dev/null +++ b/src/ssave/SSaveView.h @@ -0,0 +1,39 @@ +/* + * SSaveView.h + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#ifndef SSAVEVIEW_H_ +#define SSAVEVIEW_H_ + +#include "interface/Window.h" +#include "interface/Label.h" +#include "interface/Button.h" +#include "interface/Textbox.h" +#include "interface/Textarea.h" +#include "interface/Checkbox.h" +#include "SSaveModel.h" +#include "SSaveController.h" + +class SSaveController; +class SSaveModel; +class SSaveView: public ui::Window { + SSaveController * c; + ui::Checkbox * publishCheckbox; + ui::Button * saveButton; + ui::Button * closeButton; + ui::Textbox * nameField; + ui::Label * titleLabel; + ui::Textarea * descriptionField; +public: + SSaveView(); + void AttachController(SSaveController * c_) { c = c_; }; + void NotifySaveChanged(SSaveModel * sender); + void NotifySaveUploadChanged(SSaveModel * sender); + virtual void OnDraw(); + virtual ~SSaveView(); +}; + +#endif /* SSAVEVIEW_H_ */ -- cgit v0.9.2-21-gd62e From 1d297cb57a338f2a9e34d0f16642afc6a83c1041 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 30 Jan 2012 16:03:18 +0000 Subject: Line and rect drawing diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 5375d64..b87b724 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -1761,7 +1761,8 @@ Renderer::Renderer(Graphics * g, Simulation * sim): zoomWindowPosition(0, 0), zoomScopePosition(0, 0), zoomScopeSize(10), - ZFACTOR(8) + ZFACTOR(8), + zoomEnabled(false) { this->g = g; this->sim = sim; diff --git a/src/game/Brush.h b/src/game/Brush.h index 9daf721..617f7df 100644 --- a/src/game/Brush.h +++ b/src/game/Brush.h @@ -35,8 +35,29 @@ public: if(bitmap) delete bitmap; } + virtual void RenderRect(Graphics * g, ui::Point position1, ui::Point position2) + { + int width, height, t; + width = position2.X-position1.X; + height = position2.Y-position1.Y; + if(height<0) + { + position1.Y += height; + height *= -1; + } + if(width<0) + { + position1.X += width; + width *= -1; + } + g->fillrect(position1.X-1, position1.Y-1, width+2, height+2, 255, 0, 255, 70); + } + virtual void RenderLine(Graphics * g, ui::Point position1, ui::Point position2) + { + g->blend_line(position1.X, position1.Y, position2.X, position2.Y, 255, 0, 255, 70); + } //Draw the brush outline onto the screen - virtual void Render(Graphics * g, ui::Point position) + virtual void RenderPoint(Graphics * g, ui::Point position) { g->fillrect(position.X-size.X-1, position.Y-size.Y-1, (size.X*2)+2, (size.Y*2)+2, 255, 0, 255, 70); } diff --git a/src/game/EllipseBrush.h b/src/game/EllipseBrush.h index 7e5825b..2f2f815 100644 --- a/src/game/EllipseBrush.h +++ b/src/game/EllipseBrush.h @@ -19,7 +19,7 @@ public: }; //Draw the brush outline onto the screen - virtual void Render(Graphics * g, ui::Point position) + virtual void RenderPoint(Graphics * g, ui::Point position) { if(!bitmap) GenerateBitmap(); diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index fd3572f..9e5f53b 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -147,10 +147,35 @@ ui::Point GameController::PointTranslate(ui::Point point) return point; } -void GameController::DrawPoints(queue & pointQueue) +void GameController::DrawRect(int toolSelection, ui::Point point1, ui::Point point2) { Simulation * sim = gameModel->GetSimulation(); - Tool * activeTool = gameModel->GetActiveTool(); + Tool * activeTool = gameModel->GetActiveTool(toolSelection); + Brush * cBrush = gameModel->GetBrush(); + if(!activeTool || !cBrush) + return; + activeTool->DrawRect(sim, cBrush, point1, point2); +} + +void GameController::DrawLine(int toolSelection, ui::Point point1, ui::Point point2) +{ + Simulation * sim = gameModel->GetSimulation(); + Tool * activeTool = gameModel->GetActiveTool(toolSelection); + Brush * cBrush = gameModel->GetBrush(); + if(!activeTool || !cBrush) + return; + activeTool->DrawLine(sim, cBrush, point1, point2); +} + +void GameController::DrawFill(int toolSelection, ui::Point point) +{ + +} + +void GameController::DrawPoints(int toolSelection, queue & pointQueue) +{ + Simulation * sim = gameModel->GetSimulation(); + Tool * activeTool = gameModel->GetActiveTool(toolSelection); Brush * cBrush = gameModel->GetBrush(); if(!activeTool || !cBrush) { @@ -249,9 +274,9 @@ void GameController::SetActiveMenu(Menu * menu) gameModel->SetActiveMenu(menu); } -void GameController::SetActiveTool(Tool * tool) +void GameController::SetActiveTool(int toolSelection, Tool * tool) { - gameModel->SetActiveTool(tool); + gameModel->SetActiveTool(toolSelection, tool); } void GameController::OpenSearch() diff --git a/src/game/GameController.h b/src/game/GameController.h index 43c9bb2..df5f9fc 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -38,12 +38,15 @@ public: void SetZoomPosition(ui::Point position); void AdjustBrushSize(int direction); void AdjustZoomSize(int direction); - void DrawPoints(queue & pointQueue); + void DrawPoints(int toolSelection, queue & pointQueue); + void DrawRect(int toolSelection, ui::Point point1, ui::Point point2); + void DrawLine(int toolSelection, ui::Point point1, ui::Point point2); + void DrawFill(int toolSelection, ui::Point point); void Update(); void SetPaused(bool pauseState); void SetPaused(); void SetActiveMenu(Menu * menu); - void SetActiveTool(Tool * tool); + void SetActiveTool(int toolSelection, Tool * tool); void OpenSearch(); void OpenLogin(); void OpenTags(); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 34cae1d..92224de 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -9,7 +9,7 @@ #include "client/Client.h" GameModel::GameModel(): - activeTool(NULL), + activeTools({NULL, NULL, NULL}), sim(NULL), ren(NULL), currentBrush(0), @@ -44,7 +44,9 @@ GameModel::GameModel(): brushList.push_back(new Brush(ui::Point(4, 4))); brushList.push_back(new EllipseBrush(ui::Point(4, 4))); - activeTool = new ElementTool(1, "TURD", 0, 0, 0); + activeTools[0] = new ElementTool(1, "TURD", 0, 0, 0); + activeTools[1] = new ElementTool(0, "TURD", 0, 0, 0); + //activeTool[1] = new ElementTool(0, "TURD", 0, 0, 0); } GameModel::~GameModel() @@ -63,8 +65,8 @@ GameModel::~GameModel() } delete sim; delete ren; - if(activeTool) - delete activeTool; + if(activeTools) + delete activeTools; } void GameModel::SetVote(int direction) @@ -131,15 +133,15 @@ Menu * GameModel::GetActiveMenu() return activeMenu; } -Tool * GameModel::GetActiveTool() +Tool * GameModel::GetActiveTool(int selection) { - return activeTool; + return activeTools[selection]; } -void GameModel::SetActiveTool(Tool * tool) +void GameModel::SetActiveTool(int selection, Tool * tool) { - activeTool = tool; - notifyActiveToolChanged(); + activeTools[selection] = tool; + notifyActiveToolsChanged(); } vector GameModel::GetMenuList() @@ -162,6 +164,7 @@ void GameModel::SetSave(Save * newSave) sim->Load(currentSave->GetData(), currentSave->GetDataLength()); } notifySaveChanged(); + notifyPausedChanged(); } Simulation * GameModel::GetSimulation() @@ -313,11 +316,11 @@ void GameModel::notifyToolListChanged() } } -void GameModel::notifyActiveToolChanged() +void GameModel::notifyActiveToolsChanged() { for(int i = 0; i < observers.size(); i++) { - observers[i]->NotifyActiveToolChanged(this); + observers[i]->NotifyActiveToolsChanged(this); } } diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 39c7f4a..0d7fc3f 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -18,6 +18,15 @@ class GameView; class Simulation; class Renderer; +class ToolSelection +{ +public: + enum + { + ToolPrimary, ToolSecondary, ToolTertiary + }; +}; + class GameModel { private: @@ -30,7 +39,7 @@ private: Save * currentSave; Simulation * sim; Renderer * ren; - Tool * activeTool; + Tool * activeTools[3]; User currentUser; //bool zoomEnabled; void notifyRendererChanged(); @@ -40,7 +49,7 @@ private: void notifyBrushChanged(); void notifyMenuListChanged(); void notifyToolListChanged(); - void notifyActiveToolChanged(); + void notifyActiveToolsChanged(); void notifyUserChanged(); void notifyZoomChanged(); public: @@ -52,8 +61,8 @@ public: Brush * GetBrush(); void SetSave(Save * newSave); void AddObserver(GameView * observer); - Tool * GetActiveTool(); - void SetActiveTool(Tool * tool); + Tool * GetActiveTool(int selection); + void SetActiveTool(int selection, Tool * tool); bool GetPaused(); void SetPaused(bool pauseState); void ClearSimulation(); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 560b1d5..e46ae21 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -11,7 +11,14 @@ GameView::GameView(): isMouseDown(false), ren(NULL), activeBrush(NULL), - currentMouse(0, 0) + currentMouse(0, 0), + toolIndex(0), + zoomEnabled(false), + zoomCursorFixed(false), + drawPoint1(0, 0), + drawPoint2(0, 0), + drawMode(DrawPoints), + drawModeReset(false) { int currentX = 1; //Set up UI @@ -207,9 +214,11 @@ class GameView::ToolAction: public ui::ButtonAction public: Tool * tool; ToolAction(GameView * _v, Tool * tool_) { v = _v; tool = tool_; } - void ActionCallback(ui::Button * sender) + void ActionCallback(ui::Button * sender_) { - v->c->SetActiveTool(tool); + ToolButton *sender = (ToolButton*)sender_; + if(sender->GetSelectionState() >= 0 && sender->GetSelectionState() <= 2) + v->c->SetActiveTool(sender->GetSelectionState(), tool); } }; @@ -242,17 +251,26 @@ void GameView::NotifyMenuListChanged(GameModel * sender) } } -void GameView::NotifyActiveToolChanged(GameModel * sender) +void GameView::NotifyActiveToolsChanged(GameModel * sender) { for(int i = 0; i < toolButtons.size(); i++) { - if(((ToolAction*)toolButtons[i]->GetActionCallback())->tool==sender->GetActiveTool()) + Tool * tool = ((ToolAction*)toolButtons[i]->GetActionCallback())->tool; + if(sender->GetActiveTool(0) == tool) + { + toolButtons[i]->SetSelectionState(0); //Primary + } + else if(sender->GetActiveTool(1) == tool) + { + toolButtons[i]->SetSelectionState(1); //Secondary + } + else if(sender->GetActiveTool(2) == tool) { - toolButtons[i]->SetToggleState(true); + toolButtons[i]->SetSelectionState(2); //Tertiary } else { - toolButtons[i]->SetToggleState(false); + toolButtons[i]->SetSelectionState(-1); } } } @@ -281,25 +299,24 @@ void GameView::NotifyToolListChanged(GameModel * sender) vector toolList = sender->GetToolList(); for(int i = 0; i < toolList.size(); i++) { - ui::Button * tempButton = new ui::Button(ui::Point(currentX, YRES), ui::Point(32, 16), toolList[i]->GetName()); + ToolButton * tempButton = new ToolButton(ui::Point(currentX, YRES), ui::Point(32, 16), toolList[i]->GetName()); currentX -= 36; - tempButton->SetTogglable(true); tempButton->SetActionCallback(new ToolAction(this, toolList[i])); - totalColour = toolList[i]->colRed + 3*toolList[i]->colGreen + 2*toolList[i]->colBlue; - tempButton->SetBackgroundColour(ui::Colour(toolList[i]->colRed, toolList[i]->colGreen, toolList[i]->colBlue)); - if (totalColour<544) + + if(sender->GetActiveTool(0) == toolList[i]) { - tempButton->SetTextColour(ui::Colour(255, 255, 255)); + tempButton->SetSelectionState(0); //Primary } - else + else if(sender->GetActiveTool(1) == toolList[i]) { - tempButton->SetTextColour(ui::Colour(0, 0, 0)); + tempButton->SetSelectionState(1); //Secondary + } + else if(sender->GetActiveTool(2) == toolList[i]) + { + tempButton->SetSelectionState(2); //Tertiary } - tempButton->SetBorderColour(ui::Colour(0, 0, 0)); - tempButton->SetActiveBackgroundColour(ui::Colour(toolList[i]->colRed, toolList[i]->colGreen, toolList[i]->colBlue)); - tempButton->SetActiveBorderColour(ui::Colour(0, 0, 255)); tempButton->SetAlignment(AlignCentre, AlignBottom); AddComponent(tempButton); @@ -374,7 +391,7 @@ void GameView::NotifyBrushChanged(GameModel * sender) void GameView::OnMouseMove(int x, int y, int dx, int dy) { currentMouse = ui::Point(x, y); - if(isMouseDown) + if(isMouseDown && drawMode == DrawPoints) { pointQueue.push(new ui::Point(x-dx, y-dy)); pointQueue.push(new ui::Point(x, y)); @@ -385,8 +402,21 @@ void GameView::OnMouseDown(int x, int y, unsigned button) { if(currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES && !(zoomEnabled && !zoomCursorFixed)) { + if(button == BUTTON_LEFT) + toolIndex = 0; + if(button == BUTTON_RIGHT) + toolIndex = 1; + if(button == BUTTON_MIDDLE) + toolIndex = 2; isMouseDown = true; - pointQueue.push(new ui::Point(x, y)); + if(drawMode == DrawRect || drawMode == DrawLine) + { + drawPoint1 = ui::Point(x, y); + } + if(drawMode == DrawPoints) + { + pointQueue.push(new ui::Point(x, y)); + } } } @@ -399,7 +429,27 @@ void GameView::OnMouseUp(int x, int y, unsigned button) if(isMouseDown) { isMouseDown = false; - pointQueue.push(new ui::Point(x, y)); + if(drawMode == DrawRect || drawMode == DrawLine) + { + drawPoint2 = ui::Point(x, y); + if(drawMode == DrawRect) + { + c->DrawRect(toolIndex, drawPoint1, drawPoint2); + } + if(drawMode == DrawLine) + { + c->DrawLine(toolIndex, drawPoint1, drawPoint2); + } + } + if(drawMode == DrawPoints) + { + pointQueue.push(new ui::Point(x, y)); + } + if(drawModeReset) + { + drawModeReset = false; + drawMode = DrawPoints; + } } } } @@ -426,6 +476,26 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool { switch(key) { + case KEY_CTRL: + if(drawModeReset) + drawModeReset = false; + else + drawPoint1 = currentMouse; + if(shift) + drawMode = DrawFill; + else + drawMode = DrawRect; + break; + case KEY_SHIFT: + if(drawModeReset) + drawModeReset = false; + else + drawPoint1 = currentMouse; + if(ctrl) + drawMode = DrawFill; + else + drawMode = DrawLine; + break; case ' ': //Space c->SetPaused(); break; @@ -442,26 +512,37 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool void GameView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { - //switch(key) - //{ - //case 'z': + if(!isMouseDown) + drawMode = DrawPoints; + else + drawModeReset = true; + switch(character) + { + case 'z': if(!zoomCursorFixed) c->SetZoomEnabled(false); - // break; - //} + break; + } } void GameView::OnTick(float dt) { if(zoomEnabled && !zoomCursorFixed) c->SetZoomPosition(currentMouse); - if(isMouseDown) + if(drawMode == DrawPoints) { - pointQueue.push(new ui::Point(currentMouse)); + if(isMouseDown) + { + pointQueue.push(new ui::Point(currentMouse)); + } + if(!pointQueue.empty()) + { + c->DrawPoints(toolIndex, pointQueue); + } } - if(!pointQueue.empty()) + if(drawMode == DrawFill) { - c->DrawPoints(pointQueue); + c->DrawFill(toolIndex, currentMouse); } c->Update(); } @@ -480,7 +561,18 @@ void GameView::OnDraw() ren->DrawWalls(); if(activeBrush && currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) { - activeBrush->Render(ui::Engine::Ref().g, c->PointTranslate(currentMouse)); + if(drawMode==DrawRect && isMouseDown) + { + activeBrush->RenderRect(ui::Engine::Ref().g, c->PointTranslate(drawPoint1), c->PointTranslate(currentMouse)); + } + else if(drawMode==DrawLine && isMouseDown) + { + activeBrush->RenderLine(ui::Engine::Ref().g, c->PointTranslate(drawPoint1), c->PointTranslate(currentMouse)); + } + else + { + activeBrush->RenderPoint(ui::Engine::Ref().g, c->PointTranslate(currentMouse)); + } } ren->RenderZoom(); ren->DrawSigns(); diff --git a/src/game/GameView.h b/src/game/GameView.h index 1cd69c0..716147c 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -8,25 +8,33 @@ #include "interface/Window.h" #include "interface/Point.h" #include "interface/Button.h" +#include "ToolButton.h" #include "Brush.h" using namespace std; +enum DrawMode +{ + DrawPoints, DrawLine, DrawRect, DrawFill +}; + class GameController; class GameModel; class GameView: public ui::Window { private: + DrawMode drawMode; bool isMouseDown; bool zoomEnabled; bool zoomCursorFixed; + int toolIndex; queue pointQueue; GameController * c; Renderer * ren; Brush * activeBrush; //UI Elements vector menuButtons; - vector toolButtons; + vector toolButtons; ui::Button * searchButton; ui::Button * reloadButton; ui::Button * saveSimulationButton; @@ -39,6 +47,10 @@ private: ui::Button * displayModeButton; ui::Button * pauseButton; ui::Point currentMouse; + + bool drawModeReset; + ui::Point drawPoint1; + ui::Point drawPoint2; public: GameView(); void AttachController(GameController * _c){ c = _c; } @@ -49,7 +61,7 @@ public: void NotifyBrushChanged(GameModel * sender); void NotifyMenuListChanged(GameModel * sender); void NotifyToolListChanged(GameModel * sender); - void NotifyActiveToolChanged(GameModel * sender); + void NotifyActiveToolsChanged(GameModel * sender); void NotifyUserChanged(GameModel * sender); void NotifyZoomChanged(GameModel * sender); virtual void OnMouseMove(int x, int y, int dx, int dy); diff --git a/src/game/Tool.h b/src/game/Tool.h index 1cf8ce4..440ee62 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -48,7 +48,9 @@ public: virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { sim->create_line(position1.X, position1.Y, position2.X, position2.Y, 1, 1, toolID, 0, brush); } - virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {} + virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + sim->create_box(position1.X, position1.Y, position2.X, position2.Y, toolID, 0); + } }; #endif /* TOOL_H_ */ diff --git a/src/game/ToolButton.cpp b/src/game/ToolButton.cpp new file mode 100644 index 0000000..374d424 --- /dev/null +++ b/src/game/ToolButton.cpp @@ -0,0 +1,88 @@ +/* + * ToolButton.cpp + * + * Created on: Jan 30, 2012 + * Author: Simon + */ + +#include "ToolButton.h" +#include "interface/Keys.h" + +ToolButton::ToolButton(ui::Point position, ui::Point size, std::string text_): + ui::Button(position, size, text_) +{ + SetSelectionState(-1); +} + +void ToolButton::OnMouseClick(int x, int y, unsigned int button) +{ + isButtonDown = true; +} + +void ToolButton::OnMouseUp(int x, int y, unsigned int button) +{ + if(isButtonDown) + { + if(button == BUTTON_LEFT) + SetSelectionState(0); + if(button == BUTTON_RIGHT) + SetSelectionState(1); + if(button == BUTTON_MIDDLE) + SetSelectionState(2); + DoAction(); + } + isButtonDown = false; +} + +void ToolButton::Draw(const ui::Point& screenPos) +{ + Graphics * g = ui::Engine::Ref().g; + int totalColour = background.Red + 3*background.Green + 2*background.Blue; + + g->fillrect(screenPos.X, screenPos.Y, Size.X, Size.Y, background.Red, background.Green, background.Blue, 255); + + if (totalColour<544) + { + g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, ButtonText.c_str(), 255, 255, 255, 255); + } + else + { + g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, ButtonText.c_str(), 0, 0, 0, 255); + } + if(currentSelection!=-1) + { + //g->fillrect(screenPos.X+1, screenPos.Y+1, Size.X-2, Size.Y-2, 255, 255, 255, 170); + g->fillrect(screenPos.X+2, screenPos.Y+2, Size.Y-4, Size.Y-4, 0, 0, 0, 170); + g->drawtext(screenPos.X+5, screenPos.Y+4, selectionText, 255, 255, 255, 255); + } +} + +void ToolButton::SetSelectionState(int state) +{ + currentSelection = state; + switch(state) + { + case 0: + selectionText = "L"; + break; + case 1: + selectionText = "R"; + break; + case 2: + selectionText = "M"; + break; + default: + selectionText = ""; + break; + } +} + +int ToolButton::GetSelectionState() +{ + return currentSelection; +} + +ToolButton::~ToolButton() { + // TODO Auto-generated destructor stub +} + diff --git a/src/game/ToolButton.h b/src/game/ToolButton.h new file mode 100644 index 0000000..60a1c7c --- /dev/null +++ b/src/game/ToolButton.h @@ -0,0 +1,26 @@ +/* + * ToolButton.h + * + * Created on: Jan 30, 2012 + * Author: Simon + */ + +#ifndef TOOLBUTTON_H_ +#define TOOLBUTTON_H_ + +#include "interface/Button.h" + +class ToolButton: public ui::Button { + int currentSelection; + std::string selectionText; +public: + ToolButton(ui::Point position, ui::Point size, std::string text_); + virtual void OnMouseUp(int x, int y, unsigned int button); + virtual void OnMouseClick(int x, int y, unsigned int button); + virtual void Draw(const ui::Point& screenPos); + void SetSelectionState(int state); + int GetSelectionState(); + virtual ~ToolButton(); +}; + +#endif /* TOOLBUTTON_H_ */ diff --git a/src/interface/Keys.h b/src/interface/Keys.h index c0194ad..b5ae97b 100644 --- a/src/interface/Keys.h +++ b/src/interface/Keys.h @@ -8,7 +8,14 @@ #define KEY_DELETE SDLK_DELETE #define KEY_TAB SDLK_TAB +#define KEY_CTRL SDLK_LCTRL +#define KEY_ALT SDLK_LALT +#define KEY_SHIFT SDLK_LSHIFT + #define KEY_MOD_CONTROL KMOD_CTRL #define KEY_MOD_ALT KMOD_ALT #define KEY_MOD_SHIFT KMOD_SHIFT +#define BUTTON_LEFT SDL_BUTTON_LEFT +#define BUTTON_MIDDLE SDL_BUTTON_MIDDLE +#define BUTTON_RIGHT SDL_BUTTON_RIGHT -- cgit v0.9.2-21-gd62e From 857b0cc1fc58f066acd59404d16ee5e566e20f00 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 31 Jan 2012 18:49:14 +0000 Subject: Load user information from preferences, fps display for testing diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index a64270f..1886bde 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -73,6 +73,7 @@ SDL_Surface * SDLOpen() #endif SDL_WM_SetCaption("The Powder Toy", "Powder Toy"); + SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); atexit(SDL_Quit); return SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_SWSURFACE); } @@ -148,7 +149,7 @@ int main(int argc, char * argv[]) event.type = 0; //Clear last event } - engine->Tick(delta); + engine->Tick(); engine->Draw(); currentFrame++; @@ -177,6 +178,7 @@ int main(int argc, char * argv[]) delta = 1.0f; } } + engine->SetFps(fps); } ui::Engine::Ref().CloseWindow(); delete gameController; diff --git a/src/Renderer.cpp b/src/Renderer.cpp index b87b724..fc5f909 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -1826,6 +1826,12 @@ void Renderer::RemoveRenderMode(unsigned int mode) CompileRenderMode(); } +void Renderer::SetRenderMode(std::vector render) +{ + render_modes = render; + CompileRenderMode(); +} + void Renderer::CompileDisplayMode() { display_mode = 0; @@ -1859,6 +1865,12 @@ void Renderer::RemoveDisplayMode(unsigned int mode) CompileDisplayMode(); } +void Renderer::SetDisplayMode(std::vector display) +{ + display_modes = display; + CompileDisplayMode(); +} + void Renderer::SetColourMode(unsigned int mode) { colour_mode = mode; diff --git a/src/Renderer.h b/src/Renderer.h index 9ed7dbb..b61e8fa 100644 --- a/src/Renderer.h +++ b/src/Renderer.h @@ -3,6 +3,7 @@ #include #include "Config.h" +#include "client/Client.h" #include "simulation/Simulation.h" #include "Graphics.h" #include "interface/Point.h" @@ -69,9 +70,11 @@ public: void CompileDisplayMode(); void CompileRenderMode(); void AddRenderMode(unsigned int mode); + void SetRenderMode(std::vector render); void RemoveRenderMode(unsigned int mode); void AddDisplayMode(unsigned int mode); void RemoveDisplayMode(unsigned int mode); + void SetDisplayMode(std::vector display); void SetColourMode(unsigned int mode); Renderer(Graphics * g, Simulation * sim); diff --git a/src/cajun/elements.cpp b/src/cajun/elements.cpp new file mode 100644 index 0000000..a913f8a --- /dev/null +++ b/src/cajun/elements.cpp @@ -0,0 +1,403 @@ +/****************************************************************************** + +Copyright (c) 2009-2010, Terry Caton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the projecct nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + +#include +#include +#include +#include "visitor.h" +#include "reader.h" + +/* + +TODO: +* better documentation + +*/ + +namespace json +{ + + +inline Exception::Exception(const std::string& sMessage) : + std::runtime_error(sMessage) {} + + +///////////////////////// +// UnknownElement members + +class UnknownElement::Imp +{ +public: + virtual ~Imp() {} + virtual Imp* Clone() const = 0; + + virtual bool Compare(const Imp& imp) const = 0; + + virtual void Accept(ConstVisitor& visitor) const = 0; + virtual void Accept(Visitor& visitor) = 0; +}; + + +template +class UnknownElement::Imp_T : public UnknownElement::Imp +{ +public: + Imp_T(const ElementTypeT& element) : m_Element(element) {} + virtual Imp* Clone() const { return new Imp_T(*this); } + + virtual void Accept(ConstVisitor& visitor) const { visitor.Visit(m_Element); } + virtual void Accept(Visitor& visitor) { visitor.Visit(m_Element); } + + virtual bool Compare(const Imp& imp) const + { + ConstCastVisitor_T castVisitor; + imp.Accept(castVisitor); + return castVisitor.m_pElement && + m_Element == *castVisitor.m_pElement; + } + +private: + ElementTypeT m_Element; +}; + + +class UnknownElement::ConstCastVisitor : public ConstVisitor +{ + virtual void Visit(const Array& array) {} + virtual void Visit(const Object& object) {} + virtual void Visit(const Number& number) {} + virtual void Visit(const String& string) {} + virtual void Visit(const Boolean& boolean) {} + virtual void Visit(const Null& null) {} +}; + +template +class UnknownElement::ConstCastVisitor_T : public ConstCastVisitor +{ +public: + ConstCastVisitor_T() : m_pElement(0) {} + virtual void Visit(const ElementTypeT& element) { m_pElement = &element; } // we don't know what this is, but it overrides one of the base's no-op functions + const ElementTypeT* m_pElement; +}; + + +class UnknownElement::CastVisitor : public Visitor +{ + virtual void Visit(Array& array) {} + virtual void Visit(Object& object) {} + virtual void Visit(Number& number) {} + virtual void Visit(String& string) {} + virtual void Visit(Boolean& boolean) {} + virtual void Visit(Null& null) {} +}; + +template +class UnknownElement::CastVisitor_T : public CastVisitor +{ +public: + CastVisitor_T() : m_pElement(0) {} + virtual void Visit(ElementTypeT& element) { m_pElement = &element; } // we don't know what this is, but it overrides one of the base's no-op functions + ElementTypeT* m_pElement; +}; + + + + +inline UnknownElement::UnknownElement() : m_pImp( new Imp_T( Null() ) ) {} +inline UnknownElement::UnknownElement(const UnknownElement& unknown) : m_pImp( unknown.m_pImp->Clone()) {} +inline UnknownElement::UnknownElement(const Object& object) : m_pImp( new Imp_T(object) ) {} +inline UnknownElement::UnknownElement(const Array& array) : m_pImp( new Imp_T(array) ) {} +inline UnknownElement::UnknownElement(const Number& number) : m_pImp( new Imp_T(number) ) {} +inline UnknownElement::UnknownElement(const Boolean& boolean) : m_pImp( new Imp_T(boolean) ) {} +inline UnknownElement::UnknownElement(const String& string) : m_pImp( new Imp_T(string) ) {} +inline UnknownElement::UnknownElement(const Null& null) : m_pImp( new Imp_T(null) ) {} + +inline UnknownElement::~UnknownElement() { delete m_pImp; } + +inline UnknownElement::operator const Object& () const { return CastTo(); } +inline UnknownElement::operator const Array& () const { return CastTo(); } +inline UnknownElement::operator const Number& () const { return CastTo(); } +inline UnknownElement::operator const Boolean& () const { return CastTo(); } +inline UnknownElement::operator const String& () const { return CastTo(); } +inline UnknownElement::operator const Null& () const { return CastTo(); } + +inline UnknownElement::operator Object& () { return ConvertTo(); } +inline UnknownElement::operator Array& () { return ConvertTo(); } +inline UnknownElement::operator Number& () { return ConvertTo(); } +inline UnknownElement::operator Boolean& () { return ConvertTo(); } +inline UnknownElement::operator String& () { return ConvertTo(); } +inline UnknownElement::operator Null& () { return ConvertTo(); } + +inline UnknownElement& UnknownElement::operator = (const UnknownElement& unknown) +{ + // always check for this + if (&unknown != this) + { + // we might be copying from a subtree of ourselves. delete the old imp + // only after the clone operation is complete. yes, this could be made + // more efficient, but isn't worth the complexity + Imp* pOldImp = m_pImp; + m_pImp = unknown.m_pImp->Clone(); + delete pOldImp; + } + + return *this; +} + +inline UnknownElement& UnknownElement::operator[] (const std::string& key) +{ + // the people want an object. make us one if we aren't already + Object& object = ConvertTo(); + return object[key]; +} + +inline const UnknownElement& UnknownElement::operator[] (const std::string& key) const +{ + // throws if we aren't an object + const Object& object = CastTo(); + return object[key]; +} + +inline UnknownElement& UnknownElement::operator[] (size_t index) +{ + // the people want an array. make us one if we aren't already + Array& array = ConvertTo(); + return array[index]; +} + +inline const UnknownElement& UnknownElement::operator[] (size_t index) const +{ + // throws if we aren't an array + const Array& array = CastTo(); + return array[index]; +} + + +template +const ElementTypeT& UnknownElement::CastTo() const +{ + ConstCastVisitor_T castVisitor; + m_pImp->Accept(castVisitor); + if (castVisitor.m_pElement == 0) + throw Exception("Bad cast"); + return *castVisitor.m_pElement; +} + + + +template +ElementTypeT& UnknownElement::ConvertTo() +{ + CastVisitor_T castVisitor; + m_pImp->Accept(castVisitor); + if (castVisitor.m_pElement == 0) + { + // we're not the right type. fix it & try again + *this = ElementTypeT(); + m_pImp->Accept(castVisitor); + } + + return *castVisitor.m_pElement; +} + + +inline void UnknownElement::Accept(ConstVisitor& visitor) const { m_pImp->Accept(visitor); } +inline void UnknownElement::Accept(Visitor& visitor) { m_pImp->Accept(visitor); } + + +inline bool UnknownElement::operator == (const UnknownElement& element) const +{ + return m_pImp->Compare(*element.m_pImp); +} + + + +////////////////// +// Object members + + +inline Object::Member::Member(const std::string& nameIn, const UnknownElement& elementIn) : + name(nameIn), element(elementIn) {} + +inline bool Object::Member::operator == (const Member& member) const +{ + return name == member.name && + element == member.element; +} + +class Object::Finder : public std::unary_function +{ +public: + Finder(const std::string& name) : m_name(name) {} + bool operator () (const Object::Member& member) { + return member.name == m_name; + } + +private: + std::string m_name; +}; + + + +inline Object::iterator Object::Begin() { return m_Members.begin(); } +inline Object::iterator Object::End() { return m_Members.end(); } +inline Object::const_iterator Object::Begin() const { return m_Members.begin(); } +inline Object::const_iterator Object::End() const { return m_Members.end(); } + +inline size_t Object::Size() const { return m_Members.size(); } +inline bool Object::Empty() const { return m_Members.empty(); } + +inline Object::iterator Object::Find(const std::string& name) +{ + return std::find_if(m_Members.begin(), m_Members.end(), Finder(name)); +} + +inline Object::const_iterator Object::Find(const std::string& name) const +{ + return std::find_if(m_Members.begin(), m_Members.end(), Finder(name)); +} + +inline Object::iterator Object::Insert(const Member& member) +{ + return Insert(member, End()); +} + +inline Object::iterator Object::Insert(const Member& member, iterator itWhere) +{ + iterator it = Find(member.name); + if (it != m_Members.end()) + throw Exception(std::string("Object member already exists: ") + member.name); + + it = m_Members.insert(itWhere, member); + return it; +} + +inline Object::iterator Object::Erase(iterator itWhere) +{ + return m_Members.erase(itWhere); +} + +inline UnknownElement& Object::operator [](const std::string& name) +{ + + iterator it = Find(name); + if (it == m_Members.end()) + { + Member member(name); + it = Insert(member, End()); + } + return it->element; +} + +inline const UnknownElement& Object::operator [](const std::string& name) const +{ + const_iterator it = Find(name); + if (it == End()) + throw Exception(std::string("Object member not found: ") + name); + return it->element; +} + +inline void Object::Clear() +{ + m_Members.clear(); +} + +inline bool Object::operator == (const Object& object) const +{ + return m_Members == object.m_Members; +} + + +///////////////// +// Array members + +inline Array::iterator Array::Begin() { return m_Elements.begin(); } +inline Array::iterator Array::End() { return m_Elements.end(); } +inline Array::const_iterator Array::Begin() const { return m_Elements.begin(); } +inline Array::const_iterator Array::End() const { return m_Elements.end(); } + +inline Array::iterator Array::Insert(const UnknownElement& element, iterator itWhere) +{ + return m_Elements.insert(itWhere, element); +} + +inline Array::iterator Array::Insert(const UnknownElement& element) +{ + return Insert(element, End()); +} + +inline Array::iterator Array::Erase(iterator itWhere) +{ + return m_Elements.erase(itWhere); +} + +inline void Array::Resize(size_t newSize) +{ + m_Elements.resize(newSize); +} + +inline size_t Array::Size() const { return m_Elements.size(); } +inline bool Array::Empty() const { return m_Elements.empty(); } + +inline UnknownElement& Array::operator[] (size_t index) +{ + size_t nMinSize = index + 1; // zero indexed + if (m_Elements.size() < nMinSize) + m_Elements.resize(nMinSize); + return m_Elements[index]; +} + +inline const UnknownElement& Array::operator[] (size_t index) const +{ + if (index >= m_Elements.size()) + throw Exception("Array out of bounds"); + return m_Elements[index]; +} + +inline void Array::Clear() { + m_Elements.clear(); +} + +inline bool Array::operator == (const Array& array) const +{ + return m_Elements == array.m_Elements; +} + + +////////////////// +// Null members + +inline bool Null::operator == (const Null& trivial) const +{ + return true; +} + + + +} // End namespace diff --git a/src/cajun/elements.h b/src/cajun/elements.h index df1a0ca..3ddff30 100644 --- a/src/cajun/elements.h +++ b/src/cajun/elements.h @@ -31,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +//#include #include #include @@ -292,8 +293,45 @@ public: bool operator == (const Null& trivial) const; }; +//////////////////////// +// TrivialType_T members + +template +TrivialType_T::TrivialType_T(const DataTypeT& t) : + m_tValue(t) {} + +template +TrivialType_T::operator DataTypeT&() +{ + return Value(); +} + +template +TrivialType_T::operator const DataTypeT&() const +{ + return Value(); +} + +template +DataTypeT& TrivialType_T::Value() +{ + return m_tValue; +} + +template +const DataTypeT& TrivialType_T::Value() const +{ + return m_tValue; +} + +template +bool TrivialType_T::operator == (const TrivialType_T& trivial) const +{ + return m_tValue == trivial.m_tValue; +} + } // End namespace -#include "elements.inl" +//#include "elements.inl" diff --git a/src/cajun/reader.cpp b/src/cajun/reader.cpp new file mode 100644 index 0000000..f625367 --- /dev/null +++ b/src/cajun/reader.cpp @@ -0,0 +1,534 @@ +/****************************************************************************** + +Copyright (c) 2009-2010, Terry Caton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the projecct nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + +#include +#include +#include +#include "reader.h" + +/* + +TODO: +* better documentation +* unicode character decoding + +*/ + +namespace json +{ + +inline std::istream& operator >> (std::istream& istr, UnknownElement& elementRoot) { + Reader::Read(elementRoot, istr); + return istr; +} + +inline Reader::Location::Location() : + m_nLine(0), + m_nLineOffset(0), + m_nDocOffset(0) +{} + + +////////////////////// +// Reader::InputStream + +class Reader::InputStream // would be cool if we could inherit from std::istream & override "get" +{ +public: + InputStream(std::istream& iStr) : + m_iStr(iStr) {} + + // protect access to the input stream, so we can keeep track of document/line offsets + char Get(); // big, define outside + char Peek() { + assert(m_iStr.eof() == false); // enforce reading of only valid stream data + return m_iStr.peek(); + } + + bool EOS() { + m_iStr.peek(); // apparently eof flag isn't set until a character read is attempted. whatever. + return m_iStr.eof(); + } + + const Location& GetLocation() const { return m_Location; } + +private: + std::istream& m_iStr; + Location m_Location; +}; + + +inline char Reader::InputStream::Get() +{ + assert(m_iStr.eof() == false); // enforce reading of only valid stream data + char c = m_iStr.get(); + + ++m_Location.m_nDocOffset; + if (c == '\n') { + ++m_Location.m_nLine; + m_Location.m_nLineOffset = 0; + } + else { + ++m_Location.m_nLineOffset; + } + + return c; +} + + + +////////////////////// +// Reader::TokenStream + +class Reader::TokenStream +{ +public: + TokenStream(const Tokens& tokens); + + const Token& Peek(); + const Token& Get(); + + bool EOS() const; + +private: + const Tokens& m_Tokens; + Tokens::const_iterator m_itCurrent; +}; + + +inline Reader::TokenStream::TokenStream(const Tokens& tokens) : + m_Tokens(tokens), + m_itCurrent(tokens.begin()) +{} + +inline const Reader::Token& Reader::TokenStream::Peek() { + if (EOS()) + { + const Token& lastToken = *m_Tokens.rbegin(); + std::string sMessage = "Unexpected end of token stream"; + throw ParseException(sMessage, lastToken.locBegin, lastToken.locEnd); // nowhere to point to + } + return *(m_itCurrent); +} + +inline const Reader::Token& Reader::TokenStream::Get() { + const Token& token = Peek(); + ++m_itCurrent; + return token; +} + +inline bool Reader::TokenStream::EOS() const { + return m_itCurrent == m_Tokens.end(); +} + +/////////////////// +// Reader (finally) + + +inline void Reader::Read(Object& object, std::istream& istr) { Read_i(object, istr); } +inline void Reader::Read(Array& array, std::istream& istr) { Read_i(array, istr); } +inline void Reader::Read(String& string, std::istream& istr) { Read_i(string, istr); } +inline void Reader::Read(Number& number, std::istream& istr) { Read_i(number, istr); } +inline void Reader::Read(Boolean& boolean, std::istream& istr) { Read_i(boolean, istr); } +inline void Reader::Read(Null& null, std::istream& istr) { Read_i(null, istr); } +inline void Reader::Read(UnknownElement& unknown, std::istream& istr) { Read_i(unknown, istr); } + + +template +void Reader::Read_i(ElementTypeT& element, std::istream& istr) +{ + Reader reader; + + Tokens tokens; + InputStream inputStream(istr); + reader.Scan(tokens, inputStream); + + TokenStream tokenStream(tokens); + reader.Parse(element, tokenStream); + + if (tokenStream.EOS() == false) + { + const Token& token = tokenStream.Peek(); + std::string sMessage = std::string("Expected End of token stream; found ") + token.sValue; + throw ParseException(sMessage, token.locBegin, token.locEnd); + } +} + + +inline void Reader::Scan(Tokens& tokens, InputStream& inputStream) +{ + while (EatWhiteSpace(inputStream), // ignore any leading white space... + inputStream.EOS() == false) // ...before checking for EOS + { + // if all goes well, we'll create a token each pass + Token token; + token.locBegin = inputStream.GetLocation(); + + // gives us null-terminated string + char sChar = inputStream.Peek(); + switch (sChar) + { + case '{': + token.sValue = MatchExpectedString(inputStream, "{"); + token.nType = Token::TOKEN_OBJECT_BEGIN; + break; + + case '}': + token.sValue = MatchExpectedString(inputStream, "}"); + token.nType = Token::TOKEN_OBJECT_END; + break; + + case '[': + token.sValue = MatchExpectedString(inputStream, "["); + token.nType = Token::TOKEN_ARRAY_BEGIN; + break; + + case ']': + token.sValue = MatchExpectedString(inputStream, "]"); + token.nType = Token::TOKEN_ARRAY_END; + break; + + case ',': + token.sValue = MatchExpectedString(inputStream, ","); + token.nType = Token::TOKEN_NEXT_ELEMENT; + break; + + case ':': + token.sValue = MatchExpectedString(inputStream, ":"); + token.nType = Token::TOKEN_MEMBER_ASSIGN; + break; + + case '"': + token.sValue = MatchString(inputStream); + token.nType = Token::TOKEN_STRING; + break; + + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + token.sValue = MatchNumber(inputStream); + token.nType = Token::TOKEN_NUMBER; + break; + + case 't': + token.sValue = MatchExpectedString(inputStream, "true"); + token.nType = Token::TOKEN_BOOLEAN; + break; + + case 'f': + token.sValue = MatchExpectedString(inputStream, "false"); + token.nType = Token::TOKEN_BOOLEAN; + break; + + case 'n': + token.sValue = MatchExpectedString(inputStream, "null"); + token.nType = Token::TOKEN_NULL; + break; + + default: + { + std::string sErrorMessage = std::string("Unexpected character in stream: ") + sChar; + throw ScanException(sErrorMessage, inputStream.GetLocation()); + } + } + + token.locEnd = inputStream.GetLocation(); + tokens.push_back(token); + } +} + + +inline void Reader::EatWhiteSpace(InputStream& inputStream) +{ + while (inputStream.EOS() == false && + ::isspace(inputStream.Peek())) + inputStream.Get(); +} + +inline std::string Reader::MatchExpectedString(InputStream& inputStream, const std::string& sExpected) +{ + std::string::const_iterator it(sExpected.begin()), + itEnd(sExpected.end()); + for ( ; it != itEnd; ++it) { + if (inputStream.EOS() || // did we reach the end before finding what we're looking for... + inputStream.Get() != *it) // ...or did we find something different? + { + std::string sMessage = std::string("Expected string: ") + sExpected; + throw ScanException(sMessage, inputStream.GetLocation()); + } + } + + // all's well if we made it here + return sExpected; +} + + +inline std::string Reader::MatchString(InputStream& inputStream) +{ + MatchExpectedString(inputStream, "\""); + + std::string string; + while (inputStream.EOS() == false && + inputStream.Peek() != '"') + { + char c = inputStream.Get(); + + // escape? + if (c == '\\' && + inputStream.EOS() == false) // shouldn't have reached the end yet + { + c = inputStream.Get(); + switch (c) { + case '/': string.push_back('/'); break; + case '"': string.push_back('"'); break; + case '\\': string.push_back('\\'); break; + case 'b': string.push_back('\b'); break; + case 'f': string.push_back('\f'); break; + case 'n': string.push_back('\n'); break; + case 'r': string.push_back('\r'); break; + case 't': string.push_back('\t'); break; + //case 'u': string.push_back('\u'); break; // TODO: what do we do with this? + default: { + std::string sMessage = std::string("Unrecognized escape sequence found in string: \\") + c; + throw ScanException(sMessage, inputStream.GetLocation()); + } + } + } + else { + string.push_back(c); + } + } + + // eat the last '"' that we just peeked + MatchExpectedString(inputStream, "\""); + + // all's well if we made it here + return string; +} + + +inline std::string Reader::MatchNumber(InputStream& inputStream) +{ + const char sNumericChars[] = "0123456789.eE-+"; + std::set numericChars; + numericChars.insert(sNumericChars, sNumericChars + sizeof(sNumericChars)); + + std::string sNumber; + while (inputStream.EOS() == false && + numericChars.find(inputStream.Peek()) != numericChars.end()) + { + sNumber.push_back(inputStream.Get()); + } + + return sNumber; +} + + +inline void Reader::Parse(UnknownElement& element, Reader::TokenStream& tokenStream) +{ + const Token& token = tokenStream.Peek(); + switch (token.nType) { + case Token::TOKEN_OBJECT_BEGIN: + { + // implicit non-const cast will perform conversion for us (if necessary) + Object& object = element; + Parse(object, tokenStream); + break; + } + + case Token::TOKEN_ARRAY_BEGIN: + { + Array& array = element; + Parse(array, tokenStream); + break; + } + + case Token::TOKEN_STRING: + { + String& string = element; + Parse(string, tokenStream); + break; + } + + case Token::TOKEN_NUMBER: + { + Number& number = element; + Parse(number, tokenStream); + break; + } + + case Token::TOKEN_BOOLEAN: + { + Boolean& boolean = element; + Parse(boolean, tokenStream); + break; + } + + case Token::TOKEN_NULL: + { + Null& null = element; + Parse(null, tokenStream); + break; + } + + default: + { + std::string sMessage = std::string("Unexpected token: ") + token.sValue; + throw ParseException(sMessage, token.locBegin, token.locEnd); + } + } +} + + +inline void Reader::Parse(Object& object, Reader::TokenStream& tokenStream) +{ + MatchExpectedToken(Token::TOKEN_OBJECT_BEGIN, tokenStream); + + bool bContinue = (tokenStream.EOS() == false && + tokenStream.Peek().nType != Token::TOKEN_OBJECT_END); + while (bContinue) + { + Object::Member member; + + // first the member name. save the token in case we have to throw an exception + const Token& tokenName = tokenStream.Peek(); + member.name = MatchExpectedToken(Token::TOKEN_STRING, tokenStream); + + // ...then the key/value separator... + MatchExpectedToken(Token::TOKEN_MEMBER_ASSIGN, tokenStream); + + // ...then the value itself (can be anything). + Parse(member.element, tokenStream); + + // try adding it to the object (this could throw) + try + { + object.Insert(member); + } + catch (Exception&) + { + // must be a duplicate name + std::string sMessage = std::string("Duplicate object member token: ") + member.name; + throw ParseException(sMessage, tokenName.locBegin, tokenName.locEnd); + } + + bContinue = (tokenStream.EOS() == false && + tokenStream.Peek().nType == Token::TOKEN_NEXT_ELEMENT); + if (bContinue) + MatchExpectedToken(Token::TOKEN_NEXT_ELEMENT, tokenStream); + } + + MatchExpectedToken(Token::TOKEN_OBJECT_END, tokenStream); +} + + +inline void Reader::Parse(Array& array, Reader::TokenStream& tokenStream) +{ + MatchExpectedToken(Token::TOKEN_ARRAY_BEGIN, tokenStream); + + bool bContinue = (tokenStream.EOS() == false && + tokenStream.Peek().nType != Token::TOKEN_ARRAY_END); + while (bContinue) + { + // ...what's next? could be anything + Array::iterator itElement = array.Insert(UnknownElement()); + UnknownElement& element = *itElement; + Parse(element, tokenStream); + + bContinue = (tokenStream.EOS() == false && + tokenStream.Peek().nType == Token::TOKEN_NEXT_ELEMENT); + if (bContinue) + MatchExpectedToken(Token::TOKEN_NEXT_ELEMENT, tokenStream); + } + + MatchExpectedToken(Token::TOKEN_ARRAY_END, tokenStream); +} + + +inline void Reader::Parse(String& string, Reader::TokenStream& tokenStream) +{ + string = MatchExpectedToken(Token::TOKEN_STRING, tokenStream); +} + + +inline void Reader::Parse(Number& number, Reader::TokenStream& tokenStream) +{ + const Token& currentToken = tokenStream.Peek(); // might need this later for throwing exception + const std::string& sValue = MatchExpectedToken(Token::TOKEN_NUMBER, tokenStream); + + std::istringstream iStr(sValue); + double dValue; + iStr >> dValue; + + // did we consume all characters in the token? + if (iStr.eof() == false) + { + char c = iStr.peek(); + std::string sMessage = std::string("Unexpected character in NUMBER token: ") + c; + throw ParseException(sMessage, currentToken.locBegin, currentToken.locEnd); + } + + number = dValue; +} + + +inline void Reader::Parse(Boolean& boolean, Reader::TokenStream& tokenStream) +{ + const std::string& sValue = MatchExpectedToken(Token::TOKEN_BOOLEAN, tokenStream); + boolean = (sValue == "true" ? true : false); +} + + +inline void Reader::Parse(Null&, Reader::TokenStream& tokenStream) +{ + MatchExpectedToken(Token::TOKEN_NULL, tokenStream); +} + + +inline const std::string& Reader::MatchExpectedToken(Token::Type nExpected, Reader::TokenStream& tokenStream) +{ + const Token& token = tokenStream.Get(); + if (token.nType != nExpected) + { + std::string sMessage = std::string("Unexpected token: ") + token.sValue; + throw ParseException(sMessage, token.locBegin, token.locEnd); + } + + return token.sValue; +} + +} // End namespace diff --git a/src/cajun/reader.h b/src/cajun/reader.h index f431670..553af35 100644 --- a/src/cajun/reader.h +++ b/src/cajun/reader.h @@ -31,9 +31,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once -#include "elements.h" #include #include +#include "elements.h" namespace json { @@ -145,4 +145,4 @@ private: } // End namespace -#include "reader.inl" \ No newline at end of file +//#include "reader.inl" \ No newline at end of file diff --git a/src/cajun/writer.cpp b/src/cajun/writer.cpp new file mode 100644 index 0000000..446d076 --- /dev/null +++ b/src/cajun/writer.cpp @@ -0,0 +1,178 @@ +/****************************************************************************** + +Copyright (c) 2009-2010, Terry Caton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the projecct nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ + +#include +#include +#include "writer.h" + +/* + +TODO: +* better documentation +* unicode character encoding + +*/ + +namespace json +{ + + +inline void Writer::Write(const UnknownElement& elementRoot, std::ostream& ostr) { Write_i(elementRoot, ostr); } +inline void Writer::Write(const Object& object, std::ostream& ostr) { Write_i(object, ostr); } +inline void Writer::Write(const Array& array, std::ostream& ostr) { Write_i(array, ostr); } +inline void Writer::Write(const Number& number, std::ostream& ostr) { Write_i(number, ostr); } +inline void Writer::Write(const String& string, std::ostream& ostr) { Write_i(string, ostr); } +inline void Writer::Write(const Boolean& boolean, std::ostream& ostr) { Write_i(boolean, ostr); } +inline void Writer::Write(const Null& null, std::ostream& ostr) { Write_i(null, ostr); } + + +inline Writer::Writer(std::ostream& ostr) : + m_ostr(ostr), + m_nTabDepth(0) +{} + +template +void Writer::Write_i(const ElementTypeT& element, std::ostream& ostr) +{ + Writer writer(ostr); + writer.Write_i(element); + ostr.flush(); // all done +} + +inline void Writer::Write_i(const Array& array) +{ + if (array.Empty()) + m_ostr << "[]"; + else + { + m_ostr << '[' << std::endl; + ++m_nTabDepth; + + Array::const_iterator it(array.Begin()), + itEnd(array.End()); + while (it != itEnd) { + m_ostr << std::string(m_nTabDepth, '\t'); + + Write_i(*it); + + if (++it != itEnd) + m_ostr << ','; + m_ostr << std::endl; + } + + --m_nTabDepth; + m_ostr << std::string(m_nTabDepth, '\t') << ']'; + } +} + +inline void Writer::Write_i(const Object& object) +{ + if (object.Empty()) + m_ostr << "{}"; + else + { + m_ostr << '{' << std::endl; + ++m_nTabDepth; + + Object::const_iterator it(object.Begin()), + itEnd(object.End()); + while (it != itEnd) { + m_ostr << std::string(m_nTabDepth, '\t'); + + Write_i(it->name); + + m_ostr << " : "; + Write_i(it->element); + + if (++it != itEnd) + m_ostr << ','; + m_ostr << std::endl; + } + + --m_nTabDepth; + m_ostr << std::string(m_nTabDepth, '\t') << '}'; + } +} + +inline void Writer::Write_i(const Number& numberElement) +{ + m_ostr << std::setprecision(20) << numberElement.Value(); +} + +inline void Writer::Write_i(const Boolean& booleanElement) +{ + m_ostr << (booleanElement.Value() ? "true" : "false"); +} + +inline void Writer::Write_i(const String& stringElement) +{ + m_ostr << '"'; + + const std::string& s = stringElement.Value(); + std::string::const_iterator it(s.begin()), + itEnd(s.end()); + for (; it != itEnd; ++it) + { + switch (*it) + { + case '"': m_ostr << "\\\""; break; + case '\\': m_ostr << "\\\\"; break; + case '\b': m_ostr << "\\b"; break; + case '\f': m_ostr << "\\f"; break; + case '\n': m_ostr << "\\n"; break; + case '\r': m_ostr << "\\r"; break; + case '\t': m_ostr << "\\t"; break; + //case '\u': m_ostr << "\\u"; break; // uh... + default: m_ostr << *it; break; + } + } + + m_ostr << '"'; +} + +inline void Writer::Write_i(const Null& ) +{ + m_ostr << "null"; +} + +inline void Writer::Write_i(const UnknownElement& unknown) +{ + unknown.Accept(*this); +} + +inline void Writer::Visit(const Array& array) { Write_i(array); } +inline void Writer::Visit(const Object& object) { Write_i(object); } +inline void Writer::Visit(const Number& number) { Write_i(number); } +inline void Writer::Visit(const String& string) { Write_i(string); } +inline void Writer::Visit(const Boolean& boolean) { Write_i(boolean); } +inline void Writer::Visit(const Null& null) { Write_i(null); } + + + +} // End namespace diff --git a/src/cajun/writer.h b/src/cajun/writer.h index 594d541..f3d9596 100644 --- a/src/cajun/writer.h +++ b/src/cajun/writer.h @@ -75,4 +75,4 @@ private: } // End namespace -#include "writer.inl" \ No newline at end of file +//#include "writer.inl" \ No newline at end of file diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 75b78c5..3706cf9 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -14,15 +14,11 @@ #include "search/Save.h" -#include "cajun/reader.h" -#include "cajun/writer.h" -#include "cajun/elements.h" - Client::Client(): authUser(0, "") { int i = 0; - http_init(NULL); + std::string proxyString(""); for(i = 0; i < THUMB_CACHE_SIZE; i++) { thumbnailCache[i] = NULL; @@ -33,14 +29,81 @@ Client::Client(): activeThumbRequestTimes[i] = 0; activeThumbRequestCompleteTimes[i] = 0; } + + //Read config + std::ifstream configFile; + configFile.open("powder.pref", ios::binary); + if(configFile) + { + int fsize = configFile.tellg(); + configFile.seekg(0, std::ios::end); + fsize = configFile.tellg() - fsize; + configFile.seekg(0, ios::beg); + if(fsize) + { + json::Reader::Read(configDocument, configFile); + try + { + authUser.ID = ((json::Number)(configDocument["User"]["ID"])).Value(); + authUser.SessionID = ((json::String)(configDocument["User"]["SessionID"])).Value(); + authUser.SessionKey = ((json::String)(configDocument["User"]["SessionKey"])).Value(); + authUser.Username = ((json::String)(configDocument["User"]["Username"])).Value(); + } + catch (json::Exception &e) + { + authUser = User(0, ""); + std::cerr << "Error: Client [Read User data from pref] " << e.what() << std::endl; + } + try + { + proxyString = ((json::String)(configDocument["Proxy"])).Value(); + } + catch (json::Exception &e) + { + proxyString = ""; + std::cerr << "Error: Client [Read Proxy from pref] " << e.what() << std::endl; + } + } + configFile.close(); + } + + if(proxyString.length()) + { + http_init((char *)proxyString.c_str()); + } + else + { + http_init(NULL); + } } Client::~Client() { ClearThumbnailRequests(); http_done(); + + //Save config + std::ofstream configFile; + configFile.open("powder.pref", ios::trunc); + if(configFile) + { + if(authUser.ID) + { + configDocument["User"]["ID"] = json::Number(authUser.ID); + configDocument["User"]["SessionID"] = json::String(authUser.SessionID); + configDocument["User"]["SessionKey"] = json::String(authUser.SessionKey); + configDocument["User"]["Username"] = json::String(authUser.Username); + } + else + { + configDocument["User"] = json::Null(); + } + json::Writer::Write(configDocument, configFile); + configFile.close(); + } } + void Client::SetAuthUser(User user) { authUser = user; diff --git a/src/client/Client.h b/src/client/Client.h index 0587d79..4ca0287 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -3,6 +3,7 @@ #include #include +#include #include "Config.h" #include "HTTP.h" @@ -11,6 +12,10 @@ #include "Singleton.h" #include "User.h" +#include "cajun/reader.h" +#include "cajun/writer.h" +#include "cajun/elements.h" + enum LoginStatus { LoginOkay, LoginError }; @@ -34,6 +39,9 @@ private: int activeThumbRequestCompleteTimes[IMGCONNS]; std::string activeThumbRequestIDs[IMGCONNS]; public: + //Config file handle + json::Object configDocument; + Client(); ~Client(); diff --git a/src/client/User.h b/src/client/User.h index 9dd231c..163f463 100644 --- a/src/client/User.h +++ b/src/client/User.h @@ -10,6 +10,11 @@ #include +enum Elevation +{ + ElevationAdmin, ElevationModerator, ElevationNone +}; + class User { public: @@ -17,9 +22,13 @@ public: std::string Username; std::string SessionID; std::string SessionKey; + Elevation UserElevation; User(int id, std::string username): ID(id), - Username(username) + Username(username), + SessionID(""), + SessionKey(""), + UserElevation(ElevationNone) { } diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 92224de..2ff9e0b 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -47,6 +47,11 @@ GameModel::GameModel(): activeTools[0] = new ElementTool(1, "TURD", 0, 0, 0); activeTools[1] = new ElementTool(0, "TURD", 0, 0, 0); //activeTool[1] = new ElementTool(0, "TURD", 0, 0, 0); + std::cout << Client::Ref().GetAuthUser().Username << std::endl; + if(Client::Ref().GetAuthUser().ID) + { + currentUser = Client::Ref().GetAuthUser(); + } } GameModel::~GameModel() @@ -108,6 +113,8 @@ void GameModel::AddObserver(GameView * observer){ observer->NotifyBrushChanged(this); observer->NotifyMenuListChanged(this); observer->NotifyToolListChanged(this); + observer->NotifyUserChanged(this); + observer->NotifyZoomChanged(this); } void GameModel::SetActiveMenu(Menu * menu) diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index e46ae21..a443025 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -516,7 +516,7 @@ void GameView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bo drawMode = DrawPoints; else drawModeReset = true; - switch(character) + switch(key) { case 'z': if(!zoomCursorFixed) diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 01a3e72..c4833d1 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -124,7 +124,7 @@ void Engine::SetSize(int width, int height) height_ = height; } -void Engine::Tick(float dt) +void Engine::Tick() { if(state_ != NULL) state_->DoTick(dt); @@ -175,9 +175,22 @@ void Engine::Draw() } if(state_) state_->DoDraw(); + + char fpsText[512]; + sprintf(fpsText, "FPS: %.2f, Delta: %.3f", fps, dt); + ui::Engine::Ref().g->drawtext(10, 10, fpsText, 255, 255, 255, 255); g->Blit(); } +void Engine::SetFps(float fps) +{ + this->fps = fps; + if(FpsLimit > 2.0f) + this->dt = FpsLimit/fps; + else + this->dt = 1.0f; +} + void Engine::onKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { if(state_) diff --git a/src/interface/Engine.h b/src/interface/Engine.h index 09fc222..b8f6b73 100644 --- a/src/interface/Engine.h +++ b/src/interface/Engine.h @@ -38,9 +38,11 @@ namespace ui inline bool Running() { return running_; } void Exit(); - void Tick(float dt); + void Tick(); void Draw(); + void SetFps(float fps); + inline int GetMouseX() { return mousex_; } inline int GetMouseY() { return mousey_; } inline int GetWidth() { return width_; } @@ -54,6 +56,8 @@ namespace ui float FpsLimit; Graphics * g; private: + float dt; + float fps; pixel * lastBuffer; std::stack prevBuffers; std::stack windows; diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp index 1a54992..5985ce1 100644 --- a/src/interface/Textbox.cpp +++ b/src/interface/Textbox.cpp @@ -18,6 +18,7 @@ Textbox::Textbox(Point position, Point size, std::string textboxText): actionCallback(NULL), masked(false) { + SetText(textboxText); TextPosition(); cursor = text.length(); } @@ -30,7 +31,7 @@ Textbox::~Textbox() void Textbox::TextPosition() { - std::string tempText = text; + std::string tempText = displayText; if(tempText.length() && cursor) { tempText.erase(cursor, tempText.length()-cursor); @@ -60,16 +61,27 @@ void Textbox::TextPosition() textPosition.X = 3; break; case AlignCentre: - textPosition.X = (Size.X-Graphics::textwidth((char *)text.c_str()))/2; + textPosition.X = (Size.X-Graphics::textwidth((char *)displayText.c_str()))/2; break; case AlignRight: - textPosition.X = (Size.X-Graphics::textwidth((char *)text.c_str()))-2; + textPosition.X = (Size.X-Graphics::textwidth((char *)displayText.c_str()))-2; break; } } void Textbox::SetText(std::string text) { + if(masked) + { + char tempText[text.length()]; + memset(tempText, 0x8d, text.length()); + tempText[text.length()] = 0; + displayText = tempText; + } + else + { + displayText = text; + } this->text = text; TextPosition(); } @@ -151,6 +163,7 @@ void Textbox::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool cursor = 0; text = ""; } + SetText(text); TextPosition(); } @@ -166,15 +179,5 @@ void Textbox::Draw(const Point& screenPos) { g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 160, 160, 160, 255); } - if(masked) - { - char tempText[text.length()]; - memset(tempText, 'a', text.length()); - tempText[text.length()] = 0; - g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, tempText, 255, 255, 255, 255); - } - else - { - g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, text, 255, 255, 255, 255); - } + g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, displayText, 255, 255, 255, 255); } diff --git a/src/interface/Textbox.h b/src/interface/Textbox.h index ac138f4..889a4e8 100644 --- a/src/interface/Textbox.h +++ b/src/interface/Textbox.h @@ -19,6 +19,7 @@ class Textbox : public Component { protected: std::string text; + std::string displayText; ui::Point textPosition; HorizontalAlignment textHAlign; VerticalAlignment textVAlign; diff --git a/src/render/RenderModel.cpp b/src/render/RenderModel.cpp index 52a32ac..56b42a1 100644 --- a/src/render/RenderModel.cpp +++ b/src/render/RenderModel.cpp @@ -10,8 +10,40 @@ RenderModel::RenderModel(): renderer(NULL) { - // TODO Auto-generated constructor stub + try + { + json::Number tempNumber = Client::Ref().configDocument["Renderer"]["ColourMode"]; + if(tempNumber.Value()) + renderer->SetColourMode(tempNumber.Value()); + + json::Array tempArray = Client::Ref().configDocument["Renderer"]["DisplayModes"]; + if(tempArray.Size()) + { + std::vector displayModes; + json::Array::const_iterator itDisplayModes(tempArray.Begin()), itDisplayModesEnd(tempArray.End()); + for (; itDisplayModes != itDisplayModesEnd; ++itDisplayModes) + { + json::Number tempNumberI = *itDisplayModes; + displayModes.push_back(tempNumberI.Value()); + } + } + + tempArray = Client::Ref().configDocument["Renderer"]["RenderModes"]; + if(tempArray.Size()) + { + std::vector renderModes; + json::Array::const_iterator itRenderModes(tempArray.Begin()), itRenderModesEnd(tempArray.End()); + for (; itRenderModes != itRenderModesEnd; ++itRenderModes) + { + json::Number tempNumberI = *itRenderModes; + renderModes.push_back(tempNumberI.Value()); + } + } + } + catch(json::Exception & e) + { + } } void RenderModel::AddObserver(RenderView * observer) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index eb7d6a1..c642b76 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1,4 +1,4 @@ -#include +//#include #include #include "Config.h" #include "Simulation.h" -- cgit v0.9.2-21-gd62e From 038da72c61ea6a251d805e2de3662f240da52b02 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 1 Feb 2012 18:45:59 +0000 Subject: Console UI, open in browser button, tab and enter shortcut for Login UI, various diff --git a/src/Config.h b/src/Config.h index 436e8a2..37a1a65 100644 --- a/src/Config.h +++ b/src/Config.h @@ -57,6 +57,8 @@ #define BARSIZE 0 #else #define MENUSIZE 40 +//#define MENUSIZE 20 +//#define BARSIZE 50 #define BARSIZE 17 #endif #define XRES 612 diff --git a/src/Graphics.cpp b/src/Graphics.cpp index 678e138..9d9c36b 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -993,6 +993,11 @@ int Graphics::textnwidth(char *s, int n) { if (!n) break; + if(((char)*s)=='\b') + { + s++; + continue; + } x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; n--; } @@ -1035,6 +1040,11 @@ int Graphics::textwidthx(char *s, int w) int x=0,n=0,cw; for (; *s; s++) { + if((char)*s == '\b') + { + s++; + continue; + } cw = font_data[font_ptrs[(int)(*(unsigned char *)s)]]; if (x+(cw/2) >= w) break; diff --git a/src/Misc.cpp b/src/Misc.cpp index a6ac711..1e73574 100644 --- a/src/Misc.cpp +++ b/src/Misc.cpp @@ -621,6 +621,29 @@ void HSV_to_RGB(int h,int s,int v,int *r,int *g,int *b)//convert 0-255(0-360 for *b += m; } +void OpenURI(std::string uri) { +#ifdef WIN32 + ShellExecute(0, "OPEN", uri.c_str(), NULL, NULL, 0); +#elif MACOSX + char *cmd = malloc(7+uri.length()); + strcpy(cmd, "open "); + strappend(cmd, uri.c_str()); + system(cmd); +#elif LIN32 + char *cmd = malloc(11+uri.length()); + strcpy(cmd, "xdg-open "); + strappend(cmd, uri.c_str()); + system(cmd); +#elif LIN64 + char *cmd = malloc(11+uri.length()); + strcpy(cmd, "xdg-open "); + strappend(cmd, uri.c_str()); + system(cmd); +#else + printf("Cannot open browser\n"); +#endif +} + void RGB_to_HSV(int r,int g,int b,int *h,int *s,int *v)//convert 0-255 RGB values to 0-255(0-360 for H) HSV { float rr, gg, bb, a,x,c,d; diff --git a/src/Misc.h b/src/Misc.h index 65ae5b3..2dd96b2 100644 --- a/src/Misc.h +++ b/src/Misc.h @@ -2,6 +2,7 @@ #define UTILS_H #include #include +#include enum HorizontalAlignment { @@ -86,6 +87,8 @@ void HSV_to_RGB(int h,int s,int v,int *r,int *g,int *b); void RGB_to_HSV(int r,int g,int b,int *h,int *s,int *v); +void OpenURI(std::string uri); + void membwand(void * dest, void * src, size_t destsize, size_t srcsize); // a b // c d diff --git a/src/console/ConsoleCommand.h b/src/console/ConsoleCommand.h new file mode 100644 index 0000000..f6f91a3 --- /dev/null +++ b/src/console/ConsoleCommand.h @@ -0,0 +1,25 @@ +/* + * ConsoleCommand.h + * + * Created on: Feb 1, 2012 + * Author: Simon + */ + +#ifndef CONSOLECOMMAND_H_ +#define CONSOLECOMMAND_H_ + +class ConsoleCommand +{ +public: + ConsoleCommand(std::string command, int returnStatus, std::string returnValue): + Command(command), ReturnStatus(returnStatus), ReturnValue(returnValue) + { + + } + std::string Command; + int ReturnStatus; + std::string ReturnValue; +}; + + +#endif /* CONSOLECOMMAND_H_ */ diff --git a/src/console/ConsoleController.cpp b/src/console/ConsoleController.cpp new file mode 100644 index 0000000..cf4cdcd --- /dev/null +++ b/src/console/ConsoleController.cpp @@ -0,0 +1,102 @@ +/* + * ConsoleController.cpp + * + * Created on: Jan 31, 2012 + * Author: Simon + */ + +#include +#include "ConsoleController.h" + +ConsoleController::ConsoleController(ControllerCallback * callback): + HasDone(false) +{ + consoleModel = new ConsoleModel(); + consoleView = new ConsoleView(); + consoleView->AttachController(this); + consoleModel->AddObserver(consoleView); + + this->callback = callback; +} + +void ConsoleController::EvaluateCommand(std::string command) +{ + if(command.length()) + consoleModel->AddLastCommand(ConsoleCommand(command, -1, "Syntax error")); + else + if(ui::Engine::Ref().GetWindow() == consoleView) + ui::Engine::Ref().CloseWindow(); +} + +std::string ConsoleController::FormatCommand(std::string command) +{ + char * rawText = (char*)command.c_str(); + char * outputData = (char *)calloc(command.length()*6, 1); + int rawTextLoc = 0; + int outputDataLoc = 0; + std::stack pstack; + while(rawText[rawTextLoc]) + { + switch(rawText[rawTextLoc]) + { + case '\\': + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + if(rawText[rawTextLoc]) + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + break; + case '"': + if(pstack.size() && pstack.top() == '"') + { + pstack.pop(); + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + outputData[outputDataLoc++] = '\b'; + outputData[outputDataLoc++] = 'w'; + } + else + { + pstack.push('"'); + outputData[outputDataLoc++] = '\b'; + outputData[outputDataLoc++] = 'o'; + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + } + break; + default: + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + break; + } + } + return outputData; +} + +void ConsoleController::NextCommand() +{ + int cIndex = consoleModel->GetCurrentCommandIndex(); + if(cIndex < consoleModel->GetPreviousCommands().size()) + consoleModel->SetCurrentCommandIndex(cIndex+1); +} + +void ConsoleController::PreviousCommand() +{ + int cIndex = consoleModel->GetCurrentCommandIndex(); + if(cIndex > 0) + consoleModel->SetCurrentCommandIndex(cIndex-1); +} + +void ConsoleController::Exit() +{ + if(ui::Engine::Ref().GetWindow() == consoleView) + ui::Engine::Ref().CloseWindow(); + if(callback) + callback->ControllerExit(); + HasDone = true; +} + +ConsoleView * ConsoleController::GetView() +{ + return consoleView; +} + +ConsoleController::~ConsoleController() { + // TODO Auto-generated destructor stub +} + diff --git a/src/console/ConsoleController.h b/src/console/ConsoleController.h new file mode 100644 index 0000000..9316f71 --- /dev/null +++ b/src/console/ConsoleController.h @@ -0,0 +1,35 @@ +/* + * ConsoleController.h + * + * Created on: Jan 31, 2012 + * Author: Simon + */ + +#ifndef CONSOLECONTROLLER_H_ +#define CONSOLECONTROLLER_H_ + +#include +#include "Controller.h" +#include "ConsoleView.h" +#include "ConsoleModel.h" +#include "ConsoleCommand.h" + +class ConsoleModel; +class ConsoleView; +class ConsoleController { + ControllerCallback * callback; + ConsoleView * consoleView; + ConsoleModel * consoleModel; +public: + bool HasDone; + ConsoleController(ControllerCallback * callback); + std::string FormatCommand(std::string command); + void EvaluateCommand(std::string command); + void NextCommand(); + void PreviousCommand(); + void Exit(); + ConsoleView * GetView(); + virtual ~ConsoleController(); +}; + +#endif /* CONSOLECONTROLLER_H_ */ diff --git a/src/console/ConsoleModel.cpp b/src/console/ConsoleModel.cpp new file mode 100644 index 0000000..fcbee80 --- /dev/null +++ b/src/console/ConsoleModel.cpp @@ -0,0 +1,72 @@ +/* + * ConsoleModel.cpp + * + * Created on: Feb 1, 2012 + * Author: Simon + */ + +#include "ConsoleModel.h" + +ConsoleModel::ConsoleModel() { + +} + +void ConsoleModel::AddObserver(ConsoleView * observer) +{ + observers.push_back(observer); +} + +int ConsoleModel::GetCurrentCommandIndex() +{ + return currentCommandIndex; +} + +void ConsoleModel::SetCurrentCommandIndex(int index) +{ + currentCommandIndex = index; + notifyCurrentCommandChanged(); +} + +ConsoleCommand ConsoleModel::GetCurrentCommand() +{ + if(currentCommandIndex < 0 || currentCommandIndex >= previousCommands.size()) + { + return ConsoleCommand("", 0, ""); + } + return previousCommands[currentCommandIndex]; +} + +void ConsoleModel::AddLastCommand(ConsoleCommand command) +{ + previousCommands.push_back(command); + if(previousCommands.size()>25) + previousCommands.pop_front(); + currentCommandIndex = previousCommands.size(); + notifyPreviousCommandsChanged(); +} + +std::deque ConsoleModel::GetPreviousCommands() +{ + return previousCommands; +} + +void ConsoleModel::notifyPreviousCommandsChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyPreviousCommandsChanged(this); + } +} + +void ConsoleModel::notifyCurrentCommandChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyCurrentCommandChanged(this); + } +} + +ConsoleModel::~ConsoleModel() { + +} + diff --git a/src/console/ConsoleModel.h b/src/console/ConsoleModel.h new file mode 100644 index 0000000..b340ea8 --- /dev/null +++ b/src/console/ConsoleModel.h @@ -0,0 +1,35 @@ +/* + * ConsoleModel.h + * + * Created on: Feb 1, 2012 + * Author: Simon + */ + +#ifndef CONSOLEMODEL_H_ +#define CONSOLEMODEL_H_ + +#include +#include +#include "ConsoleView.h" +#include "ConsoleCommand.h" + +class ConsoleView; +class ConsoleModel { + int currentCommandIndex; + std::vector observers; + std::deque previousCommands; + void notifyPreviousCommandsChanged(); + void notifyCurrentCommandChanged(); +public: + int GetCurrentCommandIndex(); + void SetCurrentCommandIndex(int index); + ConsoleCommand GetCurrentCommand(); + + std::deque GetPreviousCommands(); + ConsoleModel(); + void AddObserver(ConsoleView * observer); + void AddLastCommand(ConsoleCommand command); + virtual ~ConsoleModel(); +}; + +#endif /* CONSOLEMODEL_H_ */ diff --git a/src/console/ConsoleView.cpp b/src/console/ConsoleView.cpp new file mode 100644 index 0000000..117d8cb --- /dev/null +++ b/src/console/ConsoleView.cpp @@ -0,0 +1,90 @@ +/* + * ConsoleView.cpp + * + * Created on: Jan 31, 2012 + * Author: Simon + */ + +#include "ConsoleView.h" +#include "interface/Keys.h" + +ConsoleView::ConsoleView(): + ui::Window(ui::Point(0, 0), ui::Point(XRES+BARSIZE, 150)), + commandField(NULL) +{ + class CommandHighlighter: public ui::TextboxAction + { + ConsoleView * v; + public: + CommandHighlighter(ConsoleView * v_) { v = v_; } + void TextChangedCallback(ui::Textbox * sender) + { + sender->SetDisplayText(v->c->FormatCommand(sender->GetText())); + } + }; + commandField = new ui::Textbox(ui::Point(0, Size.Y-16), ui::Point(Size.X, 16), ""); + commandField->SetAlignment(AlignLeft, AlignBottom); + commandField->SetActionCallback(new CommandHighlighter(this)); + AddComponent(commandField); + FocusComponent(commandField); + commandField->SetBorder(false); +} + +void ConsoleView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + switch(key) + { + case KEY_RETURN: + case KEY_ENTER: + c->EvaluateCommand(commandField->GetText()); + commandField->SetText(""); + break; + case KEY_DOWN: + c->NextCommand(); + break; + case KEY_UP: + c->PreviousCommand(); + break; + } +} + +void ConsoleView::NotifyPreviousCommandsChanged(ConsoleModel * sender) +{ + for(int i = 0; i < commandList.size(); i++) + { + RemoveComponent(commandList[i]); + delete commandList[i]; + } + commandList.clear(); + std::deque commands = sender->GetPreviousCommands(); + int currentY = Size.Y - 32; + if(commands.size()) + for(int i = commands.size()-1; i >= 0; i--) + { + if(currentY <= 0) + break; + ui::Label * tempLabel = new ui::Label(ui::Point(0, currentY), ui::Point(Size.X, 16), commands[i].Command); + tempLabel->SetAlignment(AlignLeft, AlignMiddle); + commandList.push_back(tempLabel); + AddComponent(tempLabel); + currentY-=16; + } +} + +void ConsoleView::NotifyCurrentCommandChanged(ConsoleModel * sender) +{ + commandField->SetText(sender->GetCurrentCommand().Command); +} + + +void ConsoleView::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 0, 0, 0, 110); + g->blend_line(Position.X, Position.Y+Size.Y-16, Position.X+Size.X, Position.Y+Size.Y-16, 255, 255, 255, 160); + g->blend_line(Position.X, Position.Y+Size.Y, Position.X+Size.X, Position.Y+Size.Y, 255, 255, 255, 200); +} + +ConsoleView::~ConsoleView() { +} + diff --git a/src/console/ConsoleView.h b/src/console/ConsoleView.h new file mode 100644 index 0000000..bb1a98e --- /dev/null +++ b/src/console/ConsoleView.h @@ -0,0 +1,37 @@ +/* + * ConsoleView.h + * + * Created on: Jan 31, 2012 + * Author: Simon + */ + +#ifndef CONSOLEVIEW_H_ +#define CONSOLEVIEW_H_ + +#include +#include +#include "interface/Label.h" +#include "interface/Window.h" +#include "ConsoleController.h" +#include "ConsoleModel.h" +#include "interface/Textbox.h" +#include "ConsoleCommand.h" + + +class ConsoleController; +class ConsoleModel; +class ConsoleView: public ui::Window { + ConsoleController * c; + ui::Textbox * commandField; + std::vector commandList; +public: + ConsoleView(); + virtual void OnDraw(); + virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + void AttachController(ConsoleController * c_) { c = c_; } + void NotifyPreviousCommandsChanged(ConsoleModel * sender); + void NotifyCurrentCommandChanged(ConsoleModel * sender); + virtual ~ConsoleView(); +}; + +#endif /* CONSOLEVIEW_H_ */ diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 9e5f53b..a4e0ccc 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -95,6 +95,10 @@ GameController::~GameController() { delete loginWindow; } + if(console) + { + delete console; + } if(ui::Engine::Ref().GetWindow() == gameView) { ui::Engine::Ref().CloseWindow(); @@ -301,6 +305,12 @@ void GameController::OpenDisplayOptions() //TODO: Implement } +void GameController::ShowConsole() +{ + console = new ConsoleController(NULL); + ui::Engine::Ref().ShowWindow(console->GetView()); +} + void GameController::OpenRenderOptions() { renderOptions = new RenderController(gameModel->GetRenderer(), new RenderCallback(this)); diff --git a/src/game/GameController.h b/src/game/GameController.h index df5f9fc..84af343 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -10,6 +10,7 @@ #include "render/RenderController.h" #include "login/LoginController.h" #include "ssave/SSaveController.h" +#include "console/ConsoleController.h" #include "Menu.h" using namespace std; @@ -26,6 +27,7 @@ private: RenderController * renderOptions; LoginController * loginWindow; SSaveController * ssave; + ConsoleController * console; public: class LoginCallback; class SearchCallback; @@ -57,6 +59,7 @@ public: void ReloadSim(); void Vote(int direction); void ChangeBrush(); + void ShowConsole(); ui::Point PointTranslate(ui::Point point); }; diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 2ff9e0b..dcad405 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -41,12 +41,19 @@ GameModel::GameModel(): //sim->wtypes[i] } + //Set default brush palette brushList.push_back(new Brush(ui::Point(4, 4))); brushList.push_back(new EllipseBrush(ui::Point(4, 4))); - activeTools[0] = new ElementTool(1, "TURD", 0, 0, 0); - activeTools[1] = new ElementTool(0, "TURD", 0, 0, 0); - //activeTool[1] = new ElementTool(0, "TURD", 0, 0, 0); + //Set default tools + activeTools[0] = menuList[SC_POWDERS]->GetToolList()[0]; + activeTools[1] = menuList[SC_SPECIAL]->GetToolList()[0]; + + //Set default menu + activeMenu = menuList[SC_POWDERS]; + toolList = menuList[SC_POWDERS]->GetToolList(); + + //Load last user std::cout << Client::Ref().GetAuthUser().Username << std::endl; if(Client::Ref().GetAuthUser().ID) { diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index a443025..e93b9b7 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -277,6 +277,7 @@ void GameView::NotifyActiveToolsChanged(GameModel * sender) void GameView::NotifyToolListChanged(GameModel * sender) { + //int currentY = YRES+MENUSIZE-36; int currentX = XRES+BARSIZE-56; int totalColour; for(int i = 0; i < menuButtons.size(); i++) @@ -299,8 +300,10 @@ void GameView::NotifyToolListChanged(GameModel * sender) vector toolList = sender->GetToolList(); for(int i = 0; i < toolList.size(); i++) { - ToolButton * tempButton = new ToolButton(ui::Point(currentX, YRES), ui::Point(32, 16), toolList[i]->GetName()); - currentX -= 36; + //ToolButton * tempButton = new ToolButton(ui::Point(XRES+1, currentY), ui::Point(28, 15), toolList[i]->GetName()); + ToolButton * tempButton = new ToolButton(ui::Point(currentX, YRES+1), ui::Point(28, 15), toolList[i]->GetName()); + //currentY -= 17; + currentX -= 32; tempButton->SetActionCallback(new ToolAction(this, toolList[i])); tempButton->SetBackgroundColour(ui::Colour(toolList[i]->colRed, toolList[i]->colGreen, toolList[i]->colBlue)); @@ -507,6 +510,9 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool zoomCursorFixed = false; c->SetZoomEnabled(true); break; + case '`': + c->ShowConsole(); + break; } } diff --git a/src/game/ToolButton.cpp b/src/game/ToolButton.cpp index 374d424..27bbab6 100644 --- a/src/game/ToolButton.cpp +++ b/src/game/ToolButton.cpp @@ -43,11 +43,11 @@ void ToolButton::Draw(const ui::Point& screenPos) if (totalColour<544) { - g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, ButtonText.c_str(), 255, 255, 255, 255); + g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, buttonDisplayText.c_str(), 255, 255, 255, 255); } else { - g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, ButtonText.c_str(), 0, 0, 0, 255); + g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, buttonDisplayText.c_str(), 0, 0, 0, 255); } if(currentSelection!=-1) { diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index fc3eda5..095ef30 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -25,7 +25,7 @@ Button::Button(Point position, Point size, std::string buttonText): actionCallback(NULL), textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), - textHAlign(AlignCentre), + textHAlign(AlignLeft), Enabled(true), icon(NoIcon) { @@ -36,6 +36,16 @@ Button::Button(Point position, Point size, std::string buttonText): void Button::TextPosition() { + buttonDisplayText = ButtonText; + if(buttonDisplayText.length()) + { + if(Graphics::textwidth((char *)buttonDisplayText.c_str()) > Size.X - (icon? 22 : 0)) + { + int position = Graphics::textwidthx((char *)buttonDisplayText.c_str(), Size.X - (icon? 38 : 22)); + buttonDisplayText = buttonDisplayText.erase(position, buttonDisplayText.length()-position); + buttonDisplayText += "..."; + } + } switch(textVAlign) { case AlignTop: @@ -45,7 +55,7 @@ void Button::TextPosition() textPosition.Y = (Size.Y-10)/2; break; case AlignBottom: - textPosition.Y = Size.Y-11; + textPosition.Y = Size.Y-12; break; } @@ -57,10 +67,10 @@ void Button::TextPosition() textPosition.X = 3+17; break; case AlignCentre: - textPosition.X = (((Size.X-14)-Graphics::textwidth((char *)ButtonText.c_str()))/2)+17; + textPosition.X = (((Size.X-14)-Graphics::textwidth((char *)buttonDisplayText.c_str()))/2)+17; break; case AlignRight: - textPosition.X = (((Size.X-14)-Graphics::textwidth((char *)ButtonText.c_str()))-2)+17; + textPosition.X = (((Size.X-14)-Graphics::textwidth((char *)buttonDisplayText.c_str()))-2)+17; break; } } @@ -72,10 +82,10 @@ void Button::TextPosition() textPosition.X = 3; break; case AlignCentre: - textPosition.X = (Size.X-Graphics::textwidth((char *)ButtonText.c_str()))/2; + textPosition.X = (Size.X-Graphics::textwidth((char *)buttonDisplayText.c_str()))/2; break; case AlignRight: - textPosition.X = (Size.X-Graphics::textwidth((char *)ButtonText.c_str()))-2; + textPosition.X = (Size.X-Graphics::textwidth((char *)buttonDisplayText.c_str()))-2; break; } } @@ -124,20 +134,20 @@ void Button::Draw(const Point& screenPos) { g->fillrect(Position.X-1, Position.Y-1, Size.X+2, Size.Y+2, activeBackground.Red, activeBackground.Green, activeBackground.Blue, 255); g->drawrect(Position.X, Position.Y, Size.X, Size.Y, activeBorder.Red, activeBorder.Green, activeBorder.Blue, 255); - g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, activeText.Red, activeText.Green, activeText.Blue, 255); + g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y+1, buttonDisplayText, activeText.Red, activeText.Green, activeText.Blue, 255); } else { g->fillrect(Position.X, Position.Y, Size.X, Size.Y, background.Red, background.Green, background.Blue, 255); g->drawrect(Position.X, Position.Y, Size.X, Size.Y, border.Red, border.Green, border.Blue, 255); - g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, text.Red, text.Green, text.Blue, 255); + g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y+1, buttonDisplayText, text.Red, text.Green, text.Blue, 255); } } else { g->fillrect(Position.X, Position.Y, Size.X, Size.Y, background.Red, background.Green, background.Blue, 180); g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 180, 180, 180, 255); - g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y, ButtonText, 180, 180, 180, 255); + g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y+1, buttonDisplayText, 180, 180, 180, 255); } if(icon) g->draw_icon(Position.X+3, Position.Y+textPosition.Y, icon); diff --git a/src/interface/Button.h b/src/interface/Button.h index 4537e1f..6f485cb 100644 --- a/src/interface/Button.h +++ b/src/interface/Button.h @@ -33,8 +33,6 @@ public: bool Toggleable; bool Enabled; - std::string ButtonText; - virtual void OnMouseClick(int x, int y, unsigned int button); virtual void OnMouseUp(int x, int y, unsigned int button); //virtual void OnMouseUp(int x, int y, unsigned int button); @@ -72,6 +70,9 @@ protected: Colour border, activeBorder; Colour text, activeText; + std::string buttonDisplayText; + std::string ButtonText; + bool isButtonDown, state, isMouseInside, isTogglable, toggle; ButtonAction * actionCallback; ui::Point textPosition; diff --git a/src/interface/Keys.h b/src/interface/Keys.h index b5ae97b..5350b06 100644 --- a/src/interface/Keys.h +++ b/src/interface/Keys.h @@ -7,6 +7,8 @@ #define KEY_BACKSPACE SDLK_BACKSPACE #define KEY_DELETE SDLK_DELETE #define KEY_TAB SDLK_TAB +#define KEY_RETURN SDLK_RETURN +#define KEY_ENTER SDLK_KP_ENTER #define KEY_CTRL SDLK_LCTRL #define KEY_ALT SDLK_LALT diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp index 5985ce1..0341ff3 100644 --- a/src/interface/Textbox.cpp +++ b/src/interface/Textbox.cpp @@ -16,7 +16,8 @@ Textbox::Textbox(Point position, Point size, std::string textboxText): textVAlign(AlignMiddle), textHAlign(AlignCentre), actionCallback(NULL), - masked(false) + masked(false), + border(true) { SetText(textboxText); TextPosition(); @@ -31,11 +32,9 @@ Textbox::~Textbox() void Textbox::TextPosition() { - std::string tempText = displayText; - if(tempText.length() && cursor) + if(cursor) { - tempText.erase(cursor, tempText.length()-cursor); - cursorPosition = Graphics::textwidth((char *)tempText.c_str()); + cursorPosition = Graphics::textnwidth((char *)displayText.c_str(), cursor); } else { @@ -71,6 +70,7 @@ void Textbox::TextPosition() void Textbox::SetText(std::string text) { + cursor = text.length(); if(masked) { char tempText[text.length()]; @@ -86,6 +86,13 @@ void Textbox::SetText(std::string text) TextPosition(); } + +void Textbox::SetDisplayText(std::string text) +{ + displayText = text; + TextPosition(); +} + std::string Textbox::GetText() { return text; @@ -153,17 +160,18 @@ void Textbox::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool cursor++; changed = true; } - if(changed && actionCallback) - { - actionCallback->TextChangedCallback(this); - } } catch(std::out_of_range &e) { cursor = 0; text = ""; } - SetText(text); + if(changed) + { + SetText(text); + if(actionCallback) + actionCallback->TextChangedCallback(this); + } TextPosition(); } @@ -172,12 +180,12 @@ void Textbox::Draw(const Point& screenPos) Graphics * g = Engine::Ref().g; if(IsFocused()) { - g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); + if(border) g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); g->draw_line(screenPos.X+textPosition.X+cursorPosition, screenPos.Y+3, screenPos.X+textPosition.X+cursorPosition, screenPos.Y+12, 255, 255, 255, XRES+BARSIZE); } else { - g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 160, 160, 160, 255); + if(border) g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 160, 160, 160, 255); } g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, displayText, 255, 255, 255, 255); } diff --git a/src/interface/Textbox.h b/src/interface/Textbox.h index 889a4e8..c29e01b 100644 --- a/src/interface/Textbox.h +++ b/src/interface/Textbox.h @@ -17,6 +17,7 @@ public: }; class Textbox : public Component { + friend class TextboxAction; protected: std::string text; std::string displayText; @@ -26,12 +27,14 @@ protected: int cursor, cursorPosition; TextboxAction *actionCallback; bool masked; + bool border; public: Textbox(Point position, Point size, std::string textboxText); virtual ~Textbox(); virtual void TextPosition(); virtual void SetText(std::string text); + virtual void SetDisplayText(std::string text); std::string GetText(); HorizontalAlignment GetHAlignment() { return textHAlign; } VerticalAlignment GetVAlignment() { return textVAlign; } @@ -42,6 +45,8 @@ public: void SetHidden(bool hidden) { masked = hidden; } bool GetHidden() { return masked; } + void SetBorder(bool border) {this->border = border;} + virtual void Draw(const Point& screenPos); }; } diff --git a/src/login/LoginView.cpp b/src/login/LoginView.cpp index e73d014..1ae9ef8 100644 --- a/src/login/LoginView.cpp +++ b/src/login/LoginView.cpp @@ -55,6 +55,24 @@ LoginView::LoginView(): AddComponent(infoLabel); } +void LoginView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + switch(key) + { + case KEY_TAB: + if(IsFocused(usernameField)) + FocusComponent(passwordField); + else + FocusComponent(usernameField); + break; + case KEY_ENTER: + case KEY_RETURN: + if(IsFocused(passwordField)) + loginButton->DoAction(); + break; + } +} + void LoginView::NotifyStatusChanged(LoginModel * sender) { infoLabel->SetText(sender->GetStatusText()); diff --git a/src/login/LoginView.h b/src/login/LoginView.h index 1099278..7ae5393 100644 --- a/src/login/LoginView.h +++ b/src/login/LoginView.h @@ -29,6 +29,7 @@ public: class LoginAction; class CancelAction; LoginView(); + virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); void AttachController(LoginController * c_) { c = c_; } void NotifyStatusChanged(LoginModel * sender); virtual void OnDraw(); diff --git a/src/preview/PreviewController.cpp b/src/preview/PreviewController.cpp index 558d705..558ccb4 100644 --- a/src/preview/PreviewController.cpp +++ b/src/preview/PreviewController.cpp @@ -5,6 +5,7 @@ * Author: Simon */ +#include #include "PreviewController.h" #include "PreviewView.h" #include "PreviewModel.h" @@ -43,6 +44,16 @@ void PreviewController::DoOpen() previewModel->SetDoOpen(true); } +void PreviewController::OpenInBrowser() +{ + if(previewModel->GetSave()) + { + std::stringstream uriStream; + uriStream << "http://" << SERVER << "/Browse/View.html?ID=" << previewModel->GetSave()->id; + OpenURI(uriStream.str()); + } +} + void PreviewController::Exit() { if(ui::Engine::Ref().GetWindow() == previewView) diff --git a/src/preview/PreviewController.h b/src/preview/PreviewController.h index e9b0fb5..595a30f 100644 --- a/src/preview/PreviewController.h +++ b/src/preview/PreviewController.h @@ -24,6 +24,7 @@ public: PreviewController(int saveID, ControllerCallback * callback); void Exit(); void DoOpen(); + void OpenInBrowser(); bool GetDoOpen(); Save * GetSave(); PreviewView * GetView() { return previewView; } diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index 68a224b..3a731dc 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -25,12 +25,28 @@ PreviewView::PreviewView(): v->c->Exit(); } }; - openButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(75, 16), "Open"); + openButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(50, 16), "Open"); openButton->SetAlignment(AlignLeft, AlignMiddle); openButton->SetIcon(IconOpen); openButton->SetActionCallback(new OpenAction(this)); AddComponent(openButton); + class BrowserOpenAction: public ui::ButtonAction + { + PreviewView * v; + public: + BrowserOpenAction(PreviewView * v_){ v = v_; } + virtual void ActionCallback(ui::Button * sender) + { + v->c->OpenInBrowser(); + } + }; + browserOpenButton = new ui::Button(ui::Point((XRES/2)-90, Size.Y-16), ui::Point(90, 16), "Open in browser"); + browserOpenButton->SetAlignment(AlignLeft, AlignMiddle); + browserOpenButton->SetIcon(IconOpen); + browserOpenButton->SetActionCallback(new BrowserOpenAction(this)); + AddComponent(browserOpenButton); + saveNameLabel = new ui::Label(ui::Point(5, (YRES/2)+15), ui::Point(100, 16), ""); saveNameLabel->SetAlignment(AlignLeft, AlignBottom); AddComponent(saveNameLabel); diff --git a/src/preview/PreviewView.h b/src/preview/PreviewView.h index dbc3248..9368732 100644 --- a/src/preview/PreviewView.h +++ b/src/preview/PreviewView.h @@ -20,6 +20,7 @@ class PreviewView: public ui::Window { PreviewController * c; Thumbnail * savePreview; ui::Button * openButton; + ui::Button * browserOpenButton; ui::Label * saveNameLabel; ui::Label * authorDateLabel; int votesUp; -- cgit v0.9.2-21-gd62e From f86091d421989ead46940cc12b77e48cfb127608 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 1 Feb 2012 21:20:27 +0000 Subject: Use useragent for version, fix URl encoding diff --git a/src/Config.h b/src/Config.h index 37a1a65..1f00e62 100644 --- a/src/Config.h +++ b/src/Config.h @@ -22,6 +22,24 @@ #define BUILD_NUM 133 //VersionInfoEnd +#ifdef BETA +#define IDENT_RELTYPE "B" +#else +#define IDENT_RELTYPE "S" +#endif + +#ifdef WIN32 +#define IDENT_PLATFORM "WIN32" +#elif defined(MACOSX) +#define IDENT_PLATFORM "MACOSX" +#elif defined(LIN32) +#define IDENT_PLATFORM "LIN32" +#elif defined(LIN64) +#define IDENT_PLATFORM "LIN64" +#else +#define IDENT_PLATFORM "UNKNOWN" +#endif + #define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter #define MTOS_EXPAND(str) #str diff --git a/src/Misc.cpp b/src/Misc.cpp index 1e73574..fcea100 100644 --- a/src/Misc.cpp +++ b/src/Misc.cpp @@ -205,6 +205,35 @@ void strcaturl(char *dst, char *src) *d = 0; } +std::string URLEscape(std::string source) +{ + char * src = (char *)source.c_str(); + char * dst = (char *)calloc((source.length()*3)+2, 1); + char *d; + unsigned char *s; + + for (d=dst; *d; d++) ; + + for (s=(unsigned char *)src; *s; s++) + { + if ((*s>='0' && *s<='9') || + (*s>='a' && *s<='z') || + (*s>='A' && *s<='Z')) + *(d++) = *s; + else + { + *(d++) = '%'; + *(d++) = hex[*s>>4]; + *(d++) = hex[*s&15]; + } + } + *d = 0; + + std::string finalString(dst); + free(dst); + return finalString; +} + void strappend(char *dst, char *src) { char *d; diff --git a/src/Misc.h b/src/Misc.h index 2dd96b2..6aff3da 100644 --- a/src/Misc.h +++ b/src/Misc.h @@ -69,6 +69,8 @@ int load_string(FILE *f, char *str, int max); void strcaturl(char *dst, char *src); +std::string URLEscape(std::string source); + void strappend(char *dst, char *src); void *file_load(char *fn, int *size); diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 3706cf9..ce7c9e6 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -9,6 +9,7 @@ #include "Client.h" #include "MD5.h" #include "Graphics.h" +#include "Misc.h" #include "interface/Point.h" @@ -434,12 +435,12 @@ std::vector * Client::SearchSaves(int start, int count, string query, str { urlStream << "&Search_Query="; if(query.length()) - urlStream << query; + urlStream << URLEscape(query); if(sort == "date") { if(query.length()) - urlStream << " "; - urlStream << "sort:" << sort; + urlStream << URLEscape(" "); + urlStream << URLEscape("sort:") << URLEscape(sort); } } diff --git a/src/client/HTTP.cpp b/src/client/HTTP.cpp index b4f4777..ba2c1bb 100644 --- a/src/client/HTTP.cpp +++ b/src/client/HTTP.cpp @@ -464,7 +464,7 @@ int http_async_req_status(void *ctx) if (cx->txdl) { // generate POST - cx->tbuf = (char *)malloc(strlen(cx->host) + strlen(cx->path) + 121 + cx->txdl + cx->thlen); + cx->tbuf = (char *)malloc(strlen(cx->host) + strlen(cx->path) + 121 + 128 + cx->txdl + cx->thlen); cx->tptr = 0; cx->tlen = 0; cx->tlen += sprintf(cx->tbuf+cx->tlen, "POST %s HTTP/1.1\n", cx->path); @@ -480,11 +480,12 @@ int http_async_req_status(void *ctx) cx->thlen = 0; } cx->tlen += sprintf(cx->tbuf+cx->tlen, "Content-Length: %d\n", cx->txdl); -#ifdef BETA - cx->tlen += sprintf(cx->tbuf+cx->tlen, "X-Powder-Version: %s%dB%d\n", IDENT_VERSION, SAVE_VERSION, MINOR_VERSION); -#else - cx->tlen += sprintf(cx->tbuf+cx->tlen, "X-Powder-Version: %s%dS%d\n", IDENT_VERSION, SAVE_VERSION, MINOR_VERSION); -#endif + cx->tlen += sprintf(cx->tbuf+cx->tlen, "User-Agent: PowderToy/%d.%d (%s; M%d) TPTPP/%s%d.%d.%d%s\n", SAVE_VERSION, MINOR_VERSION, IDENT_PLATFORM, 0, IDENT_VERSION, SAVE_VERSION, MINOR_VERSION, BUILD_NUM, IDENT_RELTYPE); +//#ifdef BETA +// cx->tlen += sprintf(cx->tbuf+cx->tlen, "X-Powder-Version: %s%dB%d\n", IDENT_VERSION, SAVE_VERSION, MINOR_VERSION); +//#else +// cx->tlen += sprintf(cx->tbuf+cx->tlen, "X-Powder-Version: %s%dS%d\n", IDENT_VERSION, SAVE_VERSION, MINOR_VERSION); +//#endif cx->tlen += sprintf(cx->tbuf+cx->tlen, "\n"); memcpy(cx->tbuf+cx->tlen, cx->txd, cx->txdl); cx->tlen += cx->txdl; @@ -495,7 +496,7 @@ int http_async_req_status(void *ctx) else { // generate GET - cx->tbuf = (char *)malloc(strlen(cx->host) + strlen(cx->path) + 89 + cx->thlen); + cx->tbuf = (char *)malloc(strlen(cx->host) + strlen(cx->path) + 89 + 128 + cx->thlen); cx->tptr = 0; cx->tlen = 0; cx->tlen += sprintf(cx->tbuf+cx->tlen, "GET %s HTTP/1.1\n", cx->path); @@ -510,11 +511,13 @@ int http_async_req_status(void *ctx) } if (!cx->keep) cx->tlen += sprintf(cx->tbuf+cx->tlen, "Connection: close\n"); -#ifdef BETA + cx->tlen += sprintf(cx->tbuf+cx->tlen, "User-Agent: PowderToy/%d.%d (%s; M%d) TPTPP/%s%d.%d.%d%s\n", SAVE_VERSION, MINOR_VERSION, IDENT_PLATFORM, 0, IDENT_VERSION, SAVE_VERSION, MINOR_VERSION, BUILD_NUM, IDENT_RELTYPE); + +/*#ifdef BETA cx->tlen += sprintf(cx->tbuf+cx->tlen, "X-Powder-Version: %s%dB%d\n", IDENT_VERSION, SAVE_VERSION, MINOR_VERSION); #else cx->tlen += sprintf(cx->tbuf+cx->tlen, "X-Powder-Version: %s%dS%d\n", IDENT_VERSION, SAVE_VERSION, MINOR_VERSION); -#endif +#endif*/ cx->tlen += sprintf(cx->tbuf+cx->tlen, "\n"); } cx->state = HTS_XMIT; diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index dcad405..4fe65ea 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -33,6 +33,10 @@ GameModel::GameModel(): menuList[sim->ptypes[i].menusection]->AddTool(tempTool); } } + + //Build menu for GOL types + //for(int i = 0; i < GOL_) + //Build other menus from wall data for(int i = 0; i < UI_WALLCOUNT; i++) { -- cgit v0.9.2-21-gd62e From f5dd32b284fd311dd58070b6f431ec535fa93387 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 2 Feb 2012 00:33:10 +0000 Subject: Working GOL (No graphics diff --git a/src/Config.h b/src/Config.h index 1f00e62..780dd89 100644 --- a/src/Config.h +++ b/src/Config.h @@ -123,7 +123,7 @@ extern unsigned char ZSIZE; #define SAVE_OPS -#define NGOL 25 +#define NGOL 24 #define NGOLALT 24 //NGOL should be 24, but use this var until I find out why #define CIRCLE_BRUSH 0 diff --git a/src/elements/newgraphics.cpp b/src/elements/newgraphics.cpp index efdf128..3b19ef2 100644 --- a/src/elements/newgraphics.cpp +++ b/src/elements/newgraphics.cpp @@ -95,7 +95,7 @@ int graphics_LIFE(GRAPHICS_FUNC_ARGS) else pc = PIXRGB(255, 255, 0); } else { - //pc = gmenu[cpart->ctype].colour; + pc = PIXRGB(255, 255, 0);//sim->gmenu[cpart->ctype].colour; } *colr = PIXR(pc); *colg = PIXG(pc); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 4fe65ea..c026da8 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -35,7 +35,11 @@ GameModel::GameModel(): } //Build menu for GOL types - //for(int i = 0; i < GOL_) + for(int i = 0; i < NGOL; i++) + { + Tool * tempTool = new GolTool(i, sim->gmenu[i].name, PIXR(sim->gmenu[i].colour), PIXG(sim->gmenu[i].colour), PIXB(sim->gmenu[i].colour)); + menuList[SC_LIFE]->AddTool(tempTool); + } //Build other menus from wall data for(int i = 0; i < UI_WALLCOUNT; i++) diff --git a/src/game/Tool.h b/src/game/Tool.h index 440ee62..bffa967 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -53,4 +53,23 @@ public: } }; +class GolTool: public Tool +{ +public: + GolTool(int id, string name, int r, int g, int b): + Tool(id, name, r, g, b) + { + } + virtual ~GolTool() {} + virtual void Draw(Simulation * sim, Brush * brush, ui::Point position){ + sim->create_parts(position.X, position.Y, 1, 1, PT_LIFE|(toolID<<8), 0, brush); + } + virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + sim->create_line(position1.X, position1.Y, position2.X, position2.Y, 1, 1, PT_LIFE|(toolID<<8), 0, brush); + } + virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + sim->create_box(position1.X, position1.Y, position2.X, position2.Y, PT_LIFE|(toolID<<8), 0); + } +}; + #endif /* TOOL_H_ */ diff --git a/src/interface/Spinner b/src/interface/Spinner new file mode 100644 index 0000000..e69de29 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index c642b76..11414ea 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3213,6 +3213,16 @@ Simulation::Simulation(): memcpy(ptransitions, ptransitionsT, sizeof(part_transition) * transitionCount); free(ptransitionsT); + int golRulesCount; + int * golRulesT = LoadGOLRules(golRulesCount); + memcpy(grule, golRulesT, sizeof(int) * (golRulesCount*10)); + free(golRulesT); + + int golMenuCount; + gol_menu * golMenuT = LoadGOLMenu(golMenuCount); + memcpy(gmenu, golMenuT, sizeof(gol_menu) * golMenuCount); + free(golMenuT); + init_can_move(); clear_sim(); } diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 6b19727..9ec5e67 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -8,6 +8,78 @@ #include "ElementFunctions.h" #include "ElementGraphics.h" +gol_menu * LoadGOLMenu(int & golMenuCount) +{ + gol_menu golMenu[NGOL] = + { + {"GOL", PIXPACK(0x0CAC00), 0, "Game Of Life B3/S23"}, + {"HLIF", PIXPACK(0xFF0000), 1, "High Life B36/S23"}, + {"ASIM", PIXPACK(0x0000FF), 2, "Assimilation B345/S4567"}, + {"2x2", PIXPACK(0xFFFF00), 3, "2x2 B36/S125"}, + {"DANI", PIXPACK(0x00FFFF), 4, "Day and Night B3678/S34678"}, + {"AMOE", PIXPACK(0xFF00FF), 5, "Amoeba B357/S1358"}, + {"MOVE", PIXPACK(0xFFFFFF), 6, "'Move' particles. Does not move things.. it is a life type B368/S245"}, + {"PGOL", PIXPACK(0xE05010), 7, "Pseudo Life B357/S238"}, + {"DMOE", PIXPACK(0x500000), 8, "Diamoeba B35678/S5678"}, + {"34", PIXPACK(0x500050), 9, "34 B34/S34"}, + {"LLIF", PIXPACK(0x505050), 10, "Long Life B345/S5"}, + {"STAN", PIXPACK(0x5000FF), 11, "Stains B3678/S235678"}, + {"SEED", PIXPACK(0xFBEC7D), 12, "B2/S"}, + {"MAZE", PIXPACK(0xA8E4A0), 13, "B3/S12345"}, + {"COAG", PIXPACK(0x9ACD32), 14, "B378/S235678"}, + {"WALL", PIXPACK(0x0047AB), 15, "B45678/S2345"}, + {"GNAR", PIXPACK(0xE5B73B), 16, "B1/S1"}, + {"REPL", PIXPACK(0x259588), 17, "B1357/S1357"}, + {"MYST", PIXPACK(0x0C3C00), 18, "B3458/S05678"}, + {"LOTE", PIXPACK(0xFF0000), 19, "Behaves kinda like Living on the Edge S3458/B37/4"}, + {"FRG2", PIXPACK(0x00FF00), 20, "Like Frogs rule S124/B3/3"}, + {"STAR", PIXPACK(0x0000FF), 21, "Like Star Wars rule S3456/B278/6"}, + {"FROG", PIXPACK(0x00AA00), 22, "Frogs S12/B34/3"}, + {"BRAN", PIXPACK(0xCCCC00), 23, "Brian 6 S6/B246/3"} + }; + golMenuCount = NGOL; + gol_menu * golMenuT = (gol_menu*)malloc(NGOL*sizeof(gol_menu)); + memcpy(golMenuT, golMenu, NGOL*sizeof(gol_menu)); + return golMenuT; +} + +int * LoadGOLRules(int & golRuleCount) +{ + int golRules[NGOL+1][10] = + { + // 0,1,2,3,4,5,6,7,8,STATES live=1 spawn=2 spawn&live=3 States are kind of how long until it dies, normal ones use two states(living,dead) for others the intermediate states live but do nothing + {0,0,0,0,0,0,0,0,0,2},//blank + {0,0,1,3,0,0,0,0,0,2},//GOL + {0,0,1,3,0,0,2,0,0,2},//HLIF + {0,0,0,2,3,3,1,1,0,2},//ASIM + {0,1,1,2,0,1,2,0,0,2},//2x2 + {0,0,0,3,1,0,3,3,3,2},//DANI + {0,1,0,3,0,3,0,2,1,2},//AMOE + {0,0,1,2,1,1,2,0,2,2},//MOVE + {0,0,1,3,0,2,0,2,1,2},//PGOL + {0,0,0,2,0,3,3,3,3,2},//DMOE + {0,0,0,3,3,0,0,0,0,2},//34 + {0,0,0,2,2,3,0,0,0,2},//LLIF + {0,0,1,3,0,1,3,3,3,2},//STAN + {0,0,2,0,0,0,0,0,0,2},//SEED + {0,1,1,3,1,1,0,0,0,2},//MAZE + {0,0,1,3,0,1,1,3,3,2},//COAG + {0,0,1,1,3,3,2,2,2,2},//WALL + {0,3,0,0,0,0,0,0,0,2},//GNAR + {0,3,0,3,0,3,0,3,0,2},//REPL + {1,0,0,2,2,3,1,1,3,2},//MYST + {0,0,0,3,1,1,0,2,1,4},//LOTE + {0,1,1,2,1,0,0,0,0,3},//FRG2 + {0,0,2,1,1,1,1,2,2,6},//STAR + {0,1,1,2,2,0,0,0,0,3},//FROG + {0,0,2,0,2,0,3,0,0,3},//BRAN + }; + golRuleCount = NGOL+1; + int * golRulesT = (int*)malloc((golRuleCount*10)*sizeof(int)); + memcpy(golRulesT, golRules, (golRuleCount*10)*sizeof(int)); + return golRulesT; +} + wall_type * LoadWalls(int & wallCount) { wall_type wtypes[] = diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index 37bfb37..ee31aea 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -75,6 +75,10 @@ struct menu_section; struct wall_type; +gol_menu * LoadGOLMenu(int & golMenuCount); + +int * LoadGOLRules(int & golRuleCount); + wall_type * LoadWalls(int & wallCount); menu_section * LoadMenus(int & menuCount); -- cgit v0.9.2-21-gd62e From 6641f1d54196a2193b258d3e76e2cca6ad3258b1 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 2 Feb 2012 11:55:43 +0000 Subject: Frame stepping diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index a4e0ccc..5c8ed6f 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -343,6 +343,12 @@ void GameController::OpenSaveWindow() } } +void GameController::FrameStep() +{ + gameModel->FrameStep(1); + gameModel->SetPaused(true); +} + void GameController::Vote(int direction) { if(gameModel->GetSave() && gameModel->GetUser().ID && gameModel->GetSave()->GetID() && gameModel->GetSave()->GetVote()==0) diff --git a/src/game/GameController.h b/src/game/GameController.h index 84af343..0e70371 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -60,6 +60,7 @@ public: void Vote(int direction); void ChangeBrush(); void ShowConsole(); + void FrameStep(); ui::Point PointTranslate(ui::Point point); }; diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index c026da8..6fc9dea 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -277,6 +277,11 @@ bool GameModel::GetPaused() return sim->sys_pause?true:false; } +void GameModel::FrameStep(int frames) +{ + sim->framerender += frames; +} + void GameModel::ClearSimulation() { sim->clear_sim(); diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 0d7fc3f..170d1ed 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -70,6 +70,7 @@ public: vector GetToolList(); void SetActiveMenu(Menu * menu); Menu * GetActiveMenu(); + void FrameStep(int frames); User GetUser(); void SetUser(User user); void SetBrush(int i); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index e93b9b7..9e4a6dd 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -513,6 +513,9 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool case '`': c->ShowConsole(); break; + case 'f': + c->FrameStep(); + break; } } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 11414ea..9e58f22 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2076,7 +2076,7 @@ void Simulation::update_particles_i(int start, int inc) int lighting_ok=1; float pGravX, pGravY, pGravD; - if (sys_pause&&lighting_recreate>0) + if (lighting_recreate>0) { for (i=0; i<=parts_lastActiveIndex; i++) { @@ -2097,8 +2097,8 @@ void Simulation::update_particles_i(int start, int inc) if (lighting_recreate>21) lighting_recreate=21; - if (sys_pause&&!framerender)//do nothing if paused - return; + //if (sys_pause&&!framerender)//do nothing if paused + // return; //wire! if(elementCount[PT_WIRE] > 0) @@ -3078,7 +3078,8 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu pthread_t *InterThreads; #endif - air->update_air(); + if(!sys_pause||framerender) + air->update_air(); memset(pmap, 0, sizeof(pmap)); memset(photons, 0, sizeof(photons)); @@ -3130,8 +3131,11 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu } } - update_particles_i(0, 1); + if(!sys_pause||framerender) + update_particles_i(0, 1); + if(framerender) + framerender--; // this should probably be elsewhere /*for (y=0; y Date: Thu, 2 Feb 2012 12:09:11 +0000 Subject: Flood fill diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 5c8ed6f..7df654f 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -173,7 +173,12 @@ void GameController::DrawLine(int toolSelection, ui::Point point1, ui::Point poi void GameController::DrawFill(int toolSelection, ui::Point point) { - + Simulation * sim = gameModel->GetSimulation(); + Tool * activeTool = gameModel->GetActiveTool(toolSelection); + Brush * cBrush = gameModel->GetBrush(); + if(!activeTool || !cBrush) + return; + activeTool->DrawFill(sim, cBrush, point); } void GameController::DrawPoints(int toolSelection, queue & pointQueue) diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 9e4a6dd..1336552 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -549,7 +549,7 @@ void GameView::OnTick(float dt) c->DrawPoints(toolIndex, pointQueue); } } - if(drawMode == DrawFill) + if(drawMode == DrawFill && isMouseDown) { c->DrawFill(toolIndex, currentMouse); } diff --git a/src/game/Tool.h b/src/game/Tool.h index bffa967..00b1184 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -31,6 +31,7 @@ public: virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) {} virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {} virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {} + virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) {}; int colRed, colBlue, colGreen; }; @@ -51,6 +52,9 @@ public: virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { sim->create_box(position1.X, position1.Y, position2.X, position2.Y, toolID, 0); } + virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { + sim->flood_parts(position.X, position.Y, toolID, -1, -1, 0); + } }; class GolTool: public Tool @@ -70,6 +74,9 @@ public: virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { sim->create_box(position1.X, position1.Y, position2.X, position2.Y, PT_LIFE|(toolID<<8), 0); } + virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { + sim->flood_parts(position.X, position.Y, PT_LIFE|(toolID<<8), -1, -1, 0); + } }; #endif /* TOOL_H_ */ -- cgit v0.9.2-21-gd62e From 54c8dbb2503a5962ec3e8b728f7c0aecdd347606 Mon Sep 17 00:00:00 2001 From: savask Date: Sun, 5 Feb 2012 20:27:16 +0800 Subject: Fix pointer errors for linux. diff --git a/src/Misc.cpp b/src/Misc.cpp index fcea100..7020ea2 100644 --- a/src/Misc.cpp +++ b/src/Misc.cpp @@ -659,9 +659,9 @@ void OpenURI(std::string uri) { strappend(cmd, uri.c_str()); system(cmd); #elif LIN32 - char *cmd = malloc(11+uri.length()); + char *cmd = (char*)malloc(11+uri.length()); strcpy(cmd, "xdg-open "); - strappend(cmd, uri.c_str()); + strappend(cmd, (char*)uri.c_str()); system(cmd); #elif LIN64 char *cmd = malloc(11+uri.length()); -- cgit v0.9.2-21-gd62e From 7ae5eaab79a41f31b633ca6f1bfb0dbae2fccb90 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 5 Feb 2012 16:37:36 +0000 Subject: Started intrepreter for tpt script and various things for console diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 1886bde..880aa7e 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -51,8 +51,8 @@ SDL_Surface * SDLOpen() { freopen("CON", "w", stdout); - freopen("con", "w", stderr); - fclose(console); + freopen("CON", "w", stderr); + //fclose(console); } #endif #ifdef WIN32 diff --git a/src/cat/CommandInterface.cpp b/src/cat/CommandInterface.cpp new file mode 100644 index 0000000..485a029 --- /dev/null +++ b/src/cat/CommandInterface.cpp @@ -0,0 +1,107 @@ +/* + * Kitty.cpp + * + * Created on: Feb 2, 2012 + * Author: Simon + */ + +#include +#include +#include +#include "CommandInterface.h" +#include "game/GameModel.h" + +CommandInterface::CommandInterface() { +} + +void CommandInterface::AttachGameModel(GameModel * m) +{ + this->m = m; +} + +int CommandInterface::Command(std::string command) +{ + lastError = "No interpreter"; + return -1; +} + +std::string CommandInterface::FormatCommand(std::string command) +{ + return command; +} + +int CommandInterface::GetPropertyOffset(std::string key_, FormatType & format) +{ + char * key = (char *)key_.c_str(); + int offset; + if (strcmp(key, "type")==0){ + offset = offsetof(Particle, type); + format = FormatInt; + } else if (strcmp(key, "life")==0){ + offset = offsetof(Particle, life); + format = FormatInt; + } else if (strcmp(key, "ctype")==0){ + offset = offsetof(Particle, ctype); + format = FormatInt; + } else if (strcmp(key, "temp")==0){ + offset = offsetof(Particle, temp); + format = FormatFloat; + } else if (strcmp(key, "tmp")==0){ + offset = offsetof(Particle, tmp); + format = FormatInt; + } else if (strcmp(key, "tmp2")==0){ + offset = offsetof(Particle, tmp2); + format = FormatInt; + } else if (strcmp(key, "vy")==0){ + offset = offsetof(Particle, vy); + format = FormatFloat; + } else if (strcmp(key, "vx")==0){ + offset = offsetof(Particle, vx); + format = FormatFloat; + } else if (strcmp(key, "x")==0){ + offset = offsetof(Particle, x); + format = FormatFloat; + } else if (strcmp(key, "y")==0){ + offset = offsetof(Particle, y); + format = FormatFloat; + } else if (strcmp(key, "dcolour")==0){ + offset = offsetof(Particle, dcolour); + format = FormatInt; + } else if (strcmp(key, "dcolor")==0){ + offset = offsetof(Particle, dcolour); + format = FormatInt; + } else { + offset = -1; + } + return offset; +} + +int CommandInterface::GetParticleType(std::string type) +{ + int i = -1; + char * txt = (char*)type.c_str(); + + //Scope + part_type *ptypes = m->GetSimulation()->ptypes; + + // alternative names for some elements + if (strcasecmp(txt,"C4")==0) i = PT_PLEX; + else if (strcasecmp(txt,"C5")==0) i = PT_C5; + else if (strcasecmp(txt,"NONE")==0) i = PT_NONE; + for (i=1; i +//#include "game/GameModel.h" + +class GameModel; +class CommandInterface { +protected: + enum FormatType { FormatInt, FormatString, FormatChar, FormatFloat }; + std::string lastError; + GameModel * m; +public: + CommandInterface(); + int GetPropertyOffset(std::string key_, FormatType & format); + int GetParticleType(std::string type); + void AttachGameModel(GameModel * m); + virtual void Tick() {} + virtual int Command(std::string command); + virtual std::string FormatCommand(std::string command); + std::string GetLastError(); + virtual ~CommandInterface(); +}; + +#endif /* KITTY_H_ */ diff --git a/src/cat/TPTSTypes.cpp b/src/cat/TPTSTypes.cpp new file mode 100644 index 0000000..7b39cc9 --- /dev/null +++ b/src/cat/TPTSTypes.cpp @@ -0,0 +1,112 @@ +/* + * TPTSTypes.cpp + * + * Created on: Feb 4, 2012 + * Author: Simon + */ + +#include +#include +#include "TPTSTypes.h" + +AnyType::AnyType(ValueType type_, void * value_): + type(type_), + value(value_) +{ +} + +ValueType AnyType::GetType() +{ + return type; +} + +AnyType::AnyType(const AnyType & v): + type(v.type), + value(v.value) +{ + if(type == TypeString) + { + value = new std::string(*((std::string*)value)); + } + else if(type == TypePoint) + { + value = new ui::Point(*((ui::Point*)value)); + } +} + +AnyType::operator NumberType() +{ + if(type != TypeNumber) + throw InvalidConversionException(type, TypeNumber); + else + return NumberType((int)value); +} + +AnyType::operator StringType() +{ + if(type == TypeNumber) + { + std::stringstream numberStream; + numberStream << ((NumberType*)this)->Value(); + return StringType(numberStream.str()); + } + else if(type == TypeString && value) + { + return StringType(*((std::string*)value)); + } + else + throw InvalidConversionException(type, TypeString); + +} + +AnyType::operator PointType() +{ + if(type == TypePoint) + { + return PointType(*((ui::Point*)value)); + } + else if(type == TypeString) + { + ui::Point thisPoint = *((ui::Point*)value); + std::stringstream pointStream; + pointStream << thisPoint.X << "," << thisPoint.Y; + return StringType(pointStream.str()); + } + else + throw InvalidConversionException(type, TypePoint); +} + +AnyType::~AnyType() +{ + if(type == TypeString || type == TypePoint) + delete value; +} + +//Number Type + +NumberType::NumberType(int number): AnyType(TypeNumber, (void*)number) { } + +int NumberType::Value() +{ + return (int)value; +} + +//String type + +StringType::StringType(std::string string): AnyType(TypeString, new std::string(string)) { } + +std::string StringType::Value() +{ + return std::string(*((std::string*)value)); +} + +//Point type + +PointType::PointType(ui::Point point): AnyType(TypePoint, new ui::Point(point)) { } + +PointType::PointType(int pointX, int pointY): AnyType(TypePoint, new ui::Point(pointX, pointY)) { } + +ui::Point PointType::Value() +{ + return ui::Point(*((ui::Point*)value)); +} diff --git a/src/cat/TPTSTypes.h b/src/cat/TPTSTypes.h new file mode 100644 index 0000000..ad08f0b --- /dev/null +++ b/src/cat/TPTSTypes.h @@ -0,0 +1,80 @@ +/* + * TPTSTypes.h + * + * Created on: Feb 4, 2012 + * Author: Simon + */ + +#ifndef TPTSTYPES_H_ +#define TPTSTYPES_H_ + +#include +#include "interface/Point.h" + +enum ValueType { TypeNumber, TypePoint, TypeString, TypeNull, TypeFunction }; + +class GeneralException +{ +protected: + std::string exception; +public: + GeneralException(std::string message){ + exception = message; + } + std::string GetExceptionMessage() { + return exception; + } +}; + +class InvalidConversionException: public GeneralException +{ +private: + ValueType from; + ValueType to; +public: + InvalidConversionException(ValueType from_, ValueType to_): GeneralException("Invalid conversion"), from(from_), to(to_) { + } +}; + +class NumberType; +class StringType; +class PointType; + +class AnyType +{ +protected: + ValueType type; + void * value; +public: + AnyType(ValueType type_, void * value_); + AnyType(const AnyType & v); + operator NumberType(); + operator StringType(); + operator PointType(); + ValueType GetType(); + ~AnyType(); +}; + +class NumberType: public AnyType +{ +public: + NumberType(int number); + int Value(); +}; + +class StringType: public AnyType +{ +public: + StringType(std::string string); + std::string Value(); +}; + +class PointType: public AnyType +{ +public: + PointType(ui::Point point); + PointType(int pointX, int pointY); + ui::Point Value(); +}; + +#endif /* TPTSTYPES_H_ */ diff --git a/src/cat/TPTScriptInterface.cpp b/src/cat/TPTScriptInterface.cpp new file mode 100644 index 0000000..7298be5 --- /dev/null +++ b/src/cat/TPTScriptInterface.cpp @@ -0,0 +1,314 @@ +/* + * TPTScriptInterface.cpp + * + * Created on: Feb 5, 2012 + * Author: Simon + */ + +#include +#include +#include +#include +#include +#include +#include "TPTScriptInterface.h" +#include "game/GameModel.h" + +TPTScriptInterface::TPTScriptInterface() { +} + +int TPTScriptInterface::Command(std::string command) +{ + lastError = ""; + std::deque words; + std::deque commandWords; + int retCode; + + //Split command into words, put them on the stack + char * rawCommand; + rawCommand = (char*)calloc(command.length()+1, 1); + memcpy(rawCommand, (char*)command.c_str(), command.length()); + char * currentWord = rawCommand; + char * currentCommand = rawCommand; + while((currentCommand = strchr(currentCommand, ' '))) + { + currentCommand[0] = 0; + words.push_back(std::string(currentWord)); + currentWord = ++currentCommand; + } + words.push_back(std::string(currentWord)); + while(!words.empty()) + { + try + { + commandWords.push_back(eval(&words)); + } + catch (GeneralException & e) + { + retCode = -1; + lastError = e.GetExceptionMessage(); + break; + } + } + free(rawCommand); + if(commandWords.size()) + { + retCode = 0; + lastError = ((StringType)commandWords.front()).Value(); + } + + //Evaluate + return 0; +} + +ValueType TPTScriptInterface::testType(std::string word) +{ + int i = 0; + char * rawWord = (char *)word.c_str(); + //Function + if(word == "set") + return TypeFunction; + //Basic type + parseNumber: + for(i = 0; i < word.length(); i++) + if(!(rawWord[i] >= '0' && rawWord[i] <= '9')) + { + if(rawWord[i] == ',' && rawWord[i+1] >= '0' && rawWord[i+1] <= '9') + goto parsePoint; + else + goto parseString; + } + return TypeNumber; + parsePoint: + i++; + for(; i < word.length(); i++) + if(!(rawWord[i] >= '0' && rawWord[i] <= '9')) + { + goto parseString; + } + return TypePoint; + parseString: + return TypeString; +} + +AnyType TPTScriptInterface::eval(std::deque * words) +{ + if(words->size() < 1) + return AnyType(TypeNull, NULL); + std::string word = words->front(); words->pop_front(); + char * rawWord = (char *)word.c_str(); + ValueType wordType = testType(word); + switch(wordType) + { + case TypeFunction: + if(word == "set") + return tptS_set(words); + break; + case TypeNumber: + return NumberType(atoi(rawWord)); + case TypePoint: + { + int pointX, pointY; + sscanf(rawWord, "%d,%d", &pointX, &pointY); + return PointType(pointX, pointY); + } + case TypeString: + return StringType(word); + } +} + +std::string TPTScriptInterface::FormatCommand(std::string command) +{ + std::deque words; + std::deque commandWords; + std::string outputData; + + //Split command into words, put them on the stack + char * rawCommand; + rawCommand = (char*)calloc(command.length()+1, 1); + memcpy(rawCommand, (char*)command.c_str(), command.length()); + char * currentWord = rawCommand; + char * currentCommand = rawCommand; + while((currentCommand = strchr(currentCommand, ' '))) + { + currentCommand[0] = 0; + words.push_back(std::string(currentWord)); + currentWord = ++currentCommand; + } + words.push_back(std::string(currentWord)); + + while(!words.empty()) + { + ValueType cType = testType(words.front()); + switch(cType) + { + case TypeFunction: + outputData += "\bt"; + break; + case TypeNumber: + case TypePoint: + outputData += "\bo"; + break; + case TypeString: + outputData += "\bg"; + break; + default: + outputData += "\bw"; + break; + } + outputData += words.front() + " "; + words.pop_front(); + } + /*char * rawText = (char*)command.c_str(); + char * outputData = (char *)calloc(command.length()*6, 1); + int rawTextLoc = 0; + int outputDataLoc = 0; + std::stack pstack; + while(rawText[rawTextLoc]) + { + switch(rawText[rawTextLoc]) + { + case '\\': + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + if(rawText[rawTextLoc]) + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + break; + case '"': + if(pstack.size() && pstack.top() == '"') + { + pstack.pop(); + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + outputData[outputDataLoc++] = '\b'; + outputData[outputDataLoc++] = 'w'; + } + else + { + pstack.push('"'); + outputData[outputDataLoc++] = '\b'; + outputData[outputDataLoc++] = 'o'; + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + } + break; + default: + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + break; + } + }*/ + return outputData; +} + +AnyType TPTScriptInterface::tptS_set(std::deque * words) +{ + //Arguments from stack + StringType property = eval(words); + AnyType value = eval(words); + AnyType selector = eval(words); + + Simulation * sim = m->GetSimulation(); + + int returnValue = 0; + + FormatType propertyFormat; + int propertyOffset = GetPropertyOffset(property.Value(), propertyFormat); + + if(propertyOffset==-1) + throw GeneralException("Invalid property"); + + if(selector.GetType() == TypePoint || selector.GetType() == TypeNumber) + { + int partIndex = -1; + if(selector.GetType() == TypePoint) + { + ui::Point tempPoint = ((PointType)selector).Value(); + if(tempPoint.X<0 || tempPoint.Y<0 || tempPoint.Y >= YRES || tempPoint.X >= XRES) + throw GeneralException("Invalid particle"); + + } + else + partIndex = ((NumberType)selector).Value(); + if(partIndex<0 || partIndex>NPART || sim->parts[partIndex].type==0) + throw GeneralException("Invalid particle"); + + switch(propertyFormat) + { + case FormatInt: + *((int*)(((void*)&sim->parts[partIndex])+propertyOffset)) = ((NumberType)value).Value(); + break; + case FormatFloat: + *((float*)(((void*)&sim->parts[partIndex])+propertyOffset)) = ((NumberType)value).Value(); + break; + } + returnValue = 1; + } + else if(selector.GetType() == TypeString && ((StringType)selector).Value() == "all") + { + switch(propertyFormat) + { + case FormatInt: + { + int tempNumber = ((NumberType)value).Value(); + for(int j = 0; j < NPART; j++) + if(sim->parts[j].type) + { + returnValue++; + *((int*)(((void*)&sim->parts[j])+propertyOffset)) = tempNumber; + } + } + break; + case FormatFloat: + { + float tempNumber = ((NumberType)value).Value(); + for(int j = 0; j < NPART; j++) + if(sim->parts[j].type) + { + returnValue++; + *((float*)(((void*)&sim->parts[j])+propertyOffset)) = tempNumber; + } + } + break; + } + } + else if(selector.GetType() == TypeString || selector.GetType() == TypeNumber) + { + int type; + if(selector.GetType() == TypeNumber) + type = ((NumberType)selector).Value(); + else + type = GetParticleType(((StringType)selector).Value()); + + if(type<0 || type>=PT_NUM) + throw GeneralException("Invalid particle type"); + switch(propertyFormat) + { + case FormatInt: + { + int tempNumber = ((NumberType)value).Value(); + for(int j = 0; j < NPART; j++) + if(sim->parts[j].type == type) + { + returnValue++; + *((int*)(((void*)&sim->parts[j])+propertyOffset)) = tempNumber; + } + } + break; + case FormatFloat: + { + float tempNumber = ((NumberType)value).Value(); + for(int j = 0; j < NPART; j++) + if(sim->parts[j].type == type) + { + returnValue++; + *((float*)(((void*)&sim->parts[j])+propertyOffset)) = tempNumber; + } + } + break; + } + } + else + throw GeneralException("Invalid selector"); + return NumberType(returnValue); +} + +TPTScriptInterface::~TPTScriptInterface() { +} + diff --git a/src/cat/TPTScriptInterface.h b/src/cat/TPTScriptInterface.h new file mode 100644 index 0000000..c1a61de --- /dev/null +++ b/src/cat/TPTScriptInterface.h @@ -0,0 +1,27 @@ +/* + * TPTScriptInterface.h + * + * Created on: Feb 5, 2012 + * Author: Simon + */ + +#ifndef TPTSCRIPTINTERFACE_H_ +#define TPTSCRIPTINTERFACE_H_ + +#include "CommandInterface.h" +#include "TPTSTypes.h" + +class TPTScriptInterface: public CommandInterface { +protected: + AnyType eval(std::deque * words); + AnyType tptS_set(std::deque * words); + ValueType testType(std::string word); +public: + TPTScriptInterface(); + virtual void Tick() {} + virtual int Command(std::string command); + virtual std::string FormatCommand(std::string command); + virtual ~TPTScriptInterface(); +}; + +#endif /* TPTSCRIPTINTERFACE_H_ */ diff --git a/src/console/ConsoleController.cpp b/src/console/ConsoleController.cpp index cf4cdcd..7f1975d 100644 --- a/src/console/ConsoleController.cpp +++ b/src/console/ConsoleController.cpp @@ -8,7 +8,7 @@ #include #include "ConsoleController.h" -ConsoleController::ConsoleController(ControllerCallback * callback): +ConsoleController::ConsoleController(ControllerCallback * callback, CommandInterface * commandInterface): HasDone(false) { consoleModel = new ConsoleModel(); @@ -17,55 +17,28 @@ ConsoleController::ConsoleController(ControllerCallback * callback): consoleModel->AddObserver(consoleView); this->callback = callback; + this->commandInterface = commandInterface; } void ConsoleController::EvaluateCommand(std::string command) { + int returnCode = commandInterface->Command(command); if(command.length()) - consoleModel->AddLastCommand(ConsoleCommand(command, -1, "Syntax error")); + consoleModel->AddLastCommand(ConsoleCommand(command, returnCode, commandInterface->GetLastError())); else if(ui::Engine::Ref().GetWindow() == consoleView) ui::Engine::Ref().CloseWindow(); } +void ConsoleController::CloseConsole() +{ + if(ui::Engine::Ref().GetWindow() == consoleView) + ui::Engine::Ref().CloseWindow(); +} + std::string ConsoleController::FormatCommand(std::string command) { - char * rawText = (char*)command.c_str(); - char * outputData = (char *)calloc(command.length()*6, 1); - int rawTextLoc = 0; - int outputDataLoc = 0; - std::stack pstack; - while(rawText[rawTextLoc]) - { - switch(rawText[rawTextLoc]) - { - case '\\': - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - if(rawText[rawTextLoc]) - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - break; - case '"': - if(pstack.size() && pstack.top() == '"') - { - pstack.pop(); - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - outputData[outputDataLoc++] = '\b'; - outputData[outputDataLoc++] = 'w'; - } - else - { - pstack.push('"'); - outputData[outputDataLoc++] = '\b'; - outputData[outputDataLoc++] = 'o'; - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - } - break; - default: - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - break; - } - } - return outputData; + return commandInterface->FormatCommand(command); } void ConsoleController::NextCommand() diff --git a/src/console/ConsoleController.h b/src/console/ConsoleController.h index 9316f71..d5fc07a 100644 --- a/src/console/ConsoleController.h +++ b/src/console/ConsoleController.h @@ -13,6 +13,7 @@ #include "ConsoleView.h" #include "ConsoleModel.h" #include "ConsoleCommand.h" +#include "cat/CommandInterface.h" class ConsoleModel; class ConsoleView; @@ -20,14 +21,16 @@ class ConsoleController { ControllerCallback * callback; ConsoleView * consoleView; ConsoleModel * consoleModel; + CommandInterface * commandInterface; public: bool HasDone; - ConsoleController(ControllerCallback * callback); + ConsoleController(ControllerCallback * callback, CommandInterface * commandInterface); std::string FormatCommand(std::string command); void EvaluateCommand(std::string command); void NextCommand(); void PreviousCommand(); void Exit(); + void CloseConsole(); ConsoleView * GetView(); virtual ~ConsoleController(); }; diff --git a/src/console/ConsoleView.cpp b/src/console/ConsoleView.cpp index 117d8cb..f36a33b 100644 --- a/src/console/ConsoleView.cpp +++ b/src/console/ConsoleView.cpp @@ -34,6 +34,9 @@ void ConsoleView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, b { switch(key) { + case '`': + c->CloseConsole(); + break; case KEY_RETURN: case KEY_ENTER: c->EvaluateCommand(commandField->GetText()); @@ -63,7 +66,11 @@ void ConsoleView::NotifyPreviousCommandsChanged(ConsoleModel * sender) { if(currentY <= 0) break; - ui::Label * tempLabel = new ui::Label(ui::Point(0, currentY), ui::Point(Size.X, 16), commands[i].Command); + ui::Label * tempLabel = new ui::Label(ui::Point(Size.X/2, currentY), ui::Point(Size.X/2, 16), commands[i].ReturnValue); + tempLabel->SetAlignment(AlignLeft, AlignMiddle); + commandList.push_back(tempLabel); + AddComponent(tempLabel); + tempLabel = new ui::Label(ui::Point(0, currentY), ui::Point(Size.X/2, 16), commands[i].Command); tempLabel->SetAlignment(AlignLeft, AlignMiddle); commandList.push_back(tempLabel); AddComponent(tempLabel); diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 7df654f..73e59a5 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -70,7 +70,8 @@ GameController::GameController(): search(NULL), renderOptions(NULL), loginWindow(NULL), - ssave(NULL) + ssave(NULL), + console(NULL) { gameView = new GameView(); gameModel = new GameModel(); @@ -78,6 +79,9 @@ GameController::GameController(): gameView->AttachController(this); gameModel->AddObserver(gameView); + commandInterface = new TPTScriptInterface(); + commandInterface->AttachGameModel(gameModel); + //sim = new Simulation(); } @@ -312,7 +316,8 @@ void GameController::OpenDisplayOptions() void GameController::ShowConsole() { - console = new ConsoleController(NULL); + if(!console) + console = new ConsoleController(NULL, commandInterface); ui::Engine::Ref().ShowWindow(console->GetView()); } diff --git a/src/game/GameController.h b/src/game/GameController.h index 0e70371..ba3ae70 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -11,12 +11,15 @@ #include "login/LoginController.h" #include "ssave/SSaveController.h" #include "console/ConsoleController.h" +#include "cat/TPTScriptInterface.h" #include "Menu.h" using namespace std; class GameModel; class GameView; +class CommandInterface; +class ConsoleController; class GameController { private: @@ -28,6 +31,7 @@ private: LoginController * loginWindow; SSaveController * ssave; ConsoleController * console; + CommandInterface * commandInterface; public: class LoginCallback; class SearchCallback; diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp index 0341ff3..bef3465 100644 --- a/src/interface/Textbox.cpp +++ b/src/interface/Textbox.cpp @@ -71,18 +71,8 @@ void Textbox::TextPosition() void Textbox::SetText(std::string text) { cursor = text.length(); - if(masked) - { - char tempText[text.length()]; - memset(tempText, 0x8d, text.length()); - tempText[text.length()] = 0; - displayText = tempText; - } - else - { - displayText = text; - } this->text = text; + this->displayText = text; TextPosition(); } @@ -168,7 +158,17 @@ void Textbox::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool } if(changed) { - SetText(text); + if(masked) + { + char tempText[text.length()]; + memset(tempText, 0x8d, text.length()); + tempText[text.length()] = 0; + displayText = tempText; + } + else + { + displayText = text; + } if(actionCallback) actionCallback->TextChangedCallback(this); } -- cgit v0.9.2-21-gd62e From 9f7b06ff47e12076a261b6a209b27c558741eb8a Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 11 Feb 2012 16:08:59 +0000 Subject: Comments on save preview and some minor changes for vote bars diff --git a/.gitignore b/.gitignore index 33ad7a8..2198a51 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ *.a *.la *~ +*.pref \ No newline at end of file diff --git a/src/client/Client.cpp b/src/client/Client.cpp index ce7c9e6..5054dc4 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -422,6 +422,52 @@ Thumbnail * Client::GetPreview(int saveID, int saveDate) } } +std::vector * Client::GetComments(int saveID, int start, int count) +{ + lastError = ""; + std::vector * commentArray = new std::vector(); + + std::stringstream urlStream; + char * data; + int dataStatus, dataLength; + urlStream << "http://" << SERVER << "/Browse/View.json?ID=" << saveID << "&Mode=Comments&Start=" << start << "&Count=" << count; + data = http_simple_get((char *)urlStream.str().c_str(), &dataStatus, &dataLength); + if(dataStatus == 200 && data) + { + try + { + std::istringstream dataStream(data); + json::Array commentsArray; + json::Reader::Read(commentsArray, dataStream); + + for(int j = 0; j < commentsArray.Size(); j++) + { + json::Number tempUserID = commentsArray[j]["UserID"]; + json::String tempUsername = commentsArray[j]["Username"]; + json::String tempComment = commentsArray[j]["Text"]; + commentArray->push_back( + new Comment( + tempUserID.Value(), + tempUsername.Value(), + tempComment.Value() + ) + ); + } + } + catch (json::Exception &e) + { + lastError = "Could not read response"; + } + } + else + { + lastError = http_ret_text(dataStatus); + } + if(data) + free(data); + return commentArray; +} + std::vector * Client::SearchSaves(int start, int count, string query, string sort, int & resultCount) { lastError = ""; diff --git a/src/client/Client.h b/src/client/Client.h index 4ca0287..46c1848 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -7,6 +7,7 @@ #include "Config.h" #include "HTTP.h" +#include "preview/Comment.h" #include "search/Thumbnail.h" #include "search/Save.h" #include "Singleton.h" @@ -52,6 +53,7 @@ public: LoginStatus Login(string username, string password, User & user); void ClearThumbnailRequests(); std::vector * SearchSaves(int start, int count, string query, string sort, int & resultCount); + std::vector * GetComments(int saveID, int start, int count); Thumbnail * GetPreview(int saveID, int saveDate); Thumbnail * GetThumbnail(int saveID, int saveDate); Save * GetSave(int saveID, int saveDate); diff --git a/src/interface/Label.h b/src/interface/Label.h index b925140..4f7ce7f 100644 --- a/src/interface/Label.h +++ b/src/interface/Label.h @@ -11,6 +11,7 @@ namespace ui { class Label : public Component { + protected: std::string text; ui::Point textPosition; HorizontalAlignment textHAlign; @@ -23,8 +24,8 @@ namespace ui //Label(std::string labelText); virtual ~Label(); - void TextPosition(); - void SetText(std::string text); + virtual void TextPosition(); + virtual void SetText(std::string text); HorizontalAlignment GetHAlignment() { return textHAlign; } VerticalAlignment GetVAlignment() { return textVAlign; } void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign) { textHAlign = hAlign; textVAlign = vAlign; TextPosition(); } diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index fa848bf..c251434 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -103,8 +103,8 @@ void SaveButton::Draw(const Point& screenPos) g->drawrect(screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); g->drawrect(screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, 6, thumbBoxSize.Y, 180, 180, 180, 255); - int voteBar = max(10.0f, ((float)(thumbBoxSize.Y))*voteRatio); - g->fillrect(screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(thumbBoxSize.Y-voteBar)+(Size.Y-21-thumbBoxSize.Y)/2, 6, voteBar, voteColour.Red, voteColour.Green, voteColour.Blue, 255); + int voteBar = max(10.0f, ((float)(thumbBoxSize.Y-2))*voteRatio); + g->fillrect(1+screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, 1+(screenPos.Y-2)+(thumbBoxSize.Y-voteBar)+(Size.Y-21-thumbBoxSize.Y)/2, 4, voteBar, voteColour.Red, voteColour.Green, voteColour.Blue, 255); } else { diff --git a/src/interface/Spinner.cpp b/src/interface/Spinner.cpp new file mode 100644 index 0000000..1ecad8d --- /dev/null +++ b/src/interface/Spinner.cpp @@ -0,0 +1,36 @@ +/* + * Spinner.cpp + * + * Created on: Feb 11, 2012 + * Author: Simon + */ + + +#include +#include +#include "Spinner.h" + +using namespace ui; + +Spinner::Spinner(Point position, Point size): + Component(position, size), cValue(0) +{ +} +void Spinner::Tick(float dt) +{ + cValue += 0.05f; +} +void Spinner::Draw(const Point& screenPos) +{ + Graphics * g = ui::Engine::Ref().g; + int baseX = screenPos.X+(Size.X/2); + int baseY = screenPos.Y+(Size.Y/2); + for(float t = 0.0f; t < 1.0f; t+=0.05f) + { + g->drawblob(baseX+(sin(cValue+t)*(Size.X/2)), baseY+(cos(cValue+t)*(Size.X/2)), t*255, t*255, t*255); + } +} +Spinner::~Spinner() +{ + +} diff --git a/src/interface/Spinner.h b/src/interface/Spinner.h new file mode 100644 index 0000000..089b0b5 --- /dev/null +++ b/src/interface/Spinner.h @@ -0,0 +1,29 @@ +/* + * Spinner.h + * + * Created on: Feb 11, 2012 + * Author: Simon + */ + +#ifndef SPINNER_H_ +#define SPINNER_H_ + +#include "Component.h" + +namespace ui +{ + +class Spinner: public Component +{ + float cValue; +public: + Spinner(Point position, Point size); + virtual void Tick(float dt); + virtual void Draw(const Point& screenPos); + virtual ~Spinner(); +}; + +} + + +#endif /* SPINNER_H_ */ diff --git a/src/interface/Textblock.cpp b/src/interface/Textblock.cpp new file mode 100644 index 0000000..c378925 --- /dev/null +++ b/src/interface/Textblock.cpp @@ -0,0 +1,76 @@ +/* + * Textblock.cpp + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#include +#include "Textblock.h" + +using namespace ui; + +Textblock::Textblock(Point position, Point size, std::string textboxText): + Label(position, size, textboxText) +{ + if(size.Y==-1) + autoHeight = true; + else + autoHeight = false; + updateMultiline(); +} + +void Textblock::SetText(std::string text) +{ + this->text = text; + updateMultiline(); +} + +void Textblock::updateMultiline() +{ + char * rawText = (char*)malloc(text.length()+1); + memcpy(rawText, text.c_str(), text.length()); + rawText[text.length()] = 0; + + int lines = 1; + int currentWidth = 0; + char * lastSpace = NULL; + char * currentWord = rawText; + char * nextSpace; + while(true) + { + nextSpace = strchr(currentWord+1, ' '); + if(nextSpace) + nextSpace[0] = 0; + int width = Graphics::textwidth(currentWord); + if(width+currentWidth > Size.X-6) + { + currentWidth = width; + currentWord[0] = '\n'; + lines++; + } + else + currentWidth += width; + if(nextSpace) + nextSpace[0] = ' '; + if(!(currentWord = strchr(currentWord+1, ' '))) + break; + } + if(autoHeight) + { + Size.Y = lines*12; + } + textLines = rawText; +} + +void Textblock::Draw(const Point &screenPos) +{ + Graphics * g = ui::Engine::Ref().g; + //g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, textColour.Red, textColour.Green, textColour.Blue, 255); + g->drawtext(screenPos.X+3, screenPos.Y+3, textLines, textColour.Red, textColour.Green, textColour.Blue, 255); +} + +Textblock::~Textblock() { + // TODO Auto-generated destructor stub +} + diff --git a/src/interface/Textblock.h b/src/interface/Textblock.h new file mode 100644 index 0000000..99b79e6 --- /dev/null +++ b/src/interface/Textblock.h @@ -0,0 +1,33 @@ +/* + * Textblock.h + * + * Created on: Jan 29, 2012 + * Author: Simon + */ + +#ifndef TEXTBLOCK_H_ +#define TEXTBLOCK_H_ + +#include +#include +#include +#include "Label.h" + +namespace ui +{ + +class Textblock: public ui::Label +{ + bool autoHeight; + void updateMultiline(); + std::string textLines; +public: + Textblock(Point position, Point size, std::string textboxText); + virtual void TextPosition() {} + virtual void SetText(std::string text); + virtual void Draw(const Point& screenPos); + virtual ~Textblock(); +}; +} + +#endif /* TEXTBLOCK_H_ */ diff --git a/src/preview/Comment.h b/src/preview/Comment.h new file mode 100644 index 0000000..a53f6cd --- /dev/null +++ b/src/preview/Comment.h @@ -0,0 +1,24 @@ +/* + * Comment.h + * + * Created on: Feb 11, 2012 + * Author: Simon + */ + +#ifndef COMMENT_H_ +#define COMMENT_H_ + +class Comment +{ +public: + int authorID; + std::string authorName; + std::string comment; + Comment(int userID, std::string username, std::string commentText): + authorID(userID), authorName(username), comment(commentText) + { + } +}; + + +#endif /* COMMENT_H_ */ diff --git a/src/preview/PreviewModel.cpp b/src/preview/PreviewModel.cpp index dba7aa1..371d917 100644 --- a/src/preview/PreviewModel.cpp +++ b/src/preview/PreviewModel.cpp @@ -11,11 +11,14 @@ PreviewModel::PreviewModel(): save(NULL), savePreview(NULL), + saveComments(NULL), doOpen(false), updateSavePreviewWorking(false), updateSavePreviewFinished(false), updateSaveInfoWorking(false), - updateSaveInfoFinished(false) + updateSaveInfoFinished(false), + updateSaveCommentsWorking(false), + updateSaveCommentsFinished(false) { // TODO Auto-generated constructor stub @@ -31,6 +34,11 @@ void * PreviewModel::updateSavePreviewTHelper(void * obj) return ((PreviewModel*)obj)->updateSavePreviewT(); } +void * PreviewModel::updateSaveCommentsTHelper(void * obj) +{ + return ((PreviewModel*)obj)->updateSaveCommentsT(); +} + void * PreviewModel::updateSaveInfoT() { Save * tempSave = Client::Ref().GetSave(tSaveID, tSaveDate); @@ -45,15 +53,38 @@ void * PreviewModel::updateSavePreviewT() return tempThumb; } +void * PreviewModel::updateSaveCommentsT() +{ + std::vector * tempComments = Client::Ref().GetComments(tSaveID, 0, 10); + updateSaveCommentsFinished = true; + return tempComments; +} + void PreviewModel::UpdateSave(int saveID, int saveDate) { this->tSaveID = saveID; this->tSaveDate = saveDate; - save = NULL; - savePreview = NULL; + if(save) + { + delete save; + save = NULL; + } + if(savePreview) + { + delete savePreview; + savePreview = NULL; + } + if(saveComments) + { + for(int i = 0; i < saveComments->size(); i++) + delete saveComments->at(i); + delete saveComments; + saveComments = NULL; + } notifyPreviewChanged(); notifySaveChanged(); + notifySaveCommentsChanged(); if(!updateSavePreviewWorking) { @@ -68,6 +99,13 @@ void PreviewModel::UpdateSave(int saveID, int saveDate) updateSaveInfoFinished = false; pthread_create(&updateSaveInfoThread, 0, &PreviewModel::updateSaveInfoTHelper, this); } + + if(!updateSaveCommentsWorking) + { + updateSaveCommentsWorking = true; + updateSaveCommentsFinished = false; + pthread_create(&updateSaveCommentsThread, 0, &PreviewModel::updateSaveCommentsTHelper, this); + } } void PreviewModel::SetDoOpen(bool doOpen) @@ -90,6 +128,11 @@ Save * PreviewModel::GetSave() return save; } +std::vector * PreviewModel::GetComments() +{ + return saveComments; +} + void PreviewModel::notifyPreviewChanged() { for(int i = 0; i < observers.size(); i++) @@ -106,6 +149,14 @@ void PreviewModel::notifySaveChanged() } } +void PreviewModel::notifySaveCommentsChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyCommentsChanged(this); + } +} + void PreviewModel::AddObserver(PreviewView * observer) { observers.push_back(observer); observer->NotifyPreviewChanged(this); @@ -118,6 +169,11 @@ void PreviewModel::Update() { if(updateSavePreviewFinished) { + if(savePreview) + { + delete savePreview; + savePreview = NULL; + } updateSavePreviewWorking = false; pthread_join(updateSavePreviewThread, (void**)(&savePreview)); notifyPreviewChanged(); @@ -128,11 +184,33 @@ void PreviewModel::Update() { if(updateSaveInfoFinished) { + if(save) + { + delete save; + save = NULL; + } updateSaveInfoWorking = false; pthread_join(updateSaveInfoThread, (void**)(&save)); notifySaveChanged(); } } + + if(updateSaveCommentsWorking) + { + if(updateSaveCommentsFinished) + { + if(saveComments) + { + for(int i = 0; i < saveComments->size(); i++) + delete saveComments->at(i); + delete saveComments; + saveComments = NULL; + } + updateSaveCommentsWorking = false; + pthread_join(updateSaveCommentsThread, (void**)(&saveComments)); + notifySaveCommentsChanged(); + } + } } PreviewModel::~PreviewModel() { diff --git a/src/preview/PreviewModel.h b/src/preview/PreviewModel.h index e0e5966..84ce83d 100644 --- a/src/preview/PreviewModel.h +++ b/src/preview/PreviewModel.h @@ -12,6 +12,7 @@ #include #include "PreviewView.h" #include "search/Save.h" +#include "preview/Comment.h" #include "search/Thumbnail.h" using namespace std; @@ -22,8 +23,10 @@ class PreviewModel { vector observers; Save * save; Thumbnail * savePreview; + std::vector * saveComments; void notifyPreviewChanged(); void notifySaveChanged(); + void notifySaveCommentsChanged(); //Background retrieval int tSaveID; @@ -40,10 +43,17 @@ class PreviewModel { pthread_t updateSaveInfoThread; static void * updateSaveInfoTHelper(void * obj); void * updateSaveInfoT(); + + bool updateSaveCommentsWorking; + volatile bool updateSaveCommentsFinished; + pthread_t updateSaveCommentsThread; + static void * updateSaveCommentsTHelper(void * obj); + void * updateSaveCommentsT(); public: PreviewModel(); Thumbnail * GetPreview(); Save * GetSave(); + std::vector * GetComments(); void AddObserver(PreviewView * observer); void UpdateSave(int saveID, int saveDate); bool GetDoOpen(); diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index 3a731dc..aae792d 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -5,6 +5,7 @@ * Author: Simon */ +#include #include "PreviewView.h" #include "interface/Point.h" #include "interface/Window.h" @@ -51,6 +52,11 @@ PreviewView::PreviewView(): saveNameLabel->SetAlignment(AlignLeft, AlignBottom); AddComponent(saveNameLabel); + saveDescriptionTextblock = new ui::Textblock(ui::Point(5, (YRES/2)+15+14+17), ui::Point((XRES/2)-10, Size.Y-((YRES/2)+15+14+17)-21), ""); + saveDescriptionTextblock->SetAlignment(AlignLeft, AlignTop); + saveDescriptionTextblock->SetTextColour(ui::Colour(180, 180, 180)); + AddComponent(saveDescriptionTextblock); + authorDateLabel = new ui::Label(ui::Point(5, (YRES/2)+15+14), ui::Point(100, 16), ""); authorDateLabel->SetAlignment(AlignLeft, AlignBottom); AddComponent(authorDateLabel); @@ -78,13 +84,13 @@ void PreviewView::OnDraw() if(!votesUp && !votesDown) return; else - factor = (float)(((float)(XRES/2))/((float)(votesUp+votesDown))); - g->fillrect(Position.X, Position.Y+YRES/2, XRES/2, 10, 200, 50, 50, 255); - g->fillrect(Position.X, Position.Y+YRES/2, (int)(((float)votesUp)*factor), 10, 50, 200, 50, 255); - g->fillrect(Position.X, Position.Y+(YRES/2), 14, 10, 0, 0, 0, 100); - g->fillrect(Position.X+(XRES/2)-14, Position.Y+(YRES/2), 14, 10, 0, 0, 0, 100); - g->draw_icon(Position.X+2, Position.Y+(YRES/2)+2, IconVoteUp); - g->draw_icon(Position.X+(XRES/2)-12, Position.Y+(YRES/2), IconVoteDown); + factor = (float)(((float)(XRES/2)-2)/((float)(votesUp+votesDown))); + g->fillrect(1+Position.X, 1+Position.Y+YRES/2, (XRES/2)-2, 8, 200, 50, 50, 255); + g->fillrect(1+Position.X, 1+Position.Y+YRES/2, (int)(((float)votesUp)*factor), 8, 50, 200, 50, 255); + g->fillrect(1+Position.X, 1+Position.Y+(YRES/2), 14, 8, 0, 0, 0, 100); + g->fillrect(Position.X+(XRES/2)-15, 1+Position.Y+(YRES/2), 14, 8, 0, 0, 0, 100); + g->draw_icon(1+Position.X+2, Position.Y+(YRES/2)+2, IconVoteUp); + g->draw_icon(Position.X+(XRES/2)-12, Position.Y+(YRES/2)-1, IconVoteDown); } void PreviewView::OnTick(float dt) @@ -107,6 +113,7 @@ void PreviewView::NotifySaveChanged(PreviewModel * sender) votesDown = save->votesDown; saveNameLabel->SetText(save->name); authorDateLabel->SetText("\bgAuthor:\bw " + save->userName + " \bgDate:\bw "); + saveDescriptionTextblock->SetText(save->Description); } else { @@ -114,6 +121,49 @@ void PreviewView::NotifySaveChanged(PreviewModel * sender) votesDown = 0; saveNameLabel->SetText(""); authorDateLabel->SetText(""); + saveDescriptionTextblock->SetText(""); + } +} + +void PreviewView::NotifyCommentsChanged(PreviewModel * sender) +{ + for(int i = 0; i < commentComponents.size(); i++) + { + RemoveComponent(commentComponents[i]); + delete commentComponents[i]; + } + commentComponents.clear(); + + int currentY = 0; + ui::Label * tempUsername; + ui::Textblock * tempComment; + std::vector * tempComments = sender->GetComments(); + if(tempComments) + { + for(int i = 0; i < tempComments->size(); i++) + { + tempUsername = new ui::Label(ui::Point((XRES/2) + 5, currentY+5), ui::Point(Size.X-((XRES/2) + 10), 16), tempComments->at(i)->authorName); + tempUsername->SetAlignment(AlignLeft, AlignBottom); + currentY += 16; + tempComment = new ui::Textblock(ui::Point((XRES/2) + 5, currentY+5), ui::Point(Size.X-((XRES/2) + 10), -1), tempComments->at(i)->comment); + tempComment->SetAlignment(AlignLeft, AlignTop); + tempComment->SetTextColour(ui::Colour(180, 180, 180)); + currentY += tempComment->Size.Y+4; + + if(currentY > Size.Y) + { + delete tempUsername; + delete tempComment; + break; + } + else + { + commentComponents.push_back(tempComment); + AddComponent(tempComment); + commentComponents.push_back(tempUsername); + AddComponent(tempUsername); + } + } } } diff --git a/src/preview/PreviewView.h b/src/preview/PreviewView.h index 9368732..11ed4bd 100644 --- a/src/preview/PreviewView.h +++ b/src/preview/PreviewView.h @@ -7,12 +7,15 @@ #ifndef PREVIEWVIEW_H_ #define PREVIEWVIEW_H_ + +#include #include "interface/Window.h" #include "preview/PreviewController.h" #include "preview/PreviewModel.h" #include "interface/Button.h" #include "search/Thumbnail.h" #include "interface/Label.h" +#include "interface/Textblock.h" class PreviewModel; class PreviewController; @@ -23,6 +26,8 @@ class PreviewView: public ui::Window { ui::Button * browserOpenButton; ui::Label * saveNameLabel; ui::Label * authorDateLabel; + ui::Textblock * saveDescriptionTextblock; + std::vector commentComponents; int votesUp; int votesDown; public: @@ -30,6 +35,7 @@ public: PreviewView(); void NotifyPreviewChanged(PreviewModel * sender); void NotifySaveChanged(PreviewModel * sender); + void NotifyCommentsChanged(PreviewModel * sender); virtual void OnDraw(); virtual void OnTick(float dt); virtual void OnMouseDown(int x, int y, unsigned button); diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index b9c8bcb..584b7e3 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -91,6 +91,9 @@ SearchView::SearchView(): AddComponent(searchField); AddComponent(infoLabel); + loadingSpinner = new ui::Spinner(ui::Point(((XRES+BARSIZE)/2)-12, ((YRES+MENUSIZE)/2)+12), ui::Point(24, 24)); + AddComponent(loadingSpinner); + ui::Label * searchPrompt = new ui::Label(ui::Point(10, 10), ui::Point(50, 16), "Search:"); searchPrompt->SetAlignment(AlignLeft, AlignBottom); AddComponent(searchPrompt); @@ -172,6 +175,7 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) if(!sender->GetSavesLoaded()) { errorLabel->SetText("Loading..."); + loadingSpinner->Visible = true; } else { @@ -183,6 +187,7 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) } else { + loadingSpinner->Visible = false; if(errorLabel) { RemoveComponent(errorLabel); diff --git a/src/search/SearchView.h b/src/search/SearchView.h index a2a5297..0103419 100644 --- a/src/search/SearchView.h +++ b/src/search/SearchView.h @@ -6,6 +6,7 @@ #include "interface/SaveButton.h" #include "interface/Button.h" #include "interface/Label.h" +#include "interface/Spinner.h" #include "interface/Textbox.h" using namespace std; @@ -25,6 +26,7 @@ private: ui::Label * infoLabel; ui::Button * sortButton; ui::Button * ownButton; + ui::Spinner * loadingSpinner; void doSearch(); public: void NotifySaveListChanged(SearchModel * sender); -- cgit v0.9.2-21-gd62e From 725f1aff8512cd3c1f89f4e54fe2c6cd588fb62c Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 11 Feb 2012 17:04:39 +0000 Subject: Fix thumbnail alignment for save buttons, add code for building PSv format diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 5054dc4..112bdf1 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -235,6 +235,7 @@ unsigned char * Client::GetSaveData(int saveID, int saveDate, int & dataLength) { urlStream << "http://" << STATICSERVER << "/" << saveID << ".cps"; } + std::cout << urlStream.str() << std::endl; data = (unsigned char *)http_simple_get((char *)urlStream.str().c_str(), &dataStatus, &dataLength); if(data && dataStatus == 200) { diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 73e59a5..c652298 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -331,21 +331,28 @@ void GameController::OpenSaveWindow() { if(gameModel->GetUser().ID) { - if(gameModel->GetSave()) + int tempSaveLength; + unsigned char * tempData = gameModel->GetSimulation()->Save(tempSaveLength); + if(!tempData) { - Save tempSave(*gameModel->GetSave()); - int tempSaveLength; - tempSave.SetData(gameModel->GetSimulation()->Save(tempSaveLength)); - ssave = new SSaveController(new SSaveCallback(this), tempSave); + new ErrorMessage("Error", "Unable to build save."); } else { - Save tempSave(0, 0, 0, 0, gameModel->GetUser().Username, ""); - int tempSaveLength; - tempSave.SetData(gameModel->GetSimulation()->Save(tempSaveLength)); - ssave = new SSaveController(new SSaveCallback(this), tempSave); + if(gameModel->GetSave()) + { + Save tempSave(*gameModel->GetSave()); + tempSave.SetData(tempData, tempSaveLength); + ssave = new SSaveController(new SSaveCallback(this), tempSave); + } + else + { + Save tempSave(0, 0, 0, 0, gameModel->GetUser().Username, ""); + tempSave.SetData(tempData, tempSaveLength); + ssave = new SSaveController(new SSaveCallback(this), tempSave); + } + ui::Engine::Ref().ShowWindow(ssave->GetView()); } - ui::Engine::Ref().ShowWindow(ssave->GetView()); } else { diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index c251434..7e9450e 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -89,9 +89,9 @@ void SaveButton::Draw(const Point& screenPos) { thumbBoxSize = ui::Point(thumbnail->Size.X, thumbnail->Size.Y); if(save->id) - g->draw_image(thumbnail->Data, screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-25-thumbBoxSize.Y)/2, thumbnail->Size.X, thumbnail->Size.Y, 255); + g->draw_image(thumbnail->Data, screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbnail->Size.X, thumbnail->Size.Y, 255); else - g->draw_image(thumbnail->Data, screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-25-thumbBoxSize.Y)/2, thumbnail->Size.X, thumbnail->Size.Y, 255); + g->draw_image(thumbnail->Data, screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbnail->Size.X, thumbnail->Size.Y, 255); } else { diff --git a/src/search/Save.cpp b/src/search/Save.cpp index 47ac61a..407b739 100644 --- a/src/search/Save.cpp +++ b/src/search/Save.cpp @@ -92,8 +92,11 @@ unsigned char * Save::GetData() { } return data; } -void Save::SetData(unsigned char * data_) { +void Save::SetData(unsigned char * data_, int dataLength) { + if(data) + free(data); data = data_; + this->dataLength = dataLength; } int Save::GetDataLength() { diff --git a/src/search/Save.h b/src/search/Save.h index 4176e13..74097fd 100644 --- a/src/search/Save.h +++ b/src/search/Save.h @@ -54,7 +54,7 @@ public: int GetVotesDown(); unsigned char * GetData(); - void SetData(unsigned char * data_); + void SetData(unsigned char * data_, int dataLength); int GetDataLength(); }; diff --git a/src/simulation/SaveLoader.cpp b/src/simulation/SaveLoader.cpp index 5d92300..97ab45e 100644 --- a/src/simulation/SaveLoader.cpp +++ b/src/simulation/SaveLoader.cpp @@ -28,9 +28,12 @@ int SaveLoader::LoadSave(unsigned char * data, int dataLength, Simulation * sim, return 1; } -unsigned char * SaveLoader::BuildSave(int & dataLength, Simulation * sim) +unsigned char * SaveLoader::BuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h) { - return OPSBuildSave(dataLength, sim); + unsigned char * temp = OPSBuildSave(dataLength, sim, orig_x0, orig_y0, orig_w, orig_h); + if(!temp) + temp = PSVBuildSave(dataLength, sim, orig_x0, orig_y0, orig_w, orig_h); + return temp; } int SaveLoader::OPSLoadSave(unsigned char * data, int dataLength, Simulation * sim) @@ -38,7 +41,7 @@ int SaveLoader::OPSLoadSave(unsigned char * data, int dataLength, Simulation * s return 0; } -unsigned char * SaveLoader::OPSBuildSave(int & dataLength, Simulation * sim) +unsigned char * SaveLoader::OPSBuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h) { return 0; } @@ -637,7 +640,217 @@ corrupt: return 1; } -unsigned char * PSVBuildSave(int & dataLength, Simulation * sim) +unsigned char * SaveLoader::PSVBuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h) { - return 0; + unsigned char *d = (unsigned char*)calloc(1,3*(XRES/CELL)*(YRES/CELL)+(XRES*YRES)*15+MAXSIGNS*262), *c; + int i,j,x,y,p=0,*m=(int*)calloc(XRES*YRES, sizeof(int)); + int x0, y0, w, h, bx0=orig_x0/CELL, by0=orig_y0/CELL, bw, bh; + Particle *parts = sim->parts; + bw=(orig_w+orig_x0-bx0*CELL+CELL-1)/CELL; + bh=(orig_h+orig_y0-by0*CELL+CELL-1)/CELL; + + // normalize coordinates + x0 = bx0*CELL; + y0 = by0*CELL; + w = bw *CELL; + h = bh *CELL; + + // save the required air state + for (y=by0; ybmap[y][x]; + for (y=by0; ybmap[y][x]==WL_FAN||sim->bmap[y][x]==4) + { + i = (int)(sim->fvx[y][x]*64.0f+127.5f); + if (i<0) i=0; + if (i>255) i=255; + d[p++] = i; + } + for (y=by0; ybmap[y][x]==WL_FAN||sim->bmap[y][x]==4) + { + i = (int)(sim->fvy[y][x]*64.0f+127.5f); + if (i<0) i=0; + if (i>255) i=255; + d[p++] = i; + } + + // save the particle map + for (i=0; i=orig_x0 && x=orig_y0 && y255) x=255; + if (y<0) y=0; + if (y>255) y=255; + d[p++] = x; + d[p++] = y; + } + } + for (j=0; j>8); + d[p++] = (ttlife&0x00FF); + } + } + for (j=0; j>8); + d[p++] = (tttmp&0x00FF); + } + } + for (j=0; j>24; + } + } + for (j=0; j>16; + } + } + for (j=0; j>8; + } + } + for (j=0; j>8); + d[p++] = (tttemp&0x00FF); + } + } + for (j=0; jsigns[i].text[0] && + sim->signs[i].x>=x0 && sim->signs[i].xsigns[i].y>=y0 && sim->signs[i].ysigns[i].text[0] && + sim->signs[i].x>=x0 && sim->signs[i].xsigns[i].y>=y0 && sim->signs[i].ysigns[i].x-x0); + d[p++] = (sim->signs[i].x-x0)>>8; + d[p++] = (sim->signs[i].y-y0); + d[p++] = (sim->signs[i].y-y0)>>8; + d[p++] = sim->signs[i].ju; + x = strlen(sim->signs[i].text); + d[p++] = x; + memcpy(d+p, sim->signs[i].text, x); + p+=x; + } + + i = (p*101+99)/100 + 612; + c = (unsigned char*)malloc(i); + + //New file header uses PSv, replacing fuC. This is to detect if the client uses a new save format for temperatures + //This creates a problem for old clients, that display and "corrupt" error instead of a "newer version" error + + c[0] = 0x50; //0x66; + c[1] = 0x53; //0x75; + c[2] = 0x76; //0x43; + c[3] = sim->legacy_enable|((sim->sys_pause<<1)&0x02)|((sim->gravityMode<<2)&0x0C)|((sim->airMode<<4)&0x70)|((sim->ngrav_enable<<7)&0x80); + c[4] = SAVE_VERSION; + c[5] = CELL; + c[6] = bw; + c[7] = bh; + c[8] = p; + c[9] = p >> 8; + c[10] = p >> 16; + c[11] = p >> 24; + + i -= 12; + + if (BZ2_bzBuffToBuffCompress((char *)(c+12), (unsigned *)&i, (char *)d, p, 9, 0, 0) != BZ_OK) + { + free(d); + free(c); + free(m); + return NULL; + } + free(d); + free(m); + + dataLength = i+12; + return c; } diff --git a/src/simulation/SaveLoader.h b/src/simulation/SaveLoader.h index 50b1401..1fb2143 100644 --- a/src/simulation/SaveLoader.h +++ b/src/simulation/SaveLoader.h @@ -13,11 +13,11 @@ class SaveLoader { public: static int LoadSave(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x, int y); - static unsigned char * BuildSave(int & dataLength, Simulation * sim); + static unsigned char * BuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h); static int OPSLoadSave(unsigned char * data, int dataLength, Simulation * sim); - static unsigned char * OPSBuildSave(int & dataLength, Simulation * sim); + static unsigned char * OPSBuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h); static int PSVLoadSave(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x, int y); - static unsigned char * PSVBuildSave(int & dataLength, Simulation * sim); + static unsigned char * PSVBuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h); }; #endif /* SAVELOADER_H_ */ diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 9e58f22..73757da 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -15,7 +15,7 @@ int Simulation::Load(unsigned char * data, int dataLength) unsigned char * Simulation::Save(int & dataLength) { - return SaveLoader::BuildSave(dataLength, this); + return SaveLoader::BuildSave(dataLength, this, 0, 0, XRES, YRES); } void Simulation::clear_area(int area_x, int area_y, int area_w, int area_h) -- cgit v0.9.2-21-gd62e From d604fac18f611685f90c724ee84a7bc6c63da309 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 11 Feb 2012 17:11:07 +0000 Subject: Slight appearence changes to save buttons diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index 7e9450e..9ed2e68 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -100,7 +100,10 @@ void SaveButton::Draw(const Point& screenPos) } if(save->id) { - g->drawrect(screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); + if(isMouseInside) + g->drawrect(screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 210, 230, 255, 255); + else + g->drawrect(screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); g->drawrect(screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, 6, thumbBoxSize.Y, 180, 180, 180, 255); int voteBar = max(10.0f, ((float)(thumbBoxSize.Y-2))*voteRatio); @@ -108,12 +111,15 @@ void SaveButton::Draw(const Point& screenPos) } else { - g->drawrect(screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); + if(isMouseInside) + g->drawrect(screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 210, 230, 255, 255); + else + g->drawrect(screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); } if(isMouseInside) { - g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); + //g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->name.c_str()))/2, screenPos.Y+Size.Y - 21, save->name, 255, 255, 255, 255); g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->userName.c_str()))/2, screenPos.Y+Size.Y - 10, save->userName, 200, 230, 255, 255); } -- cgit v0.9.2-21-gd62e From ec6d1012b263049241984dfc96fae37f4280e7eb Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 12 Feb 2012 12:53:11 +0000 Subject: Somewhat working lua console, no element function overrides, no keyboard, mouse or tick events diff --git a/Makefile b/Makefile index 4c11e2b..043fe0b 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ OBJS := $(patsubst src/%.cpp,build/obj/%.o,$(SOURCES)) FOLDERS := CFLAGS := -w -Isrc/ -Idata/ -OFLAGS := -fkeep-inline-functions -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -msse2 +OFLAGS := -fkeep-inline-functions CPPC := g++ CPPC_WIN := g++ @@ -19,14 +19,14 @@ powder.exe: build/powder.exe powder-release: build/powder-release powder: build/powder -build/powder-release.exe: CFLAGS += -DWIN32 -build/powder-release.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -mwindows +build/powder-release.exe: CFLAGS += -DWIN32 -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -pipe -msse -msse2 -msse3 -mmmx +build/powder-release.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -llua -mwindows build/powder.exe: CFLAGS += -DWIN32 -DWINCONSOLE -build/powder.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 #-mwindows -build/powder-release: CFLAGS += -DLIN32 -build/powder-release: LFLAGS := -lSDL -lm -lbz2 +build/powder.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -llua #-mwindows +build/powder-release: CFLAGS += -DLIN32 -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -pipe -msse -msse2 -msse3 -mmmx +build/powder-release: LFLAGS := -lSDL -lm -lbz2 -llua build/powder: CFLAGS += -DLIN32 -build/powder: LFLAGS := -lSDL -lm -lbz2 +build/powder: LFLAGS := -lSDL -lm -lbz2 -llua build/powder-release.exe: $(SOURCES) build/powder-res.o $(CPPC_WIN) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) build/powder-res.o -o $@ @@ -38,8 +38,8 @@ build/powder-release: $(SOURCES) $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) -o $@ strip $@ -build/powder.exe: buildpaths-powder.exe $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) - $(CPPC_WIN) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) $(LFLAGS) -o $@ -ggdb +build/powder.exe: buildpaths-powder.exe $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) build/powder-res.o + $(CPPC_WIN) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) build/powder-res.o $(LFLAGS) -o $@ -ggdb build/obj/powder.exe/%.o: src/%.cpp $(HEADERS) $(CPPC_WIN) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb buildpaths-powder.exe: diff --git a/src/cat/CommandInterface.cpp b/src/cat/CommandInterface.cpp index 485a029..f146ed4 100644 --- a/src/cat/CommandInterface.cpp +++ b/src/cat/CommandInterface.cpp @@ -11,13 +11,14 @@ #include "CommandInterface.h" #include "game/GameModel.h" -CommandInterface::CommandInterface() { +CommandInterface::CommandInterface(GameModel * m) { + this->m = m; } -void CommandInterface::AttachGameModel(GameModel * m) +/*void CommandInterface::AttachGameModel(GameModel * m) { this->m = m; -} +}*/ int CommandInterface::Command(std::string command) { diff --git a/src/cat/CommandInterface.h b/src/cat/CommandInterface.h index 4f25600..32b685e 100644 --- a/src/cat/CommandInterface.h +++ b/src/cat/CommandInterface.h @@ -14,14 +14,14 @@ class GameModel; class CommandInterface { protected: - enum FormatType { FormatInt, FormatString, FormatChar, FormatFloat }; std::string lastError; GameModel * m; public: - CommandInterface(); + enum FormatType { FormatInt, FormatString, FormatChar, FormatFloat }; + CommandInterface(GameModel * m); int GetPropertyOffset(std::string key_, FormatType & format); int GetParticleType(std::string type); - void AttachGameModel(GameModel * m); + //void AttachGameModel(GameModel * m); virtual void Tick() {} virtual int Command(std::string command); virtual std::string FormatCommand(std::string command); diff --git a/src/cat/LuaScriptHelper.h b/src/cat/LuaScriptHelper.h new file mode 100644 index 0000000..a9aa02d --- /dev/null +++ b/src/cat/LuaScriptHelper.h @@ -0,0 +1,126 @@ +/* + * LuaScriptHelper.h + * + * Created on: Feb 12, 2012 + * Author: Simon + */ + +#ifndef LUASCRIPTHELPER_H_ +#define LUASCRIPTHELPER_H_ + +GameModel * luacon_model; +Simulation * luacon_sim; +LuaScriptInterface * luacon_ci; +Graphics * luacon_g; + +int *lua_el_func, *lua_el_mode; + +int getPartIndex_curIdx; +int step_functions[6];//[6] = {0, 0, 0, 0, 0, 0}; +int keypress_function_count;// = 0; +int *keypress_functions;// = NULL; +int mouseclick_function_count;// = 0; +int *mouseclick_functions;// = NULL; +int tptProperties; //Table for some TPT properties +int tptPropertiesVersion; +int tptElements; //Table for TPT element names +int tptParts, tptPartsMeta, tptElementTransitions, tptPartsCData, tptPartMeta, tptPart, cIndex; + + +int luacon_step(int mx, int my, int selectl, int selectr); +int luacon_mouseevent(int mx, int my, int mb, int event); +int luacon_keyevent(int key, int modifier, int event); +int luacon_eval(char *command); +int luacon_part_update(int t, int i, int x, int y, int surround_space, int nt); +char *luacon_geterror(); +void luacon_close(); +int luacon_partsread(lua_State* l); +int luacon_partswrite(lua_State* l); +int luacon_partread(lua_State* l); +int luacon_partwrite(lua_State* l); +int luacon_elementread(lua_State* l); +int luacon_elementwrite(lua_State* l); +int luacon_transitionread(lua_State* l); +int luacon_transitionwrite(lua_State* l); +int luacon_particle_getproperty(char * key, int * format); +int luacon_transition_getproperty(char * key, int * format); +int luacon_element_getproperty(char * key, int * format, unsigned int * modified_stuff); +//int process_command_lua(pixel *vid_buf, char *console, char *console_error); + +//Interface +int luatpt_test(lua_State* l); +int luatpt_getelement(lua_State *l); +int luatpt_element_func(lua_State *l); +int luatpt_error(lua_State* l); +int luatpt_drawtext(lua_State* l); + +int luatpt_create(lua_State* l); + +int luatpt_setpause(lua_State* l); + +int luatpt_togglepause(lua_State* l); + +int luatpt_togglewater(lua_State* l); + +int luatpt_setconsole(lua_State* l); +int luatpt_log(lua_State* l); + +int luatpt_set_pressure(lua_State* l); + +int luatpt_set_gravity(lua_State* l); +int luatpt_reset_gravity_field(lua_State* l); + +int luatpt_reset_velocity(lua_State* l); + +int luatpt_reset_spark(lua_State* l); + +int luatpt_set_property(lua_State* l); + +int luatpt_get_property(lua_State* l); + +int luatpt_drawpixel(lua_State* l); + +int luatpt_drawrect(lua_State* l); + +int luatpt_fillrect(lua_State* l); + +int luatpt_drawline(lua_State* l); + +int luatpt_textwidth(lua_State* l); +int luatpt_get_name(lua_State* l); + +int luatpt_set_shortcuts(lua_State* l); + +int luatpt_delete(lua_State* l); +int luatpt_register_step(lua_State* l); +int luatpt_unregister_step(lua_State* l); +int luatpt_register_keypress(lua_State* l); +int luatpt_unregister_keypress(lua_State* l); +int luatpt_register_mouseclick(lua_State* l); +int luatpt_unregister_mouseclick(lua_State* l); +int luatpt_input(lua_State* l); +int luatpt_message_box(lua_State* l); +int luatpt_get_numOfParts(lua_State* l); +int luatpt_start_getPartIndex(lua_State* l); +int luatpt_next_getPartIndex(lua_State* l); +int luatpt_getPartIndex(lua_State* l); +int luatpt_hud(lua_State* l); +int luatpt_gravity(lua_State* l); +int luatpt_airheat(lua_State* l); +int luatpt_active_menu(lua_State* l); +int luatpt_decorations_enable(lua_State* l); + +int luatpt_heat(lua_State* l); +int luatpt_cmode_set(lua_State* l); +int luatpt_setfire(lua_State* l); +int luatpt_setdebug(lua_State* l); + +int luatpt_setfpscap(lua_State* l); + +int luatpt_getscript(lua_State* l); + +int luatpt_setwindowsize(lua_State* l); + +int luatpt_screenshot(lua_State* l); + +#endif /* LUASCRIPTHELPER_H_ */ diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp new file mode 100644 index 0000000..289222c --- /dev/null +++ b/src/cat/LuaScriptInterface.cpp @@ -0,0 +1,1897 @@ +/* + * LuaScriptInterface.cpp + * + * Created on: Feb 11, 2012 + * Author: Simon + */ + +#include +#include "Config.h" +#include "LuaScriptInterface.h" +#include "simulation/Simulation.h" +#include "game/GameModel.h" +#include "LuaScriptHelper.h" + +LuaScriptInterface::LuaScriptInterface(GameModel * m): + CommandInterface(m) +{ + int i = 0, j; + char tmpname[12]; + int currentElementMeta, currentElement; + const static struct luaL_reg tptluaapi [] = { + {"test", &luatpt_test}, + {"drawtext", &luatpt_drawtext}, + {"create", &luatpt_create}, + {"set_pause", &luatpt_setpause}, + {"toggle_pause", &luatpt_togglepause}, + {"set_console", &luatpt_setconsole}, + {"log", &luatpt_log}, + {"set_pressure", &luatpt_set_pressure}, + {"set_gravity", &luatpt_set_gravity}, + {"reset_gravity_field", &luatpt_reset_gravity_field}, + {"reset_velocity", &luatpt_reset_velocity}, + {"reset_spark", &luatpt_reset_spark}, + {"set_property", &luatpt_set_property}, + {"get_property", &luatpt_get_property}, + {"drawpixel", &luatpt_drawpixel}, + {"drawrect", &luatpt_drawrect}, + {"fillrect", &luatpt_fillrect}, + {"drawline", &luatpt_drawline}, + {"textwidth", &luatpt_textwidth}, + {"get_name", &luatpt_get_name}, + {"set_shortcuts", &luatpt_set_shortcuts}, + {"delete", &luatpt_delete}, + {"register_step", &luatpt_register_step}, + {"unregister_step", &luatpt_unregister_step}, + {"register_mouseclick", &luatpt_register_mouseclick}, + {"unregister_mouseclick", &luatpt_unregister_mouseclick}, + {"register_keypress", &luatpt_register_keypress}, + {"unregister_keypress", &luatpt_unregister_keypress}, + {"register_mouseevent", &luatpt_register_mouseclick}, + {"unregister_mouseevent", &luatpt_unregister_mouseclick}, + {"register_keyevent", &luatpt_register_keypress}, + {"unregister_keyevent", &luatpt_unregister_keypress}, + {"input", &luatpt_input}, + {"message_box", &luatpt_message_box}, + {"get_numOfParts", &luatpt_get_numOfParts}, + {"start_getPartIndex", &luatpt_start_getPartIndex}, + {"next_getPartIndex", &luatpt_next_getPartIndex}, + {"getPartIndex", &luatpt_getPartIndex}, + {"hud", &luatpt_hud}, + {"newtonian_gravity", &luatpt_gravity}, + {"ambient_heat", &luatpt_airheat}, + {"active_menu", &luatpt_active_menu}, + {"decorations_enable", &luatpt_decorations_enable}, + {"display_mode", &luatpt_cmode_set}, + {"throw_error", &luatpt_error}, + {"heat", &luatpt_heat}, + {"setfire", &luatpt_setfire}, + {"setdebug", &luatpt_setdebug}, + {"setfpscap",&luatpt_setfpscap}, + {"getscript",&luatpt_getscript}, + {"setwindowsize",&luatpt_setwindowsize}, + {"watertest",&luatpt_togglewater}, + {"screenshot",&luatpt_screenshot}, + {"element",&luatpt_getelement}, + {"element_func",&luatpt_element_func}, + {NULL,NULL} + }; + + luacon_model = m; + luacon_sim = m->GetSimulation(); + luacon_g = ui::Engine::Ref().g; + + l = lua_open(); + luaL_openlibs(l); + luaL_register(l, "tpt", tptluaapi); + + tptProperties = lua_gettop(l); + + lua_pushinteger(l, 0); + lua_setfield(l, tptProperties, "mousex"); + lua_pushinteger(l, 0); + lua_setfield(l, tptProperties, "mousey"); + lua_pushinteger(l, 0); + lua_setfield(l, tptProperties, "selectedl"); + lua_pushinteger(l, 0); + lua_setfield(l, tptProperties, "selectedr"); + + lua_newtable(l); + tptPropertiesVersion = lua_gettop(l); + lua_pushinteger(l, SAVE_VERSION); + lua_setfield(l, tptPropertiesVersion, "major"); + lua_pushinteger(l, MINOR_VERSION); + lua_setfield(l, tptPropertiesVersion, "minor"); + lua_pushinteger(l, BUILD_NUM); + lua_setfield(l, tptPropertiesVersion, "build"); + lua_setfield(l, tptProperties, "version"); + +#ifdef FFI + //LuaJIT's ffi gives us direct access to parts data, no need for nested metatables. HOWEVER, this is in no way safe, it's entirely possible for someone to try to read parts[-10] + lua_pushlightuserdata(l, parts); + lua_setfield(l, tptProperties, "partsdata"); + + luaL_dostring (l, "ffi = require(\"ffi\")\n\ +ffi.cdef[[\n\ +typedef struct { int type; int life, ctype; float x, y, vx, vy; float temp; float pavg[2]; int flags; int tmp; int tmp2; unsigned int dcolour; } particle;\n\ +]]\n\ +tpt.parts = ffi.cast(\"particle *\", tpt.partsdata)\n\ +ffi = nil\n\ +tpt.partsdata = nil"); + //Since ffi is REALLY REALLY dangrous, we'll remove it from the environment completely (TODO) + //lua_pushstring(l, "parts"); + //tptPartsCData = lua_gettable(l, tptProperties); +#else + lua_newtable(l); + tptParts = lua_gettop(l); + lua_newtable(l); + tptPartsMeta = lua_gettop(l); + lua_pushcfunction(l, luacon_partswrite); + lua_setfield(l, tptPartsMeta, "__newindex"); + lua_pushcfunction(l, luacon_partsread); + lua_setfield(l, tptPartsMeta, "__index"); + lua_setmetatable(l, tptParts); + lua_setfield(l, tptProperties, "parts"); + + lua_newtable(l); + tptPart = lua_gettop(l); + lua_newtable(l); + tptPartMeta = lua_gettop(l); + lua_pushcfunction(l, luacon_partwrite); + lua_setfield(l, tptPartMeta, "__newindex"); + lua_pushcfunction(l, luacon_partread); + lua_setfield(l, tptPartMeta, "__index"); + lua_setmetatable(l, tptPart); + + tptPart = luaL_ref(l, LUA_REGISTRYINDEX); +#endif + + lua_newtable(l); + tptElements = lua_gettop(l); + for(i = 1; i < PT_NUM; i++) + { + for(j = 0; j < strlen(luacon_sim->ptypes[i].name); j++) + tmpname[j] = tolower(luacon_sim->ptypes[i].name[j]); + tmpname[strlen(luacon_sim->ptypes[i].name)] = 0; + + lua_newtable(l); + currentElement = lua_gettop(l); + lua_pushinteger(l, i); + lua_setfield(l, currentElement, "id"); + + lua_newtable(l); + currentElementMeta = lua_gettop(l); + lua_pushcfunction(l, luacon_elementwrite); + lua_setfield(l, currentElementMeta, "__newindex"); + lua_pushcfunction(l, luacon_elementread); + lua_setfield(l, currentElementMeta, "__index"); + lua_setmetatable(l, currentElement); + + lua_setfield(l, tptElements, tmpname); + } + lua_setfield(l, tptProperties, "el"); + + lua_newtable(l); + tptElementTransitions = lua_gettop(l); + for(i = 1; i < PT_NUM; i++) + { + for(j = 0; j < strlen(luacon_sim->ptypes[i].name); j++) + tmpname[j] = tolower(luacon_sim->ptypes[i].name[j]); + tmpname[strlen(luacon_sim->ptypes[i].name)] = 0; + + lua_newtable(l); + currentElement = lua_gettop(l); + lua_newtable(l); + currentElementMeta = lua_gettop(l); + lua_pushinteger(l, i); + lua_setfield(l, currentElement, "value"); + lua_pushcfunction(l, luacon_transitionwrite); + lua_setfield(l, currentElementMeta, "__newindex"); + lua_pushcfunction(l, luacon_transitionread); + lua_setfield(l, currentElementMeta, "__index"); + lua_setmetatable(l, currentElement); + + lua_setfield(l, tptElementTransitions, tmpname); + } + lua_setfield(l, tptProperties, "eltransition"); + + lua_el_func = (int*)calloc(PT_NUM, sizeof(int)); + lua_el_mode = (int*)calloc(PT_NUM, sizeof(int)); + for(i = 0; i < PT_NUM; i++) + { + lua_el_mode[i] = 0; + } +} + +void LuaScriptInterface::Tick() +{ + +} + +int LuaScriptInterface::Command(std::string command) +{ + luaL_dostring(l, command.c_str()); + return 0; +} + +std::string LuaScriptInterface::FormatCommand(std::string command) +{ + return command; +} + +LuaScriptInterface::~LuaScriptInterface() { + // TODO Auto-generated destructor stub +} + +#ifndef FFI +int luacon_partread(lua_State* l){ + int format, offset, tempinteger; + float tempfloat; + int i; + char * key = mystrdup((char*)luaL_optstring(l, 2, "")); + offset = luacon_particle_getproperty(key, &format); + + i = cIndex; + + if(i < 0 || i >= NPART || offset==-1) + { + if(i < 0 || i >= NPART) { + free(key); + return luaL_error(l, "Out of range"); + } else if(strcmp(key, "id")==0) { + free(key); + lua_pushnumber(l, i); + return 1; + } else { + free(key); + return luaL_error(l, "Invalid property"); + } + } + free(key); + switch(format) + { + case 0: + tempinteger = *((int*)(((void*)&luacon_sim->parts[i])+offset)); + lua_pushnumber(l, tempinteger); + break; + case 1: + tempfloat = *((float*)(((void*)&luacon_sim->parts[i])+offset)); + lua_pushnumber(l, tempfloat); + break; + } + return 1; +} +int luacon_partwrite(lua_State* l){ + int format, offset; + int i; + char * key = mystrdup((char*)luaL_optstring(l, 2, "")); + offset = luacon_particle_getproperty(key, &format); + + i = cIndex; + + if(i < 0 || i >= NPART || offset==-1) + { + if(i < 0 || i >= NPART) { + free(key); + return luaL_error(l, "array index out of bounds"); + } else { + free(key); + return luaL_error(l, "Invalid property"); + } + } + free(key); + switch(format) + { + case 0: + *((int*)(((void*)&luacon_sim->parts[i])+offset)) = luaL_optinteger(l, 3, 0); + break; + case 1: + *((float*)(((void*)&luacon_sim->parts[i])+offset)) = luaL_optnumber(l, 3, 0); + break; + } + return 1; +} +int luacon_partsread(lua_State* l){ + int format, offset; + char * tempstring; + int tempinteger; + float tempfloat; + int i, currentPart, currentPartMeta; + + i = luaL_optinteger(l, 2, 0); + + if(i<0 || i>=NPART) + { + return luaL_error(l, "array index out of bounds"); + } + + lua_rawgeti(l, LUA_REGISTRYINDEX, tptPart); + cIndex = i; + return 1; +} +int luacon_partswrite(lua_State* l){ + return luaL_error(l, "table readonly"); +} +#endif +int luacon_particle_getproperty(char * key, int * format) +{ + int offset; + if (strcmp(key, "type")==0){ + offset = offsetof(Particle, type); + *format = 0; + } else if (strcmp(key, "life")==0){ + offset = offsetof(Particle, life); + *format = 0; + } else if (strcmp(key, "ctype")==0){ + offset = offsetof(Particle, ctype); + *format = 0; + } else if (strcmp(key, "temp")==0){ + offset = offsetof(Particle, temp); + *format = 1; + } else if (strcmp(key, "tmp")==0){ + offset = offsetof(Particle, tmp); + *format = 0; + } else if (strcmp(key, "tmp2")==0){ + offset = offsetof(Particle, tmp2); + *format = 0; + } else if (strcmp(key, "vy")==0){ + offset = offsetof(Particle, vy); + *format = 1; + } else if (strcmp(key, "vx")==0){ + offset = offsetof(Particle, vx); + *format = 1; + } else if (strcmp(key, "x")==0){ + offset = offsetof(Particle, x); + *format = 1; + } else if (strcmp(key, "y")==0){ + offset = offsetof(Particle, y); + *format = 1; + } else if (strcmp(key, "dcolour")==0){ + offset = offsetof(Particle, dcolour); + *format = 0; + } else if (strcmp(key, "dcolor")==0){ + offset = offsetof(Particle, dcolour); + *format = 0; + } else { + offset = -1; + } + return offset; +} +int luacon_transition_getproperty(char * key, int * format) +{ + int offset; + if (strcmp(key, "presHighValue")==0){ + offset = offsetof(part_transition, phv); + *format = 1; + } else if (strcmp(key, "presHighType")==0){ + offset = offsetof(part_transition, pht); + *format = 0; + } else if (strcmp(key, "presLowValue")==0){ + offset = offsetof(part_transition, plv); + *format = 1; + } else if (strcmp(key, "presLowType")==0){ + offset = offsetof(part_transition, plt); + *format = 0; + } else if (strcmp(key, "tempHighValue")==0){ + offset = offsetof(part_transition, thv); + *format = 1; + } else if (strcmp(key, "tempHighType")==0){ + offset = offsetof(part_transition, tht); + *format = 0; + } else if (strcmp(key, "tempLowValue")==0){ + offset = offsetof(part_transition, tlv); + *format = 1; + } else if (strcmp(key, "tempLowType")==0){ + offset = offsetof(part_transition, tlt); + *format = 0; + } else { + offset = -1; + } + return offset; +} +int luacon_transitionread(lua_State* l){ + int format, offset; + int tempinteger; + float tempfloat; + int i; + char * key = mystrdup((char*)luaL_optstring(l, 2, "")); + offset = luacon_transition_getproperty(key, &format); + free(key); + + //Get Raw Index value for element + lua_pushstring(l, "value"); + lua_rawget(l, 1); + + i = lua_tointeger(l, lua_gettop(l)); + + lua_pop(l, 1); + + if(i < 0 || i >= PT_NUM || offset==-1) + { + return luaL_error(l, "Invalid property"); + } + switch(format) + { + case 0: + tempinteger = *((int*)(((void*)&luacon_sim->ptransitions[i])+offset)); + lua_pushnumber(l, tempinteger); + break; + case 1: + tempfloat = *((float*)(((void*)&luacon_sim->ptransitions[i])+offset)); + lua_pushnumber(l, tempfloat); + break; + } + return 1; +} +int luacon_transitionwrite(lua_State* l){ + int format, offset; + int tempinteger; + float tempfloat; + int i; + char * key = mystrdup((char*)luaL_optstring(l, 2, "")); + offset = luacon_transition_getproperty(key, &format); + free(key); + + //Get Raw Index value for element + lua_pushstring(l, "value"); + lua_rawget(l, 1); + + i = lua_tointeger (l, lua_gettop(l)); + + lua_pop(l, 1); + + if(i < 0 || i >= PT_NUM || offset==-1) + { + return luaL_error(l, "Invalid property"); + } + switch(format) + { + case 0: + *((int*)(((void*)&luacon_sim->ptransitions[i])+offset)) = luaL_optinteger(l, 3, 0); + break; + case 1: + *((float*)(((void*)&luacon_sim->ptransitions[i])+offset)) = luaL_optnumber(l, 3, 0); + break; + } + return 0; +} +int luacon_element_getproperty(char * key, int * format, unsigned int * modified_stuff) +{ + int offset; + if (strcmp(key, "name")==0){ + offset = offsetof(part_type, name); + *format = 2; + } + else if (strcmp(key, "color")==0){ + offset = offsetof(part_type, pcolors); + *format = 0; + if (modified_stuff) + *modified_stuff |= LUACON_EL_MODIFIED_GRAPHICS; + } + else if (strcmp(key, "colour")==0){ + offset = offsetof(part_type, pcolors); + *format = 0; + if (modified_stuff) + *modified_stuff |= LUACON_EL_MODIFIED_GRAPHICS; + } + else if (strcmp(key, "advection")==0){ + offset = offsetof(part_type, advection); + *format = 1; + } + else if (strcmp(key, "airdrag")==0){ + offset = offsetof(part_type, airdrag); + *format = 1; + } + else if (strcmp(key, "airloss")==0){ + offset = offsetof(part_type, airloss); + *format = 1; + } + else if (strcmp(key, "loss")==0){ + offset = offsetof(part_type, loss); + *format = 1; + } + else if (strcmp(key, "collision")==0){ + offset = offsetof(part_type, collision); + *format = 1; + } + else if (strcmp(key, "gravity")==0){ + offset = offsetof(part_type, gravity); + *format = 1; + } + else if (strcmp(key, "diffusion")==0){ + offset = offsetof(part_type, diffusion); + *format = 1; + } + else if (strcmp(key, "hotair")==0){ + offset = offsetof(part_type, hotair); + *format = 1; + } + else if (strcmp(key, "falldown")==0){ + offset = offsetof(part_type, falldown); + *format = 0; + } + else if (strcmp(key, "flammable")==0){ + offset = offsetof(part_type, flammable); + *format = 0; + } + else if (strcmp(key, "explosive")==0){ + offset = offsetof(part_type, explosive); + *format = 0; + } + else if (strcmp(key, "meltable")==0){ + offset = offsetof(part_type, meltable); + *format = 0; + } + else if (strcmp(key, "hardness")==0){ + offset = offsetof(part_type, hardness); + *format = 0; + } + else if (strcmp(key, "menu")==0){ + offset = offsetof(part_type, menu); + *format = 0; + if (modified_stuff) + *modified_stuff |= LUACON_EL_MODIFIED_MENUS; + } + else if (strcmp(key, "enabled")==0){ + offset = offsetof(part_type, enabled); + *format = 0; + } + else if (strcmp(key, "weight")==0){ + offset = offsetof(part_type, weight); + *format = 0; + if (modified_stuff) + *modified_stuff |= LUACON_EL_MODIFIED_CANMOVE; + } + else if (strcmp(key, "menusection")==0){ + offset = offsetof(part_type, menusection); + *format = 0; + if (modified_stuff) + *modified_stuff |= LUACON_EL_MODIFIED_MENUS; + } + else if (strcmp(key, "heat")==0){ + offset = offsetof(part_type, heat); + *format = 1; + } + else if (strcmp(key, "hconduct")==0){ + offset = offsetof(part_type, hconduct); + *format = 3; + } + else if (strcmp(key, "state")==0){ + offset = offsetof(part_type, state); + *format = 3; + } + else if (strcmp(key, "properties")==0){ + offset = offsetof(part_type, properties); + *format = 0; + if (modified_stuff) + *modified_stuff |= LUACON_EL_MODIFIED_GRAPHICS | LUACON_EL_MODIFIED_CANMOVE; + } + else if (strcmp(key, "description")==0){ + offset = offsetof(part_type, descs); + *format = 2; + } + else { + return -1; + } + return offset; +} +int luacon_elementread(lua_State* l){ + int format, offset; + char * tempstring; + int tempinteger; + float tempfloat; + int i; + char * key = mystrdup((char*)luaL_optstring(l, 2, "")); + offset = luacon_element_getproperty(key, &format, NULL); + free(key); + + //Get Raw Index value for element + lua_pushstring(l, "id"); + lua_rawget(l, 1); + + i = lua_tointeger (l, lua_gettop(l)); + + lua_pop(l, 1); + + if(i < 0 || i >= PT_NUM || offset==-1) + { + return luaL_error(l, "Invalid property"); + } + switch(format) + { + case 0: + tempinteger = *((int*)(((void*)&luacon_sim->ptypes[i])+offset)); + lua_pushnumber(l, tempinteger); + break; + case 1: + tempfloat = *((float*)(((void*)&luacon_sim->ptypes[i])+offset)); + lua_pushnumber(l, tempfloat); + break; + case 2: + tempstring = *((char**)(((void*)&luacon_sim->ptypes[i])+offset)); + lua_pushstring(l, tempstring); + break; + case 3: + tempinteger = *((unsigned char*)(((void*)&luacon_sim->ptypes[i])+offset)); + lua_pushnumber(l, tempinteger); + break; + } + return 1; +} +int luacon_elementwrite(lua_State* l){ + int format, offset; + char * tempstring; + int tempinteger; + float tempfloat; + int i; + unsigned int modified_stuff = 0; + char * key = mystrdup((char*)luaL_optstring(l, 2, "")); + offset = luacon_element_getproperty(key, &format, &modified_stuff); + + //Get Raw Index value for element + lua_pushstring(l, "id"); + lua_rawget(l, 1); + + i = lua_tointeger (l, lua_gettop(l)); + + lua_pop(l, 1); + + if(i < 0 || i >= PT_NUM || offset==-1) + { + free(key); + return luaL_error(l, "Invalid property"); + } + switch(format) + { + case 0: + *((int*)(((void*)&luacon_sim->ptypes[i])+offset)) = luaL_optinteger(l, 3, 0); + break; + case 1: + *((float*)(((void*)&luacon_sim->ptypes[i])+offset)) = luaL_optnumber(l, 3, 0); + break; + case 2: + tempstring = mystrdup((char*)luaL_optstring(l, 3, "")); + if(strcmp(key, "name")==0) + { + int j = 0; + //Convert to upper case + for(j = 0; j < strlen(tempstring); j++) + tempstring[j] = toupper(tempstring[j]); + if(strlen(tempstring)>4) + { + free(tempstring); + free(key); + return luaL_error(l, "Name too long"); + } + if(luacon_ci->GetParticleType(tempstring) == -1) + { + free(tempstring); + free(key); + return luaL_error(l, "Name in use"); + } + } + *((char**)(((void*)&luacon_sim->ptypes[i])+offset)) = tempstring; + //Need some way of cleaning up previous values + break; + case 3: + *((unsigned char*)(((void*)&luacon_sim->ptypes[i])+offset)) = luaL_optinteger(l, 3, 0); + break; + } + if (modified_stuff) + { + //if (modified_stuff & LUACON_EL_MODIFIED_MENUS) + //luacon_model->notifyMenuListChanged(); + if (modified_stuff & LUACON_EL_MODIFIED_CANMOVE) + luacon_sim->init_can_move(); + if (modified_stuff & LUACON_EL_MODIFIED_GRAPHICS) + memset(luacon_model->GetRenderer()->graphicscache, 0, sizeof(gcache_item)*PT_NUM); + } + free(key); + return 0; +} +int luacon_keyevent(int key, int modifier, int event){ + int i = 0, kpcontinue = 1; + char tempkey[] = {key, 0}; + if(keypress_function_count){ + for(i = 0; i < keypress_function_count && kpcontinue; i++){ + lua_rawgeti(luacon_ci->l, LUA_REGISTRYINDEX, keypress_functions[i]); + lua_pushstring(luacon_ci->l, tempkey); + lua_pushinteger(luacon_ci->l, key); + lua_pushinteger(luacon_ci->l, modifier); + lua_pushinteger(luacon_ci->l, event); + lua_pcall(luacon_ci->l, 4, 1, 0); + if(lua_isboolean(luacon_ci->l, -1)){ + kpcontinue = lua_toboolean(luacon_ci->l, -1); + } + lua_pop(luacon_ci->l, 1); + } + } + return kpcontinue; +} +int luacon_mouseevent(int mx, int my, int mb, int event){ + int i = 0, mpcontinue = 1; + if(mouseclick_function_count){ + for(i = 0; i < mouseclick_function_count && mpcontinue; i++){ + lua_rawgeti(luacon_ci->l, LUA_REGISTRYINDEX, mouseclick_functions[i]); + lua_pushinteger(luacon_ci->l, mx); + lua_pushinteger(luacon_ci->l, my); + lua_pushinteger(luacon_ci->l, mb); + lua_pushinteger(luacon_ci->l, event); + lua_pcall(luacon_ci->l, 4, 1, 0); + if(lua_isboolean(luacon_ci->l, -1)){ + mpcontinue = lua_toboolean(luacon_ci->l, -1); + } + lua_pop(luacon_ci->l, 1); + } + } + return mpcontinue; +} +int luacon_step(int mx, int my, int selectl, int selectr){ + int tempret = 0, tempb, i, callret; + lua_pushinteger(luacon_ci->l, selectr); + lua_pushinteger(luacon_ci->l, selectl); + lua_pushinteger(luacon_ci->l, my); + lua_pushinteger(luacon_ci->l, mx); + lua_setfield(luacon_ci->l, tptProperties, "mousex"); + lua_setfield(luacon_ci->l, tptProperties, "mousey"); + lua_setfield(luacon_ci->l, tptProperties, "selectedl"); + lua_setfield(luacon_ci->l, tptProperties, "selectedr"); + if(step_functions[0]){ + //Set mouse globals + for(i = 0; i<6; i++){ + if(step_functions[i]){ + lua_rawgeti(luacon_ci->l, LUA_REGISTRYINDEX, step_functions[i]); + callret = lua_pcall(luacon_ci->l, 0, 0, 0); + if (callret) + { + // failed, TODO: better error reporting + printf("%s\n",luacon_geterror()); + } + } + } + return tempret; + } + return 0; +} +int luacon_eval(char *command){ + return luaL_dostring (luacon_ci->l, command); +} +int luacon_part_update(int t, int i, int x, int y, int surround_space, int nt) +{ + int retval = 0; + if(lua_el_func[t]){ + lua_rawgeti(luacon_ci->l, LUA_REGISTRYINDEX, lua_el_func[t]); + lua_pushinteger(luacon_ci->l, i); + lua_pushinteger(luacon_ci->l, x); + lua_pushinteger(luacon_ci->l, y); + lua_pushinteger(luacon_ci->l, surround_space); + lua_pushinteger(luacon_ci->l, nt); + lua_pcall(luacon_ci->l, 5, 1, 0); + if(lua_isboolean(luacon_ci->l, -1)){ + retval = lua_toboolean(luacon_ci->l, -1); + } + lua_pop(luacon_ci->l, 1); + } + return retval; +} +char *luacon_geterror(){ + char *error = (char*)lua_tostring(luacon_ci->l, -1); + if(error==NULL || !error[0]){ + error = "failed to execute"; + } + return error; +} +/*void luacon_close(){ + lua_close(l); +}*/ + +//TPT Interface methods +int luatpt_test(lua_State* l) +{ + int testint = 0; + testint = luaL_optint(l, 1, 0); + printf("Test successful, got %d\n", testint); + return 0; +} +int luatpt_getelement(lua_State *l) +{ + int t; + char * name = (char*)luaL_optstring(l, 1, "dust"); + if ((t = luacon_ci->GetParticleType(name))==-1) + return luaL_error(l,"Unrecognised element '%s'", name); + lua_pushinteger(l, t); + return 1; +} +int luatpt_element_func(lua_State *l) +{ + if(lua_isfunction(l, 1)) + { + int element = luaL_optint(l, 2, 0); + int replace = luaL_optint(l, 3, 0); + int function; + lua_pushvalue(l, 1); + function = luaL_ref(l, LUA_REGISTRYINDEX); + if(element > 0 && element < PT_NUM) + { + lua_el_func[element] = function; + if(replace) + lua_el_mode[element] = 2; + else + lua_el_mode[element] = 1; + return 0; + } + else + { + return luaL_error(l, "Invalid element"); + } + } + return 0; +} +int luatpt_error(lua_State* l) +{ + /*char *error = ""; + error = mystrdup((char*)luaL_optstring(l, 1, "Error text")); + if(vid_buf!=NULL){ + error_ui(vid_buf, 0, error); + free(error); + return 0; + } + free(error); + return luaL_error(l, "Screen buffer does not exist");*/ + //TODO IMPLEMENT +} +int luatpt_drawtext(lua_State* l) +{ + char *string; + int textx, texty, textred, textgreen, textblue, textalpha; + textx = luaL_optint(l, 1, 0); + texty = luaL_optint(l, 2, 0); + string = (char*)luaL_optstring(l, 3, ""); + textred = luaL_optint(l, 4, 255); + textgreen = luaL_optint(l, 5, 255); + textblue = luaL_optint(l, 6, 255); + textalpha = luaL_optint(l, 7, 255); + if (textx<0 || texty<0 || textx>=XRES+BARSIZE || texty>=YRES+MENUSIZE) + return luaL_error(l, "Screen coordinates out of range (%d,%d)", textx, texty); + if (textred<0) textred = 0; + if (textred>255) textred = 255; + if (textgreen<0) textgreen = 0; + if (textgreen>255) textgreen = 255; + if (textblue<0) textblue = 0; + if (textblue>255) textblue = 255; + if (textalpha<0) textalpha = 0; + if (textalpha>255) textalpha = 255; + if(luacon_g!=NULL){ + luacon_g->drawtext(textx, texty, string, textred, textgreen, textblue, textalpha); + return 0; + } + return luaL_error(l, "Screen buffer does not exist"); +} + +int luatpt_create(lua_State* l) +{ + int x, y, retid, t = -1; + char * name; + x = abs(luaL_optint(l, 1, 0)); + y = abs(luaL_optint(l, 2, 0)); + if(x < XRES && y < YRES){ + if(lua_isnumber(l, 3)){ + t = luaL_optint(l, 3, 0); + if (t<0 || t >= PT_NUM || !luacon_sim->ptypes[t].enabled) + return luaL_error(l, "Unrecognised element number '%d'", t); + } else { + name = (char*)luaL_optstring(l, 3, "dust"); + if ((t = luacon_ci->GetParticleType(std::string(name))) == -1) + return luaL_error(l,"Unrecognised element '%s'", name); + } + retid = luacon_sim->create_part(-1, x, y, t); + // failing to create a particle often happens (e.g. if space is already occupied) and isn't usually important, so don't raise an error + lua_pushinteger(l, retid); + return 1; + } + return luaL_error(l, "Coordinates out of range (%d,%d)", x, y); +} + +int luatpt_setpause(lua_State* l) +{ + int pausestate; + pausestate = luaL_optint(l, 1, 0); + luacon_model->SetPaused(pausestate==0?0:1); + return 0; +} + +int luatpt_togglepause(lua_State* l) +{ + luacon_model->SetPaused(!luacon_model->GetPaused()); + //sys_pause=!sys_pause; + return 0; +} + +int luatpt_togglewater(lua_State* l) +{ + luacon_sim->water_equal_test=!luacon_sim->water_equal_test; + return 0; +} + +int luatpt_setconsole(lua_State* l) +{ + /*int consolestate; + consolestate = luaL_optint(l, 1, 0); + console_mode = (consolestate==0?0:1); + return 0;*/ + //TODO IMPLEMENT + return 0; +} + +int luatpt_log(lua_State* l) +{ + /*char *buffer; + buffer = luaL_optstring(l, 1, ""); + strncpy(console_error, buffer, 254); + return 0;*/ + //luacon_ci->lastError = luaL_optstring(l, 1, ""); + //TODO IMPLEMENT - Have some sort of error log that is visible outside the console. +} + +int luatpt_set_pressure(lua_State* l) +{ + int nx, ny; + int x1, y1, width, height; + float value; + x1 = abs(luaL_optint(l, 1, 0)); + y1 = abs(luaL_optint(l, 2, 0)); + width = abs(luaL_optint(l, 3, XRES/CELL)); + height = abs(luaL_optint(l, 4, YRES/CELL)); + value = (float)luaL_optint(l, 5, 0.0f); + if(value > 256.0f) + value = 256.0f; + else if(value < -256.0f) + value = -256.0f; + + if(x1 > (XRES/CELL)-1) + x1 = (XRES/CELL)-1; + if(y1 > (YRES/CELL)-1) + y1 = (YRES/CELL)-1; + if(x1+width > (XRES/CELL)-1) + width = (XRES/CELL)-x1; + if(y1+height > (YRES/CELL)-1) + height = (YRES/CELL)-y1; + for (nx = x1; nxpv[ny][nx] = value; + } + return 0; +} + +int luatpt_set_gravity(lua_State* l) +{ + int nx, ny; + int x1, y1, width, height; + float value; + x1 = abs(luaL_optint(l, 1, 0)); + y1 = abs(luaL_optint(l, 2, 0)); + width = abs(luaL_optint(l, 3, XRES/CELL)); + height = abs(luaL_optint(l, 4, YRES/CELL)); + value = (float)luaL_optint(l, 5, 0.0f); + if(value > 256.0f) + value = 256.0f; + else if(value < -256.0f) + value = -256.0f; + + if(x1 > (XRES/CELL)-1) + x1 = (XRES/CELL)-1; + if(y1 > (YRES/CELL)-1) + y1 = (YRES/CELL)-1; + if(x1+width > (XRES/CELL)-1) + width = (XRES/CELL)-x1; + if(y1+height > (YRES/CELL)-1) + height = (YRES/CELL)-y1; + for (nx = x1; nxgravmap[ny*(XRES/CELL)+nx] = value; + } + return 0; +} + +int luatpt_reset_gravity_field(lua_State* l) +{ + int nx, ny; + int x1, y1, width, height; + x1 = abs(luaL_optint(l, 1, 0)); + y1 = abs(luaL_optint(l, 2, 0)); + width = abs(luaL_optint(l, 3, XRES/CELL)); + height = abs(luaL_optint(l, 4, YRES/CELL)); + if(x1 > (XRES/CELL)-1) + x1 = (XRES/CELL)-1; + if(y1 > (YRES/CELL)-1) + y1 = (YRES/CELL)-1; + if(x1+width > (XRES/CELL)-1) + width = (XRES/CELL)-x1; + if(y1+height > (YRES/CELL)-1) + height = (YRES/CELL)-y1; + for (nx = x1; nxgravx[ny*(XRES/CELL)+nx] = 0; + luacon_sim->gravy[ny*(XRES/CELL)+nx] = 0; + luacon_sim->gravp[ny*(XRES/CELL)+nx] = 0; + } + return 0; +} + +int luatpt_reset_velocity(lua_State* l) +{ + int nx, ny; + int x1, y1, width, height; + x1 = abs(luaL_optint(l, 1, 0)); + y1 = abs(luaL_optint(l, 2, 0)); + width = abs(luaL_optint(l, 3, XRES/CELL)); + height = abs(luaL_optint(l, 4, YRES/CELL)); + if(x1 > (XRES/CELL)-1) + x1 = (XRES/CELL)-1; + if(y1 > (YRES/CELL)-1) + y1 = (YRES/CELL)-1; + if(x1+width > (XRES/CELL)-1) + width = (XRES/CELL)-x1; + if(y1+height > (YRES/CELL)-1) + height = (YRES/CELL)-y1; + for (nx = x1; nxvx[ny][nx] = 0; + luacon_sim->vy[ny][nx] = 0; + } + return 0; +} + +int luatpt_reset_spark(lua_State* l) +{ + int i; + for (i=0; iparts[i].type==PT_SPRK) + { + luacon_sim->parts[i].type = luacon_sim->parts[i].ctype; + luacon_sim->parts[i].life = 4; + } + } + return 0; +} + +int luatpt_set_property(lua_State* l) +{ + char *prop, *name; + int r, i, x, y, w, h, t, nx, ny, partsel = 0, acount; + float f; + size_t offset; + acount = lua_gettop(l); + prop = (char*)luaL_optstring(l, 1, ""); + if(lua_isnumber(l, 3)) + i = abs(luaL_optint(l, 3, -1)); + else + i = -1; + if(lua_isnumber(l, 4)) + y = abs(luaL_optint(l, 4, -1)); + else + y = -1; + if(lua_isnumber(l, 5)) + w = abs(luaL_optint(l, 5, -1)); + else + w = -1; + if(lua_isnumber(l, 6)) + h = abs(luaL_optint(l, 6, -1)); + else + h = -1; + + CommandInterface::FormatType format; + offset = luacon_ci->GetPropertyOffset(prop, format); + if(offset == -1) + return luaL_error(l, "Invalid property '%s'", prop); + //TODO: Use particle_getproperty + /*if (strcmp(prop,"type")==0){ + offset = offsetof(particle, type); + format = 3; + } else if (strcmp(prop,"life")==0){ + offset = offsetof(particle, life); + format = 1; + } else if (strcmp(prop,"ctype")==0){ + offset = offsetof(particle, ctype); + format = 4; + } else if (strcmp(prop,"temp")==0){ + offset = offsetof(particle, temp); + format = 2; + } else if (strcmp(prop,"tmp")==0){ + offset = offsetof(particle, tmp); + format = 1; + } else if (strcmp(prop,"tmp2")==0){ + offset = offsetof(particle, tmp2); + format = 1; + } else if (strcmp(prop,"vy")==0){ + offset = offsetof(particle, vy); + format = 2; + } else if (strcmp(prop,"vx")==0){ + offset = offsetof(particle, vx); + format = 2; + } else if (strcmp(prop,"x")==0){ + offset = offsetof(particle, x); + format = 2; + } else if (strcmp(prop,"y")==0){ + offset = offsetof(particle, y); + format = 2; + } else if (strcmp(prop,"dcolour")==0){ + offset = offsetof(particle, dcolour); + format = 1; + } else { + return luaL_error(l, "Invalid property '%s'", prop); + }*/ + if(acount>2){ + if(!lua_isnumber(l, acount) && lua_isstring(l, acount)){ + name = (char*)luaL_optstring(l, acount, "none"); + if((partsel = luacon_ci->GetParticleType(std::string(name)))==-1) + return luaL_error(l, "Unrecognised element '%s'", name); + } + } + if(lua_isnumber(l, 2)){ + if(format == CommandInterface::FormatFloat){ + f = luaL_optnumber(l, 2, 0); + } else { + t = luaL_optint(l, 2, 0); + } + //TODO Element ID check + //if (format == 3 && (t<0 || t>=PT_NUM)) + // return luaL_error(l, "Unrecognised element number '%d'", t); + } else { + name = (char*)luaL_optstring(l, 2, "dust"); + //if (!console_parse_type(name, &t, NULL)) + if((t = luacon_ci->GetParticleType(std::string(name)))==-1) + return luaL_error(l, "Unrecognised element '%s'", name); + } + if(i == -1 || (w != -1 && h != -1)){ + // Got a region + if(i == -1){ + i = 0; + y = 0; + w = XRES; + h = YRES; + } + if (i>=XRES || y>=YRES) + return luaL_error(l, "Coordinates out of range (%d,%d)", i, y); + x = i; + if(x+w > XRES) + w = XRES-x; + if(y+h > YRES) + h = YRES-y; + for (nx = x; nxpmap[ny][nx]; + if (!r || (partsel && partsel != luacon_sim->parts[r>>8].type)) + { + r = luacon_sim->photons[ny][nx]; + if (!r || (partsel && partsel != luacon_sim->parts[r>>8].type)) + continue; + } + i = r>>8; + if(format == CommandInterface::FormatFloat){ + *((float*)(((void*)&luacon_sim->parts[i])+offset)) = f; + } else { + *((int*)(((void*)&luacon_sim->parts[i])+offset)) = t; + } + } + } else { + // Got coords or particle index + if(i != -1 && y != -1){ + if (i>=XRES || y>=YRES) + return luaL_error(l, "Coordinates out of range (%d,%d)", i, y); + r = luacon_sim->pmap[y][i]; + if (!r || (partsel && partsel != luacon_sim->parts[r>>8].type)) + r = luacon_sim->photons[y][i]; + if (!r || (partsel && partsel != luacon_sim->parts[r>>8].type)) + return 0; + i = r>>8; + } + if (i < 0 || i >= NPART) + return luaL_error(l, "Invalid particle ID '%d'", i); + if (!luacon_sim->parts[i].type) + return 0; + if (partsel && partsel != luacon_sim->parts[i].type) + return 0; + if(format == CommandInterface::FormatFloat){ + *((float*)(((void*)&luacon_sim->parts[i])+offset)) = f; + } else { + *((int*)(((void*)&luacon_sim->parts[i])+offset)) = t; + } + } + return 0; +} + +int luatpt_get_property(lua_State* l) +{ + int i, r, y; + char *prop; + prop = (char*)luaL_optstring(l, 1, ""); + i = luaL_optint(l, 2, 0); + y = luaL_optint(l, 3, -1); + if(y!=-1 && y < YRES && y >= 0 && i < XRES && i >= 0){ + r = luacon_sim->pmap[y][i]; + if (!r) + r = luacon_sim->photons[y][i]; + if (!r) + { + if (strcmp(prop,"type")==0){ + lua_pushinteger(l, 0); + return 1; + } + return luaL_error(l, "Particle does not exist"); + } + i = r>>8; + } + else if (y!=-1) + return luaL_error(l, "Coordinates out of range (%d,%d)", i, y); + if (i < 0 || i >= NPART) + return luaL_error(l, "Invalid particle ID '%d'", i); + if (luacon_sim->parts[i].type) + { + //TODO: Use particle_getproperty + if (strcmp(prop,"type")==0){ + lua_pushinteger(l, luacon_sim->parts[i].type); + return 1; + } + if (strcmp(prop,"life")==0){ + lua_pushinteger(l, luacon_sim->parts[i].life); + return 1; + } + if (strcmp(prop,"ctype")==0){ + lua_pushinteger(l, luacon_sim->parts[i].ctype); + return 1; + } + if (strcmp(prop,"temp")==0){ + lua_pushnumber(l, luacon_sim->parts[i].temp); + return 1; + } + if (strcmp(prop,"tmp")==0){ + lua_pushinteger(l, luacon_sim->parts[i].tmp); + return 1; + } + if (strcmp(prop,"tmp2")==0){ + lua_pushinteger(l, luacon_sim->parts[i].tmp2); + return 1; + } + if (strcmp(prop,"vy")==0){ + lua_pushnumber(l, (double)luacon_sim->parts[i].vy); + return 1; + } + if (strcmp(prop,"vx")==0){ + lua_pushnumber(l, (double)luacon_sim->parts[i].vx); + return 1; + } + if (strcmp(prop,"x")==0){ + lua_pushnumber(l, luacon_sim->parts[i].x); + return 1; + } + if (strcmp(prop,"y")==0){ + lua_pushnumber(l, luacon_sim->parts[i].y); + return 1; + } + if (strcmp(prop,"dcolour")==0){ + lua_pushinteger(l, luacon_sim->parts[i].dcolour); + return 1; + } + if (strcmp(prop,"id")==0){ + lua_pushnumber(l, i); + return 1; + } + } + else if (strcmp(prop,"type")==0){ + lua_pushinteger(l, 0); + return 1; + } + return luaL_error(l, "Particle does not exist"); +} + +int luatpt_drawpixel(lua_State* l) +{ + int x, y, r, g, b, a; + x = luaL_optint(l, 1, 0); + y = luaL_optint(l, 2, 0); + r = luaL_optint(l, 3, 255); + g = luaL_optint(l, 4, 255); + b = luaL_optint(l, 5, 255); + a = luaL_optint(l, 6, 255); + + if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) + return luaL_error(l, "Screen coordinates out of range (%d,%d)", x, y); + if (r<0) r = 0; + if (r>255) r = 255; + if (g<0) g = 0; + if (g>255) g = 255; + if (b<0) b = 0; + if (b>255) b = 255; + if (a<0) a = 0; + if (a>255) a = 255; + if (luacon_g->vid!=NULL) + { + luacon_g->drawpixel(x, y, r, g, b, a); + return 0; + } + return luaL_error(l, "Screen buffer does not exist"); +} + +int luatpt_drawrect(lua_State* l) +{ + int x, y, w, h, r, g, b, a; + x = luaL_optint(l, 1, 0); + y = luaL_optint(l, 2, 0); + w = luaL_optint(l, 3, 10); + h = luaL_optint(l, 4, 10); + r = luaL_optint(l, 5, 255); + g = luaL_optint(l, 6, 255); + b = luaL_optint(l, 7, 255); + a = luaL_optint(l, 8, 255); + + if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) + return luaL_error(l, "Screen coordinates out of range (%d,%d)", x, y); + if(x+w > XRES+BARSIZE) + w = XRES-x; + if(y+h > YRES+MENUSIZE) + h = YRES-y; + if (r<0) r = 0; + if (r>255) r = 255; + if (g<0) g = 0; + if (g>255) g = 255; + if (b<0) b = 0; + if (b>255) b = 255; + if (a<0) a = 0; + if (a>255) a = 255; + if (luacon_g->vid!=NULL) + { + luacon_g->drawrect(x, y, w, h, r, g, b, a); + return 0; + } + return luaL_error(l, "Screen buffer does not exist"); +} + +int luatpt_fillrect(lua_State* l) +{ + int x,y,w,h,r,g,b,a; + x = luaL_optint(l, 1, 0); + y = luaL_optint(l, 2, 0); + w = luaL_optint(l, 3, 10); + h = luaL_optint(l, 4, 10); + r = luaL_optint(l, 5, 255); + g = luaL_optint(l, 6, 255); + b = luaL_optint(l, 7, 255); + a = luaL_optint(l, 8, 255); + + if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) + return luaL_error(l, "Screen coordinates out of range (%d,%d)", x, y); + if(x+w > XRES+BARSIZE) + w = XRES-x; + if(y+h > YRES+MENUSIZE) + h = YRES-y; + if (r<0) r = 0; + if (r>255) r = 255; + if (g<0) g = 0; + if (g>255) g = 255; + if (b<0) b = 0; + if (b>255) b = 255; + if (a<0) a = 0; + if (a>255) a = 255; + if (luacon_g->vid!=NULL) + { + luacon_g->fillrect(x, y, w, h, r, g, b, a); + return 0; + } + return luaL_error(l, "Screen buffer does not exist"); +} + +int luatpt_drawline(lua_State* l) +{ + int x1,y1,x2,y2,r,g,b,a; + x1 = luaL_optint(l, 1, 0); + y1 = luaL_optint(l, 2, 0); + x2 = luaL_optint(l, 3, 10); + y2 = luaL_optint(l, 4, 10); + r = luaL_optint(l, 5, 255); + g = luaL_optint(l, 6, 255); + b = luaL_optint(l, 7, 255); + a = luaL_optint(l, 8, 255); + + //Don't need to check coordinates, as they are checked in blendpixel + if (r<0) r = 0; + if (r>255) r = 255; + if (g<0) g = 0; + if (g>255) g = 255; + if (b<0) b = 0; + if (b>255) b = 255; + if (a<0) a = 0; + if (a>255) a = 255; + if (luacon_g->vid!=NULL) + { + luacon_g->blend_line(x1, y1, x2, y2, r, g, b, a); + return 0; + } + return luaL_error(l, "Screen buffer does not exist"); +} + +int luatpt_textwidth(lua_State* l) +{ + char * string; + int strwidth = 0; + string = (char*)luaL_optstring(l, 1, ""); + strwidth = Graphics::textwidth(string); + lua_pushinteger(l, strwidth); + return 1; +} + +int luatpt_get_name(lua_State* l) +{ + if (luacon_model->GetUser().ID){ + lua_pushstring(l, luacon_model->GetUser().Username.c_str()); + return 1; + } + lua_pushstring(l, ""); + return 1; +} + +int luatpt_set_shortcuts(lua_State* l) +{ + /*int state; + state = luaL_optint(l, 1, 0); + sys_shortcuts = (state==0?0:1); + return 0;*/ + return luaL_error(l, "set_shortcuts: deprecated"); +} + +int luatpt_delete(lua_State* l) +{ + int arg1, arg2; + arg1 = abs(luaL_optint(l, 1, 0)); + arg2 = luaL_optint(l, 2, -1); + if(arg2 == -1 && arg1 < NPART){ + luacon_sim->kill_part(arg1); + return 0; + } + arg2 = abs(arg2); + if(arg2 < YRES && arg1 < XRES){ + luacon_sim->delete_part(arg1, arg2, 0); + return 0; + } + return luaL_error(l,"Invalid coordinates or particle ID"); +} + +int luatpt_register_step(lua_State* l) +{ + int ref, i, ifree = -1; + if(lua_isfunction(l, 1)){ + for(i = 0; i<6; i++){ + if(!step_functions[i]){ + if (ifree<0) ifree = i; + } else { + lua_rawgeti(l, LUA_REGISTRYINDEX, step_functions[i]); + if(lua_equal(l, 1, lua_gettop(l))){ + lua_pop(l, 1); + return luaL_error(l, "Function already registered"); + } + lua_pop(l, 1); + } + } + if (ifree>=0) + { + ref = luaL_ref(l, LUA_REGISTRYINDEX); + step_functions[ifree] = ref; + return 0; + } + else return luaL_error(l, "Step function limit reached"); + } + return 0; +} +int luatpt_unregister_step(lua_State* l) +{ + int i; + if(lua_isfunction(l, 1)){ + for(i = 0; i<6; i++){ + if (step_functions[i]){ + lua_rawgeti(l, LUA_REGISTRYINDEX, step_functions[i]); + if(lua_equal(l, 1, lua_gettop(l))){ + lua_pop(l, 1); + luaL_unref(l, LUA_REGISTRYINDEX, step_functions[i]); + step_functions[i] = 0; + } + else lua_pop(l, 1); + } + } + } + return 0; +} +int luatpt_register_keypress(lua_State* l) +{ + int *newfunctions, i; + if(lua_isfunction(l, 1)){ + for(i = 0; i 0){ + newfunctions = (int*)calloc(keypress_function_count-1, sizeof(int)); + memcpy(newfunctions, keypress_functions, (keypress_function_count-1)*sizeof(int)); + free(keypress_functions); + keypress_functions = newfunctions; + } else { + free(keypress_functions); + keypress_functions = NULL; + } + keypress_function_count--; + } else { + return luaL_error(l, "Function not registered"); + } + return 0; +} +int luatpt_register_mouseclick(lua_State* l) +{ + int *newfunctions, i; + if(lua_isfunction(l, 1)){ + for(i = 0; i 0){ + newfunctions = (int*)calloc(mouseclick_function_count-1, sizeof(int)); + memcpy(newfunctions, mouseclick_functions, (mouseclick_function_count-1)*sizeof(int)); + free(mouseclick_functions); + mouseclick_functions = newfunctions; + } else { + free(mouseclick_functions); + mouseclick_functions = NULL; + } + mouseclick_function_count--; + } else { + return luaL_error(l, "Function not registered"); + } + return 0; +} +int luatpt_input(lua_State* l) +{ + /*char *prompt, *title, *result, *shadow, *text; + title = mystrdup((char*)luaL_optstring(l, 1, "Title")); + prompt = mystrdup((char*)luaL_optstring(l, 2, "Enter some text:")); + text = mystrdup((char*)luaL_optstring(l, 3, "")); + shadow = mystrdup((char*)luaL_optstring(l, 4, "")); + + if (vid_buf!=NULL) + { + result = input_ui(vid_buf, title, prompt, text, shadow); + lua_pushstring(l, result); + free(result); + free(title); + free(prompt); + free(text); + free(shadow); + return 1; + } + free(title); + free(prompt); + free(text); + free(shadow); + return luaL_error(l, "Screen buffer does not exist");*/ + //TODO IMPLEMENT +} +int luatpt_message_box(lua_State* l) +{ + /*char *title, *text; + title = mystrdup(luaL_optstring(l, 1, "Title")); + text = mystrdup(luaL_optstring(l, 2, "Message")); + if (vid_buf!=NULL) + { + info_ui(vid_buf, title, text); + free(title); + free(text); + return 0; + } + free(title); + free(text); + return luaL_error(l, "Screen buffer does not exist");;*/ + //TODO IMPLEMENT +} +int luatpt_get_numOfParts(lua_State* l) +{ + lua_pushinteger(l, luacon_sim->parts_lastActiveIndex); + return 1; +} +int luatpt_start_getPartIndex(lua_State* l) +{ + getPartIndex_curIdx = -1; + return 1; +} +int luatpt_next_getPartIndex(lua_State* l) +{ + while(1) + { + getPartIndex_curIdx++; + if(getPartIndex_curIdx >= NPART) + { + getPartIndex_curIdx = 0; + lua_pushboolean(l, 0); + return 1; + } + if(luacon_sim->parts[getPartIndex_curIdx].type) + break; + + } + + lua_pushboolean(l, 1); + return 1; +} +int luatpt_getPartIndex(lua_State* l) +{ + if(getPartIndex_curIdx < 0) + { + lua_pushinteger(l, 0); + return 1; + } + lua_pushinteger(l, getPartIndex_curIdx); + return 1; +} +int luatpt_hud(lua_State* l) +{ + /*int hudstate; + hudstate = luaL_optint(l, 1, 0); + hud_enable = (hudstate==0?0:1); + return 0;*/ + //TODO IMPLEMENT +} +int luatpt_gravity(lua_State* l) +{ + //luacon_sim-> + /*int gravstate; + gravstate = luaL_optint(l, 1, 0); + if(gravstate) + start_grav_async(); + else + stop_grav_async(); + ngrav_enable = (gravstate==0?0:1);*/ + //TODO IMPLEMENT + return 0; +} +int luatpt_airheat(lua_State* l) +{ + int aheatstate; + aheatstate = luaL_optint(l, 1, 0); + luacon_sim->aheat_enable = (aheatstate==0?0:1); + return 0; +} +int luatpt_active_menu(lua_State* l) +{ + int menuid; + menuid = luaL_optint(l, 1, -1); + if (menuid < SC_TOTAL && menuid >= 0) + luacon_model->SetActiveMenu(luacon_model->GetMenuList()[menuid]); + else + return luaL_error(l, "Invalid menu"); + return 0; +} +int luatpt_decorations_enable(lua_State* l) +{ + /*int aheatstate; + aheatstate = luaL_optint(l, 1, 0); + decorations_enable = (aheatstate==0?0:1); + return 0;*/ + //TODO IMPLEMENT +} + +int luatpt_heat(lua_State* l) +{ + int heatstate; + heatstate = luaL_optint(l, 1, 0); + luacon_sim->legacy_enable = (heatstate==1?0:1); + return 0; +} +int luatpt_cmode_set(lua_State* l) +{ + return luaL_error(l, "Not implemented"); +} +int luatpt_setfire(lua_State* l) +{ + int firesize = luaL_optint(l, 2, 4); + float fireintensity = (float)luaL_optnumber(l, 1, 1.0f); + //prepare_alpha(firesize, fireintensity); + luacon_model->GetRenderer()->prepare_alpha(firesize, fireintensity); + return 0; +} +int luatpt_setdebug(lua_State* l) +{ + /*int debug = luaL_optint(l, 1, 0); + debug_flags = debug; + return 0;*/ + //TODO IMPLEMENT +} +int luatpt_setfpscap(lua_State* l) +{ + int fpscap = luaL_optint(l, 1, 0); + ui::Engine::Ref().FpsLimit = fpscap; + return 0; +} +int luatpt_getscript(lua_State* l) +{ + //TODO: IMPLEMENT + /*char *fileid = NULL, *filedata = NULL, *fileuri = NULL, *fileauthor = NULL, *filename = NULL, *lastError = NULL, *luacommand = NULL; + int len, ret,run_script; + FILE * outputfile; + + fileauthor = mystrdup(luaL_optstring(l, 1, "")); + fileid = mystrdup(luaL_optstring(l, 2, "")); + run_script = luaL_optint(l, 3, 0); + if(!fileauthor || !fileid || strlen(fileauthor)<1 || strlen(fileid)<1) + goto fin; + if(!confirm_ui(vid_buf, "Do you want to install script?", fileid, "Install")) + goto fin; + + fileuri = malloc(strlen(SCRIPTSERVER)+strlen(fileauthor)+strlen(fileid)+44); + sprintf(fileuri, "http://" SCRIPTSERVER "/GetScript.api?Author=%s&Filename=%s", fileauthor, fileid); + + filedata = http_auth_get(fileuri, svf_user_id, NULL, svf_session_id, &ret, &len); + + if(len <= 0 || !filedata) + { + lastError = "Server did not return data."; + goto fin; + } + if(ret != 200) + { + lastError = http_ret_text(ret); + goto fin; + } + + filename = (char*)malloc(strlen(fileauthor)+strlen(fileid)+strlen(PATH_SEP)+strlen(LOCAL_LUA_DIR)+6); + sprintf(filename, LOCAL_LUA_DIR PATH_SEP "%s_%s.lua", fileauthor, fileid); + +#ifdef WIN32 + _mkdir(LOCAL_LUA_DIR); +#else + mkdir(LOCAL_LUA_DIR, 0755); +#endif + + outputfile = fopen(filename, "r"); + if(outputfile) + { + fclose(outputfile); + outputfile = NULL; + if(confirm_ui(vid_buf, "File already exists, overwrite?", filename, "Overwrite")) + { + outputfile = fopen(filename, "w"); + } + else + { + goto fin; + } + } + else + { + outputfile = fopen(filename, "w"); + } + + if(!outputfile) + { + lastError = "Unable to write to file"; + goto fin; + } + + + fputs(filedata, outputfile); + fclose(outputfile); + outputfile = NULL; + if(run_script) + { + luacommand = malloc(strlen(filename)+20); + sprintf(luacommand,"dofile(\"%s\")",filename); + luaL_dostring (l, luacommand); + } + +fin: + if(fileid) free(fileid); + if(filedata) free(filedata); + if(fileuri) free(fileuri); + if(fileauthor) free(fileauthor); + if(filename) free(filename); + if(luacommand) free(luacommand); + luacommand = NULL; + + if(lastError) return luaL_error(l, lastError); + return 0;*/ +} + +int luatpt_setwindowsize(lua_State* l) +{ + /*int result, scale = luaL_optint(l,1,1), kiosk = luaL_optint(l,2,0); + if (scale!=2) scale = 1; + if (kiosk!=1) kiosk = 0; + result = set_scale(scale, kiosk); + lua_pushnumber(l, result); + return 1;*/ + //TODO Implement +} + +int luatpt_screenshot(lua_State* l) +{ + //TODO Implement + /*int captureUI = luaL_optint(l, 1, 0); + if(vid_buf) + { + if(captureUI) + { + dump_frame(vid_buf, XRES+BARSIZE, YRES+MENUSIZE, XRES+BARSIZE); + } + else + { + dump_frame(vid_buf, XRES, YRES, XRES+BARSIZE); + } + return 0; + }*/ + return luaL_error(l, "Screen buffer does not exist"); +} + diff --git a/src/cat/LuaScriptInterface.h b/src/cat/LuaScriptInterface.h new file mode 100644 index 0000000..2fcfc33 --- /dev/null +++ b/src/cat/LuaScriptInterface.h @@ -0,0 +1,47 @@ +/* + * LuaScriptInterface.h + * + * Created on: Feb 11, 2012 + * Author: Simon + */ + +#ifndef LUASCRIPTINTERFACE_H_ +#define LUASCRIPTINTERFACE_H_ + +extern "C" +{ +#include +#include +#include +} + +#include "CommandInterface.h" +#include "simulation/Simulation.h"; + +//Because lua only has bindings for C, we're going to have to go outside "outside" the LuaScriptInterface, this means we can only have one instance :( + +#define LOCAL_LUA_DIR "Lua" + +#define LUACON_MDOWN 1 +#define LUACON_MUP 2 +#define LUACON_MPRESS 3 +#define LUACON_KDOWN 1 +#define LUACON_KUP 2 + +//Bitmasks for things that might need recalculating after changes to tpt.el +#define LUACON_EL_MODIFIED_CANMOVE 0x1 +#define LUACON_EL_MODIFIED_GRAPHICS 0x2 +#define LUACON_EL_MODIFIED_MENUS 0x4 + +class LuaScriptInterface: public CommandInterface { +public: + lua_State *l; + LuaScriptInterface(GameModel * m); + virtual void Tick(); + virtual int Command(std::string command); + virtual std::string FormatCommand(std::string command); + virtual ~LuaScriptInterface(); +}; + + +#endif /* LUASCRIPTINTERFACE_H_ */ diff --git a/src/cat/TPTScriptInterface.cpp b/src/cat/TPTScriptInterface.cpp index 7298be5..f758438 100644 --- a/src/cat/TPTScriptInterface.cpp +++ b/src/cat/TPTScriptInterface.cpp @@ -14,7 +14,8 @@ #include "TPTScriptInterface.h" #include "game/GameModel.h" -TPTScriptInterface::TPTScriptInterface() { +TPTScriptInterface::TPTScriptInterface(GameModel * m): CommandInterface(m) +{ } int TPTScriptInterface::Command(std::string command) diff --git a/src/cat/TPTScriptInterface.h b/src/cat/TPTScriptInterface.h index c1a61de..7cf66c0 100644 --- a/src/cat/TPTScriptInterface.h +++ b/src/cat/TPTScriptInterface.h @@ -17,7 +17,7 @@ protected: AnyType tptS_set(std::deque * words); ValueType testType(std::string word); public: - TPTScriptInterface(); + TPTScriptInterface(GameModel * m); virtual void Tick() {} virtual int Command(std::string command); virtual std::string FormatCommand(std::string command); diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index c652298..7f6addd 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -79,8 +79,8 @@ GameController::GameController(): gameView->AttachController(this); gameModel->AddObserver(gameView); - commandInterface = new TPTScriptInterface(); - commandInterface->AttachGameModel(gameModel); + commandInterface = new LuaScriptInterface(gameModel);//new TPTScriptInterface(); + //commandInterface->AttachGameModel(gameModel); //sim = new Simulation(); } diff --git a/src/game/GameController.h b/src/game/GameController.h index ba3ae70..559f0c1 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -11,7 +11,8 @@ #include "login/LoginController.h" #include "ssave/SSaveController.h" #include "console/ConsoleController.h" -#include "cat/TPTScriptInterface.h" +//#include "cat/TPTScriptInterface.h" +#include "cat/LuaScriptInterface.h" #include "Menu.h" using namespace std; -- cgit v0.9.2-21-gd62e From 5546f7d01e87a8fcbd8ea5c9e13162ccd474d7e8 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 12 Feb 2012 15:09:25 +0000 Subject: Fixed some lua methods, set decorations enabled by default, allow toggling of decorations with ctrl+b, saving and loading of render, display and colour modes for the renderer diff --git a/.gitignore b/.gitignore index 2198a51..5d8d28f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ *.a *.la *~ -*.pref \ No newline at end of file +*.pref +stdout.txt +stderr.txt \ No newline at end of file diff --git a/src/Renderer.cpp b/src/Renderer.cpp index fc5f909..95deb69 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -1762,7 +1762,8 @@ Renderer::Renderer(Graphics * g, Simulation * sim): zoomScopePosition(0, 0), zoomScopeSize(10), ZFACTOR(8), - zoomEnabled(false) + zoomEnabled(false), + decorations_enable(1) { this->g = g; this->sim = sim; @@ -1832,6 +1833,11 @@ void Renderer::SetRenderMode(std::vector render) CompileRenderMode(); } +std::vector Renderer::GetRenderMode() +{ + return render_modes; +} + void Renderer::CompileDisplayMode() { display_mode = 0; @@ -1871,11 +1877,21 @@ void Renderer::SetDisplayMode(std::vector display) CompileDisplayMode(); } +std::vector Renderer::GetDisplayMode() +{ + return display_modes; +} + void Renderer::SetColourMode(unsigned int mode) { colour_mode = mode; } +unsigned int Renderer::GetColourMode() +{ + return colour_mode; +} + Renderer::~Renderer() { free(graphicscache); diff --git a/src/Renderer.h b/src/Renderer.h index b61e8fa..779be72 100644 --- a/src/Renderer.h +++ b/src/Renderer.h @@ -71,11 +71,14 @@ public: void CompileRenderMode(); void AddRenderMode(unsigned int mode); void SetRenderMode(std::vector render); + std::vector GetRenderMode(); void RemoveRenderMode(unsigned int mode); void AddDisplayMode(unsigned int mode); void RemoveDisplayMode(unsigned int mode); void SetDisplayMode(std::vector display); + std::vector GetDisplayMode(); void SetColourMode(unsigned int mode); + unsigned int GetColourMode(); Renderer(Graphics * g, Simulation * sim); ~Renderer(); diff --git a/src/cajun/elements.inl b/src/cajun/elements.inl deleted file mode 100644 index dbfbf2a..0000000 --- a/src/cajun/elements.inl +++ /dev/null @@ -1,442 +0,0 @@ -/****************************************************************************** - -Copyright (c) 2009-2010, Terry Caton -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the projecct nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************/ - -#include "visitor.h" -#include "reader.h" -#include -#include -#include - -/* - -TODO: -* better documentation - -*/ - -namespace json -{ - - -inline Exception::Exception(const std::string& sMessage) : - std::runtime_error(sMessage) {} - - -///////////////////////// -// UnknownElement members - -class UnknownElement::Imp -{ -public: - virtual ~Imp() {} - virtual Imp* Clone() const = 0; - - virtual bool Compare(const Imp& imp) const = 0; - - virtual void Accept(ConstVisitor& visitor) const = 0; - virtual void Accept(Visitor& visitor) = 0; -}; - - -template -class UnknownElement::Imp_T : public UnknownElement::Imp -{ -public: - Imp_T(const ElementTypeT& element) : m_Element(element) {} - virtual Imp* Clone() const { return new Imp_T(*this); } - - virtual void Accept(ConstVisitor& visitor) const { visitor.Visit(m_Element); } - virtual void Accept(Visitor& visitor) { visitor.Visit(m_Element); } - - virtual bool Compare(const Imp& imp) const - { - ConstCastVisitor_T castVisitor; - imp.Accept(castVisitor); - return castVisitor.m_pElement && - m_Element == *castVisitor.m_pElement; - } - -private: - ElementTypeT m_Element; -}; - - -class UnknownElement::ConstCastVisitor : public ConstVisitor -{ - virtual void Visit(const Array& array) {} - virtual void Visit(const Object& object) {} - virtual void Visit(const Number& number) {} - virtual void Visit(const String& string) {} - virtual void Visit(const Boolean& boolean) {} - virtual void Visit(const Null& null) {} -}; - -template -class UnknownElement::ConstCastVisitor_T : public ConstCastVisitor -{ -public: - ConstCastVisitor_T() : m_pElement(0) {} - virtual void Visit(const ElementTypeT& element) { m_pElement = &element; } // we don't know what this is, but it overrides one of the base's no-op functions - const ElementTypeT* m_pElement; -}; - - -class UnknownElement::CastVisitor : public Visitor -{ - virtual void Visit(Array& array) {} - virtual void Visit(Object& object) {} - virtual void Visit(Number& number) {} - virtual void Visit(String& string) {} - virtual void Visit(Boolean& boolean) {} - virtual void Visit(Null& null) {} -}; - -template -class UnknownElement::CastVisitor_T : public CastVisitor -{ -public: - CastVisitor_T() : m_pElement(0) {} - virtual void Visit(ElementTypeT& element) { m_pElement = &element; } // we don't know what this is, but it overrides one of the base's no-op functions - ElementTypeT* m_pElement; -}; - - - - -inline UnknownElement::UnknownElement() : m_pImp( new Imp_T( Null() ) ) {} -inline UnknownElement::UnknownElement(const UnknownElement& unknown) : m_pImp( unknown.m_pImp->Clone()) {} -inline UnknownElement::UnknownElement(const Object& object) : m_pImp( new Imp_T(object) ) {} -inline UnknownElement::UnknownElement(const Array& array) : m_pImp( new Imp_T(array) ) {} -inline UnknownElement::UnknownElement(const Number& number) : m_pImp( new Imp_T(number) ) {} -inline UnknownElement::UnknownElement(const Boolean& boolean) : m_pImp( new Imp_T(boolean) ) {} -inline UnknownElement::UnknownElement(const String& string) : m_pImp( new Imp_T(string) ) {} -inline UnknownElement::UnknownElement(const Null& null) : m_pImp( new Imp_T(null) ) {} - -inline UnknownElement::~UnknownElement() { delete m_pImp; } - -inline UnknownElement::operator const Object& () const { return CastTo(); } -inline UnknownElement::operator const Array& () const { return CastTo(); } -inline UnknownElement::operator const Number& () const { return CastTo(); } -inline UnknownElement::operator const Boolean& () const { return CastTo(); } -inline UnknownElement::operator const String& () const { return CastTo(); } -inline UnknownElement::operator const Null& () const { return CastTo(); } - -inline UnknownElement::operator Object& () { return ConvertTo(); } -inline UnknownElement::operator Array& () { return ConvertTo(); } -inline UnknownElement::operator Number& () { return ConvertTo(); } -inline UnknownElement::operator Boolean& () { return ConvertTo(); } -inline UnknownElement::operator String& () { return ConvertTo(); } -inline UnknownElement::operator Null& () { return ConvertTo(); } - -inline UnknownElement& UnknownElement::operator = (const UnknownElement& unknown) -{ - // always check for this - if (&unknown != this) - { - // we might be copying from a subtree of ourselves. delete the old imp - // only after the clone operation is complete. yes, this could be made - // more efficient, but isn't worth the complexity - Imp* pOldImp = m_pImp; - m_pImp = unknown.m_pImp->Clone(); - delete pOldImp; - } - - return *this; -} - -inline UnknownElement& UnknownElement::operator[] (const std::string& key) -{ - // the people want an object. make us one if we aren't already - Object& object = ConvertTo(); - return object[key]; -} - -inline const UnknownElement& UnknownElement::operator[] (const std::string& key) const -{ - // throws if we aren't an object - const Object& object = CastTo(); - return object[key]; -} - -inline UnknownElement& UnknownElement::operator[] (size_t index) -{ - // the people want an array. make us one if we aren't already - Array& array = ConvertTo(); - return array[index]; -} - -inline const UnknownElement& UnknownElement::operator[] (size_t index) const -{ - // throws if we aren't an array - const Array& array = CastTo(); - return array[index]; -} - - -template -const ElementTypeT& UnknownElement::CastTo() const -{ - ConstCastVisitor_T castVisitor; - m_pImp->Accept(castVisitor); - if (castVisitor.m_pElement == 0) - throw Exception("Bad cast"); - return *castVisitor.m_pElement; -} - - - -template -ElementTypeT& UnknownElement::ConvertTo() -{ - CastVisitor_T castVisitor; - m_pImp->Accept(castVisitor); - if (castVisitor.m_pElement == 0) - { - // we're not the right type. fix it & try again - *this = ElementTypeT(); - m_pImp->Accept(castVisitor); - } - - return *castVisitor.m_pElement; -} - - -inline void UnknownElement::Accept(ConstVisitor& visitor) const { m_pImp->Accept(visitor); } -inline void UnknownElement::Accept(Visitor& visitor) { m_pImp->Accept(visitor); } - - -inline bool UnknownElement::operator == (const UnknownElement& element) const -{ - return m_pImp->Compare(*element.m_pImp); -} - - - -////////////////// -// Object members - - -inline Object::Member::Member(const std::string& nameIn, const UnknownElement& elementIn) : - name(nameIn), element(elementIn) {} - -inline bool Object::Member::operator == (const Member& member) const -{ - return name == member.name && - element == member.element; -} - -class Object::Finder : public std::unary_function -{ -public: - Finder(const std::string& name) : m_name(name) {} - bool operator () (const Object::Member& member) { - return member.name == m_name; - } - -private: - std::string m_name; -}; - - - -inline Object::iterator Object::Begin() { return m_Members.begin(); } -inline Object::iterator Object::End() { return m_Members.end(); } -inline Object::const_iterator Object::Begin() const { return m_Members.begin(); } -inline Object::const_iterator Object::End() const { return m_Members.end(); } - -inline size_t Object::Size() const { return m_Members.size(); } -inline bool Object::Empty() const { return m_Members.empty(); } - -inline Object::iterator Object::Find(const std::string& name) -{ - return std::find_if(m_Members.begin(), m_Members.end(), Finder(name)); -} - -inline Object::const_iterator Object::Find(const std::string& name) const -{ - return std::find_if(m_Members.begin(), m_Members.end(), Finder(name)); -} - -inline Object::iterator Object::Insert(const Member& member) -{ - return Insert(member, End()); -} - -inline Object::iterator Object::Insert(const Member& member, iterator itWhere) -{ - iterator it = Find(member.name); - if (it != m_Members.end()) - throw Exception(std::string("Object member already exists: ") + member.name); - - it = m_Members.insert(itWhere, member); - return it; -} - -inline Object::iterator Object::Erase(iterator itWhere) -{ - return m_Members.erase(itWhere); -} - -inline UnknownElement& Object::operator [](const std::string& name) -{ - - iterator it = Find(name); - if (it == m_Members.end()) - { - Member member(name); - it = Insert(member, End()); - } - return it->element; -} - -inline const UnknownElement& Object::operator [](const std::string& name) const -{ - const_iterator it = Find(name); - if (it == End()) - throw Exception(std::string("Object member not found: ") + name); - return it->element; -} - -inline void Object::Clear() -{ - m_Members.clear(); -} - -inline bool Object::operator == (const Object& object) const -{ - return m_Members == object.m_Members; -} - - -///////////////// -// Array members - -inline Array::iterator Array::Begin() { return m_Elements.begin(); } -inline Array::iterator Array::End() { return m_Elements.end(); } -inline Array::const_iterator Array::Begin() const { return m_Elements.begin(); } -inline Array::const_iterator Array::End() const { return m_Elements.end(); } - -inline Array::iterator Array::Insert(const UnknownElement& element, iterator itWhere) -{ - return m_Elements.insert(itWhere, element); -} - -inline Array::iterator Array::Insert(const UnknownElement& element) -{ - return Insert(element, End()); -} - -inline Array::iterator Array::Erase(iterator itWhere) -{ - return m_Elements.erase(itWhere); -} - -inline void Array::Resize(size_t newSize) -{ - m_Elements.resize(newSize); -} - -inline size_t Array::Size() const { return m_Elements.size(); } -inline bool Array::Empty() const { return m_Elements.empty(); } - -inline UnknownElement& Array::operator[] (size_t index) -{ - size_t nMinSize = index + 1; // zero indexed - if (m_Elements.size() < nMinSize) - m_Elements.resize(nMinSize); - return m_Elements[index]; -} - -inline const UnknownElement& Array::operator[] (size_t index) const -{ - if (index >= m_Elements.size()) - throw Exception("Array out of bounds"); - return m_Elements[index]; -} - -inline void Array::Clear() { - m_Elements.clear(); -} - -inline bool Array::operator == (const Array& array) const -{ - return m_Elements == array.m_Elements; -} - - -//////////////////////// -// TrivialType_T members - -template -TrivialType_T::TrivialType_T(const DataTypeT& t) : - m_tValue(t) {} - -template -TrivialType_T::operator DataTypeT&() -{ - return Value(); -} - -template -TrivialType_T::operator const DataTypeT&() const -{ - return Value(); -} - -template -DataTypeT& TrivialType_T::Value() -{ - return m_tValue; -} - -template -const DataTypeT& TrivialType_T::Value() const -{ - return m_tValue; -} - -template -bool TrivialType_T::operator == (const TrivialType_T& trivial) const -{ - return m_tValue == trivial.m_tValue; -} - - - -////////////////// -// Null members - -inline bool Null::operator == (const Null& trivial) const -{ - return true; -} - - - -} // End namespace diff --git a/src/cajun/reader.inl b/src/cajun/reader.inl deleted file mode 100644 index 47311ad..0000000 --- a/src/cajun/reader.inl +++ /dev/null @@ -1,533 +0,0 @@ -/****************************************************************************** - -Copyright (c) 2009-2010, Terry Caton -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the projecct nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************/ - -#include -#include -#include - -/* - -TODO: -* better documentation -* unicode character decoding - -*/ - -namespace json -{ - -inline std::istream& operator >> (std::istream& istr, UnknownElement& elementRoot) { - Reader::Read(elementRoot, istr); - return istr; -} - -inline Reader::Location::Location() : - m_nLine(0), - m_nLineOffset(0), - m_nDocOffset(0) -{} - - -////////////////////// -// Reader::InputStream - -class Reader::InputStream // would be cool if we could inherit from std::istream & override "get" -{ -public: - InputStream(std::istream& iStr) : - m_iStr(iStr) {} - - // protect access to the input stream, so we can keeep track of document/line offsets - char Get(); // big, define outside - char Peek() { - assert(m_iStr.eof() == false); // enforce reading of only valid stream data - return m_iStr.peek(); - } - - bool EOS() { - m_iStr.peek(); // apparently eof flag isn't set until a character read is attempted. whatever. - return m_iStr.eof(); - } - - const Location& GetLocation() const { return m_Location; } - -private: - std::istream& m_iStr; - Location m_Location; -}; - - -inline char Reader::InputStream::Get() -{ - assert(m_iStr.eof() == false); // enforce reading of only valid stream data - char c = m_iStr.get(); - - ++m_Location.m_nDocOffset; - if (c == '\n') { - ++m_Location.m_nLine; - m_Location.m_nLineOffset = 0; - } - else { - ++m_Location.m_nLineOffset; - } - - return c; -} - - - -////////////////////// -// Reader::TokenStream - -class Reader::TokenStream -{ -public: - TokenStream(const Tokens& tokens); - - const Token& Peek(); - const Token& Get(); - - bool EOS() const; - -private: - const Tokens& m_Tokens; - Tokens::const_iterator m_itCurrent; -}; - - -inline Reader::TokenStream::TokenStream(const Tokens& tokens) : - m_Tokens(tokens), - m_itCurrent(tokens.begin()) -{} - -inline const Reader::Token& Reader::TokenStream::Peek() { - if (EOS()) - { - const Token& lastToken = *m_Tokens.rbegin(); - std::string sMessage = "Unexpected end of token stream"; - throw ParseException(sMessage, lastToken.locBegin, lastToken.locEnd); // nowhere to point to - } - return *(m_itCurrent); -} - -inline const Reader::Token& Reader::TokenStream::Get() { - const Token& token = Peek(); - ++m_itCurrent; - return token; -} - -inline bool Reader::TokenStream::EOS() const { - return m_itCurrent == m_Tokens.end(); -} - -/////////////////// -// Reader (finally) - - -inline void Reader::Read(Object& object, std::istream& istr) { Read_i(object, istr); } -inline void Reader::Read(Array& array, std::istream& istr) { Read_i(array, istr); } -inline void Reader::Read(String& string, std::istream& istr) { Read_i(string, istr); } -inline void Reader::Read(Number& number, std::istream& istr) { Read_i(number, istr); } -inline void Reader::Read(Boolean& boolean, std::istream& istr) { Read_i(boolean, istr); } -inline void Reader::Read(Null& null, std::istream& istr) { Read_i(null, istr); } -inline void Reader::Read(UnknownElement& unknown, std::istream& istr) { Read_i(unknown, istr); } - - -template -void Reader::Read_i(ElementTypeT& element, std::istream& istr) -{ - Reader reader; - - Tokens tokens; - InputStream inputStream(istr); - reader.Scan(tokens, inputStream); - - TokenStream tokenStream(tokens); - reader.Parse(element, tokenStream); - - if (tokenStream.EOS() == false) - { - const Token& token = tokenStream.Peek(); - std::string sMessage = std::string("Expected End of token stream; found ") + token.sValue; - throw ParseException(sMessage, token.locBegin, token.locEnd); - } -} - - -inline void Reader::Scan(Tokens& tokens, InputStream& inputStream) -{ - while (EatWhiteSpace(inputStream), // ignore any leading white space... - inputStream.EOS() == false) // ...before checking for EOS - { - // if all goes well, we'll create a token each pass - Token token; - token.locBegin = inputStream.GetLocation(); - - // gives us null-terminated string - char sChar = inputStream.Peek(); - switch (sChar) - { - case '{': - token.sValue = MatchExpectedString(inputStream, "{"); - token.nType = Token::TOKEN_OBJECT_BEGIN; - break; - - case '}': - token.sValue = MatchExpectedString(inputStream, "}"); - token.nType = Token::TOKEN_OBJECT_END; - break; - - case '[': - token.sValue = MatchExpectedString(inputStream, "["); - token.nType = Token::TOKEN_ARRAY_BEGIN; - break; - - case ']': - token.sValue = MatchExpectedString(inputStream, "]"); - token.nType = Token::TOKEN_ARRAY_END; - break; - - case ',': - token.sValue = MatchExpectedString(inputStream, ","); - token.nType = Token::TOKEN_NEXT_ELEMENT; - break; - - case ':': - token.sValue = MatchExpectedString(inputStream, ":"); - token.nType = Token::TOKEN_MEMBER_ASSIGN; - break; - - case '"': - token.sValue = MatchString(inputStream); - token.nType = Token::TOKEN_STRING; - break; - - case '-': - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - token.sValue = MatchNumber(inputStream); - token.nType = Token::TOKEN_NUMBER; - break; - - case 't': - token.sValue = MatchExpectedString(inputStream, "true"); - token.nType = Token::TOKEN_BOOLEAN; - break; - - case 'f': - token.sValue = MatchExpectedString(inputStream, "false"); - token.nType = Token::TOKEN_BOOLEAN; - break; - - case 'n': - token.sValue = MatchExpectedString(inputStream, "null"); - token.nType = Token::TOKEN_NULL; - break; - - default: - { - std::string sErrorMessage = std::string("Unexpected character in stream: ") + sChar; - throw ScanException(sErrorMessage, inputStream.GetLocation()); - } - } - - token.locEnd = inputStream.GetLocation(); - tokens.push_back(token); - } -} - - -inline void Reader::EatWhiteSpace(InputStream& inputStream) -{ - while (inputStream.EOS() == false && - ::isspace(inputStream.Peek())) - inputStream.Get(); -} - -inline std::string Reader::MatchExpectedString(InputStream& inputStream, const std::string& sExpected) -{ - std::string::const_iterator it(sExpected.begin()), - itEnd(sExpected.end()); - for ( ; it != itEnd; ++it) { - if (inputStream.EOS() || // did we reach the end before finding what we're looking for... - inputStream.Get() != *it) // ...or did we find something different? - { - std::string sMessage = std::string("Expected string: ") + sExpected; - throw ScanException(sMessage, inputStream.GetLocation()); - } - } - - // all's well if we made it here - return sExpected; -} - - -inline std::string Reader::MatchString(InputStream& inputStream) -{ - MatchExpectedString(inputStream, "\""); - - std::string string; - while (inputStream.EOS() == false && - inputStream.Peek() != '"') - { - char c = inputStream.Get(); - - // escape? - if (c == '\\' && - inputStream.EOS() == false) // shouldn't have reached the end yet - { - c = inputStream.Get(); - switch (c) { - case '/': string.push_back('/'); break; - case '"': string.push_back('"'); break; - case '\\': string.push_back('\\'); break; - case 'b': string.push_back('\b'); break; - case 'f': string.push_back('\f'); break; - case 'n': string.push_back('\n'); break; - case 'r': string.push_back('\r'); break; - case 't': string.push_back('\t'); break; - //case 'u': string.push_back('\u'); break; // TODO: what do we do with this? - default: { - std::string sMessage = std::string("Unrecognized escape sequence found in string: \\") + c; - throw ScanException(sMessage, inputStream.GetLocation()); - } - } - } - else { - string.push_back(c); - } - } - - // eat the last '"' that we just peeked - MatchExpectedString(inputStream, "\""); - - // all's well if we made it here - return string; -} - - -inline std::string Reader::MatchNumber(InputStream& inputStream) -{ - const char sNumericChars[] = "0123456789.eE-+"; - std::set numericChars; - numericChars.insert(sNumericChars, sNumericChars + sizeof(sNumericChars)); - - std::string sNumber; - while (inputStream.EOS() == false && - numericChars.find(inputStream.Peek()) != numericChars.end()) - { - sNumber.push_back(inputStream.Get()); - } - - return sNumber; -} - - -inline void Reader::Parse(UnknownElement& element, Reader::TokenStream& tokenStream) -{ - const Token& token = tokenStream.Peek(); - switch (token.nType) { - case Token::TOKEN_OBJECT_BEGIN: - { - // implicit non-const cast will perform conversion for us (if necessary) - Object& object = element; - Parse(object, tokenStream); - break; - } - - case Token::TOKEN_ARRAY_BEGIN: - { - Array& array = element; - Parse(array, tokenStream); - break; - } - - case Token::TOKEN_STRING: - { - String& string = element; - Parse(string, tokenStream); - break; - } - - case Token::TOKEN_NUMBER: - { - Number& number = element; - Parse(number, tokenStream); - break; - } - - case Token::TOKEN_BOOLEAN: - { - Boolean& boolean = element; - Parse(boolean, tokenStream); - break; - } - - case Token::TOKEN_NULL: - { - Null& null = element; - Parse(null, tokenStream); - break; - } - - default: - { - std::string sMessage = std::string("Unexpected token: ") + token.sValue; - throw ParseException(sMessage, token.locBegin, token.locEnd); - } - } -} - - -inline void Reader::Parse(Object& object, Reader::TokenStream& tokenStream) -{ - MatchExpectedToken(Token::TOKEN_OBJECT_BEGIN, tokenStream); - - bool bContinue = (tokenStream.EOS() == false && - tokenStream.Peek().nType != Token::TOKEN_OBJECT_END); - while (bContinue) - { - Object::Member member; - - // first the member name. save the token in case we have to throw an exception - const Token& tokenName = tokenStream.Peek(); - member.name = MatchExpectedToken(Token::TOKEN_STRING, tokenStream); - - // ...then the key/value separator... - MatchExpectedToken(Token::TOKEN_MEMBER_ASSIGN, tokenStream); - - // ...then the value itself (can be anything). - Parse(member.element, tokenStream); - - // try adding it to the object (this could throw) - try - { - object.Insert(member); - } - catch (Exception&) - { - // must be a duplicate name - std::string sMessage = std::string("Duplicate object member token: ") + member.name; - throw ParseException(sMessage, tokenName.locBegin, tokenName.locEnd); - } - - bContinue = (tokenStream.EOS() == false && - tokenStream.Peek().nType == Token::TOKEN_NEXT_ELEMENT); - if (bContinue) - MatchExpectedToken(Token::TOKEN_NEXT_ELEMENT, tokenStream); - } - - MatchExpectedToken(Token::TOKEN_OBJECT_END, tokenStream); -} - - -inline void Reader::Parse(Array& array, Reader::TokenStream& tokenStream) -{ - MatchExpectedToken(Token::TOKEN_ARRAY_BEGIN, tokenStream); - - bool bContinue = (tokenStream.EOS() == false && - tokenStream.Peek().nType != Token::TOKEN_ARRAY_END); - while (bContinue) - { - // ...what's next? could be anything - Array::iterator itElement = array.Insert(UnknownElement()); - UnknownElement& element = *itElement; - Parse(element, tokenStream); - - bContinue = (tokenStream.EOS() == false && - tokenStream.Peek().nType == Token::TOKEN_NEXT_ELEMENT); - if (bContinue) - MatchExpectedToken(Token::TOKEN_NEXT_ELEMENT, tokenStream); - } - - MatchExpectedToken(Token::TOKEN_ARRAY_END, tokenStream); -} - - -inline void Reader::Parse(String& string, Reader::TokenStream& tokenStream) -{ - string = MatchExpectedToken(Token::TOKEN_STRING, tokenStream); -} - - -inline void Reader::Parse(Number& number, Reader::TokenStream& tokenStream) -{ - const Token& currentToken = tokenStream.Peek(); // might need this later for throwing exception - const std::string& sValue = MatchExpectedToken(Token::TOKEN_NUMBER, tokenStream); - - std::istringstream iStr(sValue); - double dValue; - iStr >> dValue; - - // did we consume all characters in the token? - if (iStr.eof() == false) - { - char c = iStr.peek(); - std::string sMessage = std::string("Unexpected character in NUMBER token: ") + c; - throw ParseException(sMessage, currentToken.locBegin, currentToken.locEnd); - } - - number = dValue; -} - - -inline void Reader::Parse(Boolean& boolean, Reader::TokenStream& tokenStream) -{ - const std::string& sValue = MatchExpectedToken(Token::TOKEN_BOOLEAN, tokenStream); - boolean = (sValue == "true" ? true : false); -} - - -inline void Reader::Parse(Null&, Reader::TokenStream& tokenStream) -{ - MatchExpectedToken(Token::TOKEN_NULL, tokenStream); -} - - -inline const std::string& Reader::MatchExpectedToken(Token::Type nExpected, Reader::TokenStream& tokenStream) -{ - const Token& token = tokenStream.Get(); - if (token.nType != nExpected) - { - std::string sMessage = std::string("Unexpected token: ") + token.sValue; - throw ParseException(sMessage, token.locBegin, token.locEnd); - } - - return token.sValue; -} - -} // End namespace diff --git a/src/cajun/writer.inl b/src/cajun/writer.inl deleted file mode 100644 index 71145da..0000000 --- a/src/cajun/writer.inl +++ /dev/null @@ -1,178 +0,0 @@ -/****************************************************************************** - -Copyright (c) 2009-2010, Terry Caton -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the projecct nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************/ - -#include "writer.h" -#include -#include - -/* - -TODO: -* better documentation -* unicode character encoding - -*/ - -namespace json -{ - - -inline void Writer::Write(const UnknownElement& elementRoot, std::ostream& ostr) { Write_i(elementRoot, ostr); } -inline void Writer::Write(const Object& object, std::ostream& ostr) { Write_i(object, ostr); } -inline void Writer::Write(const Array& array, std::ostream& ostr) { Write_i(array, ostr); } -inline void Writer::Write(const Number& number, std::ostream& ostr) { Write_i(number, ostr); } -inline void Writer::Write(const String& string, std::ostream& ostr) { Write_i(string, ostr); } -inline void Writer::Write(const Boolean& boolean, std::ostream& ostr) { Write_i(boolean, ostr); } -inline void Writer::Write(const Null& null, std::ostream& ostr) { Write_i(null, ostr); } - - -inline Writer::Writer(std::ostream& ostr) : - m_ostr(ostr), - m_nTabDepth(0) -{} - -template -void Writer::Write_i(const ElementTypeT& element, std::ostream& ostr) -{ - Writer writer(ostr); - writer.Write_i(element); - ostr.flush(); // all done -} - -inline void Writer::Write_i(const Array& array) -{ - if (array.Empty()) - m_ostr << "[]"; - else - { - m_ostr << '[' << std::endl; - ++m_nTabDepth; - - Array::const_iterator it(array.Begin()), - itEnd(array.End()); - while (it != itEnd) { - m_ostr << std::string(m_nTabDepth, '\t'); - - Write_i(*it); - - if (++it != itEnd) - m_ostr << ','; - m_ostr << std::endl; - } - - --m_nTabDepth; - m_ostr << std::string(m_nTabDepth, '\t') << ']'; - } -} - -inline void Writer::Write_i(const Object& object) -{ - if (object.Empty()) - m_ostr << "{}"; - else - { - m_ostr << '{' << std::endl; - ++m_nTabDepth; - - Object::const_iterator it(object.Begin()), - itEnd(object.End()); - while (it != itEnd) { - m_ostr << std::string(m_nTabDepth, '\t'); - - Write_i(it->name); - - m_ostr << " : "; - Write_i(it->element); - - if (++it != itEnd) - m_ostr << ','; - m_ostr << std::endl; - } - - --m_nTabDepth; - m_ostr << std::string(m_nTabDepth, '\t') << '}'; - } -} - -inline void Writer::Write_i(const Number& numberElement) -{ - m_ostr << std::setprecision(20) << numberElement.Value(); -} - -inline void Writer::Write_i(const Boolean& booleanElement) -{ - m_ostr << (booleanElement.Value() ? "true" : "false"); -} - -inline void Writer::Write_i(const String& stringElement) -{ - m_ostr << '"'; - - const std::string& s = stringElement.Value(); - std::string::const_iterator it(s.begin()), - itEnd(s.end()); - for (; it != itEnd; ++it) - { - switch (*it) - { - case '"': m_ostr << "\\\""; break; - case '\\': m_ostr << "\\\\"; break; - case '\b': m_ostr << "\\b"; break; - case '\f': m_ostr << "\\f"; break; - case '\n': m_ostr << "\\n"; break; - case '\r': m_ostr << "\\r"; break; - case '\t': m_ostr << "\\t"; break; - //case '\u': m_ostr << "\\u"; break; // uh... - default: m_ostr << *it; break; - } - } - - m_ostr << '"'; -} - -inline void Writer::Write_i(const Null& ) -{ - m_ostr << "null"; -} - -inline void Writer::Write_i(const UnknownElement& unknown) -{ - unknown.Accept(*this); -} - -inline void Writer::Visit(const Array& array) { Write_i(array); } -inline void Writer::Visit(const Object& object) { Write_i(object); } -inline void Writer::Visit(const Number& number) { Write_i(number); } -inline void Writer::Visit(const String& string) { Write_i(string); } -inline void Writer::Visit(const Boolean& boolean) { Write_i(boolean); } -inline void Writer::Visit(const Null& null) { Write_i(null); } - - - -} // End namespace diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index 289222c..3591d3d 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -839,6 +839,7 @@ int luatpt_error(lua_State* l) free(error); return luaL_error(l, "Screen buffer does not exist");*/ //TODO IMPLEMENT + return 0; } int luatpt_drawtext(lua_State* l) { @@ -931,6 +932,7 @@ int luatpt_log(lua_State* l) return 0;*/ //luacon_ci->lastError = luaL_optstring(l, 1, ""); //TODO IMPLEMENT - Have some sort of error log that is visible outside the console. + return 0; } int luatpt_set_pressure(lua_State* l) @@ -1640,6 +1642,7 @@ int luatpt_input(lua_State* l) free(shadow); return luaL_error(l, "Screen buffer does not exist");*/ //TODO IMPLEMENT + return 0; } int luatpt_message_box(lua_State* l) { @@ -1657,6 +1660,7 @@ int luatpt_message_box(lua_State* l) free(text); return luaL_error(l, "Screen buffer does not exist");;*/ //TODO IMPLEMENT + return 0; } int luatpt_get_numOfParts(lua_State* l) { @@ -1704,6 +1708,7 @@ int luatpt_hud(lua_State* l) hud_enable = (hudstate==0?0:1); return 0;*/ //TODO IMPLEMENT + return 0; } int luatpt_gravity(lua_State* l) { @@ -1737,11 +1742,10 @@ int luatpt_active_menu(lua_State* l) } int luatpt_decorations_enable(lua_State* l) { - /*int aheatstate; - aheatstate = luaL_optint(l, 1, 0); - decorations_enable = (aheatstate==0?0:1); - return 0;*/ - //TODO IMPLEMENT + int decostate; + decostate = luaL_optint(l, 1, 0); + luacon_model->SetDecoration(decostate==0?false:true); + return 0; } int luatpt_heat(lua_State* l) @@ -1753,13 +1757,13 @@ int luatpt_heat(lua_State* l) } int luatpt_cmode_set(lua_State* l) { + //TODO IMPLEMENT return luaL_error(l, "Not implemented"); } int luatpt_setfire(lua_State* l) { int firesize = luaL_optint(l, 2, 4); float fireintensity = (float)luaL_optnumber(l, 1, 1.0f); - //prepare_alpha(firesize, fireintensity); luacon_model->GetRenderer()->prepare_alpha(firesize, fireintensity); return 0; } @@ -1769,6 +1773,7 @@ int luatpt_setdebug(lua_State* l) debug_flags = debug; return 0;*/ //TODO IMPLEMENT + return luaL_error(l, "Not implemented"); } int luatpt_setfpscap(lua_State* l) { @@ -1778,7 +1783,6 @@ int luatpt_setfpscap(lua_State* l) } int luatpt_getscript(lua_State* l) { - //TODO: IMPLEMENT /*char *fileid = NULL, *filedata = NULL, *fileuri = NULL, *fileauthor = NULL, *filename = NULL, *lastError = NULL, *luacommand = NULL; int len, ret,run_script; FILE * outputfile; @@ -1863,6 +1867,8 @@ fin: if(lastError) return luaL_error(l, lastError); return 0;*/ + //TODO IMPLEMENT + return luaL_error(l, "Not implemented"); } int luatpt_setwindowsize(lua_State* l) @@ -1874,6 +1880,7 @@ int luatpt_setwindowsize(lua_State* l) lua_pushnumber(l, result); return 1;*/ //TODO Implement + return luaL_error(l, "Not implemented"); } int luatpt_screenshot(lua_State* l) @@ -1892,6 +1899,6 @@ int luatpt_screenshot(lua_State* l) } return 0; }*/ - return luaL_error(l, "Screen buffer does not exist"); + return luaL_error(l, "Not implemented"); } diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 7f6addd..e6baa5e 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -282,6 +282,16 @@ void GameController::SetPaused() gameModel->SetPaused(!gameModel->GetPaused()); } +void GameController::SetDecoration(bool decorationState) +{ + gameModel->SetDecoration(decorationState); +} + +void GameController::SetDecoration() +{ + gameModel->SetDecoration(!gameModel->GetDecoration()); +} + void GameController::SetActiveMenu(Menu * menu) { gameModel->SetActiveMenu(menu); diff --git a/src/game/GameController.h b/src/game/GameController.h index 559f0c1..16bf47c 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -52,6 +52,8 @@ public: void Update(); void SetPaused(bool pauseState); void SetPaused(); + void SetDecoration(bool decorationState); + void SetDecoration(); void SetActiveMenu(Menu * menu); void SetActiveTool(int toolSelection, Tool * tool); void OpenSearch(); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 6fc9dea..80b56f8 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -19,6 +19,44 @@ GameModel::GameModel(): sim = new Simulation(); ren = new Renderer(ui::Engine::Ref().g, sim); + //Load config into renderer + try + { + json::Number tempNumber = Client::Ref().configDocument["Renderer"]["ColourMode"]; + if(tempNumber.Value()) + ren->SetColourMode(tempNumber.Value()); + + json::Array tempArray = Client::Ref().configDocument["Renderer"]["DisplayModes"]; + if(tempArray.Size()) + { + std::vector displayModes; + json::Array::const_iterator itDisplayModes(tempArray.Begin()), itDisplayModesEnd(tempArray.End()); + for (; itDisplayModes != itDisplayModesEnd; ++itDisplayModes) + { + json::Number tempNumberI = *itDisplayModes; + displayModes.push_back(tempNumberI.Value()); + } + ren->SetDisplayMode(displayModes); + } + + tempArray = Client::Ref().configDocument["Renderer"]["RenderModes"]; + if(tempArray.Size()) + { + std::vector renderModes; + json::Array::const_iterator itRenderModes(tempArray.Begin()), itRenderModesEnd(tempArray.End()); + for (; itRenderModes != itRenderModesEnd; ++itRenderModes) + { + json::Number tempNumberI = *itRenderModes; + renderModes.push_back(tempNumberI.Value()); + } + ren->SetRenderMode(renderModes); + } + } + catch(json::Exception & e) + { + + } + menuList.clear(); for(int i = 0; i < 12; i++) { @@ -71,6 +109,30 @@ GameModel::GameModel(): GameModel::~GameModel() { + //Save to config: + try + { + Client::Ref().configDocument["Renderer"]["ColourMode"] = json::Number(ren->GetColourMode()); + + ((json::Array)Client::Ref().configDocument["Renderer"]["DisplayModes"]).Clear(); + std::vector displayModes = ren->GetDisplayMode(); + for (int i = 0; i < displayModes.size(); i++) + { + Client::Ref().configDocument["Renderer"]["DisplayModes"][i] = json::Number(displayModes[i]); + } + + ((json::Array)Client::Ref().configDocument["Renderer"]["RenderModes"]).Clear(); + std::vector renderModes = ren->GetRenderMode(); + for (int i = 0; i < renderModes.size(); i++) + { + Client::Ref().configDocument["Renderer"]["RenderModes"][i] = json::Number(renderModes[i]); + } + } + catch(json::Exception & e) + { + + } + for(int i = 0; i < menuList.size(); i++) { for(int j = 0; i < menuList[i]->GetToolList().size(); i++) @@ -277,6 +339,17 @@ bool GameModel::GetPaused() return sim->sys_pause?true:false; } +void GameModel::SetDecoration(bool decorationState) +{ + ren->decorations_enable = decorationState?1:0; + notifyDecorationChanged(); +} + +bool GameModel::GetDecoration() +{ + return ren->decorations_enable?true:false; +} + void GameModel::FrameStep(int frames) { sim->framerender += frames; @@ -319,6 +392,14 @@ void GameModel::notifyPausedChanged() } } +void GameModel::notifyDecorationChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + //observers[i]->NotifyPausedChanged(this); + } +} + void GameModel::notifyBrushChanged() { for(int i = 0; i < observers.size(); i++) diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 170d1ed..e77b62e 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -45,6 +45,7 @@ private: void notifyRendererChanged(); void notifySimulationChanged(); void notifyPausedChanged(); + void notifyDecorationChanged(); void notifySaveChanged(); void notifyBrushChanged(); void notifyMenuListChanged(); @@ -65,6 +66,8 @@ public: void SetActiveTool(int selection, Tool * tool); bool GetPaused(); void SetPaused(bool pauseState); + bool GetDecoration(); + void SetDecoration(bool decorationState); void ClearSimulation(); vector GetMenuList(); vector GetToolList(); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 1336552..faf973e 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -516,6 +516,10 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool case 'f': c->FrameStep(); break; + case 'b': + if(ctrl) + c->SetDecoration(); + break; } } diff --git a/src/render/RenderModel.cpp b/src/render/RenderModel.cpp index 56b42a1..be3b30a 100644 --- a/src/render/RenderModel.cpp +++ b/src/render/RenderModel.cpp @@ -10,40 +10,7 @@ RenderModel::RenderModel(): renderer(NULL) { - try - { - json::Number tempNumber = Client::Ref().configDocument["Renderer"]["ColourMode"]; - if(tempNumber.Value()) - renderer->SetColourMode(tempNumber.Value()); - - json::Array tempArray = Client::Ref().configDocument["Renderer"]["DisplayModes"]; - if(tempArray.Size()) - { - std::vector displayModes; - json::Array::const_iterator itDisplayModes(tempArray.Begin()), itDisplayModesEnd(tempArray.End()); - for (; itDisplayModes != itDisplayModesEnd; ++itDisplayModes) - { - json::Number tempNumberI = *itDisplayModes; - displayModes.push_back(tempNumberI.Value()); - } - } - - tempArray = Client::Ref().configDocument["Renderer"]["RenderModes"]; - if(tempArray.Size()) - { - std::vector renderModes; - json::Array::const_iterator itRenderModes(tempArray.Begin()), itRenderModesEnd(tempArray.End()); - for (; itRenderModes != itRenderModesEnd; ++itRenderModes) - { - json::Number tempNumberI = *itRenderModes; - renderModes.push_back(tempNumberI.Value()); - } - } - } - catch(json::Exception & e) - { - } } void RenderModel::AddObserver(RenderView * observer) -- cgit v0.9.2-21-gd62e From d25384c36c427d4afd71f87f8282b1a981c4b563 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 12 Feb 2012 15:32:04 +0000 Subject: Add -p to makedir in makefile diff --git a/Makefile b/Makefile index 043fe0b..cb3139e 100644 --- a/Makefile +++ b/Makefile @@ -43,16 +43,16 @@ build/powder.exe: buildpaths-powder.exe $(patsubst build/obj/%.o,build/obj/powde build/obj/powder.exe/%.o: src/%.cpp $(HEADERS) $(CPPC_WIN) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb buildpaths-powder.exe: - $(shell mkdir build/obj/powder.exe/) - $(shell mkdir $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS))))) + $(shell mkdir -p build/obj/powder.exe/) + $(shell mkdir -p $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS))))) build/powder: buildpaths-powder $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS)) $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS)) $(LFLAGS) -o $@ -ggdb build/obj/powder/%.o: src/%.cpp $(HEADERS) $(CPPC) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb buildpaths-powder: - $(shell mkdir build/obj/powder/) - $(shell mkdir $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS))))) + $(shell mkdir -p build/obj/powder/) + $(shell mkdir -p $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS))))) clean: rm -r build/obj/* -- cgit v0.9.2-21-gd62e From afe9e061e1d173731d8a5122c397a2caf4fe61ab Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 12 Feb 2012 16:47:01 +0000 Subject: Better names for sort, allow showing own saves diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index 3591d3d..f007a9f 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -201,6 +201,7 @@ tpt.partsdata = nil"); { lua_el_mode[i] = 0; } + } void LuaScriptInterface::Tick() @@ -216,7 +217,65 @@ int LuaScriptInterface::Command(std::string command) std::string LuaScriptInterface::FormatCommand(std::string command) { - return command; + //char ** keywords = {"and", "break", "do", "else", "elseif", "end", "false", "for", "function", "if", "in", "local", "nil", "not", "or", "repeat", "return", "then", "true", "until", "while", NULL}; + //char ** functions = {"_VERSION", "assert", "collectgarbage", "dofile", "error", "gcinfo", "loadfile", "loadstring", "print", "tonumber", "tostring", "type", "unpack", "_ALERT", "_ERRORMESSAGE", "_INPUT", "_PROMPT", "_OUTPUT", "_STDERR", "_STDIN", "_STDOUT", "call", "dostring", "foreach", "foreachi", "getn", "globals", "newtype", "rawget", "rawset", "require", "sort", "tinsert", "tremove", "_G", "getfenv", "getmetatable", "ipairs", "loadlib", "next", "pairs", "pcall", "rawegal", "rawget", "rawset", "require", "setfenv", "setmetatable", "xpcall", "string", "table", "math", "coroutine", "io", "os", "debug"}; + char * rawText = (char*)command.c_str(); + char * outputData = (char *)calloc(command.length()*6, 1); + char lastWord[command.length()]; + int lastWordChar = 0; + lastWord[0] = 0; + int rawTextLoc = 0; + int outputDataLoc = 0; + std::stack pstack; + while(rawText[rawTextLoc]) + { + switch(rawText[rawTextLoc]) + { + case '\\': + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + if(rawText[rawTextLoc]) + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + break; + case '"': + if(pstack.size() && pstack.top() == '"') + { + pstack.pop(); + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + outputData[outputDataLoc++] = '\b'; + outputData[outputDataLoc++] = 'w'; + } + else + { + pstack.push('"'); + outputData[outputDataLoc++] = '\b'; + outputData[outputDataLoc++] = 'o'; + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + } + break; + case '(': + pstack.push('('); + outputData[outputDataLoc++] = '\b'; + outputData[outputDataLoc++] = 't'; + strcpy(outputData+(outputDataLoc++), lastWord); + outputData[outputDataLoc++] = '\b'; + outputData[outputDataLoc++] = 'w'; + lastWord[0] = 0; + lastWordChar = 0; + break; + default: + if(pstack.top()!='"') + { + lastWord[lastWordChar++] = rawText[rawTextLoc++]; + lastWord[lastWordChar] = 0; + } + else + { + outputData[outputDataLoc++] = rawText[rawTextLoc++]; + } + break; + } + } + return outputData; } LuaScriptInterface::~LuaScriptInterface() { diff --git a/src/cat/TPTScriptInterface.cpp b/src/cat/TPTScriptInterface.cpp index f758438..a3f468c 100644 --- a/src/cat/TPTScriptInterface.cpp +++ b/src/cat/TPTScriptInterface.cpp @@ -137,7 +137,7 @@ std::string TPTScriptInterface::FormatCommand(std::string command) currentWord = ++currentCommand; } words.push_back(std::string(currentWord)); - + free(rawCommand); while(!words.empty()) { ValueType cType = testType(words.front()); @@ -160,41 +160,6 @@ std::string TPTScriptInterface::FormatCommand(std::string command) outputData += words.front() + " "; words.pop_front(); } - /*char * rawText = (char*)command.c_str(); - char * outputData = (char *)calloc(command.length()*6, 1); - int rawTextLoc = 0; - int outputDataLoc = 0; - std::stack pstack; - while(rawText[rawTextLoc]) - { - switch(rawText[rawTextLoc]) - { - case '\\': - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - if(rawText[rawTextLoc]) - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - break; - case '"': - if(pstack.size() && pstack.top() == '"') - { - pstack.pop(); - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - outputData[outputDataLoc++] = '\b'; - outputData[outputDataLoc++] = 'w'; - } - else - { - pstack.push('"'); - outputData[outputDataLoc++] = '\b'; - outputData[outputDataLoc++] = 'o'; - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - } - break; - default: - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - break; - } - }*/ return outputData; } diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 112bdf1..1fbff93 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -469,7 +469,7 @@ std::vector * Client::GetComments(int saveID, int start, int count) return commentArray; } -std::vector * Client::SearchSaves(int start, int count, string query, string sort, int & resultCount) +std::vector * Client::SearchSaves(int start, int count, string query, string sort, bool showOwn, int & resultCount) { lastError = ""; resultCount = 0; @@ -489,6 +489,12 @@ std::vector * Client::SearchSaves(int start, int count, string query, str urlStream << URLEscape(" "); urlStream << URLEscape("sort:") << URLEscape(sort); } + if(showOwn && authUser.ID) + { + if(query.length()) + urlStream << URLEscape(" "); + urlStream << URLEscape("user:") << URLEscape(authUser.Username); + } } data = http_simple_get((char *)urlStream.str().c_str(), &dataStatus, &dataLength); diff --git a/src/client/Client.h b/src/client/Client.h index 46c1848..084866b 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -52,7 +52,7 @@ public: unsigned char * GetSaveData(int saveID, int saveDate, int & dataLength); LoginStatus Login(string username, string password, User & user); void ClearThumbnailRequests(); - std::vector * SearchSaves(int start, int count, string query, string sort, int & resultCount); + std::vector * SearchSaves(int start, int count, string query, string sort, bool showOwn, int & resultCount); std::vector * GetComments(int saveID, int start, int count); Thumbnail * GetPreview(int saveID, int saveDate); Thumbnail * GetThumbnail(int saveID, int saveDate); diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 6fa9748..1449f9a 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -4,6 +4,7 @@ #include "SearchView.h" #include "interface/Panel.h" #include "preview/PreviewController.h" +#include "client/Client.h" class SearchController::OpenCallback: public ControllerCallback { @@ -106,19 +107,22 @@ void SearchController::NextPage() void SearchController::ChangeSort() { - if(searchModel->GetSort() == "date") + if(searchModel->GetSort() == "new") { - searchModel->SetSort("votes"); + searchModel->SetSort("best"); } else { - searchModel->SetSort("date"); + searchModel->SetSort("new"); } } void SearchController::ShowOwn(bool show) { - //TODO: Implement + if(Client::Ref().GetAuthUser().ID) + searchModel->SetShowOwn(show); + else + searchModel->SetShowOwn(false); } void SearchController::OpenSave(int saveID) diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index e40c4b0..4a410c3 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -4,12 +4,14 @@ #include "client/Client.h" SearchModel::SearchModel(): - currentSort("votes"), + currentSort("best"), showOwn(false), loadedSave(NULL), updateSaveListWorking(false), updateSaveListFinished(false), - saveListLoaded(false) + saveListLoaded(false), + currentPage(1), + resultCount(0) { } @@ -20,7 +22,7 @@ void * SearchModel::updateSaveListTHelper(void * obj) void * SearchModel::updateSaveListT() { - vector * tempSaveList = Client::Ref().SearchSaves((currentPage-1)*20, 20, lastQuery, currentSort, resultCount); + vector * tempSaveList = Client::Ref().SearchSaves((currentPage-1)*20, 20, lastQuery, currentSort=="new"?"date":"votes", showOwn, resultCount); updateSaveListFinished = true; return tempSaveList; } diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index d52529d..2587c03 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -47,7 +47,7 @@ public: std::string GetLastQuery() { return lastQuery; } void SetSort(string sort) { currentSort = sort; UpdateSaveList(1, lastQuery); notifySortChanged(); } string GetSort() { return currentSort; } - void SetShowOwn(bool show) { showOwn = show; UpdateSaveList(1, lastQuery); notifyShowOwnChanged(); } + void SetShowOwn(bool show) { if(show!=showOwn) { showOwn = show; UpdateSaveList(1, lastQuery); } notifyShowOwnChanged(); } bool GetShowOwn() { return showOwn; } void SetLoadedSave(Save * save); Save * GetLoadedSave(); diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 584b7e3..5bcbe06 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -27,7 +27,7 @@ SearchView::SearchView(): v->doSearch(); } }; - searchField = new ui::Textbox(ui::Point(60, 10), ui::Point((XRES+BARSIZE)-((50*2)+16+10+50+10), 16), ""); + searchField = new ui::Textbox(ui::Point(60, 10), ui::Point((XRES+BARSIZE)-((60*2)+16+10+50+10), 16), ""); searchField->SetAlignment(AlignLeft, AlignBottom); searchField->SetActionCallback(new SearchAction(this)); @@ -41,9 +41,9 @@ SearchView::SearchView(): v->c->ChangeSort(); } }; - sortButton = new ui::Button(ui::Point(XRES+BARSIZE-50-50-16-10, 10), ui::Point(50, 16), "Sort"); + sortButton = new ui::Button(ui::Point(XRES+BARSIZE-60-60-16-10+5, 10), ui::Point(60, 16), "Sort"); sortButton->SetActionCallback(new SortAction(this)); - sortButton->SetAlignment(AlignLeft, AlignBottom); + sortButton->SetAlignment(AlignCentre, AlignBottom); AddComponent(sortButton); class MyOwnAction : public ui::ButtonAction @@ -56,10 +56,12 @@ SearchView::SearchView(): v->c->ShowOwn(sender->GetToggleState()); } }; - ownButton = new ui::Button(ui::Point(XRES+BARSIZE-50-16-10, 10), ui::Point(50, 16), "My Own"); + ownButton = new ui::Button(ui::Point(XRES+BARSIZE-60-16-10+10, 10), ui::Point(60, 16), "My Own"); ownButton->SetTogglable(true); ownButton->SetActionCallback(new MyOwnAction(this)); - ownButton->SetAlignment(AlignLeft, AlignBottom); + if(!Client::Ref().GetAuthUser().ID) + ownButton->Enabled = false; + ownButton->SetAlignment(AlignCentre, AlignBottom); AddComponent(ownButton); class NextPageAction : public ui::ButtonAction @@ -110,12 +112,12 @@ SearchView::~SearchView() void SearchView::NotifySortChanged(SearchModel * sender) { - sortButton->SetText("Sort: "+sender->GetSort()); + sortButton->SetText("Show "+sender->GetSort()); } void SearchView::NotifyShowOwnChanged(SearchModel * sender) { - sortButton->SetToggleState(sender->GetShowOwn()); + ownButton->SetToggleState(sender->GetShowOwn()); } void SearchView::NotifyPageChanged(SearchModel * sender) -- cgit v0.9.2-21-gd62e From 732b9d6a0d16f94cd1c39f8e023e369c5837bb9c Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 3 Mar 2012 17:58:33 +0000 Subject: Disable key repeat diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 880aa7e..abe234c 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -73,7 +73,7 @@ SDL_Surface * SDLOpen() #endif SDL_WM_SetCaption("The Powder Toy", "Powder Toy"); - SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); + //SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); atexit(SDL_Quit); return SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_SWSURFACE); } diff --git a/src/cat/CommandInterface.cpp b/src/cat/CommandInterface.cpp index f146ed4..f434f54 100644 --- a/src/cat/CommandInterface.cpp +++ b/src/cat/CommandInterface.cpp @@ -31,6 +31,11 @@ std::string CommandInterface::FormatCommand(std::string command) return command; } +void CommandInterface::Log(LogType type, std::string message) +{ + //Todo Put this info somewhere, an on-screen log output would be nice. +} + int CommandInterface::GetPropertyOffset(std::string key_, FormatType & format) { char * key = (char *)key_.c_str(); diff --git a/src/cat/CommandInterface.h b/src/cat/CommandInterface.h index 32b685e..c77d83c 100644 --- a/src/cat/CommandInterface.h +++ b/src/cat/CommandInterface.h @@ -17,10 +17,12 @@ protected: std::string lastError; GameModel * m; public: + enum LogType { LogError, LogWarning, LogNotice }; enum FormatType { FormatInt, FormatString, FormatChar, FormatFloat }; CommandInterface(GameModel * m); int GetPropertyOffset(std::string key_, FormatType & format); int GetParticleType(std::string type); + void Log(LogType type, std::string message); //void AttachGameModel(GameModel * m); virtual void Tick() {} virtual int Command(std::string command); diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index f007a9f..c7af155 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -80,6 +80,7 @@ LuaScriptInterface::LuaScriptInterface(GameModel * m): luacon_model = m; luacon_sim = m->GetSimulation(); luacon_g = ui::Engine::Ref().g; + luacon_ci = this; l = lua_open(); luaL_openlibs(l); @@ -211,71 +212,19 @@ void LuaScriptInterface::Tick() int LuaScriptInterface::Command(std::string command) { - luaL_dostring(l, command.c_str()); - return 0; + int ret; + lastError = ""; + if((ret = luaL_dostring(l, command.c_str()))) + { + lastError = luacon_geterror(); + Log(LogError, lastError); + } + return ret; } std::string LuaScriptInterface::FormatCommand(std::string command) { - //char ** keywords = {"and", "break", "do", "else", "elseif", "end", "false", "for", "function", "if", "in", "local", "nil", "not", "or", "repeat", "return", "then", "true", "until", "while", NULL}; - //char ** functions = {"_VERSION", "assert", "collectgarbage", "dofile", "error", "gcinfo", "loadfile", "loadstring", "print", "tonumber", "tostring", "type", "unpack", "_ALERT", "_ERRORMESSAGE", "_INPUT", "_PROMPT", "_OUTPUT", "_STDERR", "_STDIN", "_STDOUT", "call", "dostring", "foreach", "foreachi", "getn", "globals", "newtype", "rawget", "rawset", "require", "sort", "tinsert", "tremove", "_G", "getfenv", "getmetatable", "ipairs", "loadlib", "next", "pairs", "pcall", "rawegal", "rawget", "rawset", "require", "setfenv", "setmetatable", "xpcall", "string", "table", "math", "coroutine", "io", "os", "debug"}; - char * rawText = (char*)command.c_str(); - char * outputData = (char *)calloc(command.length()*6, 1); - char lastWord[command.length()]; - int lastWordChar = 0; - lastWord[0] = 0; - int rawTextLoc = 0; - int outputDataLoc = 0; - std::stack pstack; - while(rawText[rawTextLoc]) - { - switch(rawText[rawTextLoc]) - { - case '\\': - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - if(rawText[rawTextLoc]) - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - break; - case '"': - if(pstack.size() && pstack.top() == '"') - { - pstack.pop(); - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - outputData[outputDataLoc++] = '\b'; - outputData[outputDataLoc++] = 'w'; - } - else - { - pstack.push('"'); - outputData[outputDataLoc++] = '\b'; - outputData[outputDataLoc++] = 'o'; - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - } - break; - case '(': - pstack.push('('); - outputData[outputDataLoc++] = '\b'; - outputData[outputDataLoc++] = 't'; - strcpy(outputData+(outputDataLoc++), lastWord); - outputData[outputDataLoc++] = '\b'; - outputData[outputDataLoc++] = 'w'; - lastWord[0] = 0; - lastWordChar = 0; - break; - default: - if(pstack.top()!='"') - { - lastWord[lastWordChar++] = rawText[rawTextLoc++]; - lastWord[lastWordChar] = 0; - } - else - { - outputData[outputDataLoc++] = rawText[rawTextLoc++]; - } - break; - } - } - return outputData; + return command; } LuaScriptInterface::~LuaScriptInterface() { @@ -985,12 +934,7 @@ int luatpt_setconsole(lua_State* l) int luatpt_log(lua_State* l) { - /*char *buffer; - buffer = luaL_optstring(l, 1, ""); - strncpy(console_error, buffer, 254); - return 0;*/ - //luacon_ci->lastError = luaL_optstring(l, 1, ""); - //TODO IMPLEMENT - Have some sort of error log that is visible outside the console. + luacon_ci->Log(CommandInterface::LogNotice, luaL_optstring(l, 1, "")); return 0; } -- cgit v0.9.2-21-gd62e From 3bbaa1a111e3770d2ce9b04f4b0f9688948d3e85 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 3 Mar 2012 21:38:22 +0000 Subject: Decoration tools - no way to set colour yet diff --git a/src/game/DecorationTool.h b/src/game/DecorationTool.h new file mode 100644 index 0000000..b6ab7e3 --- /dev/null +++ b/src/game/DecorationTool.h @@ -0,0 +1,34 @@ + +#ifndef DECORATIONTOOL_H_ +#define DECORATIONTOOL_H_ + +#include "Tool.h" + +class DecorationTool: public Tool +{ +public: + enum ToolType { BlendAdd = DECO_ADD, BlendRemove = DECO_SUBTRACT, BlendMultiply = DECO_MULTIPLY, BlendDivide = DECO_DIVIDE, BlendSet = DECO_DRAW }; + + ToolType decoMode; + + DecorationTool(ToolType decoMode_, string name, int r, int g, int b): + Tool(0, name, r, g, b), + decoMode(decoMode_) + { + } + virtual ~DecorationTool() {} + virtual void Draw(Simulation * sim, Brush * brush, ui::Point position){ + sim->ApplyDecorationPoint(position.X, position.Y, 1, 1, 24, 24, 24, 255, decoMode, brush); + } + virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + sim->ApplyDecorationLine(position1.X, position1.Y, position2.X, position2.Y, 1, 1, 24, 24, 24, 255, decoMode, brush); + } + virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + sim->ApplyDecorationBox(position1.X, position1.Y, position2.X, position2.Y, 24, 24, 24, 255, decoMode); + } + virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { + + } +}; + +#endif diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 80b56f8..099a501 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -7,6 +7,7 @@ #include "Brush.h" #include "EllipseBrush.h" #include "client/Client.h" +#include "game/DecorationTool.h" GameModel::GameModel(): activeTools({NULL, NULL, NULL}), @@ -58,7 +59,7 @@ GameModel::GameModel(): } menuList.clear(); - for(int i = 0; i < 12; i++) + for(int i = 0; i < SC_TOTAL; i++) { menuList.push_back(new Menu((const char)sim->msections[i].icon[0], sim->msections[i].name)); } @@ -87,6 +88,13 @@ GameModel::GameModel(): //sim->wtypes[i] } + //Add decoration tools to menu + menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendAdd, "ADD", 0, 0, 0)); + menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendRemove, "SUB", 0, 0, 0)); + menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendMultiply, "MUL", 0, 0, 0)); + menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendDivide, "DIV", 0, 0, 0)); + menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendSet, "SET", 0, 0, 0)); + //Set default brush palette brushList.push_back(new Brush(ui::Point(4, 4))); brushList.push_back(new EllipseBrush(ui::Point(4, 4))); diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 73757da..0c6c54e 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -300,6 +300,172 @@ int Simulation::create_part_add_props(int p, int x, int y, int tv, int rx, int r return p; } +void Simulation::ApplyDecoration(int x, int y, int colR, int colG, int colB, int colA, int mode) +{ + int rp, tr, tg, tb, ta; + rp = pmap[y][x]; + if (!rp) + return; + + if (mode == DECO_DRAW) + { + parts[rp>>8].dcolour = ((colA<<24)|(colR<<16)|(colG<<8)|colB); + } + else + { + if (parts[rp>>8].dcolour == 0) + return; + + ta = (parts[rp>>8].dcolour>>24)&0xFF; + tr = (parts[rp>>8].dcolour>>16)&0xFF; + tg = (parts[rp>>8].dcolour>>8)&0xFF; + tb = (parts[rp>>8].dcolour)&0xFF; + + if (mode == DECO_ADD) + { + ta += colA; + tr += colR; + tg += colG; + tb += colB; + } + else if (mode == DECO_SUBTRACT) + { + ta -= colA; + tr -= colR; + tg -= colG; + tb -= colB; + } + else if (mode == DECO_MULTIPLY) + { + ta *= (int)((float)(1.0f+((float)colA)/255.0f)); + tr *= (int)((float)(1.0f+((float)colR)/255.0f)); + tg *= (int)((float)(1.0f+((float)colG)/255.0f)); + tb *= (int)((float)(1.0f+((float)colB)/255.0f)); + } + else if (mode == DECO_DIVIDE) + { + ta /= (int)((float)(1.0f+((float)colA)/255.0f)); + tr /= (int)((float)(1.0f+((float)colR)/255.0f)); + tg /= (int)((float)(1.0f+((float)colG)/255.0f)); + tb /= (int)((float)(1.0f+((float)colB)/255.0f)); + } + if(ta > 255) + ta = 255; + else if(ta < 0) + ta = 0; + if(tr > 255) + tr = 255; + else if(tr < 0) + tr = 0; + if(tg > 255) + tg = 255; + else if(tg < 0) + tg = 0; + if(tb > 255) + tb = 255; + else if(tb < 0) + tb = 0; + parts[rp>>8].dcolour = ((ta<<24)|(tr<<16)|(tg<<8)|tb); + } +} + +void Simulation::ApplyDecorationPoint(int x, int y, int rx, int ry, int colR, int colG, int colB, int colA, int mode, Brush * cBrush) +{ + int i, j; + + if(cBrush) + { + rx = cBrush->GetRadius().X; + ry = cBrush->GetRadius().Y; + } + + if (rx == 0 && ry == 0) + { + ApplyDecoration(x, y, colR, colG, colB, colA, mode); + return; + } + + bool *bitmap = cBrush->GetBitmap(); + for (j=-ry; j<=ry; j++) + for (i=-rx; i<=rx; i++) + if(bitmap[(j+ry)*(rx*2)+(i+rx)]) + ApplyDecoration(x+i, y+j, colR, colG, colB, colA, mode); +} + +void Simulation::ApplyDecorationBox(int x1, int y1, int x2, int y2, int colR, int colG, int colB, int colA, int mode) +{ + int i, j; + + if (x1>x2) + { + i = x2; + x2 = x1; + x1 = i; + } + if (y1>y2) + { + j = y2; + y2 = y1; + y1 = j; + } + for (j=y1; j<=y2; j++) + for (i=x1; i<=x2; i++) + ApplyDecorationPoint(i, j, 0, 0, colR, colG, colB, colA, mode); +} + +void Simulation::ApplyDecorationLine(int x1, int y1, int x2, int y2, int rx, int ry, int colR, int colG, int colB, int colA, int mode, Brush * cBrush) +{ + int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; + float e, de; + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1= 0.5f) + { + y += sy; + if (!(rx+ry)) + { + if (cp) + ApplyDecorationPoint(y, x, rx, ry, colR, colG, colB, colA, mode, cBrush); + else + ApplyDecorationPoint(x, y, rx, ry, colR, colG, colB, colA, mode, cBrush); + } + e -= 1.0f; + } + } +} + //this creates particles from a brush, don't use if you want to create one particle int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush) { diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index f03b189..007f3c2 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -245,6 +245,10 @@ public: int flood_parts(int x, int y, int c, int cm, int bm, int flags); int create_parts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush = NULL); void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags, Brush * cBrush = NULL); + void ApplyDecoration(int x, int y, int colR, int colG, int colB, int colA, int mode); + void ApplyDecorationPoint(int x, int y, int rx, int ry, int colR, int colG, int colB, int colA, int mode, Brush * cBrush = NULL); + void ApplyDecorationLine(int x1, int y1, int x2, int y2, int rx, int ry, int colR, int colG, int colB, int colA, int mode, Brush * cBrush = NULL); + void ApplyDecorationBox(int x1, int y1, int x2, int y2, int colR, int colG, int colB, int colA, int mode); void *transform_save(void *odata, int *size, matrix2d transform, vector2d translate); inline void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]); inline void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]); diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 9ec5e67..8dd21e0 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -133,6 +133,7 @@ menu_section * LoadMenus(int & menuCount) {"\xD2", "Life", 0, 1}, {"\xD7", "Tools", 0, 1}, {"\xD2", "More Life", 0, 1}, + {"\xC8", "Decoration tools", 0, 1}, {"\xC8", "", 0, 0}, {"\xC8", "Cracker", 0, 0}, {"\xC8", "Cracker!", 0, 0}, diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index ee31aea..c093d5c 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -17,9 +17,10 @@ #define SC_SPECIAL 9 #define SC_LIFE 10 #define SC_TOOL 11 +#define SC_DECO 12 #define SC_CRACKER 13 #define SC_CRACKER2 14 -#define SC_TOTAL 12 +#define SC_TOTAL 13 #define UI_WALLSTART 222 #define UI_ACTUALSTART 122 @@ -54,6 +55,12 @@ #define WL_GRAV 142 #define WL_ALLOWENERGY 145 +#define DECO_DRAW 0 +#define DECO_ADD 1 +#define DECO_SUBTRACT 2 +#define DECO_MULTIPLY 3 +#define DECO_DIVIDE 4 + #ifndef SIMULATIONDATA_H_ #define SIMULATIONDATA_H_ -- cgit v0.9.2-21-gd62e From 644e6770e43e5ed568b0cdc14d63f20869d7fccc Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 4 Mar 2012 16:26:03 +0000 Subject: Slider and decoration colour changer diff --git a/src/game/DecorationTool.h b/src/game/DecorationTool.h index b6ab7e3..f6f08d4 100644 --- a/src/game/DecorationTool.h +++ b/src/game/DecorationTool.h @@ -18,13 +18,13 @@ public: } virtual ~DecorationTool() {} virtual void Draw(Simulation * sim, Brush * brush, ui::Point position){ - sim->ApplyDecorationPoint(position.X, position.Y, 1, 1, 24, 24, 24, 255, decoMode, brush); + sim->ApplyDecorationPoint(position.X, position.Y, 1, 1, colRed, colGreen, colBlue, 255, decoMode, brush); } virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { - sim->ApplyDecorationLine(position1.X, position1.Y, position2.X, position2.Y, 1, 1, 24, 24, 24, 255, decoMode, brush); + sim->ApplyDecorationLine(position1.X, position1.Y, position2.X, position2.Y, 1, 1, colRed, colGreen, colBlue, 255, decoMode, brush); } virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { - sim->ApplyDecorationBox(position1.X, position1.Y, position2.X, position2.Y, 24, 24, 24, 255, decoMode); + sim->ApplyDecorationBox(position1.X, position1.Y, position2.X, position2.Y, colRed, colGreen, colBlue, 255, decoMode); } virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index e6baa5e..1164de5 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -292,9 +292,26 @@ void GameController::SetDecoration() gameModel->SetDecoration(!gameModel->GetDecoration()); } +void GameController::SetColour(ui::Colour colour) +{ + gameModel->SetColourSelectorColour(colour); +} + void GameController::SetActiveMenu(Menu * menu) { gameModel->SetActiveMenu(menu); + vector menuList = gameModel->GetMenuList(); + bool set = false; + for(int i = 0; i < menuList.size(); i++) + { + if(menuList[i]==menu && i == SC_DECO) + { + gameModel->SetColourSelectorVisibility(true); + set = true; + } + } + if(!set) + gameModel->SetColourSelectorVisibility(false); } void GameController::SetActiveTool(int toolSelection, Tool * tool) diff --git a/src/game/GameController.h b/src/game/GameController.h index 16bf47c..8480aeb 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -56,6 +56,7 @@ public: void SetDecoration(); void SetActiveMenu(Menu * menu); void SetActiveTool(int toolSelection, Tool * tool); + void SetColour(ui::Colour colour); void OpenSearch(); void OpenLogin(); void OpenTags(); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 099a501..7b71633 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -15,7 +15,8 @@ GameModel::GameModel(): ren(NULL), currentBrush(0), currentUser(0, ""), - currentSave(NULL) + currentSave(NULL), + colourSelector(false) { sim = new Simulation(); ren = new Renderer(ui::Engine::Ref().g, sim); @@ -200,6 +201,8 @@ void GameModel::AddObserver(GameView * observer){ observer->NotifyToolListChanged(this); observer->NotifyUserChanged(this); observer->NotifyZoomChanged(this); + observer->NotifyColourSelectorVisibilityChanged(this); + observer->NotifyColourSelectorColourChanged(this); } void GameModel::SetActiveMenu(Menu * menu) @@ -329,6 +332,34 @@ int GameModel::GetZoomFactor() return ren->ZFACTOR; } +void GameModel::SetColourSelectorVisibility(bool visibility) +{ + if(colourSelector != visibility) + { + colourSelector = visibility; + notifyColourSelectorVisibilityChanged(); + } +} + +bool GameModel::GetColourSelectorVisibility() +{ + return colourSelector; +} + +void GameModel::SetColourSelectorColour(ui::Colour colour_) +{ + //if(this->colour!=colour) + { + colour = colour_; + notifyColourSelectorColourChanged(); + } +} + +ui::Colour GameModel::GetColourSelectorColour() +{ + return colour; +} + void GameModel::SetUser(User user) { currentUser = user; @@ -368,6 +399,22 @@ void GameModel::ClearSimulation() sim->clear_sim(); } +void GameModel::notifyColourSelectorColourChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyColourSelectorColourChanged(this); + } +} + +void GameModel::notifyColourSelectorVisibilityChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyColourSelectorVisibilityChanged(this); + } +} + void GameModel::notifyRendererChanged() { for(int i = 0; i < observers.size(); i++) diff --git a/src/game/GameModel.h b/src/game/GameModel.h index e77b62e..0f170df 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -4,6 +4,7 @@ #include #include "search/Save.h" #include "simulation/Simulation.h" +#include "interface/Colour.h" #include "Renderer.h" #include "GameView.h" #include "Brush.h" @@ -41,6 +42,8 @@ private: Renderer * ren; Tool * activeTools[3]; User currentUser; + bool colourSelector; + ui::Colour colour; //bool zoomEnabled; void notifyRendererChanged(); void notifySimulationChanged(); @@ -53,10 +56,18 @@ private: void notifyActiveToolsChanged(); void notifyUserChanged(); void notifyZoomChanged(); + void notifyColourSelectorColourChanged(); + void notifyColourSelectorVisibilityChanged(); public: GameModel(); ~GameModel(); + void SetColourSelectorVisibility(bool visibility); + bool GetColourSelectorVisibility(); + + void SetColourSelectorColour(ui::Colour colour); + ui::Colour GetColourSelectorColour(); + void SetVote(int direction); Save * GetSave(); Brush * GetBrush(); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index faf973e..7969ed0 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -4,6 +4,7 @@ #include "interface/Button.h" #include "interface/Colour.h" #include "interface/Keys.h" +#include "interface/Slider.h" GameView::GameView(): ui::Window(ui::Point(0, 0), ui::Point(XRES+BARSIZE, YRES+MENUSIZE)), @@ -194,6 +195,24 @@ GameView::GameView(): pauseButton->SetTogglable(true); pauseButton->SetActionCallback(new PauseAction(this)); AddComponent(pauseButton); + + class ColourChange : public ui::SliderAction + { + GameView * v; + public: + ColourChange(GameView * _v) { v = _v; } + void ValueChangedCallback(ui::Slider * sender) + { + v->changeColour(); + } + }; + ColourChange * colC = new ColourChange(this); + colourRSlider = new ui::Slider(ui::Point(5, Size.Y-40), ui::Point(100, 16), 255); + colourRSlider->SetActionCallback(colC); + colourGSlider = new ui::Slider(ui::Point(115, Size.Y-40), ui::Point(100, 16), 255); + colourGSlider->SetActionCallback(colC); + colourBSlider = new ui::Slider(ui::Point(225, Size.Y-40), ui::Point(100, 16), 255); + colourBSlider->SetActionCallback(colC); } class GameView::MenuAction: public ui::ButtonAction @@ -328,6 +347,39 @@ void GameView::NotifyToolListChanged(GameModel * sender) } +void GameView::NotifyColourSelectorVisibilityChanged(GameModel * sender) +{ + RemoveComponent(colourRSlider); + colourRSlider->SetParentWindow(NULL); + RemoveComponent(colourGSlider); + colourGSlider->SetParentWindow(NULL); + RemoveComponent(colourBSlider); + colourBSlider->SetParentWindow(NULL); + if(sender->GetColourSelectorVisibility()) + { + AddComponent(colourRSlider); + AddComponent(colourGSlider); + AddComponent(colourBSlider); + } + +} + +void GameView::NotifyColourSelectorColourChanged(GameModel * sender) +{ + colourRSlider->SetValue(sender->GetColourSelectorColour().Red); + colourGSlider->SetValue(sender->GetColourSelectorColour().Green); + colourBSlider->SetValue(sender->GetColourSelectorColour().Blue); + + vector tools = sender->GetMenuList()[SC_DECO]->GetToolList(); + for(int i = 0; i < tools.size(); i++) + { + tools[i]->colRed = sender->GetColourSelectorColour().Red; + tools[i]->colGreen = sender->GetColourSelectorColour().Green; + tools[i]->colBlue = sender->GetColourSelectorColour().Blue; + } + NotifyToolListChanged(sender); +} + void GameView::NotifyRendererChanged(GameModel * sender) { ren = sender->GetRenderer(); @@ -565,6 +617,11 @@ void GameView::NotifyZoomChanged(GameModel * sender) zoomEnabled = sender->GetZoomEnabled(); } +void GameView::changeColour() +{ + c->SetColour(ui::Colour(colourRSlider->GetValue(), colourGSlider->GetValue(), colourBSlider->GetValue())); +} + void GameView::OnDraw() { if(ren) diff --git a/src/game/GameView.h b/src/game/GameView.h index 716147c..a27ecf4 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -8,6 +8,7 @@ #include "interface/Window.h" #include "interface/Point.h" #include "interface/Button.h" +#include "interface/Slider.h" #include "ToolButton.h" #include "Brush.h" @@ -48,9 +49,14 @@ private: ui::Button * pauseButton; ui::Point currentMouse; + ui::Slider * colourRSlider; + ui::Slider * colourGSlider; + ui::Slider * colourBSlider; + bool drawModeReset; ui::Point drawPoint1; ui::Point drawPoint2; + void changeColour(); public: GameView(); void AttachController(GameController * _c){ c = _c; } @@ -64,6 +70,8 @@ public: void NotifyActiveToolsChanged(GameModel * sender); void NotifyUserChanged(GameModel * sender); void NotifyZoomChanged(GameModel * sender); + void NotifyColourSelectorVisibilityChanged(GameModel * sender); + void NotifyColourSelectorColourChanged(GameModel * sender); virtual void OnMouseMove(int x, int y, int dx, int dy); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); diff --git a/src/interface/Slider.cpp b/src/interface/Slider.cpp new file mode 100644 index 0000000..1e141d2 --- /dev/null +++ b/src/interface/Slider.cpp @@ -0,0 +1,107 @@ +/* + * Slider.cpp + * + * Created on: Mar 3, 2012 + * Author: Simon + */ + +#include +#include "Slider.h" + +namespace ui { + +Slider::Slider(Point position, Point size, int steps): + Component(position, size), + sliderSteps(steps), + sliderPosition(0), + isMouseDown(false) +{ + // TODO Auto-generated constructor stub + +} + +void Slider::updatePosition(int position) +{ + if(position < 3) + position = 3; + if(position > Size.X-3) + position = Size.X-3; + + float fPosition = position-3; + float fSize = Size.X-6; + float fSteps = sliderSteps; + + float fSliderPosition = (fPosition/fSize)*sliderSteps;//position;//((x-3)/(Size.X-6))*sliderSteps; + + int newSliderPosition = fSliderPosition; + + if(newSliderPosition == sliderPosition) + return; + + sliderPosition = newSliderPosition; + + if(actionCallback) + { + actionCallback->ValueChangedCallback(this); + } +} + +void Slider::OnMouseMoved(int x, int y, int dx, int dy) +{ + if(isMouseDown) + { + updatePosition(x); + } +} + +void Slider::OnMouseClick(int x, int y, unsigned button) +{ + isMouseDown = true; + updatePosition(x); +} + +void Slider::OnMouseUp(int x, int y, unsigned button) +{ + if(isMouseDown) + { + isMouseDown = false; + } +} + +int Slider::GetValue() +{ + return sliderPosition; +} + +void Slider::SetValue(int value) +{ + if(value < 0) + value = 0; + if(value > sliderSteps) + value = sliderSteps; + sliderPosition = value; +} + +void Slider::Draw(const Point& screenPos) +{ + Graphics * g = Engine::Ref().g; + g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); + g->fillrect(screenPos.X+3, screenPos.Y+3, Size.X-6, Size.Y-6, 255, 255, 255, 255); + + float fPosition = sliderPosition; + float fSize = Size.X-6; + float fSteps = sliderSteps; + + float fSliderX = (fSize/fSteps)*fPosition;//sliderPosition;//((Size.X-6)/sliderSteps)*sliderPosition; + int sliderX = fSliderX; + sliderX += 3; + + g->fillrect(screenPos.X+sliderX-2, screenPos.Y+1, 4, Size.Y-2, 20, 20, 20, 255); + g->drawrect(screenPos.X+sliderX-2, screenPos.Y+1, 4, Size.Y-2, 200, 200, 200, 255); +} + +Slider::~Slider() +{ +} + +} /* namespace ui */ diff --git a/src/interface/Slider.h b/src/interface/Slider.h new file mode 100644 index 0000000..682bc09 --- /dev/null +++ b/src/interface/Slider.h @@ -0,0 +1,41 @@ +/* + * Slider.h + * + * Created on: Mar 3, 2012 + * Author: Simon + */ + +#ifndef SLIDER_H_ +#define SLIDER_H_ + +#include "Component.h" + +namespace ui { +class Slider; +class SliderAction +{ +public: + virtual void ValueChangedCallback(ui::Slider * sender) {} + virtual ~SliderAction() {} +}; +class Slider: public ui::Component { + friend class SliderAction; + int sliderSteps; + int sliderPosition; + bool isMouseDown; + SliderAction * actionCallback; + void updatePosition(int position); +public: + Slider(Point position, Point size, int steps); + virtual void OnMouseMoved(int x, int y, int dx, int dy); + virtual void OnMouseClick(int x, int y, unsigned button); + virtual void OnMouseUp(int x, int y, unsigned button); + virtual void Draw(const Point& screenPos); + void SetActionCallback(SliderAction * action) { actionCallback = action; } + int GetValue(); + void SetValue(int value); + virtual ~Slider(); +}; + +} /* namespace ui */ +#endif /* SLIDER_H_ */ -- cgit v0.9.2-21-gd62e From 55acb6aa801f89f14ccc2ae469247149b19a806d Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 5 Mar 2012 15:24:52 +0000 Subject: More fancy Sliders for deco colour diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 7969ed0..f84acb1 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -207,11 +207,11 @@ GameView::GameView(): } }; ColourChange * colC = new ColourChange(this); - colourRSlider = new ui::Slider(ui::Point(5, Size.Y-40), ui::Point(100, 16), 255); + colourRSlider = new ui::Slider(ui::Point(5, Size.Y-39), ui::Point(80, 14), 255); colourRSlider->SetActionCallback(colC); - colourGSlider = new ui::Slider(ui::Point(115, Size.Y-40), ui::Point(100, 16), 255); + colourGSlider = new ui::Slider(ui::Point(95, Size.Y-39), ui::Point(80, 14), 255); colourGSlider->SetActionCallback(colC); - colourBSlider = new ui::Slider(ui::Point(225, Size.Y-40), ui::Point(100, 16), 255); + colourBSlider = new ui::Slider(ui::Point(185, Size.Y-39), ui::Point(80, 14), 255); colourBSlider->SetActionCallback(colC); } @@ -367,8 +367,11 @@ void GameView::NotifyColourSelectorVisibilityChanged(GameModel * sender) void GameView::NotifyColourSelectorColourChanged(GameModel * sender) { colourRSlider->SetValue(sender->GetColourSelectorColour().Red); + colourRSlider->SetColour(ui::Colour(0, sender->GetColourSelectorColour().Green, sender->GetColourSelectorColour().Blue), ui::Colour(255, sender->GetColourSelectorColour().Green, sender->GetColourSelectorColour().Blue)); colourGSlider->SetValue(sender->GetColourSelectorColour().Green); + colourGSlider->SetColour(ui::Colour(sender->GetColourSelectorColour().Red, 0, sender->GetColourSelectorColour().Blue), ui::Colour(sender->GetColourSelectorColour().Red, 255, sender->GetColourSelectorColour().Blue)); colourBSlider->SetValue(sender->GetColourSelectorColour().Blue); + colourBSlider->SetColour(ui::Colour(sender->GetColourSelectorColour().Red, sender->GetColourSelectorColour().Green, 0), ui::Colour(sender->GetColourSelectorColour().Red, sender->GetColourSelectorColour().Green, 255)); vector tools = sender->GetMenuList()[SC_DECO]->GetToolList(); for(int i = 0; i < tools.size(); i++) diff --git a/src/interface/Slider.cpp b/src/interface/Slider.cpp index 1e141d2..06d6f87 100644 --- a/src/interface/Slider.cpp +++ b/src/interface/Slider.cpp @@ -7,6 +7,7 @@ #include #include "Slider.h" +#include "Colour.h" namespace ui { @@ -14,7 +15,8 @@ Slider::Slider(Point position, Point size, int steps): Component(position, size), sliderSteps(steps), sliderPosition(0), - isMouseDown(false) + isMouseDown(false), + bgGradient(NULL) { // TODO Auto-generated constructor stub @@ -73,6 +75,15 @@ int Slider::GetValue() return sliderPosition; } +void Slider::SetColour(Colour col1, Colour col2) +{ + if(bgGradient) + free(bgGradient); + bgGradient = (unsigned char*)Graphics::GenerateGradient( + (pixel[2]){PIXRGB(col1.Red, col1.Green, col1.Blue), PIXRGB(col2.Red, col2.Green, col2.Blue)}, + (float[2]){0.0f, 1.0f}, 2, Size.X-6); +} + void Slider::SetValue(int value) { if(value < 0) @@ -85,8 +96,16 @@ void Slider::SetValue(int value) void Slider::Draw(const Point& screenPos) { Graphics * g = Engine::Ref().g; - g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); - g->fillrect(screenPos.X+3, screenPos.Y+3, Size.X-6, Size.Y-6, 255, 255, 255, 255); + //g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); + + if(bgGradient) + { + for (int j = 3; j < Size.Y-6; j++) + for (int i = 3; i < Size.X-6; i++) + g->drawpixel(screenPos.X+i+2, screenPos.Y+j+2, bgGradient[(i-3)*3], bgGradient[(i-3)*3+1], bgGradient[(i-3)*3+2], 255); + } + + g->drawrect(screenPos.X+3, screenPos.Y+3, Size.X-6, Size.Y-6, 255, 255, 255, 255); float fPosition = sliderPosition; float fSize = Size.X-6; diff --git a/src/interface/Slider.h b/src/interface/Slider.h index 682bc09..4992f80 100644 --- a/src/interface/Slider.h +++ b/src/interface/Slider.h @@ -9,6 +9,7 @@ #define SLIDER_H_ #include "Component.h" +#include "Colour.h" namespace ui { class Slider; @@ -23,6 +24,7 @@ class Slider: public ui::Component { int sliderSteps; int sliderPosition; bool isMouseDown; + unsigned char * bgGradient; SliderAction * actionCallback; void updatePosition(int position); public: @@ -31,6 +33,7 @@ public: virtual void OnMouseClick(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); virtual void Draw(const Point& screenPos); + void SetColour(Colour col1, Colour col2); void SetActionCallback(SliderAction * action) { actionCallback = action; } int GetValue(); void SetValue(int value); diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 0c6c54e..d88d4d6 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -300,73 +300,85 @@ int Simulation::create_part_add_props(int p, int x, int y, int tv, int rx, int r return p; } -void Simulation::ApplyDecoration(int x, int y, int colR, int colG, int colB, int colA, int mode) +void Simulation::ApplyDecoration(int x, int y, int colR_, int colG_, int colB_, int colA_, int mode) { - int rp, tr, tg, tb, ta; + int rp; + float tr, tg, tb, ta, colR = colR_, colG = colG_, colB = colB_, colA = colA_; rp = pmap[y][x]; if (!rp) return; + ta = (parts[rp>>8].dcolour>>24)&0xFF; + tr = (parts[rp>>8].dcolour>>16)&0xFF; + tg = (parts[rp>>8].dcolour>>8)&0xFF; + tb = (parts[rp>>8].dcolour)&0xFF; + + ta /= 255.0f; tr /= 255.0f; tg /= 255.0f; tb /= 255.0f; + colR /= 255.0f; colG /= 255.0f; colB /= 255.0f; colA /= 255.0f; + if (mode == DECO_DRAW) { - parts[rp>>8].dcolour = ((colA<<24)|(colR<<16)|(colG<<8)|colB); + ta = colA; + tr = colR; + tg = colG; + tb = colB; } - else + else if (mode == DECO_ADD) { - if (parts[rp>>8].dcolour == 0) - return; - - ta = (parts[rp>>8].dcolour>>24)&0xFF; - tr = (parts[rp>>8].dcolour>>16)&0xFF; - tg = (parts[rp>>8].dcolour>>8)&0xFF; - tb = (parts[rp>>8].dcolour)&0xFF; - - if (mode == DECO_ADD) - { - ta += colA; - tr += colR; - tg += colG; - tb += colB; - } - else if (mode == DECO_SUBTRACT) - { - ta -= colA; - tr -= colR; - tg -= colG; - tb -= colB; - } - else if (mode == DECO_MULTIPLY) - { - ta *= (int)((float)(1.0f+((float)colA)/255.0f)); - tr *= (int)((float)(1.0f+((float)colR)/255.0f)); - tg *= (int)((float)(1.0f+((float)colG)/255.0f)); - tb *= (int)((float)(1.0f+((float)colB)/255.0f)); - } - else if (mode == DECO_DIVIDE) - { - ta /= (int)((float)(1.0f+((float)colA)/255.0f)); - tr /= (int)((float)(1.0f+((float)colR)/255.0f)); - tg /= (int)((float)(1.0f+((float)colG)/255.0f)); - tb /= (int)((float)(1.0f+((float)colB)/255.0f)); - } - if(ta > 255) - ta = 255; - else if(ta < 0) - ta = 0; - if(tr > 255) - tr = 255; - else if(tr < 0) - tr = 0; - if(tg > 255) - tg = 255; - else if(tg < 0) - tg = 0; - if(tb > 255) - tb = 255; - else if(tb < 0) - tb = 0; - parts[rp>>8].dcolour = ((ta<<24)|(tr<<16)|(tg<<8)|tb); + tr += colR*0.05f; + tg += colG*0.05f; + tb += colB*0.05f; + } + else if (mode == DECO_SUBTRACT) + { + tr -= colR*0.05f; + tg -= colG*0.05f; + tb -= colB*0.05f; + } + else if (mode == DECO_MULTIPLY) + { + tr *= colR*0.05f; + tg *= colG*0.05f; + tb *= colB*0.05f; } + else if (mode == DECO_DIVIDE) + { + if(colR>0) + tr /= colR*0.05f; + else + tr = 0.0f; + if(colG>0) + tg /= colG*0.05f; + else + tg = 0.0f; + if(colB>0) + tb /= colB*0.05f; + else + tb = 0.0f; + } + + colA_ = ta*255.0f; + colR_ = tr*255.0f; + colG_ = tg*255.0f; + colB_ = tb*255.0f; + + if(colA_ > 255) + colA_ = 255; + else if(colA_ < 0) + colA_ = 0; + if(colR_ > 255) + colR_ = 255; + else if(colR_ < 0) + colR_ = 0; + if(colG_ > 255) + colG_ = 255; + else if(colG_ < 0) + colG_ = 0; + if(colB_ > 255) + colB_ = 255; + else if(colB_ < 0) + colB_ = 0; + parts[rp>>8].dcolour = ((colA_<<24)|(colR_<<16)|(colG_<<8)|colB_); } void Simulation::ApplyDecorationPoint(int x, int y, int rx, int ry, int colR, int colG, int colB, int colA, int mode, Brush * cBrush) -- cgit v0.9.2-21-gd62e From 81f3114cb22592a8c09fa564db49fbea079f1328 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 5 Mar 2012 17:10:18 +0000 Subject: Better sliders for Decoration editor diff --git a/src/game/DecorationTool.h b/src/game/DecorationTool.h index f6f08d4..5a11bc6 100644 --- a/src/game/DecorationTool.h +++ b/src/game/DecorationTool.h @@ -11,20 +11,29 @@ public: ToolType decoMode; + unsigned char Red; + unsigned char Green; + unsigned char Blue; + unsigned char Alpha; + DecorationTool(ToolType decoMode_, string name, int r, int g, int b): Tool(0, name, r, g, b), - decoMode(decoMode_) + decoMode(decoMode_), + Red(0), + Green(0), + Blue(0), + Alpha(0) { } virtual ~DecorationTool() {} virtual void Draw(Simulation * sim, Brush * brush, ui::Point position){ - sim->ApplyDecorationPoint(position.X, position.Y, 1, 1, colRed, colGreen, colBlue, 255, decoMode, brush); + sim->ApplyDecorationPoint(position.X, position.Y, 1, 1, Red, Green, Blue, Alpha, decoMode, brush); } virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { - sim->ApplyDecorationLine(position1.X, position1.Y, position2.X, position2.Y, 1, 1, colRed, colGreen, colBlue, 255, decoMode, brush); + sim->ApplyDecorationLine(position1.X, position1.Y, position2.X, position2.Y, 1, 1, Red, Green, Blue, Alpha, decoMode, brush); } virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { - sim->ApplyDecorationBox(position1.X, position1.Y, position2.X, position2.Y, colRed, colGreen, colBlue, 255, decoMode); + sim->ApplyDecorationBox(position1.X, position1.Y, position2.X, position2.Y, Red, Green, Blue, Alpha, decoMode); } virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 7b71633..bcc52c7 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -348,10 +348,16 @@ bool GameModel::GetColourSelectorVisibility() void GameModel::SetColourSelectorColour(ui::Colour colour_) { - //if(this->colour!=colour) + colour = colour_; + notifyColourSelectorColourChanged(); + + vector tools = GetMenuList()[SC_DECO]->GetToolList(); + for(int i = 0; i < tools.size(); i++) { - colour = colour_; - notifyColourSelectorColourChanged(); + ((DecorationTool*)tools[i])->Red = colour.Red; + ((DecorationTool*)tools[i])->Green = colour.Green; + ((DecorationTool*)tools[i])->Blue = colour.Blue; + ((DecorationTool*)tools[i])->Alpha = colour.Alpha; } } diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index f84acb1..82293e4 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -213,6 +213,8 @@ GameView::GameView(): colourGSlider->SetActionCallback(colC); colourBSlider = new ui::Slider(ui::Point(185, Size.Y-39), ui::Point(80, 14), 255); colourBSlider->SetActionCallback(colC); + colourASlider = new ui::Slider(ui::Point(275, Size.Y-39), ui::Point(50, 14), 255); + colourASlider->SetActionCallback(colC); } class GameView::MenuAction: public ui::ButtonAction @@ -355,11 +357,14 @@ void GameView::NotifyColourSelectorVisibilityChanged(GameModel * sender) colourGSlider->SetParentWindow(NULL); RemoveComponent(colourBSlider); colourBSlider->SetParentWindow(NULL); + RemoveComponent(colourASlider); + colourASlider->SetParentWindow(NULL); if(sender->GetColourSelectorVisibility()) { AddComponent(colourRSlider); AddComponent(colourGSlider); AddComponent(colourBSlider); + AddComponent(colourASlider); } } @@ -372,15 +377,8 @@ void GameView::NotifyColourSelectorColourChanged(GameModel * sender) colourGSlider->SetColour(ui::Colour(sender->GetColourSelectorColour().Red, 0, sender->GetColourSelectorColour().Blue), ui::Colour(sender->GetColourSelectorColour().Red, 255, sender->GetColourSelectorColour().Blue)); colourBSlider->SetValue(sender->GetColourSelectorColour().Blue); colourBSlider->SetColour(ui::Colour(sender->GetColourSelectorColour().Red, sender->GetColourSelectorColour().Green, 0), ui::Colour(sender->GetColourSelectorColour().Red, sender->GetColourSelectorColour().Green, 255)); - - vector tools = sender->GetMenuList()[SC_DECO]->GetToolList(); - for(int i = 0; i < tools.size(); i++) - { - tools[i]->colRed = sender->GetColourSelectorColour().Red; - tools[i]->colGreen = sender->GetColourSelectorColour().Green; - tools[i]->colBlue = sender->GetColourSelectorColour().Blue; - } - NotifyToolListChanged(sender); + colourASlider->SetValue(sender->GetColourSelectorColour().Alpha); + colourASlider->SetColour(ui::Colour(0, 0, 0), ui::Colour(255, 255, 255)); } void GameView::NotifyRendererChanged(GameModel * sender) @@ -622,7 +620,7 @@ void GameView::NotifyZoomChanged(GameModel * sender) void GameView::changeColour() { - c->SetColour(ui::Colour(colourRSlider->GetValue(), colourGSlider->GetValue(), colourBSlider->GetValue())); + c->SetColour(ui::Colour(colourRSlider->GetValue(), colourGSlider->GetValue(), colourBSlider->GetValue(), colourASlider->GetValue())); } void GameView::OnDraw() diff --git a/src/game/GameView.h b/src/game/GameView.h index a27ecf4..18cd8e4 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -52,6 +52,7 @@ private: ui::Slider * colourRSlider; ui::Slider * colourGSlider; ui::Slider * colourBSlider; + ui::Slider * colourASlider; bool drawModeReset; ui::Point drawPoint1; diff --git a/src/interface/Colour.h b/src/interface/Colour.h index ad7d8a1..194b9c9 100644 --- a/src/interface/Colour.h +++ b/src/interface/Colour.h @@ -6,9 +6,13 @@ namespace ui class Colour { public: - unsigned char Red, Green, Blue; + unsigned char Red, Green, Blue, Alpha; Colour(unsigned char red, unsigned char green, unsigned char blue): - Red(red), Green(green), Blue(blue) + Red(red), Green(green), Blue(blue), Alpha(255) + { + } + Colour(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha): + Red(red), Green(green), Blue(blue), Alpha(alpha) { } Colour() diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index d88d4d6..3f82f1b 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -325,36 +325,29 @@ void Simulation::ApplyDecoration(int x, int y, int colR_, int colG_, int colB_, } else if (mode == DECO_ADD) { - tr += colR*0.05f; - tg += colG*0.05f; - tb += colB*0.05f; + ta += (colA*0.1f)*colA; + tr += (colR*0.1f)*colA; + tg += (colG*0.1f)*colA; + tb += (colB*0.1f)*colA; } else if (mode == DECO_SUBTRACT) { - tr -= colR*0.05f; - tg -= colG*0.05f; - tb -= colB*0.05f; + ta -= (colA*0.1f)*colA; + tr -= (colR*0.1f)*colA; + tg -= (colG*0.1f)*colA; + tb -= (colB*0.1f)*colA; } else if (mode == DECO_MULTIPLY) { - tr *= colR*0.05f; - tg *= colG*0.05f; - tb *= colB*0.05f; + tr *= 1.0f+(colR*0.1f)*colA; + tg *= 1.0f+(colG*0.1f)*colA; + tb *= 1.0f+(colB*0.1f)*colA; } else if (mode == DECO_DIVIDE) { - if(colR>0) - tr /= colR*0.05f; - else - tr = 0.0f; - if(colG>0) - tg /= colG*0.05f; - else - tg = 0.0f; - if(colB>0) - tb /= colB*0.05f; - else - tb = 0.0f; + tr /= 1.0f+(colR*0.1f)*colA; + tg /= 1.0f+(colG*0.1f)*colA; + tb /= 1.0f+(colB*0.1f)*colA; } colA_ = ta*255.0f; -- cgit v0.9.2-21-gd62e From 7e3d45bbfb701a5eca3e93b589680d8651ada016 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 5 Mar 2012 19:55:39 +0000 Subject: Tag UI - actually more of a box at the moment diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 1164de5..25f02e9 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -71,7 +71,8 @@ GameController::GameController(): renderOptions(NULL), loginWindow(NULL), ssave(NULL), - console(NULL) + console(NULL), + tagsWindow(NULL) { gameView = new GameView(); gameModel = new GameModel(); @@ -99,6 +100,10 @@ GameController::~GameController() { delete loginWindow; } + if(tagsWindow) + { + delete tagsWindow; + } if(console) { delete console; @@ -333,7 +338,8 @@ void GameController::OpenLogin() void GameController::OpenTags() { - //TODO: Implement + tagsWindow = new TagsController(NULL); + ui::Engine::Ref().ShowWindow(tagsWindow->GetView()); } void GameController::OpenDisplayOptions() diff --git a/src/game/GameController.h b/src/game/GameController.h index 8480aeb..7944dc7 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -10,6 +10,7 @@ #include "render/RenderController.h" #include "login/LoginController.h" #include "ssave/SSaveController.h" +#include "tags/TagsController.h" #include "console/ConsoleController.h" //#include "cat/TPTScriptInterface.h" #include "cat/LuaScriptInterface.h" @@ -32,6 +33,7 @@ private: LoginController * loginWindow; SSaveController * ssave; ConsoleController * console; + TagsController * tagsWindow; CommandInterface * commandInterface; public: class LoginCallback; diff --git a/src/tags/TagsController.cpp b/src/tags/TagsController.cpp new file mode 100644 index 0000000..88356c7 --- /dev/null +++ b/src/tags/TagsController.cpp @@ -0,0 +1,37 @@ +/* + * TagsController.cpp + * + * Created on: Mar 5, 2012 + * Author: Simon + */ + +#include "TagsController.h" +#include "interface/Engine.h" + +#include "TagsModel.h" +#include "TagsView.h" + +TagsController::TagsController(ControllerCallback * callback): + HasDone(false) +{ + tagsModel = new TagsModel(); + tagsView = new TagsView(); + tagsView->AttachController(this); + tagsModel->AddObserver(tagsView); + + this->callback = callback; +} + +void TagsController::Exit() +{ + if(ui::Engine::Ref().GetWindow() == tagsView) + ui::Engine::Ref().CloseWindow(); + if(callback) + callback->ControllerExit(); + HasDone = true; +} + +TagsController::~TagsController() { + // TODO Auto-generated destructor stub +} + diff --git a/src/tags/TagsController.h b/src/tags/TagsController.h new file mode 100644 index 0000000..5c613f0 --- /dev/null +++ b/src/tags/TagsController.h @@ -0,0 +1,28 @@ +/* + * TagsController.h + * + * Created on: Mar 5, 2012 + * Author: Simon + */ + +#ifndef TAGSCONTROLLER_H_ +#define TAGSCONTROLLER_H_ + +#include "Controller.h" +#include "TagsView.h" + +class TagsView; +class TagsModel; +class TagsController { + ControllerCallback * callback; + TagsView * tagsView; + TagsModel * tagsModel; +public: + bool HasDone; + TagsController(ControllerCallback * callback); + TagsView * GetView() {return tagsView;} + void Exit(); + virtual ~TagsController(); +}; + +#endif /* TAGSCONTROLLER_H_ */ diff --git a/src/tags/TagsModel.cpp b/src/tags/TagsModel.cpp new file mode 100644 index 0000000..cfff371 --- /dev/null +++ b/src/tags/TagsModel.cpp @@ -0,0 +1,23 @@ +/* + * TagsModel.cpp + * + * Created on: Mar 5, 2012 + * Author: Simon + */ + +#include "TagsModel.h" + +TagsModel::TagsModel() { + // TODO Auto-generated constructor stub + +} + +void TagsModel::AddObserver(TagsView * observer) +{ + observers.push_back(observer); +} + +TagsModel::~TagsModel() { + // TODO Auto-generated destructor stub +} + diff --git a/src/tags/TagsModel.h b/src/tags/TagsModel.h new file mode 100644 index 0000000..fe7c057 --- /dev/null +++ b/src/tags/TagsModel.h @@ -0,0 +1,22 @@ +/* + * TagsModel.h + * + * Created on: Mar 5, 2012 + * Author: Simon + */ + +#ifndef TAGSMODEL_H_ +#define TAGSMODEL_H_ + +#include + +class TagsView; +class TagsModel { + std::vector observers; +public: + TagsModel(); + void AddObserver(TagsView * observer); + virtual ~TagsModel(); +}; + +#endif /* TAGSMODEL_H_ */ diff --git a/src/tags/TagsView.cpp b/src/tags/TagsView.cpp new file mode 100644 index 0000000..f9eafbc --- /dev/null +++ b/src/tags/TagsView.cpp @@ -0,0 +1,29 @@ +/* + * TagsView.cpp + * + * Created on: Mar 5, 2012 + * Author: Simon + */ + +#include "TagsView.h" + +#include "TagsController.h" +#include "TagsModel.h" + +TagsView::TagsView(): + ui::Window(ui::Point(-1, -1), ui::Point(200, 300)){ + // TODO Auto-generated constructor stub + +} + +void TagsView::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + g->clearrect(Position.X-2, Position.Y-2, Size.X+3, Size.Y+3); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); +} + +TagsView::~TagsView() { + // TODO Auto-generated destructor stub +} + diff --git a/src/tags/TagsView.h b/src/tags/TagsView.h new file mode 100644 index 0000000..3126e5a --- /dev/null +++ b/src/tags/TagsView.h @@ -0,0 +1,24 @@ +/* + * TagsView.h + * + * Created on: Mar 5, 2012 + * Author: Simon + */ + +#ifndef TAGSVIEW_H_ +#define TAGSVIEW_H_ + +#include "interface/Window.h" + +class TagsController; +class TagsModel; +class TagsView: public ui::Window { + TagsController * c; +public: + TagsView(); + virtual void OnDraw(); + void AttachController(TagsController * c_) { c = c_; }; + virtual ~TagsView(); +}; + +#endif /* TAGSVIEW_H_ */ -- cgit v0.9.2-21-gd62e From 23873eae719a1c0a1227a4e108a158a9ec625462 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 22 Mar 2012 13:50:43 +0000 Subject: More work on Tags - display tags in Tag window and Tag button diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 1fbff93..f6c2ecb 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -359,6 +359,16 @@ Save * Client::GetSave(int saveID, int saveDate) json::String tempDescription = objDocument["Description"]; json::Number tempDate = objDocument["Date"]; json::Boolean tempPublished = objDocument["Published"]; + + json::Array tagsArray = objDocument["Tags"]; + vector tempTags; + + for(int j = 0; j < tagsArray.Size(); j++) + { + json::String tempTag = tagsArray[j]; + tempTags.push_back(tempTag.Value()); + } + return new Save( tempID.Value(), tempDate.Value(), @@ -368,7 +378,8 @@ Save * Client::GetSave(int saveID, int saveDate) tempUsername.Value(), tempName.Value(), tempDescription.Value(), - tempPublished.Value() + tempPublished.Value(), + tempTags ); } catch (json::Exception &e) diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 25f02e9..80f45ff 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -66,6 +66,17 @@ public: } }; +class GameController::TagsCallback: public ControllerCallback +{ + GameController * cc; +public: + TagsCallback(GameController * cc_) { cc = cc_; } + virtual void ControllerExit() + { + cc->gameModel->SetSave(new Save(*(cc->tagsWindow->GetSave()))); + } +}; + GameController::GameController(): search(NULL), renderOptions(NULL), @@ -338,8 +349,22 @@ void GameController::OpenLogin() void GameController::OpenTags() { - tagsWindow = new TagsController(NULL); - ui::Engine::Ref().ShowWindow(tagsWindow->GetView()); + if(gameModel->GetUser().ID) + { + if(gameModel->GetSave() && gameModel->GetSave()->GetID()) + { + tagsWindow = new TagsController(new TagsCallback(this), gameModel->GetSave()); + ui::Engine::Ref().ShowWindow(tagsWindow->GetView()); + } + else + { + new ErrorMessage("Error", "No save open"); + } + } + else + { + new ErrorMessage("Error", "You need to login to edit tags."); + } } void GameController::OpenDisplayOptions() diff --git a/src/game/GameController.h b/src/game/GameController.h index 7944dc7..d405051 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -40,6 +40,7 @@ public: class SearchCallback; class RenderCallback; class SSaveCallback; + class TagsCallback; GameController(); ~GameController(); GameView * GetView(); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 82293e4..1fa039c 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -1,3 +1,5 @@ +#include + #include "Config.h" #include "GameView.h" #include "interface/Window.h" @@ -426,6 +428,18 @@ void GameView::NotifySaveChanged(GameModel * sender) else downVoteButton->SetBackgroundColour(ui::Colour(0, 0, 0)); tagSimulationButton->Enabled = (sender->GetSave()->GetID() && sender->GetUser().ID); + if(sender->GetSave()->GetID()) + { + std::stringstream tagsStream; + std::vector tags = sender->GetSave()->GetTags(); + for(int i = 0; i < tags.size(); i++) + { + tagsStream << sender->GetSave()->GetTags()[i]; + if(i < tags.size()-1) + tagsStream << " "; + } + tagSimulationButton->SetText(tagsStream.str()); + } } else { @@ -436,6 +450,7 @@ void GameView::NotifySaveChanged(GameModel * sender) downVoteButton->Enabled = false; upVoteButton->SetBackgroundColour(ui::Colour(0, 0, 0)); tagSimulationButton->Enabled = false; + tagSimulationButton->SetText(""); } } diff --git a/src/search/Save.cpp b/src/search/Save.cpp index 407b739..3c7b1f9 100644 --- a/src/search/Save.cpp +++ b/src/search/Save.cpp @@ -11,7 +11,7 @@ Save::Save(Save & save) : userName(save.userName), name(save.name), Description(save.Description), date( save.date), Published(save.Published), id(save.id), votesUp( - save.votesUp), votesDown(save.votesDown), data(NULL), vote(save.vote) { + save.votesUp), votesDown(save.votesDown), data(NULL), vote(save.vote), tags(save.tags) { if (save.data) { std::cout << data << " " << save.data << std::endl; data = (unsigned char *) malloc(save.dataLength); @@ -24,14 +24,14 @@ Save::Save(int _id, int _date, int _votesUp, int _votesDown, string _userName, string _name) : id(_id), votesUp(_votesUp), votesDown(_votesDown), userName(_userName), name( _name), Description("No description provided"), date(_date), Published( - true), data(NULL), vote(0) { + true), data(NULL), vote(0), tags() { } Save::Save(int _id, int date_, int _votesUp, int _votesDown, int _vote, string _userName, - string _name, string description_, bool published_) : + string _name, string description_, bool published_, vector tags_) : id(_id), votesUp(_votesUp), votesDown(_votesDown), userName(_userName), name( _name), Description(description_), date(date_), Published( - published_), data(NULL), vote(_vote) { + published_), data(NULL), vote(_vote), tags(tags_) { } Save::~Save() @@ -86,6 +86,15 @@ int Save::GetVotesDown() { return votesDown; } +void Save::SetTags(vector tags) +{ + this->tags = tags; +} +vector Save::GetTags() +{ + return tags; +} + unsigned char * Save::GetData() { if (!data) { data = Client::Ref().GetSaveData(id, date, dataLength); diff --git a/src/search/Save.h b/src/search/Save.h index 74097fd..00387ae 100644 --- a/src/search/Save.h +++ b/src/search/Save.h @@ -1,6 +1,7 @@ #ifndef SAVE_H #define SAVE_H +#include #include #include #include @@ -22,7 +23,7 @@ public: Save(int _id, int _date, int _votesUp, int _votesDown, string _userName, string _name); - Save(int _id, int date_, int _votesUp, int _votesDown, int _vote, string _userName, string _name, string description_, bool published_); + Save(int _id, int date_, int _votesUp, int _votesDown, int _vote, string _userName, string _name, string description_, bool published_, vector tags); ~Save(); @@ -31,6 +32,8 @@ public: string Description; + vector tags; + int vote; bool Published; @@ -53,6 +56,9 @@ public: void SetVotesDown(int votesDown); int GetVotesDown(); + void SetTags(vector tags); + vector GetTags(); + unsigned char * GetData(); void SetData(unsigned char * data_, int dataLength); diff --git a/src/tags/TagsController.cpp b/src/tags/TagsController.cpp index 88356c7..5a457a1 100644 --- a/src/tags/TagsController.cpp +++ b/src/tags/TagsController.cpp @@ -11,7 +11,7 @@ #include "TagsModel.h" #include "TagsView.h" -TagsController::TagsController(ControllerCallback * callback): +TagsController::TagsController(ControllerCallback * callback, Save * save): HasDone(false) { tagsModel = new TagsModel(); @@ -19,9 +19,16 @@ TagsController::TagsController(ControllerCallback * callback): tagsView->AttachController(this); tagsModel->AddObserver(tagsView); + tagsModel->SetSave(save); + this->callback = callback; } +Save * TagsController::GetSave() +{ + return tagsModel->GetSave(); +} + void TagsController::Exit() { if(ui::Engine::Ref().GetWindow() == tagsView) diff --git a/src/tags/TagsController.h b/src/tags/TagsController.h index 5c613f0..151cb73 100644 --- a/src/tags/TagsController.h +++ b/src/tags/TagsController.h @@ -10,6 +10,7 @@ #include "Controller.h" #include "TagsView.h" +#include "search/Save.h" class TagsView; class TagsModel; @@ -19,8 +20,9 @@ class TagsController { TagsModel * tagsModel; public: bool HasDone; - TagsController(ControllerCallback * callback); + TagsController(ControllerCallback * callback, Save * save); TagsView * GetView() {return tagsView;} + Save * GetSave(); void Exit(); virtual ~TagsController(); }; diff --git a/src/tags/TagsModel.cpp b/src/tags/TagsModel.cpp index cfff371..b623ef7 100644 --- a/src/tags/TagsModel.cpp +++ b/src/tags/TagsModel.cpp @@ -6,15 +6,38 @@ */ #include "TagsModel.h" +#include "TagsView.h" -TagsModel::TagsModel() { +TagsModel::TagsModel(): + save(NULL) +{ // TODO Auto-generated constructor stub } +void TagsModel::SetSave(Save * save) +{ + this->save = save; + notifyTagsChanged(); +} + +Save * TagsModel::GetSave() +{ + return save; +} + void TagsModel::AddObserver(TagsView * observer) { observers.push_back(observer); + observer->NotifyTagsChanged(this); +} + +void TagsModel::notifyTagsChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyTagsChanged(this); + } } TagsModel::~TagsModel() { diff --git a/src/tags/TagsModel.h b/src/tags/TagsModel.h index fe7c057..3d633c3 100644 --- a/src/tags/TagsModel.h +++ b/src/tags/TagsModel.h @@ -9,13 +9,18 @@ #define TAGSMODEL_H_ #include +#include "search/Save.h" class TagsView; class TagsModel { + Save * save; std::vector observers; + void notifyTagsChanged(); public: TagsModel(); void AddObserver(TagsView * observer); + void SetSave(Save * save); + Save * GetSave(); virtual ~TagsModel(); }; diff --git a/src/tags/TagsView.cpp b/src/tags/TagsView.cpp index f9eafbc..b531190 100644 --- a/src/tags/TagsView.cpp +++ b/src/tags/TagsView.cpp @@ -11,9 +11,12 @@ #include "TagsModel.h" TagsView::TagsView(): - ui::Window(ui::Point(-1, -1), ui::Point(200, 300)){ - // TODO Auto-generated constructor stub - + ui::Window(ui::Point(-1, -1), ui::Point(200, 300)) +{ + submitButton = new ui::Button(ui::Point(Size.X-56, Size.Y-24), ui::Point(50, 16)); + AddComponent(submitButton); + tagInput = new ui::Textbox(ui::Point(6, Size.Y-24), ui::Point(Size.X-80, 16), ""); + AddComponent(tagInput); } void TagsView::OnDraw() @@ -23,6 +26,26 @@ void TagsView::OnDraw() g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); } +void TagsView::NotifyTagsChanged(TagsModel * sender) +{ + for(int i = 0; i < tags.size(); i++) + { + RemoveComponent(tags[i]); + delete tags[i]; + } + tags.clear(); + + if(sender->GetSave()) + { + for(int i = 0; i < sender->GetSave()->GetTags().size(); i++) + { + ui::Label * tempLabel = new ui::Label(ui::Point(5, 10*i), ui::Point(50, 16), sender->GetSave()->GetTags()[i]); + tags.push_back(tempLabel); + AddComponent(tempLabel); + } + } +} + TagsView::~TagsView() { // TODO Auto-generated destructor stub } diff --git a/src/tags/TagsView.h b/src/tags/TagsView.h index 3126e5a..e401516 100644 --- a/src/tags/TagsView.h +++ b/src/tags/TagsView.h @@ -8,16 +8,24 @@ #ifndef TAGSVIEW_H_ #define TAGSVIEW_H_ +#include #include "interface/Window.h" +#include "interface/Button.h" +#include "interface/Textbox.h" +#include "interface/Label.h" class TagsController; class TagsModel; class TagsView: public ui::Window { TagsController * c; + ui::Button * submitButton; + ui::Textbox * tagInput; + std::vector tags; public: TagsView(); virtual void OnDraw(); void AttachController(TagsController * c_) { c = c_; }; + void NotifyTagsChanged(TagsModel * sender); virtual ~TagsView(); }; -- cgit v0.9.2-21-gd62e From 63af6abd29a161f6d1aa257aeb76f6891f512f74 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 22 Mar 2012 22:12:16 +0000 Subject: Add and remove tags.\nBrings to light an interesting issue with adding or removing UI components within component Event handlers diff --git a/src/client/Client.cpp b/src/client/Client.cpp index f6c2ecb..e85d3e6 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -676,3 +676,101 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) //http_async_req_start(http, urlStream.str().c_str(), NULL, 0, 1); return NULL; } + +std::vector * Client::RemoveTag(int saveID, string tag) +{ + lastError = ""; + std::vector * tags = NULL; + std::stringstream urlStream; + char * data = NULL; + int dataStatus, dataLength; + urlStream << "http://" << SERVER << "/Browse/EditTag.json?Op=delete&ID=" << saveID << "&Tag=" << tag; + if(authUser.ID) + { + std::stringstream userIDStream; + userIDStream << authUser.ID; + data = http_auth_get((char *)urlStream.str().c_str(), (char *)(userIDStream.str().c_str()), NULL, (char *)(authUser.SessionID.c_str()), &dataStatus, &dataLength); + } + else + { + lastError = "Not authenticated"; + return NULL; + } + if(dataStatus == 200 && data) + { + try + { + std::istringstream dataStream(data); + json::Array tagsArray; + json::Reader::Read(tagsArray, dataStream); + + tags = new std::vector(); + + for(int j = 0; j < tagsArray.Size(); j++) + { + json::String tempTag = tagsArray[j]; + tags->push_back(tempTag.Value()); + } + } + catch (json::Exception &e) + { + lastError = "Could not read response"; + } + } + else + { + lastError = http_ret_text(dataStatus); + } + if(data) + free(data); + return tags; +} + +std::vector * Client::AddTag(int saveID, string tag) +{ + lastError = ""; + std::vector * tags = NULL; + std::stringstream urlStream; + char * data = NULL; + int dataStatus, dataLength; + urlStream << "http://" << SERVER << "/Browse/EditTag.json?Op=add&ID=" << saveID << "&Tag=" << tag; + if(authUser.ID) + { + std::stringstream userIDStream; + userIDStream << authUser.ID; + data = http_auth_get((char *)urlStream.str().c_str(), (char *)(userIDStream.str().c_str()), NULL, (char *)(authUser.SessionID.c_str()), &dataStatus, &dataLength); + } + else + { + lastError = "Not authenticated"; + return NULL; + } + if(dataStatus == 200 && data) + { + try + { + std::istringstream dataStream(data); + json::Array tagsArray; + json::Reader::Read(tagsArray, dataStream); + + tags = new std::vector(); + + for(int j = 0; j < tagsArray.Size(); j++) + { + json::String tempTag = tagsArray[j]; + tags->push_back(tempTag.Value()); + } + } + catch (json::Exception &e) + { + lastError = "Could not read response"; + } + } + else + { + lastError = http_ret_text(dataStatus); + } + if(data) + free(data); + return tags; +} diff --git a/src/client/Client.h b/src/client/Client.h index 084866b..55d813f 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -59,6 +59,8 @@ public: Save * GetSave(int saveID, int saveDate); void SetAuthUser(User user); User GetAuthUser(); + std::vector * RemoveTag(int saveID, string tag); + std::vector * AddTag(int saveID, string tag); std::string GetLastError() { return lastError; } diff --git a/src/tags/TagsController.cpp b/src/tags/TagsController.cpp index 5a457a1..ee8f924 100644 --- a/src/tags/TagsController.cpp +++ b/src/tags/TagsController.cpp @@ -29,6 +29,17 @@ Save * TagsController::GetSave() return tagsModel->GetSave(); } +void TagsController::RemoveTag(string tag) +{ + tagsModel->RemoveTag(tag); +} + + +void TagsController::AddTag(string tag) +{ + tagsModel->AddTag(tag); +} + void TagsController::Exit() { if(ui::Engine::Ref().GetWindow() == tagsView) diff --git a/src/tags/TagsController.h b/src/tags/TagsController.h index 151cb73..0ab337f 100644 --- a/src/tags/TagsController.h +++ b/src/tags/TagsController.h @@ -23,6 +23,8 @@ public: TagsController(ControllerCallback * callback, Save * save); TagsView * GetView() {return tagsView;} Save * GetSave(); + void RemoveTag(string tag); + void AddTag(string tag); void Exit(); virtual ~TagsController(); }; diff --git a/src/tags/TagsModel.cpp b/src/tags/TagsModel.cpp index b623ef7..a4e5083 100644 --- a/src/tags/TagsModel.cpp +++ b/src/tags/TagsModel.cpp @@ -7,6 +7,7 @@ #include "TagsModel.h" #include "TagsView.h" +#include "client/Client.h" TagsModel::TagsModel(): save(NULL) @@ -26,6 +27,44 @@ Save * TagsModel::GetSave() return save; } +void TagsModel::RemoveTag(string tag) +{ + if(save) + { + std::vector * tags = Client::Ref().RemoveTag(save->GetID(), tag); + if(tags) + { + save->SetTags(vector(*tags)); + notifyTagsChanged(); + delete tags; + } + else + { + lastError = Client::Ref().GetLastError(); + notifyError(); + } + } +} + +void TagsModel::AddTag(string tag) +{ + if(save) + { + std::vector * tags = Client::Ref().AddTag(save->GetID(), tag); + if(tags) + { + save->SetTags(vector(*tags)); + notifyTagsChanged(); + delete tags; + } + else + { + lastError = Client::Ref().GetLastError(); + notifyError(); + } + } +} + void TagsModel::AddObserver(TagsView * observer) { observers.push_back(observer); @@ -40,6 +79,14 @@ void TagsModel::notifyTagsChanged() } } +void TagsModel::notifyError() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyError(this); + } +} + TagsModel::~TagsModel() { // TODO Auto-generated destructor stub } diff --git a/src/tags/TagsModel.h b/src/tags/TagsModel.h index 3d633c3..09e908e 100644 --- a/src/tags/TagsModel.h +++ b/src/tags/TagsModel.h @@ -14,13 +14,18 @@ class TagsView; class TagsModel { Save * save; + string lastError; std::vector observers; void notifyTagsChanged(); + void notifyError(); public: TagsModel(); void AddObserver(TagsView * observer); void SetSave(Save * save); + void RemoveTag(string tag); + void AddTag(string tag); Save * GetSave(); + string GetLastError(){ return lastError; } virtual ~TagsModel(); }; diff --git a/src/tags/TagsView.cpp b/src/tags/TagsView.cpp index b531190..4a4fd06 100644 --- a/src/tags/TagsView.cpp +++ b/src/tags/TagsView.cpp @@ -5,18 +5,38 @@ * Author: Simon */ +#include "client/Client.h" #include "TagsView.h" +#include "dialogues/ErrorMessage.h" #include "TagsController.h" #include "TagsModel.h" TagsView::TagsView(): - ui::Window(ui::Point(-1, -1), ui::Point(200, 300)) + ui::Window(ui::Point(-1, -1), ui::Point(195, 250)) { - submitButton = new ui::Button(ui::Point(Size.X-56, Size.Y-24), ui::Point(50, 16)); - AddComponent(submitButton); - tagInput = new ui::Textbox(ui::Point(6, Size.Y-24), ui::Point(Size.X-80, 16), ""); + + class CloseAction : public ui::ButtonAction + { + TagsView * v; + public: + CloseAction(TagsView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->Exit(); + } + }; + closeButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(195, 16), "Close"); + closeButton->SetAlignment(AlignLeft, AlignTop); + closeButton->SetActionCallback(new CloseAction(this)); + AddComponent(closeButton); + + tagInput = new ui::Textbox(ui::Point(8, Size.Y-40), ui::Point(Size.X-16, 16), ""); AddComponent(tagInput); + + title = new ui::Label(ui::Point(5, 5), ui::Point(185, 16), "Manage tags:"); + title->SetAlignment(AlignLeft, AlignTop); + AddComponent(title); } void TagsView::OnDraw() @@ -26,6 +46,11 @@ void TagsView::OnDraw() g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); } +void TagsView::NotifyError(TagsModel * sender) +{ + new ErrorMessage("Error", sender->GetLastError()); +} + void TagsView::NotifyTagsChanged(TagsModel * sender) { for(int i = 0; i < tags.size(); i++) @@ -35,14 +60,58 @@ void TagsView::NotifyTagsChanged(TagsModel * sender) } tags.clear(); + + class DeleteTagAction : public ui::ButtonAction + { + TagsView * v; + string tag; + public: + DeleteTagAction(TagsView * _v, string tag) { v = _v; this->tag = tag; } + void ActionCallback(ui::Button * sender) + { + v->c->RemoveTag(tag); + } + }; + if(sender->GetSave()) { for(int i = 0; i < sender->GetSave()->GetTags().size(); i++) { - ui::Label * tempLabel = new ui::Label(ui::Point(5, 10*i), ui::Point(50, 16), sender->GetSave()->GetTags()[i]); + ui::Label * tempLabel = new ui::Label(ui::Point(35, 35+(16*i)), ui::Point(120, 16), sender->GetSave()->GetTags()[i]); + tempLabel->SetAlignment(AlignLeft, AlignMiddle); tags.push_back(tempLabel); AddComponent(tempLabel); + + if(sender->GetSave()->GetUserName()==Client::Ref().GetAuthUser().Username) + { + ui::Button * tempButton = new ui::Button(ui::Point(15, 35+(16*i)), ui::Point(14, 14), "x"); + tempButton->SetAlignment(AlignCentre, AlignMiddle); + tempButton->SetActionCallback(new DeleteTagAction(this, sender->GetSave()->GetTags()[i])); + tags.push_back(tempButton); + AddComponent(tempButton); + } + } + } +} + +void TagsView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + switch(key) + { + /*case KEY_TAB: + if(IsFocused(usernameField)) + FocusComponent(passwordField); + else + FocusComponent(usernameField); + break;*/ + case KEY_ENTER: + case KEY_RETURN: + if(IsFocused(tagInput)) + { + c->AddTag(tagInput->GetText()); + tagInput->SetText(""); } + break; } } diff --git a/src/tags/TagsView.h b/src/tags/TagsView.h index e401516..0107449 100644 --- a/src/tags/TagsView.h +++ b/src/tags/TagsView.h @@ -18,13 +18,16 @@ class TagsController; class TagsModel; class TagsView: public ui::Window { TagsController * c; - ui::Button * submitButton; + ui::Button * closeButton; + ui::Label * title; ui::Textbox * tagInput; - std::vector tags; + std::vector tags; public: TagsView(); virtual void OnDraw(); + void NotifyError(TagsModel * sender); void AttachController(TagsController * c_) { c = c_; }; + virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); void NotifyTagsChanged(TagsModel * sender); virtual ~TagsView(); }; -- cgit v0.9.2-21-gd62e From e9770d8ee7a44d5680c23749c786a03c0d5b41ff Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 28 Mar 2012 22:01:44 +0100 Subject: Clipboard and Stamp from selection (no way to paste/place yet) diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 80f45ff..a4a99c2 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -241,6 +241,25 @@ void GameController::DrawPoints(int toolSelection, queue & pointQueu } } +void GameController::StampRegion(ui::Point point1, ui::Point point2) +{ + int saveSize; + unsigned char * saveData; + saveData = gameModel->GetSimulation()->Save(point1.X, point1.Y, point2.X, point2.Y, saveSize); + if(saveData && saveSize) + gameModel->AddStamp(saveData, saveSize); +} + +void GameController::CopyRegion(ui::Point point1, ui::Point point2) +{ + int saveSize; + unsigned char * saveData; + saveData = gameModel->GetSimulation()->Save(point1.X, point1.Y, point2.X, point2.Y, saveSize); + + if(saveData && saveSize) + gameModel->SetClipboard(saveData, saveSize); +} + void GameController::Update() { gameModel->GetSimulation()->update_particles(); diff --git a/src/game/GameController.h b/src/game/GameController.h index d405051..cf26f51 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -52,6 +52,8 @@ public: void DrawRect(int toolSelection, ui::Point point1, ui::Point point2); void DrawLine(int toolSelection, ui::Point point1, ui::Point point2); void DrawFill(int toolSelection, ui::Point point); + void StampRegion(ui::Point point1, ui::Point point2); + void CopyRegion(ui::Point point1, ui::Point point2); void Update(); void SetPaused(bool pauseState); void SetPaused(); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index bcc52c7..85f4249 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -16,7 +16,8 @@ GameModel::GameModel(): currentBrush(0), currentUser(0, ""), currentSave(NULL), - colourSelector(false) + colourSelector(false), + clipboardData(NULL) { sim = new Simulation(); ren = new Renderer(ui::Engine::Ref().g, sim); @@ -405,6 +406,27 @@ void GameModel::ClearSimulation() sim->clear_sim(); } +void GameModel::AddStamp(unsigned char * saveData, int saveSize) +{ + //Do nothing + + //die alone +} + +void GameModel::SetClipboard(unsigned char * saveData, int saveSize) +{ + if(clipboardData) + free(clipboardData); + clipboardData = saveData; + clipboardSize = saveSize; +} + +unsigned char * GameModel::GetClipboard(int & saveSize) +{ + saveSize = clipboardSize; + return clipboardData; +} + void GameModel::notifyColourSelectorColourChanged() { for(int i = 0; i < observers.size(); i++) @@ -508,3 +530,11 @@ void GameModel::notifyZoomChanged() observers[i]->NotifyZoomChanged(this); } } + +void GameModel::notifyClipboardChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyClipboardChanged(this); + } +} diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 0f170df..14e42ac 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -31,6 +31,8 @@ public: class GameModel { private: + int clipboardSize; + unsigned char * clipboardData; vector observers; vector toolList; vector menuList; @@ -56,6 +58,7 @@ private: void notifyActiveToolsChanged(); void notifyUserChanged(); void notifyZoomChanged(); + void notifyClipboardChanged(); void notifyColourSelectorColourChanged(); void notifyColourSelectorVisibilityChanged(); public: @@ -101,6 +104,9 @@ public: ui::Point GetZoomPosition(); void SetZoomWindowPosition(ui::Point position); ui::Point GetZoomWindowPosition(); + void AddStamp(unsigned char * saveData, int saveSize); + void SetClipboard(unsigned char * saveData, int saveSize); + unsigned char * GetClipboard(int & saveSize); }; #endif // GAMEMODEL_H diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 1fa039c..16f7551 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -21,7 +21,10 @@ GameView::GameView(): drawPoint1(0, 0), drawPoint2(0, 0), drawMode(DrawPoints), - drawModeReset(false) + drawModeReset(false), + selectMode(SelectNone), + selectPoint1(0, 0), + selectPoint2(0, 0) { int currentX = 1; //Set up UI @@ -461,6 +464,12 @@ void GameView::NotifyBrushChanged(GameModel * sender) void GameView::OnMouseMove(int x, int y, int dx, int dy) { + if(selectMode!=SelectNone) + { + if(selectPoint1.X!=-1) + selectPoint2 = ui::Point(x, y); + return; + } currentMouse = ui::Point(x, y); if(isMouseDown && drawMode == DrawPoints) { @@ -471,6 +480,15 @@ void GameView::OnMouseMove(int x, int y, int dx, int dy) void GameView::OnMouseDown(int x, int y, unsigned button) { + if(selectMode!=SelectNone) + { + if(button!=3) + { + selectPoint1 = ui::Point(x, y); + selectPoint2 = selectPoint1; + } + return; + } if(currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES && !(zoomEnabled && !zoomCursorFixed)) { if(button == BUTTON_LEFT) @@ -493,6 +511,23 @@ void GameView::OnMouseDown(int x, int y, unsigned button) void GameView::OnMouseUp(int x, int y, unsigned button) { + if(selectMode!=SelectNone) + { + int x2 = (selectPoint1.X>selectPoint2.X)?selectPoint1.X:selectPoint2.X; + int y2 = (selectPoint1.Y>selectPoint2.Y)?selectPoint1.Y:selectPoint2.Y; + int x1 = (selectPoint2.X0 && y2-y1>0) + { + if(selectMode==SelectCopy) + c->CopyRegion(ui::Point(x1, y1), ui::Point(x2, y2)); + else if(selectMode==SelectStamp) + c->StampRegion(ui::Point(x1, y1), ui::Point(x2, y2)); + } + selectMode = SelectNone; + return; + } + if(zoomEnabled && !zoomCursorFixed) zoomCursorFixed = true; else @@ -529,6 +564,10 @@ void GameView::OnMouseWheel(int x, int y, int d) { if(!d) return; + if(selectMode!=SelectNone) + { + return; + } if(zoomEnabled && !zoomCursorFixed) { c->AdjustZoomSize(d); @@ -545,6 +584,10 @@ void GameView::OnMouseWheel(int x, int y, int d) void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { + if(selectMode!=SelectNone) + { + return; + } switch(key) { case KEY_CTRL: @@ -588,11 +631,26 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool if(ctrl) c->SetDecoration(); break; + case 's': + selectMode = SelectStamp; + selectPoint1 = ui::Point(-1, -1); + break; + case 'c': + if(ctrl) + { + selectMode = SelectCopy; + selectPoint1 = ui::Point(-1, -1); + } + break; } } void GameView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { + if(selectMode!=SelectNone) + { + return; + } if(!isMouseDown) drawMode = DrawPoints; else @@ -633,6 +691,11 @@ void GameView::NotifyZoomChanged(GameModel * sender) zoomEnabled = sender->GetZoomEnabled(); } +void GameView::NotifyClipboardChanged(GameModel * sender) +{ + //Could use this to have a mini preview of the clipboard, meh +} + void GameView::changeColour() { c->SetColour(ui::Colour(colourRSlider->GetValue(), colourGSlider->GetValue(), colourBSlider->GetValue(), colourASlider->GetValue())); @@ -642,6 +705,7 @@ void GameView::OnDraw() { if(ren) { + Graphics * g = ui::Engine::Ref().g; ren->render_parts(); ren->render_fire(); ren->DrawWalls(); @@ -649,18 +713,46 @@ void GameView::OnDraw() { if(drawMode==DrawRect && isMouseDown) { - activeBrush->RenderRect(ui::Engine::Ref().g, c->PointTranslate(drawPoint1), c->PointTranslate(currentMouse)); + activeBrush->RenderRect(g, c->PointTranslate(drawPoint1), c->PointTranslate(currentMouse)); } else if(drawMode==DrawLine && isMouseDown) { - activeBrush->RenderLine(ui::Engine::Ref().g, c->PointTranslate(drawPoint1), c->PointTranslate(currentMouse)); + activeBrush->RenderLine(g, c->PointTranslate(drawPoint1), c->PointTranslate(currentMouse)); } else { - activeBrush->RenderPoint(ui::Engine::Ref().g, c->PointTranslate(currentMouse)); + activeBrush->RenderPoint(g, c->PointTranslate(currentMouse)); } } ren->RenderZoom(); ren->DrawSigns(); + + if(selectMode!=SelectNone) + { + if(selectPoint1.X==-1) + { + g->fillrect(0, 0, XRES, YRES, 0, 0, 0, 100); + } + else + { + int x2 = (selectPoint1.X>selectPoint2.X)?selectPoint1.X:selectPoint2.X; + int y2 = (selectPoint1.Y>selectPoint2.Y)?selectPoint1.Y:selectPoint2.Y; + int x1 = (selectPoint2.XXRES-1) + x2 = XRES-1; + if(y2>YRES-1) + y2 = YRES-1; + + g->fillrect(0, 0, XRES, y1, 0, 0, 0, 100); + g->fillrect(0, y2, XRES, YRES-y2, 0, 0, 0, 100); + + g->fillrect(0, y1-1, x1, (y2-y1)+2, 0, 0, 0, 100); + g->fillrect(x2, y1-1, XRES-x2, (y2-y1)+2, 0, 0, 0, 100); + + g->xor_rect(x1, y1, (x2-x1)+1, (y2-y1)+1); + } + } } } diff --git a/src/game/GameView.h b/src/game/GameView.h index 18cd8e4..0b31182 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -19,6 +19,11 @@ enum DrawMode DrawPoints, DrawLine, DrawRect, DrawFill }; +enum SelectMode +{ + SelectNone, SelectStamp, SelectCopy +}; + class GameController; class GameModel; class GameView: public ui::Window @@ -57,6 +62,11 @@ private: bool drawModeReset; ui::Point drawPoint1; ui::Point drawPoint2; + + SelectMode selectMode; + ui::Point selectPoint1; + ui::Point selectPoint2; + void changeColour(); public: GameView(); @@ -73,6 +83,7 @@ public: void NotifyZoomChanged(GameModel * sender); void NotifyColourSelectorVisibilityChanged(GameModel * sender); void NotifyColourSelectorColourChanged(GameModel * sender); + void NotifyClipboardChanged(GameModel * sender); virtual void OnMouseMove(int x, int y, int dx, int dy); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 3f82f1b..ceaae07 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -18,6 +18,11 @@ unsigned char * Simulation::Save(int & dataLength) return SaveLoader::BuildSave(dataLength, this, 0, 0, XRES, YRES); } +unsigned char * Simulation::Save(int x1, int y1, int x2, int y2, int & dataLength) +{ + return SaveLoader::BuildSave(dataLength, this, x1, y1, x2-x1, y2-y1); +} + void Simulation::clear_area(int area_x, int area_y, int area_w, int area_h) { int cx = 0; diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index 007f3c2..b33b349 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -208,6 +208,7 @@ public: int Load(unsigned char * data, int dataLength); unsigned char * Save(int & dataLength); + unsigned char * Save(int x1, int y1, int x2, int y2, int & dataLength); inline int is_blocking(int t, int x, int y); inline int is_boundary(int pt, int x, int y); inline int find_next_boundary(int pt, int *x, int *y, int dm, int *em); -- cgit v0.9.2-21-gd62e From 1f388e4ca02f0a84e4b9d9b19e6308224389818d Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 29 Mar 2012 00:59:10 +0100 Subject: Exception when loading invalid save diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index a4a99c2..e5c3013 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -10,6 +10,7 @@ #include "login/LoginController.h" #include "interface/Point.h" #include "dialogues/ErrorMessage.h" +#include "SaveLoadException.h" using namespace std; @@ -34,7 +35,14 @@ public: { if(cc->search->GetLoadedSave()) { - cc->gameModel->SetSave(new Save(*(cc->search->GetLoadedSave()))); + try + { + cc->gameModel->SetSave(new Save(*(cc->search->GetLoadedSave()))); + } + catch(SaveLoadException & ex) + { + new ErrorMessage("Cannot open save", ex.what()); + } } } }; @@ -61,6 +69,7 @@ public: if(cc->ssave->GetSaveUploaded()) { cc->gameModel->SetSave(new Save(*(cc->ssave->GetSave()))); + } //cc->gameModel->SetUser(cc->loginWindow->GetUser()); } diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 85f4249..a1d6b8b 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -8,6 +8,7 @@ #include "EllipseBrush.h" #include "client/Client.h" #include "game/DecorationTool.h" +#include "SaveLoadException.h" GameModel::GameModel(): activeTools({NULL, NULL, NULL}), @@ -257,7 +258,12 @@ void GameModel::SetSave(Save * newSave) currentSave = newSave; if(currentSave) { - sim->Load(currentSave->GetData(), currentSave->GetDataLength()); + int returnVal = sim->Load(currentSave->GetData(), currentSave->GetDataLength()); + if(returnVal){ + delete currentSave; + currentSave = NULL; + throw SaveLoadException(returnVal==2?"Save from newer version":"Save data corrupt"); + } } notifySaveChanged(); notifyPausedChanged(); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 16f7551..7faeaf1 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -2,6 +2,7 @@ #include "Config.h" #include "GameView.h" +#include "Graphics.h" #include "interface/Window.h" #include "interface/Button.h" #include "interface/Colour.h" @@ -482,7 +483,7 @@ void GameView::OnMouseDown(int x, int y, unsigned button) { if(selectMode!=SelectNone) { - if(button!=3) + if(button==BUTTON_LEFT) { selectPoint1 = ui::Point(x, y); selectPoint2 = selectPoint1; @@ -517,7 +518,7 @@ void GameView::OnMouseUp(int x, int y, unsigned button) int y2 = (selectPoint1.Y>selectPoint2.Y)?selectPoint1.Y:selectPoint2.Y; int x1 = (selectPoint2.X0 && y2-y1>0) + if(button==BUTTON_LEFT && x2-x1>0 && y2-y1>0) { if(selectMode==SelectCopy) c->CopyRegion(ui::Point(x1, y1), ui::Point(x2, y2)); diff --git a/src/game/SaveLoadException.h b/src/game/SaveLoadException.h new file mode 100644 index 0000000..fea2ad5 --- /dev/null +++ b/src/game/SaveLoadException.h @@ -0,0 +1,26 @@ +/* + * SaveLoadException.h + * + * Created on: Mar 29, 2012 + * Author: Simon + */ + +#ifndef SAVELOADEXCEPTION_H_ +#define SAVELOADEXCEPTION_H_ + +#include +#include +using namespace std; + +struct SaveLoadException: public exception { + string message; +public: + SaveLoadException(string message_): message(message_) {} + const char * what() const throw() + { + return message.c_str(); + } + ~SaveLoadException() throw() {}; +}; + +#endif /* SAVELOADEXCEPTION_H_ */ -- cgit v0.9.2-21-gd62e From 289556ac7078963b6af361f5812dd62e6712359f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 29 Mar 2012 16:17:30 +0100 Subject: Replace Error notification with exception for Tags model diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index e5c3013..7b08716 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -10,7 +10,7 @@ #include "login/LoginController.h" #include "interface/Point.h" #include "dialogues/ErrorMessage.h" -#include "SaveLoadException.h" +#include "GameModelException.h" using namespace std; @@ -39,7 +39,7 @@ public: { cc->gameModel->SetSave(new Save(*(cc->search->GetLoadedSave()))); } - catch(SaveLoadException & ex) + catch(GameModelException & ex) { new ErrorMessage("Cannot open save", ex.what()); } diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index a1d6b8b..0106dd7 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -8,7 +8,7 @@ #include "EllipseBrush.h" #include "client/Client.h" #include "game/DecorationTool.h" -#include "SaveLoadException.h" +#include "GameModelException.h" GameModel::GameModel(): activeTools({NULL, NULL, NULL}), @@ -262,7 +262,7 @@ void GameModel::SetSave(Save * newSave) if(returnVal){ delete currentSave; currentSave = NULL; - throw SaveLoadException(returnVal==2?"Save from newer version":"Save data corrupt"); + throw GameModelException(returnVal==2?"Save from newer version":"Save data corrupt"); } } notifySaveChanged(); diff --git a/src/game/GameModelException.h b/src/game/GameModelException.h new file mode 100644 index 0000000..05138f2 --- /dev/null +++ b/src/game/GameModelException.h @@ -0,0 +1,26 @@ +/* + * SaveLoadException.h + * + * Created on: Mar 29, 2012 + * Author: Simon + */ + +#ifndef SAVELOADEXCEPTION_H_ +#define SAVELOADEXCEPTION_H_ + +#include +#include +using namespace std; + +struct GameModelException: public exception { + string message; +public: + GameModelException(string message_): message(message_) {} + const char * what() const throw() + { + return message.c_str(); + } + ~GameModelException() throw() {}; +}; + +#endif /* SAVELOADEXCEPTION_H_ */ diff --git a/src/tags/TagsModel.cpp b/src/tags/TagsModel.cpp index a4e5083..838dba0 100644 --- a/src/tags/TagsModel.cpp +++ b/src/tags/TagsModel.cpp @@ -8,6 +8,7 @@ #include "TagsModel.h" #include "TagsView.h" #include "client/Client.h" +#include "TagsModelException.h" TagsModel::TagsModel(): save(NULL) @@ -40,8 +41,7 @@ void TagsModel::RemoveTag(string tag) } else { - lastError = Client::Ref().GetLastError(); - notifyError(); + throw TagsModelException(Client::Ref().GetLastError()); } } } @@ -59,8 +59,7 @@ void TagsModel::AddTag(string tag) } else { - lastError = Client::Ref().GetLastError(); - notifyError(); + throw TagsModelException(Client::Ref().GetLastError()); } } } @@ -79,14 +78,6 @@ void TagsModel::notifyTagsChanged() } } -void TagsModel::notifyError() -{ - for(int i = 0; i < observers.size(); i++) - { - observers[i]->NotifyError(this); - } -} - TagsModel::~TagsModel() { // TODO Auto-generated destructor stub } diff --git a/src/tags/TagsModel.h b/src/tags/TagsModel.h index 09e908e..c00db8d 100644 --- a/src/tags/TagsModel.h +++ b/src/tags/TagsModel.h @@ -14,10 +14,8 @@ class TagsView; class TagsModel { Save * save; - string lastError; std::vector observers; void notifyTagsChanged(); - void notifyError(); public: TagsModel(); void AddObserver(TagsView * observer); @@ -25,7 +23,6 @@ public: void RemoveTag(string tag); void AddTag(string tag); Save * GetSave(); - string GetLastError(){ return lastError; } virtual ~TagsModel(); }; diff --git a/src/tags/TagsModelException.h b/src/tags/TagsModelException.h new file mode 100644 index 0000000..2473cab --- /dev/null +++ b/src/tags/TagsModelException.h @@ -0,0 +1,23 @@ +/* + * TagsModelException.h + * + * Created on: Mar 29, 2012 + * Author: Simon + */ + +#ifndef TAGSMODELEXCEPTION_H_ +#define TAGSMODELEXCEPTION_H_ + +#include +#include +using namespace std; + +class TagsModelException { + string message; +public: + TagsModelException(string message_): message(message_) {}; + const char * what() const throw() { return message.c_str(); }; + ~TagsModelException() throw() {}; +}; + +#endif /* TAGSMODELEXCEPTION_H_ */ diff --git a/src/tags/TagsView.cpp b/src/tags/TagsView.cpp index 4a4fd06..c39a4c7 100644 --- a/src/tags/TagsView.cpp +++ b/src/tags/TagsView.cpp @@ -11,6 +11,7 @@ #include "dialogues/ErrorMessage.h" #include "TagsController.h" #include "TagsModel.h" +#include "TagsModelException.h" TagsView::TagsView(): ui::Window(ui::Point(-1, -1), ui::Point(195, 250)) @@ -46,11 +47,6 @@ void TagsView::OnDraw() g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); } -void TagsView::NotifyError(TagsModel * sender) -{ - new ErrorMessage("Error", sender->GetLastError()); -} - void TagsView::NotifyTagsChanged(TagsModel * sender) { for(int i = 0; i < tags.size(); i++) @@ -69,7 +65,14 @@ void TagsView::NotifyTagsChanged(TagsModel * sender) DeleteTagAction(TagsView * _v, string tag) { v = _v; this->tag = tag; } void ActionCallback(ui::Button * sender) { - v->c->RemoveTag(tag); + try + { + v->c->RemoveTag(tag); + } + catch(TagsModelException & ex) + { + new ErrorMessage("Could not remove tag", ex.what()); + } } }; @@ -108,7 +111,15 @@ void TagsView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool case KEY_RETURN: if(IsFocused(tagInput)) { - c->AddTag(tagInput->GetText()); + + try + { + c->AddTag(tagInput->GetText()); + } + catch(TagsModelException & ex) + { + new ErrorMessage("Could not add tag", ex.what()); + } tagInput->SetText(""); } break; diff --git a/src/tags/TagsView.h b/src/tags/TagsView.h index 0107449..2861c8c 100644 --- a/src/tags/TagsView.h +++ b/src/tags/TagsView.h @@ -25,7 +25,6 @@ class TagsView: public ui::Window { public: TagsView(); virtual void OnDraw(); - void NotifyError(TagsModel * sender); void AttachController(TagsController * c_) { c = c_; }; virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); void NotifyTagsChanged(TagsModel * sender); -- cgit v0.9.2-21-gd62e From efddc12e5d2aadc5eee1927245ad38b9dee89aed Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 2 Apr 2012 17:01:28 +0100 Subject: Stamps browser, placement + clipboard sampling and placement - No clipboard or stamp thumbnail generation, needs thumbnail generator from SaveLoader diff --git a/src/Config.h b/src/Config.h index 780dd89..d6be81a 100644 --- a/src/Config.h +++ b/src/Config.h @@ -51,6 +51,8 @@ #define LOCAL_SAVE_DIR "Saves" +#define STAMPS_DIR "stamps" + #define APPDATA_SUBDIR "\\HardWIRED" //Number of unique thumbnails to have in cache at one time diff --git a/src/client/Client.cpp b/src/client/Client.cpp index e85d3e6..b472518 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -3,8 +3,16 @@ #include #include #include +#include #include +#ifdef WIN32 +#include +#else +#include +#include +#endif + #include "Config.h" #include "Client.h" #include "MD5.h" @@ -76,6 +84,21 @@ Client::Client(): { http_init(NULL); } + + //Read stamps library + std::ifstream stampsLib; + stampsLib.open(STAMPS_DIR PATH_SEP "stamps.def", ios::binary); + while(true) + { + char data[11]; + memset(data, 0, 11); + if(stampsLib.readsome(data, 10)!=10) + break; + if(!data[0]) + break; + stampIDs.push_back(data); + } + stampsLib.close(); } Client::~Client() @@ -169,6 +192,95 @@ RequestStatus Client::UploadSave(Save * save) return RequestFailure; } +Save * Client::GetStamp(string stampID) +{ + std::ifstream stampFile; + stampFile.open(string(STAMPS_DIR PATH_SEP + stampID + ".stm").c_str(), ios::binary); + if(stampFile.is_open()) + { + stampFile.seekg(0, ios::end); + size_t fileSize = stampFile.tellg(); + stampFile.seekg(0); + + unsigned char * tempData = (unsigned char *)malloc(fileSize); + stampFile.read((char *)tempData, fileSize); + stampFile.close(); + + + Save * tempSave = new Save(0, 0, 0, 0, "", ""); + tempSave->SetData(tempData, fileSize); + return tempSave; + } + else + { + return NULL; + } +} + +void Client::DeleteStamp(string stampID) +{ + return; +} + +string Client::AddStamp(Save * saveData) +{ + unsigned t=(unsigned)time(NULL); + if (lastStampTime!=t) + { + lastStampTime=t; + lastStampName=0; + } + else + lastStampName++; + std::stringstream saveID; + //sprintf(saveID, "%08x%02x", lastStampTime, lastStampName); + saveID + << std::setw(8) << std::setfill('0') << std::hex << lastStampTime + << std::setw(2) << std::setfill('0') << std::hex << lastStampName; + +#ifdef WIN32 + _mkdir(STAMPS_DIR); +#else + mkdir(STAMPS_DIR, 0755); +#endif + + std::ofstream stampStream; + stampStream.open(string(STAMPS_DIR PATH_SEP + saveID.str()+".stm").c_str(), ios::binary); + stampStream.write((const char *)saveData->data, saveData->dataLength); + stampStream.close(); + + stampIDs.push_back(saveID.str()); + + updateStamps(); + + return saveID.str(); +} + +void Client::updateStamps() +{ + +#ifdef WIN32 + _mkdir(STAMPS_DIR); +#else + mkdir(STAMPS_DIR, 0755); +#endif + + std::ofstream stampsStream; + stampsStream.open(string(STAMPS_DIR PATH_SEP "stamps.def").c_str(), ios::binary); + for(int i = 0; i < stampIDs.size(); i++) + { + stampsStream.write(stampIDs[i].c_str(), 10); + } + stampsStream.write("\0", 1); + stampsStream.close(); + return; +} + +vector Client::GetStamps() +{ + return stampIDs; +} + RequestStatus Client::ExecVote(int saveID, int direction) { lastError = ""; diff --git a/src/client/Client.h b/src/client/Client.h index 55d813f..c8f5764 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -29,6 +29,10 @@ class Client: public Singleton { private: std::string lastError; + vector stampIDs; + int lastStampTime; + int lastStampName; + //Auth session User authUser; @@ -39,6 +43,7 @@ private: int activeThumbRequestTimes[IMGCONNS]; int activeThumbRequestCompleteTimes[IMGCONNS]; std::string activeThumbRequestIDs[IMGCONNS]; + void updateStamps(); public: //Config file handle json::Object configDocument; @@ -49,6 +54,11 @@ public: RequestStatus ExecVote(int saveID, int direction); RequestStatus UploadSave(Save * save); + Save * GetStamp(string stampID); + void DeleteStamp(string stampID); + string AddStamp(Save * saveData); + vector GetStamps(); + unsigned char * GetSaveData(int saveID, int saveDate, int & dataLength); LoginStatus Login(string username, string password, User & user); void ClearThumbnailRequests(); @@ -59,7 +69,7 @@ public: Save * GetSave(int saveID, int saveDate); void SetAuthUser(User user); User GetAuthUser(); - std::vector * RemoveTag(int saveID, string tag); + std::vector * RemoveTag(int saveID, string tag); //TODO RequestStatus std::vector * AddTag(int saveID, string tag); std::string GetLastError() { return lastError; diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 7b08716..3408ec5 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -86,6 +86,20 @@ public: } }; +class GameController::StampsCallback: public ControllerCallback +{ + GameController * cc; +public: + StampsCallback(GameController * cc_) { cc = cc_; } + virtual void ControllerExit() + { + if(cc->stamps->GetStamp()) + { + cc->gameModel->SetStamp(cc->stamps->GetStamp()); + } + } +}; + GameController::GameController(): search(NULL), renderOptions(NULL), @@ -140,6 +154,24 @@ GameView * GameController::GetView() return gameView; } +void GameController::PlaceStamp(ui::Point position) +{ + if(gameModel->GetStamp()) + { + gameModel->GetSimulation()->Load(position.X, position.Y, gameModel->GetStamp()->data, gameModel->GetStamp()->dataLength); + gameModel->SetPaused(gameModel->GetPaused()); + } +} + +void GameController::PlaceClipboard(ui::Point position) +{ + if(gameModel->GetClipboard()) + { + gameModel->GetSimulation()->Load(position.X, position.Y, gameModel->GetClipboard()->data, gameModel->GetClipboard()->dataLength); + gameModel->SetPaused(gameModel->GetPaused()); + } +} + void GameController::AdjustBrushSize(int direction) { ui::Point newSize = gameModel->GetBrush()->GetRadius() + ui::Point(direction, direction); @@ -395,6 +427,12 @@ void GameController::OpenTags() } } +void GameController::OpenStamps() +{ + stamps = new StampsController(new StampsCallback(this)); + ui::Engine::Ref().ShowWindow(stamps->GetView()); +} + void GameController::OpenDisplayOptions() { //TODO: Implement diff --git a/src/game/GameController.h b/src/game/GameController.h index cf26f51..cefca8e 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -12,6 +12,7 @@ #include "ssave/SSaveController.h" #include "tags/TagsController.h" #include "console/ConsoleController.h" +#include "stamps/StampsController.h" //#include "cat/TPTScriptInterface.h" #include "cat/LuaScriptInterface.h" #include "Menu.h" @@ -34,6 +35,7 @@ private: SSaveController * ssave; ConsoleController * console; TagsController * tagsWindow; + StampsController * stamps; CommandInterface * commandInterface; public: class LoginCallback; @@ -41,6 +43,7 @@ public: class RenderCallback; class SSaveCallback; class TagsCallback; + class StampsCallback; GameController(); ~GameController(); GameView * GetView(); @@ -68,6 +71,9 @@ public: void OpenDisplayOptions(); void OpenRenderOptions(); void OpenSaveWindow(); + void OpenStamps(); + void PlaceStamp(ui::Point position); + void PlaceClipboard(ui::Point position); void ClearSim(); void ReloadSim(); void Vote(int direction); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 0106dd7..2a9b69e 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -18,7 +18,8 @@ GameModel::GameModel(): currentUser(0, ""), currentSave(NULL), colourSelector(false), - clipboardData(NULL) + clipboard(NULL), + stamp(NULL) { sim = new Simulation(); ren = new Renderer(ui::Engine::Ref().g, sim); @@ -158,6 +159,10 @@ GameModel::~GameModel() } delete sim; delete ren; + if(clipboard) + delete clipboard; + if(stamp) + delete stamp; if(activeTools) delete activeTools; } @@ -414,23 +419,42 @@ void GameModel::ClearSimulation() void GameModel::AddStamp(unsigned char * saveData, int saveSize) { - //Do nothing - - //die alone + Save * tempSave = new Save(0, 0, 0, 0, "", ""); + tempSave->SetData(saveData, saveSize); + Client::Ref().AddStamp(tempSave); + delete tempSave; } void GameModel::SetClipboard(unsigned char * saveData, int saveSize) { - if(clipboardData) - free(clipboardData); - clipboardData = saveData; - clipboardSize = saveSize; + if(clipboard) + delete clipboard; + clipboard = new Save(0, 0, 0, 0, "", ""); + clipboard->SetData(saveData, saveSize); + notifyClipboardChanged(); +} + +Save * GameModel::GetClipboard() +{ + return clipboard; } -unsigned char * GameModel::GetClipboard(int & saveSize) +Save * GameModel::GetStamp() { - saveSize = clipboardSize; - return clipboardData; + return stamp; +} + +void GameModel::SetStamp(Save * newStamp) +{ + if(stamp) + delete stamp; + if(newStamp) + { + stamp = new Save(*newStamp); + } + else + stamp = NULL; + notifyStampChanged(); } void GameModel::notifyColourSelectorColourChanged() @@ -537,6 +561,14 @@ void GameModel::notifyZoomChanged() } } +void GameModel::notifyStampChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyStampChanged(this); + } +} + void GameModel::notifyClipboardChanged() { for(int i = 0; i < observers.size(); i++) diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 14e42ac..7b953c9 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -31,8 +31,10 @@ public: class GameModel { private: - int clipboardSize; - unsigned char * clipboardData; + //int clipboardSize; + //unsigned char * clipboardData; + Save * stamp; + Save * clipboard; vector observers; vector toolList; vector menuList; @@ -59,6 +61,7 @@ private: void notifyUserChanged(); void notifyZoomChanged(); void notifyClipboardChanged(); + void notifyStampChanged(); void notifyColourSelectorColourChanged(); void notifyColourSelectorVisibilityChanged(); public: @@ -104,9 +107,11 @@ public: ui::Point GetZoomPosition(); void SetZoomWindowPosition(ui::Point position); ui::Point GetZoomWindowPosition(); + void SetStamp(Save * newStamp); void AddStamp(unsigned char * saveData, int saveSize); void SetClipboard(unsigned char * saveData, int saveSize); - unsigned char * GetClipboard(int & saveSize); + Save * GetClipboard(); + Save * GetStamp(); }; #endif // GAMEMODEL_H diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 7faeaf1..8c1c14a 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -8,6 +8,7 @@ #include "interface/Colour.h" #include "interface/Keys.h" #include "interface/Slider.h" +#include "search/Thumbnail.h" GameView::GameView(): ui::Window(ui::Point(0, 0), ui::Point(XRES+BARSIZE, YRES+MENUSIZE)), @@ -25,7 +26,9 @@ GameView::GameView(): drawModeReset(false), selectMode(SelectNone), selectPoint1(0, 0), - selectPoint2(0, 0) + selectPoint2(0, 0), + stampThumb(NULL), + clipboardThumb(NULL) { int currentX = 1; //Set up UI @@ -467,6 +470,8 @@ void GameView::OnMouseMove(int x, int y, int dx, int dy) { if(selectMode!=SelectNone) { + if(selectMode==PlaceStamp || selectMode==PlaceClipboard) + selectPoint1 = ui::Point(x, y); if(selectPoint1.X!=-1) selectPoint2 = ui::Point(x, y); return; @@ -514,16 +519,46 @@ void GameView::OnMouseUp(int x, int y, unsigned button) { if(selectMode!=SelectNone) { - int x2 = (selectPoint1.X>selectPoint2.X)?selectPoint1.X:selectPoint2.X; - int y2 = (selectPoint1.Y>selectPoint2.Y)?selectPoint1.Y:selectPoint2.Y; - int x1 = (selectPoint2.X0 && y2-y1>0) + if(button==BUTTON_LEFT) { - if(selectMode==SelectCopy) - c->CopyRegion(ui::Point(x1, y1), ui::Point(x2, y2)); - else if(selectMode==SelectStamp) - c->StampRegion(ui::Point(x1, y1), ui::Point(x2, y2)); + if(selectMode==PlaceStamp || selectMode==PlaceClipboard) + { + Thumbnail * tempThumb = selectMode==PlaceStamp?stampThumb:clipboardThumb; + if(tempThumb) + { + int thumbX = selectPoint2.X - (tempThumb->Size.X/2); + int thumbY = selectPoint2.Y - (tempThumb->Size.Y/2); + + if(thumbX<0) + thumbX = 0; + if(thumbX+(tempThumb->Size.X)>=XRES) + thumbX = XRES-tempThumb->Size.X; + + if(thumbY<0) + thumbY = 0; + if(thumbY+(tempThumb->Size.Y)>=YRES) + thumbY = YRES-tempThumb->Size.Y; + + if(selectMode==PlaceStamp) + c->PlaceStamp(ui::Point(thumbX, thumbY)); + if(selectMode==PlaceClipboard) + c->PlaceClipboard(ui::Point(thumbX, thumbY)); + } + } + else + { + int x2 = (selectPoint1.X>selectPoint2.X)?selectPoint1.X:selectPoint2.X; + int y2 = (selectPoint1.Y>selectPoint2.Y)?selectPoint1.Y:selectPoint2.Y; + int x1 = (selectPoint2.X0 && y2-y1>0) + { + if(selectMode==SelectCopy) + c->CopyRegion(ui::Point(x1, y1), ui::Point(x2, y2)); + else if(selectMode==SelectStamp) + c->StampRegion(ui::Point(x1, y1), ui::Point(x2, y2)); + } + } } selectMode = SelectNone; return; @@ -643,6 +678,20 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool selectPoint1 = ui::Point(-1, -1); } break; + case 'v': + if(ctrl && clipboardThumb) + { + selectMode = PlaceClipboard; + selectPoint2 = ui::Point(-1, -1); + selectPoint1 = selectPoint2; + } + break; + case 'l': + selectMode = PlaceStamp; + selectPoint2 = ui::Point(-1, -1); + selectPoint1 = selectPoint2; + c->OpenStamps(); + break; } } @@ -694,7 +743,27 @@ void GameView::NotifyZoomChanged(GameModel * sender) void GameView::NotifyClipboardChanged(GameModel * sender) { - //Could use this to have a mini preview of the clipboard, meh + if(clipboardThumb) + delete clipboardThumb; + if(sender->GetClipboard()) + { + clipboardThumb = new Thumbnail(0, 0, (pixel*)malloc((256*256)*PIXELSIZE), ui::Point(256, 256)); + } + else + clipboardThumb = NULL; +} + + +void GameView::NotifyStampChanged(GameModel * sender) +{ + if(stampThumb) + delete stampThumb; + if(sender->GetStamp()) + { + stampThumb = new Thumbnail(0, 0, (pixel*)malloc((256*256)*PIXELSIZE), ui::Point(256, 256)); + } + else + stampThumb = NULL; } void GameView::changeColour() @@ -730,29 +799,53 @@ void GameView::OnDraw() if(selectMode!=SelectNone) { - if(selectPoint1.X==-1) + if(selectMode==PlaceStamp || selectMode==PlaceClipboard) { - g->fillrect(0, 0, XRES, YRES, 0, 0, 0, 100); + Thumbnail * tempThumb = selectMode==PlaceStamp?stampThumb:clipboardThumb; + if(tempThumb && selectPoint2.X!=-1) + { + int thumbX = selectPoint2.X - (tempThumb->Size.X/2); + int thumbY = selectPoint2.Y - (tempThumb->Size.Y/2); + + if(thumbX<0) + thumbX = 0; + if(thumbX+(tempThumb->Size.X)>=XRES) + thumbX = XRES-tempThumb->Size.X; + + if(thumbY<0) + thumbY = 0; + if(thumbY+(tempThumb->Size.Y)>=YRES) + thumbY = YRES-tempThumb->Size.Y; + + g->draw_image(tempThumb->Data, thumbX, thumbY, tempThumb->Size.X, tempThumb->Size.Y, 128); + } } else { - int x2 = (selectPoint1.X>selectPoint2.X)?selectPoint1.X:selectPoint2.X; - int y2 = (selectPoint1.Y>selectPoint2.Y)?selectPoint1.Y:selectPoint2.Y; - int x1 = (selectPoint2.Xfillrect(0, 0, XRES, YRES, 0, 0, 0, 100); + } + else + { + int x2 = (selectPoint1.X>selectPoint2.X)?selectPoint1.X:selectPoint2.X; + int y2 = (selectPoint1.Y>selectPoint2.Y)?selectPoint1.Y:selectPoint2.Y; + int x1 = (selectPoint2.XXRES-1) - x2 = XRES-1; - if(y2>YRES-1) - y2 = YRES-1; + if(x2>XRES-1) + x2 = XRES-1; + if(y2>YRES-1) + y2 = YRES-1; - g->fillrect(0, 0, XRES, y1, 0, 0, 0, 100); - g->fillrect(0, y2, XRES, YRES-y2, 0, 0, 0, 100); + g->fillrect(0, 0, XRES, y1, 0, 0, 0, 100); + g->fillrect(0, y2, XRES, YRES-y2, 0, 0, 0, 100); - g->fillrect(0, y1-1, x1, (y2-y1)+2, 0, 0, 0, 100); - g->fillrect(x2, y1-1, XRES-x2, (y2-y1)+2, 0, 0, 0, 100); + g->fillrect(0, y1-1, x1, (y2-y1)+2, 0, 0, 0, 100); + g->fillrect(x2, y1-1, XRES-x2, (y2-y1)+2, 0, 0, 0, 100); - g->xor_rect(x1, y1, (x2-x1)+1, (y2-y1)+1); + g->xor_rect(x1, y1, (x2-x1)+1, (y2-y1)+1); + } } } } diff --git a/src/game/GameView.h b/src/game/GameView.h index 0b31182..1be2d96 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -21,7 +21,7 @@ enum DrawMode enum SelectMode { - SelectNone, SelectStamp, SelectCopy + SelectNone, SelectStamp, SelectCopy, PlaceClipboard, PlaceStamp }; class GameController; @@ -67,6 +67,9 @@ private: ui::Point selectPoint1; ui::Point selectPoint2; + Thumbnail * clipboardThumb; + Thumbnail * stampThumb; + void changeColour(); public: GameView(); @@ -84,6 +87,7 @@ public: void NotifyColourSelectorVisibilityChanged(GameModel * sender); void NotifyColourSelectorColourChanged(GameModel * sender); void NotifyClipboardChanged(GameModel * sender); + void NotifyStampChanged(GameModel * sender); virtual void OnMouseMove(int x, int y, int dx, int dy); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index 9ed2e68..775e38b 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -51,28 +51,31 @@ void SaveButton::Tick(float dt) float scaleFactorY = 1.0f, scaleFactorX = 1.0f; if(!thumbnail) { - tempThumb = Client::Ref().GetThumbnail(save->GetID(), 0); - if(tempThumb) + if(save->GetID()) { - thumbnail = new Thumbnail(*tempThumb); //Store a local copy of the thumbnail - if(thumbnail->Data) + tempThumb = Client::Ref().GetThumbnail(save->GetID(), 0); + if(tempThumb) { - if(thumbnail->Size.Y > (Size.Y-25)) + thumbnail = new Thumbnail(*tempThumb); //Store a local copy of the thumbnail + if(thumbnail->Data) { - scaleFactorY = ((float)(Size.Y-25))/((float)thumbnail->Size.Y); - } - if(thumbnail->Size.X > Size.X-3) - { - scaleFactorX = ((float)Size.X-3)/((float)thumbnail->Size.X); - } - if(scaleFactorY < 1.0f || scaleFactorX < 1.0f) - { - float scaleFactor = scaleFactorY < scaleFactorX ? scaleFactorY : scaleFactorX; - pixel * thumbData = thumbnail->Data; - thumbnail->Data = Graphics::resample_img(thumbData, thumbnail->Size.X, thumbnail->Size.Y, thumbnail->Size.X * scaleFactor, thumbnail->Size.Y * scaleFactor); - thumbnail->Size.X *= scaleFactor; - thumbnail->Size.Y *= scaleFactor; - free(thumbData); + if(thumbnail->Size.Y > (Size.Y-25)) + { + scaleFactorY = ((float)(Size.Y-25))/((float)thumbnail->Size.Y); + } + if(thumbnail->Size.X > Size.X-3) + { + scaleFactorX = ((float)Size.X-3)/((float)thumbnail->Size.X); + } + if(scaleFactorY < 1.0f || scaleFactorX < 1.0f) + { + float scaleFactor = scaleFactorY < scaleFactorX ? scaleFactorY : scaleFactorX; + pixel * thumbData = thumbnail->Data; + thumbnail->Data = Graphics::resample_img(thumbData, thumbnail->Size.X, thumbnail->Size.Y, thumbnail->Size.X * scaleFactor, thumbnail->Size.Y * scaleFactor); + thumbnail->Size.X *= scaleFactor; + thumbnail->Size.Y *= scaleFactor; + free(thumbData); + } } } } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index ceaae07..ec17454 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -13,6 +13,11 @@ int Simulation::Load(unsigned char * data, int dataLength) return SaveLoader::LoadSave(data, dataLength, this, true, 0, 0); } +int Simulation::Load(int x, int y, unsigned char * data, int dataLength) +{ + return SaveLoader::LoadSave(data, dataLength, this, false, x, y); +} + unsigned char * Simulation::Save(int & dataLength) { return SaveLoader::BuildSave(dataLength, this, 0, 0, XRES, YRES); diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index b33b349..dd86953 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -207,6 +207,7 @@ public: int sandcolour_b; //TODO: Make a single variable int Load(unsigned char * data, int dataLength); + int Load(int x, int y, unsigned char * data, int dataLength); unsigned char * Save(int & dataLength); unsigned char * Save(int x1, int y1, int x2, int y2, int & dataLength); inline int is_blocking(int t, int x, int y); diff --git a/src/stamps/StampsController.cpp b/src/stamps/StampsController.cpp new file mode 100644 index 0000000..07c1efd --- /dev/null +++ b/src/stamps/StampsController.cpp @@ -0,0 +1,69 @@ +/* + * StampsController.cpp + * + * Created on: Mar 29, 2012 + * Author: Simon + */ + +#include "StampsController.h" +#include "interface/Engine.h" + +#include "StampsModel.h" +#include "StampsView.h" + +StampsController::StampsController(ControllerCallback * callback): + HasDone(false) +{ + stampsModel = new StampsModel(); + stampsView = new StampsView(); + stampsView->AttachController(this); + stampsModel->AddObserver(stampsView); + + this->callback = callback; + + stampsModel->UpdateStampsList(1); +} + +void StampsController::OpenStamp(Save * stamp) +{ + stampsModel->SetStamp(stamp); +} + +Save * StampsController::GetStamp() +{ + return stampsModel->GetStamp(); +} + +void StampsController::NextPage() +{ + if(stampsModel->GetPageNum()>1) + stampsModel->UpdateStampsList(stampsModel->GetPageNum()-1); +} + +void StampsController::PrevPage() +{ + if(stampsModel->GetPageNum() <= stampsModel->GetPageCount()) + stampsModel->UpdateStampsList(stampsModel->GetPageNum()+1); +} + +void StampsController::Update() +{ + if(stampsModel->GetStamp()) + { + Exit(); + } +} + +void StampsController::Exit() +{ + if(ui::Engine::Ref().GetWindow() == stampsView) + ui::Engine::Ref().CloseWindow(); + if(callback) + callback->ControllerExit(); + HasDone = true; +} + +StampsController::~StampsController() { + // TODO Auto-generated destructor stub +} + diff --git a/src/stamps/StampsController.h b/src/stamps/StampsController.h new file mode 100644 index 0000000..6b1c401 --- /dev/null +++ b/src/stamps/StampsController.h @@ -0,0 +1,35 @@ +/* + * StampsController.h + * + * Created on: Mar 29, 2012 + * Author: Simon + */ + +#ifndef STAMPSCONTROLLER_H_ +#define STAMPSCONTROLLER_H_ + +#include "Controller.h" +#include "StampsView.h" +#include "search/Save.h" + +class StampsView; +class StampsModel; +class StampsController { + ControllerCallback * callback; + StampsView * stampsView; + StampsModel * stampsModel; +public: + bool HasDone; + StampsController(ControllerCallback * callback); + StampsView * GetView() {return stampsView;} + Save * GetStamp(); + void OpenStamp(Save * stamp); + void SetStamp(); + void NextPage(); + void PrevPage(); + void Update(); + void Exit(); + virtual ~StampsController(); +}; + +#endif /* STAMPSCONTROLLER_H_ */ diff --git a/src/stamps/StampsModel.cpp b/src/stamps/StampsModel.cpp new file mode 100644 index 0000000..f76d4f1 --- /dev/null +++ b/src/stamps/StampsModel.cpp @@ -0,0 +1,84 @@ +/* + * StampsModel.cpp + * + * Created on: Mar 29, 2012 + * Author: Simon + */ + +#include "StampsModel.h" +#include "StampsView.h" +#include "client/Client.h" +#include "StampsModelException.h" + +StampsModel::StampsModel(): + stamp(NULL) +{ + // TODO Auto-generated constructor stub + stampIDs = Client::Ref().GetStamps(); +} + + +std::vector StampsModel::GetStampsList() +{ + return stampsList; +} + +void StampsModel::AddObserver(StampsView * observer) +{ + observers.push_back(observer); + observer->NotifyStampsListChanged(this); +} + +void StampsModel::notifyStampsListChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyStampsListChanged(this); + } +} + +void StampsModel::notifyPageChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyPageChanged(this); + } +} + +Save * StampsModel::GetStamp() +{ + return stamp; +} + +void StampsModel::SetStamp(Save * newStamp) +{ + if(stamp) + delete stamp; + stamp = new Save(*newStamp); +} + +void StampsModel::UpdateStampsList(int pageNumber) +{ + std::vector tempStampsList = stampsList; + stampsList.clear(); + /*notifyStampsListChanged(); + for(int i = 0; i < tempStampsList.size(); i++) + { + delete tempStampsList[i]; + }*/ + + int stampsEnd = pageNumber*20; + + for(int i = stampsEnd-20; i +#include +#include "search/Save.h" + +class StampsView; +class StampsModel { + Save * stamp; + std::vector stampIDs; + std::vector stampsList; + std::vector observers; + int currentPage; + void notifyStampsListChanged(); + void notifyPageChanged(); +public: + StampsModel(); + int GetPageCount() { return max(1, (int)(ceil(stampIDs.size()/16))); } + int GetPageNum() { return currentPage; } + void AddObserver(StampsView * observer); + std::vector GetStampsList(); + void UpdateStampsList(int pageNumber); + Save * GetStamp(); + void SetStamp(Save * newStamp); + virtual ~StampsModel(); +}; + +#endif /* STAMPSMODEL_H_ */ diff --git a/src/stamps/StampsModelException.h b/src/stamps/StampsModelException.h new file mode 100644 index 0000000..7310aa0 --- /dev/null +++ b/src/stamps/StampsModelException.h @@ -0,0 +1,23 @@ +/* + * StampsModelException.h + * + * Created on: Mar 29, 2012 + * Author: Simon + */ + +#ifndef STAMPSMODELEXCEPTION_H_ +#define STAMPSMODELEXCEPTION_H_ + +#include +#include +using namespace std; + +class StampsModelException { + string message; +public: + StampsModelException(string message_): message(message_) {}; + const char * what() const throw() { return message.c_str(); }; + ~StampsModelException() throw() {}; +}; + +#endif /* STAMPSMODELEXCEPTION_H_ */ diff --git a/src/stamps/StampsView.cpp b/src/stamps/StampsView.cpp new file mode 100644 index 0000000..ddb3fb4 --- /dev/null +++ b/src/stamps/StampsView.cpp @@ -0,0 +1,140 @@ +/* + * StampsView.cpp + * + * Created on: Mar 29, 2012 + * Author: Simon + */ + +#include +#include "client/Client.h" +#include "StampsView.h" + +#include "interface/SaveButton.h" +#include "dialogues/ErrorMessage.h" +#include "StampsController.h" +#include "StampsModel.h" +#include "StampsModelException.h" + +StampsView::StampsView(): + ui::Window(ui::Point(0, 0), ui::Point(XRES+BARSIZE, YRES+MENUSIZE)) +{ + nextButton = new ui::Button(ui::Point(XRES+BARSIZE-52, YRES+MENUSIZE-18), ui::Point(50, 16), "Next \x95"); + previousButton = new ui::Button(ui::Point(1, YRES+MENUSIZE-18), ui::Point(50, 16), "\x96 Prev"); + infoLabel = new ui::Label(ui::Point(51, YRES+MENUSIZE-18), ui::Point(XRES+BARSIZE-102, 16), "Loading..."); + AddComponent(infoLabel); + AddComponent(nextButton); + AddComponent(previousButton); + + class NextPageAction : public ui::ButtonAction + { + StampsView * v; + public: + NextPageAction(StampsView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->NextPage(); + } + }; + nextButton->SetActionCallback(new NextPageAction(this)); + nextButton->SetAlignment(AlignRight, AlignBottom); + + class PrevPageAction : public ui::ButtonAction + { + StampsView * v; + public: + PrevPageAction(StampsView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->PrevPage(); + } + }; + previousButton->SetActionCallback(new PrevPageAction(this)); + previousButton->SetAlignment(AlignLeft, AlignBottom); +} + +void StampsView::OnTick(float dt) +{ + c->Update(); +} + +void StampsView::NotifyPageChanged(StampsModel * sender) +{ + std::stringstream pageInfo; + pageInfo << "Page " << sender->GetPageNum() << " of " << sender->GetPageCount(); + infoLabel->SetText(pageInfo.str()); + if(sender->GetPageNum() == 1) + { + previousButton->Visible = false; + } + else + { + previousButton->Visible = true; + } + if(sender->GetPageNum() == sender->GetPageCount()) + { + nextButton->Visible = false; + } + else + { + nextButton->Visible = true; + } +} + +void StampsView::NotifyStampsListChanged(StampsModel * sender) +{ + int i = 0; + int buttonWidth, buttonHeight, saveX = 0, saveY = 0, savesX = 5, savesY = 4, buttonPadding = 2; + int buttonAreaWidth, buttonAreaHeight, buttonXOffset, buttonYOffset; + + vector saves = sender->GetStampsList(); + Client::Ref().ClearThumbnailRequests(); + for(i = 0; i < stampButtons.size(); i++) + { + RemoveComponent(stampButtons[i]); + delete stampButtons[i]; + } + + buttonXOffset = 0; + buttonYOffset = 50; + buttonAreaWidth = Size.X; + buttonAreaHeight = Size.Y - buttonYOffset - 18; + buttonWidth = (buttonAreaWidth/savesX) - buttonPadding*2; + buttonHeight = (buttonAreaHeight/savesY) - buttonPadding*2; + class SaveOpenAction: public ui::SaveButtonAction + { + StampsView * v; + public: + SaveOpenAction(StampsView * _v) { v = _v; } + virtual void ActionCallback(ui::SaveButton * sender) + { + v->c->OpenStamp(sender->GetSave()); + } + }; + for(i = 0; i < saves.size(); i++) + { + if(saveX == savesX) + { + if(saveY == savesY-1) + break; + saveX = 0; + saveY++; + } + ui::SaveButton * saveButton; + saveButton = new ui::SaveButton( + ui::Point( + buttonXOffset + buttonPadding + saveX*(buttonWidth+buttonPadding*2), + buttonYOffset + buttonPadding + saveY*(buttonHeight+buttonPadding*2) + ), + ui::Point(buttonWidth, buttonHeight), + saves[i]); + saveButton->SetActionCallback(new SaveOpenAction(this)); + stampButtons.push_back(saveButton); + AddComponent(saveButton); + saveX++; + } +} + +StampsView::~StampsView() { + // TODO Auto-generated destructor stub +} + diff --git a/src/stamps/StampsView.h b/src/stamps/StampsView.h new file mode 100644 index 0000000..a906cdc --- /dev/null +++ b/src/stamps/StampsView.h @@ -0,0 +1,35 @@ +/* + * StampsView.h + * + * Created on: Mar 29, 2012 + * Author: Simon + */ + +#ifndef STAMPSVIEW_H_ +#define STAMPSVIEW_H_ + +#include +#include "interface/Window.h" +#include "interface/Button.h" +#include "interface/Textbox.h" +#include "interface/Label.h" + +class StampsController; +class StampsModel; +class StampsView: public ui::Window { + StampsController * c; + std::vector stampButtons; + ui::Button * previousButton; + ui::Button * nextButton; + ui::Label * infoLabel; +public: + StampsView(); + //virtual void OnDraw(); + virtual void OnTick(float dt); + void AttachController(StampsController * c_) { c = c_; }; + void NotifyPageChanged(StampsModel * sender); + void NotifyStampsListChanged(StampsModel * sender); + virtual ~StampsView(); +}; + +#endif /* STAMPSVIEW_H_ */ -- cgit v0.9.2-21-gd62e From 73c5082cbcdd3a986765723bd4182e45386ce766 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 3 Apr 2012 14:07:39 +0100 Subject: Super, megaheavyweight thumbnail renderer diff --git a/src/Graphics.cpp b/src/Graphics.cpp index 9d9c36b..ad3696d 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -2388,25 +2388,29 @@ void Graphics::AttachSDLSurface(SDL_Surface * surface) void Graphics::Blit() { - pixel * dst; - pixel * src = vid; - int j, x = 0, y = 0, w = XRES+BARSIZE, h = YRES+MENUSIZE, pitch = XRES+BARSIZE; - if (SDL_MUSTLOCK(sdl_scrn)) - if (SDL_LockSurface(sdl_scrn)<0) - return; - dst=(pixel *)sdl_scrn->pixels+y*sdl_scrn->pitch/PIXELSIZE+x; - for (j=0; jpitch/PIXELSIZE; - src+=pitch; + pixel * dst; + pixel * src = vid; + int j, x = 0, y = 0, w = XRES+BARSIZE, h = YRES+MENUSIZE, pitch = XRES+BARSIZE; + if (SDL_MUSTLOCK(sdl_scrn)) + if (SDL_LockSurface(sdl_scrn)<0) + return; + dst=(pixel *)sdl_scrn->pixels+y*sdl_scrn->pitch/PIXELSIZE+x; + for (j=0; jpitch/PIXELSIZE; + src+=pitch; + } + if (SDL_MUSTLOCK(sdl_scrn)) + SDL_UnlockSurface(sdl_scrn); + SDL_UpdateRect(sdl_scrn,0,0,0,0); } - if (SDL_MUSTLOCK(sdl_scrn)) - SDL_UnlockSurface(sdl_scrn); - SDL_UpdateRect(sdl_scrn,0,0,0,0); } -Graphics::Graphics() +Graphics::Graphics(): + sdl_scrn(NULL) { vid = (pixel *)malloc(PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE))); } diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 8c1c14a..532bcea 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -747,7 +747,7 @@ void GameView::NotifyClipboardChanged(GameModel * sender) delete clipboardThumb; if(sender->GetClipboard()) { - clipboardThumb = new Thumbnail(0, 0, (pixel*)malloc((256*256)*PIXELSIZE), ui::Point(256, 256)); + clipboardThumb = new Thumbnail(sender->GetClipboard());//new Thumbnail(0, 0, (pixel*)malloc((256*256)*PIXELSIZE), ui::Point(256, 256)); } else clipboardThumb = NULL; @@ -760,7 +760,7 @@ void GameView::NotifyStampChanged(GameModel * sender) delete stampThumb; if(sender->GetStamp()) { - stampThumb = new Thumbnail(0, 0, (pixel*)malloc((256*256)*PIXELSIZE), ui::Point(256, 256)); + stampThumb = new Thumbnail(sender->GetStamp());//new Thumbnail(0, 0, (pixel*)malloc((256*256)*PIXELSIZE), ui::Point(256, 256)); } else stampThumb = NULL; diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index 775e38b..6b0e9cf 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -57,26 +57,30 @@ void SaveButton::Tick(float dt) if(tempThumb) { thumbnail = new Thumbnail(*tempThumb); //Store a local copy of the thumbnail - if(thumbnail->Data) - { - if(thumbnail->Size.Y > (Size.Y-25)) - { - scaleFactorY = ((float)(Size.Y-25))/((float)thumbnail->Size.Y); - } - if(thumbnail->Size.X > Size.X-3) - { - scaleFactorX = ((float)Size.X-3)/((float)thumbnail->Size.X); - } - if(scaleFactorY < 1.0f || scaleFactorX < 1.0f) - { - float scaleFactor = scaleFactorY < scaleFactorX ? scaleFactorY : scaleFactorX; - pixel * thumbData = thumbnail->Data; - thumbnail->Data = Graphics::resample_img(thumbData, thumbnail->Size.X, thumbnail->Size.Y, thumbnail->Size.X * scaleFactor, thumbnail->Size.Y * scaleFactor); - thumbnail->Size.X *= scaleFactor; - thumbnail->Size.Y *= scaleFactor; - free(thumbData); - } - } + } + } + else + { + thumbnail = new Thumbnail(save); + } + if(thumbnail && thumbnail->Data) + { + if(thumbnail->Size.Y > (Size.Y-25)) + { + scaleFactorY = ((float)(Size.Y-25))/((float)thumbnail->Size.Y); + } + if(thumbnail->Size.X > Size.X-3) + { + scaleFactorX = ((float)Size.X-3)/((float)thumbnail->Size.X); + } + if(scaleFactorY < 1.0f || scaleFactorX < 1.0f) + { + float scaleFactor = scaleFactorY < scaleFactorX ? scaleFactorY : scaleFactorX; + pixel * thumbData = thumbnail->Data; + thumbnail->Data = Graphics::resample_img(thumbData, thumbnail->Size.X, thumbnail->Size.Y, thumbnail->Size.X * scaleFactor, thumbnail->Size.Y * scaleFactor); + thumbnail->Size.X *= scaleFactor; + thumbnail->Size.Y *= scaleFactor; + free(thumbData); } } } diff --git a/src/search/Thumbnail.cpp b/src/search/Thumbnail.cpp new file mode 100644 index 0000000..2fcd34a --- /dev/null +++ b/src/search/Thumbnail.cpp @@ -0,0 +1,81 @@ +/* + * Thumbnail.cpp + * + * Created on: Apr 3, 2012 + * Author: Simon + */ + +#include "Thumbnail.h" +#include "simulation/Simulation.h" +#include "simulation/SaveLoader.h" +#include "Renderer.h" + +Thumbnail::Thumbnail(const Thumbnail & thumb): + ID(thumb.ID), + Datestamp(thumb.Datestamp), + Data(thumb.Data), + Size(thumb.Size) +{ + //Ensure the actual thumbnail data is copied + if(thumb.Data) + { + Data = (pixel *)malloc((thumb.Size.X*thumb.Size.Y) * PIXELSIZE); + memcpy(Data, thumb.Data, (thumb.Size.X*thumb.Size.Y) * PIXELSIZE); + } + else + { + Data = NULL; + } +} + +Thumbnail::Thumbnail(int _id, int _datestamp, pixel * _data, ui::Point _size): + ID(_id), + Datestamp(_datestamp), + Data(_data), + Size(_size) +{ +} + +Thumbnail::Thumbnail(Save * save): + ID(0), + Datestamp(0), + Data(NULL), + Size(XRES+BARSIZE, YRES+MENUSIZE) +{ + Graphics * g = new Graphics(); + Simulation * sim = new Simulation(); + Renderer * ren = new Renderer(g, sim); + sim->Load(save->GetData(), save->GetDataLength()); + ren->render_parts(); + + int width, height; + + pixel * dst; + pixel * src = g->vid; + + if(SaveLoader::Info(save->GetData(), save->GetDataLength(), width, height)) + goto fail; + + dst = Data = (pixel *)malloc(PIXELSIZE * ((width*CELL)*(height*CELL))); + + for(int i = 0; i < height*CELL; i++) + { + memcpy(dst, src, (width*CELL)*PIXELSIZE); + dst+=(width*CELL);///PIXELSIZE; + src+=XRES+BARSIZE; + } + + Size = ui::Point(width*CELL, height*CELL); +fail: + delete ren; + delete sim; + delete g; +} + +Thumbnail::~Thumbnail() +{ + if(Data) + { + free(Data); + } +} diff --git a/src/search/Thumbnail.h b/src/search/Thumbnail.h index 6311a23..3ed9dd2 100644 --- a/src/search/Thumbnail.h +++ b/src/search/Thumbnail.h @@ -4,43 +4,18 @@ #include #include "Graphics.h" #include "interface/Point.h" +#include "Save.h" class Thumbnail { public: - Thumbnail(const Thumbnail & thumb): - ID(thumb.ID), - Datestamp(thumb.Datestamp), - Data(thumb.Data), - Size(thumb.Size) - { - //Ensure the actual thumbnail data is copied - if(thumb.Data) - { - Data = (pixel *)malloc((thumb.Size.X*thumb.Size.Y) * PIXELSIZE); - memcpy(Data, thumb.Data, (thumb.Size.X*thumb.Size.Y) * PIXELSIZE); - } - else - { - Data = NULL; - } - } + Thumbnail(const Thumbnail & thumb); - Thumbnail(int _id, int _datestamp, pixel * _data, ui::Point _size): - ID(_id), - Datestamp(_datestamp), - Data(_data), - Size(_size) - { - } + Thumbnail(int _id, int _datestamp, pixel * _data, ui::Point _size); - ~Thumbnail() - { - if(Data) - { - free(Data); - } - } + Thumbnail(Save * save); + + ~Thumbnail(); int ID, Datestamp; ui::Point Size; diff --git a/src/simulation/SaveLoader.cpp b/src/simulation/SaveLoader.cpp index 97ab45e..2683a6f 100644 --- a/src/simulation/SaveLoader.cpp +++ b/src/simulation/SaveLoader.cpp @@ -10,7 +10,7 @@ //!TODO: enum for LoadSave return -int SaveLoader::LoadSave(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x, int y) +int SaveLoader::Info(unsigned char * data, int dataLength, int & width, int & height) { unsigned char * saveData = data; if (dataLength<16) @@ -19,34 +19,65 @@ int SaveLoader::LoadSave(unsigned char * data, int dataLength, Simulation * sim, } if(saveData[0] == 'O' && saveData[1] == 'P' && saveData[2] == 'S') { - return OPSLoadSave(data, dataLength, sim); + return OPSInfo(data, dataLength, width, height); } else if((saveData[0]==0x66 && saveData[1]==0x75 && saveData[2]==0x43) || (saveData[0]==0x50 && saveData[1]==0x53 && saveData[2]==0x76)) { - return PSVLoadSave(data, dataLength, sim, replace, x, y); + return PSVInfo(data, dataLength, width, height); } return 1; } -unsigned char * SaveLoader::BuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h) +int SaveLoader::Load(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x, int y) { - unsigned char * temp = OPSBuildSave(dataLength, sim, orig_x0, orig_y0, orig_w, orig_h); + unsigned char * saveData = data; + if (dataLength<16) + { + return 1; + } + if(saveData[0] == 'O' && saveData[1] == 'P' && saveData[2] == 'S') + { + return OPSLoad(data, dataLength, sim); + } + else if((saveData[0]==0x66 && saveData[1]==0x75 && saveData[2]==0x43) || (saveData[0]==0x50 && saveData[1]==0x53 && saveData[2]==0x76)) + { + return PSVLoad(data, dataLength, sim, replace, x, y); + } + return 1; +} + +unsigned char * SaveLoader::Build(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h) +{ + unsigned char * temp = OPSBuild(dataLength, sim, orig_x0, orig_y0, orig_w, orig_h); if(!temp) - temp = PSVBuildSave(dataLength, sim, orig_x0, orig_y0, orig_w, orig_h); + temp = PSVBuild(dataLength, sim, orig_x0, orig_y0, orig_w, orig_h); return temp; } -int SaveLoader::OPSLoadSave(unsigned char * data, int dataLength, Simulation * sim) +int SaveLoader::OPSInfo(unsigned char * data, int dataLength, int & width, int & height) +{ + return 2; +} + + +int SaveLoader::OPSLoad(unsigned char * data, int dataLength, Simulation * sim) +{ + return 2; +} + +unsigned char * SaveLoader::OPSBuild(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h) { return 0; } -unsigned char * SaveLoader::OPSBuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h) +int SaveLoader::PSVInfo(unsigned char * data, int dataLength, int & width, int & height) { + width = data[6]; + height = data[7]; return 0; } -int SaveLoader::PSVLoadSave(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x0, int y0) +int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x0, int y0) { unsigned char * d = NULL, * c = data; int q,i,j,k,x,y,p=0,*m=NULL, ver, pty, ty, legacy_beta=0, tempGrav = 0; @@ -640,7 +671,7 @@ corrupt: return 1; } -unsigned char * SaveLoader::PSVBuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h) +unsigned char * SaveLoader::PSVBuild(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h) { unsigned char *d = (unsigned char*)calloc(1,3*(XRES/CELL)*(YRES/CELL)+(XRES*YRES)*15+MAXSIGNS*262), *c; int i,j,x,y,p=0,*m=(int*)calloc(XRES*YRES, sizeof(int)); diff --git a/src/simulation/SaveLoader.h b/src/simulation/SaveLoader.h index 1fb2143..2e92817 100644 --- a/src/simulation/SaveLoader.h +++ b/src/simulation/SaveLoader.h @@ -12,12 +12,16 @@ class SaveLoader { public: - static int LoadSave(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x, int y); - static unsigned char * BuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h); - static int OPSLoadSave(unsigned char * data, int dataLength, Simulation * sim); - static unsigned char * OPSBuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h); - static int PSVLoadSave(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x, int y); - static unsigned char * PSVBuildSave(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h); + static int Info(unsigned char * data, int dataLength, int & width, int & height); + static int Load(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x, int y); + static unsigned char * Build(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h); +private: + static int OPSInfo(unsigned char * data, int dataLength, int & width, int & height); + static int OPSLoad(unsigned char * data, int dataLength, Simulation * sim); + static unsigned char * OPSBuild(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h); + static int PSVInfo(unsigned char * data, int dataLength, int & width, int & height); + static int PSVLoad(unsigned char * data, int dataLength, Simulation * sim, bool replace, int x, int y); + static unsigned char * PSVBuild(int & dataLength, Simulation * sim, int orig_x0, int orig_y0, int orig_w, int orig_h); }; #endif /* SAVELOADER_H_ */ diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index ec17454..7b1dca8 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -10,22 +10,22 @@ int Simulation::Load(unsigned char * data, int dataLength) { - return SaveLoader::LoadSave(data, dataLength, this, true, 0, 0); + return SaveLoader::Load(data, dataLength, this, true, 0, 0); } int Simulation::Load(int x, int y, unsigned char * data, int dataLength) { - return SaveLoader::LoadSave(data, dataLength, this, false, x, y); + return SaveLoader::Load(data, dataLength, this, false, x, y); } unsigned char * Simulation::Save(int & dataLength) { - return SaveLoader::BuildSave(dataLength, this, 0, 0, XRES, YRES); + return SaveLoader::Build(dataLength, this, 0, 0, XRES, YRES); } unsigned char * Simulation::Save(int x1, int y1, int x2, int y2, int & dataLength) { - return SaveLoader::BuildSave(dataLength, this, x1, y1, x2-x1, y2-y1); + return SaveLoader::Build(dataLength, this, x1, y1, x2-x1, y2-y1); } void Simulation::clear_area(int area_x, int area_y, int area_w, int area_h) diff --git a/src/stamps/StampsModel.cpp b/src/stamps/StampsModel.cpp index f76d4f1..b679d13 100644 --- a/src/stamps/StampsModel.cpp +++ b/src/stamps/StampsModel.cpp @@ -11,7 +11,8 @@ #include "StampsModelException.h" StampsModel::StampsModel(): - stamp(NULL) + stamp(NULL), + currentPage(1) { // TODO Auto-generated constructor stub stampIDs = Client::Ref().GetStamps(); @@ -27,6 +28,7 @@ void StampsModel::AddObserver(StampsView * observer) { observers.push_back(observer); observer->NotifyStampsListChanged(this); + observer->NotifyPageChanged(this); } void StampsModel::notifyStampsListChanged() @@ -61,6 +63,8 @@ void StampsModel::UpdateStampsList(int pageNumber) { std::vector tempStampsList = stampsList; stampsList.clear(); + currentPage = pageNumber; + notifyPageChanged(); /*notifyStampsListChanged(); for(int i = 0; i < tempStampsList.size(); i++) { diff --git a/src/stamps/StampsView.cpp b/src/stamps/StampsView.cpp index ddb3fb4..bddfb4f 100644 --- a/src/stamps/StampsView.cpp +++ b/src/stamps/StampsView.cpp @@ -87,13 +87,12 @@ void StampsView::NotifyStampsListChanged(StampsModel * sender) int buttonAreaWidth, buttonAreaHeight, buttonXOffset, buttonYOffset; vector saves = sender->GetStampsList(); - Client::Ref().ClearThumbnailRequests(); for(i = 0; i < stampButtons.size(); i++) { RemoveComponent(stampButtons[i]); delete stampButtons[i]; } - + stampButtons.clear(); buttonXOffset = 0; buttonYOffset = 50; buttonAreaWidth = Size.X; -- cgit v0.9.2-21-gd62e From 838a612026c821c03e663c818d4bc9fe740febd8 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 3 Apr 2012 17:08:56 +0100 Subject: Use a single instance of a background simulation for thumbnail rendering diff --git a/src/client/Client.cpp b/src/client/Client.cpp index b472518..4b7ef95 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -530,10 +530,13 @@ Thumbnail * Client::GetPreview(int saveID, int saveDate) if(thumbData) { return new Thumbnail(saveID, saveDate, thumbData, ui::Point(imgw, imgh)); + free(thumbData); } else { - return new Thumbnail(saveID, saveDate, (pixel *)malloc((128*128) * PIXELSIZE), ui::Point(128, 128)); + thumbData = (pixel *)malloc((128*128) * PIXELSIZE); + return new Thumbnail(saveID, saveDate, thumbData, ui::Point(128, 128)); + free(thumbData); } } else @@ -747,10 +750,13 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) if(thumbData) { thumbnailCache[thumbnailCacheNextID] = new Thumbnail(saveID, saveDate, thumbData, ui::Point(imgw, imgh)); + free(thumbData); } else { - thumbnailCache[thumbnailCacheNextID] = new Thumbnail(saveID, saveDate, (pixel *)malloc((128*128) * PIXELSIZE), ui::Point(128, 128)); + thumbData = (pixel *)malloc((128*128) * PIXELSIZE); + thumbnailCache[thumbnailCacheNextID] = new Thumbnail(saveID, saveDate, thumbData, ui::Point(128, 128)); + free(thumbData); } return thumbnailCache[thumbnailCacheNextID++]; } @@ -765,7 +771,9 @@ Thumbnail * Client::GetThumbnail(int saveID, int saveDate) { delete thumbnailCache[thumbnailCacheNextID]; } - thumbnailCache[thumbnailCacheNextID] = new Thumbnail(saveID, saveDate, (pixel *)malloc((128*128) * PIXELSIZE), ui::Point(128, 128)); + thumbData = (pixel *)malloc((128*128) * PIXELSIZE); + thumbnailCache[thumbnailCacheNextID] = new Thumbnail(saveID, saveDate, thumbData, ui::Point(128, 128)); + free(thumbData); return thumbnailCache[thumbnailCacheNextID++]; } } diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 532bcea..c7dc063 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -9,6 +9,7 @@ #include "interface/Keys.h" #include "interface/Slider.h" #include "search/Thumbnail.h" +#include "simulation/SaveRenderer.h" GameView::GameView(): ui::Window(ui::Point(0, 0), ui::Point(XRES+BARSIZE, YRES+MENUSIZE)), @@ -747,7 +748,7 @@ void GameView::NotifyClipboardChanged(GameModel * sender) delete clipboardThumb; if(sender->GetClipboard()) { - clipboardThumb = new Thumbnail(sender->GetClipboard());//new Thumbnail(0, 0, (pixel*)malloc((256*256)*PIXELSIZE), ui::Point(256, 256)); + clipboardThumb = SaveRenderer::Ref().Render(sender->GetClipboard()->GetData(), sender->GetClipboard()->GetDataLength()); } else clipboardThumb = NULL; @@ -760,7 +761,7 @@ void GameView::NotifyStampChanged(GameModel * sender) delete stampThumb; if(sender->GetStamp()) { - stampThumb = new Thumbnail(sender->GetStamp());//new Thumbnail(0, 0, (pixel*)malloc((256*256)*PIXELSIZE), ui::Point(256, 256)); + stampThumb = SaveRenderer::Ref().Render(sender->GetStamp()->GetData(), sender->GetStamp()->GetDataLength()); } else stampThumb = NULL; diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index 6b0e9cf..d044ef6 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -6,6 +6,7 @@ #include "Global.h" #include "Engine.h" #include "client/Client.h" +#include "simulation/SaveRenderer.h" namespace ui { @@ -61,7 +62,7 @@ void SaveButton::Tick(float dt) } else { - thumbnail = new Thumbnail(save); + thumbnail = SaveRenderer::Ref().Render(save->GetData(), save->GetDataLength()); } if(thumbnail && thumbnail->Data) { diff --git a/src/search/Thumbnail.cpp b/src/search/Thumbnail.cpp index 2fcd34a..6a97a08 100644 --- a/src/search/Thumbnail.cpp +++ b/src/search/Thumbnail.cpp @@ -6,9 +6,6 @@ */ #include "Thumbnail.h" -#include "simulation/Simulation.h" -#include "simulation/SaveLoader.h" -#include "Renderer.h" Thumbnail::Thumbnail(const Thumbnail & thumb): ID(thumb.ID), @@ -34,42 +31,15 @@ Thumbnail::Thumbnail(int _id, int _datestamp, pixel * _data, ui::Point _size): Data(_data), Size(_size) { -} - -Thumbnail::Thumbnail(Save * save): - ID(0), - Datestamp(0), - Data(NULL), - Size(XRES+BARSIZE, YRES+MENUSIZE) -{ - Graphics * g = new Graphics(); - Simulation * sim = new Simulation(); - Renderer * ren = new Renderer(g, sim); - sim->Load(save->GetData(), save->GetDataLength()); - ren->render_parts(); - - int width, height; - - pixel * dst; - pixel * src = g->vid; - - if(SaveLoader::Info(save->GetData(), save->GetDataLength(), width, height)) - goto fail; - - dst = Data = (pixel *)malloc(PIXELSIZE * ((width*CELL)*(height*CELL))); - - for(int i = 0; i < height*CELL; i++) + if(_data) { - memcpy(dst, src, (width*CELL)*PIXELSIZE); - dst+=(width*CELL);///PIXELSIZE; - src+=XRES+BARSIZE; + Data = (pixel *)malloc((_size.X*_size.Y) * PIXELSIZE); + memcpy(Data, _data, (_size.X*_size.Y) * PIXELSIZE); + } + else + { + Data = NULL; } - - Size = ui::Point(width*CELL, height*CELL); -fail: - delete ren; - delete sim; - delete g; } Thumbnail::~Thumbnail() diff --git a/src/search/Thumbnail.h b/src/search/Thumbnail.h index 3ed9dd2..25c0985 100644 --- a/src/search/Thumbnail.h +++ b/src/search/Thumbnail.h @@ -4,7 +4,6 @@ #include #include "Graphics.h" #include "interface/Point.h" -#include "Save.h" class Thumbnail { @@ -13,8 +12,6 @@ public: Thumbnail(int _id, int _datestamp, pixel * _data, ui::Point _size); - Thumbnail(Save * save); - ~Thumbnail(); int ID, Datestamp; diff --git a/src/simulation/SaveRenderer.cpp b/src/simulation/SaveRenderer.cpp new file mode 100644 index 0000000..7a5f5c2 --- /dev/null +++ b/src/simulation/SaveRenderer.cpp @@ -0,0 +1,59 @@ +/* + * SaveRenderer.cpp + * + * Created on: Apr 3, 2012 + * Author: Simon + */ + +#include "SaveRenderer.h" +#include "Graphics.h" +#include "Simulation.h" +#include "Renderer.h" +#include "SaveLoader.h" + + +SaveRenderer::SaveRenderer(){ + g = new Graphics(); + sim = new Simulation(); + ren = new Renderer(g, sim); +} + +Thumbnail * SaveRenderer::Render(unsigned char * data, int dataLength) +{ + Thumbnail * tempThumb = NULL; + int width, height; + pixel * pData = NULL; + pixel * dst; + pixel * src = g->vid; + + g->Clear(); + sim->clear_sim(); + if(sim->Load(data, dataLength)) + goto finish; + + if(SaveLoader::Info(data, dataLength, width, height)) + goto finish; + + ren->render_parts(); + + dst = pData = (pixel *)malloc(PIXELSIZE * ((width*CELL)*(height*CELL))); + + for(int i = 0; i < height*CELL; i++) + { + memcpy(dst, src, (width*CELL)*PIXELSIZE); + dst+=(width*CELL);///PIXELSIZE; + src+=XRES+BARSIZE; + } + + tempThumb = new Thumbnail(0, 0, pData, ui::Point(width*CELL, height*CELL)); + +finish: + if(pData) + free(pData); + return tempThumb; +} + +SaveRenderer::~SaveRenderer() { + // TODO Auto-generated destructor stub +} + diff --git a/src/simulation/SaveRenderer.h b/src/simulation/SaveRenderer.h new file mode 100644 index 0000000..a43f100 --- /dev/null +++ b/src/simulation/SaveRenderer.h @@ -0,0 +1,27 @@ +/* + * SaveRenderer.h + * + * Created on: Apr 3, 2012 + * Author: Simon + */ + +#ifndef SAVERENDERER_H_ +#define SAVERENDERER_H_ + +#include "Singleton.h" +#include "search/Thumbnail.h" + +class Graphics; +class Simulation; +class Renderer; +class SaveRenderer: public Singleton { + Graphics * g; + Simulation * sim; + Renderer * ren; +public: + SaveRenderer(); + Thumbnail * Render(unsigned char * data, int dataLength); + virtual ~SaveRenderer(); +}; + +#endif /* SAVERENDERER_H_ */ -- cgit v0.9.2-21-gd62e From 299c1da9ae6b79ddb6cc39477ad31fb1d2a3c566 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 3 Apr 2012 18:12:32 +0100 Subject: Search and stamps scolling with mouse wheel, Esc to exit diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 3408ec5..7b7ba20 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -97,6 +97,8 @@ public: { cc->gameModel->SetStamp(cc->stamps->GetStamp()); } + else + cc->gameModel->SetStamp(NULL); } }; diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index c7dc063..4067d5a 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -717,6 +717,10 @@ void GameView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bo void GameView::OnTick(float dt) { + if(selectMode==PlaceStamp && !stampThumb) + selectMode = SelectNone; + if(selectMode==PlaceClipboard&& !clipboardThumb) + selectMode = SelectNone; if(zoomEnabled && !zoomCursorFixed) c->SetZoomPosition(currentMouse); if(drawMode == DrawPoints) diff --git a/src/interface/Keys.h b/src/interface/Keys.h index 5350b06..71c5928 100644 --- a/src/interface/Keys.h +++ b/src/interface/Keys.h @@ -9,6 +9,7 @@ #define KEY_TAB SDLK_TAB #define KEY_RETURN SDLK_RETURN #define KEY_ENTER SDLK_KP_ENTER +#define KEY_ESCAPE SDLK_ESCAPE #define KEY_CTRL SDLK_LCTRL #define KEY_ALT SDLK_LALT diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 5bcbe06..4b9b6b2 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -241,3 +241,19 @@ void SearchView::OnTick(float dt) { c->Update(); } + +void SearchView::OnMouseWheel(int x, int y, int d) +{ + if(!d) + return; + if(d<0) + c->NextPage(); + else + c->PrevPage(); +} +void SearchView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + if(key==KEY_ESCAPE) + c->Exit(); +} + diff --git a/src/search/SearchView.h b/src/search/SearchView.h index 0103419..af43a8c 100644 --- a/src/search/SearchView.h +++ b/src/search/SearchView.h @@ -37,6 +37,9 @@ public: virtual ~SearchView(); void AttachController(SearchController * _c) { c = _c; } virtual void OnTick(float dt); + virtual void OnMouseWheel(int x, int y, int d); + virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + }; #endif // SEARCHVIEW_H diff --git a/src/stamps/StampsView.cpp b/src/stamps/StampsView.cpp index bddfb4f..c0d5981 100644 --- a/src/stamps/StampsView.cpp +++ b/src/stamps/StampsView.cpp @@ -133,6 +133,21 @@ void StampsView::NotifyStampsListChanged(StampsModel * sender) } } +void StampsView::OnMouseWheel(int x, int y, int d) +{ + if(!d) + return; + if(d<0) + c->NextPage(); + else + c->PrevPage(); +} +void StampsView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + if(key==KEY_ESCAPE) + c->Exit(); +} + StampsView::~StampsView() { // TODO Auto-generated destructor stub } diff --git a/src/stamps/StampsView.h b/src/stamps/StampsView.h index a906cdc..02e5569 100644 --- a/src/stamps/StampsView.h +++ b/src/stamps/StampsView.h @@ -29,6 +29,8 @@ public: void AttachController(StampsController * c_) { c = c_; }; void NotifyPageChanged(StampsModel * sender); void NotifyStampsListChanged(StampsModel * sender); + virtual void OnMouseWheel(int x, int y, int d); + virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); virtual ~StampsView(); }; -- cgit v0.9.2-21-gd62e From 89cdeef9ad9c164e9f484cded3096bcbc72b7207 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 4 Apr 2012 18:52:34 +0100 Subject: CommandInterface, Mouse, Keyboard and Tick events, on screen log, print redirected to tpt.log diff --git a/src/cat/CommandInterface.cpp b/src/cat/CommandInterface.cpp index f434f54..4554b9f 100644 --- a/src/cat/CommandInterface.cpp +++ b/src/cat/CommandInterface.cpp @@ -33,7 +33,7 @@ std::string CommandInterface::FormatCommand(std::string command) void CommandInterface::Log(LogType type, std::string message) { - //Todo Put this info somewhere, an on-screen log output would be nice. + m->Log(message); } int CommandInterface::GetPropertyOffset(std::string key_, FormatType & format) diff --git a/src/cat/CommandInterface.h b/src/cat/CommandInterface.h index c77d83c..8cabdab 100644 --- a/src/cat/CommandInterface.h +++ b/src/cat/CommandInterface.h @@ -9,6 +9,7 @@ #define KITTY_H_ #include +#include //#include "game/GameModel.h" class GameModel; @@ -24,7 +25,13 @@ public: int GetParticleType(std::string type); void Log(LogType type, std::string message); //void AttachGameModel(GameModel * m); - virtual void Tick() {} + virtual bool OnMouseMove(int x, int y, int dx, int dy) {return true;} + virtual bool OnMouseDown(int x, int y, unsigned button) {return true;} + virtual bool OnMouseUp(int x, int y, unsigned button) {return true;} + virtual bool OnMouseWheel(int x, int y, int d) {return true;} + virtual bool OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) {return true;} + virtual bool OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) {return true;} + virtual void OnTick(float dt) {} virtual int Command(std::string command); virtual std::string FormatCommand(std::string command); std::string GetLastError(); diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index c7af155..617577b 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -84,6 +84,12 @@ LuaScriptInterface::LuaScriptInterface(GameModel * m): l = lua_open(); luaL_openlibs(l); + + //Replace print function with our screen logging thingy + lua_pushcfunction(l, luatpt_log); + lua_setglobal(l, "print"); + + //Register all tpt functions luaL_register(l, "tpt", tptluaapi); tptProperties = lua_gettop(l); @@ -205,9 +211,46 @@ tpt.partsdata = nil"); } -void LuaScriptInterface::Tick() +bool LuaScriptInterface::OnMouseMove(int x, int y, int dx, int dy) +{ + luacon_mousex = x; + luacon_mousey = y; + return true; +} + +bool LuaScriptInterface::OnMouseDown(int x, int y, unsigned button) +{ + luacon_mousedown = true; + luacon_mousebutton = button; + return luacon_mouseevent(x, y, button, LUACON_MDOWN); +} + +bool LuaScriptInterface::OnMouseUp(int x, int y, unsigned button) { + luacon_mousedown = false; + return luacon_mouseevent(x, y, button, LUACON_MUP); +} +bool LuaScriptInterface::OnMouseWheel(int x, int y, int d) +{ + return true; +} + +bool LuaScriptInterface::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + return luacon_keyevent(key, /*TODO: sdl_mod*/0, LUACON_KDOWN); +} + +bool LuaScriptInterface::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + return luacon_keyevent(key, /*TODO: sdl_mod*/0, LUACON_KUP); +} + +void LuaScriptInterface::OnTick(float dt) +{ + if(luacon_mousedown) + luacon_mouseevent(luacon_mousex, luacon_mousey, luacon_mousebutton, LUACON_MPRESS); + luacon_step(luacon_mousex, luacon_mousey, luacon_selectedl, luacon_selectedr); } int LuaScriptInterface::Command(std::string command) @@ -753,7 +796,7 @@ int luacon_step(int mx, int my, int selectl, int selectr){ if (callret) { // failed, TODO: better error reporting - printf("%s\n",luacon_geterror()); + luacon_ci->Log(CommandInterface::LogError, luacon_geterror());//("%s\n",luacon_geterror()); } } } diff --git a/src/cat/LuaScriptInterface.h b/src/cat/LuaScriptInterface.h index 2fcfc33..b3ecd7a 100644 --- a/src/cat/LuaScriptInterface.h +++ b/src/cat/LuaScriptInterface.h @@ -34,10 +34,18 @@ extern "C" #define LUACON_EL_MODIFIED_MENUS 0x4 class LuaScriptInterface: public CommandInterface { + int luacon_mousex, luacon_mousey, luacon_selectedl, luacon_selectedr, luacon_mousebutton; + bool luacon_mousedown; public: lua_State *l; LuaScriptInterface(GameModel * m); - virtual void Tick(); + virtual bool OnMouseMove(int x, int y, int dx, int dy); + virtual bool OnMouseDown(int x, int y, unsigned button); + virtual bool OnMouseUp(int x, int y, unsigned button); + virtual bool OnMouseWheel(int x, int y, int d); + virtual bool OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual bool OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnTick(float dt); virtual int Command(std::string command); virtual std::string FormatCommand(std::string command); virtual ~LuaScriptInterface(); diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 7b7ba20..b8f60f5 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -303,8 +303,39 @@ void GameController::CopyRegion(ui::Point point1, ui::Point point2) gameModel->SetClipboard(saveData, saveSize); } +bool GameController::MouseMove(int x, int y, int dx, int dy) +{ + return commandInterface->OnMouseMove(x, y, dx, dy); +} + +bool GameController::MouseDown(int x, int y, unsigned button) +{ + return commandInterface->OnMouseDown(x, y, button); +} + +bool GameController::MouseUp(int x, int y, unsigned button) +{ + return commandInterface->OnMouseUp(x, y, button); +} + +bool GameController::MouseWheel(int x, int y, int d) +{ + return commandInterface->OnMouseWheel(x, y, d); +} + +bool GameController::KeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + return commandInterface->OnKeyPress(key, character, shift, ctrl, alt); +} + +bool GameController::KeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + return commandInterface->OnKeyRelease(key, character, shift, ctrl, alt); +} + void GameController::Update() { + commandInterface->OnTick(1.0f); gameModel->GetSimulation()->update_particles(); if(renderOptions && renderOptions->HasExited) { diff --git a/src/game/GameController.h b/src/game/GameController.h index cefca8e..3b5ff88 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -47,6 +47,14 @@ public: GameController(); ~GameController(); GameView * GetView(); + + bool MouseMove(int x, int y, int dx, int dy); + bool MouseDown(int x, int y, unsigned button); + bool MouseUp(int x, int y, unsigned button); + bool MouseWheel(int x, int y, int d); + bool KeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + bool KeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + void SetZoomEnabled(bool zoomEnable); void SetZoomPosition(ui::Point position); void AdjustBrushSize(int direction); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 2a9b69e..6a8f3d8 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -457,6 +457,19 @@ void GameModel::SetStamp(Save * newStamp) notifyStampChanged(); } +void GameModel::Log(string message) +{ + consoleLog.push_front(message); + if(consoleLog.size()>100) + consoleLog.pop_back(); + notifyLogChanged(message); +} + +deque GameModel::GetLog() +{ + return consoleLog; +} + void GameModel::notifyColourSelectorColourChanged() { for(int i = 0; i < observers.size(); i++) @@ -576,3 +589,11 @@ void GameModel::notifyClipboardChanged() observers[i]->NotifyClipboardChanged(this); } } + +void GameModel::notifyLogChanged(string entry) +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifyLogChanged(this, entry); + } +} diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 7b953c9..7dff6f2 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -2,6 +2,7 @@ #define GAMEMODEL_H #include +#include #include "search/Save.h" #include "simulation/Simulation.h" #include "interface/Colour.h" @@ -35,6 +36,7 @@ private: //unsigned char * clipboardData; Save * stamp; Save * clipboard; + deque consoleLog; vector observers; vector toolList; vector menuList; @@ -64,6 +66,7 @@ private: void notifyStampChanged(); void notifyColourSelectorColourChanged(); void notifyColourSelectorVisibilityChanged(); + void notifyLogChanged(string entry); public: GameModel(); ~GameModel(); @@ -110,6 +113,8 @@ public: void SetStamp(Save * newStamp); void AddStamp(unsigned char * saveData, int saveSize); void SetClipboard(unsigned char * saveData, int saveSize); + void Log(string message); + deque GetLog(); Save * GetClipboard(); Save * GetStamp(); }; diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 4067d5a..2ccf2e4 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -741,11 +741,55 @@ void GameView::OnTick(float dt) c->Update(); } +void GameView::DoMouseMove(int x, int y, int dx, int dy) +{ + if(c->MouseMove(x, y, dx, dy)) + Window::DoMouseMove(x, y, dx, dy); +} + +void GameView::DoMouseDown(int x, int y, unsigned button) +{ + if(c->MouseDown(x, y, button)) + Window::DoMouseDown(x, y, button); +} + +void GameView::DoMouseUp(int x, int y, unsigned button) +{ + if(c->MouseUp(x, y, button)) + Window::DoMouseUp(x, y, button); +} + +void GameView::DoMouseWheel(int x, int y, int d) +{ + if(c->MouseWheel(x, y, d)) + Window::DoMouseWheel(x, y, d); +} + +void GameView::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + if(c->KeyPress(key, character, shift, ctrl, alt)) + Window::DoKeyPress(key, character, shift, ctrl, alt); +} + +void GameView::DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + if(c->KeyRelease(key, character, shift, ctrl, alt)) + Window::DoKeyRelease(key, character, shift, ctrl, alt); +} + void GameView::NotifyZoomChanged(GameModel * sender) { zoomEnabled = sender->GetZoomEnabled(); } +void GameView::NotifyLogChanged(GameModel * sender, string entry) +{ + logEntries.push_front(entry); + lastLogEntry = 100.0f; + if(logEntries.size()>10) + logEntries.pop_back(); +} + void GameView::NotifyClipboardChanged(GameModel * sender) { if(clipboardThumb) @@ -853,5 +897,19 @@ void GameView::OnDraw() } } } + + int startX = 20; + int startY = YRES-20; + if(lastLogEntry>0.1 && logEntries.size()) + { + deque::iterator iter; + for(iter = logEntries.begin(); iter != logEntries.end(); iter++) + { + string message = (*iter); + startY -= 14; + g->fillrect(startX-3, startY-3, Graphics::textwidth((char*)message.c_str())+6, 14, 0, 0, 0, 100); + g->drawtext(startX, startY, message.c_str(), 255, 255, 255, 255); + } + } } } diff --git a/src/game/GameView.h b/src/game/GameView.h index 1be2d96..9658184 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -3,6 +3,8 @@ #include #include +#include +#include #include "GameController.h" #include "GameModel.h" #include "interface/Window.h" @@ -41,6 +43,8 @@ private: //UI Elements vector menuButtons; vector toolButtons; + deque logEntries; + float lastLogEntry; ui::Button * searchButton; ui::Button * reloadButton; ui::Button * saveSimulationButton; @@ -88,12 +92,22 @@ public: void NotifyColourSelectorColourChanged(GameModel * sender); void NotifyClipboardChanged(GameModel * sender); void NotifyStampChanged(GameModel * sender); + void NotifyLogChanged(GameModel * sender, string entry); virtual void OnMouseMove(int x, int y, int dx, int dy); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); virtual void OnMouseWheel(int x, int y, int d); virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + + //Top-level handers, for Lua interface + virtual void DoMouseMove(int x, int y, int dx, int dy); + virtual void DoMouseDown(int x, int y, unsigned button); + virtual void DoMouseUp(int x, int y, unsigned button); + virtual void DoMouseWheel(int x, int y, int d); + virtual void DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + //virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) {} //virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) {} virtual void OnTick(float dt); -- cgit v0.9.2-21-gd62e From ea51cde1f07d2a63f824e78c44adad0993115853 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 4 Apr 2012 21:47:58 +0100 Subject: Change brush size with [ and ] keys, change order of drawing for Lua, Fix print and tpt.log so they log to the console when it is open diff --git a/src/cat/CommandInterface.h b/src/cat/CommandInterface.h index 8cabdab..ca480dd 100644 --- a/src/cat/CommandInterface.h +++ b/src/cat/CommandInterface.h @@ -31,7 +31,7 @@ public: virtual bool OnMouseWheel(int x, int y, int d) {return true;} virtual bool OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) {return true;} virtual bool OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) {return true;} - virtual void OnTick(float dt) {} + virtual void OnTick() {} virtual int Command(std::string command); virtual std::string FormatCommand(std::string command); std::string GetLastError(); diff --git a/src/cat/LuaScriptHelper.h b/src/cat/LuaScriptHelper.h index a9aa02d..b5b885d 100644 --- a/src/cat/LuaScriptHelper.h +++ b/src/cat/LuaScriptHelper.h @@ -13,6 +13,9 @@ Simulation * luacon_sim; LuaScriptInterface * luacon_ci; Graphics * luacon_g; +bool *luacon_currentCommand; +string *luacon_lastError; + int *lua_el_func, *lua_el_mode; int getPartIndex_curIdx; diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index 617577b..3da7284 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -13,7 +13,8 @@ #include "LuaScriptHelper.h" LuaScriptInterface::LuaScriptInterface(GameModel * m): - CommandInterface(m) + CommandInterface(m), + currentCommand(false) { int i = 0, j; char tmpname[12]; @@ -77,6 +78,9 @@ LuaScriptInterface::LuaScriptInterface(GameModel * m): {NULL,NULL} }; + luacon_currentCommand = ¤tCommand; + luacon_lastError = &lastError; + luacon_model = m; luacon_sim = m->GetSimulation(); luacon_g = ui::Engine::Ref().g; @@ -246,7 +250,7 @@ bool LuaScriptInterface::OnKeyRelease(int key, Uint16 character, bool shift, boo return luacon_keyevent(key, /*TODO: sdl_mod*/0, LUACON_KUP); } -void LuaScriptInterface::OnTick(float dt) +void LuaScriptInterface::OnTick() { if(luacon_mousedown) luacon_mouseevent(luacon_mousex, luacon_mousey, luacon_mousebutton, LUACON_MPRESS); @@ -257,11 +261,13 @@ int LuaScriptInterface::Command(std::string command) { int ret; lastError = ""; + currentCommand = true; if((ret = luaL_dostring(l, command.c_str()))) { lastError = luacon_geterror(); - Log(LogError, lastError); + //Log(LogError, lastError); } + currentCommand = false; return ret; } @@ -977,7 +983,10 @@ int luatpt_setconsole(lua_State* l) int luatpt_log(lua_State* l) { - luacon_ci->Log(CommandInterface::LogNotice, luaL_optstring(l, 1, "")); + if((*luacon_currentCommand) && !(*luacon_lastError).length()) + (*luacon_lastError) = luaL_optstring(l, 1, ""); + else + luacon_ci->Log(CommandInterface::LogNotice, luaL_optstring(l, 1, "")); return 0; } diff --git a/src/cat/LuaScriptInterface.h b/src/cat/LuaScriptInterface.h index b3ecd7a..a346b1a 100644 --- a/src/cat/LuaScriptInterface.h +++ b/src/cat/LuaScriptInterface.h @@ -36,6 +36,7 @@ extern "C" class LuaScriptInterface: public CommandInterface { int luacon_mousex, luacon_mousey, luacon_selectedl, luacon_selectedr, luacon_mousebutton; bool luacon_mousedown; + bool currentCommand; public: lua_State *l; LuaScriptInterface(GameModel * m); @@ -45,7 +46,7 @@ public: virtual bool OnMouseWheel(int x, int y, int d); virtual bool OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); virtual bool OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); - virtual void OnTick(float dt); + virtual void OnTick(); virtual int Command(std::string command); virtual std::string FormatCommand(std::string command); virtual ~LuaScriptInterface(); diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index b8f60f5..dfdc12d 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -174,9 +174,13 @@ void GameController::PlaceClipboard(ui::Point position) } } -void GameController::AdjustBrushSize(int direction) +void GameController::AdjustBrushSize(int direction, bool logarithmic) { - ui::Point newSize = gameModel->GetBrush()->GetRadius() + ui::Point(direction, direction); + ui::Point newSize(0, 0); + if(logarithmic) + newSize = gameModel->GetBrush()->GetRadius() + ui::Point(direction * ((gameModel->GetBrush()->GetRadius().X/10)>0?gameModel->GetBrush()->GetRadius().X/10:1), direction * ((gameModel->GetBrush()->GetRadius().Y/10)>0?gameModel->GetBrush()->GetRadius().Y/10:1)); + else + newSize = gameModel->GetBrush()->GetRadius() + ui::Point(direction, direction); if(newSize.X<0) newSize.X = 0; if(newSize.Y<0) @@ -184,9 +188,13 @@ void GameController::AdjustBrushSize(int direction) gameModel->GetBrush()->SetRadius(newSize); } -void GameController::AdjustZoomSize(int direction) +void GameController::AdjustZoomSize(int direction, bool logarithmic) { - int newSize = gameModel->GetZoomSize()+direction; + int newSize; + if(logarithmic) + newSize = gameModel->GetZoomSize()+direction; + else + newSize = gameModel->GetZoomSize()+(((gameModel->GetZoomSize()/10)>0?(gameModel->GetZoomSize()/10):1)*direction); if(newSize<5) newSize = 5; if(newSize>64) @@ -333,9 +341,13 @@ bool GameController::KeyRelease(int key, Uint16 character, bool shift, bool ctrl return commandInterface->OnKeyRelease(key, character, shift, ctrl, alt); } +void GameController::Tick() +{ + commandInterface->OnTick(); +} + void GameController::Update() { - commandInterface->OnTick(1.0f); gameModel->GetSimulation()->update_particles(); if(renderOptions && renderOptions->HasExited) { diff --git a/src/game/GameController.h b/src/game/GameController.h index 3b5ff88..fffe26a 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -54,11 +54,12 @@ public: bool MouseWheel(int x, int y, int d); bool KeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); bool KeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + void Tick(); void SetZoomEnabled(bool zoomEnable); void SetZoomPosition(ui::Point position); - void AdjustBrushSize(int direction); - void AdjustZoomSize(int direction); + void AdjustBrushSize(int direction, bool logarithmic = false); + void AdjustZoomSize(int direction, bool logarithmic = false); void DrawPoints(int toolSelection, queue & pointQueue); void DrawRect(int toolSelection, ui::Point point1, ui::Point point2); void DrawLine(int toolSelection, ui::Point point1, ui::Point point2); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 2ccf2e4..d8ea4b8 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -693,6 +693,12 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool selectPoint1 = selectPoint2; c->OpenStamps(); break; + case ']': + c->AdjustBrushSize(1, true); + break; + case '[': + c->AdjustBrushSize(-1, true); + break; } } @@ -739,6 +745,8 @@ void GameView::OnTick(float dt) c->DrawFill(toolIndex, currentMouse); } c->Update(); + if(lastLogEntry > -0.1f) + lastLogEntry -= 0.16*dt; } void GameView::DoMouseMove(int x, int y, int dx, int dy) @@ -777,6 +785,13 @@ void GameView::DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bo Window::DoKeyRelease(key, character, shift, ctrl, alt); } +void GameView::DoDraw() +{ + Window::DoDraw(); + c->Tick(); +} + + void GameView::NotifyZoomChanged(GameModel * sender) { zoomEnabled = sender->GetZoomEnabled(); @@ -786,7 +801,7 @@ void GameView::NotifyLogChanged(GameModel * sender, string entry) { logEntries.push_front(entry); lastLogEntry = 100.0f; - if(logEntries.size()>10) + if(logEntries.size()>20) logEntries.pop_back(); } @@ -900,15 +915,18 @@ void GameView::OnDraw() int startX = 20; int startY = YRES-20; - if(lastLogEntry>0.1 && logEntries.size()) + int startAlpha; + if(lastLogEntry>0.1f && logEntries.size()) { + startAlpha = 2.55f*lastLogEntry; deque::iterator iter; - for(iter = logEntries.begin(); iter != logEntries.end(); iter++) + for(iter = logEntries.begin(); iter != logEntries.end() && startAlpha>0; iter++) { string message = (*iter); - startY -= 14; + startY -= 13; g->fillrect(startX-3, startY-3, Graphics::textwidth((char*)message.c_str())+6, 14, 0, 0, 0, 100); - g->drawtext(startX, startY, message.c_str(), 255, 255, 255, 255); + g->drawtext(startX, startY, message.c_str(), 255, 255, 255, startAlpha); + startAlpha-=14; } } } diff --git a/src/game/GameView.h b/src/game/GameView.h index 9658184..9843743 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -101,6 +101,7 @@ public: virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); //Top-level handers, for Lua interface + virtual void DoDraw(); virtual void DoMouseMove(int x, int y, int dx, int dy); virtual void DoMouseDown(int x, int y, unsigned button); virtual void DoMouseUp(int x, int y, unsigned button); -- cgit v0.9.2-21-gd62e From 8f8de875c6f7a68a3e47252a8653abb72fd398c1 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 5 Apr 2012 13:48:50 +0100 Subject: Modifier keys for Lua, Air display, correct render mode saving diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 95deb69..79b63ec 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -7,6 +7,7 @@ #include #include +#include #include "Config.h" #include "Renderer.h" #include "Graphics.h" @@ -1611,6 +1612,8 @@ void Renderer::draw_grav() void Renderer::draw_air() { #ifndef OGLR + if(!(display_mode & DISPLAY_AIR)) + return; int x, y, i, j; float (*pv)[XRES/CELL] = sim->air->pv; float (*hv)[XRES/CELL] = sim->air->hv; diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index 3da7284..bd0f013 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -242,12 +242,26 @@ bool LuaScriptInterface::OnMouseWheel(int x, int y, int d) bool LuaScriptInterface::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { - return luacon_keyevent(key, /*TODO: sdl_mod*/0, LUACON_KDOWN); + int modifiers; + if(shift) + modifiers |= 0x001; + if(ctrl) + modifiers |= 0x040; + if(alt) + modifiers |= 0x100; + return luacon_keyevent(key, modifiers, LUACON_KDOWN); } bool LuaScriptInterface::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { - return luacon_keyevent(key, /*TODO: sdl_mod*/0, LUACON_KUP); + int modifiers; + if(shift) + modifiers |= 0x001; + if(ctrl) + modifiers |= 0x040; + if(alt) + modifiers |= 0x100; + return luacon_keyevent(key, modifiers, LUACON_KUP); } void LuaScriptInterface::OnTick() diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 6a8f3d8..fa18e24 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -126,14 +126,14 @@ GameModel::~GameModel() { Client::Ref().configDocument["Renderer"]["ColourMode"] = json::Number(ren->GetColourMode()); - ((json::Array)Client::Ref().configDocument["Renderer"]["DisplayModes"]).Clear(); + Client::Ref().configDocument["Renderer"]["DisplayModes"] = json::Array(); std::vector displayModes = ren->GetDisplayMode(); for (int i = 0; i < displayModes.size(); i++) { Client::Ref().configDocument["Renderer"]["DisplayModes"][i] = json::Number(displayModes[i]); } - ((json::Array)Client::Ref().configDocument["Renderer"]["RenderModes"]).Clear(); + Client::Ref().configDocument["Renderer"]["RenderModes"] = json::Array(); std::vector renderModes = ren->GetRenderMode(); for (int i = 0; i < renderModes.size(); i++) { diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index d8ea4b8..bd4bd7a 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -840,6 +840,7 @@ void GameView::OnDraw() if(ren) { Graphics * g = ui::Engine::Ref().g; + ren->draw_air(); ren->render_parts(); ren->render_fire(); ren->DrawWalls(); diff --git a/src/render/RenderView.cpp b/src/render/RenderView.cpp index 1702d63..3c9811d 100644 --- a/src/render/RenderView.cpp +++ b/src/render/RenderView.cpp @@ -232,15 +232,16 @@ void RenderView::OnDraw() { Graphics * g = ui::Engine::Ref().g; g->clearrect(0, 0, XRES, YRES+MENUSIZE); - g->draw_line(0, YRES, XRES-1, YRES, 255, 255, 255, XRES+BARSIZE); - g->draw_line(180, YRES, 180, YRES+MENUSIZE, 200, 200, 200, XRES+BARSIZE); - g->draw_line(480, YRES, 480, YRES+MENUSIZE, 200, 200, 200, XRES+BARSIZE); - g->draw_line(XRES-1, 0, XRES-1, YRES+MENUSIZE, 255, 255, 255, XRES+BARSIZE); if(ren) { + ren->draw_air(); ren->render_parts(); ren->render_fire(); } + g->draw_line(0, YRES, XRES-1, YRES, 255, 255, 255, XRES+BARSIZE); + g->draw_line(180, YRES, 180, YRES+MENUSIZE, 200, 200, 200, XRES+BARSIZE); + g->draw_line(480, YRES, 480, YRES+MENUSIZE, 200, 200, 200, XRES+BARSIZE); + g->draw_line(XRES-1, 0, XRES-1, YRES+MENUSIZE, 255, 255, 255, XRES+BARSIZE); } RenderView::~RenderView() { -- cgit v0.9.2-21-gd62e From bbfbb81086897d50b67bf1494ac150eb607add72 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 7 Apr 2012 00:45:24 +0100 Subject: Confirmation Dialogue, Save selection and multi-delete diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 4b7ef95..b748005 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -432,6 +432,58 @@ LoginStatus Client::Login(string username, string password, User & user) return LoginError; } +RequestStatus Client::DeleteSave(int saveID) +{ + lastError = ""; + std::vector * tags = NULL; + std::stringstream urlStream; + char * data = NULL; + int dataStatus, dataLength; + urlStream << "http://" << SERVER << "/Browse/Delete.json?ID=" << saveID; + if(authUser.ID) + { + std::stringstream userIDStream; + userIDStream << authUser.ID; + data = http_auth_get((char *)urlStream.str().c_str(), (char *)(userIDStream.str().c_str()), NULL, (char *)(authUser.SessionID.c_str()), &dataStatus, &dataLength); + } + else + { + lastError = "Not authenticated"; + return RequestFailure; + } + if(dataStatus == 200 && data) + { + try + { + std::istringstream dataStream(data); + json::Object objDocument; + json::Reader::Read(objDocument, dataStream); + + int status = ((json::Number)objDocument["Status"]).Value(); + + if(status!=1) + goto failure; + } + catch (json::Exception &e) + { + lastError = "Could not read response"; + goto failure; + } + } + else + { + lastError = http_ret_text(dataStatus); + goto failure; + } + if(data) + free(data); + return RequestOkay; +failure: + if(data) + free(data); + return RequestFailure; +} + Save * Client::GetSave(int saveID, int saveDate) { lastError = ""; diff --git a/src/client/Client.h b/src/client/Client.h index c8f5764..d0ea14b 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -67,6 +67,7 @@ public: Thumbnail * GetPreview(int saveID, int saveDate); Thumbnail * GetThumbnail(int saveID, int saveDate); Save * GetSave(int saveID, int saveDate); + RequestStatus DeleteSave(int saveID); void SetAuthUser(User user); User GetAuthUser(); std::vector * RemoveTag(int saveID, string tag); //TODO RequestStatus diff --git a/src/dialogues/ConfirmPrompt.cpp b/src/dialogues/ConfirmPrompt.cpp new file mode 100644 index 0000000..d97e8c8 --- /dev/null +++ b/src/dialogues/ConfirmPrompt.cpp @@ -0,0 +1,67 @@ +/* + * ConfirmPrompt.cpp + * + * Created on: Apr 6, 2012 + * Author: Simon + */ + +#include "ConfirmPrompt.h" +#include "interface/Label.h" +#include "interface/Button.h" + +ConfirmPrompt::ConfirmPrompt(std::string title, std::string message, ConfirmDialogueCallback * callback_): + ui::Window(ui::Point(-1, -1), ui::Point(200, 75)), + callback(callback_) +{ + ui::Label * titleLabel = new ui::Label(ui::Point(2, 1), ui::Point(Size.X-4, 16), title); + titleLabel->SetTextColour(ui::Colour(220, 220, 50)); + titleLabel->SetAlignment(AlignLeft, AlignBottom); + AddComponent(titleLabel); + + ui::Label * messageLabel = new ui::Label(ui::Point(4, 18), ui::Point(Size.X-8, 60), message); + messageLabel->SetAlignment(AlignLeft, AlignTop); + AddComponent(messageLabel); + + class CloseAction: public ui::ButtonAction + { + public: + ConfirmPrompt * prompt; + DialogueResult result; + CloseAction(ConfirmPrompt * prompt_, DialogueResult result_) { prompt = prompt_; result = result_; } + void ActionCallback(ui::Button * sender) + { + ui::Engine::Ref().CloseWindow(); + prompt->callback->ConfirmCallback(result); + //delete prompt; TODO: Fix component disposal + } + }; + + + ui::Button * cancelButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(Size.X-50, 16), "Cancel"); + cancelButton->SetAlignment(AlignLeft, AlignBottom); + cancelButton->SetBorderColour(ui::Colour(200, 200, 200)); + cancelButton->SetActionCallback(new CloseAction(this, ResultCancel)); + AddComponent(cancelButton); + + ui::Button * okayButton = new ui::Button(ui::Point(Size.X-50, Size.Y-16), ui::Point(50, 16), "Continue"); + okayButton->SetAlignment(AlignLeft, AlignBottom); + okayButton->SetTextColour(ui::Colour(220, 220, 50)); + okayButton->SetActionCallback(new CloseAction(this, ResultOkay)); + AddComponent(okayButton); + + ui::Engine::Ref().ShowWindow(this); +} + +void ConfirmPrompt::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + + g->clearrect(Position.X-2, Position.Y-2, Size.X+4, Size.Y+4); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 200, 200, 200, 255); +} + +ConfirmPrompt::~ConfirmPrompt() { + if(callback) + delete callback; +} + diff --git a/src/dialogues/ConfirmPrompt.h b/src/dialogues/ConfirmPrompt.h new file mode 100644 index 0000000..f86a386 --- /dev/null +++ b/src/dialogues/ConfirmPrompt.h @@ -0,0 +1,30 @@ +/* + * ConfirmPrompt.h + * + * Created on: Apr 6, 2012 + * Author: Simon + */ + +#ifndef CONFIRMPROMPT_H_ +#define CONFIRMPROMPT_H_ + +#include "interface/Window.h" + +class ConfirmDialogueCallback; +class ConfirmPrompt: public ui::Window { +public: + enum DialogueResult { ResultCancel, ResultOkay }; + ConfirmPrompt(std::string title, std::string message, ConfirmDialogueCallback * callback_); + virtual void OnDraw(); + virtual ~ConfirmPrompt(); + ConfirmDialogueCallback * callback; +}; + +class ConfirmDialogueCallback +{ + public: + virtual void ConfirmCallback(ConfirmPrompt::DialogueResult result) {} + virtual ~ConfirmDialogueCallback() {} +}; + +#endif /* CONFIRMPROMPT_H_ */ diff --git a/src/dialogues/ErrorMessage.cpp b/src/dialogues/ErrorMessage.cpp index bce0c33..7603993 100644 --- a/src/dialogues/ErrorMessage.cpp +++ b/src/dialogues/ErrorMessage.cpp @@ -23,16 +23,20 @@ ErrorMessage::ErrorMessage(std::string title, std::string message): class DismissAction: public ui::ButtonAction { + ErrorMessage * message; + public: + DismissAction(ErrorMessage * message_) { message = message_; } void ActionCallback(ui::Button * sender) { ui::Engine::Ref().CloseWindow(); + //delete message; TODO: Fix component disposal } }; ui::Button * okayButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(Size.X, 16), "Dismiss"); okayButton->SetAlignment(AlignRight, AlignBottom); okayButton->SetBorderColour(ui::Colour(200, 200, 200)); - okayButton->SetActionCallback(new DismissAction()); + okayButton->SetActionCallback(new DismissAction(this)); AddComponent(okayButton); ui::Engine::Ref().ShowWindow(this); } diff --git a/src/interface/Component.cpp b/src/interface/Component.cpp index 0efc2b1..5db7acc 100644 --- a/src/interface/Component.cpp +++ b/src/interface/Component.cpp @@ -148,5 +148,4 @@ void Component::OnMouseWheelInside(int localx, int localy, int d) Component::~Component() { - } diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index d044ef6..338ef96 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -17,7 +17,9 @@ SaveButton::SaveButton(Point position, Point size, Save * save): isMouseInside(false), isButtonDown(false), actionCallback(NULL), - voteColour(255, 0, 0) + voteColour(255, 0, 0), + selectable(false), + selected(false) { if(save->votesUp==0) voteRatio = 0.0f; @@ -93,6 +95,11 @@ void SaveButton::Draw(const Point& screenPos) float scaleFactor; ui::Point thumbBoxSize(0, 0); + if(selected && selectable) + { + g->fillrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 100, 170, 255, 100); + } + if(thumbnail) { thumbBoxSize = ui::Point(thumbnail->Size.X, thumbnail->Size.Y); @@ -136,6 +143,14 @@ void SaveButton::Draw(const Point& screenPos) g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->name.c_str()))/2, screenPos.Y+Size.Y - 21, save->name, 180, 180, 180, 255); g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->userName.c_str()))/2, screenPos.Y+Size.Y - 10, save->userName, 100, 130, 160, 255); } + + if(isMouseInside && selectable) + { + g->clearrect(screenPos.X+(Size.X-20), screenPos.Y+6, 14, 14); + g->drawrect(screenPos.X+(Size.X-20), screenPos.Y+6, 14, 14, 255, 255, 255, 255); + if(selected) + g->fillrect(screenPos.X+(Size.X-18), screenPos.Y+8, 10, 10, 255, 255, 255, 255); + } } void SaveButton::OnMouseUnclick(int x, int y, unsigned int button) @@ -145,6 +160,13 @@ void SaveButton::OnMouseUnclick(int x, int y, unsigned int button) return; //left click only! } + if(x>=Size.X-20 && y>=6 && y<=20 && x<=Size.X-6 && selectable) + { + selected = !selected; + DoSelection(); + return; + } + if(isButtonDown) { DoAction(); @@ -155,7 +177,13 @@ void SaveButton::OnMouseUnclick(int x, int y, unsigned int button) void SaveButton::OnMouseClick(int x, int y, unsigned int button) { + if(button !=1 && selectable) + { + selected = !selected; + DoSelection(); + } if(button != 1) return; //left click only! + isButtonDown = true; } @@ -175,6 +203,12 @@ void SaveButton::DoAction() actionCallback->ActionCallback(this); } +void SaveButton::DoSelection() +{ + if(selectable) + actionCallback->SelectedCallback(this); +} + void SaveButton::SetActionCallback(SaveButtonAction * action) { actionCallback = action; diff --git a/src/interface/SaveButton.h b/src/interface/SaveButton.h index d4b2570..de1b6ed 100644 --- a/src/interface/SaveButton.h +++ b/src/interface/SaveButton.h @@ -16,6 +16,7 @@ class SaveButtonAction { public: virtual void ActionCallback(ui::SaveButton * sender) {} + virtual void SelectedCallback(ui::SaveButton * sender) {} virtual ~SaveButtonAction() {} }; @@ -36,12 +37,18 @@ public: virtual void Draw(const Point& screenPos); virtual void Tick(float dt); + void SetSelected(bool selected_) { selected = selected_; } + bool GetSelected() { return selected; } + void SetSelectable(bool selectable_) { selectable = selectable_; } + bool GetSelectable() { return selectable; } + Save * GetSave() { return save; } inline bool GetState() { return state; } virtual void DoAction(); + virtual void DoSelection(); void SetActionCallback(SaveButtonAction * action); protected: - bool isButtonDown, state, isMouseInside; + bool isButtonDown, state, isMouseInside, selected, selectable; float voteRatio; Colour voteColour; SaveButtonAction * actionCallback; diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 1449f9a..90cd41b 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -1,10 +1,15 @@ #include +#include +#include #include "SearchController.h" #include "SearchModel.h" #include "SearchView.h" #include "interface/Panel.h" +#include "dialogues/ConfirmPrompt.h" #include "preview/PreviewController.h" #include "client/Client.h" +#include "tasks/Task.h" +#include "tasks/TaskWindow.h" class SearchController::OpenCallback: public ControllerCallback { @@ -125,8 +130,91 @@ void SearchController::ShowOwn(bool show) searchModel->SetShowOwn(false); } +void SearchController::Selected(int saveID, bool selected) +{ + if(!Client::Ref().GetAuthUser().ID) + return; + + if(selected) + searchModel->SelectSave(saveID); + else + searchModel->DeselectSave(saveID); +} + void SearchController::OpenSave(int saveID) { activePreview = new PreviewController(saveID, new OpenCallback(this)); ui::Engine::Ref().ShowWindow(activePreview->GetView()); } + +void SearchController::ClearSelection() +{ + searchModel->ClearSelected(); +} + +void SearchController::RemoveSelected() +{ + class RemoveSelectedConfirmation: public ConfirmDialogueCallback { + public: + SearchController * c; + RemoveSelectedConfirmation(SearchController * c_) { c = c_; } + virtual void ConfirmCallback(ConfirmPrompt::DialogueResult result) { + if (result == ConfirmPrompt::ResultOkay) + c->removeSelectedC(); + } + virtual ~RemoveSelectedConfirmation() { } + }; + + std::stringstream desc; + desc << "Are you sure you want to delete " << searchModel->GetSelected().size() << " save"; + if(searchModel->GetSelected().size()>1) + desc << "s"; + new ConfirmPrompt("Delete saves", desc.str(), new RemoveSelectedConfirmation(this)); +} + +void SearchController::removeSelectedC() +{ + class RemoveSavesTask : public Task + { + std::vector saves; + public: + RemoveSavesTask(std::vector saves_) { saves = saves_; } + virtual void doWork() + { + for(int i = 0; i < saves.size(); i++) + { + std::stringstream saveID; + saveID << "Deleting save [" << saves[i] << "] ..."; + notifyStatus(saveID.str()); + if(Client::Ref().DeleteSave(saves[i])!=RequestOkay) + { + std::stringstream saveIDF; + saveIDF << "\boFailed to delete [" << saves[i] << "] ..."; + notifyStatus(saveIDF.str()); + usleep(500*1000); + } + usleep(100*1000); + notifyProgress((float(i+1)/float(saves.size())*100)); + } + } + }; + + std::vector selected = searchModel->GetSelected(); + new TaskWindow("Removing saves", new RemoveSavesTask(selected)); + ClearSelection(); +} + +void SearchController::UnpublishSelected() +{ + +} + +void SearchController::unpublishSelectedC() +{ + ClearSelection(); +} + +void SearchController::FavouriteSelected() +{ + ClearSelection(); +} diff --git a/src/search/SearchController.h b/src/search/SearchController.h index cf34830..3168419 100644 --- a/src/search/SearchController.h +++ b/src/search/SearchController.h @@ -21,6 +21,8 @@ private: double nextQueryTime; std::string nextQuery; bool nextQueryDone; + void removeSelectedC(); + void unpublishSelectedC(); public: class OpenCallback; bool HasExited; @@ -33,8 +35,13 @@ public: void PrevPage(); void ChangeSort(); void ShowOwn(bool show); + void Selected(int saveID, bool selected); void OpenSave(int saveID); void Update(); + void ClearSelection(); + void RemoveSelected(); + void UnpublishSelected(); + void FavouriteSelected(); Save * GetLoadedSave(); }; diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index 4a410c3..e1d9849 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -37,6 +37,8 @@ void SearchModel::UpdateSaveList(int pageNumber, std::string query) currentPage = pageNumber; notifySaveListChanged(); notifyPageChanged(); + selected.clear(); + notifySelectedChanged(); //Threading if(!updateSaveListWorking) @@ -94,6 +96,36 @@ void SearchModel::AddObserver(SearchView * observer) observer->NotifyShowOwnChanged(this); } +void SearchModel::SelectSave(int saveID) +{ + for(int i = 0; i < selected.size(); i++) + { + if(selected[i]==saveID) + { + return; + } + } + selected.push_back(saveID); + notifySelectedChanged(); +} + +void SearchModel::DeselectSave(int saveID) +{ + bool changed = false; +restart: + for(int i = 0; i < selected.size(); i++) + { + if(selected[i]==saveID) + { + selected.erase(selected.begin()+i); + changed = true; + goto restart; //Just ensure all cases are removed. + } + } + if(changed) + notifySelectedChanged(); +} + void SearchModel::notifySaveListChanged() { for(int i = 0; i < observers.size(); i++) @@ -130,6 +162,15 @@ void SearchModel::notifyShowOwnChanged() } } +void SearchModel::notifySelectedChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + SearchView* cObserver = observers[i]; + cObserver->NotifySelectedChanged(this); + } +} + SearchModel::~SearchModel() { if(loadedSave) diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index 2587c03..8f2ae58 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -18,12 +18,14 @@ private: string currentSort; string lastQuery; string lastError; + vector selected; vector observers; vector saveList; int currentPage; int resultCount; bool showOwn; void notifySaveListChanged(); + void notifySelectedChanged(); void notifyPageChanged(); void notifySortChanged(); void notifyShowOwnChanged(); @@ -38,6 +40,7 @@ private: public: SearchModel(); virtual ~SearchModel(); + void AddObserver(SearchView * observer); void UpdateSaveList(int pageNumber, std::string query); vector GetSaveList(); @@ -52,6 +55,10 @@ public: void SetLoadedSave(Save * save); Save * GetLoadedSave(); bool GetSavesLoaded() { return saveListLoaded; } + vector GetSelected() { return selected; } + void ClearSelected() { selected.clear(); notifySelectedChanged(); } + void SelectSave(int saveID); + void DeselectSave(int saveID); void Update(); }; diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 4b9b6b2..4064658 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -99,6 +99,70 @@ SearchView::SearchView(): ui::Label * searchPrompt = new ui::Label(ui::Point(10, 10), ui::Point(50, 16), "Search:"); searchPrompt->SetAlignment(AlignLeft, AlignBottom); AddComponent(searchPrompt); + + class RemoveSelectedAction : public ui::ButtonAction + { + SearchView * v; + public: + RemoveSelectedAction(SearchView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->RemoveSelected(); + } + }; + + class UnpublishSelectedAction : public ui::ButtonAction + { + SearchView * v; + public: + UnpublishSelectedAction(SearchView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->UnpublishSelected(); + } + }; + + class FavouriteSelectedAction : public ui::ButtonAction + { + SearchView * v; + public: + FavouriteSelectedAction(SearchView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->FavouriteSelected(); + } + }; + + class ClearSelectionAction : public ui::ButtonAction + { + SearchView * v; + public: + ClearSelectionAction(SearchView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->ClearSelection(); + } + }; + + removeSelected = new ui::Button(ui::Point((((XRES+BARSIZE)-415)/2), YRES+MENUSIZE-18), ui::Point(100, 16), "Delete"); + removeSelected->Visible = false; + removeSelected->SetActionCallback(new RemoveSelectedAction(this)); + AddComponent(removeSelected); + + unpublishSelected = new ui::Button(ui::Point((((XRES+BARSIZE)-415)/2)+105, YRES+MENUSIZE-18), ui::Point(100, 16), "Unpublish"); + unpublishSelected->Visible = false; + unpublishSelected->SetActionCallback(new UnpublishSelectedAction(this)); + AddComponent(unpublishSelected); + + favouriteSelected = new ui::Button(ui::Point((((XRES+BARSIZE)-415)/2)+210, YRES+MENUSIZE-18), ui::Point(100, 16), "Favourite"); + favouriteSelected->Visible = false; + favouriteSelected->SetActionCallback(new FavouriteSelectedAction(this)); + AddComponent(favouriteSelected); + + clearSelection = new ui::Button(ui::Point((((XRES+BARSIZE)-415)/2)+315, YRES+MENUSIZE-18), ui::Point(100, 16), "Clear selection"); + clearSelection->Visible = false; + clearSelection->SetActionCallback(new ClearSelectionAction(this)); + AddComponent(clearSelection); } void SearchView::doSearch() @@ -211,6 +275,10 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) { v->c->OpenSave(sender->GetSave()->GetID()); } + virtual void SelectedCallback(ui::SaveButton * sender) + { + v->c->Selected(sender->GetSave()->GetID(), sender->GetSelected()); + } }; for(i = 0; i < saves.size(); i++) { @@ -230,6 +298,8 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) ui::Point(buttonWidth, buttonHeight), saves[i]); saveButton->SetActionCallback(new SaveOpenAction(this)); + if(Client::Ref().GetAuthUser().ID) + saveButton->SetSelectable(true); saveButtons.push_back(saveButton); AddComponent(saveButton); saveX++; @@ -237,6 +307,35 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) } } +void SearchView::NotifySelectedChanged(SearchModel * sender) +{ + vector selected = sender->GetSelected(); + for(int j = 0; j < saveButtons.size(); j++) + { + saveButtons[j]->SetSelected(false); + for(int i = 0; i < selected.size(); i++) + { + if(saveButtons[j]->GetSave()->GetID()==selected[i]) + saveButtons[j]->SetSelected(true); + } + } + + if(selected.size()) + { + removeSelected->Visible = true; + unpublishSelected->Visible = true; + favouriteSelected->Visible = true; + clearSelection->Visible = true; + } + else + { + removeSelected->Visible = false; + unpublishSelected->Visible = false; + favouriteSelected->Visible = false; + clearSelection->Visible = false; + } +} + void SearchView::OnTick(float dt) { c->Update(); diff --git a/src/search/SearchView.h b/src/search/SearchView.h index af43a8c..ed4b06e 100644 --- a/src/search/SearchView.h +++ b/src/search/SearchView.h @@ -27,9 +27,15 @@ private: ui::Button * sortButton; ui::Button * ownButton; ui::Spinner * loadingSpinner; + + ui::Button * removeSelected; + ui::Button * unpublishSelected; + ui::Button * favouriteSelected; + ui::Button * clearSelection; void doSearch(); public: void NotifySaveListChanged(SearchModel * sender); + void NotifySelectedChanged(SearchModel * sender); void NotifyPageChanged(SearchModel * sender); void NotifySortChanged(SearchModel * sender); void NotifyShowOwnChanged(SearchModel * sender); diff --git a/src/tasks/Task.cpp b/src/tasks/Task.cpp new file mode 100644 index 0000000..c20a0ea --- /dev/null +++ b/src/tasks/Task.cpp @@ -0,0 +1,84 @@ +/* + * Task.cpp + * + * Created on: Apr 6, 2012 + * Author: Simon + */ + + +#include +#include "Task.h" +#include "TaskListener.h" + +void Task::SetTaskListener(TaskListener * listener) +{ + this->listener = listener; +} + +void Task::Start() +{ + pthread_create(&doWorkThread, 0, &Task::doWork_helper, this); +} + +int Task::GetProgress() +{ + return progress; +} + +std::string Task::GetStatus() +{ + return status; +} + +bool Task::GetDone() +{ + return done; +} + +Task::~Task() +{ + +} + +void Task::doWork() +{ + notifyStatus("Fake progress"); + for(int i = 0; i < 100; i++) + { + notifyProgress(i); + usleep((100)*1000); + } +} + +void * Task::doWork_helper(void * ref) +{ + ((Task*)ref)->doWork(); + ((Task*)ref)->notifyDone(); + return NULL; +} + +void Task::notifyProgress(int progress) +{ + if(this->progress!=progress) { + this->progress = progress; + if(listener) + listener->NotifyProgress(this); + } +} + +void Task::notifyStatus(std::string status) +{ + if(this->status!=status) { + this->status = status; + if(listener) + listener->NotifyStatus(this); + } +} + +void Task::notifyDone() +{ + if(listener) + { + done = true; listener->NotifyDone(this); + } +} diff --git a/src/tasks/Task.h b/src/tasks/Task.h new file mode 100644 index 0000000..90463cb --- /dev/null +++ b/src/tasks/Task.h @@ -0,0 +1,38 @@ +/* + * Task.h + * + * Created on: Apr 6, 2012 + * Author: Simon + */ + +#ifndef TASK_H_ +#define TASK_H_ + +#include +#include +#include "TaskListener.h" + +class TaskListener; +class Task { +public: + void SetTaskListener(TaskListener * listener); + void Start(); + int GetProgress(); + bool GetDone(); + std::string GetStatus(); + Task() {} + virtual ~Task(); +protected: + int progress; + bool done; + std::string status; + TaskListener * listener; + pthread_t doWorkThread; + virtual void doWork(); + static void * doWork_helper(void * ref); + void notifyProgress(int progress); + void notifyStatus(std::string status); + void notifyDone(); +}; + +#endif /* TASK_H_ */ diff --git a/src/tasks/TaskListener.h b/src/tasks/TaskListener.h new file mode 100644 index 0000000..fc5d5e7 --- /dev/null +++ b/src/tasks/TaskListener.h @@ -0,0 +1,20 @@ +/* + * TaskListener.h + * + * Created on: Apr 6, 2012 + * Author: Simon + */ + +#ifndef TASKLISTENER_H_ +#define TASKLISTENER_H_ + +class Task; +class TaskListener { +public: + virtual void NotifyDone(Task * task) {} + virtual void NotifyProgress(Task * task) {} + virtual void NotifyStatus(Task * task) {} + virtual ~TaskListener() {} +}; + +#endif /* TASK_H_ */ diff --git a/src/tasks/TaskWindow.cpp b/src/tasks/TaskWindow.cpp new file mode 100644 index 0000000..ac22c79 --- /dev/null +++ b/src/tasks/TaskWindow.cpp @@ -0,0 +1,66 @@ +/* + * TaskWindow.cpp + * + * Created on: Apr 6, 2012 + * Author: Simon + */ + +#include "interface/Label.h" +#include "TaskWindow.h" +#include "Task.h" + +TaskWindow::TaskWindow(std::string title_, Task * task_): + task(task_), + title(title_), + ui::Window(ui::Point(-1, -1), ui::Point(300, 200)), + progress(0), + done(false) +{ + + ui::Label * tempLabel = new ui::Label(ui::Point(3, 3), ui::Point(Size.X-6, 16), title); + AddComponent(tempLabel); + + statusLabel = new ui::Label(ui::Point(3, 19), ui::Point(Size.X-6, 16), ""); + AddComponent(statusLabel); + + ui::Engine::Ref().ShowWindow(this); + + task->SetTaskListener(this); + task->Start(); +} + +void TaskWindow::NotifyStatus(Task * task) +{ + statusLabel->SetText(task->GetStatus()); +} + +void TaskWindow::NotifyDone(Task * task) +{ + if(ui::Engine::Ref().GetWindow()==this) + { + ui::Engine::Ref().CloseWindow(); + delete this; + } +} + +void TaskWindow::NotifyProgress(Task * task) +{ + progress = task->GetProgress(); +} + +void TaskWindow::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + g->clearrect(Position.X-2, Position.Y-2, Size.X+3, Size.Y+3); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); + + g->drawrect(Position.X + 20, Position.Y + 36, Size.X-40, 24, 255, 255, 255, 255); + + float size = float(Size.X-40)*(float(progress)/100.0f); // TIL... + g->fillrect(Position.X + 20, Position.Y + 36, size, 24, 255, 255, 255, 255); +} + +TaskWindow::~TaskWindow() { + delete task; +} + diff --git a/src/tasks/TaskWindow.h b/src/tasks/TaskWindow.h new file mode 100644 index 0000000..cacb59c --- /dev/null +++ b/src/tasks/TaskWindow.h @@ -0,0 +1,32 @@ +/* + * TaskWindow.h + * + * Created on: Apr 6, 2012 + * Author: Simon + */ + +#ifndef TASKWINDOW_H_ +#define TASKWINDOW_H_ + +#include +#include "interface/Label.h" +#include "interface/Window.h" +#include "tasks/TaskListener.h" + +class Task; +class TaskWindow: public ui::Window, public TaskListener { + Task * task; + std::string title; + int progress; + bool done; + ui::Label * statusLabel; +public: + TaskWindow(std::string title_, Task * task_); + virtual void NotifyStatus(Task * task); + virtual void NotifyDone(Task * task); + virtual void NotifyProgress(Task * task); + virtual void OnDraw(); + virtual ~TaskWindow(); +}; + +#endif /* TASKWINDOW_H_ */ -- cgit v0.9.2-21-gd62e From c88079d084f2f3b7ec891da22f8c497cd2652853 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 8 Apr 2012 00:11:21 +0100 Subject: Element sampling HUD thingy (No very good with MVC) diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index dfdc12d..40d7501 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -348,6 +348,12 @@ void GameController::Tick() void GameController::Update() { + ui::Point pos = gameView->GetMousePosition(); + if(pos.X >= 0 && pos.Y >= 0 && pos.X < XRES && pos.Y < YRES) + { + gameView->SetSample(gameModel->GetSimulation()->Get(pos.X, pos.Y)); + } + gameModel->GetSimulation()->update_particles(); if(renderOptions && renderOptions->HasExited) { @@ -558,4 +564,8 @@ void GameController::ReloadSim() gameModel->GetSimulation()->Load(gameModel->GetSave()->GetData(), gameModel->GetSave()->GetDataLength()); } +std::string GameController::ElementResolve(int type) +{ + return std::string(gameModel->GetSimulation()->ptypes[type].name); +} diff --git a/src/game/GameController.h b/src/game/GameController.h index fffe26a..b9629ed 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -90,6 +90,7 @@ public: void ShowConsole(); void FrameStep(); ui::Point PointTranslate(ui::Point point); + std::string ElementResolve(int type); }; #endif // GAMECONTROLLER_H diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index bd4bd7a..e6e6445 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -1,4 +1,5 @@ #include +#include #include "Config.h" #include "GameView.h" @@ -29,7 +30,8 @@ GameView::GameView(): selectPoint1(0, 0), selectPoint2(0, 0), stampThumb(NULL), - clipboardThumb(NULL) + clipboardThumb(NULL), + mousePosition(0, 0) { int currentX = 1; //Set up UI @@ -282,6 +284,16 @@ void GameView::NotifyMenuListChanged(GameModel * sender) } } +void GameView::SetSample(Particle sample) +{ + this->sample = sample; +} + +ui::Point GameView::GetMousePosition() +{ + return mousePosition; +} + void GameView::NotifyActiveToolsChanged(GameModel * sender) { for(int i = 0; i < toolButtons.size(); i++) @@ -469,6 +481,7 @@ void GameView::NotifyBrushChanged(GameModel * sender) void GameView::OnMouseMove(int x, int y, int dx, int dy) { + mousePosition = c->PointTranslate(ui::Point(x, y)); if(selectMode!=SelectNone) { if(selectMode==PlaceStamp || selectMode==PlaceClipboard) @@ -837,9 +850,9 @@ void GameView::changeColour() void GameView::OnDraw() { + Graphics * g = ui::Engine::Ref().g; if(ren) { - Graphics * g = ui::Engine::Ref().g; ren->draw_air(); ren->render_parts(); ren->render_fire(); @@ -925,10 +938,19 @@ void GameView::OnDraw() { string message = (*iter); startY -= 13; - g->fillrect(startX-3, startY-3, Graphics::textwidth((char*)message.c_str())+6, 14, 0, 0, 0, 100); + g->fillrect(startX-3, startY-3, Graphics::textwidth((char*)message.c_str())+6 , 14, 0, 0, 0, 100); g->drawtext(startX, startY, message.c_str(), 255, 255, 255, startAlpha); startAlpha-=14; } } } + + std::stringstream sampleInfo; + sampleInfo.precision(2); + if(sample.type) + sampleInfo << c->ElementResolve(sample.type) << ", Temp: " << std::fixed << sample.temp -273.15f; + else + sampleInfo << "Empty"; + + g->drawtext(XRES+BARSIZE-(10+Graphics::textwidth((char*)sampleInfo.str().c_str())), 5, (const char*)sampleInfo.str().c_str(), 255, 255, 255, 255); } diff --git a/src/game/GameView.h b/src/game/GameView.h index 9843743..85f60ed 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -71,12 +71,21 @@ private: ui::Point selectPoint1; ui::Point selectPoint2; + ui::Point mousePosition; + Thumbnail * clipboardThumb; Thumbnail * stampThumb; + Particle sample; + void changeColour(); public: GameView(); + + //Breaks MVC, but any other way is going to be more of a mess. + ui::Point GetMousePosition(); + void SetSample(Particle sample); + void AttachController(GameController * _c){ c = _c; } void NotifyRendererChanged(GameModel * sender); void NotifySimulationChanged(GameModel * sender); diff --git a/src/interface/Component.cpp b/src/interface/Component.cpp index 5db7acc..b2769cc 100644 --- a/src/interface/Component.cpp +++ b/src/interface/Component.cpp @@ -148,4 +148,6 @@ void Component::OnMouseWheelInside(int localx, int localy, int d) Component::~Component() { + if(GetParentWindow()->IsFocused(this)) + GetParentWindow()->FocusComponent(NULL); } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 7b1dca8..b52907b 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -120,6 +120,15 @@ int Simulation::flood_prop(int x, int y, size_t propoffset, void * propvalue, in return 0; } +Particle Simulation::Get(int x, int y) +{ + if(pmap[y][x]) + return parts[pmap[y][x]>>8]; + if(photons[y][x]) + return parts[photons[y][x]>>8]; + return Particle(); +} + int Simulation::flood_parts(int x, int y, int fullc, int cm, int bm, int flags) { int c = fullc&0xFF; diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index dd86953..3139b77 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -210,6 +210,7 @@ public: int Load(int x, int y, unsigned char * data, int dataLength); unsigned char * Save(int & dataLength); unsigned char * Save(int x1, int y1, int x2, int y2, int & dataLength); + Particle Get(int x, int y); inline int is_blocking(int t, int x, int y); inline int is_boundary(int pt, int x, int y); inline int find_next_boundary(int pt, int *x, int *y, int dm, int *em); -- cgit v0.9.2-21-gd62e From 798c78b04eda4bf8bf9b9dc4997692e0010eb93c Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 9 Apr 2012 11:46:42 +0100 Subject: Add missing GOL data diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index e6e6445..d27230b 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -952,5 +952,8 @@ void GameView::OnDraw() else sampleInfo << "Empty"; - g->drawtext(XRES+BARSIZE-(10+Graphics::textwidth((char*)sampleInfo.str().c_str())), 5, (const char*)sampleInfo.str().c_str(), 255, 255, 255, 255); + if(sample.ctype && sample.ctype>0 && sample.ctypeElementResolve(sample.ctype); + + g->drawtext(XRES+BARSIZE-(10+Graphics::textwidth((char*)sampleInfo.str().c_str())), 10, (const char*)sampleInfo.str().c_str(), 255, 255, 255, 255); } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index b52907b..764d29d 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3412,6 +3412,11 @@ Simulation::Simulation(): memcpy(grule, golRulesT, sizeof(int) * (golRulesCount*10)); free(golRulesT); + int golTypesCount; + int * golTypesT = LoadGOLTypes(golTypesCount); + memcpy(goltype, golTypesT, sizeof(int) * (golTypesCount)); + free(golTypesT); + int golMenuCount; gol_menu * golMenuT = LoadGOLMenu(golMenuCount); memcpy(gmenu, golMenuT, sizeof(gol_menu) * golMenuCount); diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 8dd21e0..da0cad6 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -80,6 +80,41 @@ int * LoadGOLRules(int & golRuleCount) return golRulesT; } +int * LoadGOLTypes(int & golTypeCount) +{ + int golTypes[NGOL] = + { + GT_GOL, + GT_HLIF, + GT_ASIM, + GT_2x2, + GT_DANI, + GT_AMOE, + GT_MOVE, + GT_PGOL, + GT_DMOE, + GT_34, + GT_LLIF, + GT_STAN, + GT_SEED, + GT_MAZE, + GT_COAG, + GT_WALL, + GT_GNAR, + GT_REPL, + GT_MYST, + GT_LOTE, + GT_FRG2, + GT_STAR, + GT_FROG, + GT_BRAN, + }; + golTypeCount = NGOL; + int * golTypesT = (int*)malloc((golTypeCount)*sizeof(int)); + memcpy(golTypesT, golTypes, (golTypeCount)*sizeof(int)); + return golTypesT; +} + wall_type * LoadWalls(int & wallCount) { wall_type wtypes[] = diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index c093d5c..3e35af6 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -61,6 +61,58 @@ #define DECO_MULTIPLY 3 #define DECO_DIVIDE 4 +//Old IDs for GOL types +#define GT_GOL 78 +#define GT_HLIF 79 +#define GT_ASIM 80 +#define GT_2x2 81 +#define GT_DANI 82 +#define GT_AMOE 83 +#define GT_MOVE 84 +#define GT_PGOL 85 +#define GT_DMOE 86 +#define GT_34 87 +#define GT_LLIF 88 +#define GT_STAN 89 +#define GT_SEED 134 +#define GT_MAZE 135 +#define GT_COAG 136 +#define GT_WALL 137 +#define GT_GNAR 138 +#define GT_REPL 139 +#define GT_MYST 140 +#define GT_LOTE 142 +#define GT_FRG2 143 +#define GT_STAR 144 +#define GT_FROG 145 +#define GT_BRAN 146 + +//New IDs for GOL types +#define NGT_GOL 0 +#define NGT_HLIF 1 +#define NGT_ASIM 2 +#define NGT_2x2 3 +#define NGT_DANI 4 +#define NGT_AMOE 5 +#define NGT_MOVE 6 +#define NGT_PGOL 7 +#define NGT_DMOE 8 +#define NGT_34 9 +#define NGT_LLIF 10 +#define NGT_STAN 11 +#define NGT_SEED 12 +#define NGT_MAZE 13 +#define NGT_COAG 14 +#define NGT_WALL 15 +#define NGT_GNAR 16 +#define NGT_REPL 17 +#define NGT_MYST 18 +#define NGT_LOTE 19 +#define NGT_FRG2 20 +#define NGT_STAR 21 +#define NGT_FROG 22 +#define NGT_BRAN 23 + #ifndef SIMULATIONDATA_H_ #define SIMULATIONDATA_H_ @@ -84,6 +136,8 @@ struct wall_type; gol_menu * LoadGOLMenu(int & golMenuCount); +int * LoadGOLTypes(int & golTypeCount); + int * LoadGOLRules(int & golRuleCount); wall_type * LoadWalls(int & wallCount); -- cgit v0.9.2-21-gd62e From da9cec2c3bbf0ff46642ffbbf918d3afa513069a Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 9 Apr 2012 12:39:45 +0100 Subject: Remove unused code diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index bd0f013..84d1569 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -1160,43 +1160,6 @@ int luatpt_set_property(lua_State* l) offset = luacon_ci->GetPropertyOffset(prop, format); if(offset == -1) return luaL_error(l, "Invalid property '%s'", prop); - //TODO: Use particle_getproperty - /*if (strcmp(prop,"type")==0){ - offset = offsetof(particle, type); - format = 3; - } else if (strcmp(prop,"life")==0){ - offset = offsetof(particle, life); - format = 1; - } else if (strcmp(prop,"ctype")==0){ - offset = offsetof(particle, ctype); - format = 4; - } else if (strcmp(prop,"temp")==0){ - offset = offsetof(particle, temp); - format = 2; - } else if (strcmp(prop,"tmp")==0){ - offset = offsetof(particle, tmp); - format = 1; - } else if (strcmp(prop,"tmp2")==0){ - offset = offsetof(particle, tmp2); - format = 1; - } else if (strcmp(prop,"vy")==0){ - offset = offsetof(particle, vy); - format = 2; - } else if (strcmp(prop,"vx")==0){ - offset = offsetof(particle, vx); - format = 2; - } else if (strcmp(prop,"x")==0){ - offset = offsetof(particle, x); - format = 2; - } else if (strcmp(prop,"y")==0){ - offset = offsetof(particle, y); - format = 2; - } else if (strcmp(prop,"dcolour")==0){ - offset = offsetof(particle, dcolour); - format = 1; - } else { - return luaL_error(l, "Invalid property '%s'", prop); - }*/ if(acount>2){ if(!lua_isnumber(l, acount) && lua_isstring(l, acount)){ name = (char*)luaL_optstring(l, acount, "none"); -- cgit v0.9.2-21-gd62e From b2907798f28b4acce5b024f025e7b96079f53338 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 9 Apr 2012 12:40:30 +0100 Subject: Fix issue where unborn children were slaughtered when removing a component from an event diff --git a/src/dialogues/ConfirmPrompt.cpp b/src/dialogues/ConfirmPrompt.cpp index d97e8c8..e3c8e3a 100644 --- a/src/dialogues/ConfirmPrompt.cpp +++ b/src/dialogues/ConfirmPrompt.cpp @@ -32,7 +32,7 @@ ConfirmPrompt::ConfirmPrompt(std::string title, std::string message, ConfirmDial { ui::Engine::Ref().CloseWindow(); prompt->callback->ConfirmCallback(result); - //delete prompt; TODO: Fix component disposal + prompt->SelfDestruct(); //TODO: Fix component disposal } }; diff --git a/src/dialogues/ErrorMessage.cpp b/src/dialogues/ErrorMessage.cpp index 7603993..3b9fc18 100644 --- a/src/dialogues/ErrorMessage.cpp +++ b/src/dialogues/ErrorMessage.cpp @@ -29,7 +29,7 @@ ErrorMessage::ErrorMessage(std::string title, std::string message): void ActionCallback(ui::Button * sender) { ui::Engine::Ref().CloseWindow(); - //delete message; TODO: Fix component disposal + message->SelfDestruct(); //TODO: Fix component disposal } }; diff --git a/src/interface/Component.cpp b/src/interface/Component.cpp index b2769cc..0efc2b1 100644 --- a/src/interface/Component.cpp +++ b/src/interface/Component.cpp @@ -148,6 +148,5 @@ void Component::OnMouseWheelInside(int localx, int localy, int d) Component::~Component() { - if(GetParentWindow()->IsFocused(this)) - GetParentWindow()->FocusComponent(NULL); + } diff --git a/src/interface/Window.cpp b/src/interface/Window.cpp index 5b603b9..5d93587 100644 --- a/src/interface/Window.cpp +++ b/src/interface/Window.cpp @@ -8,7 +8,9 @@ Window::Window(Point _position, Point _size): Position(_position), Size(_size), focusedComponent_(NULL), - AllowExclusiveDrawing(true) + AllowExclusiveDrawing(true), + halt(false), + destruct(false) { } @@ -16,7 +18,11 @@ Window::~Window() { for(unsigned i = 0, sz = Components.size(); i < sz; ++i) if( Components[i] ) + { delete Components[i]; + if(Components[i]==focusedComponent_) + focusedComponent_ = NULL; + } } void Window::AddComponent(Component* c) @@ -51,6 +57,11 @@ void Window::RemoveComponent(Component* c) // find the appropriate component index if(Components[i] == c) { + //Make sure any events don't continue + halt = true; + if(Components[i]==focusedComponent_) + focusedComponent_ = NULL; + Components.erase(Components.begin() + i); // we're done @@ -61,7 +72,10 @@ void Window::RemoveComponent(Component* c) void Window::RemoveComponent(unsigned idx) { + halt = true; // free component and remove it. + if(Components[idx]==focusedComponent_) + focusedComponent_ = NULL; delete Components[idx]; Components.erase(Components.begin() + idx); } @@ -118,7 +132,7 @@ void Window::DoDraw() void Window::DoTick(float dt) { //on mouse hover - for(int i = Components.size() - 1; i >= 0; --i) + for(int i = Components.size() - 1; i >= 0 && !halt; --i) { if(!Components[i]->Locked && ui::Engine::Ref().GetMouseX() >= Components[i]->Position.X+Position.X && @@ -132,12 +146,17 @@ void Window::DoTick(float dt) } //tick - for(int i = 0, sz = Components.size(); i < sz; ++i) + for(int i = 0, sz = Components.size(); i < sz && !halt; ++i) { Components[i]->Tick(dt); } + halt = false; + OnTick(dt); + + if(destruct) + finalise(); } void Window::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) @@ -150,6 +169,8 @@ void Window::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool a } OnKeyPress(key, character, shift, ctrl, alt); + if(destruct) + finalise(); } void Window::DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) @@ -162,6 +183,8 @@ void Window::DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool } OnKeyRelease(key, character, shift, ctrl, alt); + if(destruct) + finalise(); } void Window::DoMouseDown(int x_, int y_, unsigned button) @@ -170,7 +193,7 @@ void Window::DoMouseDown(int x_, int y_, unsigned button) int x = x_ - Position.X; int y = y_ - Position.Y; bool clickState = false; - for(int i = Components.size() - 1; i > -1 ; --i) + for(int i = Components.size() - 1; i > -1 && !halt; --i) { if(!Components[i]->Locked) { @@ -188,13 +211,15 @@ void Window::DoMouseDown(int x_, int y_, unsigned button) FocusComponent(NULL); //on mouse down - for(int i = Components.size() - 1; i > -1 ; --i) + for(int i = Components.size() - 1; i > -1 && !halt; --i) { if(!Components[i]->Locked) Components[i]->OnMouseDown(x, y, button); } OnMouseDown(x_, y_, button); + if(destruct) + finalise(); } void Window::DoMouseMove(int x_, int y_, int dx, int dy) @@ -202,7 +227,7 @@ void Window::DoMouseMove(int x_, int y_, int dx, int dy) //on mouse move (if true, and inside) int x = x_ - Position.X; int y = y_ - Position.Y; - for(int i = Components.size() - 1; i > -1 ; --i) + for(int i = Components.size() - 1; i > -1 && !halt; --i) { if(!Components[i]->Locked) { @@ -214,7 +239,7 @@ void Window::DoMouseMove(int x_, int y_, int dx, int dy) if(local.X >= 0 && local.Y >= 0 && local.X < Components[i]->Size.X && - local.Y < Components[i]->Size.Y ) + local.Y < Components[i]->Size.Y && !halt) { Components[i]->OnMouseMovedInside(local.X, local.Y, dx, dy); @@ -228,7 +253,7 @@ void Window::DoMouseMove(int x_, int y_, int dx, int dy) Components[i]->OnMouseEnter(local.X, local.Y); } } - else + else if(!halt) { // leaving? if( a.X >= 0 && @@ -244,6 +269,8 @@ void Window::DoMouseMove(int x_, int y_, int dx, int dy) } OnMouseMove(x_, y_, dx, dy); + if(destruct) + finalise(); } void Window::DoMouseUp(int x_, int y_, unsigned button) @@ -251,7 +278,7 @@ void Window::DoMouseUp(int x_, int y_, unsigned button) int x = x_ - Position.X; int y = y_ - Position.Y; //on mouse unclick - for(int i = Components.size() - 1; i >= 0 ; --i) + for(int i = Components.size() - 1; i >= 0 && !halt; --i) { if(!Components[i]->Locked) { @@ -264,13 +291,15 @@ void Window::DoMouseUp(int x_, int y_, unsigned button) } //on mouse up - for(int i = Components.size() - 1; i >= 0 ; --i) + for(int i = Components.size() - 1; i >= 0 && !halt; --i) { if(!Components[i]->Locked) Components[i]->OnMouseUp(x, y, button); } OnMouseUp(x_, y_, button); + if(destruct) + finalise(); } void Window::DoMouseWheel(int x_, int y_, int d) @@ -278,7 +307,7 @@ void Window::DoMouseWheel(int x_, int y_, int d) int x = x_ - Position.X; int y = y_ - Position.Y; //on mouse wheel focused - for(int i = Components.size() - 1; i >= 0 ; --i) + for(int i = Components.size() - 1; i >= 0 && !halt; --i) { if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) { @@ -289,12 +318,26 @@ void Window::DoMouseWheel(int x_, int y_, int d) } //on mouse wheel - for(int i = Components.size() - 1; i >= 0 ; --i) + for(int i = Components.size() - 1; i >= 0 && !halt; --i) { if(!Components[i]->Locked) Components[i]->OnMouseWheel(x - Components[i]->Position.X, y - Components[i]->Position.Y, d); } OnMouseWheel(x_, y_, d); + + if(destruct) + finalise(); +} + +void Window::finalise() +{ + delete this; +} + +void Window::SelfDestruct() +{ + destruct = true; + halt = true; } diff --git a/src/interface/Window.h b/src/interface/Window.h index 5fb5eec..4e705f0 100644 --- a/src/interface/Window.h +++ b/src/interface/Window.h @@ -58,6 +58,9 @@ enum ChromeStyle virtual void DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); virtual void DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + //Sets halt and destroy, this causes the Windows to stop sending events and remove itself. + void SelfDestruct(); + bool IsFocused(const Component* c) const; void FocusComponent(Component* c); @@ -79,6 +82,11 @@ enum ChromeStyle Component* focusedComponent_; ChromeStyle chrome; + //These controls allow a component to call the destruction of the Window inside an event (called by the Window) + void finalise(); + bool halt; + bool destruct; + }; -- cgit v0.9.2-21-gd62e From 84ceea525b3c493e8e4d9da7aaf5407c1eed7ada Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 11 Apr 2012 18:23:10 +0100 Subject: Nice drawing for brush diff --git a/src/game/Brush.h b/src/game/Brush.h index 617f7df..98d1321 100644 --- a/src/game/Brush.h +++ b/src/game/Brush.h @@ -13,12 +13,36 @@ class Brush { protected: + bool * outline; bool * bitmap; ui::Point size; + void updateOutline() + { + if(!bitmap) + GenerateBitmap(); + if(!bitmap) + return; + if(outline) + free(outline); + int width = size.X*2; + int height = size.Y*2; + outline = (bool *)malloc(sizeof(bool)*((width+1)*(height+1))); + for(int x = 0; x <= width; x++) + { + for(int y = 0; y <= height; y++) + { + if(bitmap[y*width+x] && (!y || !x || y == height || x == width || !bitmap[y*width+(x+1)] || !bitmap[y*width+(x-1)] || !bitmap[(y-1)*width+x] || !bitmap[(y+1)*width+x])) + outline[y*width+x] = true; + else + outline[y*width+x] = false; + } + } + } public: Brush(ui::Point size_): bitmap(NULL), - size(size_) + size(size_), + outline(NULL) { }; @@ -30,10 +54,13 @@ public: { this->size = size; GenerateBitmap(); + updateOutline(); } virtual ~Brush() { if(bitmap) delete bitmap; + if(outline) + delete outline; } virtual void RenderRect(Graphics * g, ui::Point position1, ui::Point position2) { @@ -50,16 +77,30 @@ public: position1.X += width; width *= -1; } - g->fillrect(position1.X-1, position1.Y-1, width+2, height+2, 255, 0, 255, 70); + g->xor_line(position1.X, position1.Y, position1.X+width, position1.Y); + g->xor_line(position1.X, position1.Y+height, position1.X+width, position1.Y+height); + g->xor_line(position1.X+width, position1.Y+1, position1.X+width, position1.Y+height-1); + g->xor_line(position1.X, position1.Y+1, position1.X, position1.Y+height-1); } virtual void RenderLine(Graphics * g, ui::Point position1, ui::Point position2) { - g->blend_line(position1.X, position1.Y, position2.X, position2.Y, 255, 0, 255, 70); + g->xor_line(position1.X, position1.Y, position2.X, position2.Y); } //Draw the brush outline onto the screen virtual void RenderPoint(Graphics * g, ui::Point position) { - g->fillrect(position.X-size.X-1, position.Y-size.Y-1, (size.X*2)+2, (size.Y*2)+2, 255, 0, 255, 70); + if(!outline) + updateOutline(); + if(!outline) + return; + for(int x = 0; x <= size.X*2; x++) + { + for(int y = 0; y <= size.Y*2; y++) + { + if(outline[y*(size.X*2)+x]) + g->xor_pixel(position.X-size.X+x, position.Y-size.Y+y); + } + } } virtual void GenerateBitmap() { @@ -81,6 +122,15 @@ public: GenerateBitmap(); return bitmap; } + + bool * GetOutline() + { + if(!outline) + updateOutline(); + if(!outline) + return NULL; + return outline; + } }; diff --git a/src/game/EllipseBrush.h b/src/game/EllipseBrush.h index 2f2f815..0953c01 100644 --- a/src/game/EllipseBrush.h +++ b/src/game/EllipseBrush.h @@ -18,21 +18,6 @@ public: { }; - //Draw the brush outline onto the screen - virtual void RenderPoint(Graphics * g, ui::Point position) - { - if(!bitmap) - GenerateBitmap(); - //g->fillrect(position.X-size.X-1, position.Y-size.Y-1, (size.X*2)+2, (size.Y*2)+2, 255, 0, 255, 70); - for(int x = 0; x <= size.X*2; x++) - { - for(int y = 0; y <= size.Y*2; y++) - { - if(bitmap[y*(size.X*2)+x]) - g->blendpixel(position.X-size.X+x, position.Y-size.Y+y, 255, 0, 255, 70); - } - } - } virtual void GenerateBitmap() { if(bitmap) -- cgit v0.9.2-21-gd62e From 71516b39fa2abb552db56f2e3f1589704dbcc987 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 13 Apr 2012 15:38:41 +0100 Subject: Updated font data from TPT diff --git a/data/font.h b/data/font.h index 5e2be5b..b991660 100644 --- a/data/font.h +++ b/data/font.h @@ -117,7 +117,7 @@ char font_data[] = { 0x05, 0x00, 0x00, 0xD0, 0xC7, 0x31, 0xC3, 0x4C, 0xD3, 0x07, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xF0, 0xC7, 0x31, 0xC3, 0x4C, 0xF3, 0xC7, 0x00, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0xD0, 0xDF, 0x31, 0xC3, 0x4C, 0xD3, 0x0F, 0x30, 0xC0, 0x00, 0x05, - 0x03, 0x00, 0x30, 0x7F, 0xC7, 0x30, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x33, 0x1F, 0x07, 0x03, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xC0, 0xC7, 0x10, 0x3C, 0x04, 0xF3, 0x03, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0C, 0x0C, 0x3F, 0x0C, 0x0C, 0x1C, 0x74, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x70, 0xDC, 0x30, 0xC3, 0x4C, 0xD3, 0x1F, 0x00, 0x00, 0x00, 0x00, @@ -199,9 +199,9 @@ char font_data[] = { 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3F, 0x02, 0xC2, 0xAB, 0xAA, 0x3E, 0x20, 0xE0, 0xAB, 0xAA, 0x3E, 0x02, 0xC2, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x08, 0x02, 0xC0, 0x30, 0x00, 0x0C, 0x03, 0xF0, 0xFF, 0x00, 0xFE, 0x0B, 0xD0, 0x7F, 0x00, 0xA4, 0x01, 0x00, 0x0A, 0x00, 0xA0, 0x00, 0x0A, 0x00, 0x80, 0x00, 0x81, 0x24, 0x10, 0x85, 0x00, 0x20, 0x66, 0x40, 0x15, 0x45, 0x62, 0x90, 0x4D, 0xD0, 0xF1, 0x23, 0x01, 0xFD, 0x41, 0x41, 0x07, 0x00, - 0x0A, 0x00, 0x05, 0x00, 0xA0, 0x00, 0x40, 0x1F, 0x00, 0xF8, 0x02, 0xD0, 0x7F, 0x00, 0xFE, 0x0B, 0xF0, 0xFF, 0x00, 0xFF, 0x0F, 0xD0, 0x7F, 0x00, 0xF4, 0x01, - 0x0A, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0xD4, 0x01, 0xD0, 0x06, 0x40, 0x7F, 0x00, 0xFD, 0x01, 0xF4, 0x07, 0xD0, 0x1F, 0x00, 0x7F, 0x00, 0xD0, 0x01, 0x00, - 0x0A, 0x40, 0x15, 0x00, 0xFE, 0x0B, 0x88, 0x2F, 0x52, 0xF0, 0x50, 0x01, 0x0A, 0xD4, 0xAF, 0x7F, 0xFD, 0xF5, 0xC7, 0x0B, 0x3E, 0x70, 0xD0, 0x00, 0xA4, 0x01, + 0x0A, 0x00, 0x05, 0x00, 0xA0, 0x00, 0x40, 0x1F, 0x00, 0xF8, 0x02, 0xD0, 0x7F, 0x00, 0xFE, 0x0B, 0xF0, 0xEF, 0x00, 0xFF, 0x0D, 0xD0, 0x77, 0x00, 0xF4, 0x01, + 0x0A, 0x00, 0x20, 0x00, 0x00, 0x3C, 0x00, 0xD4, 0x01, 0xD0, 0x06, 0x40, 0x7F, 0x00, 0xFD, 0x01, 0xF4, 0x07, 0xD0, 0x1F, 0x00, 0x7F, 0x00, 0xD0, 0x01, 0x00, + 0x0A, 0x40, 0x15, 0x00, 0xFE, 0x0B, 0x88, 0x2F, 0x52, 0xF0, 0x50, 0x01, 0x0A, 0xD4, 0xAF, 0x7F, 0xFD, 0xF5, 0xC7, 0x0B, 0x3E, 0x70, 0xD0, 0x00, 0xA8, 0x02, 0x0A, 0x80, 0x2F, 0x80, 0x5F, 0x2F, 0x0C, 0x00, 0xC3, 0x00, 0x30, 0x0C, 0x00, 0xC3, 0x01, 0x34, 0x34, 0xC0, 0x01, 0x07, 0x0D, 0xD0, 0x75, 0x00, 0xF4, 0x01, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xF4, 0x01, 0xC0, 0x3F, 0x00, 0xF0, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xF0, 0x00, 0xE0, 0xEF, 0x00, 0xBB, 0x0B, 0xA0, 0xAA, 0x00, 0xAA, 0x0A, 0x80, 0x19, 0x00, 0x64, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, @@ -229,6 +229,8 @@ char font_data[] = { 0x0A, 0x00, 0x00, 0x00, 0x54, 0x00, 0x90, 0x1A, 0x40, 0xFE, 0x06, 0xE4, 0x6F, 0x40, 0xFE, 0x06, 0x90, 0x1A, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x88, 0x88, 0x88, 0x55, 0x55, 0x55, 0xFF, 0x00, 0x54, 0x55, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x64, 0x00, 0xA5, 0x6B, 0x01, 0x64, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xFF, 0x86, 0xC0, 0x00, 0x2C, 0x40, 0xFE, 0x0B, 0xE4, 0xBF, 0x0C, 0xC0, 0xF2, 0x6F, 0x08, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x05, 0x00, 0xF4, 0x01, 0xC0, 0x30, 0x00, 0x0D, 0x07, 0xF0, 0xF0, 0x40, 0x5F, 0x1F, 0xFC, 0xFA, 0xD3, 0xFF, 0x7F, 0xFF, 0xF0, 0xDF, 0xFF, 0x7F, 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, @@ -236,9 +238,7 @@ char font_data[] = { 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, - 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, - 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, - 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, + 0x05, 0x74, 0x30, 0xC3, 0x0D, 0x33, 0xDC, 0x30, 0x93, 0xD9, 0xC0, 0x89, 0xD1, 0x01, 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0x99, 0x31, 0x30, 0x89, 0x41, 0x07, @@ -275,24 +275,24 @@ short font_ptrs[] = { 0x0524, 0x0537, 0x0547, 0x055A, 0x0565, 0x0573, 0x057E, 0x0589, 0x0599, 0x05A2, 0x05B0, 0x05BE, 0x05CC, 0x05DA, 0x05E8, 0x05F3, 0x0601, 0x060F, 0x061A, 0x0625, 0x0633, 0x063E, 0x064E, 0x065C, - 0x066A, 0x0678, 0x0686, 0x068F, 0x069D, 0x06A8, 0x06B6, 0x06C4, - 0x06D4, 0x06E2, 0x06F0, 0x06FE, 0x0709, 0x070F, 0x071A, 0x072A, - 0x0735, 0x074A, 0x0769, 0x0788, 0x07A2, 0x07C1, 0x07DB, 0x07F5, - 0x080F, 0x0829, 0x0843, 0x085D, 0x0877, 0x0896, 0x08A6, 0x08C0, - 0x08DA, 0x08F4, 0x090E, 0x0923, 0x0940, 0x095D, 0x097C, 0x099B, - 0x09B3, 0x09CB, 0x09E3, 0x09FB, 0x0A13, 0x0A2B, 0x0A43, 0x0A5B, - 0x0A73, 0x0A8B, 0x0AA3, 0x0ABD, 0x0ADA, 0x0AF7, 0x0B0C, 0x0B26, - 0x0B40, 0x0B5A, 0x0B74, 0x0B8C, 0x0B97, 0x0BA0, 0x0BA9, 0x0BB7, - 0x0BC5, 0x0BD3, 0x0BE1, 0x0BEF, 0x0BFD, 0x0C0B, 0x0C19, 0x0C27, - 0x0C35, 0x0C43, 0x0C4E, 0x0C57, 0x0C60, 0x0C6E, 0x0C7E, 0x0C8E, - 0x0CA8, 0x0CC2, 0x0CDC, 0x0CF6, 0x0D10, 0x0D2A, 0x0D44, 0x0D5E, - 0x0D78, 0x0D92, 0x0DAC, 0x0DC6, 0x0DE0, 0x0DFA, 0x0E14, 0x0E2E, - 0x0E46, 0x0E60, 0x0E7A, 0x0E94, 0x0EAE, 0x0EC8, 0x0EE2, 0x0EFC, - 0x0F16, 0x0F24, 0x0F39, 0x0F51, 0x0F6B, 0x0F85, 0x0F9F, 0x0FB9, - 0x0FD3, 0x0FF0, 0x100A, 0x101A, 0x102A, 0x103A, 0x104A, 0x105A, - 0x106A, 0x107A, 0x108A, 0x109A, 0x10AA, 0x10BA, 0x10CA, 0x10DA, - 0x10EA, 0x10FA, 0x110A, 0x111A, 0x112A, 0x113A, 0x114A, 0x115A, - 0x116A, 0x117A, 0x118A, 0x119A, 0x11AA, 0x11BA, 0x11CA, 0x11DA, + 0x066A, 0x0678, 0x0686, 0x0691, 0x069F, 0x06AA, 0x06B8, 0x06C6, + 0x06D6, 0x06E4, 0x06F2, 0x0700, 0x070B, 0x0711, 0x071C, 0x072C, + 0x0737, 0x074C, 0x076B, 0x078A, 0x07A4, 0x07C3, 0x07DD, 0x07F7, + 0x0811, 0x082B, 0x0845, 0x085F, 0x0879, 0x0898, 0x08A8, 0x08C2, + 0x08DC, 0x08F6, 0x0910, 0x0925, 0x0942, 0x095F, 0x097E, 0x099D, + 0x09B5, 0x09CD, 0x09E5, 0x09FD, 0x0A15, 0x0A2D, 0x0A45, 0x0A5D, + 0x0A75, 0x0A8D, 0x0AA5, 0x0ABF, 0x0ADC, 0x0AF9, 0x0B0E, 0x0B28, + 0x0B42, 0x0B5C, 0x0B76, 0x0B8E, 0x0B99, 0x0BA2, 0x0BAB, 0x0BB9, + 0x0BC7, 0x0BD5, 0x0BE3, 0x0BF1, 0x0BFF, 0x0C0D, 0x0C1B, 0x0C29, + 0x0C37, 0x0C45, 0x0C50, 0x0C59, 0x0C62, 0x0C70, 0x0C80, 0x0C90, + 0x0CAA, 0x0CC4, 0x0CDE, 0x0CF8, 0x0D12, 0x0D2C, 0x0D46, 0x0D60, + 0x0D7A, 0x0D94, 0x0DAE, 0x0DC8, 0x0DE2, 0x0DFC, 0x0E16, 0x0E30, + 0x0E48, 0x0E62, 0x0E7C, 0x0E96, 0x0EB0, 0x0ECA, 0x0EE4, 0x0EFE, + 0x0F18, 0x0F26, 0x0F3B, 0x0F53, 0x0F6D, 0x0F87, 0x0FA1, 0x0FBB, + 0x0FD5, 0x0FF2, 0x100C, 0x1026, 0x1040, 0x1050, 0x1060, 0x1070, + 0x1080, 0x1090, 0x10A0, 0x10B0, 0x10BE, 0x10CE, 0x10DE, 0x10EE, + 0x10FE, 0x110E, 0x111E, 0x112E, 0x113E, 0x114E, 0x115E, 0x116E, + 0x117E, 0x118E, 0x119E, 0x11AE, 0x11BE, 0x11CE, 0x11DE, 0x11EE, }; #endif #endif -- cgit v0.9.2-21-gd62e From db1dbb1afa9f74c3b3b69fb8d52b618ca245927e Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 13 Apr 2012 18:56:05 +0100 Subject: Text input dialogue diff --git a/src/dialogues/TextPrompt.cpp b/src/dialogues/TextPrompt.cpp new file mode 100644 index 0000000..6a0f877 --- /dev/null +++ b/src/dialogues/TextPrompt.cpp @@ -0,0 +1,70 @@ +/* + * ConfirmPrompt.cpp + * + * Created on: Apr 6, 2012 + * Author: Simon + */ + +#include "TextPrompt.h" +#include "interface/Label.h" +#include "interface/Button.h" + +class CloseAction: public ui::ButtonAction +{ +public: + TextPrompt * prompt; + TextPrompt::DialogueResult result; + CloseAction(TextPrompt * prompt_, TextPrompt::DialogueResult result_) { prompt = prompt_; result = result_; } + void ActionCallback(ui::Button * sender) + { + ui::Engine::Ref().CloseWindow(); + prompt->callback->TextCallback(result, prompt->textField->GetText()); + prompt->SelfDestruct(); //TODO: Fix component disposal + } +}; + +TextPrompt::TextPrompt(std::string title, std::string message, bool multiline, TextDialogueCallback * callback_): + ui::Window(ui::Point(-1, -1), ui::Point(200, 75)), + callback(callback_) +{ + ui::Label * titleLabel = new ui::Label(ui::Point(2, 1), ui::Point(Size.X-4, 16), title); + titleLabel->SetTextColour(ui::Colour(220, 220, 50)); + titleLabel->SetAlignment(AlignLeft, AlignBottom); + AddComponent(titleLabel); + + ui::Label * messageLabel = new ui::Label(ui::Point(4, 18), ui::Point(Size.X-8, 60), message); + messageLabel->SetAlignment(AlignLeft, AlignTop); + AddComponent(messageLabel); + + ui::Button * cancelButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(Size.X-50, 16), "Cancel"); + cancelButton->SetAlignment(AlignLeft, AlignBottom); + cancelButton->SetBorderColour(ui::Colour(200, 200, 200)); + cancelButton->SetActionCallback(new CloseAction(this, ResultCancel)); + AddComponent(cancelButton); + + ui::Button * okayButton = new ui::Button(ui::Point(Size.X-50, Size.Y-16), ui::Point(50, 16), "Continue"); + okayButton->SetAlignment(AlignLeft, AlignBottom); + okayButton->SetTextColour(ui::Colour(220, 220, 50)); + okayButton->SetActionCallback(new CloseAction(this, ResultOkay)); + AddComponent(okayButton); + + textField = new ui::Textbox(ui::Point(4, 32), ui::Point(Size.X-8, 16), ""); + textField->SetAlignment(AlignLeft, AlignBottom); + AddComponent(textField); + + ui::Engine::Ref().ShowWindow(this); +} + +void TextPrompt::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + + g->clearrect(Position.X-2, Position.Y-2, Size.X+4, Size.Y+4); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 200, 200, 200, 255); +} + +TextPrompt::~TextPrompt() { + if(callback) + delete callback; +} + diff --git a/src/dialogues/TextPrompt.h b/src/dialogues/TextPrompt.h new file mode 100644 index 0000000..efca128 --- /dev/null +++ b/src/dialogues/TextPrompt.h @@ -0,0 +1,35 @@ +/* + * ConfirmPrompt.h + * + * Created on: Apr 6, 2012 + * Author: Simon + */ + +#ifndef CONFIRMPROMPT_H_ +#define CONFIRMPROMPT_H_ + +#include "interface/Window.h" +#include "interface/Textbox.h" + +class TextDialogueCallback; +class TextPrompt: public ui::Window { +protected: + ui::Textbox * textField; +public: + //class CloseAction; + friend class CloseAction; + enum DialogueResult { ResultCancel, ResultOkay }; + TextPrompt(std::string title, std::string message, bool multiline, TextDialogueCallback * callback_); + virtual void OnDraw(); + virtual ~TextPrompt(); + TextDialogueCallback * callback; +}; + +class TextDialogueCallback +{ + public: + virtual void TextCallback(TextPrompt::DialogueResult result, std::string resultText) {} + virtual ~TextDialogueCallback() {} +}; + +#endif /* CONFIRMPROMPT_H_ */ -- cgit v0.9.2-21-gd62e From e060f75819cb764329c8253e94c13cb41bbe701b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 13 Apr 2012 19:00:40 +0100 Subject: Okay instead of Continue for text input dialogue diff --git a/src/dialogues/TextPrompt.cpp b/src/dialogues/TextPrompt.cpp index 6a0f877..8627786 100644 --- a/src/dialogues/TextPrompt.cpp +++ b/src/dialogues/TextPrompt.cpp @@ -42,7 +42,7 @@ TextPrompt::TextPrompt(std::string title, std::string message, bool multiline, T cancelButton->SetActionCallback(new CloseAction(this, ResultCancel)); AddComponent(cancelButton); - ui::Button * okayButton = new ui::Button(ui::Point(Size.X-50, Size.Y-16), ui::Point(50, 16), "Continue"); + ui::Button * okayButton = new ui::Button(ui::Point(Size.X-50, Size.Y-16), ui::Point(50, 16), "Okay"); okayButton->SetAlignment(AlignLeft, AlignBottom); okayButton->SetTextColour(ui::Colour(220, 220, 50)); okayButton->SetActionCallback(new CloseAction(this, ResultOkay)); -- cgit v0.9.2-21-gd62e From 66a451129cfc31318e793823c077215d7628e75f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 13 Apr 2012 20:55:14 +0100 Subject: Fix Integer <-> Pointer casts on 64bit diff --git a/src/cat/TPTSTypes.cpp b/src/cat/TPTSTypes.cpp index 7b39cc9..a8fa962 100644 --- a/src/cat/TPTSTypes.cpp +++ b/src/cat/TPTSTypes.cpp @@ -7,6 +7,7 @@ #include #include +#include #include "TPTSTypes.h" AnyType::AnyType(ValueType type_, void * value_): @@ -39,7 +40,7 @@ AnyType::operator NumberType() if(type != TypeNumber) throw InvalidConversionException(type, TypeNumber); else - return NumberType((int)value); + return NumberType((intptr_t)value); } AnyType::operator StringType() @@ -88,7 +89,7 @@ NumberType::NumberType(int number): AnyType(TypeNumber, (void*)number) { } int NumberType::Value() { - return (int)value; + return (intptr_t)value; } //String type -- cgit v0.9.2-21-gd62e From 216b5de60e5592e003eb5ba062b3c41ce8f5f341 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 14 Apr 2012 14:45:47 +0100 Subject: Add build to gitignore diff --git a/.gitignore b/.gitignore index 5d8d28f..d28e45e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ *~ *.pref stdout.txt -stderr.txt \ No newline at end of file +stderr.txt +build/* \ No newline at end of file -- cgit v0.9.2-21-gd62e From 20b3be68a7c4a931ba3d4d9d49c162f3418e1b9f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 14 Apr 2012 14:49:26 +0100 Subject: Remove some unnecessary files. diff --git a/src/Global.cpp b/src/Global.cpp deleted file mode 100644 index c1e0559..0000000 --- a/src/Global.cpp +++ /dev/null @@ -1,6 +0,0 @@ -/*#include "Global.h" - -Global::Global(){ - -} -*/ diff --git a/src/Global.h b/src/Global.h deleted file mode 100644 index ceff38e..0000000 --- a/src/Global.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef GAMESESSION_H -#define GAMESESSION_H - -#include "Singleton.h" -#include "Graphics.h" - -/*class Global : public Singleton -{ -public: - Graphics * g; - Global(); -};*/ - -#endif // GAMESESSION_H diff --git a/src/game/SaveLoadException.h b/src/game/SaveLoadException.h deleted file mode 100644 index fea2ad5..0000000 --- a/src/game/SaveLoadException.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SaveLoadException.h - * - * Created on: Mar 29, 2012 - * Author: Simon - */ - -#ifndef SAVELOADEXCEPTION_H_ -#define SAVELOADEXCEPTION_H_ - -#include -#include -using namespace std; - -struct SaveLoadException: public exception { - string message; -public: - SaveLoadException(string message_): message(message_) {} - const char * what() const throw() - { - return message.c_str(); - } - ~SaveLoadException() throw() {}; -}; - -#endif /* SAVELOADEXCEPTION_H_ */ diff --git a/src/interface/Spinner b/src/interface/Spinner deleted file mode 100644 index e69de29..0000000 -- cgit v0.9.2-21-gd62e From 1c5910fbabc605189e7018e0e928426e9e35d45f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 14 Apr 2012 15:14:02 +0100 Subject: Remove deleted 'Global.h' from includes diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index abe234c..f3e6afb 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -8,7 +8,6 @@ #include #include #include "Config.h" -#include "Global.h" #include "Graphics.h" #if defined(LIN32) || defined(LIN64) #include "icon.h" -- cgit v0.9.2-21-gd62e From 91064f4935ad29b35fd4dc30e785dd17cd5ea57c Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 14 Apr 2012 15:19:18 +0100 Subject: Remove other references to Global.h diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 095ef30..5444cdc 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -9,7 +9,6 @@ #include "interface/Button.h" #include "Graphics.h" -#include "Global.h" #include "Engine.h" #include "Misc.h" diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index c4833d1..6ac5502 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -3,7 +3,6 @@ #include "Config.h" #include -#include "Global.h" #include "interface/Window.h" #include "interface/Platform.h" #include "interface/Engine.h" diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp index e5f99a2..b6fbb5f 100644 --- a/src/interface/Label.cpp +++ b/src/interface/Label.cpp @@ -1,6 +1,5 @@ #include #include "Config.h" -#include "Global.h" #include "Point.h" #include "Label.h" diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index 338ef96..eacf0ef 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -3,7 +3,6 @@ #include "SaveButton.h" #include "search/Save.h" #include "Graphics.h" -#include "Global.h" #include "Engine.h" #include "client/Client.h" #include "simulation/SaveRenderer.h" diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp index bef3465..991ccac 100644 --- a/src/interface/Textbox.cpp +++ b/src/interface/Textbox.cpp @@ -2,7 +2,6 @@ #include #include #include "Config.h" -#include "Global.h" #include "interface/Point.h" #include "interface/Textbox.h" #include "interface/Keys.h" -- cgit v0.9.2-21-gd62e From 64063fbc0f070a0731c896394e30abebd848f358 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 14 Apr 2012 15:32:19 +0100 Subject: Add missing for OpenURI on 64bit Linux diff --git a/src/Misc.cpp b/src/Misc.cpp index 7020ea2..c52be54 100644 --- a/src/Misc.cpp +++ b/src/Misc.cpp @@ -664,9 +664,9 @@ void OpenURI(std::string uri) { strappend(cmd, (char*)uri.c_str()); system(cmd); #elif LIN64 - char *cmd = malloc(11+uri.length()); + char *cmd = (char*)malloc(11+uri.length()); strcpy(cmd, "xdg-open "); - strappend(cmd, uri.c_str()); + strappend(cmd, (char*)uri.c_str()); system(cmd); #else printf("Cannot open browser\n"); -- cgit v0.9.2-21-gd62e From 4c6be4ff2cc822d9c1ed36c9c88261771775dc02 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 14 Apr 2012 19:00:24 +0100 Subject: Graphics:: Extra icons for Report and Favourite. Client:: Get favourite status in GetSave, FavouriteSave, ReportSave, Preview:: Failure state when loading save diff --git a/src/Graphics.cpp b/src/Graphics.cpp index ad3696d..f948584 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -1190,9 +1190,14 @@ void Graphics::draw_icon(int x, int y, Icon icon) case IconPause: drawchar(x, y, 0x90, 255, 255, 255, 255); break; + case IconReport: + drawchar(x, y, 0xE3, 255, 255, 0, 255); + break; + case IconFavourite: + drawchar(x, y, 0xCC, 192, 160, 64, 255); + break; case IconVoteSort: case IconDateSort: - case IconFavourite: case IconFolder: case IconSearch: case IconDelete: diff --git a/src/Graphics.h b/src/Graphics.h index d2f9721..34305d7 100644 --- a/src/Graphics.h +++ b/src/Graphics.h @@ -72,7 +72,8 @@ enum Icon IconFavourite, IconFolder, IconSearch, - IconDelete + IconDelete, + IconReport }; class Graphics diff --git a/src/client/Client.cpp b/src/client/Client.cpp index b748005..2d65677 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -57,6 +57,14 @@ Client::Client(): authUser.SessionID = ((json::String)(configDocument["User"]["SessionID"])).Value(); authUser.SessionKey = ((json::String)(configDocument["User"]["SessionKey"])).Value(); authUser.Username = ((json::String)(configDocument["User"]["Username"])).Value(); + + std::string userElevation = ((json::String)(configDocument["User"]["Elevation"])).Value(); + if(userElevation == "Admin") + authUser.UserElevation = ElevationAdmin; + else if(userElevation == "Mod") + authUser.UserElevation = ElevationModerator; + else + authUser.UserElevation= ElevationNone; } catch (json::Exception &e) { @@ -117,6 +125,12 @@ Client::~Client() configDocument["User"]["SessionID"] = json::String(authUser.SessionID); configDocument["User"]["SessionKey"] = json::String(authUser.SessionKey); configDocument["User"]["Username"] = json::String(authUser.Username); + if(authUser.UserElevation == ElevationAdmin) + configDocument["User"]["Elevation"] = json::String("Admin"); + else if(authUser.UserElevation == ElevationModerator) + configDocument["User"]["Elevation"] = json::String("Mod"); + else + configDocument["User"]["Elevation"] = json::String("None"); } else { @@ -402,10 +416,18 @@ LoginStatus Client::Login(string username, string password, User & user) json::Number userIDTemp = objDocument["UserID"]; json::String sessionIDTemp = objDocument["SessionID"]; json::String sessionKeyTemp = objDocument["SessionKey"]; + json::String userElevationTemp = objDocument["Elevation"]; user.Username = username; user.ID = userIDTemp.Value(); user.SessionID = sessionIDTemp.Value(); user.SessionKey = sessionKeyTemp.Value(); + std::string userElevation = userElevationTemp.Value(); + if(userElevation == "Admin") + user.UserElevation = ElevationAdmin; + else if(userElevation == "Mod") + user.UserElevation = ElevationModerator; + else + user.UserElevation= ElevationNone; return LoginOkay; } else @@ -439,7 +461,175 @@ RequestStatus Client::DeleteSave(int saveID) std::stringstream urlStream; char * data = NULL; int dataStatus, dataLength; - urlStream << "http://" << SERVER << "/Browse/Delete.json?ID=" << saveID; + urlStream << "http://" << SERVER << "/Browse/Delete.json?ID=" << saveID << "&Mode=Delete&Key=" << authUser.SessionKey; + if(authUser.ID) + { + std::stringstream userIDStream; + userIDStream << authUser.ID; + data = http_auth_get((char *)urlStream.str().c_str(), (char *)(userIDStream.str().c_str()), NULL, (char *)(authUser.SessionID.c_str()), &dataStatus, &dataLength); + } + else + { + lastError = "Not authenticated"; + return RequestFailure; + } + if(dataStatus == 200 && data) + { + try + { + std::istringstream dataStream(data); + json::Object objDocument; + json::Reader::Read(objDocument, dataStream); + + int status = ((json::Number)objDocument["Status"]).Value(); + + if(status!=1) + goto failure; + } + catch (json::Exception &e) + { + lastError = "Could not read response"; + goto failure; + } + } + else + { + lastError = http_ret_text(dataStatus); + goto failure; + } + if(data) + free(data); + return RequestOkay; +failure: + if(data) + free(data); + return RequestFailure; +} + +RequestStatus Client::FavouriteSave(int saveID, bool favourite) +{ + lastError = ""; + std::vector * tags = NULL; + std::stringstream urlStream; + char * data = NULL; + int dataStatus, dataLength; + urlStream << "http://" << SERVER << "/Browse/Favourite.json?ID=" << saveID << "&Key=" << authUser.SessionKey; + if(!favourite) + urlStream << "&Mode=Remove"; + if(authUser.ID) + { + std::stringstream userIDStream; + userIDStream << authUser.ID; + data = http_auth_get((char *)urlStream.str().c_str(), (char *)(userIDStream.str().c_str()), NULL, (char *)(authUser.SessionID.c_str()), &dataStatus, &dataLength); + } + else + { + lastError = "Not authenticated"; + return RequestFailure; + } + if(dataStatus == 200 && data) + { + try + { + std::istringstream dataStream(data); + json::Object objDocument; + json::Reader::Read(objDocument, dataStream); + + int status = ((json::Number)objDocument["Status"]).Value(); + + if(status!=1) + { + lastError = ((json::String)objDocument["Error"]).Value(); + goto failure; + } + } + catch (json::Exception &e) + { + lastError = "Could not read response"; + goto failure; + } + } + else + { + lastError = http_ret_text(dataStatus); + goto failure; + } + if(data) + free(data); + return RequestOkay; +failure: + if(data) + free(data); + return RequestFailure; +} + +RequestStatus Client::ReportSave(int saveID, std::string message) +{ + lastError = ""; + std::vector * tags = NULL; + std::stringstream urlStream; + char * data = NULL; + int dataStatus, dataLength; + urlStream << "http://" << SERVER << "/Browse/Report.json?ID=" << saveID << "&Key=" << authUser.SessionKey; + if(authUser.ID) + { + std::stringstream userIDStream; + userIDStream << authUser.ID; + + char * postNames[] = { "Reason", NULL }; + char * postDatas[] = { (char*)(message.c_str()) }; + int postLengths[] = { message.length() }; + data = http_multipart_post((char *)urlStream.str().c_str(), postNames, postDatas, postLengths, (char *)(userIDStream.str().c_str()), NULL, (char *)(authUser.SessionID.c_str()), &dataStatus, &dataLength); + } + else + { + lastError = "Not authenticated"; + return RequestFailure; + } + if(dataStatus == 200 && data) + { + try + { + std::istringstream dataStream(data); + json::Object objDocument; + json::Reader::Read(objDocument, dataStream); + + int status = ((json::Number)objDocument["Status"]).Value(); + + if(status!=1) + { + lastError = ((json::String)objDocument["Error"]).Value(); + goto failure; + } + } + catch (json::Exception &e) + { + lastError = "Could not read response"; + goto failure; + } + } + else + { + lastError = http_ret_text(dataStatus); + goto failure; + } + if(data) + free(data); + return RequestOkay; +failure: + if(data) + free(data); + return RequestFailure; +} + +RequestStatus Client::UnpublishSave(int saveID) +{ + lastError = ""; + std::vector * tags = NULL; + std::stringstream urlStream; + char * data = NULL; + int dataStatus, dataLength; + urlStream << "http://" << SERVER << "/Browse/Delete.json?ID=" << saveID << "&Mode=Unpublish&Key=" << authUser.SessionKey; if(authUser.ID) { std::stringstream userIDStream; @@ -523,6 +713,7 @@ Save * Client::GetSave(int saveID, int saveDate) json::String tempDescription = objDocument["Description"]; json::Number tempDate = objDocument["Date"]; json::Boolean tempPublished = objDocument["Published"]; + json::Boolean tempFavourite = objDocument["Favourite"]; json::Array tagsArray = objDocument["Tags"]; vector tempTags; @@ -533,7 +724,7 @@ Save * Client::GetSave(int saveID, int saveDate) tempTags.push_back(tempTag.Value()); } - return new Save( + Save * tempSave = new Save( tempID.Value(), tempDate.Value(), tempScoreUp.Value(), @@ -545,6 +736,8 @@ Save * Client::GetSave(int saveID, int saveDate) tempPublished.Value(), tempTags ); + tempSave->Favourite = tempFavourite.Value(); + return tempSave; } catch (json::Exception &e) { @@ -597,8 +790,8 @@ Thumbnail * Client::GetPreview(int saveID, int saveDate) { free(data); } - return new Thumbnail(saveID, saveDate, (pixel *)malloc((128*128) * PIXELSIZE), ui::Point(128, 128)); } + return new Thumbnail(saveID, saveDate, (pixel *)malloc((128*128) * PIXELSIZE), ui::Point(128, 128)); } std::vector * Client::GetComments(int saveID, int start, int count) @@ -856,7 +1049,7 @@ std::vector * Client::RemoveTag(int saveID, string tag) std::stringstream urlStream; char * data = NULL; int dataStatus, dataLength; - urlStream << "http://" << SERVER << "/Browse/EditTag.json?Op=delete&ID=" << saveID << "&Tag=" << tag; + urlStream << "http://" << SERVER << "/Browse/EditTag.json?Op=delete&ID=" << saveID << "&Tag=" << tag << "&Key=" << authUser.SessionKey;; if(authUser.ID) { std::stringstream userIDStream; @@ -905,7 +1098,7 @@ std::vector * Client::AddTag(int saveID, string tag) std::stringstream urlStream; char * data = NULL; int dataStatus, dataLength; - urlStream << "http://" << SERVER << "/Browse/EditTag.json?Op=add&ID=" << saveID << "&Tag=" << tag; + urlStream << "http://" << SERVER << "/Browse/EditTag.json?Op=add&ID=" << saveID << "&Tag=" << tag << "&Key=" << authUser.SessionKey; if(authUser.ID) { std::stringstream userIDStream; diff --git a/src/client/Client.h b/src/client/Client.h index d0ea14b..2867f53 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -68,6 +68,9 @@ public: Thumbnail * GetThumbnail(int saveID, int saveDate); Save * GetSave(int saveID, int saveDate); RequestStatus DeleteSave(int saveID); + RequestStatus ReportSave(int saveID, std::string message); + RequestStatus UnpublishSave(int saveID); + RequestStatus FavouriteSave(int saveID, bool favourite); void SetAuthUser(User user); User GetAuthUser(); std::vector * RemoveTag(int saveID, string tag); //TODO RequestStatus diff --git a/src/dialogues/TextPrompt.h b/src/dialogues/TextPrompt.h index efca128..8016d56 100644 --- a/src/dialogues/TextPrompt.h +++ b/src/dialogues/TextPrompt.h @@ -16,7 +16,6 @@ class TextPrompt: public ui::Window { protected: ui::Textbox * textField; public: - //class CloseAction; friend class CloseAction; enum DialogueResult { ResultCancel, ResultOkay }; TextPrompt(std::string title, std::string message, bool multiline, TextDialogueCallback * callback_); diff --git a/src/preview/PreviewController.cpp b/src/preview/PreviewController.cpp index 558ccb4..a6e21c6 100644 --- a/src/preview/PreviewController.cpp +++ b/src/preview/PreviewController.cpp @@ -6,13 +6,17 @@ */ #include +#include "client/Client.h" #include "PreviewController.h" #include "PreviewView.h" #include "PreviewModel.h" +#include "PreviewModelException.h" +#include "dialogues/ErrorMessage.h" #include "Controller.h" PreviewController::PreviewController(int saveID, ControllerCallback * callback): - HasExited(false) + HasExited(false), + saveId(saveID) { previewModel = new PreviewModel(); previewView = new PreviewView(); @@ -26,7 +30,14 @@ PreviewController::PreviewController(int saveID, ControllerCallback * callback): void PreviewController::Update() { - previewModel->Update(); + try + { + previewModel->Update(); + } + catch (PreviewModelException & e) + { + new ErrorMessage("Error", e.what()); + } } Save * PreviewController::GetSave() @@ -44,6 +55,22 @@ void PreviewController::DoOpen() previewModel->SetDoOpen(true); } +void PreviewController::Report(std::string message) +{ + if(Client::Ref().ReportSave(saveId, message) == RequestOkay) + { + Exit(); + new ErrorMessage("Information", "Report submitted"); //TODO: InfoMessage + } + else + new ErrorMessage("Error", "Unable file report"); +} + +void PreviewController::FavouriteSave() +{ + previewModel->SetFavourite(true); +} + void PreviewController::OpenInBrowser() { if(previewModel->GetSave()) diff --git a/src/preview/PreviewController.h b/src/preview/PreviewController.h index 595a30f..e1b0295 100644 --- a/src/preview/PreviewController.h +++ b/src/preview/PreviewController.h @@ -16,6 +16,7 @@ class PreviewModel; class PreviewView; class PreviewController { + int saveId; PreviewModel * previewModel; PreviewView * previewView; ControllerCallback * callback; @@ -25,10 +26,12 @@ public: void Exit(); void DoOpen(); void OpenInBrowser(); + void Report(std::string message); bool GetDoOpen(); Save * GetSave(); PreviewView * GetView() { return previewView; } void Update(); + void FavouriteSave(); virtual ~PreviewController(); }; diff --git a/src/preview/PreviewModel.cpp b/src/preview/PreviewModel.cpp index 371d917..71c4d4a 100644 --- a/src/preview/PreviewModel.cpp +++ b/src/preview/PreviewModel.cpp @@ -7,6 +7,7 @@ #include "PreviewModel.h" #include "client/Client.h" +#include "PreviewModelException.h" PreviewModel::PreviewModel(): save(NULL), @@ -60,6 +61,16 @@ void * PreviewModel::updateSaveCommentsT() return tempComments; } +void PreviewModel::SetFavourite(bool favourite) +{ + //if(save) + { + Client::Ref().FavouriteSave(save->id, favourite); + save->Favourite = favourite; + notifySaveChanged(); + } +} + void PreviewModel::UpdateSave(int saveID, int saveDate) { this->tSaveID = saveID; @@ -192,6 +203,8 @@ void PreviewModel::Update() updateSaveInfoWorking = false; pthread_join(updateSaveInfoThread, (void**)(&save)); notifySaveChanged(); + if(!save) + throw PreviewModelException("Unable to load save"); } } diff --git a/src/preview/PreviewModel.h b/src/preview/PreviewModel.h index 84ce83d..91ca972 100644 --- a/src/preview/PreviewModel.h +++ b/src/preview/PreviewModel.h @@ -56,6 +56,7 @@ public: std::vector * GetComments(); void AddObserver(PreviewView * observer); void UpdateSave(int saveID, int saveDate); + void SetFavourite(bool favourite); bool GetDoOpen(); void SetDoOpen(bool doOpen); void Update(); diff --git a/src/preview/PreviewModelException.h b/src/preview/PreviewModelException.h new file mode 100644 index 0000000..261d203 --- /dev/null +++ b/src/preview/PreviewModelException.h @@ -0,0 +1,26 @@ +/* + * PreviewModelException.h + * + * Created on: Apr 14, 2012 + * Author: Simon + */ + +#ifndef PREVIEWMODELEXCEPTION_H_ +#define PREVIEWMODELEXCEPTION_H_ + +#include +#include +using namespace std; + +struct PreviewModelException: public exception { + string message; +public: + PreviewModelException(string message_): message(message_) {} + const char * what() const throw() + { + return message.c_str(); + } + ~PreviewModelException() throw() {}; +}; + +#endif /* PREVIEWMODELEXCEPTION_H_ */ diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index aae792d..7df1f6b 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -7,6 +7,7 @@ #include #include "PreviewView.h" +#include "dialogues/TextPrompt.h" #include "interface/Point.h" #include "interface/Window.h" #include "search/Thumbnail.h" @@ -32,6 +33,50 @@ PreviewView::PreviewView(): openButton->SetActionCallback(new OpenAction(this)); AddComponent(openButton); + class FavAction: public ui::ButtonAction + { + PreviewView * v; + public: + FavAction(PreviewView * v_){ v = v_; } + virtual void ActionCallback(ui::Button * sender) + { + v->c->FavouriteSave(); + } + }; + + favButton = new ui::Button(ui::Point(50, Size.Y-16), ui::Point(50, 16), "Fav."); + favButton->SetAlignment(AlignLeft, AlignMiddle); + favButton->SetIcon(IconFavourite); + favButton->SetActionCallback(new FavAction(this)); + AddComponent(favButton); + + class ReportPromptCallback: public TextDialogueCallback { + public: + PreviewView * v; + ReportPromptCallback(PreviewView * v_) { v = v_; } + virtual void TextCallback(TextPrompt::DialogueResult result, std::string resultText) { + if (result == TextPrompt::ResultOkay) + v->c->Report(resultText); + } + virtual ~ReportPromptCallback() { } + }; + + class ReportAction: public ui::ButtonAction + { + PreviewView * v; + public: + ReportAction(PreviewView * v_){ v = v_; } + virtual void ActionCallback(ui::Button * sender) + { + new TextPrompt("Report Save", "Reason for reporting", true, new ReportPromptCallback(v)); + } + }; + reportButton = new ui::Button(ui::Point(100, Size.Y-16), ui::Point(50, 16), "Report"); + reportButton->SetAlignment(AlignLeft, AlignMiddle); + reportButton->SetIcon(IconReport); + reportButton->SetActionCallback(new ReportAction(this)); + AddComponent(reportButton); + class BrowserOpenAction: public ui::ButtonAction { PreviewView * v; @@ -42,7 +87,8 @@ PreviewView::PreviewView(): v->c->OpenInBrowser(); } }; - browserOpenButton = new ui::Button(ui::Point((XRES/2)-90, Size.Y-16), ui::Point(90, 16), "Open in browser"); + + browserOpenButton = new ui::Button(ui::Point((XRES/2)-110, Size.Y-16), ui::Point(110, 16), "Open in browser"); browserOpenButton->SetAlignment(AlignLeft, AlignMiddle); browserOpenButton->SetIcon(IconOpen); browserOpenButton->SetActionCallback(new BrowserOpenAction(this)); @@ -114,6 +160,10 @@ void PreviewView::NotifySaveChanged(PreviewModel * sender) saveNameLabel->SetText(save->name); authorDateLabel->SetText("\bgAuthor:\bw " + save->userName + " \bgDate:\bw "); saveDescriptionTextblock->SetText(save->Description); + if(save->Favourite) + favButton->Enabled = false; + else + favButton->Enabled = true; } else { @@ -122,6 +172,7 @@ void PreviewView::NotifySaveChanged(PreviewModel * sender) saveNameLabel->SetText(""); authorDateLabel->SetText(""); saveDescriptionTextblock->SetText(""); + favButton->Enabled = false; } } diff --git a/src/preview/PreviewView.h b/src/preview/PreviewView.h index 11ed4bd..367736a 100644 --- a/src/preview/PreviewView.h +++ b/src/preview/PreviewView.h @@ -24,6 +24,8 @@ class PreviewView: public ui::Window { Thumbnail * savePreview; ui::Button * openButton; ui::Button * browserOpenButton; + ui::Button * favButton; + ui::Button * reportButton; ui::Label * saveNameLabel; ui::Label * authorDateLabel; ui::Textblock * saveDescriptionTextblock; diff --git a/src/search/Save.h b/src/search/Save.h index 00387ae..0b213e2 100644 --- a/src/search/Save.h +++ b/src/search/Save.h @@ -18,6 +18,7 @@ public: int votesUp, votesDown; unsigned char * data; int dataLength; + bool Favourite; Save(Save & save); diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 90cd41b..09fde71 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -6,6 +6,7 @@ #include "SearchView.h" #include "interface/Panel.h" #include "dialogues/ConfirmPrompt.h" +#include "dialogues/ErrorMessage.h" #include "preview/PreviewController.h" #include "client/Client.h" #include "tasks/Task.h" @@ -206,15 +207,58 @@ void SearchController::removeSelectedC() void SearchController::UnpublishSelected() { + class UnpublishSelectedConfirmation: public ConfirmDialogueCallback { + public: + SearchController * c; + UnpublishSelectedConfirmation(SearchController * c_) { c = c_; } + virtual void ConfirmCallback(ConfirmPrompt::DialogueResult result) { + if (result == ConfirmPrompt::ResultOkay) + c->unpublishSelectedC(); + } + virtual ~UnpublishSelectedConfirmation() { } + }; + std::stringstream desc; + desc << "Are you sure you want to hide " << searchModel->GetSelected().size() << " save"; + if(searchModel->GetSelected().size()>1) + desc << "s"; + new ConfirmPrompt("Unpublish saves", desc.str(), new UnpublishSelectedConfirmation(this)); } void SearchController::unpublishSelectedC() { + class UnpublishSavesTask : public Task + { + std::vector saves; + public: + UnpublishSavesTask(std::vector saves_) { saves = saves_; } + virtual void doWork() + { + for(int i = 0; i < saves.size(); i++) + { + std::stringstream saveID; + saveID << "Hiding save [" << saves[i] << "] ..."; + notifyStatus(saveID.str()); + if(Client::Ref().UnpublishSave(saves[i])!=RequestOkay) + { + std::stringstream saveIDF; + saveIDF << "\boFailed to hide [" << saves[i] << "] ..."; + notifyStatus(saveIDF.str()); + usleep(500*1000); + } + usleep(100*1000); + notifyProgress((float(i+1)/float(saves.size())*100)); + } + } + }; + + std::vector selected = searchModel->GetSelected(); + new TaskWindow("Unpublishing saves", new UnpublishSavesTask(selected)); ClearSelection(); } void SearchController::FavouriteSelected() { + new ErrorMessage("Not impletemented", "Not ermplermerterd"); ClearSelection(); } diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 4064658..5a1c6c7 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -163,6 +163,25 @@ SearchView::SearchView(): clearSelection->Visible = false; clearSelection->SetActionCallback(new ClearSelectionAction(this)); AddComponent(clearSelection); + + if(Client::Ref().GetAuthUser().ID) + { + favouriteSelected->Enabled = true; + if((Client::Ref().GetAuthUser().UserElevation == ElevationAdmin || Client::Ref().GetAuthUser().UserElevation == ElevationModerator)) + { + unpublishSelected->Enabled = true; + removeSelected->Enabled = true; + } + else + { + unpublishSelected->Enabled = false; + removeSelected->Enabled = false; + } + } + else + { + favouriteSelected->Enabled = true; + } } void SearchView::doSearch() @@ -182,6 +201,16 @@ void SearchView::NotifySortChanged(SearchModel * sender) void SearchView::NotifyShowOwnChanged(SearchModel * sender) { ownButton->SetToggleState(sender->GetShowOwn()); + if(sender->GetShowOwn() || Client::Ref().GetAuthUser().UserElevation == ElevationAdmin || Client::Ref().GetAuthUser().UserElevation == ElevationModerator) + { + unpublishSelected->Enabled = true; + removeSelected->Enabled = true; + } + else + { + unpublishSelected->Enabled = false; + removeSelected->Enabled = false; + } } void SearchView::NotifyPageChanged(SearchModel * sender) @@ -233,6 +262,7 @@ void SearchView::NotifySaveListChanged(SearchModel * sender) } if(!saves.size()) { + loadingSpinner->Visible = false; if(!errorLabel) { errorLabel = new ui::Label(ui::Point(((XRES+BARSIZE)/2)-100, ((YRES+MENUSIZE)/2)-6), ui::Point(200, 12), "Error"); -- cgit v0.9.2-21-gd62e From 900e23128a16bd49d8929a232ac57fc7e30ad3f9 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 14 Apr 2012 21:11:54 +0100 Subject: Add ability to get favourites diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 2d65677..9e4732b 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -840,7 +840,7 @@ std::vector * Client::GetComments(int saveID, int start, int count) return commentArray; } -std::vector * Client::SearchSaves(int start, int count, string query, string sort, bool showOwn, int & resultCount) +std::vector * Client::SearchSaves(int start, int count, string query, string sort, std::string category, int & resultCount) { lastError = ""; resultCount = 0; @@ -860,15 +860,21 @@ std::vector * Client::SearchSaves(int start, int count, string query, str urlStream << URLEscape(" "); urlStream << URLEscape("sort:") << URLEscape(sort); } - if(showOwn && authUser.ID) - { - if(query.length()) - urlStream << URLEscape(" "); - urlStream << URLEscape("user:") << URLEscape(authUser.Username); - } - } - data = http_simple_get((char *)urlStream.str().c_str(), &dataStatus, &dataLength); + if(category.length()) + { + urlStream << "&Category=" << URLEscape(category); + } + if(authUser.ID) + { + std::stringstream userIDStream; + userIDStream << authUser.ID; + data = http_auth_get((char *)urlStream.str().c_str(), (char *)(userIDStream.str().c_str()), NULL, (char *)(authUser.SessionID.c_str()), &dataStatus, &dataLength); + } + else + { + data = http_simple_get((char *)urlStream.str().c_str(), &dataStatus, &dataLength); + } if(dataStatus == 200 && data) { try diff --git a/src/client/Client.h b/src/client/Client.h index 2867f53..ff571f8 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -62,7 +62,7 @@ public: unsigned char * GetSaveData(int saveID, int saveDate, int & dataLength); LoginStatus Login(string username, string password, User & user); void ClearThumbnailRequests(); - std::vector * SearchSaves(int start, int count, string query, string sort, bool showOwn, int & resultCount); + std::vector * SearchSaves(int start, int count, string query, string sort, string category, int & resultCount); std::vector * GetComments(int saveID, int start, int count); Thumbnail * GetPreview(int saveID, int saveDate); Thumbnail * GetThumbnail(int saveID, int saveDate); diff --git a/src/options/OptionsController.cpp b/src/options/OptionsController.cpp new file mode 100644 index 0000000..ca9a332 --- /dev/null +++ b/src/options/OptionsController.cpp @@ -0,0 +1,18 @@ +/* + * OptionsController.cpp + * + * Created on: Apr 14, 2012 + * Author: Simon + */ + +#include "OptionsController.h" + +OptionsController::OptionsController() { + // TODO Auto-generated constructor stub + +} + +OptionsController::~OptionsController() { + // TODO Auto-generated destructor stub +} + diff --git a/src/options/OptionsController.h b/src/options/OptionsController.h new file mode 100644 index 0000000..6621f2f --- /dev/null +++ b/src/options/OptionsController.h @@ -0,0 +1,17 @@ +/* + * OptionsController.h + * + * Created on: Apr 14, 2012 + * Author: Simon + */ + +#ifndef OPTIONSCONTROLLER_H_ +#define OPTIONSCONTROLLER_H_ + +class OptionsController { +public: + OptionsController(); + virtual ~OptionsController(); +}; + +#endif /* OPTIONSCONTROLLER_H_ */ diff --git a/src/options/OptionsModel.cpp b/src/options/OptionsModel.cpp new file mode 100644 index 0000000..9aed1cc --- /dev/null +++ b/src/options/OptionsModel.cpp @@ -0,0 +1,18 @@ +/* + * OptionsModel.cpp + * + * Created on: Apr 14, 2012 + * Author: Simon + */ + +#include "OptionsModel.h" + +OptionsModel::OptionsModel() { + // TODO Auto-generated constructor stub + +} + +OptionsModel::~OptionsModel() { + // TODO Auto-generated destructor stub +} + diff --git a/src/options/OptionsModel.h b/src/options/OptionsModel.h new file mode 100644 index 0000000..f04d071 --- /dev/null +++ b/src/options/OptionsModel.h @@ -0,0 +1,17 @@ +/* + * OptionsModel.h + * + * Created on: Apr 14, 2012 + * Author: Simon + */ + +#ifndef OPTIONSMODEL_H_ +#define OPTIONSMODEL_H_ + +class OptionsModel { +public: + OptionsModel(); + virtual ~OptionsModel(); +}; + +#endif /* OPTIONSMODEL_H_ */ diff --git a/src/options/OptionsView.cpp b/src/options/OptionsView.cpp new file mode 100644 index 0000000..1c79961 --- /dev/null +++ b/src/options/OptionsView.cpp @@ -0,0 +1,19 @@ +/* + * OptionsView.cpp + * + * Created on: Apr 14, 2012 + * Author: Simon + */ + +#include "OptionsView.h" + +OptionsView::OptionsView(): + ui::Window(ui::Point(-1, -1), ui::Point(300, 300)){ + // TODO Auto-generated constructor stub + +} + +OptionsView::~OptionsView() { + // TODO Auto-generated destructor stub +} + diff --git a/src/options/OptionsView.h b/src/options/OptionsView.h new file mode 100644 index 0000000..6a75f06 --- /dev/null +++ b/src/options/OptionsView.h @@ -0,0 +1,19 @@ +/* + * OptionsView.h + * + * Created on: Apr 14, 2012 + * Author: Simon + */ + +#ifndef OPTIONSVIEW_H_ +#define OPTIONSVIEW_H_ + +#include "interface/Window.h" + +class OptionsView: public ui::Window { +public: + OptionsView(); + virtual ~OptionsView(); +}; + +#endif /* OPTIONSVIEW_H_ */ diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 09fde71..b0936ef 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -121,14 +121,31 @@ void SearchController::ChangeSort() { searchModel->SetSort("new"); } + searchModel->UpdateSaveList(1, searchModel->GetLastQuery()); } void SearchController::ShowOwn(bool show) { if(Client::Ref().GetAuthUser().ID) + { + searchModel->SetShowFavourite(false); searchModel->SetShowOwn(show); + } else searchModel->SetShowOwn(false); + searchModel->UpdateSaveList(1, searchModel->GetLastQuery()); +} + +void SearchController::ShowFavourite(bool show) +{ + if(Client::Ref().GetAuthUser().ID) + { + searchModel->SetShowOwn(false); + searchModel->SetShowFavourite(show); + } + else + searchModel->SetShowFavourite(false); + searchModel->UpdateSaveList(1, searchModel->GetLastQuery()); } void SearchController::Selected(int saveID, bool selected) diff --git a/src/search/SearchController.h b/src/search/SearchController.h index 3168419..ae13431 100644 --- a/src/search/SearchController.h +++ b/src/search/SearchController.h @@ -35,6 +35,7 @@ public: void PrevPage(); void ChangeSort(); void ShowOwn(bool show); + void ShowFavourite(bool show); void Selected(int saveID, bool selected); void OpenSave(int saveID); void Update(); diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp index e1d9849..76d0bb7 100644 --- a/src/search/SearchModel.cpp +++ b/src/search/SearchModel.cpp @@ -6,6 +6,7 @@ SearchModel::SearchModel(): currentSort("best"), showOwn(false), + showFavourite(false), loadedSave(NULL), updateSaveListWorking(false), updateSaveListFinished(false), @@ -22,7 +23,12 @@ void * SearchModel::updateSaveListTHelper(void * obj) void * SearchModel::updateSaveListT() { - vector * tempSaveList = Client::Ref().SearchSaves((currentPage-1)*20, 20, lastQuery, currentSort=="new"?"date":"votes", showOwn, resultCount); + std::string category = ""; + if(showFavourite) + category = "Favourites"; + if(showOwn && Client::Ref().GetAuthUser().ID) + category = "by:"+Client::Ref().GetAuthUser().Username; + vector * tempSaveList = Client::Ref().SearchSaves((currentPage-1)*20, 20, lastQuery, currentSort=="new"?"date":"votes", category, resultCount); updateSaveListFinished = true; return tempSaveList; } @@ -162,6 +168,15 @@ void SearchModel::notifyShowOwnChanged() } } +void SearchModel::notifyShowFavouriteChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + SearchView* cObserver = observers[i]; + cObserver->NotifyShowOwnChanged(this); + } +} + void SearchModel::notifySelectedChanged() { for(int i = 0; i < observers.size(); i++) diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index 8f2ae58..980c06d 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -24,11 +24,13 @@ private: int currentPage; int resultCount; bool showOwn; + bool showFavourite; void notifySaveListChanged(); void notifySelectedChanged(); void notifyPageChanged(); void notifySortChanged(); void notifyShowOwnChanged(); + void notifyShowFavouriteChanged(); //Variables and methods for backgroun save request bool saveListLoaded; @@ -48,10 +50,12 @@ public: int GetPageCount() { return max(1, (int)(ceil(resultCount/16))); } int GetPageNum() { return currentPage; } std::string GetLastQuery() { return lastQuery; } - void SetSort(string sort) { currentSort = sort; UpdateSaveList(1, lastQuery); notifySortChanged(); } + void SetSort(string sort) { currentSort = sort; notifySortChanged(); } string GetSort() { return currentSort; } - void SetShowOwn(bool show) { if(show!=showOwn) { showOwn = show; UpdateSaveList(1, lastQuery); } notifyShowOwnChanged(); } + void SetShowOwn(bool show) { if(show!=showOwn) { showOwn = show; } notifyShowOwnChanged(); } bool GetShowOwn() { return showOwn; } + void SetShowFavourite(bool show) { if(show!=showFavourite) { showFavourite = show; } notifyShowFavouriteChanged(); } + bool GetShowFavourite() { return showFavourite; } void SetLoadedSave(Save * save); Save * GetLoadedSave(); bool GetSavesLoaded() { return saveListLoaded; } diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp index 5a1c6c7..ffaa471 100644 --- a/src/search/SearchView.cpp +++ b/src/search/SearchView.cpp @@ -27,7 +27,7 @@ SearchView::SearchView(): v->doSearch(); } }; - searchField = new ui::Textbox(ui::Point(60, 10), ui::Point((XRES+BARSIZE)-((60*2)+16+10+50+10), 16), ""); + searchField = new ui::Textbox(ui::Point(60, 10), ui::Point((XRES+BARSIZE)-226, 16), ""); searchField->SetAlignment(AlignLeft, AlignBottom); searchField->SetActionCallback(new SearchAction(this)); @@ -41,7 +41,7 @@ SearchView::SearchView(): v->c->ChangeSort(); } }; - sortButton = new ui::Button(ui::Point(XRES+BARSIZE-60-60-16-10+5, 10), ui::Point(60, 16), "Sort"); + sortButton = new ui::Button(ui::Point(XRES+BARSIZE-140, 10), ui::Point(60, 16), "Sort"); sortButton->SetActionCallback(new SortAction(this)); sortButton->SetAlignment(AlignCentre, AlignBottom); AddComponent(sortButton); @@ -56,7 +56,7 @@ SearchView::SearchView(): v->c->ShowOwn(sender->GetToggleState()); } }; - ownButton = new ui::Button(ui::Point(XRES+BARSIZE-60-16-10+10, 10), ui::Point(60, 16), "My Own"); + ownButton = new ui::Button(ui::Point(XRES+BARSIZE-70, 10), ui::Point(60, 16), "My Own"); ownButton->SetTogglable(true); ownButton->SetActionCallback(new MyOwnAction(this)); if(!Client::Ref().GetAuthUser().ID) @@ -64,6 +64,25 @@ SearchView::SearchView(): ownButton->SetAlignment(AlignCentre, AlignBottom); AddComponent(ownButton); + class FavAction : public ui::ButtonAction + { + SearchView * v; + public: + FavAction(SearchView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->ShowFavourite(sender->GetToggleState()); + } + }; + favButton = new ui::Button(searchField->Position+ui::Point(searchField->Size.X, 0), ui::Point(16, 16), ""); + favButton->SetIcon(IconFavourite); + favButton->SetTogglable(true); + favButton->SetActionCallback(new FavAction(this)); + if(!Client::Ref().GetAuthUser().ID) + favButton->Enabled = false; + favButton->SetAlignment(AlignCentre, AlignBottom); + AddComponent(favButton); + class NextPageAction : public ui::ButtonAction { SearchView * v; @@ -206,6 +225,31 @@ void SearchView::NotifyShowOwnChanged(SearchModel * sender) unpublishSelected->Enabled = true; removeSelected->Enabled = true; } + else if(sender->GetShowFavourite()) + { + unpublishSelected->Enabled = false; + removeSelected->Enabled = true; + } + else + { + unpublishSelected->Enabled = false; + removeSelected->Enabled = false; + } +} + +void SearchView::NotifyShowFavouriteChanged(SearchModel * sender) +{ + favButton->SetToggleState(sender->GetShowFavourite()); + if(sender->GetShowFavourite()) + { + unpublishSelected->Enabled = false; + removeSelected->Enabled = true; + } + else if(sender->GetShowOwn() || Client::Ref().GetAuthUser().UserElevation == ElevationAdmin || Client::Ref().GetAuthUser().UserElevation == ElevationModerator) + { + unpublishSelected->Enabled = true; + removeSelected->Enabled = true; + } else { unpublishSelected->Enabled = false; diff --git a/src/search/SearchView.h b/src/search/SearchView.h index ed4b06e..6e27f06 100644 --- a/src/search/SearchView.h +++ b/src/search/SearchView.h @@ -19,6 +19,7 @@ class SearchView: public ui::Window private: SearchController * c; vector saveButtons; + ui::Button * favButton; ui::Button * nextButton; ui::Button * previousButton; ui::Label * errorLabel; @@ -39,6 +40,7 @@ public: void NotifyPageChanged(SearchModel * sender); void NotifySortChanged(SearchModel * sender); void NotifyShowOwnChanged(SearchModel * sender); + void NotifyShowFavouriteChanged(SearchModel * sender); SearchView(); virtual ~SearchView(); void AttachController(SearchController * _c) { c = _c; } -- cgit v0.9.2-21-gd62e From a0506495ad71a18ba2976d31d437dfd6bd8241f8 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 15 Apr 2012 22:16:57 +0100 Subject: Simulation options diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 40d7501..cf100ea 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -59,6 +59,17 @@ public: } }; +class GameController::OptionsCallback: public ControllerCallback +{ + GameController * cc; +public: + OptionsCallback(GameController * cc_) { cc = cc_; } + virtual void ControllerExit() + { + //cc->gameModel->SetUser(cc->loginWindow->GetUser()); + } +}; + class GameController::SSaveCallback: public ControllerCallback { GameController * cc; @@ -108,7 +119,8 @@ GameController::GameController(): loginWindow(NULL), ssave(NULL), console(NULL), - tagsWindow(NULL) + tagsWindow(NULL), + options(NULL) { gameView = new GameView(); gameModel = new GameModel(); @@ -484,9 +496,11 @@ void GameController::OpenStamps() ui::Engine::Ref().ShowWindow(stamps->GetView()); } -void GameController::OpenDisplayOptions() +void GameController::OpenOptions() { - //TODO: Implement + options = new OptionsController(gameModel->GetSimulation(), new OptionsCallback(this)); + ui::Engine::Ref().ShowWindow(options->GetView()); + } void GameController::ShowConsole() diff --git a/src/game/GameController.h b/src/game/GameController.h index b9629ed..8f49668 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -15,6 +15,7 @@ #include "stamps/StampsController.h" //#include "cat/TPTScriptInterface.h" #include "cat/LuaScriptInterface.h" +#include "options/OptionsController.h" #include "Menu.h" using namespace std; @@ -36,6 +37,7 @@ private: ConsoleController * console; TagsController * tagsWindow; StampsController * stamps; + OptionsController * options; CommandInterface * commandInterface; public: class LoginCallback; @@ -44,6 +46,7 @@ public: class SSaveCallback; class TagsCallback; class StampsCallback; + class OptionsCallback; GameController(); ~GameController(); GameView * GetView(); @@ -77,7 +80,7 @@ public: void OpenSearch(); void OpenLogin(); void OpenTags(); - void OpenDisplayOptions(); + void OpenOptions(); void OpenRenderOptions(); void OpenSaveWindow(); void OpenStamps(); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index d27230b..3c47568 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -169,7 +169,7 @@ GameView::GameView(): SimulationOptionAction(GameView * _v) { v = _v; } void ActionCallback(ui::Button * sender) { - v->c->OpenDisplayOptions(); + v->c->OpenOptions(); } }; simulationOptionButton = new ui::Button(ui::Point(Size.X-54, Size.Y-18), ui::Point(16, 16)); diff --git a/src/options/OptionsController.cpp b/src/options/OptionsController.cpp index ca9a332..b39509c 100644 --- a/src/options/OptionsController.cpp +++ b/src/options/OptionsController.cpp @@ -7,12 +7,60 @@ #include "OptionsController.h" -OptionsController::OptionsController() { - // TODO Auto-generated constructor stub +OptionsController::OptionsController(Simulation * sim, ControllerCallback * callback_): + callback(callback_), + HasExited(false) +{ + view = new OptionsView(); + model = new OptionsModel(sim); + model->AddObserver(view); + view->AttachController(this); + +} + +void OptionsController::SetHeatSimulation(bool state) +{ + model->SetHeatSimulation(state); +} + +void OptionsController::SetAmbientHeatSimulation(bool state) +{ + model->SetAmbientHeatSimulation(state); +} + +void OptionsController::SetNewtonianGravity(bool state) +{ + model->SetNewtonianGravity(state); } +void OptionsController::SetWaterEqualisation(bool state) +{ + model->SetWaterEqualisation(state); +} + +OptionsView * OptionsController::GetView() +{ + return view; +} + +void OptionsController::Exit() +{ + if(ui::Engine::Ref().GetWindow() == view) + { + ui::Engine::Ref().CloseWindow(); + } + if(callback) + callback->ControllerExit(); + HasExited = true; +} + + OptionsController::~OptionsController() { - // TODO Auto-generated destructor stub + if(ui::Engine::Ref().GetWindow() == view) + { + ui::Engine::Ref().CloseWindow(); + } + delete model; } diff --git a/src/options/OptionsController.h b/src/options/OptionsController.h index 6621f2f..18bbf4e 100644 --- a/src/options/OptionsController.h +++ b/src/options/OptionsController.h @@ -8,9 +8,26 @@ #ifndef OPTIONSCONTROLLER_H_ #define OPTIONSCONTROLLER_H_ +#include "Controller.h" +#include "simulation/Simulation.h" +#include "OptionsView.h" +#include "OptionsModel.h" + +class OptionsModel; +class OptionsView; class OptionsController { + OptionsView * view; + OptionsModel * model; + ControllerCallback * callback; public: - OptionsController(); + bool HasExited; + OptionsController(Simulation * sim, ControllerCallback * callback_); + void SetHeatSimulation(bool state); + void SetAmbientHeatSimulation(bool state); + void SetNewtonianGravity(bool state); + void SetWaterEqualisation(bool state); + void Exit(); + OptionsView * GetView(); virtual ~OptionsController(); }; diff --git a/src/options/OptionsModel.cpp b/src/options/OptionsModel.cpp index 9aed1cc..3c498e1 100644 --- a/src/options/OptionsModel.cpp +++ b/src/options/OptionsModel.cpp @@ -7,9 +7,66 @@ #include "OptionsModel.h" -OptionsModel::OptionsModel() { - // TODO Auto-generated constructor stub +OptionsModel::OptionsModel(Simulation * sim_) { + sim = sim_; +} + +void OptionsModel::AddObserver(OptionsView* view) +{ + observers.push_back(view); + view->NotifySettingsChanged(this); +} + +bool OptionsModel::GetHeatSimulation() +{ + return sim->legacy_enable?false:true; +} + +void OptionsModel::SetHeatSimulation(bool state) +{ + sim->legacy_enable = state?0:1; + notifySettingsChanged(); +} + +bool OptionsModel::GetAmbientHeatSimulation() +{ + return sim->aheat_enable?true:false; +} + +void OptionsModel::SetAmbientHeatSimulation(bool state) +{ + sim->aheat_enable = state?1:0; + notifySettingsChanged(); +} + +bool OptionsModel::GetNewtonianGravity() +{ + return false; + //sim-> +} + +void OptionsModel::SetNewtonianGravity(bool state) +{ + notifySettingsChanged(); +} + +bool OptionsModel::GetWaterEqualisation() +{ + return sim->water_equal_test?true:false; +} + +void OptionsModel::SetWaterEqualisation(bool state) +{ + sim->water_equal_test = state?1:0; + notifySettingsChanged(); +} +void OptionsModel::notifySettingsChanged() +{ + for(int i = 0; i < observers.size(); i++) + { + observers[i]->NotifySettingsChanged(this); + } } OptionsModel::~OptionsModel() { diff --git a/src/options/OptionsModel.h b/src/options/OptionsModel.h index f04d071..903f3b7 100644 --- a/src/options/OptionsModel.h +++ b/src/options/OptionsModel.h @@ -7,10 +7,27 @@ #ifndef OPTIONSMODEL_H_ #define OPTIONSMODEL_H_ +#include +#include "OptionsView.h" +#include "simulation/Simulation.h" +class Simulation; +class OptionsView; class OptionsModel { + Simulation * sim; + std::vector observers; + void notifySettingsChanged(); public: - OptionsModel(); + OptionsModel(Simulation * sim_); + void AddObserver(OptionsView* view); + bool GetHeatSimulation(); + void SetHeatSimulation(bool state); + bool GetAmbientHeatSimulation(); + void SetAmbientHeatSimulation(bool state); + bool GetNewtonianGravity(); + void SetNewtonianGravity(bool state); + bool GetWaterEqualisation(); + void SetWaterEqualisation(bool state); virtual ~OptionsModel(); }; diff --git a/src/options/OptionsView.cpp b/src/options/OptionsView.cpp index 1c79961..9f07df9 100644 --- a/src/options/OptionsView.cpp +++ b/src/options/OptionsView.cpp @@ -6,13 +6,123 @@ */ #include "OptionsView.h" +#include "interface/Button.h" +#include "interface/Label.h" OptionsView::OptionsView(): ui::Window(ui::Point(-1, -1), ui::Point(300, 300)){ - // TODO Auto-generated constructor stub + ui::Label * tempLabel = new ui::Label(ui::Point(3, 3), ui::Point(Size.X-6, 14), "Simulation Options"); + tempLabel->SetTextColour(ui::Colour(255, 220, 0)); + tempLabel->SetAlignment(AlignLeft, AlignMiddle); + AddComponent(tempLabel); + + class HeatSimulationAction: public ui::CheckboxAction + { + OptionsView * v; + public: + HeatSimulationAction(OptionsView * v_){ v = v_; } + virtual void ActionCallback(ui::Checkbox * sender){ v->c->SetHeatSimulation(sender->GetChecked()); } + }; + + heatSimulation = new ui::Checkbox(ui::Point(3, 23), ui::Point(Size.X-6, 16), "Heat simulation \bgIntroduced in version 34"); + heatSimulation->SetActionCallback(new HeatSimulationAction(this)); + AddComponent(heatSimulation); + tempLabel = new ui::Label(ui::Point(24, heatSimulation->Position.Y+14), ui::Point(Size.X-28, 16), "\bgCan cause odd behaviour with very old saves"); + tempLabel->SetAlignment(AlignLeft, AlignMiddle); + AddComponent(tempLabel); + + class AmbientHeatSimulationAction: public ui::CheckboxAction + { + OptionsView * v; + public: + AmbientHeatSimulationAction(OptionsView * v_){ v = v_; } + virtual void ActionCallback(ui::Checkbox * sender){ v->c->SetAmbientHeatSimulation(sender->GetChecked()); } + }; + + ambientHeatSimulation = new ui::Checkbox(ui::Point(3, 53), ui::Point(Size.X-6, 16), "Ambient heat simulation \bgIntroduced in version 50"); + ambientHeatSimulation->SetActionCallback(new AmbientHeatSimulationAction(this)); + AddComponent(ambientHeatSimulation); + tempLabel = new ui::Label(ui::Point(24, ambientHeatSimulation->Position.Y+14), ui::Point(Size.X-28, 16), "\bgCan cause odd behaviour with old saves"); + tempLabel->SetAlignment(AlignLeft, AlignMiddle); + AddComponent(tempLabel); + + class NewtonianGravityAction: public ui::CheckboxAction + { + OptionsView * v; + public: + NewtonianGravityAction(OptionsView * v_){ v = v_; } + virtual void ActionCallback(ui::Checkbox * sender){ v->c->SetNewtonianGravity(sender->GetChecked()); } + }; + + newtonianGravity = new ui::Checkbox(ui::Point(3, 83), ui::Point(Size.X-6, 16), "Newtonian gravity \bgIntroduced in version 48"); + newtonianGravity->SetActionCallback(new NewtonianGravityAction(this)); + AddComponent(newtonianGravity); + tempLabel = new ui::Label(ui::Point(24, newtonianGravity->Position.Y+14), ui::Point(Size.X-28, 16), "\bgMay cause poor performance on older computers"); + tempLabel->SetAlignment(AlignLeft, AlignMiddle); + AddComponent(tempLabel); + + class WaterEqualisationAction: public ui::CheckboxAction + { + OptionsView * v; + public: + WaterEqualisationAction(OptionsView * v_){ v = v_; } + virtual void ActionCallback(ui::Checkbox * sender){ v->c->SetWaterEqualisation(sender->GetChecked()); } + }; + + waterEqualisation = new ui::Checkbox(ui::Point(3, 113), ui::Point(Size.X-6, 16), "Water equalisation \bgIntroduced in version 61"); + waterEqualisation->SetActionCallback(new WaterEqualisationAction(this)); + AddComponent(waterEqualisation); + tempLabel = new ui::Label(ui::Point(24, waterEqualisation->Position.Y+14), ui::Point(Size.X-28, 16), "\bgMay cause poor performance with a lot of water"); + tempLabel->SetAlignment(AlignLeft, AlignMiddle); + AddComponent(tempLabel); + + tempLabel = new ui::Label(ui::Point(3, 143), ui::Point(Size.X-24, 16), "Air Simulation Mode"); + tempLabel->SetAlignment(AlignLeft, AlignMiddle); + AddComponent(tempLabel); + + tempLabel = new ui::Label(ui::Point(3, 163), ui::Point(Size.X-24, 16), "Gravity Simulation Mode"); + tempLabel->SetAlignment(AlignLeft, AlignMiddle); + AddComponent(tempLabel); + + + class CloseAction: public ui::ButtonAction + { + public: + OptionsView * v; + CloseAction(OptionsView * v_) { v = v_; } + void ActionCallback(ui::Button * sender) + { + v->c->Exit(); + } + }; + + ui::Button * tempButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(Size.X, 16), "OK"); + tempButton->SetActionCallback(new CloseAction(this)); + AddComponent(tempButton); +} + +void OptionsView::NotifySettingsChanged(OptionsModel * sender) +{ + heatSimulation->SetChecked(sender->GetHeatSimulation()); + ambientHeatSimulation->SetChecked(sender->GetAmbientHeatSimulation()); + newtonianGravity->SetChecked(sender->GetNewtonianGravity()); + waterEqualisation->SetChecked(sender->GetWaterEqualisation()); } +void OptionsView::AttachController(OptionsController * c_) +{ + c = c_; +} + +void OptionsView::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + g->clearrect(Position.X-2, Position.Y-2, Size.X+3, Size.Y+3); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255); +} + + OptionsView::~OptionsView() { // TODO Auto-generated destructor stub } diff --git a/src/options/OptionsView.h b/src/options/OptionsView.h index 6a75f06..52d84b1 100644 --- a/src/options/OptionsView.h +++ b/src/options/OptionsView.h @@ -9,10 +9,23 @@ #define OPTIONSVIEW_H_ #include "interface/Window.h" +#include "OptionsController.h" +#include "interface/Checkbox.h" +#include "OptionsModel.h" +class OptionsModel; +class OptionsController; class OptionsView: public ui::Window { + OptionsController * c; + ui::Checkbox * heatSimulation; + ui::Checkbox * ambientHeatSimulation; + ui::Checkbox * newtonianGravity; + ui::Checkbox * waterEqualisation; public: OptionsView(); + void NotifySettingsChanged(OptionsModel * sender); + void AttachController(OptionsController * c_); + void OnDraw(); virtual ~OptionsView(); }; -- cgit v0.9.2-21-gd62e From 465cb12af436a65871bd149174da0e7479d108bd Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 16 Apr 2012 13:58:20 +0100 Subject: Newtonian gravity working diff --git a/Makefile b/Makefile index cb3139e..46359b7 100644 --- a/Makefile +++ b/Makefile @@ -19,14 +19,16 @@ powder.exe: build/powder.exe powder-release: build/powder-release powder: build/powder -build/powder-release.exe: CFLAGS += -DWIN32 -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -pipe -msse -msse2 -msse3 -mmmx -build/powder-release.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -llua -mwindows -build/powder.exe: CFLAGS += -DWIN32 -DWINCONSOLE -build/powder.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -llua #-mwindows +build/powder-release.exe: CFLAGS += -DWIN32 -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -pipe -msse -msse2 -msse3 -mmmx +build/powder-release.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -llua -lfftw3f-3 -mwindows +build/powder.exe: CFLAGS += -DWIN32 +build/powder.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -llua -lfftw3f-3 #-mwindows build/powder-release: CFLAGS += -DLIN32 -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -pipe -msse -msse2 -msse3 -mmmx -build/powder-release: LFLAGS := -lSDL -lm -lbz2 -llua +build/powder-release: LFLAGS := -lSDL -lm -lbz2 -llua -lfftw3f build/powder: CFLAGS += -DLIN32 -build/powder: LFLAGS := -lSDL -lm -lbz2 -llua +build/powder: LFLAGS := -lSDL -lm -lbz2 -llua -lfftw3f + +CFLAGS += -DGRAVFFT -DLUACONSOLE build/powder-release.exe: $(SOURCES) build/powder-res.o $(CPPC_WIN) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) build/powder-res.o -o $@ diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 3c47568..ae93f90 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -856,6 +856,7 @@ void GameView::OnDraw() ren->draw_air(); ren->render_parts(); ren->render_fire(); + ren->draw_grav(); ren->DrawWalls(); if(activeBrush && currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) { diff --git a/src/options/OptionsModel.cpp b/src/options/OptionsModel.cpp index 3c498e1..c0a69f5 100644 --- a/src/options/OptionsModel.cpp +++ b/src/options/OptionsModel.cpp @@ -41,12 +41,15 @@ void OptionsModel::SetAmbientHeatSimulation(bool state) bool OptionsModel::GetNewtonianGravity() { - return false; - //sim-> + return sim->grav->ngrav_enable?true:false; } void OptionsModel::SetNewtonianGravity(bool state) { + if(state) + sim->grav->start_grav_async(); + else + sim->grav->stop_grav_async(); notifySettingsChanged(); } diff --git a/src/simulation/Gravity.cpp b/src/simulation/Gravity.cpp index d2d7295..1a74566 100644 --- a/src/simulation/Gravity.cpp +++ b/src/simulation/Gravity.cpp @@ -37,6 +37,7 @@ void Gravity::bilinear_interpolation(float *src, float *dst, int sw, int sh, int void Gravity::gravity_init() { + ngrav_enable = 0; //Allocate full size Gravmaps th_ogravmap = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); th_gravmap = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); @@ -210,16 +211,16 @@ void Gravity::grav_fft_init() if (grav_fft_status) return; //use fftw malloc function to ensure arrays are aligned, to get better performance - th_ptgravx = fftwf_malloc(xblock2*yblock2*sizeof(float)); - th_ptgravy = fftwf_malloc(xblock2*yblock2*sizeof(float)); - th_ptgravxt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); - th_ptgravyt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); - th_gravmapbig = fftwf_malloc(xblock2*yblock2*sizeof(float)); - th_gravmapbigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); - th_gravxbig = fftwf_malloc(xblock2*yblock2*sizeof(float)); - th_gravybig = fftwf_malloc(xblock2*yblock2*sizeof(float)); - th_gravxbigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); - th_gravybigt = fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_ptgravx = (float*)fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_ptgravy = (float*)fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_ptgravxt = (fftwf_complex*)fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_ptgravyt = (fftwf_complex*)fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_gravmapbig = (float*)fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_gravmapbigt = (fftwf_complex*)fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_gravxbig = (float*)fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_gravybig = (float*)fftwf_malloc(xblock2*yblock2*sizeof(float)); + th_gravxbigt = (fftwf_complex*)fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); + th_gravybigt = (fftwf_complex*)fftwf_malloc(fft_tsize*sizeof(fftwf_complex)); //select best algorithm, could use FFTW_PATIENT or FFTW_EXHAUSTIVE but that increases the time taken to plan, and I don't see much increase in execution speed plan_ptgravx = fftwf_plan_dft_r2c_2d(yblock2, xblock2, th_ptgravx, th_ptgravxt, FFTW_MEASURE); diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 764d29d..7fdd6d6 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -8,6 +8,9 @@ #include "Gravity.h" #include "SaveLoader.h" +#undef LUACONSOLE +//#include "cat/LuaScriptHelper.h" + int Simulation::Load(unsigned char * data, int dataLength) { return SaveLoader::Load(data, dataLength, this, true, 0, 0); @@ -3269,7 +3272,16 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu #endif if(!sys_pause||framerender) + { air->update_air(); + grav->gravity_update_async(); + + //Get updated buffer pointers for gravity + gravx = grav->gravx; + gravy = grav->gravy; + gravp = grav->gravp; + gravmap = grav->gravmap; + } memset(pmap, 0, sizeof(pmap)); memset(photons, 0, sizeof(photons)); @@ -3424,4 +3436,6 @@ Simulation::Simulation(): init_can_move(); clear_sim(); + + grav->gravity_mask(); } -- cgit v0.9.2-21-gd62e From c3c31b20b07d1971091cf225311a86c51b64e2ca Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 16 Apr 2012 21:19:12 +0100 Subject: Fix portals diff --git a/src/elements/prti.cpp b/src/elements/prti.cpp index 9bbbf26..f5b2374 100644 --- a/src/elements/prti.cpp +++ b/src/elements/prti.cpp @@ -6,8 +6,6 @@ PRTO does (count+4)%8, so that it will come out at the opposite place to where it came in PRTO does +/-1 to the count, so it doesn't jam as easily */ -int portal_rx[8] = {-1, 0, 1, 1, 1, 0,-1,-1}; -int portal_ry[8] = {-1,-1,-1, 0, 1, 1, 1, 0}; int update_PRTI(UPDATE_FUNC_ARGS) { int r, nnx, rx, ry, fe = 0; @@ -17,8 +15,8 @@ int update_PRTI(UPDATE_FUNC_ARGS) { else if (parts[i].tmp<0) parts[i].tmp = 0; for (count=0; count<8; count++) { - rx = portal_rx[count]; - ry = portal_ry[count]; + rx = sim->portal_rx[count]; + ry = sim->portal_ry[count]; if (x+rx>=0 && y+ry>0 && x+rxpv; hv = air->hv; + //Clear signs signs = (sign*)calloc(MAXSIGNS, sizeof(sign)); int menuCount; -- cgit v0.9.2-21-gd62e From c261030cef6f63110fecf00aa2d2a22bbb953690 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 15:56:57 +0100 Subject: Started on dropdown control diff --git a/src/interface/DropDown.cpp b/src/interface/DropDown.cpp new file mode 100644 index 0000000..6944e6f --- /dev/null +++ b/src/interface/DropDown.cpp @@ -0,0 +1,75 @@ +/* + * DropDown.cpp + * + * Created on: Apr 16, 2012 + * Author: Simon + */ + +#include "DropDown.h" + +namespace ui { + +class DropDownWindow: public ui::Window { + Colour background, activeBackground; + Colour border, activeBorder; + Colour text, activeText; + bool isMouseInside; +public: + DropDownWindow(Point position, Point size, Colour background, Colour activeBackground, Colour border, Colour activeBorder, Colour text, Colour activeText): + Window(position, size), + background(background), + activeBackground(activeBackground), + border(border), + activeBorder(activeBorder), + text(text), + activeText(activeText) + { + + } + virtual void OnDraw() + { + Graphics * g = ui::Engine::Ref().g; + g->fillrect(Position.X, Position.Y, Size.X, Size.Y, background.Red, background.Green, background.Blue, 255); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, border.Red, border.Green, border.Blue, 255); + } + virtual ~DropDownWindow() {} +}; + +DropDown::DropDown(Point position, Point size): + Component(position, size), + isMouseInside(false) +{ + activeText = background = Colour(0, 0, 0); + text = activeBackground = border = activeBorder = Colour(255, 255, 255); +} + +void DropDown::OnMouseClick(int x, int y, unsigned int button) +{ + ui::Engine().Ref().ShowWindow(new DropDownWindow(ui::Point(50, 50), ui::Point(50, 50), background, activeBackground, border, activeBorder, text, activeText)); +} + +void DropDown::Draw(const Point& screenPos) +{ + Graphics * g = ui::Engine::Ref().g; + Point Position = screenPos; + if(isMouseInside) + { + g->fillrect(Position.X-1, Position.Y-1, Size.X+2, Size.Y+2, activeBackground.Red, activeBackground.Green, activeBackground.Blue, 255); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, activeBorder.Red, activeBorder.Green, activeBorder.Blue, 255); + //g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y+1, displayText, activeText.Red, activeText.Green, activeText.Blue, 255); + } + else + { + g->fillrect(Position.X, Position.Y, Size.X, Size.Y, background.Red, background.Green, background.Blue, 255); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, border.Red, border.Green, border.Blue, 255); + //g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y+1, displayText, text.Red, text.Green, text.Blue, 255); + } + +} + + +DropDown::~DropDown() { + // TODO Auto-generated destructor stub +} + +} /* namespace ui */ diff --git a/src/interface/DropDown.h b/src/interface/DropDown.h new file mode 100644 index 0000000..619ec5a --- /dev/null +++ b/src/interface/DropDown.h @@ -0,0 +1,29 @@ +/* + * DropDown.h + * + * Created on: Apr 16, 2012 + * Author: Simon + */ + +#ifndef DROPDOWN_H_ +#define DROPDOWN_H_ + +#include "Component.h" +#include "Colour.h" + +namespace ui { + +class DropDown: public ui::Component { + Colour background, activeBackground; + Colour border, activeBorder; + Colour text, activeText; + bool isMouseInside; +public: + DropDown(Point position, Point size); + virtual void Draw(const Point& screenPos); + virtual void OnMouseClick(int x, int y, unsigned int button); + virtual ~DropDown(); +}; + +} /* namespace ui */ +#endif /* DROPDOWN_H_ */ diff --git a/src/options/OptionsView.cpp b/src/options/OptionsView.cpp index 9f07df9..d863844 100644 --- a/src/options/OptionsView.cpp +++ b/src/options/OptionsView.cpp @@ -77,6 +77,9 @@ OptionsView::OptionsView(): tempLabel->SetAlignment(AlignLeft, AlignMiddle); AddComponent(tempLabel); + airMode = new ui::DropDown(ui::Point(Size.X-55, 143), ui::Point(50, 16));//, "Water equalisation \bgIntroduced in version 61"); + //airMode->SetActionCallback(new WaterEqualisationAction(this)); + AddComponent(airMode); tempLabel = new ui::Label(ui::Point(3, 143), ui::Point(Size.X-24, 16), "Air Simulation Mode"); tempLabel->SetAlignment(AlignLeft, AlignMiddle); AddComponent(tempLabel); diff --git a/src/options/OptionsView.h b/src/options/OptionsView.h index 52d84b1..5103f23 100644 --- a/src/options/OptionsView.h +++ b/src/options/OptionsView.h @@ -11,6 +11,7 @@ #include "interface/Window.h" #include "OptionsController.h" #include "interface/Checkbox.h" +#include "interface/DropDown.h" #include "OptionsModel.h" class OptionsModel; @@ -21,6 +22,8 @@ class OptionsView: public ui::Window { ui::Checkbox * ambientHeatSimulation; ui::Checkbox * newtonianGravity; ui::Checkbox * waterEqualisation; + ui::DropDown * airMode; + ui::DropDown * gravityMode; public: OptionsView(); void NotifySettingsChanged(OptionsModel * sender); -- cgit v0.9.2-21-gd62e From 25ce83d5bff3566368f44501cd674a93b1e286e9 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 16:04:48 +0100 Subject: TPT: Implement PROP_NEUTABSORB bdf277e687 diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h index 204460c..9e7e654 100644 --- a/src/simulation/Elements.h +++ b/src/simulation/Elements.h @@ -34,9 +34,9 @@ #define PROP_CONDUCTS 0x00020 //32 Conducts electricity #define PROP_BLACK 0x00040 //64 Absorbs Photons (not currently implemented or used, a photwl attribute might be better) #define PROP_NEUTPENETRATE 0x00080 //128 Penetrated by neutrons -#define PROP_NEUTABSORB 0x00100 //256 Absorbs neutrons, reflect is default (not currently implemented or used) +#define PROP_NEUTABSORB 0x00100 //256 Absorbs neutrons, reflect is default #define PROP_NEUTPASS 0x00200 //512 Neutrons pass through, such as with glass -#define PROP_DEADLY 0x00400 //1024 Is deadly for stickman (not currently implemented or used) +#define PROP_DEADLY 0x00400 //1024 Is deadly for stickman #define PROP_HOT_GLOW 0x00800 //2048 Hot Metal Glow #define PROP_LIFE 0x01000 //4096 Is a GoL type #define PROP_RADIOACTIVE 0x02000 //8192 Radioactive diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index c266e22..3d0ab0e 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1126,6 +1126,8 @@ void Simulation::init_can_move() if (ptypes[t].weight <= ptypes[rt].weight) can_move[t][rt] = 0; if (t==PT_NEUT && (ptypes[rt].properties&PROP_NEUTPASS)) can_move[t][rt] = 2; + if (t==PT_NEUT && (ptypes[rt].properties&PROP_NEUTABSORB)) + can_move[t][rt] = 1; if (t==PT_NEUT && (ptypes[rt].properties&PROP_NEUTPENETRATE)) can_move[t][rt] = 1; if ((ptypes[t].properties&PROP_NEUTPENETRATE) && rt==PT_NEUT) @@ -1345,6 +1347,11 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) } //else e=1 , we are trying to swap the particles, return 0 no swap/move, 1 is still overlap/move, because the swap takes place later + if (parts[i].type == PT_NEUT && (ptypes[r & 0xFF].properties & PROP_NEUTABSORB)) + { + parts[i].type = PT_NONE; + return 0; + } if ((r&0xFF)==PT_VOID || (r&0xFF)==PT_PVOD) //this is where void eats particles { if (parts[i].type == PT_STKM) -- cgit v0.9.2-21-gd62e From 027833fe20dabdc49e4584a22c63c83ea8d508a3 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 16:06:39 +0100 Subject: TPT Whoops, eval_move returning 1 should not allow particle creation edcf6d7b2f diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 3d0ab0e..660c723 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1845,7 +1845,7 @@ int Simulation::create_part(int p, int x, int y, int tv)//the function for creat return -1; if (p==-1)//creating from anything but brush { - if (pmap[y][x] || (bmap[y/CELL][x/CELL] && !eval_move(t, x, y, NULL))) + if (pmap[y][x] || (bmap[y/CELL][x/CELL] && eval_move(t, x, y, NULL)!=2)) { if ((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2) { -- cgit v0.9.2-21-gd62e From f4e2d188c26b70e9a712906861a30cac05b2031e Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 16:09:37 +0100 Subject: transform_save should check wall coordinates against size in blocks, not the actual size ff6aa0227d diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 660c723..f25a124 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -819,7 +819,7 @@ void *Simulation::transform_save(void *odata, int *size, matrix2d transform, vec pos = v2d_add(m2d_multiply_v2d(transform,pos),translate); nx = pos.x/CELL; ny = pos.y/CELL; - if (nx<0 || nx>=nw || ny<0 || ny>=nh) + if (nx<0 || nx>=nw/CELL || ny<0 || ny>=nh/CELL) continue; if (bmapo[y][x]) { -- cgit v0.9.2-21-gd62e From 609db36f2e44aa915162422e7408726d76e7b2a1 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 16:14:42 +0100 Subject: TPT: Check coordinates of signs before using them to read pmap or pressure 8a11b6b31d diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 79b63ec..dba5a3b 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -379,15 +379,18 @@ void Renderer::DrawSigns() //Displaying special information if (strcmp(signs[i].text, "{p}")==0) { - sprintf(buff, "Pressure: %3.2f", sim->pv[signs[i].y/CELL][signs[i].x/CELL]); //...pressure + float pressure = 0.0f; + if (signs[i].x>=0 && signs[i].x=0 && signs[i].ypv[signs[i].y/CELL][signs[i].x/CELL]; + sprintf(buff, "Pressure: %3.2f", pressure); //...pressure g->drawtext(x+3, y+3, buff, 255, 255, 255, 255); } if (strcmp(signs[i].text, "{t}")==0) { - if (sim->pmap[signs[i].y][signs[i].x]) - sprintf(buff, "Temp: %4.2f", sim->parts[sim->pmap[signs[i].y][signs[i].x]>>8].temp-273.15); //...tempirature + if (signs[i].x>=0 && signs[i].x=0 && signs[i].ypmap[signs[i].y][signs[i].x]) + sprintf(buff, "Temp: %4.2f", sim->parts[sim->pmap[signs[i].y][signs[i].x]>>8].temp-273.15); //...temperature else - sprintf(buff, "Temp: 0.00"); //...tempirature + sprintf(buff, "Temp: 0.00"); //...temperature g->drawtext(x+3, y+3, buff, 255, 255, 255, 255); } -- cgit v0.9.2-21-gd62e From 475fd1a0b8f8883506f059223079147ca4b8c385 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 16:30:04 +0100 Subject: TPT: Solids wall description, and check build_save was successful when saving a stamp 44545d4c96 diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index da0cad6..2fb10b2 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -130,7 +130,7 @@ wall_type * LoadWalls(int & wallCount) {PIXPACK(0x808080), PIXPACK(0x000000), 0, "Erases walls."}, {PIXPACK(0x808080), PIXPACK(0x000000), 3, "Wall. Indestructible. Blocks everything."}, {PIXPACK(0x3C3C3C), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks particles, allows air"}, - {PIXPACK(0x575757), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks liquids and gasses, allows solids"}, + {PIXPACK(0x575757), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks liquids and gasses, allows powders"}, {PIXPACK(0xFFFF22), PIXPACK(0x101010), 2, "Conductor, allows particles, conducts electricity"}, {PIXPACK(0x242424), PIXPACK(0x101010), 0, "E-Hole, absorbs particles, release them when powered"}, {PIXPACK(0xFFFFFF), PIXPACK(0x000000), -1, "Air, creates airflow and pressure"}, -- cgit v0.9.2-21-gd62e From 065ca8b9f53d861f4ddf474b049f2501ce0586e3 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 16:33:04 +0100 Subject: TPT: Only check the bits actually used for wavelength in photon ctype Fixes black photons not being killed after passing through pipe 748a528fe0 diff --git a/src/elements/phot.cpp b/src/elements/phot.cpp index 407ac2e..29d534b 100644 --- a/src/elements/phot.cpp +++ b/src/elements/phot.cpp @@ -5,7 +5,7 @@ int update_PHOT(UPDATE_FUNC_ARGS) { float rr, rrr; parts[i].pavg[0] = x; parts[i].pavg[1] = y; - if (!parts[i].ctype) { + if (!(parts[i].ctype&0x3FFFFFFF)) { sim->kill_part(i); return 1; } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index f25a124..b86b9a7 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3003,7 +3003,7 @@ killed: kill_part(i); continue; } - if (!parts[i].ctype&&t!=PT_NEUT&&t!=PT_ELEC) { + if (!(parts[i].ctype&0x3FFFFFFF)&&t!=PT_NEUT&&t!=PT_ELEC) { kill_part(i); continue; } -- cgit v0.9.2-21-gd62e From 69e7dadcdf5daaddd663e67c54cc8dbd4a62eb0f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 16:36:27 +0100 Subject: TPT: Make RBDM/WATR explosion work again, by not killing fire created by WATR 32c9ff3099 diff --git a/src/elements/cbnw.cpp b/src/elements/cbnw.cpp index 37625b0..b480ed5 100644 --- a/src/elements/cbnw.cpp +++ b/src/elements/cbnw.cpp @@ -76,8 +76,9 @@ int update_CBNW(UPDATE_FUNC_ARGS) { { sim->part_change_type(i,x,y,PT_FIRE); parts[i].life = 4; + parts[i].ctype = PT_WATR; } - if ((r&0xFF)==PT_FIRE){ + if ((r&0xFF)==PT_FIRE && parts[r>>8].ctype!=PT_WATR){ sim->kill_part(r>>8); if(1>(rand()%150)){ sim->kill_part(i); diff --git a/src/elements/watr.cpp b/src/elements/watr.cpp index 9451a82..f6a9933 100644 --- a/src/elements/watr.cpp +++ b/src/elements/watr.cpp @@ -18,8 +18,9 @@ int update_WATR(UPDATE_FUNC_ARGS) { { sim->part_change_type(i,x,y,PT_FIRE); parts[i].life = 4; + parts[i].ctype = PT_WATR; } - if ((r&0xFF)==PT_FIRE){ + if ((r&0xFF)==PT_FIRE && parts[r>>8].ctype!=PT_WATR){ sim->kill_part(r>>8); if(1>(rand()%150)){ sim->kill_part(i); diff --git a/src/elements/wtrv.cpp b/src/elements/wtrv.cpp index 2e3838a..9c07e9f 100644 --- a/src/elements/wtrv.cpp +++ b/src/elements/wtrv.cpp @@ -13,6 +13,7 @@ int update_WTRV(UPDATE_FUNC_ARGS) { { sim->part_change_type(i,x,y,PT_FIRE); parts[i].life = 4; + parts[i].ctype = PT_WATR; } } if(parts[i].temp>1273&&parts[i].ctype==PT_FIRE) -- cgit v0.9.2-21-gd62e From db1ffd3208808da53750348068151f46c5ef3bb5 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 16:45:05 +0100 Subject: TPT: Fix WARP destroying DMND a9c198dd46 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index b86b9a7..1fc99ed 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2410,8 +2410,6 @@ void Simulation::update_particles_i(int start, int inc) for (i=0; i<=parts_lastActiveIndex; i++) if (parts[i].type) { - lx = parts[i].x; - ly = parts[i].y; t = parts[i].type; if (t<0 || t>=PT_NUM) { @@ -2826,12 +2824,21 @@ void Simulation::update_particles_i(int start, int inc) { if ((*(ptypes[t].update_func))(this, i,x,y,surround_space,nt, parts, pmap)) continue; + else if (t==PT_WARP) + { + // Warp does some movement in its update func, update variables to avoid incorrect data in pmap + x = (int)(parts[i].x+0.5f); + y = (int)(parts[i].y+0.5f); + } } #ifdef LUACONSOLE if(lua_el_mode[t]) { if(luacon_part_update(t,i,x,y,surround_space,nt)) continue; + // Need to update variables, in case they've been changed by Lua + x = (int)(parts[i].x+0.5f); + y = (int)(parts[i].y+0.5f); } #endif if (legacy_enable)//if heat sim is off -- cgit v0.9.2-21-gd62e From 75f62127518895ae9acddfd2644a67ab8796253c Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 16:55:43 +0100 Subject: TPT: Another change to the eval_move check in create_part eaf2af6d40 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 1fc99ed..ab4a852 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1845,7 +1845,11 @@ int Simulation::create_part(int p, int x, int y, int tv)//the function for creat return -1; if (p==-1)//creating from anything but brush { - if (pmap[y][x] || (bmap[y/CELL][x/CELL] && eval_move(t, x, y, NULL)!=2)) + // If there is a particle, only allow creation if the new particle can occupy the same space as the existing particle + // If there isn't a particle but there is a wall, check whether the new particle is allowed to be in it + // (not "!=2" for wall check because eval_move returns 1 for moving into empty space) + // If there's no particle and no wall, assume creation is allowed + if (pmap[y][x] ? (eval_move(t, x, y, NULL)!=2) : (bmap[y/CELL][x/CELL] && eval_move(t, x, y, NULL)==0)) { if ((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2) { -- cgit v0.9.2-21-gd62e From ca1690efe14d5cbb1637e9114403afffc3f75984 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 17:14:23 +0100 Subject: TPT: Separate loop for updating life, and add SPRK life checks to most electronics 6bdc05cc40 diff --git a/src/elements/aray.cpp b/src/elements/aray.cpp index 2ab9b40..939d3c1 100644 --- a/src/elements/aray.cpp +++ b/src/elements/aray.cpp @@ -11,7 +11,7 @@ int update_ARAY(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_SPRK) { + if ((r&0xFF)==PT_SPRK && parts[r>>8].life<4) { int destroy = (parts[r>>8].ctype==PT_PSCN)?1:0; int nostop = (parts[r>>8].ctype==PT_INST)?1:0; for (docontinue = 1, nxx = 0, nyy = 0, nxi = rx*-1, nyi = ry*-1; docontinue; nyy+=nyi, nxx+=nxi) { diff --git a/src/elements/dlay.cpp b/src/elements/dlay.cpp index e40c362..7823fad 100644 --- a/src/elements/dlay.cpp +++ b/src/elements/dlay.cpp @@ -19,7 +19,7 @@ int update_DLAY(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_SPRK && parts[i].life==0 && parts[r>>8].ctype==PT_PSCN) + if ((r&0xFF)==PT_SPRK && parts[i].life==0 && parts[r>>8].life<4 && parts[r>>8].ctype==PT_PSCN) { parts[i].life = (int)(parts[i].temp-273.15); } diff --git a/src/elements/emp.cpp b/src/elements/emp.cpp index 2b3db86..a0b8107 100644 --- a/src/elements/emp.cpp +++ b/src/elements/emp.cpp @@ -11,7 +11,7 @@ int update_EMP(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_SPRK) + if ((r&0xFF)==PT_SPRK && parts[r>>8].life<4) { ok=1; break; diff --git a/src/elements/pcln.cpp b/src/elements/pcln.cpp index beb4a9a..3b4cde0 100644 --- a/src/elements/pcln.cpp +++ b/src/elements/pcln.cpp @@ -11,7 +11,7 @@ int update_PCLN(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_SPRK) + if ((r&0xFF)==PT_SPRK && parts[r>>8].life<4) { if (parts[r>>8].ctype==PT_PSCN) parts[i].life = 10; diff --git a/src/elements/pvod.cpp b/src/elements/pvod.cpp index 1a48ca8..c65643e 100644 --- a/src/elements/pvod.cpp +++ b/src/elements/pvod.cpp @@ -11,7 +11,7 @@ int update_PVOD(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_SPRK) + if ((r&0xFF)==PT_SPRK && parts[r>>8].life<4) { if (parts[r>>8].ctype==PT_PSCN) parts[i].life = 10; diff --git a/src/elements/sprk.cpp b/src/elements/sprk.cpp index 80f66a2..149d63b 100644 --- a/src/elements/sprk.cpp +++ b/src/elements/sprk.cpp @@ -119,7 +119,7 @@ int update_SPRK(UPDATE_FUNC_ARGS) { pavg = sim->parts_avg(r>>8, i,PT_INSL); - if ((rt==PT_SWCH||(rt==PT_SPRK&&parts[r>>8].ctype==PT_SWCH)) && pavg!=PT_INSL) // make sparked SWCH turn off correctly + if ((rt==PT_SWCH||(rt==PT_SPRK&&parts[r>>8].ctype==PT_SWCH)) && pavg!=PT_INSL && parts[i].life<4) // make sparked SWCH turn off correctly { if (rt==PT_SWCH&&ct==PT_PSCN&&parts[r>>8].life<10) { parts[r>>8].life = 10; @@ -130,12 +130,12 @@ int update_SPRK(UPDATE_FUNC_ARGS) { parts[r>>8].life = 9; } } - else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_PUMP||rt==PT_GPMP||rt==PT_HSWC||rt==PT_PBCN)) // PROP_PTOGGLE, Maybe? We seem to use 2 different methods for handling actived elements, this one seems better. Yes, use this one for new elements, PCLN is different for compatibility with existing saves + else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_PUMP||rt==PT_GPMP||rt==PT_HSWC||rt==PT_PBCN) && parts[i].life<4) // PROP_PTOGGLE, Maybe? We seem to use 2 different methods for handling actived elements, this one seems better. Yes, use this one for new elements, PCLN is different for compatibility with existing saves { if (ct==PT_PSCN) parts[r>>8].life = 10; else if (ct==PT_NSCN && parts[r>>8].life>=10) parts[r>>8].life = 9; } - else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_LCRY&&abs(rx)<2&&abs(ry)<2)) + else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_LCRY&&abs(rx)<2&&abs(ry)<2) && parts[i].life<4) { if (ct==PT_PSCN && parts[r>>8].tmp == 0) parts[r>>8].tmp = 2; else if (ct==PT_NSCN && parts[r>>8].tmp == 3) parts[r>>8].tmp = 1; @@ -150,7 +150,7 @@ int update_SPRK(UPDATE_FUNC_ARGS) { conduct_sprk = 0; - if (ct==PT_METL && (rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR||(rt==PT_SPRK&&(parts[r>>8].ctype==PT_NTCT||parts[r>>8].ctype==PT_PTCT))) && pavg!=PT_INSL) + if (ct==PT_METL && (rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR||(rt==PT_SPRK&&(parts[r>>8].ctype==PT_NTCT||parts[r>>8].ctype==PT_PTCT))) && pavg!=PT_INSL && parts[i].life<4) { parts[r>>8].temp = 473.0f; if (rt==PT_NTCT||rt==PT_PTCT) @@ -182,7 +182,7 @@ int update_SPRK(UPDATE_FUNC_ARGS) { if (conduct_sprk) { if (rt==PT_WATR||rt==PT_SLTW) { - if (parts[r>>8].life==0 && (parts[i].life<2 || ((r>>8)>8].life==0 && parts[i].life<3) { sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); if (rt==PT_WATR) parts[r>>8].life = 6; @@ -191,12 +191,12 @@ int update_SPRK(UPDATE_FUNC_ARGS) { } } else if (rt==PT_INST) { - if (parts[i].life>=3&&parts[r>>8].life==0) + if (parts[r>>8].life==0 && parts[i].life<4) { sim->flood_parts(x+rx,y+ry,PT_SPRK,PT_INST,-1, 0);//spark the wire } } - else if (parts[r>>8].life==0 && (parts[i].life<3 || ((r>>8)>8].life==0 && parts[i].life<4) { parts[r>>8].life = 4; parts[r>>8].ctype = rt; sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); diff --git a/src/elements/stor.cpp b/src/elements/stor.cpp index 414caad..555122c 100644 --- a/src/elements/stor.cpp +++ b/src/elements/stor.cpp @@ -20,7 +20,7 @@ int update_STOR(UPDATE_FUNC_ARGS) { parts[i].pavg[1] = parts[r>>8].ctype; sim->kill_part(r>>8); } - if(parts[i].tmp && (r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN) + if(parts[i].tmp && (r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN && parts[r>>8].life<4) { for(ry1 = 1; ry1 >= -1; ry1--){ for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ // Oscilate the X starting at 0, 1, -1, 3, -5, etc (Though stop at -1) diff --git a/src/elements/wire.cpp b/src/elements/wire.cpp index c3c918b..4e5d072 100644 --- a/src/elements/wire.cpp +++ b/src/elements/wire.cpp @@ -29,7 +29,12 @@ int update_WIRE(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if((r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN){parts[i].ctype=1; parts[r>>8].life=0; return 0;} + if((r&0xFF)==PT_SPRK && parts[r>>8].life<4 && parts[r>>8].ctype==PT_PSCN) + { + parts[i].ctype=1; + parts[r>>8].life=0; + return 0; + } else if((r&0xFF)==PT_NSCN && parts[i].tmp==1){sim->create_part(-1, x+rx, y+ry, PT_SPRK);} else if((r&0xFF)==PT_WIRE && parts[r>>8].tmp==1 && !parts[i].tmp){count++;} } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index ab4a852..a1ddb68 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2278,6 +2278,7 @@ void Simulation::update_particles_i(int start, int inc) int surround[8]; int surround_hconduct[8]; int lighting_ok=1; + unsigned int elem_properties; float pGravX, pGravY, pGravD; if (lighting_recreate>0) @@ -2410,7 +2411,6 @@ void Simulation::update_particles_i(int start, int inc) else wireless[q][1] = 0; } - //the main particle loop function, goes over all particles. for (i=0; i<=parts_lastActiveIndex; i++) if (parts[i].type) { @@ -2420,25 +2420,32 @@ void Simulation::update_particles_i(int start, int inc) kill_part(i); continue; } - //printf("parts[%d].type: %d\n", i, parts[i].type); - if (parts[i].life>0 && (ptypes[t].properties&PROP_LIFE_DEC)) + elem_properties = ptypes[t].properties; + if (parts[i].life>0 && (elem_properties&PROP_LIFE_DEC)) { // automatically decrease life parts[i].life--; - if (parts[i].life<=0 && (ptypes[t].properties&(PROP_LIFE_KILL_DEC|PROP_LIFE_KILL))) + if (parts[i].life<=0 && (elem_properties&(PROP_LIFE_KILL_DEC|PROP_LIFE_KILL))) { // kill on change to no life kill_part(i); continue; } } - else if (parts[i].life<=0 && (ptypes[t].properties&PROP_LIFE_KILL)) + else if (parts[i].life<=0 && (elem_properties&PROP_LIFE_KILL)) { // kill if no life kill_part(i); continue; } + } + //the main particle loop function, goes over all particles. + + for (i=0; i<=parts_lastActiveIndex; i++) + if (parts[i].type) + { + t = parts[i].type; x = (int)(parts[i].x+0.5f); y = (int)(parts[i].y+0.5f); -- cgit v0.9.2-21-gd62e From a3e97d51d13cd0aa4e484b374aabf52e08d70037 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 17:18:35 +0100 Subject: TPT: Change wifi so that it always takes one frame to transmit a722d7a396 diff --git a/src/elements/wifi.cpp b/src/elements/wifi.cpp index cb77dd9..9a25128 100644 --- a/src/elements/wifi.cpp +++ b/src/elements/wifi.cpp @@ -12,6 +12,8 @@ int update_WIFI(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; + // wireless[][0] - whether channel is active on this frame + // wireless[][1] - whether channel should be active on next frame if (sim->wireless[parts[i].tmp][0]) { if (((r&0xFF)==PT_NSCN||(r&0xFF)==PT_PSCN||(r&0xFF)==PT_INWR)&&parts[r>>8].life==0 && sim->wireless[parts[i].tmp][0]) @@ -25,9 +27,8 @@ int update_WIFI(UPDATE_FUNC_ARGS) { { if ((r&0xFF)==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3) { - sim->wireless[parts[i].tmp][0] = 1; sim->wireless[parts[i].tmp][1] = 1; - //ISWIRE = 1; + sim->ISWIRE = 2; } } } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index a1ddb68..9b23ae2 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2401,15 +2401,14 @@ void Simulation::update_particles_i(int start, int inc) } //memset(gol2, 0, sizeof(gol2)); } - if (ISWIRE==1)//wifi channel reseting + if (ISWIRE>0)//wifi channel reseting { for ( q = 0; q<(int)(MAX_TEMP-73.15f)/100+2; q++) - if (!wireless[q][1]) - { - wireless[q][0] = 0; - } - else - wireless[q][1] = 0; + { + wireless[q][0] = wireless[q][1]; + wireless[q][1] = 0; + } + ISWIRE--; } for (i=0; i<=parts_lastActiveIndex; i++) if (parts[i].type) -- cgit v0.9.2-21-gd62e From 8ea1e41d8737cbd2cc5f7ca6779cc0a8031dac85 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 17:20:48 +0100 Subject: TPT: Fix switch not activating completely while being sparked 1a5cd45eb8 diff --git a/src/elements/swch.cpp b/src/elements/swch.cpp index f37192b..4adc270 100644 --- a/src/elements/swch.cpp +++ b/src/elements/swch.cpp @@ -17,8 +17,11 @@ int update_SWCH(UPDATE_FUNC_ARGS) { { if (parts[i].life>=10&&parts[r>>8].life<10&&parts[r>>8].life>0) parts[i].life = 9; - else if (parts[i].life==0&&parts[r>>8].life==10) - parts[i].life = 10; + else if (parts[i].life==0&&parts[r>>8].life>=10) + { + //Set to other particle's life instead of 10, otherwise spark loops form when SWCH is sparked while turning on + parts[i].life = parts[r>>8].life; + } } else if (rt==PT_SPRK&&parts[i].life==10&&parts[r>>8].ctype!=PT_PSCN&&parts[r>>8].ctype!=PT_NSCN) { sim->part_change_type(i,x,y,PT_SPRK); -- cgit v0.9.2-21-gd62e From b88a2f680e638d7fbf396482b567ca5b6a7314f6 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 17:24:51 +0100 Subject: TPT: More SPRK life checks for electronic elements 68ab3ca3ca diff --git a/src/elements/aray.cpp b/src/elements/aray.cpp index 939d3c1..dd4a80b 100644 --- a/src/elements/aray.cpp +++ b/src/elements/aray.cpp @@ -11,7 +11,7 @@ int update_ARAY(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_SPRK && parts[r>>8].life<4) { + if ((r&0xFF)==PT_SPRK && parts[r>>8].life>0 && parts[r>>8].life<4) { int destroy = (parts[r>>8].ctype==PT_PSCN)?1:0; int nostop = (parts[r>>8].ctype==PT_INST)?1:0; for (docontinue = 1, nxx = 0, nyy = 0, nxi = rx*-1, nyi = ry*-1; docontinue; nyy+=nyi, nxx+=nxi) { diff --git a/src/elements/dlay.cpp b/src/elements/dlay.cpp index 7823fad..06b59d9 100644 --- a/src/elements/dlay.cpp +++ b/src/elements/dlay.cpp @@ -19,7 +19,7 @@ int update_DLAY(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_SPRK && parts[i].life==0 && parts[r>>8].life<4 && parts[r>>8].ctype==PT_PSCN) + if ((r&0xFF)==PT_SPRK && parts[i].life==0 && parts[r>>8].life>0 && parts[r>>8].life<4 && parts[r>>8].ctype==PT_PSCN) { parts[i].life = (int)(parts[i].temp-273.15); } diff --git a/src/elements/emp.cpp b/src/elements/emp.cpp index a0b8107..6625610 100644 --- a/src/elements/emp.cpp +++ b/src/elements/emp.cpp @@ -11,7 +11,7 @@ int update_EMP(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_SPRK && parts[r>>8].life<4) + if ((r&0xFF)==PT_SPRK && parts[r>>8].life>0 && parts[r>>8].life<4) { ok=1; break; diff --git a/src/elements/pcln.cpp b/src/elements/pcln.cpp index 3b4cde0..86d67f6 100644 --- a/src/elements/pcln.cpp +++ b/src/elements/pcln.cpp @@ -11,7 +11,7 @@ int update_PCLN(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_SPRK && parts[r>>8].life<4) + if ((r&0xFF)==PT_SPRK && parts[r>>8].life>0 && parts[r>>8].life<4) { if (parts[r>>8].ctype==PT_PSCN) parts[i].life = 10; diff --git a/src/elements/pvod.cpp b/src/elements/pvod.cpp index c65643e..921d596 100644 --- a/src/elements/pvod.cpp +++ b/src/elements/pvod.cpp @@ -11,7 +11,7 @@ int update_PVOD(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_SPRK && parts[r>>8].life<4) + if ((r&0xFF)==PT_SPRK && parts[r>>8].life>0 && parts[r>>8].life<4) { if (parts[r>>8].ctype==PT_PSCN) parts[i].life = 10; diff --git a/src/elements/stor.cpp b/src/elements/stor.cpp index 555122c..cf64255 100644 --- a/src/elements/stor.cpp +++ b/src/elements/stor.cpp @@ -20,7 +20,7 @@ int update_STOR(UPDATE_FUNC_ARGS) { parts[i].pavg[1] = parts[r>>8].ctype; sim->kill_part(r>>8); } - if(parts[i].tmp && (r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN && parts[r>>8].life<4) + if(parts[i].tmp && (r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN && parts[r>>8].life>0 && parts[r>>8].life<4) { for(ry1 = 1; ry1 >= -1; ry1--){ for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ // Oscilate the X starting at 0, 1, -1, 3, -5, etc (Though stop at -1) diff --git a/src/elements/wire.cpp b/src/elements/wire.cpp index 4e5d072..88d2a5e 100644 --- a/src/elements/wire.cpp +++ b/src/elements/wire.cpp @@ -29,10 +29,9 @@ int update_WIRE(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if((r&0xFF)==PT_SPRK && parts[r>>8].life<4 && parts[r>>8].ctype==PT_PSCN) + if((r&0xFF)==PT_SPRK && parts[r>>8].life==3 && parts[r>>8].ctype==PT_PSCN) { parts[i].ctype=1; - parts[r>>8].life=0; return 0; } else if((r&0xFF)==PT_NSCN && parts[i].tmp==1){sim->create_part(-1, x+rx, y+ry, PT_SPRK);} -- cgit v0.9.2-21-gd62e From fe5ae5e7928a8b6f9d51ba6d53b1be1444e12b9b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 17:26:12 +0100 Subject: TPT: Make ARAY fire once per spark 72a4358eee diff --git a/src/elements/aray.cpp b/src/elements/aray.cpp index dd4a80b..844b549 100644 --- a/src/elements/aray.cpp +++ b/src/elements/aray.cpp @@ -11,7 +11,7 @@ int update_ARAY(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_SPRK && parts[r>>8].life>0 && parts[r>>8].life<4) { + if ((r&0xFF)==PT_SPRK && parts[r>>8].life==3) { int destroy = (parts[r>>8].ctype==PT_PSCN)?1:0; int nostop = (parts[r>>8].ctype==PT_INST)?1:0; for (docontinue = 1, nxx = 0, nyy = 0, nxi = rx*-1, nyi = ry*-1; docontinue; nyy+=nyi, nxx+=nxi) { -- cgit v0.9.2-21-gd62e From e68d14a5bf2177495ceb071dfa85d3d2e63b93eb Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 17:28:37 +0100 Subject: TPT: INSL blocks DLAY conduction, and raise DLAY temperature limit 06cb98f705 diff --git a/src/elements/dlay.cpp b/src/elements/dlay.cpp index 06b59d9..fe2d175 100644 --- a/src/elements/dlay.cpp +++ b/src/elements/dlay.cpp @@ -7,17 +7,17 @@ int update_DLAY(UPDATE_FUNC_ARGS) { parts[i].life--; //if (parts[i].life==1) //{ - if (parts[i].temp>=256.0+273.15) - parts[i].temp=256.0+273.15; - if (parts[i].temp<= -256.0+273.15) - parts[i].temp = -256.0+273.15; + if (parts[i].temp>=MAX_TEMP+273.15f) + parts[i].temp = MAX_TEMP+273.15f; + if (parts[i].temp<= 1.0f+273.15f) + parts[i].temp = 1.0f+273.15f; for (rx=-2; rx<3; rx++) for (ry=-2; ry<3; ry++) if (x+rx>=0 && y+ry>0 && x+rxparts_avg(r>>8, i,PT_INSL)==PT_INSL) continue; if ((r&0xFF)==PT_SPRK && parts[i].life==0 && parts[r>>8].life>0 && parts[r>>8].life<4 && parts[r>>8].ctype==PT_PSCN) { -- cgit v0.9.2-21-gd62e From fd09db2345b21632a658d1e7fad6694578ef8274 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 17:32:06 +0100 Subject: TPT: Prevent ambient heat going through walls ccb88b6b3b diff --git a/src/simulation/Air.cpp b/src/simulation/Air.cpp index 3c88e91..ff61bac 100644 --- a/src/simulation/Air.cpp +++ b/src/simulation/Air.cpp @@ -39,7 +39,12 @@ void Air::make_kernel(void) //used for velocity void Air::update_airh(void) { int x, y, i, j; - float dh, dx, dy, f, tx, ty; + float odh, dh, dx, dy, f, tx, ty; + for (y=0; y0 && y+j0 && x+i=2 && i=2 && j Date: Tue, 17 Apr 2012 17:42:09 +0100 Subject: TPT: Fix stationary photons being created by PCLN/PBCN 91163c44ab diff --git a/src/elements/pbcn.cpp b/src/elements/pbcn.cpp index a6bbe5a..aa4c336 100644 --- a/src/elements/pbcn.cpp +++ b/src/elements/pbcn.cpp @@ -59,12 +59,19 @@ int update_PBCN(UPDATE_FUNC_ARGS) { } if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x+rx, y+ry, parts[i].ctype); - if (r!=-1) { - parts[r].vx = rx*3; - parts[r].vy = ry*3; + for (rx=-1; rx<2; rx++) + { + for (ry = -1; ry < 2; ry++) + { + if (rx || ry) + { + int r = sim->create_part(-1, x + rx, y + ry, + parts[i].ctype); + if (r != -1) + { + parts[r].vx = rx * 3; + parts[r].vy = ry * 3; + } } } } diff --git a/src/elements/pcln.cpp b/src/elements/pcln.cpp index 86d67f6..4fdffb6 100644 --- a/src/elements/pcln.cpp +++ b/src/elements/pcln.cpp @@ -49,12 +49,19 @@ int update_PCLN(UPDATE_FUNC_ARGS) { } if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x+rx, y+ry, parts[i].ctype); - if (r!=-1) { - parts[r].vx = rx*3; - parts[r].vy = ry*3; + for (rx=-1; rx<2; rx++) + { + for (ry = -1; ry < 2; ry++) + { + if (rx || ry) + { + int r = sim->create_part(-1, x + rx, y + ry, + parts[i].ctype); + if (r != -1) + { + parts[r].vx = rx * 3; + parts[r].vy = ry * 3; + } } } } -- cgit v0.9.2-21-gd62e From 22381b24621c72a6cb579b4735584abe9d43b248 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 17:45:03 +0100 Subject: TPT: Draw pixels for the entire fire_alpha array 9001508623 diff --git a/src/Renderer.cpp b/src/Renderer.cpp index dba5a3b..10a9205 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -495,8 +495,8 @@ void Renderer::render_fire() g = fire_g[j][i]; b = fire_b[j][i]; if (r || g || b) - for (y=-CELL+1; y<2*CELL; y++) - for (x=-CELL+1; x<2*CELL; x++) + for (y=-CELL; y<2*CELL; y++) + for (x=-CELL; x<2*CELL; x++) this->g->addpixel(i*CELL+x, j*CELL+y, r, g, b, fire_alpha[y+CELL][x+CELL]); r *= 8; g *= 8; -- cgit v0.9.2-21-gd62e From df303dc4911c55031c74d30e13a58e02b27e7068 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 17:46:44 +0100 Subject: TPT: Allow BRAY from PSCN to pass through sparked INWR e769f3feb8 diff --git a/src/elements/aray.cpp b/src/elements/aray.cpp index 844b549..f1fe0f6 100644 --- a/src/elements/aray.cpp +++ b/src/elements/aray.cpp @@ -84,7 +84,7 @@ int update_ARAY(UPDATE_FUNC_ARGS) { parts[r>>8].life = 1; docontinue = 1; //this if prevents red BRAY from stopping on certain materials - } else if ((r&0xFF)==PT_STOR || (r&0xFF)==PT_INWR || (r&0xFF)==PT_ARAY || (r&0xFF)==PT_WIFI || (r&0xFF)==PT_FILT || ((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { + } else if ((r&0xFF)==PT_STOR || (r&0xFF)==PT_INWR || ((r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_INWR) || (r&0xFF)==PT_ARAY || (r&0xFF)==PT_WIFI || (r&0xFF)==PT_FILT || ((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { if((r&0xFF)==PT_STOR) { parts[r>>8].tmp = 0; -- cgit v0.9.2-21-gd62e From 89788d43c3c45bf0535b200a7703b91e0297208b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 17:48:12 +0100 Subject: TPT: Make DEUT compress when Newtonian gravity is applied to it c960c29f72 diff --git a/src/elements/deut.cpp b/src/elements/deut.cpp index cee38de..e5efe53 100644 --- a/src/elements/deut.cpp +++ b/src/elements/deut.cpp @@ -2,9 +2,13 @@ int update_DEUT(UPDATE_FUNC_ARGS) { int r, rx, ry, trade, np; + float gravtot = fabs(sim->gravy[(y/CELL)*(XRES/CELL)+(x/CELL)])+fabs(sim->gravx[(y/CELL)*(XRES/CELL)+(x/CELL)]); int maxlife = ((10000/(parts[i].temp + 1))-1); if ((10000%((int)parts[i].temp+1))>rand()%((int)parts[i].temp+1)) maxlife ++; + // Compress when Newtonian gravity is applied + // multiplier=1 when gravtot=0, multiplier -> 5 as gravtot -> inf + maxlife = maxlife*(5.0f - 8.0f/(gravtot+2.0f)); if (parts[i].life < maxlife) { for (rx=-1; rx<2; rx++) -- cgit v0.9.2-21-gd62e From 2417ad3b41589f07eecb6e32c913c8858589c13c Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 18:07:22 +0100 Subject: TPT: Prevent gaps in beams of photons from powered clone 3702438482 diff --git a/src/elements/pbcn.cpp b/src/elements/pbcn.cpp index aa4c336..3b992d4 100644 --- a/src/elements/pbcn.cpp +++ b/src/elements/pbcn.cpp @@ -71,6 +71,11 @@ int update_PBCN(UPDATE_FUNC_ARGS) { { parts[r].vx = rx * 3; parts[r].vy = ry * 3; + if (r>i) + { + // Make sure movement doesn't happen until next frame, to avoid gaps in the beams of photons produced + parts[r].flags |= FLAG_SKIPMOVE; + } } } } diff --git a/src/elements/pcln.cpp b/src/elements/pcln.cpp index 4fdffb6..ba2c721 100644 --- a/src/elements/pcln.cpp +++ b/src/elements/pcln.cpp @@ -61,6 +61,11 @@ int update_PCLN(UPDATE_FUNC_ARGS) { { parts[r].vx = rx * 3; parts[r].vy = ry * 3; + if (r>i) + { + // Make sure movement doesn't happen until next frame, to avoid gaps in the beams of photons produced + parts[r].flags |= FLAG_SKIPMOVE; + } } } } diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h index 9e7e654..8acafde 100644 --- a/src/simulation/Elements.h +++ b/src/simulation/Elements.h @@ -46,6 +46,7 @@ #define PROP_SPARKSETTLE 0x20000 //2^17 Allow Sparks/Embers to settle #define FLAG_STAGNANT 1 +#define FLAG_SKIPMOVE 0x2 // skip movement for one frame, only implemented for PHOT #define ST_NONE 0 #define ST_SOLID 1 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 9b23ae2..8396b93 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2922,6 +2922,12 @@ killed: if ((t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)) { if (t == PT_PHOT) { + if (parts[i].flags&FLAG_SKIPMOVE) + { + parts[i].flags &= ~FLAG_SKIPMOVE; + continue; + } + rt = pmap[fin_y][fin_x] & 0xFF; lt = pmap[y][x] & 0xFF; -- cgit v0.9.2-21-gd62e From fdb4dff4d77d36e45e48847a602b53f786380ba0 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 18:13:17 +0100 Subject: TPT: Lua methods for reading/writing the bmap and emap (no mapped walltypes yet) 1c4bce1f22 diff --git a/src/cat/LuaScriptHelper.h b/src/cat/LuaScriptHelper.h index b5b885d..079a32e 100644 --- a/src/cat/LuaScriptHelper.h +++ b/src/cat/LuaScriptHelper.h @@ -81,6 +81,14 @@ int luatpt_set_property(lua_State* l); int luatpt_get_property(lua_State* l); +int luatpt_set_wallmap(lua_State* l); + +int luatpt_get_wallmap(lua_State* l); + +int luatpt_set_elecmap(lua_State* l); + +int luatpt_get_elecmap(lua_State* l); + int luatpt_drawpixel(lua_State* l); int luatpt_drawrect(lua_State* l); diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index 84d1569..5d07279 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -34,6 +34,10 @@ LuaScriptInterface::LuaScriptInterface(GameModel * m): {"reset_spark", &luatpt_reset_spark}, {"set_property", &luatpt_set_property}, {"get_property", &luatpt_get_property}, + {"set_wallmap", &luatpt_set_wallmap}, + {"get_wallmap", &luatpt_get_wallmap}, + {"set_elecmap", &luatpt_set_elecmap}, + {"get_elecmap", &luatpt_get_elecmap}, {"drawpixel", &luatpt_drawpixel}, {"drawrect", &luatpt_drawrect}, {"fillrect", &luatpt_fillrect}, @@ -1240,6 +1244,120 @@ int luatpt_set_property(lua_State* l) return 0; } +int luatpt_set_wallmap(lua_State* l) +{ + int nx, ny, acount; + int x1, y1, width, height; + float value; + acount = lua_gettop(l); + + x1 = abs(luaL_optint(l, 1, 0)); + y1 = abs(luaL_optint(l, 2, 0)); + width = abs(luaL_optint(l, 3, XRES/CELL)); + height = abs(luaL_optint(l, 4, YRES/CELL)); + value = (float)luaL_optint(l, acount, 0); + + if(acount==5) //Draw rect + { + if(x1 > (XRES/CELL)) + x1 = (XRES/CELL); + if(y1 > (YRES/CELL)) + y1 = (YRES/CELL); + if(x1+width > (XRES/CELL)) + width = (XRES/CELL)-x1; + if(y1+height > (YRES/CELL)) + height = (YRES/CELL)-y1; + for (nx = x1; nxbmap[ny][nx] = value; + } + } + else //Set point + { + if(x1 > (XRES/CELL)) + x1 = (XRES/CELL); + if(y1 > (YRES/CELL)) + y1 = (YRES/CELL); + luacon_sim->bmap[y1][x1] = value; + } + return 0; +} + +int luatpt_get_wallmap(lua_State* l) +{ + int nx, ny, acount; + int x1, y1, width, height; + float value; + acount = lua_gettop(l); + + x1 = abs(luaL_optint(l, 1, 0)); + y1 = abs(luaL_optint(l, 2, 0)); + + if(x1 > (XRES/CELL) || y1 > (YRES/CELL)) + return luaL_error(l, "Out of range"); + + lua_pushinteger(l, luacon_sim->bmap[y1][x1]); + return 1; +} + +int luatpt_set_elecmap(lua_State* l) +{ + int nx, ny, acount; + int x1, y1, width, height; + float value; + acount = lua_gettop(l); + + x1 = abs(luaL_optint(l, 1, 0)); + y1 = abs(luaL_optint(l, 2, 0)); + width = abs(luaL_optint(l, 3, XRES/CELL)); + height = abs(luaL_optint(l, 4, YRES/CELL)); + value = (float)luaL_optint(l, acount, 0); + + if(acount==5) //Draw rect + { + if(x1 > (XRES/CELL)) + x1 = (XRES/CELL); + if(y1 > (YRES/CELL)) + y1 = (YRES/CELL); + if(x1+width > (XRES/CELL)) + width = (XRES/CELL)-x1; + if(y1+height > (YRES/CELL)) + height = (YRES/CELL)-y1; + for (nx = x1; nxemap[ny][nx] = value; + } + } + else //Set point + { + if(x1 > (XRES/CELL)) + x1 = (XRES/CELL); + if(y1 > (YRES/CELL)) + y1 = (YRES/CELL); + luacon_sim->emap[y1][x1] = value; + } + return 0; +} + +int luatpt_get_elecmap(lua_State* l) +{ + int nx, ny, acount; + int x1, y1, width, height; + float value; + acount = lua_gettop(l); + + x1 = abs(luaL_optint(l, 1, 0)); + y1 = abs(luaL_optint(l, 2, 0)); + + if(x1 > (XRES/CELL) || y1 > (YRES/CELL)) + return luaL_error(l, "Out of range"); + + lua_pushinteger(l, luacon_sim->emap[y1][x1]); + return 1; +} + int luatpt_get_property(lua_State* l) { int i, r, y; -- cgit v0.9.2-21-gd62e From 80a77f47501336f5d690965a6e8f79f2ef231943 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 18:42:36 +0100 Subject: TPT: Added FRAY - Force-ray and RPEL - Repeller f6696282e1 diff --git a/src/elements/fray.cpp b/src/elements/fray.cpp new file mode 100644 index 0000000..eaf82a0 --- /dev/null +++ b/src/elements/fray.cpp @@ -0,0 +1,29 @@ +#include "simulation/Element.h" + +int update_FRAY(UPDATE_FUNC_ARGS) { + int r, nxx, nyy, docontinue, len, nxi, nyi, rx, ry, nr, ry1, rx1; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx= 0 && y+nyi+nyy >= 0) || len>10) { + break; + } + r = pmap[y+nyi+nyy][x+nxi+nxx]; + if (!r) + r = sim->photons[y+nyi+nyy][x+nxi+nxx]; + + if (r && !(sim->ptypes[r&0xFF].properties & TYPE_SOLID)){ + parts[r>>8].vx += nxi*((parts[i].temp-273.15)/10.0f); + parts[r>>8].vy += nyi*((parts[i].temp-273.15)/10.0f); + } + } + } + } + return 0; +} diff --git a/src/elements/repl.cpp b/src/elements/repl.cpp new file mode 100644 index 0000000..e9cb1e6 --- /dev/null +++ b/src/elements/repl.cpp @@ -0,0 +1,22 @@ +#include "simulation\Element.h" + +int update_REPL(UPDATE_FUNC_ARGS) { + int r, rx, ry, ri; + for(ri = 0; ri <= 10; ri++) + { + rx = (rand()%20)-10; + ry = (rand()%20)-10; + if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; + + if (r && !(sim->ptypes[r&0xFF].properties & TYPE_SOLID)){ + parts[r>>8].vx += isign(rx)*((parts[i].temp-273.15)/10.0f); + parts[r>>8].vy += isign(ry)*((parts[i].temp-273.15)/10.0f); + } + } + } + return 0; +} diff --git a/src/simulation/ElementFunctions.h b/src/simulation/ElementFunctions.h index ef80b6f..be3f9f4 100644 --- a/src/simulation/ElementFunctions.h +++ b/src/simulation/ElementFunctions.h @@ -105,6 +105,8 @@ int update_DCEL(UPDATE_FUNC_ARGS); int update_BANG(UPDATE_FUNC_ARGS); int update_IGNT(UPDATE_FUNC_ARGS); int update_MISC(UPDATE_FUNC_ARGS); +int update_FRAY(UPDATE_FUNC_ARGS); +int update_REPL(UPDATE_FUNC_ARGS); int update_legacy_PYRO(UPDATE_FUNC_ARGS); int update_legacy_all(UPDATE_FUNC_ARGS); int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS); diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h index 8acafde..7d59dcb 100644 --- a/src/simulation/Elements.h +++ b/src/simulation/Elements.h @@ -275,7 +275,9 @@ #define PT_WIRE 156 #define PT_GBMB 157 #define PT_FIGH 158 -#define PT_NUM 159 +#define PT_FRAY 159 +#define PT_REPL 160 +#define PT_NUM 161 //#endif /* ELEMENTS_H_ */ diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 2fb10b2..47ce638 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -158,6 +158,7 @@ menu_section * LoadMenus(int & menuCount) {"\xC1", "Walls", 0, 1}, {"\xC2", "Electronics", 0, 1}, {"\xD6", "Powered Materials", 0, 1}, + {"\xE2", "Force", 0, 1}, {"\xC3", "Explosives", 0, 1}, {"\xC5", "Gasses", 0, 1}, {"\xC4", "Liquids", 0, 1}, @@ -321,8 +322,8 @@ part_type * LoadElements(int & elementCount) {"EMP", PIXPACK(0x66AAFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 3, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 121, "Breaks activated electronics.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_EMP, &graphics_EMP}, {"BREL", PIXPACK(0x707060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.18f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken electronics", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, {"ELEC", PIXPACK(0xDFEFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+200.0f+273.15f, 251, "Electrons", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_ELEC, &graphics_ELEC}, - {"ACEL", PIXPACK(0x0099CC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Accelerator", ST_NONE, TYPE_SOLID, &update_ACEL, &graphics_ACEL}, - {"DCEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Decelerator", ST_NONE, TYPE_SOLID, &update_DCEL, &graphics_DCEL}, + {"ACEL", PIXPACK(0x0099CC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_FORCE, R_TEMP+0.0f +273.15f, 251, "Accelerator", ST_NONE, TYPE_SOLID, &update_ACEL, &graphics_ACEL}, + {"DCEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_FORCE, R_TEMP+0.0f +273.15f, 251, "Decelerator", ST_NONE, TYPE_SOLID, &update_DCEL, &graphics_DCEL}, {"TNT", PIXPACK(0xC05050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_BANG, NULL}, {"IGNC", PIXPACK(0xC0B050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Ignition cord.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL, &update_IGNT, NULL}, {"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL}, @@ -343,6 +344,8 @@ part_type * LoadElements(int & elementCount) {"WIRE", PIXPACK(0xFFCC00), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 250, "WireWorld wires.",ST_SOLID,TYPE_SOLID,&update_WIRE, &graphics_WIRE}, {"GBMB", PIXPACK(0x1144BB), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Sticks to first object it touches then produces strong gravity push.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GBMB, &graphics_GBMB}, {"FIGH", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Fighter. Tries to kill stickmen.", ST_NONE, 0, &update_FIGH, &graphics_FIGH}, + {"FRAY", PIXPACK(0x00BBFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_FORCE, 20.0f+0.0f +273.15f, 0, "Force Emitter. Push or pull objects based on temp value, use like ARAY", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_FRAY, NULL}, + {"RPEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_FORCE, 20.0f+0.0f +273.15f, 0, "Repel or attract particles based on temp value.", ST_NONE, TYPE_SOLID, &update_REPL, NULL}, //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description }; elementCount = PT_NUM; @@ -523,6 +526,8 @@ part_transition * LoadTransitions(int & transitionCount) /* WIRE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /* GBMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /* FIGH */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, + /* FRAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* REPL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, }; #undef IPL #undef IPH diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index 3e35af6..2c13450 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -8,19 +8,20 @@ #define SC_WALL 0 #define SC_ELEC 1 #define SC_POWERED 2 -#define SC_EXPLOSIVE 3 -#define SC_GAS 4 -#define SC_LIQUID 5 -#define SC_POWDERS 6 -#define SC_SOLIDS 7 -#define SC_NUCLEAR 8 -#define SC_SPECIAL 9 -#define SC_LIFE 10 -#define SC_TOOL 11 -#define SC_DECO 12 -#define SC_CRACKER 13 -#define SC_CRACKER2 14 -#define SC_TOTAL 13 +#define SC_FORCE 3 +#define SC_EXPLOSIVE 4 +#define SC_GAS 5 +#define SC_LIQUID 6 +#define SC_POWDERS 7 +#define SC_SOLIDS 8 +#define SC_NUCLEAR 9 +#define SC_SPECIAL 10 +#define SC_LIFE 11 +#define SC_TOOL 12 +#define SC_DECO 13 +#define SC_CRACKER 14 +#define SC_CRACKER2 15 +#define SC_TOTAL 14 #define UI_WALLSTART 222 #define UI_ACTUALSTART 122 -- cgit v0.9.2-21-gd62e From df2d698ed5e6d824b6fb4a50eaaf4ecadf78f65b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 20:20:45 +0100 Subject: Fix drawing of lines, rects and fill within the zoom window diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index cf100ea..f289f49 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -241,7 +241,7 @@ void GameController::DrawRect(int toolSelection, ui::Point point1, ui::Point poi Brush * cBrush = gameModel->GetBrush(); if(!activeTool || !cBrush) return; - activeTool->DrawRect(sim, cBrush, point1, point2); + activeTool->DrawRect(sim, cBrush, PointTranslate(point1), PointTranslate(point2)); } void GameController::DrawLine(int toolSelection, ui::Point point1, ui::Point point2) @@ -251,7 +251,7 @@ void GameController::DrawLine(int toolSelection, ui::Point point1, ui::Point poi Brush * cBrush = gameModel->GetBrush(); if(!activeTool || !cBrush) return; - activeTool->DrawLine(sim, cBrush, point1, point2); + activeTool->DrawLine(sim, cBrush, PointTranslate(point1), PointTranslate(point2)); } void GameController::DrawFill(int toolSelection, ui::Point point) @@ -261,7 +261,7 @@ void GameController::DrawFill(int toolSelection, ui::Point point) Brush * cBrush = gameModel->GetBrush(); if(!activeTool || !cBrush) return; - activeTool->DrawFill(sim, cBrush, point); + activeTool->DrawFill(sim, cBrush, PointTranslate(point)); } void GameController::DrawPoints(int toolSelection, queue & pointQueue) -- cgit v0.9.2-21-gd62e From 82a19334001969af688cd52eb48509d4b91cef59 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 14:43:09 +0100 Subject: TPT: Old nothing display mode in the form of Basic colour mode fe82685257 diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 10a9205..c8f301f 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -701,7 +701,7 @@ void Renderer::render_parts() fireg = graphicscache[t].fireg; fireb = graphicscache[t].fireb; } - else + else if(!(colour_mode & COLOUR_BASC)) { if (ptypes[t].graphics_func) { @@ -789,6 +789,13 @@ void Renderer::render_parts() colb = sin(frequency*q) * 16 + colb; if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; } + else if(colour_mode & COLOUR_BASC) + { + colr = PIXR(ptypes[t].pcolors); + colg = PIXG(ptypes[t].pcolors); + colb = PIXB(ptypes[t].pcolors); + pixel_mode = PMODE_FLAT; + } //Apply decoration colour if(!colour_mode) diff --git a/src/render/RenderView.cpp b/src/render/RenderView.cpp index 3c9811d..e44c72f 100644 --- a/src/render/RenderView.cpp +++ b/src/render/RenderView.cpp @@ -157,6 +157,11 @@ RenderView::RenderView(): colourModes.push_back(tCheckbox); tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_GRAD)); AddComponent(tCheckbox); + + tCheckbox = new ui::Checkbox(ui::Point(536, YRES+4), ui::Point(50, 16), "Basic"); + colourModes.push_back(tCheckbox); + tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_BASC)); + AddComponent(tCheckbox); } void RenderView::OnMouseDown(int x, int y, unsigned button) diff --git a/src/simulation/ElementGraphics.h b/src/simulation/ElementGraphics.h index 2f0946b..e84db94 100644 --- a/src/simulation/ElementGraphics.h +++ b/src/simulation/ElementGraphics.h @@ -37,6 +37,7 @@ #define COLOUR_HEAT 0x00000001 #define COLOUR_LIFE 0x00000002 #define COLOUR_GRAD 0x00000004 +#define COLOUR_BASC 0x00000008 #define COLOUR_DEFAULT 0x00000000 -- cgit v0.9.2-21-gd62e From f84dc03c23452af62c5772509b1b5732f22f1ca8 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 14:50:29 +0100 Subject: TPT: A new unstable REALISTIC option. No guarantees - but more realistic behaviour. f41f96f598 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 8396b93..6341f86 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2539,8 +2539,14 @@ void Simulation::update_particles_i(int start, int inc) if (ptypes[t].diffusion)//the random diffusion that gasses have { +#ifdef REALISTIC + //The magic number controlls diffusion speed + parts[i].vx += 0.05*sqrtf(parts[i].temp)*ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f); + parts[i].vy += 0.05*sqrtf(parts[i].temp)*ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f); +#else parts[i].vx += ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f); parts[i].vy += ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f); +#endif } j = surround_space = nt = 0;//if nt is 1 after this, then there is a particle around the current particle, that is NOT the current particle's type, for water movement. @@ -2571,8 +2577,8 @@ void Simulation::update_particles_i(int start, int inc) //heat transfer code h_count = 0; -#ifdef REALHEAT - if (t&&(t!=PT_HSWC||parts[i].life==10)) +#ifdef REALISTIC + if (t&&(t!=PT_HSWC||parts[i].life==10)&&ptypes[t].hconduct) { float c_Cm = 0.0f; #else @@ -2600,7 +2606,7 @@ void Simulation::update_particles_i(int start, int inc) &&(rt!=PT_FILT||(t!=PT_BRAY&&t!=PT_PHOT&&t!=PT_BIZR&&t!=PT_BIZRG))) { surround_hconduct[j] = r>>8; -#ifdef REALHEAT +#ifdef REALISTIC c_heat += parts[r>>8].temp*96.645/ptypes[rt].hconduct*fabs(ptypes[rt].weight); c_Cm += 96.645/ptypes[rt].hconduct*fabs(ptypes[rt].weight); #else @@ -2609,7 +2615,7 @@ void Simulation::update_particles_i(int start, int inc) h_count++; } } -#ifdef REALHEAT +#ifdef REALISTIC if (t == PT_PHOT) pt = (c_heat+parts[i].temp*96.645)/(c_Cm+96.645); else -- cgit v0.9.2-21-gd62e From eeff570f89ff5519df26dc4c85739a49f7b9d1a0 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 14:57:29 +0100 Subject: TPT: Fixed the bug with fighters running away from stick mans, but now boundary check is worser so fighters won't usually notice holes on their way 2b4d0442b5 diff --git a/src/elements/figh.cpp b/src/elements/figh.cpp index 35b5a20..6a8bb4e 100644 --- a/src/elements/figh.cpp +++ b/src/elements/figh.cpp @@ -4,41 +4,41 @@ int update_FIGH(UPDATE_FUNC_ARGS) { playerst* figh = &sim->fighters[(unsigned char)parts[i].tmp]; - float tarx, tary; + unsigned int tarx, tary; parts[i].tmp2 = 0; //0 - stay in place, 1 - seek a stick man //Set target cords - if (sim->player.spwn) + if (sim->player.spwn && sim->player2.spwn) { - if (sim->player2.spwn) if ((pow(sim->player.legs[2]-x, 2) + pow(sim->player.legs[3]-y, 2))<= (pow(sim->player2.legs[2]-x, 2) + pow(sim->player2.legs[3]-y, 2))) { - tarx = sim->player.legs[2]; - tary = sim->player.legs[3]; + tarx = (unsigned int)sim->player.legs[2]; + tary = (unsigned int)sim->player.legs[3]; } else { - tarx = sim->player2.legs[2]; - tary = sim->player2.legs[3]; + tarx = (unsigned int)sim->player2.legs[2]; + tary = (unsigned int)sim->player2.legs[3]; } - else - { - tarx = sim->player.legs[2]; - tary = sim->player.legs[3]; - } - - parts[i].tmp2 = 1; + parts[i].tmp2 = 1; } else + { + if (sim->player.spwn) + { + tarx = (unsigned int)sim->player.legs[2]; + tary = (unsigned int)sim->player.legs[3]; + parts[i].tmp2 = 1; + } if (sim->player2.spwn) { - tarx = sim->player2.legs[2]; - tary = sim->player2.legs[3]; - + tarx = (unsigned int)sim->player2.legs[2]; + tary = (unsigned int)sim->player2.legs[3]; parts[i].tmp2 = 1; } + } switch (parts[i].tmp2) { @@ -46,14 +46,15 @@ int update_FIGH(UPDATE_FUNC_ARGS) if ((pow(tarx-x, 2) + pow(tary-y, 2))<600) { if (figh->elem == PT_LIGH || figh->elem == PT_NEUT - || (sim->ptypes[figh->elem].properties&(PROP_DEADLY|PROP_RADIOACTIVE)) + || sim->ptypes[figh->elem].properties&(PROP_DEADLY|PROP_RADIOACTIVE) || sim->ptypes[figh->elem].heat>=323 || sim->ptypes[figh->elem].heat<=243) figh->comm = (int)figh->comm | 0x08; } else - if (tarxeval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+6, NULL)) + if(!(sim->eval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+6, NULL) + && sim->eval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+3, NULL))) figh->comm = 0x01; else figh->comm = 0x02; @@ -65,7 +66,8 @@ int update_FIGH(UPDATE_FUNC_ARGS) } else { - if (!sim->eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+6, NULL)) + if (!(sim->eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+6, NULL) + && sim->eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+3, NULL))) figh->comm = 0x02; else figh->comm = 0x01; -- cgit v0.9.2-21-gd62e From ce7d749dda46fb068fa0496bfcb6aba6387f30d5 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 14:59:24 +0100 Subject: TPT: Prevent ARAY passing through some non-conductive materials, and let normal ARAY pass through sparked INWR d21c61aa52 diff --git a/src/elements/aray.cpp b/src/elements/aray.cpp index f1fe0f6..8505d81 100644 --- a/src/elements/aray.cpp +++ b/src/elements/aray.cpp @@ -44,12 +44,11 @@ int update_ARAY(UPDATE_FUNC_ARGS) { } else if ((r&0xFF)==PT_FILT) {//get color if passed through FILT colored = parts[r>>8].ctype; //this if prevents BRAY from stopping on certain materials - } else if ((r&0xFF)!=PT_STOR && (r&0xFF)!=PT_INWR && (r&0xFF)!=PT_ARAY && (r&0xFF)!=PT_WIFI && !((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { + } else if ((r&0xFF)!=PT_STOR && (r&0xFF)!=PT_INWR && ((r&0xFF)!=PT_SPRK || parts[r>>8].ctype!=PT_INWR) && (r&0xFF)!=PT_ARAY && (r&0xFF)!=PT_WIFI && !((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { if (nyy!=0 || nxx!=0) { sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK); } - //if (!(nostop && (ptypes[r&0xFF].properties&PROP_CONDUCTS))) { - if (!(nostop && parts[r>>8].ctype >= 0 && parts[r>>8].ctype < PT_NUM && (sim->ptypes[parts[r>>8].ctype].properties&PROP_CONDUCTS))) { + if (!(nostop && parts[r>>8].type==PT_SPRK && parts[r>>8].ctype >= 0 && parts[r>>8].ctype < PT_NUM && (sim->ptypes[parts[r>>8].ctype].properties&PROP_CONDUCTS))) { docontinue = 0; } else { docontinue = 1; -- cgit v0.9.2-21-gd62e From d03a9c8fe552a46bcc1eec8f0e717d135f66d809 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 15:10:09 +0100 Subject: TPT: Rotate/reflect particle, air, and fan velocities in transform_save 830629be3f diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 6341f86..0c8797e 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -734,18 +734,25 @@ void *Simulation::transform_save(void *odata, int *size, matrix2d transform, vec void *ndata; unsigned char (*bmapo)[XRES/CELL] = (unsigned char (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(unsigned char)); unsigned char (*bmapn)[XRES/CELL] = (unsigned char (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(unsigned char)); - Particle *partst = (Particle *)calloc(sizeof(Particle), NPART); - sign *signst = (sign *)calloc(MAXSIGNS, sizeof(sign)); + Particle *partst = (Particle*)calloc(sizeof(Particle), NPART); + sign *signst = (sign*)calloc(MAXSIGNS, sizeof(sign)); unsigned (*pmapt)[XRES] = (unsigned (*)[XRES])calloc(YRES*XRES, sizeof(unsigned)); float (*fvxo)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); float (*fvyo)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); float (*fvxn)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); float (*fvyn)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*vxo)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*vyo)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*vxn)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*vyn)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*pvo)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); + float (*pvn)[XRES/CELL] = (float (*)[XRES/CELL])calloc((YRES/CELL)*(XRES/CELL), sizeof(float)); int i, x, y, nx, ny, w, h, nw, nh; vector2d pos, tmp, ctl, cbr; + vector2d vel; vector2d cornerso[4]; unsigned char *odatac = (unsigned char *)odata; - //*if (parse_save(odata, *size, 0, 0, 0, bmapo, fvxo, fvyo, signst, partst, pmapt)) TODO: IMPLEMENT + //if (parse_save(odata, *size, 0, 0, 0, bmapo, vxo, vyo, pvo, fvxo, fvyo, signst, partst, pmapt)) //TODO: Implement { free(bmapo); free(bmapn); @@ -756,6 +763,12 @@ void *Simulation::transform_save(void *odata, int *size, matrix2d transform, vec free(fvyo); free(fvxn); free(fvyn); + free(vxo); + free(vyo); + free(vxn); + free(vyn); + free(pvo); + free(pvn); return odata; } w = odatac[6]*CELL; @@ -811,6 +824,10 @@ void *Simulation::transform_save(void *odata, int *size, matrix2d transform, vec } partst[i].x = nx; partst[i].y = ny; + vel = v2d_new(partst[i].vx, partst[i].vy); + vel = m2d_multiply_v2d(transform, vel); + partst[i].vx = vel.x; + partst[i].vy = vel.y; } for (y=0; y Date: Wed, 18 Apr 2012 15:11:51 +0100 Subject: TPT: Volume from heat change (for REALISTIC) 290cac8b7e diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 0c8797e..d466dc4 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2622,6 +2622,10 @@ void Simulation::update_particles_i(int start, int inc) c_heat = restrict_flt(c_heat, -MAX_TEMP+MIN_TEMP, MAX_TEMP-MIN_TEMP); parts[i].temp += c_heat; hv[y/CELL][x/CELL] -= c_heat; +#ifdef REALISTIC + //Volume increase from heat (temporary) + pv[y/CELL][x/CELL] -= c_heat*0.004; +#endif } c_heat = 0.0f; for (j=0; j<8; j++) -- cgit v0.9.2-21-gd62e From 6f3954b9263050a8f4fe0e778b214a6d117f85a9 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 15:14:40 +0100 Subject: TPT: (REALISTIC) Better air<->body heat conduction. Air density now influences on it (things don't heat vacuum). 71acd578b6 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index d466dc4..d85866a 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2618,16 +2618,24 @@ void Simulation::update_particles_i(int start, int inc) #endif if (aheat_enable) { +#ifdef REALISTIC + c_heat = parts[i].temp*96.645/ptypes[t].hconduct*fabs(ptypes[t].weight) + hv[y/CELL][x/CELL]*100*(pv[y/CELL][x/CELL]+273.15f)/256; + c_Cm = 96.645/ptypes[t].hconduct*fabs(ptypes[t].weight) + 100*(pv[y/CELL][x/CELL]+273.15f)/256; + pt = c_heat/c_Cm; + pt = restrict_flt(pt, -MAX_TEMP+MIN_TEMP, MAX_TEMP-MIN_TEMP); + parts[i].temp = pt; + //Pressure increase from heat (temporary) + pv[y/CELL][x/CELL] += (pt-hv[y/CELL][x/CELL])*0.004; + hv[y/CELL][x/CELL] = pt; +#else c_heat = (hv[y/CELL][x/CELL]-parts[i].temp)*0.04; c_heat = restrict_flt(c_heat, -MAX_TEMP+MIN_TEMP, MAX_TEMP-MIN_TEMP); parts[i].temp += c_heat; hv[y/CELL][x/CELL] -= c_heat; -#ifdef REALISTIC - //Volume increase from heat (temporary) - pv[y/CELL][x/CELL] -= c_heat*0.004; #endif } c_heat = 0.0f; + c_Cm = 0.0f; for (j=0; j<8; j++) { surround_hconduct[j] = i; -- cgit v0.9.2-21-gd62e From fa193eb7b4a76900a80bf9348a4877bf8943656e Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 15:16:52 +0100 Subject: TPT: Display decor in heat gradient view e83a1a21ae diff --git a/src/Renderer.cpp b/src/Renderer.cpp index c8f301f..c1fafaa 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -780,15 +780,6 @@ void Renderer::render_parts() cola = 255; if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; } - else if (colour_mode & COLOUR_GRAD) - { - float frequency = 0.05; - int q = sim->parts[i].temp-40; - colr = sin(frequency*q) * 16 + colr; - colg = sin(frequency*q) * 16 + colg; - colb = sin(frequency*q) * 16 + colb; - if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; - } else if(colour_mode & COLOUR_BASC) { colr = PIXR(ptypes[t].pcolors); @@ -798,7 +789,7 @@ void Renderer::render_parts() } //Apply decoration colour - if(!colour_mode) + if(!(colour_mode & ~COLOUR_GRAD)) { if(!(pixel_mode & NO_DECO) && decorations_enable) { @@ -815,6 +806,16 @@ void Renderer::render_parts() } } + if (colour_mode & COLOUR_GRAD) + { + float frequency = 0.05; + int q = sim->parts[i].temp-40; + colr = sin(frequency*q) * 16 + colr; + colg = sin(frequency*q) * 16 + colg; + colb = sin(frequency*q) * 16 + colb; + if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; + } + #ifndef OGLR //All colours are now set, check ranges if(colr>255) colr = 255; -- cgit v0.9.2-21-gd62e From 2ca07515c1367e31999d71c82982aa232e206acb Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 16:12:16 +0100 Subject: TPT: Fix fighters not going through portals correctly f41af45620 diff --git a/src/elements/prti.cpp b/src/elements/prti.cpp index f5b2374..384fd7e 100644 --- a/src/elements/prti.cpp +++ b/src/elements/prti.cpp @@ -29,6 +29,9 @@ int update_PRTI(UPDATE_FUNC_ARGS) { continue; } + if ((r&0xFF)==PT_STKM || (r&0xFF)==PT_STKM2 || (r&0xFF)==PT_FIGH) + continue;// Handling these is a bit more complicated, and is done in STKM_interact() + if ((r&0xFF) == PT_SOAP) sim->detach(r>>8); diff --git a/src/elements/prto.cpp b/src/elements/prto.cpp index 32e7251..bbef6be 100644 --- a/src/elements/prto.cpp +++ b/src/elements/prto.cpp @@ -47,8 +47,31 @@ int update_PRTO(UPDATE_FUNC_ARGS) { sim->player.spwn = 0; if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM2) sim->player2.spwn = 0; + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_FIGH) + { + sim->fighcount--; + sim->fighters[(unsigned char)sim->portalp[parts[i].tmp][randomness][nnx].tmp].spwn = 0; + } np = sim->create_part(-1, x+rx, y+ry, sim->portalp[parts[i].tmp][randomness][nnx].type); - if (np<0) continue; + if (np<0) + { + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM) + sim->player.spwn = 1; + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM2) + sim->player2.spwn = 1; + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_FIGH) + { + sim->fighcount++; + sim->fighters[(unsigned char)sim->portalp[parts[i].tmp][randomness][nnx].tmp].spwn = 1; + } + continue; + } + if (parts[np].type==PT_FIGH) + { + // Release the fighters[] element allocated by create_part, the one reserved when the fighter went into the portal will be used + sim->fighters[(unsigned char)parts[np].tmp].spwn = 0; + sim->fighters[(unsigned char)sim->portalp[parts[i].tmp][randomness][nnx].tmp].spwn = 1; + } parts[np] = sim->portalp[parts[i].tmp][randomness][nnx]; parts[np].x = x+rx; parts[np].y = y+ry; diff --git a/src/elements/stkm.cpp b/src/elements/stkm.cpp index 68ef1ed..e7eecf4 100644 --- a/src/elements/stkm.cpp +++ b/src/elements/stkm.cpp @@ -453,7 +453,10 @@ void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y) { sim->portalp[sim->parts[r>>8].tmp][count][nnx] = sim->parts[i]; sim->kill_part(i); - playerp->spwn = 1;//stop SPWN creating a new STKM while he is in portal + //stop new STKM/fighters being created to replace the ones in the portal: + playerp->spwn = 1; + if (sim->portalp[sim->parts[r>>8].tmp][count][nnx].type==PT_FIGH) + sim->fighcount++; break; } } -- cgit v0.9.2-21-gd62e From a761fa5cbce65f303a068e6587dd8ef891468fcb Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 16:14:10 +0100 Subject: TPT: Remove 2 pixels per frame speed limit in detector wall b4a06df0b2 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index d85866a..7941d25 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2952,7 +2952,7 @@ killed: clear_y = (int)(clear_yf+0.5f); break; } - if (fin_x=XRES-CELL || fin_y>=YRES-CELL || pmap[fin_y][fin_x] || (bmap[fin_y/CELL][fin_x/CELL] && (bmap[fin_y/CELL][fin_x/CELL]==WL_DESTROYALL || bmap[fin_y/CELL][fin_x/CELL]==WL_DETECT || !eval_move(t,fin_x,fin_y,NULL)))) + if (fin_x=XRES-CELL || fin_y>=YRES-CELL || pmap[fin_y][fin_x] || (bmap[fin_y/CELL][fin_x/CELL] && (bmap[fin_y/CELL][fin_x/CELL]==WL_DESTROYALL || !eval_move(t,fin_x,fin_y,NULL)))) { // found an obstacle clear_xf = fin_xf-dx; @@ -2961,7 +2961,8 @@ killed: clear_y = (int)(clear_yf+0.5f); break; } - + if (bmap[fin_y/CELL][fin_x/CELL]==WL_DETECT && emap[fin_y/CELL][fin_x/CELL]<8) + set_emap(fin_x/CELL, fin_y/CELL); } } -- cgit v0.9.2-21-gd62e From 43ae47ba773aa97421d11474c769ce9fe1191b06 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 16:40:43 +0100 Subject: TPT: Added smudge tool afbe8cf38e diff --git a/src/game/DecorationTool.h b/src/game/DecorationTool.h index 5a11bc6..c45eca3 100644 --- a/src/game/DecorationTool.h +++ b/src/game/DecorationTool.h @@ -7,7 +7,7 @@ class DecorationTool: public Tool { public: - enum ToolType { BlendAdd = DECO_ADD, BlendRemove = DECO_SUBTRACT, BlendMultiply = DECO_MULTIPLY, BlendDivide = DECO_DIVIDE, BlendSet = DECO_DRAW }; + enum ToolType { BlendAdd = DECO_ADD, BlendRemove = DECO_SUBTRACT, BlendMultiply = DECO_MULTIPLY, BlendDivide = DECO_DIVIDE, BlendSet = DECO_DRAW, BlendSmudge = DECO_SMUDGE }; ToolType decoMode; diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index fa18e24..5a29d09 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -97,6 +97,7 @@ GameModel::GameModel(): menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendRemove, "SUB", 0, 0, 0)); menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendMultiply, "MUL", 0, 0, 0)); menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendDivide, "DIV", 0, 0, 0)); + menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendSmudge, "SMDG", 0, 0, 0)); menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendSet, "SET", 0, 0, 0)); //Set default brush palette diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 7941d25..aaa4834 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -371,6 +371,28 @@ void Simulation::ApplyDecoration(int x, int y, int colR_, int colG_, int colB_, tg /= 1.0f+(colG*0.1f)*colA; tb /= 1.0f+(colB*0.1f)*colA; } + else if (mode == DECO_SMUDGE) + { + int rx, ry, num = 0; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + { + if ((pmap[y+ry][x+rx]&0xFF) && parts[pmap[y+ry][x+rx]>>8].dcolour) + { + num++; + ta += float((parts[pmap[y+ry][x+rx]>>8].dcolour>>24)&0xFF)/255.0f; + tr += float((parts[pmap[y+ry][x+rx]>>8].dcolour>>16)&0xFF)/255.0f; + tg += float((parts[pmap[y+ry][x+rx]>>8].dcolour>>8)&0xFF)/255.0f; + tb += float((parts[pmap[y+ry][x+rx]>>8].dcolour)&0xFF)/255.0f; + } + } + if (num == 0) + return; + ta = ta/float(num)+0.5f; + tr = tr/float(num)+0.5f; + tg = tg/float(num)+0.5f; + tb = tb/float(num)+0.5f; + } colA_ = ta*255.0f; colR_ = tr*255.0f; diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index 2c13450..1e1c455 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -61,6 +61,7 @@ #define DECO_SUBTRACT 2 #define DECO_MULTIPLY 3 #define DECO_DIVIDE 4 +#define DECO_SMUDGE 5 //Old IDs for GOL types #define GT_GOL 78 -- cgit v0.9.2-21-gd62e From bc4a3355de313d8fe928d2c8abed66108d141efa Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 16:51:47 +0100 Subject: TPT: Fusion, step 1 446f773542 diff --git a/src/elements/h2.cpp b/src/elements/h2.cpp index 3a92cfe..dba08e9 100644 --- a/src/elements/h2.cpp +++ b/src/elements/h2.cpp @@ -16,19 +16,44 @@ int update_H2(UPDATE_FUNC_ARGS) sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); sim->part_change_type(i,x,y,PT_OIL); } - if ((r&0xFF)==PT_FIRE) + if (parts[i].tmp != 1) { - parts[r>>8].temp=2473.15; - if(parts[r>>8].tmp&0x02) - parts[r>>8].temp=3473; - parts[r>>8].tmp |= 1; - } - if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM || (r&0xFF)==PT_LAVA) - { - sim->create_part(i,x,y,PT_FIRE); - parts[i].temp+=(rand()/(RAND_MAX/100)); - parts[i].tmp |= 1; + if ((r&0xFF)==PT_FIRE) + { + parts[r>>8].temp=2473.15; + if(parts[r>>8].tmp&0x02) + parts[r>>8].temp=3473; + parts[r>>8].tmp |= 1; + } + if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM || (r&0xFF)==PT_LAVA) + { + sim->create_part(i,x,y,PT_FIRE); + parts[i].temp+=(rand()/(RAND_MAX/100)); + parts[i].tmp |= 1; + } } + if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f && (r&0xFF) == PT_H2) + parts[r>>8].tmp = 1; } + if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f) + { + parts[i].tmp = 1; + if (rand()%5 < 1) + { + int j; + sim->part_change_type(i,x,y,PT_PLSM); + sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); + sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); + if (j) + parts[j].ctype = 0xFFFF00; + sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); + if (rand()%2) + sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); + if (parts[i].temp < 4273.15) + parts[i].temp = 4273.15; + sim->pv[y/CELL][x/CELL] += 50; + } + } return 0; } diff --git a/src/elements/pyro.cpp b/src/elements/pyro.cpp index 81f00f7..92d4d8c 100644 --- a/src/elements/pyro.cpp +++ b/src/elements/pyro.cpp @@ -46,6 +46,7 @@ int update_PYRO(UPDATE_FUNC_ARGS) { (t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL)) && (t!=PT_PHOT || rt!=PT_INSL) && (rt!=PT_SPNG || parts[r>>8].life==0) && + (rt!=PT_H2 || parts[r>>8].tmp!=1) && sim->ptypes[rt].flammable && (sim->ptypes[rt].flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000)) { sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); -- cgit v0.9.2-21-gd62e From 4ddf723167aa4d07b16ef1aaac6b4dff16c87a42 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 18:33:34 +0100 Subject: TPT: prevent ionizing NBLE and burning H2 during fusion 83d4658589 diff --git a/src/elements/elec.cpp b/src/elements/elec.cpp index e8ddf5e..317d9f5 100644 --- a/src/elements/elec.cpp +++ b/src/elements/elec.cpp @@ -79,7 +79,7 @@ int update_ELEC(UPDATE_FUNC_ARGS) { sim->kill_part(i); return 1; } - if (sim->ptypes[r&0xFF].properties & PROP_CONDUCTS) + if ((sim->ptypes[r&0xFF].properties & PROP_CONDUCTS) && ((r&0xFF)!=PT_H2||parts[i].tmp!=1)) { sim->create_part(-1, x+rx, y+ry, PT_SPRK); sim->kill_part(i); diff --git a/src/elements/h2.cpp b/src/elements/h2.cpp index dba08e9..7298ebc 100644 --- a/src/elements/h2.cpp +++ b/src/elements/h2.cpp @@ -3,6 +3,8 @@ int update_H2(UPDATE_FUNC_ARGS) { int r,rx,ry,rt; + if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f) + parts[i].tmp = 1; for (rx=-2; rx<3; rx++) for (ry=-2; ry<3; ry++) if (x+rx>=0 && y+ry>=0 && x+rxpart_change_type(r>>8,x+rx,y+ry,PT_WATR); sim->part_change_type(i,x,y,PT_OIL); } + if (parts[r>>8].temp > 2273.15)// && pv[y/CELL][x/CELL] > 50.0f) + continue; if (parts[i].tmp != 1) { - if ((r&0xFF)==PT_FIRE) + if (rt==PT_FIRE) { parts[r>>8].temp=2473.15; if(parts[r>>8].tmp&0x02) parts[r>>8].temp=3473; parts[r>>8].tmp |= 1; } - if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM || (r&0xFF)==PT_LAVA) + if (rt==PT_FIRE || rt==PT_PLSM || rt==PT_LAVA) { sim->create_part(i,x,y,PT_FIRE); parts[i].temp+=(rand()/(RAND_MAX/100)); parts[i].tmp |= 1; } } - if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f && (r&0xFF) == PT_H2) - parts[r>>8].tmp = 1; } if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f) { @@ -42,14 +44,19 @@ int update_H2(UPDATE_FUNC_ARGS) { int j; sim->part_change_type(i,x,y,PT_PLSM); + parts[i].life = rand()%150+50; sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); - if (j) - parts[j].ctype = 0xFFFF00; - sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); + if (j) parts[j].ctype = 0xFFFF00; + + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); + if (j) parts[j].tmp = 1; if (rand()%2) - sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); + { + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); + if (j) parts[j].tmp = 1; + } if (parts[i].temp < 4273.15) parts[i].temp = 4273.15; sim->pv[y/CELL][x/CELL] += 50; diff --git a/src/elements/pyro.cpp b/src/elements/pyro.cpp index 92d4d8c..6ffe644 100644 --- a/src/elements/pyro.cpp +++ b/src/elements/pyro.cpp @@ -46,7 +46,7 @@ int update_PYRO(UPDATE_FUNC_ARGS) { (t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL)) && (t!=PT_PHOT || rt!=PT_INSL) && (rt!=PT_SPNG || parts[r>>8].life==0) && - (rt!=PT_H2 || parts[r>>8].tmp!=1) && + (rt!=PT_H2 || (parts[r>>8].temp < 2273.15 && sim->pv[y/CELL][x/CELL] < 50.0f)) && sim->ptypes[rt].flammable && (sim->ptypes[rt].flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000)) { sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); diff --git a/src/elements/sprk.cpp b/src/elements/sprk.cpp index 149d63b..e01c774 100644 --- a/src/elements/sprk.cpp +++ b/src/elements/sprk.cpp @@ -44,7 +44,7 @@ int update_SPRK(UPDATE_FUNC_ARGS) { parts[nearp].ctype = PT_ETRD; } } - else if (ct==PT_NBLE&&parts[i].life<=1) + else if (ct==PT_NBLE&&parts[i].life<=1&&parts[i].tmp!=1) { parts[i].life = rand()%150+50; sim->part_change_type(i,x,y,PT_PLSM); @@ -179,6 +179,8 @@ int update_SPRK(UPDATE_FUNC_ARGS) { conduct_sprk = 0; if (rt==PT_INST&&ct!=PT_PSCN) conduct_sprk = 0; + if (rt == PT_NBLE && parts[r>>8].tmp == 1) + conduct_sprk = 0; if (conduct_sprk) { if (rt==PT_WATR||rt==PT_SLTW) { -- cgit v0.9.2-21-gd62e From bf935ac7d8900d62db5007f0a6be13a0afb1491b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 18:40:14 +0100 Subject: TPT: fusion step 2 + modify temp/pressure of step 1 803ded3b33 diff --git a/src/elements/h2.cpp b/src/elements/h2.cpp index 7298ebc..8ebc1a9 100644 --- a/src/elements/h2.cpp +++ b/src/elements/h2.cpp @@ -43,23 +43,24 @@ int update_H2(UPDATE_FUNC_ARGS) if (rand()%5 < 1) { int j; + float temp = parts[i].temp; sim->part_change_type(i,x,y,PT_PLSM); parts[i].life = rand()%150+50; - sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); - sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); - if (j) parts[j].ctype = 0xFFFF00; + if (j != -1) { parts[j].ctype = 0xFFFF00; parts[j].temp = temp; } j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); - if (j) parts[j].tmp = 1; + if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; } + if (rand()%2) { j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); - if (j) parts[j].tmp = 1; + if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; } } - if (parts[i].temp < 4273.15) - parts[i].temp = 4273.15; - sim->pv[y/CELL][x/CELL] += 50; + parts[i].temp += 6000; + sim->pv[y/CELL][x/CELL] += 30; } } return 0; diff --git a/src/elements/nble.cpp b/src/elements/nble.cpp new file mode 100644 index 0000000..c35859f --- /dev/null +++ b/src/elements/nble.cpp @@ -0,0 +1,27 @@ +#include "simulation/Element.h" + +int update_NBLE(UPDATE_FUNC_ARGS) +{ + if (parts[i].temp > 5273.15 && sim->pv[y/CELL][x/CELL] > 50.0f) + { + parts[i].tmp = 1; + if (rand()%5 < 1) + { + int j; + float temp = parts[i].temp; + sim->part_change_type(i,x,y,PT_PLSM); + parts[i].life = rand()%150+50; + sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); + sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); + if (j != -1) { parts[j].ctype = 0xFF0000; parts[j].temp = temp; } + + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_CO2); + if (j != -1) parts[j].temp = temp; + + parts[i].temp += 10000; + sim->pv[y/CELL][x/CELL] += 30; + } + } + return 0; +} diff --git a/src/simulation/ElementFunctions.h b/src/simulation/ElementFunctions.h index be3f9f4..ad597b7 100644 --- a/src/simulation/ElementFunctions.h +++ b/src/simulation/ElementFunctions.h @@ -107,6 +107,7 @@ int update_IGNT(UPDATE_FUNC_ARGS); int update_MISC(UPDATE_FUNC_ARGS); int update_FRAY(UPDATE_FUNC_ARGS); int update_REPL(UPDATE_FUNC_ARGS); +int update_NBLE(UPDATE_FUNC_ARGS); int update_legacy_PYRO(UPDATE_FUNC_ARGS); int update_legacy_all(UPDATE_FUNC_ARGS); int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS); diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 47ce638..22181b5 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -237,7 +237,7 @@ part_type * LoadElements(int & elementCount) {"PLSM", PIXPACK(0xBB99FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.30f, 0.001f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, 10000.0f +273.15f, 5, "Plasma, extremely hot.", ST_NONE, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_PLSM}, {"ETRD", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)", ST_NONE, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, {"NICE", PIXPACK(0xC0E0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 35.0f, 46, "Nitrogen Ice.", ST_SOLID, TYPE_SOLID, NULL, NULL}, - {"NBLE", PIXPACK(0xEB4917), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 106, "Noble Gas. Diffuses. Conductive. Ionizes into plasma when introduced to electricity", ST_GAS, TYPE_GAS|PROP_CONDUCTS|PROP_LIFE_DEC, NULL, NULL}, + {"NBLE", PIXPACK(0xEB4917), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 106, "Noble Gas. Diffuses. Conductive. Ionizes into plasma when introduced to electricity", ST_GAS, TYPE_GAS|PROP_CONDUCTS|PROP_LIFE_DEC, &update_NBLE, NULL}, {"BTRY", PIXPACK(0x858505), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Generates Electricity.", ST_SOLID, TYPE_SOLID, &update_BTRY, NULL}, {"LCRY", PIXPACK(0x505050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)", ST_SOLID, TYPE_SOLID, &update_LCRY, &graphics_LCRY}, {"STKM", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", ST_NONE, 0, &update_STKM, &graphics_STKM}, -- cgit v0.9.2-21-gd62e From a8483798cca834beb8d8657ab9e7508912dc5ebf Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 18:52:37 +0100 Subject: TPT: fusion step 3 8db6230414 diff --git a/src/elements/co2.cpp b/src/elements/co2.cpp index 62bc646..b267a73 100644 --- a/src/elements/co2.cpp +++ b/src/elements/co2.cpp @@ -27,5 +27,20 @@ int update_CO2(UPDATE_FUNC_ARGS) { sim->kill_part(r>>8); } } + if (parts[i].temp > 9773.15 && sim->pv[y/CELL][x/CELL] > 200.0f) + { + if (rand()%5 < 1) + { + int j; + sim->kill_part(i); + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) parts[j].temp = 15000; + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) parts[j].temp = 15000; + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_O2); if (j != -1) parts[j].temp = 15000; + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_SING); if (j != -1) { parts[j].temp = 15000; parts[i].life = rand()%100+450; } + + parts[i].temp += 15000; + sim->pv[y/CELL][x/CELL] += 100; + } + } return 0; } diff --git a/src/elements/h2.cpp b/src/elements/h2.cpp index 8ebc1a9..fc2e6c8 100644 --- a/src/elements/h2.cpp +++ b/src/elements/h2.cpp @@ -46,8 +46,8 @@ int update_H2(UPDATE_FUNC_ARGS) float temp = parts[i].temp; sim->part_change_type(i,x,y,PT_PLSM); parts[i].life = rand()%150+50; - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); + sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); + sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); if (j != -1) { parts[j].ctype = 0xFFFF00; parts[j].temp = temp; } diff --git a/src/elements/nble.cpp b/src/elements/nble.cpp index c35859f..13e4845 100644 --- a/src/elements/nble.cpp +++ b/src/elements/nble.cpp @@ -2,7 +2,7 @@ int update_NBLE(UPDATE_FUNC_ARGS) { - if (parts[i].temp > 5273.15 && sim->pv[y/CELL][x/CELL] > 50.0f) + if (parts[i].temp > 5273.15 && sim->pv[y/CELL][x/CELL] > 100.0f) { parts[i].tmp = 1; if (rand()%5 < 1) @@ -11,13 +11,13 @@ int update_NBLE(UPDATE_FUNC_ARGS) float temp = parts[i].temp; sim->part_change_type(i,x,y,PT_PLSM); parts[i].life = rand()%150+50; - sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); - sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); if (j != -1) { parts[j].ctype = 0xFF0000; parts[j].temp = temp; } j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_CO2); - if (j != -1) parts[j].temp = temp; + if (j != -1) parts[j].temp = temp-1000; parts[i].temp += 10000; sim->pv[y/CELL][x/CELL] += 30; -- cgit v0.9.2-21-gd62e From 779ac383dcb6d88d46723f1e9a2d99c80cadac70 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 19:02:27 +0100 Subject: TPT: Fix major update_particles_i bug, do_move was being called on nonexistant particles, causing kill_part to kill another particle 96ec3486e8 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index aaa4834..19215fd 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1401,58 +1401,30 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) if (parts[i].type == PT_NEUT && (ptypes[r & 0xFF].properties & PROP_NEUTABSORB)) { - parts[i].type = PT_NONE; + kill_part(i); return 0; } if ((r&0xFF)==PT_VOID || (r&0xFF)==PT_PVOD) //this is where void eats particles { - if (parts[i].type == PT_STKM) - { - player.spwn = 0; - } - if (parts[i].type == PT_STKM2) - { - player2.spwn = 0; - } - if (parts[i].type == PT_FIGH) - { - fighters[(unsigned char)parts[i].tmp].spwn = 0; - fighcount--; - } - parts[i].type=PT_NONE; + kill_part(i); return 0; } if ((r&0xFF)==PT_BHOL || (r&0xFF)==PT_NBHL) //this is where blackhole eats particles { - if (parts[i].type == PT_STKM) - { - player.spwn = 0; - } - if (parts[i].type == PT_STKM2) - { - player2.spwn = 0; - } - if (parts[i].type == PT_FIGH) - { - fighters[(unsigned char)parts[i].tmp].spwn = 0; - fighcount--; - } - parts[i].type=PT_NONE; if (!legacy_enable) { parts[r>>8].temp = restrict_flt(parts[r>>8].temp+parts[i].temp/2, MIN_TEMP, MAX_TEMP);//3.0f; } - + kill_part(i); return 0; } if (((r&0xFF)==PT_WHOL||(r&0xFF)==PT_NWHL) && parts[i].type==PT_ANAR) //whitehole eats anar { - parts[i].type=PT_NONE; if (!legacy_enable) { parts[r>>8].temp = restrict_flt(parts[r>>8].temp- (MAX_TEMP-parts[i].temp)/2, MIN_TEMP, MAX_TEMP); } - + kill_part(i); return 0; } @@ -1498,8 +1470,10 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) // try to move particle, and if successful update pmap and parts[i].x,y int Simulation::do_move(int i, int x, int y, float nxf, float nyf) { - int nx = (int)(nxf+0.5f), ny = (int)(nyf+0.5f); - int result = try_move(i, x, y, nx, ny); + int nx = (int)(nxf+0.5f), ny = (int)(nyf+0.5f), result; + if (parts[i].type == PT_NONE) + return 0; + result = try_move(i, x, y, nx, ny); if (result) { int t = parts[i].type; @@ -1725,6 +1699,9 @@ void Simulation::kill_part(int i)//kills particle number i { int x, y; + if (parts[i].type == PT_NONE) + return; + if(elementCount[parts[i].type] && parts[i].type) elementCount[parts[i].type]--; x = (int)(parts[i].x+0.5f); @@ -3042,13 +3019,15 @@ killed: if (stagnant)//FLAG_STAGNANT set, was reflected on previous frame { // cast coords as int then back to float for compatibility with existing saves - if (!do_move(i, x, y, (float)fin_x, (float)fin_y)) { + if (!do_move(i, x, y, (float)fin_x, (float)fin_y) && parts[i].type) { kill_part(i); continue; } } else if (!do_move(i, x, y, fin_xf, fin_yf)) { + if (parts[i].type == PT_NONE) + continue; // reflection parts[i].flags |= FLAG_STAGNANT; if (t==PT_NEUT && 100>(rand()%1000)) @@ -3108,8 +3087,11 @@ killed: // gasses and solids (but not powders) if (!do_move(i, x, y, fin_xf, fin_yf)) { + if (parts[i].type == PT_NONE) + continue; // can't move there, so bounce off // TODO + // TODO: Work out what previous TODO was for if (fin_x>x+ISTP) fin_x=x+ISTP; if (fin_xy+ISTP) fin_y=y+ISTP; @@ -3139,6 +3121,8 @@ killed: // liquids and powders if (!do_move(i, x, y, fin_xf, fin_yf)) { + if (parts[i].type == PT_NONE) + continue; if (fin_x!=x && do_move(i, x, y, fin_xf, clear_yf)) { parts[i].vx *= ptypes[t].collision; -- cgit v0.9.2-21-gd62e From c5a8615e892ff0009b10e918fe46421b298bc8e0 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 19:06:56 +0100 Subject: TPT: Fix portals being ugly and PRTO effects not being random at first 94b8ed193f diff --git a/src/elements/prti.cpp b/src/elements/prti.cpp index 384fd7e..cb2030d 100644 --- a/src/elements/prti.cpp +++ b/src/elements/prti.cpp @@ -53,8 +53,8 @@ int update_PRTI(UPDATE_FUNC_ARGS) { if (fe) { int orbd[4] = {0, 0, 0, 0}; //Orbital distances int orbl[4] = {0, 0, 0, 0}; //Orbital locations - if (!parts[i].life) parts[i].life = rand(); - if (!parts[i].ctype) parts[i].ctype = rand(); + if (!sim->parts[i].life) parts[i].life = rand()*rand()*rand(); + if (!sim->parts[i].ctype) parts[i].ctype = rand()*rand()*rand(); sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); for (r = 0; r < 4; r++) { if (orbd[r]>1) { diff --git a/src/elements/prto.cpp b/src/elements/prto.cpp index bbef6be..88a2927 100644 --- a/src/elements/prto.cpp +++ b/src/elements/prto.cpp @@ -85,8 +85,8 @@ int update_PRTO(UPDATE_FUNC_ARGS) { if (fe) { int orbd[4] = {0, 0, 0, 0}; //Orbital distances int orbl[4] = {0, 0, 0, 0}; //Orbital locations - if (!parts[i].life) parts[i].life = rand(); - if (!parts[i].ctype) parts[i].life = rand(); + if (!sim->parts[i].life) parts[i].life = rand()*rand()*rand(); + if (!sim->parts[i].ctype) parts[i].ctype = rand()*rand()*rand(); sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); for (r = 0; r < 4; r++) { if (orbd[r]<254) { @@ -95,6 +95,11 @@ int update_PRTO(UPDATE_FUNC_ARGS) { orbd[r] = 0; orbl[r] = rand()%255; } + else + { + orbl[r] += 1; + orbl[r] = orbl[r]%255; + } //orbl[r] += 1; //orbl[r] = orbl[r]%255; } else { -- cgit v0.9.2-21-gd62e From 95c702535cad90eb2e07c93b628888227ef9728a Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 19:12:24 +0100 Subject: TPT: Fix glow for deut at ligh 4d45bbedb3 diff --git a/src/elements/deut.cpp b/src/elements/deut.cpp index e5efe53..98fa69b 100644 --- a/src/elements/deut.cpp +++ b/src/elements/deut.cpp @@ -77,10 +77,11 @@ int graphics_DEUT(GRAPHICS_FUNC_ARGS) { if(cpart->life>=700) { - *colr += cpart->life*1; - *colg += cpart->life*2; - *colb += cpart->life*3; - *pixel_mode |= PMODE_GLOW; + *firea = 60; + *firer = *colr += cpart->life*1; + *fireg = *colg += cpart->life*2; + *fireb = *colb += cpart->life*3; + *pixel_mode |= PMODE_GLOW | FIRE_ADD; } else { diff --git a/src/elements/ligh.cpp b/src/elements/ligh.cpp index 5249c4f..586dfc4 100644 --- a/src/elements/ligh.cpp +++ b/src/elements/ligh.cpp @@ -287,9 +287,10 @@ int update_LIGH(UPDATE_FUNC_ARGS) } int graphics_LIGH(GRAPHICS_FUNC_ARGS) { - *colr = 235; - *colg = 245; - *colb = 255; - *pixel_mode |= PMODE_GLOW; + *firea = 120; + *firer = *colr = 235; + *fireg = *colg = 245; + *fireb = *colb = 255; + *pixel_mode |= PMODE_GLOW | FIRE_ADD; return 1; } -- cgit v0.9.2-21-gd62e From f55fc54f6e704d53d633aa855e45aa9417ff176a Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 19:13:50 +0100 Subject: TPT: Fix firework glow 001c4502e8 diff --git a/src/elements/newgraphics.cpp b/src/elements/newgraphics.cpp index 3b19ef2..db0cc72 100644 --- a/src/elements/newgraphics.cpp +++ b/src/elements/newgraphics.cpp @@ -106,17 +106,18 @@ int graphics_DUST(GRAPHICS_FUNC_ARGS) { if(cpart->life >= 1) { - *colr = cpart->flags; - *colg = cpart->tmp; - *colb = cpart->ctype; + *firea = 120; + *firer = *colr = cpart->flags; + *fireg = *colg = cpart->tmp; + *fireb = *colb = cpart->ctype; if (ren->decorations_enable && cpart->dcolour) { int a = (cpart->dcolour>>24)&0xFF; - *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; - *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; - *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; + *firer = *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; + *fireg = *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; + *fireb = *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; } - *pixel_mode |= PMODE_GLOW; + *pixel_mode |= PMODE_GLOW | FIRE_ADD; /**firea = 255; *firer = *colr; *fireg = *colg; -- cgit v0.9.2-21-gd62e From 6be1b869e5eb96332b7f3569f388f14644afb8ee Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 19:20:04 +0100 Subject: TPT: Fix ELEC being put into pmap instead of photons 5a3faa0584 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 19215fd..1d24d2b 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1320,7 +1320,7 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) if (!e) //if no movement { - if (parts[i].type!=PT_NEUT && parts[i].type!=PT_PHOT) + if (parts[i].type!=PT_NEUT && parts[i].type!=PT_PHOT && parts[i].type!=PT_ELEC) return 0; if (!legacy_enable && parts[i].type==PT_PHOT && r)//PHOT heat conduction { @@ -2162,7 +2162,7 @@ int Simulation::create_part(int p, int x, int y, int tv)//the function for creat //and finally set the pmap/photon maps to the newly created particle if (t==PT_PHOT||t==PT_NEUT||t==PT_ELEC) photons[y][x] = t|(i<<8); - if (t!=PT_STKM&&t!=PT_STKM2 && t!=PT_FIGH && t!=PT_PHOT && t!=PT_NEUT) + else if (t!=PT_STKM && t!=PT_STKM2 && t!=PT_FIGH) pmap[y][x] = t|(i<<8); //Fancy dust effects for powder types @@ -3380,7 +3380,7 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu y = (int)(parts[i].y+0.5f); if (x>=0 && y>=0 && x Date: Wed, 18 Apr 2012 19:28:18 +0100 Subject: TPT: Fixed burning temp. for fire. 00839a3b14 diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 22181b5..e533491 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -189,7 +189,11 @@ part_type * LoadElements(int & elementCount) {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}, {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}, {"OIL", PIXPACK(0x404010), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 20, 0, 0, 5, 1, 1, 20, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Flammable.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, - {"FIRE", PIXPACK(0xFF1000), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, R_TEMP+400.0f+273.15f, 88, "Ignites flammable materials. Heats air.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_FIRE}, +#ifdef REALISTIC + {"FIRE", PIXPACK(0xFF1000), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, R_TEMP+400.0f+273.15f, 1, "Ignites flammable materials. Heats air.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_FIRE}, +#else + {"FIRE", PIXPACK(0xFF1000), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, 1, 2, SC_EXPLOSIVE, R_TEMP+400.0f+273.15f, 88, "Ignites flammable materials. Heats air.", ST_GAS, TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_PYRO, &graphics_FIRE}, +#endif {"STNE", PIXPACK(0xA0A0A0), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 1, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Heavy particles. Meltable.", ST_SOLID, TYPE_PART, NULL, NULL}, {"LAVA", PIXPACK(0xE05010), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.0003f * CFDS, 2, 0, 0, 0, 2, 1, 1, 45, SC_LIQUID, R_TEMP+1500.0f+273.15f, 60, "Heavy liquid. Ignites flammable materials. Solidifies when cold.", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC, &update_PYRO, &graphics_LAVA}, {"GUN", PIXPACK(0xC0C0D0), 0.7f, 0.02f * CFDS, 0.94f, 0.80f, -0.1f, 0.1f, 0.00f, 0.000f * CFDS, 1, 600, 1, 0, 10, 1, 1, 85, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 97, "Light dust. Explosive.", ST_SOLID, TYPE_PART, NULL, NULL}, -- cgit v0.9.2-21-gd62e From 10e3f176d234782ecd097ab62dc328c6dafc5758 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 20:44:01 +0100 Subject: TPT: REALISTIC - Latent heat. It may be buggy, and enthalpy table isn't filled, but it works 4b4830b5a4 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 1d24d2b..730e5f1 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2662,14 +2662,17 @@ void Simulation::update_particles_i(int start, int inc) else pt = (c_heat+parts[i].temp*96.645/ptypes[t].hconduct*fabs(ptypes[t].weight))/(c_Cm+96.645/ptypes[t].hconduct*fabs(ptypes[t].weight)); + c_heat += parts[i].temp*96.645/ptypes[t].hconduct*fabs(ptypes[t].weight); + c_Cm += 96.645/ptypes[t].hconduct*fabs(ptypes[t].weight); + parts[i].temp = restrict_flt(pt, MIN_TEMP, MAX_TEMP); #else pt = (c_heat+parts[i].temp)/(h_count+1); -#endif pt = parts[i].temp = restrict_flt(pt, MIN_TEMP, MAX_TEMP); for (j=0; j<8; j++) { parts[surround_hconduct[j]].temp = pt; } +#endif ctemph = ctempl = pt; // change boiling point with pressure @@ -2682,29 +2685,93 @@ void Simulation::update_particles_i(int start, int inc) s = 1; if (ctemph>ptransitions[t].thv&&ptransitions[t].tht>-1) { // particle type change due to high temperature +#ifdef REALISTIC + float dbt = ctempl - pt; + if (ptransitions[t].tht!=PT_NUM) + { + if (platent[t] <= (c_heat - (ptransitions[t].thv - dbt)*c_Cm)) + { + pt = (c_heat - platent[t])/c_Cm; + t = ptransitions[t].tht; + } + else + { + parts[i].temp = restrict_flt(ptransitions[t].thv - dbt, MIN_TEMP, MAX_TEMP); + s = 0; + } + } + #else if (ptransitions[t].tht!=PT_NUM) t = ptransitions[t].tht; +#endif else if (t==PT_ICEI) { - if (parts[i].ctype>0&&parts[i].ctype274.0f) t = PT_WATR; else s = 0; } else if (t==PT_SLTW) { +#ifdef REALISTIC + if (platent[t] <= (c_heat - (ptransitions[t].thv - dbt)*c_Cm)) + { + pt = (c_heat - platent[t])/c_Cm; + + if (1>rand()%6) t = PT_SALT; + else t = PT_WTRV; + } + else + { + parts[i].temp = restrict_flt(ptransitions[t].thv - dbt, MIN_TEMP, MAX_TEMP); + s = 0; + } +#else if (1>rand()%6) t = PT_SALT; else t = PT_WTRV; +#endif } else s = 0; } else if (ctempl-1) { // particle type change due to low temperature +#ifdef REALISTIC + float dbt = ctempl - pt; if (ptransitions[t].tlt!=PT_NUM) - t = ptransitions[t].tlt; + { + if (platent[ptransitions[t].tlt] >= (c_heat - (ptransitions[t].tlv - dbt)*c_Cm)) + { + pt = (c_heat + platent[ptransitions[t].tlt])/c_Cm; + t = ptransitions[t].tlt; + } + else + { + parts[i].temp = restrict_flt(ptransitions[t].tlv - dbt, MIN_TEMP, MAX_TEMP); + s = 0; + } + } +#else + if (ptransitions[t].tlt!=PT_NUM) + t = ptransitions[t].tlt; +#endif else if (t==PT_WTRV) { if (pt<273.0f) t = PT_RIME; else t = PT_DSTW; @@ -2736,6 +2803,13 @@ void Simulation::update_particles_i(int start, int inc) else s = 0; } else s = 0; +#ifdef REALISTIC + pt = restrict_flt(pt, MIN_TEMP, MAX_TEMP); + for (j=0; j<8; j++) + { + parts[surround_hconduct[j]].temp = pt; + } +#endif if (s) { // particle type change occurred if (t==PT_ICEI||t==PT_LAVA) parts[i].ctype = parts[i].type; @@ -3502,6 +3576,11 @@ Simulation::Simulation(): memcpy(ptypes, ptypesT, elementCount * sizeof(part_type)); free(ptypesT); + int latentCount; + unsigned int * platentT = LoadLatent(latentCount); + memcpy(platent, platentT, latentCount * sizeof(unsigned int)); + free(platentT); + int transitionCount; part_transition * ptransitionsT = LoadTransitions(transitionCount); memcpy(ptransitions, ptransitionsT, sizeof(part_transition) * transitionCount); diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index 3139b77..1258373 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -140,6 +140,7 @@ public: Air * air; part_type ptypes[PT_NUM]; + unsigned int platent[PT_NUM]; part_transition ptransitions[PT_NUM]; wall_type wtypes[UI_WALLCOUNT]; gol_menu gmenu[NGOL]; diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index e533491..7022b93 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -358,6 +358,178 @@ part_type * LoadElements(int & elementCount) return ptypesT; } +unsigned int * LoadLatent(int & elementCount) +{ + unsigned int platent[PT_NUM] = + { + /* NONE */ 0, + /* DUST */ 0, + /* WATR */ 7500, + /* OIL */ 0, + /* FIRE */ 0, + /* STNE */ 0, + /* LAVA */ 0, + /* GUN */ 0, + /* NITR */ 0, + /* CLNE */ 0, + /* GAS */ 0, + /* C-4 */ 0, + /* GOO */ 0, + /* ICE */ 1095, + /* METL */ 919, + /* SPRK */ 0, + /* SNOW */ 1095, + /* WOOD */ 0, + /* NEUT */ 0, + /* PLUT */ 0, + /* PLNT */ 0, + /* ACID */ 0, + /* VOID */ 0, + /* WTRV */ 0, + /* CNCT */ 0, + /* DSTW */ 7500, + /* SALT */ 0, + /* SLTW */ 7500, + /* DMND */ 0, + /* BMTL */ 0, + /* BRMT */ 0, + /* PHOT */ 0, + /* URAN */ 0, + /* WAX */ 0, + /* MWAX */ 0, + /* PSCN */ 0, + /* NSCN */ 0, + /* LN2 */ 0, + /* INSL */ 0, + /* VACU */ 0, + /* VENT */ 0, + /* RBDM */ 0, + /* LRBD */ 0, + /* NTCT */ 0, + /* SAND */ 0, + /* GLAS */ 0, + /* PTCT */ 0, + /* BGLA */ 0, + /* THDR */ 0, + /* PLSM */ 0, + /* ETRD */ 0, + /* NICE */ 0, + /* NBLE */ 0, + /* BTRY */ 0, + /* LCRY */ 0, + /* STKM */ 0, + /* SWCH */ 0, + /* SMKE */ 0, + /* DESL */ 0, + /* COAL */ 0, + /* LO2 */ 0, + /* O2 */ 0, + /* INWR */ 0, + /* YEST */ 0, + /* DYST */ 0, + /* THRM */ 0, + /* GLOW */ 0, + /* BRCK */ 0, + /* CFLM */ 0, + /* FIRW */ 0, + /* FUSE */ 0, + /* FSEP */ 0, + /* AMTR */ 0, + /* BCOL */ 0, + /* PCLN */ 0, + /* HSWC */ 0, + /* IRON */ 0, + /* MORT */ 0, + /* LIFE */ 0, + /* DLAY */ 0, + /* CO2 */ 0, + /* DRIC */ 0, + /* CBNW */ 7500, + /* STOR */ 0, + /* STOR */ 0, + /* FREE */ 0, + /* FREE */ 0, + /* FREE */ 0, + /* FREE */ 0, + /* FREE */ 0, + /* SPNG */ 0, + /* RIME */ 0, + /* FOG */ 0, + /* BCLN */ 0, + /* LOVE */ 0, + /* DEUT */ 0, + /* WARP */ 0, + /* PUMP */ 0, + /* FWRK */ 0, + /* PIPE */ 0, + /* FRZZ */ 0, + /* FRZW */ 0, + /* GRAV */ 0, + /* BIZR */ 0, + /* BIZRG*/ 0, + /* BIZRS*/ 0, + /* INST */ 0, + /* ISOZ */ 0, + /* ISZS */ 0, + /* PRTI */ 0, + /* PRTO */ 0, + /* PSTE */ 0, + /* PSTS */ 0, + /* ANAR */ 0, + /* VINE */ 0, + /* INVS */ 0, + /* EQVE */ 0, + /* SPWN2*/ 0, + /* SPAWN*/ 0, + /* SHLD1*/ 0, + /* SHLD2*/ 0, + /* SHLD3*/ 0, + /* SHLD4*/ 0, + /* LOlZ */ 0, + /* WIFI */ 0, + /* FILT */ 0, + /* ARAY */ 0, + /* BRAY */ 0, + /* STKM2*/ 0, + /* BOMB */ 0, + /* C-5 */ 0, + /* SING */ 0, + /* QRTZ */ 0, + /* PQRT */ 0, + /* EMP */ 0, + /* BREL */ 0, + /* ELEC */ 0, + /* ACEL */ 0, + /* DCEL */ 0, + /* TNT */ 0, + /* IGNP */ 0, + /* BOYL */ 0, + /* FREE */ 0, + /* FREE */ 0, + /* FREE */ 0, + /* FREE */ 0, + /* FREE */ 0, + /* WIND */ 0, + /* H2 */ 0, + /* SOAP */ 0, + /* NBHL */ 0, + /* NWHL */ 0, + /* MERC */ 0, + /* PBCN */ 0, + /* GPMP */ 0, + /* CLST */ 0, + /* WIRE */ 0, + /* GBMB */ 0, + /* FIGH */ 0, + /* FRAY */ 0, + /* REPL */ 0, + }; + elementCount = PT_NUM; + unsigned int * platentT = (unsigned int*)malloc(PT_NUM*sizeof(unsigned int)); + memcpy(platentT, platent, PT_NUM*sizeof(unsigned int)); + return platentT; +} + part_transition * LoadTransitions(int & transitionCount) { #define IPL -257.0f diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index 1e1c455..03c491a 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -148,6 +148,8 @@ menu_section * LoadMenus(int & menuCount); part_type * LoadElements(int & elementCount); +unsigned int * LoadLatent(int & elementCount); + part_transition * LoadTransitions(int & transitionCount); #endif /* SIMULATIONDATA_H_ */ -- cgit v0.9.2-21-gd62e From 94e7123791a99c6bccce41605d05cb360621eadc Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 20:46:34 +0100 Subject: TPT: Allow DEST to be cloned with CLNE, PCLN, BCLN and PBCN 57d8335ca5 diff --git a/src/elements/dest.cpp b/src/elements/dest.cpp index fa5faf8..5c18d55 100644 --- a/src/elements/dest.cpp +++ b/src/elements/dest.cpp @@ -6,7 +6,7 @@ int update_DEST(UPDATE_FUNC_ARGS) { ry=rand()%5-2; r = pmap[y+ry][x+rx]; - if (!r || (r&0xFF)==PT_DEST || (r&0xFF)==PT_DMND) + if (!r || (r&0xFF)==PT_DEST || (r&0xFF)==PT_DMND || (r&0xFF)==PT_BCLN || (r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN || (r&0xFF)==PT_PBCN) return 0; if (parts[i].life<=0 || parts[i].life>37) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 730e5f1..8360479 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1189,6 +1189,10 @@ void Simulation::init_can_move() } } can_move[PT_DEST][PT_DMND] = 0; + can_move[PT_DEST][PT_CLNE] = 0; + can_move[PT_DEST][PT_PCLN] = 0; + can_move[PT_DEST][PT_BCLN] = 0; + can_move[PT_DEST][PT_PBCN] = 0; can_move[PT_BIZR][PT_FILT] = 2; can_move[PT_BIZRG][PT_FILT] = 2; for (t=0;t Date: Wed, 18 Apr 2012 21:00:43 +0100 Subject: TPT: Glowing BRAY 2976936cfd diff --git a/src/Renderer.cpp b/src/Renderer.cpp index c1fafaa..5b7b550 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -752,7 +752,7 @@ void Renderer::render_parts() if((pixel_mode & PMODE_BLUR) && !(render_mode & PMODE_BLUR)) pixel_mode |= PMODE_FLAT; if((pixel_mode & PMODE_GLOW) && !(render_mode & PMODE_GLOW)) - pixel_mode |= PMODE_FLAT; + pixel_mode |= PMODE_BLEND; if (render_mode & PMODE_BLOB) pixel_mode |= PMODE_BLOB; @@ -1020,6 +1020,7 @@ void Renderer::render_parts() } if(pixel_mode & PMODE_GLOW) { + int cola1 = (5*cola)/255; #ifdef OGLR glowV[cglowV++] = nx; glowV[cglowV++] = ny; @@ -1029,24 +1030,24 @@ void Renderer::render_parts() glowC[cglowC++] = 1.0f; cglow++; #else - g->addpixel(nx, ny, colr, colg, colb, 192); - g->addpixel(nx+1, ny, colr, colg, colb, 96); - g->addpixel(nx-1, ny, colr, colg, colb, 96); - g->addpixel(nx, ny+1, colr, colg, colb, 96); - g->addpixel(nx, ny-1, colr, colg, colb, 96); + g->addpixel(nx, ny, colr, colg, colb, (192*cola)/255); + g->addpixel(nx+1, ny, colr, colg, colb, (96*cola)/255); + g->addpixel(nx-1, ny, colr, colg, colb, (96*cola)/255); + g->addpixel(nx, ny+1, colr, colg, colb, (96*cola)/255); + g->addpixel(nx, ny-1, colr, colg, colb, (96*cola)/255); for (x = 1; x < 6; x++) { - g->addpixel(nx, ny-x, colr, colg, colb, 5); - g->addpixel(nx, ny+x, colr, colg, colb, 5); - g->addpixel(nx-x, ny, colr, colg, colb, 5); - g->addpixel(nx+x, ny, colr, colg, colb, 5); + g->addpixel(nx, ny-x, colr, colg, colb, cola1); + g->addpixel(nx, ny+x, colr, colg, colb, cola1); + g->addpixel(nx-x, ny, colr, colg, colb, cola1); + g->addpixel(nx+x, ny, colr, colg, colb, cola1); for (y = 1; y < 6; y++) { if(x + y > 7) continue; - g->addpixel(nx+x, ny-y, colr, colg, colb, 5); - g->addpixel(nx-x, ny+y, colr, colg, colb, 5); - g->addpixel(nx+x, ny+y, colr, colg, colb, 5); - g->addpixel(nx-x, ny-y, colr, colg, colb, 5); + g->addpixel(nx+x, ny-y, colr, colg, colb, cola1); + g->addpixel(nx-x, ny+y, colr, colg, colb, cola1); + g->addpixel(nx+x, ny+y, colr, colg, colb, cola1); + g->addpixel(nx-x, ny-y, colr, colg, colb, cola1); } } #endif diff --git a/src/elements/newgraphics.cpp b/src/elements/newgraphics.cpp index db0cc72..f0fbdae 100644 --- a/src/elements/newgraphics.cpp +++ b/src/elements/newgraphics.cpp @@ -320,7 +320,7 @@ int graphics_BRAY(GRAPHICS_FUNC_ARGS) } *cola = trans; *pixel_mode &= ~PMODE; - *pixel_mode |= PMODE_BLEND; + *pixel_mode |= PMODE_BLEND | PMODE_GLOW; return 0; } int graphics_SWCH(GRAPHICS_FUNC_ARGS) -- cgit v0.9.2-21-gd62e From d85049fb9338e46a8a8be326bf08c2b78dba55a1 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:01:54 +0100 Subject: TPT: A fix for ice with ctype = 0. e52f730969 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 8360479..0f0cd9c 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2687,6 +2687,11 @@ void Simulation::update_particles_i(int start, int inc) || t==PT_WTRV) ctempl -= 2.0f*pv[y/CELL][x/CELL]; s = 1; + + //A fix for ice with ctype = 0 + if (t==PT_ICEI && parts[i].ctype==0) + parts[i].ctype = PT_WATR; + if (ctemph>ptransitions[t].thv&&ptransitions[t].tht>-1) { // particle type change due to high temperature #ifdef REALISTIC -- cgit v0.9.2-21-gd62e From 2ce377ef43cc142f963bdefe6e669f0372e29799 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:03:56 +0100 Subject: TPT: Stop walls next to pipe triggering automatic pattern generation 76f49dd024 diff --git a/src/elements/pipe.cpp b/src/elements/pipe.cpp index 40ef411..78f384b 100644 --- a/src/elements/pipe.cpp +++ b/src/elements/pipe.cpp @@ -215,7 +215,7 @@ int update_PIPE(UPDATE_FUNC_ARGS) { for (ry=-1; ry<2; ry++) if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_ALLOWAIR && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_WALL && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_WALLELEC && (sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_EWALL || sim->emap[(y+ry)/CELL][(x+rx)/CELL])) parts[i].life=50; } } -- cgit v0.9.2-21-gd62e From bfb37563ca8cdc37709abd1fa0b32f465e2d7ae8 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:04:37 +0100 Subject: TPT: Use graphics function for BCOL a1bd20db91 diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 7022b93..48dfb7c 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -262,7 +262,7 @@ part_type * LoadElements(int & elementCount) {"FUSE", PIXPACK(0x0A5706), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly. Ignites at somewhat high temperatures and electricity.", ST_SOLID, TYPE_SOLID, &update_FUSE, NULL}, {"FSEP", PIXPACK(0x63AD5F), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 30, 1, 1, 70, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Fuse Powder. See FUSE.", ST_SOLID, TYPE_PART, &update_FSEP, NULL}, {"AMTR", PIXPACK(0x808080), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.00f, 0.10f, 1.00f, 0.0000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 70, "Anti-Matter, Destroys a majority of particles", ST_NONE, TYPE_PART, &update_AMTR, NULL}, //Maybe TYPE_ENERGY? - {"BCOL", PIXPACK(0x333333), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Coal. Heavy particles. See COAL", ST_SOLID, TYPE_PART, &update_BCOL, NULL}, + {"BCOL", PIXPACK(0x333333), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Coal. Heavy particles. See COAL", ST_SOLID, TYPE_PART, &update_BCOL, &graphics_COAL}, {"PCLN", PIXPACK(0x3B3B0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, duplicates any particles it touches.", ST_NONE, TYPE_SOLID, &update_PCLN, &graphics_PCLN}, {"HSWC", PIXPACK(0x3B0A0A), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Heat switch. Conducts Heat only when activated", ST_NONE, TYPE_SOLID, &update_HSWC, &graphics_HSWC}, {"IRON", PIXPACK(0x707070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 50, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Rusts with salt, can be used for electrolysis of WATR", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, &update_IRON, NULL}, -- cgit v0.9.2-21-gd62e From ea37facf83bae0b25b3826e04f7da2f7ee8e889d Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:05:14 +0100 Subject: TPT: No unmeltable ice anymore. e4448dc1d6 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 0f0cd9c..017925a 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2689,7 +2689,7 @@ void Simulation::update_particles_i(int start, int inc) s = 1; //A fix for ice with ctype = 0 - if (t==PT_ICEI && parts[i].ctype==0) + if (t==PT_ICEI && (parts[i].ctype==0 || parts[i].ctype>=PT_NUM || parts[i].ctype==PT_ICEI)) parts[i].ctype = PT_WATR; if (ctemph>ptransitions[t].thv&&ptransitions[t].tht>-1) { -- cgit v0.9.2-21-gd62e From ff7428fc70385287204832048bcf2f3c72aaabe8 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:07:26 +0100 Subject: TPT: Fix crash when flood fill deleting life 7a844f51ff diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 017925a..fdc94ab 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1703,13 +1703,22 @@ void Simulation::kill_part(int i)//kills particle number i { int x, y; + // Remove from pmap even if type==0, otherwise infinite recursion occurs when flood fill deleting + // a particle which sets type to 0 without calling kill_part (such as LIFE) + x = (int)(parts[i].x+0.5f); + y = (int)(parts[i].y+0.5f); + if (x>=0 && y>=0 && x>8)==i) + pmap[y][x] = 0; + else if ((photons[y][x]>>8)==i) + photons[y][x] = 0; + } + if (parts[i].type == PT_NONE) return; if(elementCount[parts[i].type] && parts[i].type) elementCount[parts[i].type]--; - x = (int)(parts[i].x+0.5f); - y = (int)(parts[i].y+0.5f); if (parts[i].type == PT_STKM) { player.spwn = 0; @@ -1727,12 +1736,6 @@ void Simulation::kill_part(int i)//kills particle number i { detach(i); } - if (x>=0 && y>=0 && x>8)==i) - pmap[y][x] = 0; - else if ((photons[y][x]>>8)==i) - photons[y][x] = 0; - } parts[i].type = PT_NONE; parts[i].life = pfree; -- cgit v0.9.2-21-gd62e From b40f13b66a8661d8698e5fc737c2842dfb73e6f9 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:18:37 +0100 Subject: TPT: Added gel - a liquid with variable heat conductivity and viscosity. 8523da398f diff --git a/src/elements/gel.cpp b/src/elements/gel.cpp new file mode 100644 index 0000000..9092097 --- /dev/null +++ b/src/elements/gel.cpp @@ -0,0 +1,62 @@ +#include "simulation\Element.h" + +int update_GEL(UPDATE_FUNC_ARGS) { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxkill_part(r>>8); + } + + char gel = 0; + if ((r&0xFF)==PT_GEL) + gel = 1; + + //Concentration diffusion + if (gel && (parts[r>>8].tmp+1)>8].tmp++; + parts[i].tmp--; + } + + float dx, dy; + dx = parts[i].x - parts[r>>8].x; + dy = parts[i].y - parts[r>>8].y; + + //Stickness + if ((dx*dx + dy*dy)>1.5 && (gel || !sim->ptypes[r&0xFF].falldown || (fabs(rx)<2 && fabs(ry)<2))) + { + float per, nd; + nd = dx*dx + dy*dy - 0.5; + + per = 5*(1 - parts[i].tmp/100)*(nd/(dx*dx + dy*dy + nd) - 0.5); + if (sim->ptypes[r&0xFF].state==ST_LIQUID) + per *= 0.1; + + dx *= per; dy *= per; + parts[i].vx += dx; parts[r>>8].vx -= dx; + parts[i].vy += dy; parts[r>>8].vy -= dy; + } + } + return 0; +} + +int graphics_GEL(GRAPHICS_FUNC_ARGS) +{ + int q = cpart->tmp; + *colr = q*(32-255)/120+255; + *colg = q*(48-186)/120+186; + *colb = q*208/120; + return 0; +} + diff --git a/src/simulation/ElementFunctions.h b/src/simulation/ElementFunctions.h index ad597b7..7f86424 100644 --- a/src/simulation/ElementFunctions.h +++ b/src/simulation/ElementFunctions.h @@ -108,6 +108,7 @@ int update_MISC(UPDATE_FUNC_ARGS); int update_FRAY(UPDATE_FUNC_ARGS); int update_REPL(UPDATE_FUNC_ARGS); int update_NBLE(UPDATE_FUNC_ARGS); +int update_GEL(UPDATE_FUNC_ARGS); int update_legacy_PYRO(UPDATE_FUNC_ARGS); int update_legacy_all(UPDATE_FUNC_ARGS); int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS); @@ -166,6 +167,7 @@ int graphics_ELEC(GRAPHICS_FUNC_ARGS); int graphics_WIRE(GRAPHICS_FUNC_ARGS); int graphics_ACEL(GRAPHICS_FUNC_ARGS); int graphics_DCEL(GRAPHICS_FUNC_ARGS); +int graphics_GEL(GRAPHICS_FUNC_ARGS); int graphics_DEFAULT(GRAPHICS_FUNC_ARGS); #endif /* ELEMENTFUNCTIONS_H_ */ diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h index 7d59dcb..6a62c11 100644 --- a/src/simulation/Elements.h +++ b/src/simulation/Elements.h @@ -262,6 +262,7 @@ #define PT_BANG 139 #define PT_IGNT 140 #define PT_BOYL 141 +#define PT_GEL 142 #define OLD_PT_WIND 147 #define PT_H2 148 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index fdc94ab..b08398f 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1175,7 +1175,7 @@ void Simulation::init_can_move() for (rt=1;rt= 0 && y-2 < YRES && (ptypes[t].properties&TYPE_LIQUID)) {//some heat convection for liquids + if (y-2 >= 0 && y-2 < YRES && (ptypes[t].properties&TYPE_LIQUID) && gel_scale>(rand()%250)) {//some heat convection for liquids r = pmap[y-2][x]; if (!(!r || parts[i].type != (r&0xFF))) { if (parts[i].temp>parts[r>>8].temp) { @@ -2614,19 +2618,19 @@ void Simulation::update_particles_i(int start, int inc) //heat transfer code h_count = 0; #ifdef REALISTIC - if (t&&(t!=PT_HSWC||parts[i].life==10)&&ptypes[t].hconduct) + if (t&&(t!=PT_HSWC||parts[i].life==10)&&(ptypes[t].hconduct*gel_scale)) { float c_Cm = 0.0f; #else - if (t&&(t!=PT_HSWC||parts[i].life==10)&&ptypes[t].hconduct>(rand()%250)) + if (t&&(t!=PT_HSWC||parts[i].life==10)&&(ptypes[t].hconduct*gel_scale)>(rand()%250)) { float c_Cm = 0.0f; #endif if (aheat_enable) { #ifdef REALISTIC - c_heat = parts[i].temp*96.645/ptypes[t].hconduct*fabs(ptypes[t].weight) + hv[y/CELL][x/CELL]*100*(pv[y/CELL][x/CELL]+273.15f)/256; - c_Cm = 96.645/ptypes[t].hconduct*fabs(ptypes[t].weight) + 100*(pv[y/CELL][x/CELL]+273.15f)/256; + c_heat = parts[i].temp*96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight) + hv[y/CELL][x/CELL]*100*(pv[y/CELL][x/CELL]+273.15f)/256; + c_Cm = 96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight) + 100*(pv[y/CELL][x/CELL]+273.15f)/256; pt = c_heat/c_Cm; pt = restrict_flt(pt, -MAX_TEMP+MIN_TEMP, MAX_TEMP-MIN_TEMP); parts[i].temp = pt; @@ -2655,8 +2659,12 @@ void Simulation::update_particles_i(int start, int inc) { surround_hconduct[j] = r>>8; #ifdef REALISTIC - c_heat += parts[r>>8].temp*96.645/ptypes[rt].hconduct*fabs(ptypes[rt].weight); - c_Cm += 96.645/ptypes[rt].hconduct*fabs(ptypes[rt].weight); + if (rt==PT_GEL) + gel_scale = parts[r>>8].tmp*2.55f; + else gel_scale = 1.0f; + + c_heat += parts[r>>8].temp*96.645/ptypes[rt].hconduct*gel_scale*fabs(ptypes[rt].weight); + c_Cm += 96.645/ptypes[rt].hconduct*gel_scale*fabs(ptypes[rt].weight); #else c_heat += parts[r>>8].temp; #endif @@ -2664,13 +2672,17 @@ void Simulation::update_particles_i(int start, int inc) } } #ifdef REALISTIC + if (t==PT_GEL) + gel_scale = parts[i].tmp*2.55f; + else gel_scale = 1.0f; + if (t == PT_PHOT) pt = (c_heat+parts[i].temp*96.645)/(c_Cm+96.645); else - pt = (c_heat+parts[i].temp*96.645/ptypes[t].hconduct*fabs(ptypes[t].weight))/(c_Cm+96.645/ptypes[t].hconduct*fabs(ptypes[t].weight)); + pt = (c_heat+parts[i].temp*96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight))/(c_Cm+96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight)); - c_heat += parts[i].temp*96.645/ptypes[t].hconduct*fabs(ptypes[t].weight); - c_Cm += 96.645/ptypes[t].hconduct*fabs(ptypes[t].weight); + c_heat += parts[i].temp*96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight); + c_Cm += 96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight); parts[i].temp = restrict_flt(pt, MIN_TEMP, MAX_TEMP); #else pt = (c_heat+parts[i].temp)/(h_count+1); diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 48dfb7c..46f3ee6 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -331,7 +331,7 @@ part_type * LoadElements(int & elementCount) {"TNT", PIXPACK(0xC05050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_BANG, NULL}, {"IGNC", PIXPACK(0xC0B050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Ignition cord.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL, &update_IGNT, NULL}, {"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL}, - /*FREE*/{"LOTE", PIXPACK(0xFF0000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Behaves kinda like Living on the Edge S3458/B37/4", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + {"GEL", PIXPACK(0xFF9900), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Gel. A liquid with variable viscosity and heat conductivity", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_GEL, &graphics_GEL}, /*FREE*/{"FRG2", PIXPACK(0x00FF00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Frogs rule S124/B3/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, /*FREE*/{"STAR", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Star Wars rule S3456/B278/6", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, /*FREE*/{"FROG", PIXPACK(0x00AA00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Frogs S12/B34/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, @@ -504,7 +504,7 @@ unsigned int * LoadLatent(int & elementCount) /* TNT */ 0, /* IGNP */ 0, /* BOYL */ 0, - /* FREE */ 0, + /* GEL */ 0, /* FREE */ 0, /* FREE */ 0, /* FREE */ 0, @@ -685,7 +685,7 @@ part_transition * LoadTransitions(int & transitionCount) /* TNT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /* IGNP */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, /* BOYL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* GEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, -- cgit v0.9.2-21-gd62e From 1fdaabca6d7d6ba4fd968b47693282b32e705264 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:20:31 +0100 Subject: TPT: Viscosity change for gel. Water diffusion among sponge and gel (but with flying cake effect) c9bcc11d35 diff --git a/src/elements/gel.cpp b/src/elements/gel.cpp index 9092097..2031af1 100644 --- a/src/elements/gel.cpp +++ b/src/elements/gel.cpp @@ -29,6 +29,12 @@ int update_GEL(UPDATE_FUNC_ARGS) { parts[i].tmp--; } + if ((r&0xFF)==PT_SPNG && (parts[r>>8].life+1)>8].life++; + parts[i].tmp--; + } + float dx, dy; dx = parts[i].x - parts[r>>8].x; dy = parts[i].y - parts[r>>8].y; diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index b08398f..853a7f0 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3272,6 +3272,10 @@ killed: rt = 30;//slight less water lag, although it changes how it moves a lot else rt = 10; + + if (t==PT_GEL) + rt = parts[i].tmp*0.20f+5.0f; + for (j=clear_x+r; j>=0 && j>=clear_x-rt && j Date: Wed, 18 Apr 2012 21:21:32 +0100 Subject: TPT: A small fix for convection. ff8ce0ef3a diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 853a7f0..5101dfb 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2604,7 +2604,7 @@ void Simulation::update_particles_i(int start, int inc) if (!legacy_enable) { - if (y-2 >= 0 && y-2 < YRES && (ptypes[t].properties&TYPE_LIQUID) && gel_scale>(rand()%250)) {//some heat convection for liquids + if (y-2 >= 0 && y-2 < YRES && (ptypes[t].properties&TYPE_LIQUID) && (t!=PT_GEL || gel_scale>(1+rand()%255))) {//some heat convection for liquids r = pmap[y-2][x]; if (!(!r || parts[i].type != (r&0xFF))) { if (parts[i].temp>parts[r>>8].temp) { -- cgit v0.9.2-21-gd62e From e4d1c7141fdc362629c239ff31f97df37a3b92f9 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:27:28 +0100 Subject: TPT: TRON element, needs to glow and fancy explosion on crash eccf5658d2 diff --git a/src/elements/tron.cpp b/src/elements/tron.cpp new file mode 100644 index 0000000..6830dab --- /dev/null +++ b/src/elements/tron.cpp @@ -0,0 +1,152 @@ +#include "simulation\Element.h" + +/* TRON element is meant to resemble a tron bike (or worm) moving around and trying to avoid obstacles itself. + * It has four direction each turn to choose from, 0 (left) 1 (up) 2 (right) 3 (down). + * Each turn has a small random chance to randomly turn one way (so it doesn't do the exact same thing in a large room) + * If the place it wants to move isn't a barrier, it will try and 'see' infront of itself to determine its safety. + * For now the tron can only see its own body length in pixels ahead of itself (and around corners) + * - - - - - - - - - - + * - - - - + - - - - - + * - - - + + + - - - - + * - - +<--+-->+ - - - + * - +<----+---->+ - - + * - - - - H - - - - - + * Where H is the head with tail length 4, it checks the + area to see if it can hit any of the edges, then it is called safe, or picks the biggest area if none safe. + * .tmp bit values: 0 tail , 1 head , 2 no tail growth , 4-8 is direction , 16 is wait flag + * .tmp2 is tail length (gets longer every few hundred frames) + * .life is the timer that kills the end of the tail (the head uses life for how often it grows longer) + */ +#define TRON_HEAD 1 +#define TRON_NOGROW 2 +#define TRON_WAIT 16 //it was just created, so WAIT a frame +#define TRON_NODIE 32 +int tron_rx[4] = {-1, 0, 1, 0}; +int tron_ry[4] = { 0,-1, 0, 1}; +int new_tronhead(Simulation * sim, int x, int y, int i, int direction) +{ + int np = sim->create_part(-1, x , y ,PT_TRON); + if (np==-1) + return -1; + if (sim->parts[i].life >= 100) // increase tail length + { + sim->parts[i].tmp2++; + sim->parts[i].life = 5; + } + //give new head our properties + sim->parts[np].tmp = 1 | direction<<2 | sim->parts[i].tmp&(TRON_NOGROW|TRON_NODIE); + if (np > i) + sim->parts[np].tmp |= TRON_WAIT; + + sim->parts[np].tmp2 = sim->parts[i].tmp2; + sim->parts[np].life = sim->parts[i].life + 2; + sim->parts[np].dcolour = sim->parts[i].dcolour; + return 1; +} +int trymovetron(Simulation * sim, int x, int y, int dir, int i, int len) +{ + int k,j,r,rx,ry,tx,ty,count; + count = 0; + rx = x; + ry = y; + for (k = 1; k <= len; k ++) + { + rx += tron_rx[dir]; + ry += tron_ry[dir]; + r = sim->pmap[ry][rx]; + if (!r && !sim->bmap[(ry)/CELL][(rx)/CELL] && ry > CELL && rx > CELL && ry < YRES-CELL && rx < XRES-CELL) + { + count++; + for (tx = rx - tron_ry[dir] , ty = ry - tron_rx[dir], j=1; abs(tx-rx) < (len-k) && abs(ty-ry) < (len-k); tx-=tron_ry[dir],ty-=tron_rx[dir],j++) + { + r = sim->pmap[ty][tx]; + if (!r && !sim->bmap[(ty)/CELL][(tx)/CELL] && ry > CELL && rx > CELL && ry < YRES-CELL && rx < XRES-CELL) + { + if (j == (len-k))//there is a safe path, so we can break out + return len+1; + count++; + } + else //we hit a block so no need to check farther here + break; + } + for (tx = rx + tron_ry[dir] , ty = ry + tron_rx[dir], j=1; abs(tx-rx) < (len-k) && abs(ty-ry) < (len-k); tx+=tron_ry[dir],ty+=tron_rx[dir],j++) + { + r = sim->pmap[ty][tx]; + if (!r && !sim->bmap[(ty)/CELL][(tx)/CELL] && ry > CELL && rx > CELL && ry < YRES-CELL && rx < XRES-CELL) + { + if (j == (len-k)) + return len+1; + count++; + } + else + break; + } + } + else //a block infront, no need to continue + break; + } + return count; +} +int update_TRON(UPDATE_FUNC_ARGS) { + int r, rx, ry, np; + if (parts[i].tmp&TRON_WAIT) + { + parts[i].tmp -= TRON_WAIT; + return 0; + } + if (parts[i].tmp&TRON_HEAD) + { + int firstdircheck = 0,seconddir,seconddircheck = 0,lastdir,lastdircheck = 0; + int direction = (parts[i].tmp>>2 & 0x3); + int originaldir = direction; + + //random turn + int random = rand()%340; + if (random==1 || random==3) + { + //randomly turn left(3) or right(1) + direction = (direction + random)%4; + } + + //check infront + //do sight check + firstdircheck = trymovetron(sim,x,y,direction,i,parts[i].tmp2); + if (firstdircheck < parts[i].tmp2) + { + if (originaldir != direction) //if we just tried a random turn, don't pick random again + { + seconddir = originaldir; + lastdir = (direction + 2)%4; + } + else + { + seconddir = (direction + ((rand()%2)*2)+1)% 4; + lastdir = (seconddir + 2)%4; + } + seconddircheck = trymovetron(sim,x,y,seconddir,i,parts[i].tmp2); + lastdircheck = trymovetron(sim,x,y,lastdir,i,parts[i].tmp2); + } + //find the best move + if (seconddircheck > firstdircheck) + direction = seconddir; + if (lastdircheck > seconddircheck && lastdircheck > firstdircheck) + direction = lastdir; + //now try making new head, even if it fails + if (new_tronhead(sim,x + tron_rx[direction],y + tron_ry[direction],i,direction) == -1) + { + //ohgod crash, + //trigger tail death for TRON_NODIE, or is that mode even needed? just set a high tail length(but it still won't start dying when it crashes) + } + + //set own life and clear .tmp (it dies if it can't move anyway) + parts[i].life = parts[i].tmp2; + parts[i].tmp = 0; + } + else // fade tail deco, or prevent tail from dieing + { + if (parts[i].tmp&TRON_NODIE) + parts[i].life++; + parts[i].dcolour = clamp_flt((float)parts[i].life/(float)parts[i].tmp2,0,1.0f) << 24 | parts[i].dcolour&0x00FFFFFF; + } + + return 0; +} diff --git a/src/simulation/ElementFunctions.h b/src/simulation/ElementFunctions.h index 7f86424..b1d6409 100644 --- a/src/simulation/ElementFunctions.h +++ b/src/simulation/ElementFunctions.h @@ -109,6 +109,7 @@ int update_FRAY(UPDATE_FUNC_ARGS); int update_REPL(UPDATE_FUNC_ARGS); int update_NBLE(UPDATE_FUNC_ARGS); int update_GEL(UPDATE_FUNC_ARGS); +int update_TRON(UPDATE_FUNC_ARGS); int update_legacy_PYRO(UPDATE_FUNC_ARGS); int update_legacy_all(UPDATE_FUNC_ARGS); int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS); @@ -168,6 +169,7 @@ int graphics_WIRE(GRAPHICS_FUNC_ARGS); int graphics_ACEL(GRAPHICS_FUNC_ARGS); int graphics_DCEL(GRAPHICS_FUNC_ARGS); int graphics_GEL(GRAPHICS_FUNC_ARGS); +int graphics_TRON(GRAPHICS_FUNC_ARGS); int graphics_DEFAULT(GRAPHICS_FUNC_ARGS); #endif /* ELEMENTFUNCTIONS_H_ */ diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h index 6a62c11..fc90929 100644 --- a/src/simulation/Elements.h +++ b/src/simulation/Elements.h @@ -263,6 +263,7 @@ #define PT_IGNT 140 #define PT_BOYL 141 #define PT_GEL 142 +#define PT_TRON 143 #define OLD_PT_WIND 147 #define PT_H2 148 diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 5101dfb..e8c9d75 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2027,7 +2027,17 @@ int Simulation::create_part(int p, int x, int y, int tv)//the function for creat parts[i].tmp = grule[v+1][9] - 1; parts[i].ctype = v; } - + if (t==PT_TRON) + { + int rr,rg,rb; + int randhue = rand()%360; + int randomdir = rand()%4; + HSV_to_RGB(randhue,255,255,&rr,&rg,&rb); + parts[i].dcolour = 255<<24 | rr<<16 | rg<<8 | rb; + parts[i].tmp = 1|(randomdir<<2);//set as a head and a direction + parts[i].tmp2 = 4;//tail + parts[i].life = 5; + } if (t==PT_DEUT) parts[i].life = 10; if (t==PT_MERC) diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 46f3ee6..03e0344 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -332,7 +332,7 @@ part_type * LoadElements(int & elementCount) {"IGNC", PIXPACK(0xC0B050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Ignition cord.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL, &update_IGNT, NULL}, {"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL}, {"GEL", PIXPACK(0xFF9900), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Gel. A liquid with variable viscosity and heat conductivity", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_GEL, &graphics_GEL}, - /*FREE*/{"FRG2", PIXPACK(0x00FF00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Frogs rule S124/B3/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + {"TRON", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, 0.0f, 40, "An automaton tron snake thing", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_TRON, NULL}, /*FREE*/{"STAR", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Star Wars rule S3456/B278/6", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, /*FREE*/{"FROG", PIXPACK(0x00AA00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Frogs S12/B34/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, /*FREE*/{"BRAN", PIXPACK(0xCCCC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Brian 6 S6/B246/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, @@ -686,7 +686,7 @@ part_transition * LoadTransitions(int & transitionCount) /* IGNP */ {IPL, NT, IPH, NT, ITL, NT, 673.0f, PT_FIRE}, /* BOYL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /* GEL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* TRON */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, -- cgit v0.9.2-21-gd62e From 44d70ec6b8497454873f5cb9b088a530e0d17003 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:31:22 +0100 Subject: TPT: Alterations to TRON and fancy effects ffa5ccb666 diff --git a/src/elements/tron.cpp b/src/elements/tron.cpp index 6830dab..804b4b7 100644 --- a/src/elements/tron.cpp +++ b/src/elements/tron.cpp @@ -1,4 +1,4 @@ -#include "simulation\Element.h" +#include /* TRON element is meant to resemble a tron bike (or worm) moving around and trying to avoid obstacles itself. * It has four direction each turn to choose from, 0 (left) 1 (up) 2 (right) 3 (down). @@ -12,14 +12,16 @@ * - +<----+---->+ - - * - - - - H - - - - - * Where H is the head with tail length 4, it checks the + area to see if it can hit any of the edges, then it is called safe, or picks the biggest area if none safe. - * .tmp bit values: 0 tail , 1 head , 2 no tail growth , 4-8 is direction , 16 is wait flag + * .tmp bit values: 1st head, 2nd no tail growth, 3rd wait flag, 4th Nodie, 5th Dying, 6th & 7th is direction, 8th - 16th hue * .tmp2 is tail length (gets longer every few hundred frames) * .life is the timer that kills the end of the tail (the head uses life for how often it grows longer) + * .ctype Contains the colour, lost on save, regenerated using hue tmp (bits 7 - 16) */ #define TRON_HEAD 1 #define TRON_NOGROW 2 -#define TRON_WAIT 16 //it was just created, so WAIT a frame -#define TRON_NODIE 32 +#define TRON_WAIT 4 //it was just created, so WAIT a frame +#define TRON_NODIE 8 +#define TRON_DEATH 16 //Crashed, now dying int tron_rx[4] = {-1, 0, 1, 0}; int tron_ry[4] = { 0,-1, 0, 1}; int new_tronhead(Simulation * sim, int x, int y, int i, int direction) @@ -33,13 +35,13 @@ int new_tronhead(Simulation * sim, int x, int y, int i, int direction) sim->parts[i].life = 5; } //give new head our properties - sim->parts[np].tmp = 1 | direction<<2 | sim->parts[i].tmp&(TRON_NOGROW|TRON_NODIE); + sim->parts[np].tmp = 1 | direction<<5 | sim->parts[i].tmp&(TRON_NOGROW|TRON_NODIE) | (sim->parts[i].tmp&0xF800); if (np > i) sim->parts[np].tmp |= TRON_WAIT; + sim->parts[np].ctype = sim->parts[i].ctype; sim->parts[np].tmp2 = sim->parts[i].tmp2; sim->parts[np].life = sim->parts[i].life + 2; - sim->parts[np].dcolour = sim->parts[i].dcolour; return 1; } int trymovetron(Simulation * sim, int x, int y, int dir, int i, int len) @@ -59,7 +61,7 @@ int trymovetron(Simulation * sim, int x, int y, int dir, int i, int len) for (tx = rx - tron_ry[dir] , ty = ry - tron_rx[dir], j=1; abs(tx-rx) < (len-k) && abs(ty-ry) < (len-k); tx-=tron_ry[dir],ty-=tron_rx[dir],j++) { r = sim->pmap[ty][tx]; - if (!r && !sim->bmap[(ty)/CELL][(tx)/CELL] && ry > CELL && rx > CELL && ry < YRES-CELL && rx < XRES-CELL) + if (!r && !sim->bmap[(ty)/CELL][(tx)/CELL] && ty > CELL && tx > CELL && ty < YRES-CELL && tx < XRES-CELL) { if (j == (len-k))//there is a safe path, so we can break out return len+1; @@ -71,7 +73,7 @@ int trymovetron(Simulation * sim, int x, int y, int dir, int i, int len) for (tx = rx + tron_ry[dir] , ty = ry + tron_rx[dir], j=1; abs(tx-rx) < (len-k) && abs(ty-ry) < (len-k); tx+=tron_ry[dir],ty+=tron_rx[dir],j++) { r = sim->pmap[ty][tx]; - if (!r && !sim->bmap[(ty)/CELL][(tx)/CELL] && ry > CELL && rx > CELL && ry < YRES-CELL && rx < XRES-CELL) + if (!r && !sim->bmap[(ty)/CELL][(tx)/CELL] && ty > CELL && tx > CELL && ty < YRES-CELL && tx < XRES-CELL) { if (j == (len-k)) return len+1; @@ -88,15 +90,23 @@ int trymovetron(Simulation * sim, int x, int y, int dir, int i, int len) } int update_TRON(UPDATE_FUNC_ARGS) { int r, rx, ry, np; + if(!parts[i].ctype) + { + int r, g, b; + int hue = (parts[i].tmp&0xF800)>>7; + HSV_to_RGB(hue,255,255,&r,&g,&b); + parts[i].ctype = r<<16 | g<<8 | b; + //Use photon-like wavelength? + } if (parts[i].tmp&TRON_WAIT) { - parts[i].tmp -= TRON_WAIT; + parts[i].tmp &= ~TRON_WAIT; return 0; } if (parts[i].tmp&TRON_HEAD) { int firstdircheck = 0,seconddir,seconddircheck = 0,lastdir,lastdircheck = 0; - int direction = (parts[i].tmp>>2 & 0x3); + int direction = (parts[i].tmp>>5 & 0x3); int originaldir = direction; //random turn @@ -133,20 +143,52 @@ int update_TRON(UPDATE_FUNC_ARGS) { //now try making new head, even if it fails if (new_tronhead(sim,x + tron_rx[direction],y + tron_ry[direction],i,direction) == -1) { - //ohgod crash, + //ohgod crash + parts[i].tmp |= TRON_DEATH; //trigger tail death for TRON_NODIE, or is that mode even needed? just set a high tail length(but it still won't start dying when it crashes) } //set own life and clear .tmp (it dies if it can't move anyway) parts[i].life = parts[i].tmp2; - parts[i].tmp = 0; + parts[i].tmp &= parts[i].tmp&0xF810; } else // fade tail deco, or prevent tail from dieing { if (parts[i].tmp&TRON_NODIE) parts[i].life++; - parts[i].dcolour = clamp_flt((float)parts[i].life/(float)parts[i].tmp2,0,1.0f) << 24 | parts[i].dcolour&0x00FFFFFF; + //parts[i].dcolour = clamp_flt((float)parts[i].life/(float)parts[i].tmp2,0,1.0f) << 24 | parts[i].dcolour&0x00FFFFFF; } + return 0; +} +int graphics_TRON(GRAPHICS_FUNC_ARGS) { + if(cpart->tmp & TRON_HEAD) + *pixel_mode |= PMODE_GLOW; + if(cpart->ctype) + { + *colr = (cpart->ctype & 0xFF0000)>>16; + *colg = (cpart->ctype & 0x00FF00)>>8; + *colb = (cpart->ctype & 0x0000FF); + } + else + { + *colr = 255; + *colg = 255; + *colb = 255; + } + if(cpart->tmp & TRON_DEATH) + { + *pixel_mode |= FIRE_ADD | PMODE_FLARE; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + *firea = 255; + } + if(cpart->life < cpart->tmp2 && !(cpart->tmp & TRON_HEAD)) + { + *pixel_mode |= PMODE_BLEND; + *pixel_mode &= ~PMODE_FLAT; + *cola = (int)((((float)cpart->life)/((float)cpart->tmp2))*255.0f); + } return 0; } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index e8c9d75..d5b4f6b 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2029,12 +2029,9 @@ int Simulation::create_part(int p, int x, int y, int tv)//the function for creat } if (t==PT_TRON) { - int rr,rg,rb; int randhue = rand()%360; int randomdir = rand()%4; - HSV_to_RGB(randhue,255,255,&rr,&rg,&rb); - parts[i].dcolour = 255<<24 | rr<<16 | rg<<8 | rb; - parts[i].tmp = 1|(randomdir<<2);//set as a head and a direction + parts[i].tmp = 1|(randomdir<<5)|(randhue<<7);//set as a head and a direction parts[i].tmp2 = 4;//tail parts[i].life = 5; } -- cgit v0.9.2-21-gd62e From 652cd591ff7e4833d8e4e88e3a3477612973b630 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:33:07 +0100 Subject: Fix previous include diff --git a/src/elements/tron.cpp b/src/elements/tron.cpp index 804b4b7..4ab3bb9 100644 --- a/src/elements/tron.cpp +++ b/src/elements/tron.cpp @@ -1,4 +1,4 @@ -#include +#include "simulation\Element.h" /* TRON element is meant to resemble a tron bike (or worm) moving around and trying to avoid obstacles itself. * It has four direction each turn to choose from, 0 (left) 1 (up) 2 (right) 3 (down). -- cgit v0.9.2-21-gd62e From f8b1e1a2326ca73f42aa51a3efbd0ddddd852430 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:33:50 +0100 Subject: TPT: Better description for tron d4a9f86503 diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 03e0344..8685009 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -332,7 +332,7 @@ part_type * LoadElements(int & elementCount) {"IGNC", PIXPACK(0xC0B050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Ignition cord.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL, &update_IGNT, NULL}, {"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL}, {"GEL", PIXPACK(0xFF9900), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Gel. A liquid with variable viscosity and heat conductivity", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_GEL, &graphics_GEL}, - {"TRON", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, 0.0f, 40, "An automaton tron snake thing", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_TRON, NULL}, + {"TRON", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, 0.0f, 40, "Smart particles, Travels in straight lines and avoids obstacles. Grows with time.", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_TRON, NULL}, /*FREE*/{"STAR", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Star Wars rule S3456/B278/6", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, /*FREE*/{"FROG", PIXPACK(0x00AA00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Frogs S12/B34/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, /*FREE*/{"BRAN", PIXPACK(0xCCCC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Brian 6 S6/B246/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, -- cgit v0.9.2-21-gd62e From 0cc8f84e63761fe3e8e7146944e54ca7c7e52b66 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:35:14 +0100 Subject: TPT: Fix the bug where you could set bad temp to insulators. 64629df1af diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index d5b4f6b..2ad007b 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2878,6 +2878,7 @@ void Simulation::update_particles_i(int start, int inc) } } } + else parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); } if (t==PT_LIFE) -- cgit v0.9.2-21-gd62e From 699a8f699c25d60502c265766ff6c8844f7e0b5e Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:39:07 +0100 Subject: Missing tron graphics function diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 8685009..d815a24 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -332,7 +332,7 @@ part_type * LoadElements(int & elementCount) {"IGNC", PIXPACK(0xC0B050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Ignition cord.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL, &update_IGNT, NULL}, {"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL}, {"GEL", PIXPACK(0xFF9900), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Gel. A liquid with variable viscosity and heat conductivity", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_GEL, &graphics_GEL}, - {"TRON", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, 0.0f, 40, "Smart particles, Travels in straight lines and avoids obstacles. Grows with time.", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_TRON, NULL}, + {"TRON", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, 0.0f, 40, "Smart particles, Travels in straight lines and avoids obstacles. Grows with time.", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_TRON, &graphics_TRON}, /*FREE*/{"STAR", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Star Wars rule S3456/B278/6", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, /*FREE*/{"FROG", PIXPACK(0x00AA00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Frogs S12/B34/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, /*FREE*/{"BRAN", PIXPACK(0xCCCC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Brian 6 S6/B246/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, -- cgit v0.9.2-21-gd62e From c13b05d272d665ff0ab6ff53a47a351645414540 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:39:33 +0100 Subject: Version number update diff --git a/src/Config.h b/src/Config.h index d6be81a..5c2cab4 100644 --- a/src/Config.h +++ b/src/Config.h @@ -16,10 +16,10 @@ #endif //VersionInfoStart -#define SAVE_VERSION 71 -#define MINOR_VERSION 0 +#define SAVE_VERSION 76 +#define MINOR_VERSION 1 #define BETA -#define BUILD_NUM 133 +#define BUILD_NUM 155 //VersionInfoEnd #ifdef BETA -- cgit v0.9.2-21-gd62e From e9fc64eed6e5cbf5e750063e1ad2e30887840dbf Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 19 Apr 2012 14:38:15 +0100 Subject: No interaction with non-visible components" diff --git a/src/interface/Window.cpp b/src/interface/Window.cpp index 5d93587..4d4f9b7 100644 --- a/src/interface/Window.cpp +++ b/src/interface/Window.cpp @@ -164,7 +164,7 @@ void Window::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool a //on key press if(focusedComponent_ != NULL) { - if(!focusedComponent_->Locked) + if(!focusedComponent_->Locked && focusedComponent_->Visible) focusedComponent_->OnKeyPress(key, character, shift, ctrl, alt); } @@ -178,7 +178,7 @@ void Window::DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool //on key unpress if(focusedComponent_ != NULL) { - if(!focusedComponent_->Locked) + if(!focusedComponent_->Locked && focusedComponent_->Visible) focusedComponent_->OnKeyRelease(key, character, shift, ctrl, alt); } @@ -195,7 +195,7 @@ void Window::DoMouseDown(int x_, int y_, unsigned button) bool clickState = false; for(int i = Components.size() - 1; i > -1 && !halt; --i) { - if(!Components[i]->Locked) + if(!Components[i]->Locked && Components[i]->Visible) { if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) { @@ -213,7 +213,7 @@ void Window::DoMouseDown(int x_, int y_, unsigned button) //on mouse down for(int i = Components.size() - 1; i > -1 && !halt; --i) { - if(!Components[i]->Locked) + if(!Components[i]->Locked && Components[i]->Visible) Components[i]->OnMouseDown(x, y, button); } @@ -229,7 +229,7 @@ void Window::DoMouseMove(int x_, int y_, int dx, int dy) int y = y_ - Position.Y; for(int i = Components.size() - 1; i > -1 && !halt; --i) { - if(!Components[i]->Locked) + if(!Components[i]->Locked && Components[i]->Visible) { Point local (x - Components[i]->Position.X, y - Components[i]->Position.Y) , a (local.X - dx, local.Y - dy); @@ -280,7 +280,7 @@ void Window::DoMouseUp(int x_, int y_, unsigned button) //on mouse unclick for(int i = Components.size() - 1; i >= 0 && !halt; --i) { - if(!Components[i]->Locked) + if(!Components[i]->Locked && Components[i]->Visible) { if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) { @@ -293,7 +293,7 @@ void Window::DoMouseUp(int x_, int y_, unsigned button) //on mouse up for(int i = Components.size() - 1; i >= 0 && !halt; --i) { - if(!Components[i]->Locked) + if(!Components[i]->Locked && Components[i]->Visible) Components[i]->OnMouseUp(x, y, button); } @@ -311,7 +311,7 @@ void Window::DoMouseWheel(int x_, int y_, int d) { if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) { - if(!Components[i]->Locked) + if(!Components[i]->Locked && Components[i]->Visible) Components[i]->OnMouseWheelInside(x - Components[i]->Position.X, y - Components[i]->Position.Y, d); break; } @@ -320,7 +320,7 @@ void Window::DoMouseWheel(int x_, int y_, int d) //on mouse wheel for(int i = Components.size() - 1; i >= 0 && !halt; --i) { - if(!Components[i]->Locked) + if(!Components[i]->Locked && Components[i]->Visible) Components[i]->OnMouseWheel(x - Components[i]->Position.X, y - Components[i]->Position.Y, d); } -- cgit v0.9.2-21-gd62e From c4bace95bf97546ecb2fff4343fe82d0540d34ab Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 19 Apr 2012 15:22:18 +0100 Subject: Allow deleting of stamps diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 9e4732b..9a11084 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #ifdef WIN32 #include @@ -221,7 +222,7 @@ Save * Client::GetStamp(string stampID) stampFile.close(); - Save * tempSave = new Save(0, 0, 0, 0, "", ""); + Save * tempSave = new Save(0, 0, 0, 0, "", stampID); tempSave->SetData(tempData, fileSize); return tempSave; } @@ -233,7 +234,15 @@ Save * Client::GetStamp(string stampID) void Client::DeleteStamp(string stampID) { - return; + for(int i = 0; i < stampIDs.size(); i++) + { + if(stampIDs[i] == stampID) + { + remove(string(STAMPS_DIR PATH_SEP + stampID + ".stm").c_str()); + stampIDs.erase(stampIDs.begin()+i); + return; + } + } } string Client::AddStamp(Save * saveData) diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index eacf0ef..6e08e95 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -20,21 +20,23 @@ SaveButton::SaveButton(Point position, Point size, Save * save): selectable(false), selected(false) { - if(save->votesUp==0) - voteRatio = 0.0f; - else if(save->votesDown==0) - voteRatio = 1.0f; - else - voteRatio = 1.0f-(float)(((float)(save->votesDown))/((float)(save->votesUp))); - if(voteRatio < 0.0f) - voteRatio = 0.0f; - if(voteRatio > 1.0f) //Not possible, but just in case the server were to give a negative value or something - voteRatio = 1.0f; - + if(save) + { + if(save->votesUp==0) + voteRatio = 0.0f; + else if(save->votesDown==0) + voteRatio = 1.0f; + else + voteRatio = 1.0f-(float)(((float)(save->votesDown))/((float)(save->votesUp))); + if(voteRatio < 0.0f) + voteRatio = 0.0f; + if(voteRatio > 1.0f) //Not possible, but just in case the server were to give a negative value or something + voteRatio = 1.0f; - voteColour.Red = (1.0f-voteRatio)*255; - voteColour.Green = voteRatio*255; + voteColour.Red = (1.0f-voteRatio)*255; + voteColour.Green = voteRatio*255; + } } SaveButton::~SaveButton() @@ -51,7 +53,7 @@ void SaveButton::Tick(float dt) { Thumbnail * tempThumb; float scaleFactorY = 1.0f, scaleFactorX = 1.0f; - if(!thumbnail) + if(!thumbnail && save) { if(save->GetID()) { @@ -112,35 +114,38 @@ void SaveButton::Draw(const Point& screenPos) scaleFactor = (Size.Y-25)/((float)YRES); thumbBoxSize = ui::Point(((float)XRES)*scaleFactor, ((float)YRES)*scaleFactor); } - if(save->id) + if(save) { - if(isMouseInside) - g->drawrect(screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 210, 230, 255, 255); + if(save->id) + { + if(isMouseInside) + g->drawrect(screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 210, 230, 255, 255); + else + g->drawrect(screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); + g->drawrect(screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, 6, thumbBoxSize.Y, 180, 180, 180, 255); + + int voteBar = max(10.0f, ((float)(thumbBoxSize.Y-2))*voteRatio); + g->fillrect(1+screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, 1+(screenPos.Y-2)+(thumbBoxSize.Y-voteBar)+(Size.Y-21-thumbBoxSize.Y)/2, 4, voteBar, voteColour.Red, voteColour.Green, voteColour.Blue, 255); + } else - g->drawrect(screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); - g->drawrect(screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, 6, thumbBoxSize.Y, 180, 180, 180, 255); + { + if(isMouseInside) + g->drawrect(screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 210, 230, 255, 255); + else + g->drawrect(screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); + } - int voteBar = max(10.0f, ((float)(thumbBoxSize.Y-2))*voteRatio); - g->fillrect(1+screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, 1+(screenPos.Y-2)+(thumbBoxSize.Y-voteBar)+(Size.Y-21-thumbBoxSize.Y)/2, 4, voteBar, voteColour.Red, voteColour.Green, voteColour.Blue, 255); - } - else - { if(isMouseInside) - g->drawrect(screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 210, 230, 255, 255); + { + //g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->name.c_str()))/2, screenPos.Y+Size.Y - 21, save->name, 255, 255, 255, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->userName.c_str()))/2, screenPos.Y+Size.Y - 10, save->userName, 200, 230, 255, 255); + } else - g->drawrect(screenPos.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); - } - - if(isMouseInside) - { - //g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); - g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->name.c_str()))/2, screenPos.Y+Size.Y - 21, save->name, 255, 255, 255, 255); - g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->userName.c_str()))/2, screenPos.Y+Size.Y - 10, save->userName, 200, 230, 255, 255); - } - else - { - g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->name.c_str()))/2, screenPos.Y+Size.Y - 21, save->name, 180, 180, 180, 255); - g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->userName.c_str()))/2, screenPos.Y+Size.Y - 10, save->userName, 100, 130, 160, 255); + { + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->name.c_str()))/2, screenPos.Y+Size.Y - 21, save->name, 180, 180, 180, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->userName.c_str()))/2, screenPos.Y+Size.Y - 10, save->userName, 100, 130, 160, 255); + } } if(isMouseInside && selectable) diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index b0936ef..ec5f805 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -220,6 +220,7 @@ void SearchController::removeSelectedC() std::vector selected = searchModel->GetSelected(); new TaskWindow("Removing saves", new RemoveSavesTask(selected)); ClearSelection(); + searchModel->UpdateSaveList(searchModel->GetPageNum(), searchModel->GetLastQuery()); } void SearchController::UnpublishSelected() @@ -272,10 +273,37 @@ void SearchController::unpublishSelectedC() std::vector selected = searchModel->GetSelected(); new TaskWindow("Unpublishing saves", new UnpublishSavesTask(selected)); ClearSelection(); + searchModel->UpdateSaveList(searchModel->GetPageNum(), searchModel->GetLastQuery()); } void SearchController::FavouriteSelected() { - new ErrorMessage("Not impletemented", "Not ermplermerterd"); + class FavouriteSavesTask : public Task + { + std::vector saves; + public: + FavouriteSavesTask(std::vector saves_) { saves = saves_; } + virtual void doWork() + { + for(int i = 0; i < saves.size(); i++) + { + std::stringstream saveID; + saveID << "Favouring save [" << saves[i] << "] ..."; + notifyStatus(saveID.str()); + if(Client::Ref().FavouriteSave(saves[i], true)!=RequestOkay) + { + std::stringstream saveIDF; + saveIDF << "\boFailed to favourite [" << saves[i] << "] ..."; + notifyStatus(saveIDF.str()); + usleep(500*1000); + } + usleep(100*1000); + notifyProgress((float(i+1)/float(saves.size())*100)); + } + } + }; + + std::vector selected = searchModel->GetSelected(); + new TaskWindow("Favouring saves", new FavouriteSavesTask(selected)); ClearSelection(); } diff --git a/src/stamps/StampsController.cpp b/src/stamps/StampsController.cpp index 07c1efd..fde93a5 100644 --- a/src/stamps/StampsController.cpp +++ b/src/stamps/StampsController.cpp @@ -4,9 +4,15 @@ * Created on: Mar 29, 2012 * Author: Simon */ +#include +#include +#include "client/Client.h" #include "StampsController.h" #include "interface/Engine.h" +#include "dialogues/ConfirmPrompt.h" +#include "tasks/TaskWindow.h" +#include "tasks/Task.h" #include "StampsModel.h" #include "StampsView.h" @@ -34,6 +40,58 @@ Save * StampsController::GetStamp() return stampsModel->GetStamp(); } +void StampsController::RemoveSelected() +{ + class RemoveSelectedConfirmation: public ConfirmDialogueCallback { + public: + StampsController * c; + RemoveSelectedConfirmation(StampsController * c_) { c = c_; } + virtual void ConfirmCallback(ConfirmPrompt::DialogueResult result) { + if (result == ConfirmPrompt::ResultOkay) + c->removeSelectedC(); + } + virtual ~RemoveSelectedConfirmation() { } + }; + + std::stringstream desc; + desc << "Are you sure you want to delete " << stampsModel->GetSelected().size() << " stamp"; + if(stampsModel->GetSelected().size()>1) + desc << "s"; + new ConfirmPrompt("Delete stamps", desc.str(), new RemoveSelectedConfirmation(this)); +} + +void StampsController::removeSelectedC() +{ + class RemoveSavesTask : public Task + { + std::vector stamps; + public: + RemoveSavesTask(std::vector stamps_) { stamps = stamps_; } + virtual void doWork() + { + for(int i = 0; i < stamps.size(); i++) + { + std::stringstream stampID; + stampID << "Deleting stamp [" << stamps[i] << "] ..."; + notifyStatus(stampID.str()); + Client::Ref().DeleteStamp(stamps[i]); + usleep(100*1000); + notifyProgress((float(i+1)/float(stamps.size())*100)); + } + } + }; + + std::vector selected = stampsModel->GetSelected(); + new TaskWindow("Removing saves", new RemoveSavesTask(selected)); + ClearSelection(); + stampsModel->UpdateStampsList(stampsModel->GetPageNum()); +} + +void StampsController::ClearSelection() +{ + stampsModel->ClearSelected(); +} + void StampsController::NextPage() { if(stampsModel->GetPageNum()>1) @@ -54,6 +112,14 @@ void StampsController::Update() } } +void StampsController::Selected(std::string stampID, bool selected) +{ + if(selected) + stampsModel->SelectStamp(stampID); + else + stampsModel->DeselectStamp(stampID); +} + void StampsController::Exit() { if(ui::Engine::Ref().GetWindow() == stampsView) diff --git a/src/stamps/StampsController.h b/src/stamps/StampsController.h index 6b1c401..7053714 100644 --- a/src/stamps/StampsController.h +++ b/src/stamps/StampsController.h @@ -23,6 +23,10 @@ public: StampsController(ControllerCallback * callback); StampsView * GetView() {return stampsView;} Save * GetStamp(); + void RemoveSelected(); + void removeSelectedC(); + void ClearSelection(); + void Selected(std::string stampID, bool selected); void OpenStamp(Save * stamp); void SetStamp(); void NextPage(); diff --git a/src/stamps/StampsModel.cpp b/src/stamps/StampsModel.cpp index b679d13..cfdc72c 100644 --- a/src/stamps/StampsModel.cpp +++ b/src/stamps/StampsModel.cpp @@ -65,6 +65,7 @@ void StampsModel::UpdateStampsList(int pageNumber) stampsList.clear(); currentPage = pageNumber; notifyPageChanged(); + notifyStampsListChanged(); /*notifyStampsListChanged(); for(int i = 0; i < tempStampsList.size(); i++) { @@ -76,11 +77,53 @@ void StampsModel::UpdateStampsList(int pageNumber) for(int i = stampsEnd-20; iNotifySelectedChanged(this); + } +} + StampsModel::~StampsModel() { if(stamp) delete stamp; diff --git a/src/stamps/StampsModel.h b/src/stamps/StampsModel.h index cee158c..0356349 100644 --- a/src/stamps/StampsModel.h +++ b/src/stamps/StampsModel.h @@ -9,11 +9,13 @@ #define STAMPSMODEL_H_ #include +#include #include #include "search/Save.h" class StampsView; class StampsModel { + vector selected; Save * stamp; std::vector stampIDs; std::vector stampsList; @@ -21,6 +23,7 @@ class StampsModel { int currentPage; void notifyStampsListChanged(); void notifyPageChanged(); + void notifySelectedChanged(); public: StampsModel(); int GetPageCount() { return max(1, (int)(ceil(stampIDs.size()/16))); } @@ -30,6 +33,10 @@ public: void UpdateStampsList(int pageNumber); Save * GetStamp(); void SetStamp(Save * newStamp); + vector GetSelected() { return selected; } + void ClearSelected() { selected.clear(); notifySelectedChanged(); } + void SelectStamp(std::string stampID); + void DeselectStamp(std::string stampID); virtual ~StampsModel(); }; diff --git a/src/stamps/StampsView.cpp b/src/stamps/StampsView.cpp index c0d5981..883cabd 100644 --- a/src/stamps/StampsView.cpp +++ b/src/stamps/StampsView.cpp @@ -9,7 +9,6 @@ #include "client/Client.h" #include "StampsView.h" -#include "interface/SaveButton.h" #include "dialogues/ErrorMessage.h" #include "StampsController.h" #include "StampsModel.h" @@ -50,6 +49,22 @@ StampsView::StampsView(): }; previousButton->SetActionCallback(new PrevPageAction(this)); previousButton->SetAlignment(AlignLeft, AlignBottom); + + class RemoveSelectedAction : public ui::ButtonAction + { + StampsView * v; + public: + RemoveSelectedAction(StampsView * _v) { v = _v; } + void ActionCallback(ui::Button * sender) + { + v->c->RemoveSelected(); + } + }; + + removeSelected = new ui::Button(ui::Point((((XRES+BARSIZE)-100)/2), YRES+MENUSIZE-18), ui::Point(100, 16), "Delete"); + removeSelected->Visible = false; + removeSelected->SetActionCallback(new RemoveSelectedAction(this)); + AddComponent(removeSelected); } void StampsView::OnTick(float dt) @@ -108,6 +123,10 @@ void StampsView::NotifyStampsListChanged(StampsModel * sender) { v->c->OpenStamp(sender->GetSave()); } + virtual void SelectedCallback(ui::SaveButton * sender) + { + v->c->Selected(sender->GetSave()->GetName(), sender->GetSelected()); + } }; for(i = 0; i < saves.size(); i++) { @@ -126,6 +145,7 @@ void StampsView::NotifyStampsListChanged(StampsModel * sender) ), ui::Point(buttonWidth, buttonHeight), saves[i]); + saveButton->SetSelectable(true); saveButton->SetActionCallback(new SaveOpenAction(this)); stampButtons.push_back(saveButton); AddComponent(saveButton); @@ -133,6 +153,27 @@ void StampsView::NotifyStampsListChanged(StampsModel * sender) } } +void StampsView::NotifySelectedChanged(StampsModel * sender) +{ + vector selected = sender->GetSelected(); + for(int j = 0; j < stampButtons.size(); j++) + { + stampButtons[j]->SetSelected(false); + for(int i = 0; i < selected.size(); i++) + { + if(stampButtons[j]->GetSave()->GetName()==selected[i]) + stampButtons[j]->SetSelected(true); + } + } + + if(selected.size()) + { + removeSelected->Visible = true; + } + else + removeSelected->Visible = false; +} + void StampsView::OnMouseWheel(int x, int y, int d) { if(!d) diff --git a/src/stamps/StampsView.h b/src/stamps/StampsView.h index 02e5569..0264611 100644 --- a/src/stamps/StampsView.h +++ b/src/stamps/StampsView.h @@ -13,15 +13,17 @@ #include "interface/Button.h" #include "interface/Textbox.h" #include "interface/Label.h" +#include "interface/SaveButton.h" class StampsController; class StampsModel; class StampsView: public ui::Window { StampsController * c; - std::vector stampButtons; + std::vector stampButtons; ui::Button * previousButton; ui::Button * nextButton; ui::Label * infoLabel; + ui::Button * removeSelected; public: StampsView(); //virtual void OnDraw(); @@ -29,6 +31,7 @@ public: void AttachController(StampsController * c_) { c = c_; }; void NotifyPageChanged(StampsModel * sender); void NotifyStampsListChanged(StampsModel * sender); + void NotifySelectedChanged(StampsModel * sender); virtual void OnMouseWheel(int x, int y, int d); virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); virtual ~StampsView(); -- cgit v0.9.2-21-gd62e From ceb25440cbbb1c6b712985770a0379c4da57cdd4 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 19 Apr 2012 16:52:35 +0100 Subject: TPT: Fix sponge bug. f93a829671 diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h index fc90929..5106c5f 100644 --- a/src/simulation/Elements.h +++ b/src/simulation/Elements.h @@ -47,6 +47,7 @@ #define FLAG_STAGNANT 1 #define FLAG_SKIPMOVE 0x2 // skip movement for one frame, only implemented for PHOT +#define FLAG_MOVABLE 0x4 // if can move #define ST_NONE 0 #define ST_SOLID 1 diff --git a/src/simulation/SaveLoader.cpp b/src/simulation/SaveLoader.cpp index 2683a6f..71748c4 100644 --- a/src/simulation/SaveLoader.cpp +++ b/src/simulation/SaveLoader.cpp @@ -6,6 +6,7 @@ */ #include +#include #include "SaveLoader.h" //!TODO: enum for LoadSave return @@ -547,6 +548,11 @@ int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim, //STKM_init_legs(&(fighters[fcount]), i-1); } } + else if (parts[i-1].type == PT_SPNG) + { + if (fabs(parts[i-1].vx)>0.0f || fabs(parts[i-1].vy)>0.0f) + parts[i-1].flags |= FLAG_MOVABLE; + } if (ver<48 && (ty==OLD_PT_WIND || (ty==PT_BRAY&&parts[i-1].life==0))) { diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 2ad007b..e2f9880 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2573,8 +2573,11 @@ void Simulation::update_particles_i(int start, int inc) pGravY += gravy[(y/CELL)*(XRES/CELL)+(x/CELL)]; } //velocity updates for the particle - parts[i].vx *= ptypes[t].loss; - parts[i].vy *= ptypes[t].loss; + if (!(parts[i].flags&FLAG_MOVABLE)) + { + parts[i].vx *= ptypes[t].loss; + parts[i].vy *= ptypes[t].loss; + } //particle gets velocity from the vx and vy maps parts[i].vx += ptypes[t].advection*vx[y/CELL][x/CELL] + pGravX; parts[i].vy += ptypes[t].advection*vy[y/CELL][x/CELL] + pGravY; diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index d815a24..043091e 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -279,7 +279,7 @@ part_type * LoadElements(int & elementCount) {"LIGH", PIXPACK(0xFFFFC0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 0, "More realistic lightning. Set pen size to set the size of the lightning.", ST_SOLID, TYPE_SOLID, &update_LIGH, &graphics_LIGH}, {"TESC", PIXPACK(0x707040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Tesla coil!", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL}, {"DEST", PIXPACK(0xFF3311), -0.05f, 0.00f * CFDS, 0.95f, 0.95f, -0.1f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 1, 101, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 150, "More destructive Bomb.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_DEST, &graphics_DEST}, - {"SPNG", PIXPACK(0xFFBE30), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 1, 30, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "A sponge, absorbs water.", ST_SOLID, TYPE_SOLID, &update_SPNG, &graphics_SPNG}, + {"SPNG", PIXPACK(0xFFBE30), 0.00f, 0.00f * CFDS, 0.00f, 0.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 20, 0, 1, 30, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "A sponge, absorbs water.", ST_SOLID, TYPE_SOLID, &update_SPNG, &graphics_SPNG}, {"RIME", PIXPACK(0xCCCCCC), 0.00f, 0.00f * CFDS, 0.00f, 1.00f, 0.00f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 100, SC_CRACKER2, 243.15f, 100, "Not quite Ice", ST_SOLID, TYPE_SOLID, &update_RIME, NULL}, {"FOG", PIXPACK(0xAAAAAA), 0.8f, 0.00f * CFDS, 0.4f, 0.70f, -0.1f, 0.0f, 0.99f, 0.000f * CFDS, 0, 0, 0, 0, 30, 1, 1, 1, SC_CRACKER2, 243.15f, 100, "Not quite Steam", ST_GAS, TYPE_GAS|PROP_LIFE_DEC, &update_FOG, NULL}, {"BCLN", PIXPACK(0xFFD040), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Breakable Clone.", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_BCLN, NULL}, -- cgit v0.9.2-21-gd62e From 456fca22c692cd5199e17e9b6d4279a04ce7da25 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 19 Apr 2012 17:01:17 +0100 Subject: TPT: Change STOR, PIPE, DUST to make correct use of .flags field. diff --git a/src/elements/aray.cpp b/src/elements/aray.cpp index 8505d81..a4e8c63 100644 --- a/src/elements/aray.cpp +++ b/src/elements/aray.cpp @@ -63,7 +63,7 @@ int update_ARAY(UPDATE_FUNC_ARGS) { if (np!=-1) { parts[np].temp = parts[r>>8].temp; - parts[np].life = parts[r>>8].flags; + parts[np].life = parts[r>>8].tmp2; parts[np].tmp = parts[r>>8].pavg[0]; parts[np].ctype = parts[r>>8].pavg[1]; parts[r>>8].tmp = 0; diff --git a/src/elements/firw.cpp b/src/elements/firw.cpp index ffd7941..712d416 100644 --- a/src/elements/firw.cpp +++ b/src/elements/firw.cpp @@ -23,7 +23,7 @@ int update_FIRW(UPDATE_FUNC_ARGS) { parts[i].tmp=2; } else { float newVel = parts[i].life/25; - parts[i].flags = parts[i].flags&0xFFFFFFFE; + parts[i].flags &= ~FLAG_STAGNANT; /* TODO: if ((pmap[(int)(ly-newVel)][(int)lx]&0xFF)==PT_NONE && ly-newVel>0) { parts[i].vy = -newVel; diff --git a/src/elements/fwrk.cpp b/src/elements/fwrk.cpp index 1838dde..64da287 100644 --- a/src/elements/fwrk.cpp +++ b/src/elements/fwrk.cpp @@ -38,7 +38,7 @@ int update_FWRK(UPDATE_FUNC_ARGS) { parts[np].vx = ((rand()%2)*2-1)*rand()%(5+5)+(parts[i].vx)*2 ; parts[np].life= rand()%37+18; parts[np].tmp=q; - parts[np].flags=w; + parts[np].tmp2=w; parts[np].ctype=e; parts[np].temp= rand()%20+6000; parts[np].dcolour = parts[i].dcolour; diff --git a/src/elements/pipe.cpp b/src/elements/pipe.cpp index 78f384b..05972b6 100644 --- a/src/elements/pipe.cpp +++ b/src/elements/pipe.cpp @@ -1,5 +1,7 @@ #include "simulation/Element.h" +#define PFLAG_NORMALSPEED 0x00010000 + signed char pos_1_rx[] = {-1,-1,-1, 0, 0, 1, 1, 1}; signed char pos_1_ry[] = {-1, 0, 1,-1, 1,-1, 0, 1}; @@ -31,11 +33,11 @@ void pushParticle(Simulation * sim, int i, int count, int original) { sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); sim->parts[r>>8].temp = sim->parts[i].temp; - sim->parts[r>>8].flags = sim->parts[i].flags; + sim->parts[r>>8].tmp2 = sim->parts[i].tmp2; sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; if (r>>8 > original) - sim->parts[r>>8].tmp2 = 1;//skip particle push, normalizes speed + sim->parts[r>>8].flags |= PFLAG_NORMALSPEED;//skip particle push, normalizes speed sim->parts[i].tmp &= ~0xFF; count++; pushParticle(sim, r>>8,count,original); @@ -54,11 +56,11 @@ void pushParticle(Simulation * sim, int i, int count, int original) { sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); sim->parts[r>>8].temp = sim->parts[i].temp; - sim->parts[r>>8].flags = sim->parts[i].flags; + sim->parts[r>>8].tmp2 = sim->parts[i].tmp2; sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; if (r>>8 > original) - sim->parts[r>>8].tmp2 = 1;//skip particle push, normalizes speed + sim->parts[r>>8].flags |= PFLAG_NORMALSPEED;//skip particle push, normalizes speed sim->parts[i].tmp &= ~0xFF; count++; pushParticle(sim, r>>8,count,original); @@ -111,9 +113,9 @@ int update_PIPE(UPDATE_FUNC_ARGS) { } else { - if (parts[i].tmp2 == 1)//skip particle push to prevent particle number being higher causeing speed up + if (parts[i].flags&PFLAG_NORMALSPEED)//skip particle push to prevent particle number being higher causeing speed up { - parts[i].tmp2 = 0 ; + parts[i].tmp2 &= ~PFLAG_NORMALSPEED; } else { @@ -138,7 +140,7 @@ int update_PIPE(UPDATE_FUNC_ARGS) { if (np!=-1) { parts[np].temp = parts[i].temp;//pipe saves temp and life now - parts[np].life = parts[i].flags; + parts[np].life = parts[i].tmp2; parts[np].tmp = parts[i].pavg[0]; parts[np].ctype = parts[i].pavg[1]; parts[i].tmp &= ~0xFF; @@ -151,7 +153,7 @@ int update_PIPE(UPDATE_FUNC_ARGS) { sim->detach(r>>8); parts[i].tmp = (parts[i].tmp&~0xFF) | parts[r>>8].type; parts[i].temp = parts[r>>8].temp; - parts[i].flags = parts[r>>8].life; + parts[i].tmp2 = parts[r>>8].life; parts[i].pavg[0] = parts[r>>8].tmp; parts[i].pavg[1] = parts[r>>8].ctype; sim->kill_part(r>>8); @@ -160,7 +162,7 @@ int update_PIPE(UPDATE_FUNC_ARGS) { { parts[i].tmp = parts[r>>8].tmp; parts[i].temp = parts[r>>8].temp; - parts[i].flags = parts[r>>8].flags; + parts[i].tmp2 = parts[r>>8].tmp2; parts[i].pavg[0] = parts[r>>8].pavg[0]; parts[i].pavg[1] = parts[r>>8].pavg[1]; parts[r>>8].tmp = 0; @@ -253,7 +255,7 @@ int graphics_PIPE(GRAPHICS_FUNC_ARGS) memset(&tpart, 0, sizeof(Particle)); tpart.type = cpart->tmp&0xFF; tpart.temp = cpart->temp; - tpart.life = cpart->flags; + tpart.life = cpart->tmp2; tpart.tmp = cpart->pavg[0]; tpart.ctype = cpart->pavg[1]; t = tpart.type; diff --git a/src/elements/stor.cpp b/src/elements/stor.cpp index cf64255..01c3415 100644 --- a/src/elements/stor.cpp +++ b/src/elements/stor.cpp @@ -15,7 +15,7 @@ int update_STOR(UPDATE_FUNC_ARGS) { { parts[i].tmp = parts[r>>8].type; parts[i].temp = parts[r>>8].temp; - parts[i].flags = parts[r>>8].life; + parts[i].tmp2 = parts[r>>8].life; parts[i].pavg[0] = parts[r>>8].tmp; parts[i].pavg[1] = parts[r>>8].ctype; sim->kill_part(r>>8); @@ -28,7 +28,7 @@ int update_STOR(UPDATE_FUNC_ARGS) { if (np!=-1) { parts[np].temp = parts[i].temp; - parts[np].life = parts[i].flags; + parts[np].life = parts[i].tmp2; parts[np].tmp = parts[i].pavg[0]; parts[np].ctype = parts[i].pavg[1]; parts[i].tmp = 0; -- cgit v0.9.2-21-gd62e From 891ce89ed01238562e73381d404d3d3670601741 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 20 Apr 2012 00:40:55 +0100 Subject: Correct path name for Elements.h include in gel.cpp diff --git a/src/elements/gel.cpp b/src/elements/gel.cpp index 2031af1..0853a5f 100644 --- a/src/elements/gel.cpp +++ b/src/elements/gel.cpp @@ -1,4 +1,4 @@ -#include "simulation\Element.h" +#include "simulation/Element.h" int update_GEL(UPDATE_FUNC_ARGS) { int r, rx, ry; -- cgit v0.9.2-21-gd62e From 75388815912e32deeecfb0ec23d5ebb5bb3c1ce9 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 20 Apr 2012 00:46:08 +0100 Subject: Fix more element source file includes diff --git a/src/elements/repl.cpp b/src/elements/repl.cpp index e9cb1e6..faa9c58 100644 --- a/src/elements/repl.cpp +++ b/src/elements/repl.cpp @@ -1,4 +1,4 @@ -#include "simulation\Element.h" +#include "simulation/Element.h" int update_REPL(UPDATE_FUNC_ARGS) { int r, rx, ry, ri; diff --git a/src/elements/tron.cpp b/src/elements/tron.cpp index 4ab3bb9..3e99eb3 100644 --- a/src/elements/tron.cpp +++ b/src/elements/tron.cpp @@ -1,4 +1,4 @@ -#include "simulation\Element.h" +#include "simulation/Element.h" /* TRON element is meant to resemble a tron bike (or worm) moving around and trying to avoid obstacles itself. * It has four direction each turn to choose from, 0 (left) 1 (up) 2 (right) 3 (down). -- cgit v0.9.2-21-gd62e From 0bab640fe48a3b13eb01101977d0c5cb8fef199a Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 20 Apr 2012 01:45:43 +0100 Subject: Fix warning in Client.cppcpppcppc diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 9a11084..4e51600 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -47,7 +47,7 @@ Client::Client(): { int fsize = configFile.tellg(); configFile.seekg(0, std::ios::end); - fsize = configFile.tellg() - fsize; + fsize = configFile.tellg() - (std::streampos)fsize; configFile.seekg(0, ios::beg); if(fsize) { -- cgit v0.9.2-21-gd62e From 75a9460c835f4ebea501a89d23e0c5f46da985cc Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 20 Apr 2012 19:21:10 +0100 Subject: OpenGL rendering diff --git a/src/Graphics.cpp b/src/Graphics.cpp index f948584..e03a699 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -2,22 +2,6 @@ #include #include #include - -#if defined(OGLR) -#ifdef MACOSX -#include -#include -#include -#elif defined(WIN32) -#include -#include -#include -#else -#include -#include -#endif -#endif - #include "Config.h" //#include "simulation/Air.h" //#include "simulation/Gravity.h" @@ -41,10 +25,10 @@ unsigned int display_mode; //SDL_Surface *sdl_scrn; int sdl_scale = 1; -#ifdef OGLR +/*#ifdef OGLR GLuint zoomTex, vidBuf, airBuf, fireAlpha, glowAlpha, blurAlpha, partsFboTex, partsFbo, partsTFX, partsTFY, airPV, airVY, airVX; GLuint fireProg, airProg_Pressure, airProg_Velocity, airProg_Cracker, lensProg; -#endif +#endif*/ /* int emp_decor = 0; @@ -363,62 +347,11 @@ pixel *Graphics::rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f } #ifdef OGLR -void clearScreen(float alpha) -{ - if(alpha > 0.999f) - { - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); - glClear(GL_COLOR_BUFFER_BIT); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); - } - else - { - glBlendEquation(GL_FUNC_REVERSE_SUBTRACT); - glColor4f(1.0f, 1.0f, 1.0f, alpha); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); - glBegin(GL_QUADS); - glVertex2f(0, 0); - glVertex2f(XRES, 0); - glVertex2f(XRES, YRES); - glVertex2f(0, YRES); - glEnd(); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); - glBlendEquation(GL_FUNC_ADD); - } - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); -} - void clearScreenNP(float alpha) { glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); } - -void ogl_blit(int x, int y, int w, int h, pixel *src, int pitch, int scale) -{ - - //glDrawPixels(w,h,GL_BGRA,GL_UNSIGNED_BYTE,src); //Why does this still think it's ABGR? - glEnable( GL_TEXTURE_2D ); - glBindTexture(GL_TEXTURE_2D, vidBuf); - glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES+BARSIZE, YRES+MENUSIZE, GL_BGRA, GL_UNSIGNED_BYTE, src); - glBegin(GL_QUADS); - glTexCoord2d(1, 0); - glVertex3f((XRES+BARSIZE)*sdl_scale, (YRES+MENUSIZE)*sdl_scale, 1.0); - glTexCoord2d(0, 0); - glVertex3f(0, (YRES+MENUSIZE)*sdl_scale, 1.0); - glTexCoord2d(0, 1); - glVertex3f(0, 0, 1.0); - glTexCoord2d(1, 1); - glVertex3f((XRES+BARSIZE)*sdl_scale, 0, 1.0); - glEnd(); - - glDisable( GL_TEXTURE_2D ); - glFlush(); - SDL_GL_SwapBuffers (); -} #endif //an easy way to draw a blob @@ -1392,7 +1325,7 @@ void Graphics::xor_rect(int x, int y, int w, int h) } -//New function for drawing particles +/*//New function for drawing particles #ifdef OGLR GLuint fireV[(YRES*XRES)*2]; GLfloat fireC[(YRES*XRES)*4]; @@ -1410,57 +1343,7 @@ GLuint addV[(YRES*XRES)*2]; GLfloat addC[(YRES*XRES)*4]; GLfloat lineV[(((YRES*XRES)*2)*6)]; GLfloat lineC[(((YRES*XRES)*2)*6)]; -#endif - -#ifdef OGLR -void draw_parts_fbo() -{ - glEnable( GL_TEXTURE_2D ); - if(display_mode & DISPLAY_WARP) - { - float xres = XRES, yres = YRES; - glUseProgram(lensProg); - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, partsFboTex); - glUniform1i(glGetUniformLocation(lensProg, "pTex"), 0); - glActiveTexture(GL_TEXTURE1); - glBindTexture(GL_TEXTURE_2D, partsTFX); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_RED, GL_FLOAT, gravx); - glUniform1i(glGetUniformLocation(lensProg, "tfX"), 1); - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, partsTFY); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_GREEN, GL_FLOAT, gravy); - glUniform1i(glGetUniformLocation(lensProg, "tfY"), 2); - glActiveTexture(GL_TEXTURE0); - glUniform1fv(glGetUniformLocation(lensProg, "xres"), 1, &xres); - glUniform1fv(glGetUniformLocation(lensProg, "yres"), 1, &yres); - } - else - { - glBindTexture(GL_TEXTURE_2D, partsFboTex); - glBlendFunc(GL_ONE, GL_ONE); - } - - glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - glBegin(GL_QUADS); - glTexCoord2d(1, 0); - glVertex3f(XRES*sdl_scale, (YRES+MENUSIZE)*sdl_scale, 1.0); - glTexCoord2d(0, 0); - glVertex3f(0, (YRES+MENUSIZE)*sdl_scale, 1.0); - glTexCoord2d(0, 1); - glVertex3f(0, MENUSIZE*sdl_scale, 1.0); - glTexCoord2d(1, 1); - glVertex3f(XRES*sdl_scale, MENUSIZE*sdl_scale, 1.0); - glEnd(); - - if(display_mode & DISPLAY_WARP) - { - glUseProgram(0); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - } - glDisable( GL_TEXTURE_2D ); -} -#endif +#endif*/ //draws the photon colors in the HUD @@ -2384,15 +2267,48 @@ int draw_debug_info(pixel* vid, Simulation * sim, int lm, int lx, int ly, int cx void Graphics::Clear() { memset(vid, 0, PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE))); +#ifdef OGLR + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); +#endif } void Graphics::AttachSDLSurface(SDL_Surface * surface) { sdl_scrn = surface; +#ifdef OGLR + SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glOrtho(0, (XRES+BARSIZE)*sdl_scale, 0, (YRES+MENUSIZE)*sdl_scale, -1, 1); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + glRasterPos2i(0, (YRES+MENUSIZE)); + glPixelZoom(1, -1); + + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + //Texture for main UI + glEnable(GL_TEXTURE_2D); + glGenTextures(1, &vidBuf); + glBindTexture(GL_TEXTURE_2D, vidBuf); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, XRES+BARSIZE, YRES+MENUSIZE, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); +#endif } void Graphics::Blit() { +#ifndef OGLR if(sdl_scrn) { pixel * dst; @@ -2412,14 +2328,48 @@ void Graphics::Blit() SDL_UnlockSurface(sdl_scrn); SDL_UpdateRect(sdl_scrn,0,0,0,0); } +#else + //glDrawPixels(w,h,GL_BGRA,GL_UNSIGNED_BYTE,src); //Why does this still think it's ABGR? + glEnable( GL_TEXTURE_2D ); + glBindTexture(GL_TEXTURE_2D, vidBuf); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES+BARSIZE, YRES+MENUSIZE, GL_BGRA, GL_UNSIGNED_BYTE, vid); + glBegin(GL_QUADS); + glTexCoord2d(1, 0); + glVertex3f((XRES+BARSIZE)*sdl_scale, (YRES+MENUSIZE)*sdl_scale, 1.0); + glTexCoord2d(0, 0); + glVertex3f(0, (YRES+MENUSIZE)*sdl_scale, 1.0); + glTexCoord2d(0, 1); + glVertex3f(0, 0, 1.0); + glTexCoord2d(1, 1); + glVertex3f((XRES+BARSIZE)*sdl_scale, 0, 1.0); + glEnd(); + + glDisable( GL_TEXTURE_2D ); + glFlush(); + SDL_GL_SwapBuffers (); +#endif } Graphics::Graphics(): sdl_scrn(NULL) { vid = (pixel *)malloc(PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE))); + +#ifdef OGLR +#ifdef WIN32 + status = glewInit(); + if(status != GLEW_OK) + { + fprintf(stderr, "Initializing Glew: %d\n", status); + return 0; + } +#endif +#endif } + Graphics::~Graphics() { free(vid); } + diff --git a/src/Graphics.h b/src/Graphics.h index 34305d7..4e6edf6 100644 --- a/src/Graphics.h +++ b/src/Graphics.h @@ -3,6 +3,21 @@ #include #include +#if defined(OGLR) +#ifdef MACOSX +#include +#include +#include +#elif defined(WIN32) +#include +#include +#include +#else +//#include +#include +#include +#endif +#endif #include "Config.h" //#include "powder.h" @@ -159,6 +174,9 @@ public: #endif Graphics(); ~Graphics(); +#ifdef OGLR + GLuint vidBuf; +#endif }; #endif diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index f3e6afb..cd647e8 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -74,7 +74,11 @@ SDL_Surface * SDLOpen() SDL_WM_SetCaption("The Powder Toy", "Powder Toy"); //SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); atexit(SDL_Quit); +#ifndef OGLR return SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_SWSURFACE); +#else + return SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_OPENGL); +#endif } /*int SDLPoll(SDL_Event * event) diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 5b7b550..dece4d3 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include "Config.h" #include "Renderer.h" #include "Graphics.h" @@ -18,6 +20,212 @@ extern "C" { #include "hmap.h" +#ifdef OGLR +#include "Shaders.h" +#endif +} + + +void Renderer::clearScreen(float alpha) +{ +#ifdef OGLR + if(alpha > 0.999f) + { + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); + glClear(GL_COLOR_BUFFER_BIT); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + } + else + { + glBlendEquation(GL_FUNC_REVERSE_SUBTRACT); + glColor4f(1.0f, 1.0f, 1.0f, alpha); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); + glBegin(GL_QUADS); + glVertex2f(0, 0); + glVertex2f(XRES, 0); + glVertex2f(XRES, YRES); + glVertex2f(0, YRES); + glEnd(); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + glBlendEquation(GL_FUNC_ADD); + } + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); +#endif +} +#ifdef OGLR +void Renderer::checkShader(GLuint shader, char * shname) +{ + GLint status; + glGetShaderiv(shader, GL_COMPILE_STATUS, &status); + if (status == GL_FALSE) + { + char errorBuf[ GL_INFO_LOG_LENGTH]; + int errLen; + glGetShaderInfoLog(shader, GL_INFO_LOG_LENGTH, &errLen, errorBuf); + fprintf(stderr, "Failed to compile %s shader:\n%s\n", shname, errorBuf); + exit(1); + } +} +void Renderer::checkProgram(GLuint program, char * progname) +{ + GLint status; + glGetProgramiv(program, GL_LINK_STATUS, &status); + if (status == GL_FALSE) + { + char errorBuf[ GL_INFO_LOG_LENGTH]; + int errLen; + glGetShaderInfoLog(program, GL_INFO_LOG_LENGTH, &errLen, errorBuf); + fprintf(stderr, "Failed to link %s program:\n%s\n", progname, errorBuf); + exit(1); + } +} +void Renderer::loadShaders() +{ + GLuint vertexShader, fragmentShader; + + //Particle texture + vertexShader = glCreateShader(GL_VERTEX_SHADER); + fragmentShader = glCreateShader(GL_FRAGMENT_SHADER); + + glShaderSource( vertexShader, 1, &fireVertex, NULL); + glShaderSource( fragmentShader, 1, &fireFragment, NULL); + + glCompileShader( vertexShader ); + checkShader(vertexShader, "FV"); + glCompileShader( fragmentShader ); + checkShader(fragmentShader, "FF"); + + fireProg = glCreateProgram(); + glAttachShader( fireProg, vertexShader ); + glAttachShader( fireProg, fragmentShader ); + glLinkProgram( fireProg ); + checkProgram(fireProg, "F"); + + //Lensing + vertexShader = glCreateShader(GL_VERTEX_SHADER); + fragmentShader = glCreateShader(GL_FRAGMENT_SHADER); + + glShaderSource( vertexShader, 1, &lensVertex, NULL); + glShaderSource( fragmentShader, 1, &lensFragment, NULL); + + glCompileShader( vertexShader ); + checkShader(vertexShader, "LV"); + glCompileShader( fragmentShader ); + checkShader(fragmentShader, "LF"); + + lensProg = glCreateProgram(); + glAttachShader( lensProg, vertexShader ); + glAttachShader( lensProg, fragmentShader ); + glLinkProgram( lensProg ); + checkProgram(lensProg, "L"); + + //Air Velocity + vertexShader = glCreateShader(GL_VERTEX_SHADER); + fragmentShader = glCreateShader(GL_FRAGMENT_SHADER); + + glShaderSource( vertexShader, 1, &airVVertex, NULL); + glShaderSource( fragmentShader, 1, &airVFragment, NULL); + + glCompileShader( vertexShader ); + checkShader(vertexShader, "AVX"); + glCompileShader( fragmentShader ); + checkShader(fragmentShader, "AVF"); + + airProg_Velocity = glCreateProgram(); + glAttachShader( airProg_Velocity, vertexShader ); + glAttachShader( airProg_Velocity, fragmentShader ); + glLinkProgram( airProg_Velocity ); + checkProgram(airProg_Velocity, "AV"); + + //Air Pressure + vertexShader = glCreateShader(GL_VERTEX_SHADER); + fragmentShader = glCreateShader(GL_FRAGMENT_SHADER); + + glShaderSource( vertexShader, 1, &airPVertex, NULL); + glShaderSource( fragmentShader, 1, &airPFragment, NULL); + + glCompileShader( vertexShader ); + checkShader(vertexShader, "APV"); + glCompileShader( fragmentShader ); + checkShader(fragmentShader, "APF"); + + airProg_Pressure = glCreateProgram(); + glAttachShader( airProg_Pressure, vertexShader ); + glAttachShader( airProg_Pressure, fragmentShader ); + glLinkProgram( airProg_Pressure ); + checkProgram(airProg_Pressure, "AP"); + + //Air cracker + vertexShader = glCreateShader(GL_VERTEX_SHADER); + fragmentShader = glCreateShader(GL_FRAGMENT_SHADER); + + glShaderSource( vertexShader, 1, &airCVertex, NULL); + glShaderSource( fragmentShader, 1, &airCFragment, NULL); + + glCompileShader( vertexShader ); + checkShader(vertexShader, "ACV"); + glCompileShader( fragmentShader ); + checkShader(fragmentShader, "ACF"); + + airProg_Cracker = glCreateProgram(); + glAttachShader( airProg_Cracker, vertexShader ); + glAttachShader( airProg_Cracker, fragmentShader ); + glLinkProgram( airProg_Cracker ); + checkProgram(airProg_Cracker, "AC"); +} +#endif + +void Renderer::FinaliseParts() +{ +#ifdef OGLR + glEnable( GL_TEXTURE_2D ); + if(display_mode & DISPLAY_WARP) + { + float xres = XRES, yres = YRES; + glUseProgram(lensProg); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, partsFboTex); + glUniform1i(glGetUniformLocation(lensProg, "pTex"), 0); + glActiveTexture(GL_TEXTURE1); + glBindTexture(GL_TEXTURE_2D, partsTFX); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_RED, GL_FLOAT, sim->gravx); + glUniform1i(glGetUniformLocation(lensProg, "tfX"), 1); + glActiveTexture(GL_TEXTURE2); + glBindTexture(GL_TEXTURE_2D, partsTFY); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_GREEN, GL_FLOAT, sim->gravy); + glUniform1i(glGetUniformLocation(lensProg, "tfY"), 2); + glActiveTexture(GL_TEXTURE0); + glUniform1fv(glGetUniformLocation(lensProg, "xres"), 1, &xres); + glUniform1fv(glGetUniformLocation(lensProg, "yres"), 1, &yres); + } + else + { + glBindTexture(GL_TEXTURE_2D, partsFboTex); + glBlendFunc(GL_ONE, GL_ONE); + } + + int sdl_scale = 1; + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glBegin(GL_QUADS); + glTexCoord2d(1, 0); + glVertex3f(XRES*sdl_scale, (YRES+MENUSIZE)*sdl_scale, 1.0); + glTexCoord2d(0, 0); + glVertex3f(0, (YRES+MENUSIZE)*sdl_scale, 1.0); + glTexCoord2d(0, 1); + glVertex3f(0, MENUSIZE*sdl_scale, 1.0); + glTexCoord2d(1, 1); + glVertex3f(XRES*sdl_scale, MENUSIZE*sdl_scale, 1.0); + glEnd(); + + if(display_mode & DISPLAY_WARP) + { + glUseProgram(0); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } + glDisable( GL_TEXTURE_2D ); +#endif } void Renderer::RenderZoom() @@ -25,15 +233,16 @@ void Renderer::RenderZoom() if(!zoomEnabled) return; #ifdef OGLR + int sdl_scale = 1; int origBlendSrc, origBlendDst; float zcx1, zcx0, zcy1, zcy0, yfactor, xfactor, i; //X-Factor is shit, btw xfactor = 1.0f/(float)XRES; yfactor = 1.0f/(float)YRES; - zcx0 = (zoom_x)*xfactor; - zcx1 = (zoom_x+ZSIZE)*xfactor; - zcy0 = (zoom_y)*yfactor; - zcy1 = ((zoom_y+ZSIZE))*yfactor; + zcx0 = (zoomScopePosition.X)*xfactor; + zcx1 = (zoomScopePosition.X+zoomScopeSize)*xfactor; + zcy0 = (zoomScopePosition.Y)*yfactor; + zcy1 = ((zoomScopePosition.Y+zoomScopeSize))*yfactor; glGetIntegerv(GL_BLEND_SRC, &origBlendSrc); glGetIntegerv(GL_BLEND_DST, &origBlendDst); @@ -46,13 +255,13 @@ void Renderer::RenderZoom() glColor4f(1.0f, 1.0f, 1.0f, 1.0f); glBegin(GL_QUADS); glTexCoord2d(zcx1, zcy1); - glVertex3f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 1.0); + glVertex3f((zoomWindowPosition.X+zoomScopeSize*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoomWindowPosition.Y+zoomScopeSize*ZFACTOR))*sdl_scale, 1.0); glTexCoord2d(zcx0, zcy1); - glVertex3f(zoom_wx*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 1.0); + glVertex3f(zoomWindowPosition.X*sdl_scale, (YRES+MENUSIZE-(zoomWindowPosition.Y+zoomScopeSize*ZFACTOR))*sdl_scale, 1.0); glTexCoord2d(zcx0, zcy0); - glVertex3f(zoom_wx*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 1.0); + glVertex3f(zoomWindowPosition.X*sdl_scale, (YRES+MENUSIZE-zoomWindowPosition.Y)*sdl_scale, 1.0); glTexCoord2d(zcx1, zcy0); - glVertex3f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 1.0); + glVertex3f((zoomWindowPosition.X+zoomScopeSize*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoomWindowPosition.Y)*sdl_scale, 1.0); glEnd(); glBindTexture(GL_TEXTURE_2D, 0); glDisable( GL_TEXTURE_2D ); @@ -63,39 +272,39 @@ void Renderer::RenderZoom() glEnable(GL_LINE_SMOOTH); glBegin(GL_LINES); glColor4f(0.0f, 0.0f, 0.0f, 1.0f); - for(i = 0; i < ZSIZE; i++) + for(i = 0; i < zoomScopeSize; i++) { - glVertex2f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR)+i*ZFACTOR)*sdl_scale); - glVertex2f(zoom_wx*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR)+i*ZFACTOR)*sdl_scale); - glVertex2f((zoom_wx+i*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale); - glVertex2f((zoom_wx+i*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale); + glVertex2f((zoomWindowPosition.X+zoomScopeSize*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoomWindowPosition.Y+zoomScopeSize*ZFACTOR)+i*ZFACTOR)*sdl_scale); + glVertex2f(zoomWindowPosition.X*sdl_scale, (YRES+MENUSIZE-(zoomWindowPosition.Y+zoomScopeSize*ZFACTOR)+i*ZFACTOR)*sdl_scale); + glVertex2f((zoomWindowPosition.X+i*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoomWindowPosition.Y+zoomScopeSize*ZFACTOR))*sdl_scale); + glVertex2f((zoomWindowPosition.X+i*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoomWindowPosition.Y)*sdl_scale); } glEnd(); glColor4f(1.0f, 1.0f, 1.0f, 1.0f); glBegin(GL_LINE_STRIP); - glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); - glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 0); - glVertex3i((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 0); - glVertex3i((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); - glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); + glVertex3i((zoomWindowPosition.X-1)*sdl_scale, (YRES+MENUSIZE-zoomWindowPosition.Y)*sdl_scale, 0); + glVertex3i((zoomWindowPosition.X-1)*sdl_scale, (YRES+MENUSIZE-(zoomWindowPosition.Y+zoomScopeSize*ZFACTOR))*sdl_scale, 0); + glVertex3i((zoomWindowPosition.X+zoomScopeSize*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoomWindowPosition.Y+zoomScopeSize*ZFACTOR))*sdl_scale, 0); + glVertex3i((zoomWindowPosition.X+zoomScopeSize*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoomWindowPosition.Y)*sdl_scale, 0); + glVertex3i((zoomWindowPosition.X-1)*sdl_scale, (YRES+MENUSIZE-zoomWindowPosition.Y)*sdl_scale, 0); glEnd(); glDisable(GL_LINE_SMOOTH); glDisable(GL_LINE_SMOOTH); - if(zoom_en) + if(zoomEnabled) { glEnable(GL_COLOR_LOGIC_OP); //glEnable(GL_LINE_SMOOTH); glLogicOp(GL_XOR); glColor4f(1.0f, 1.0f, 1.0f, 1.0f); glBegin(GL_LINE_STRIP); - glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); - glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y+ZSIZE))*sdl_scale, 0); - glVertex3i((zoom_x+ZSIZE)*sdl_scale, (YRES+MENUSIZE-(zoom_y+ZSIZE))*sdl_scale, 0); - glVertex3i((zoom_x+ZSIZE)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); - glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); + glVertex3i((zoomScopePosition.X-1)*sdl_scale, (YRES+MENUSIZE-(zoomScopePosition.Y-1))*sdl_scale, 0); + glVertex3i((zoomScopePosition.X-1)*sdl_scale, (YRES+MENUSIZE-(zoomScopePosition.Y+zoomScopeSize))*sdl_scale, 0); + glVertex3i((zoomScopePosition.X+zoomScopeSize)*sdl_scale, (YRES+MENUSIZE-(zoomScopePosition.Y+zoomScopeSize))*sdl_scale, 0); + glVertex3i((zoomScopePosition.X+zoomScopeSize)*sdl_scale, (YRES+MENUSIZE-(zoomScopePosition.Y-1))*sdl_scale, 0); + glVertex3i((zoomScopePosition.X-1)*sdl_scale, (YRES+MENUSIZE-(zoomScopePosition.Y-1))*sdl_scale, 0); glEnd(); glDisable(GL_COLOR_LOGIC_OP); } @@ -518,15 +727,16 @@ void Renderer::render_fire() } } +float temp[CELL*3][CELL*3]; +float fire_alphaf[CELL*3][CELL*3]; +float glow_alphaf[11][11]; +float blur_alphaf[7][7]; void Renderer::prepare_alpha(int size, float intensity) { //TODO: implement size int x,y,i,j,c; float multiplier = 255.0f*intensity; - float temp[CELL*3][CELL*3]; - float fire_alphaf[CELL*3][CELL*3]; - float glow_alphaf[11][11]; - float blur_alphaf[7][7]; + memset(temp, 0, sizeof(temp)); for (x=0; xvid[(x*CELL+i) + (y*CELL+j)*(XRES+BARSIZE)] = c; } #else + int sdl_scale = 1; GLuint airProg; if(display_mode & DISPLAY_AIRC) { @@ -1719,15 +1931,15 @@ void Renderer::draw_air() glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, airVX); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_RED, GL_FLOAT, vx); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_RED, GL_FLOAT, sim->air->vx); glUniform1i(glGetUniformLocation(airProg, "airX"), 0); glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, airVY); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_GREEN, GL_FLOAT, vy); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_GREEN, GL_FLOAT, sim->air->vy); glUniform1i(glGetUniformLocation(airProg, "airY"), 1); glActiveTexture(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, airPV); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_BLUE, GL_FLOAT, pv); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES/CELL, YRES/CELL, GL_BLUE, GL_FLOAT, sim->air->pv); glUniform1i(glGetUniformLocation(airProg, "airP"), 2); glActiveTexture(GL_TEXTURE0); @@ -1786,7 +1998,6 @@ Renderer::Renderer(Graphics * g, Simulation * sim): memset(fire_r, 0, sizeof(fire_r)); memset(fire_g, 0, sizeof(fire_g)); memset(fire_b, 0, sizeof(fire_b)); - prepare_alpha(CELL, 1.0f); //Set defauly display modes SetColourMode(COLOUR_DEFAULT); @@ -1807,6 +2018,138 @@ Renderer::Renderer(Graphics * g, Simulation * sim): flm_data = Graphics::GenerateGradient(fireColours, fireColoursPoints, fireColoursCount, 200); plasma_data = Graphics::GenerateGradient(plasmaColours, plasmaColoursPoints, plasmaColoursCount, 200); + +#ifdef OGLR + //FBO Texture + glEnable(GL_TEXTURE_2D); + glGenTextures(1, &partsFboTex); + glBindTexture(GL_TEXTURE_2D, partsFboTex); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, XRES, YRES, 0, GL_RGBA, GL_FLOAT, NULL); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + + //FBO + glGenFramebuffers(1, &partsFbo); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); + glEnable(GL_BLEND); + glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, partsFboTex, 0); + glBindTexture(GL_TEXTURE_2D, 0); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); // Reset framebuffer binding + glDisable(GL_TEXTURE_2D); + + //Texture for air to be drawn + glEnable(GL_TEXTURE_2D); + glGenTextures(1, &airBuf); + glBindTexture(GL_TEXTURE_2D, airBuf); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, XRES/CELL, YRES/CELL, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + + //Zoom texture + glEnable(GL_TEXTURE_2D); + glGenTextures(1, &zoomTex); + glBindTexture(GL_TEXTURE_2D, zoomTex); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + + //Texture for velocity maps for gravity + glEnable(GL_TEXTURE_2D); + glGenTextures(1, &partsTFX); + glBindTexture(GL_TEXTURE_2D, partsTFX); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, XRES, YRES, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + + glBindTexture(GL_TEXTURE_2D, 0); + glGenTextures(1, &partsTFY); + glBindTexture(GL_TEXTURE_2D, partsTFY); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, XRES, YRES, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + + //Texture for velocity maps for air + //TODO: Combine all air maps into 3D array or structs + glEnable(GL_TEXTURE_2D); + glGenTextures(1, &airVX); + glBindTexture(GL_TEXTURE_2D, airVX); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, XRES/CELL, YRES/CELL, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); + + glBindTexture(GL_TEXTURE_2D, 0); + glGenTextures(1, &airVY); + glBindTexture(GL_TEXTURE_2D, airVY); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, XRES/CELL, YRES/CELL, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); + + glBindTexture(GL_TEXTURE_2D, 0); + glGenTextures(1, &airPV); + glBindTexture(GL_TEXTURE_2D, airPV); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, XRES/CELL, YRES/CELL, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + + //Fire alpha texture + glEnable(GL_TEXTURE_2D); + glGenTextures(1, &fireAlpha); + glBindTexture(GL_TEXTURE_2D, fireAlpha); + glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, CELL*3, CELL*3, 0, GL_ALPHA, GL_FLOAT, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + + //Glow alpha texture + glEnable(GL_TEXTURE_2D); + glGenTextures(1, &glowAlpha); + glBindTexture(GL_TEXTURE_2D, glowAlpha); + glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, 11, 11, 0, GL_ALPHA, GL_FLOAT, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + + + //Blur Alpha texture + glEnable(GL_TEXTURE_2D); + glGenTextures(1, &blurAlpha); + glBindTexture(GL_TEXTURE_2D, blurAlpha); + glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, 7, 7, 0, GL_ALPHA, GL_FLOAT, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + + loadShaders(); +#endif + prepare_alpha(CELL, 1.0f); } void Renderer::CompileRenderMode() @@ -1913,3 +2256,4 @@ Renderer::~Renderer() free(flm_data); free(plasma_data); } + diff --git a/src/Renderer.h b/src/Renderer.h index 779be72..b69108a 100644 --- a/src/Renderer.h +++ b/src/Renderer.h @@ -2,6 +2,22 @@ #define RENDERER_H #include +#if defined(OGLR) +#ifdef MACOSX +#include +#include +#include +#elif defined(WIN32) +#include +#include +#include +#else +//#include +#include +#include +#endif +#endif + #include "Config.h" #include "client/Client.h" #include "simulation/Simulation.h" @@ -62,6 +78,16 @@ public: void draw_air(); void draw_grav(); void draw_other(); + void FinaliseParts(); + void clearScreen(float alpha); + + //class SolidsRenderer; + +#ifdef OGLR + void checkShader(GLuint shader, char * shname); + void checkProgram(GLuint program, char * progname); + void loadShaders(); +#endif //... void get_sign_pos(int i, int *x0, int *y0, int *w, int *h); @@ -82,6 +108,28 @@ public: Renderer(Graphics * g, Simulation * sim); ~Renderer(); + +private: +#ifdef OGLR + GLuint zoomTex, airBuf, fireAlpha, glowAlpha, blurAlpha, partsFboTex, partsFbo, partsTFX, partsTFY, airPV, airVY, airVX; + GLuint fireProg, airProg_Pressure, airProg_Velocity, airProg_Cracker, lensProg; + GLuint fireV[(YRES*XRES)*2]; + GLfloat fireC[(YRES*XRES)*4]; + GLuint smokeV[(YRES*XRES)*2]; + GLfloat smokeC[(YRES*XRES)*4]; + GLuint blobV[(YRES*XRES)*2]; + GLfloat blobC[(YRES*XRES)*4]; + GLuint blurV[(YRES*XRES)*2]; + GLfloat blurC[(YRES*XRES)*4]; + GLuint glowV[(YRES*XRES)*2]; + GLfloat glowC[(YRES*XRES)*4]; + GLuint flatV[(YRES*XRES)*2]; + GLfloat flatC[(YRES*XRES)*4]; + GLuint addV[(YRES*XRES)*2]; + GLfloat addC[(YRES*XRES)*4]; + GLfloat lineV[(((YRES*XRES)*2)*6)]; + GLfloat lineC[(((YRES*XRES)*2)*6)]; +#endif }; #endif diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 5a29d09..f832422 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -164,8 +164,8 @@ GameModel::~GameModel() delete clipboard; if(stamp) delete stamp; - if(activeTools) - delete activeTools; + //if(activeTools) + // delete[] activeTools; } void GameModel::SetVote(int direction) diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index ae93f90..219c6ee 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -853,11 +853,13 @@ void GameView::OnDraw() Graphics * g = ui::Engine::Ref().g; if(ren) { + ren->clearScreen(1.0f); ren->draw_air(); ren->render_parts(); ren->render_fire(); - ren->draw_grav(); + //ren->draw_grav(); ren->DrawWalls(); + ren->FinaliseParts(); if(activeBrush && currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) { if(drawMode==DrawRect && isMouseDown) diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 6ac5502..751cbcb 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -166,6 +166,7 @@ void Engine::Draw() { if(lastBuffer && !(state_->Position.X == 0 && state_->Position.Y == 0 && state_->Size.X == width_ && state_->Size.Y == height_)) { + g->Clear(); memcpy(g->vid, lastBuffer, (width_ * height_) * PIXELSIZE); } else diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index e2f9880..eabdcfd 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3574,6 +3574,7 @@ Simulation::Simulation(): portal_rx({-1, 0, 1, 1, 1, 0,-1,-1}), portal_ry({-1,-1,-1, 0, 1, 1, 1, 0}) { + //Create and attach gravity simulation grav = new Gravity(); //Give air sim references to our data -- cgit v0.9.2-21-gd62e From 96506610b276be1b4bc1cbc462d991237750fc62 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 21 Apr 2012 22:46:37 +0100 Subject: Clean out graphics, add openGL graphics in seperate file, change brush to use unsigned char rather than boolean for bitmap/outline diff --git a/src/Graphics.cpp b/src/Graphics.cpp index e03a699..665da67 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -3,56 +3,134 @@ #include #include #include "Config.h" -//#include "simulation/Air.h" -//#include "simulation/Gravity.h" -//#include "powder.h" -//#define INCLUDE_PSTRUCT -//#include "Simulation.h" -//#include "Graphics.h" -//#include "ElementGraphics.h" +#include "Misc.h" +#include "Graphics.h" #define INCLUDE_FONTDATA #include "font.h" -#include "Misc.h" -#include "hmap.h" -//unsigned cmode = CM_FIRE; -unsigned int *render_modes; -unsigned int render_mode; -unsigned int colour_mode; -unsigned int *display_modes; -unsigned int display_mode; - -//SDL_Surface *sdl_scrn; -int sdl_scale = 1; +TPT_INLINE void VideoBuffer::BlendPixel(int x, int y, int r, int g, int b, int a) +{ +#ifdef PIX32OGL + pixel t; + if (x<0 || y<0 || x>=Width || y>=Height) + return; + if (a!=255) + { + t = Buffer[y*(Width)+x]; + r = (a*r + (255-a)*PIXR(t)) >> 8; + g = (a*g + (255-a)*PIXG(t)) >> 8; + b = (a*b + (255-a)*PIXB(t)) >> 8; + a = a > PIXA(t) ? a : PIXA(t); + } + Buffer[y*(Width)+x] = PIXRGBA(r,g,b,a); +#else + pixel t; + if (x<0 || y<0 || x>=Width || y>=Height) + return; + if (a!=255) + { + t = Buffer[y*(Width)+x]; + r = (a*r + (255-a)*PIXR(t)) >> 8; + g = (a*g + (255-a)*PIXG(t)) >> 8; + b = (a*b + (255-a)*PIXB(t)) >> 8; + } + Buffer[y*(Width)+x] = PIXRGB(r,g,b); +#endif +} -/*#ifdef OGLR -GLuint zoomTex, vidBuf, airBuf, fireAlpha, glowAlpha, blurAlpha, partsFboTex, partsFbo, partsTFX, partsTFY, airPV, airVY, airVX; -GLuint fireProg, airProg_Pressure, airProg_Velocity, airProg_Cracker, lensProg; -#endif*/ +TPT_INLINE void VideoBuffer::SetPixel(int x, int y, int r, int g, int b, int a) +{ + if (x<0 || y<0 || x>=Width || y>=Height) + return; +#ifdef PIX32OGL + Buffer[y*(Width)+x] = PIXRGBA(r,g,b,a); +#else + Buffer[y*(Width)+x] = PIXRGB(r,g,b); +#endif +} -/* -int emp_decor = 0; -int sandcolour_r = 0; -int sandcolour_g = 0; -int sandcolour_b = 0; -int sandcolour_frame = 0; +TPT_INLINE void VideoBuffer::AddPixel(int x, int y, int r, int g, int b, int a) +{ + pixel t; + if (x<0 || y<0 || x>=Width || y>=Height) + return; + t = Buffer[y*(Width)+x]; + r = (a*r + 255*PIXR(t)) >> 8; + g = (a*g + 255*PIXG(t)) >> 8; + b = (a*b + 255*PIXB(t)) >> 8; + if (r>255) + r = 255; + if (g>255) + g = 255; + if (b>255) + b = 255; + Buffer[y*(Width)+x] = PIXRGB(r,g,b); +} -unsigned char fire_r[YRES/CELL][XRES/CELL]; -unsigned char fire_g[YRES/CELL][XRES/CELL]; -unsigned char fire_b[YRES/CELL][XRES/CELL]; +TPT_INLINE int VideoBuffer::SetCharacter(int x, int y, int c, int r, int g, int b, int a) +{ + int i, j, w, bn = 0, ba = 0; + char *rp = font_data + font_ptrs[c]; + w = *(rp++); + for (j=0; j>= 2; + bn -= 2; + } + return x + w; +} -unsigned int fire_alpha[CELL*3][CELL*3]; -pixel *pers_bg; +TPT_INLINE int VideoBuffer::BlendCharacter(int x, int y, int c, int r, int g, int b, int a) +{ + int i, j, w, bn = 0, ba = 0; + char *rp = font_data + font_ptrs[c]; + w = *(rp++); + for (j=0; j>= 2; + bn -= 2; + } + return x + w; +} -char * flm_data; -int flm_data_points = 4; -pixel flm_data_colours[] = {PIXPACK(0xAF9F0F), PIXPACK(0xDFBF6F), PIXPACK(0x60300F), PIXPACK(0x000000)}; -float flm_data_pos[] = {1.0f, 0.9f, 0.5f, 0.0f}; +TPT_INLINE int VideoBuffer::AddCharacter(int x, int y, int c, int r, int g, int b, int a) +{ + int i, j, w, bn = 0, ba = 0; + char *rp = font_data + font_ptrs[c]; + w = *(rp++); + for (j=0; j>= 2; + bn -= 2; + } + return x + w; +} -char * plasma_data; -int plasma_data_points = 5; -pixel plasma_data_colours[] = {PIXPACK(0xAFFFFF), PIXPACK(0xAFFFFF), PIXPACK(0x301060), PIXPACK(0x301040), PIXPACK(0x000000)}; -float plasma_data_pos[] = {1.0f, 0.9f, 0.5f, 0.25, 0.0f};*/ +/** + * Common graphics functions, mostly static methods that provide + * encoding/decoding of different formats and font metrics + */ char * Graphics::GenerateGradient(pixel * colours, float * points, int pointcount, int size) { @@ -227,7 +305,6 @@ pixel *Graphics::resample_img(pixel *src, int sw, int sh, int rw, int rh) int y, x, fxceil, fyceil; //int i,j,x,y,w,h,r,g,b,c; pixel *q = NULL; - //TODO: Actual resampling, this is just cheap nearest pixel crap if(rw == sw && rh == sh){ //Don't resample q = (pixel *)malloc(rw*rh*PIXELSIZE); @@ -346,2030 +423,265 @@ pixel *Graphics::rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f return q; } -#ifdef OGLR -void clearScreenNP(float alpha) -{ - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); -} -#endif - -//an easy way to draw a blob -void Graphics::drawblob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb) +int Graphics::textwidth(const char *s) { - blendpixel(x+1, y, cr, cg, cb, 112); - blendpixel(x-1, y, cr, cg, cb, 112); - blendpixel(x, y+1, cr, cg, cb, 112); - blendpixel(x, y-1, cr, cg, cb, 112); - - blendpixel(x+1, y-1, cr, cg, cb, 64); - blendpixel(x-1, y-1, cr, cg, cb, 64); - blendpixel(x+1, y+1, cr, cg, cb, 64); - blendpixel(x-1, y+1, cr, cg, cb, 64); + int x = 0; + for (; *s; s++) + x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + return x-1; } -//draws walls and elements for menu -/*int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc) +int Graphics::textnwidth(char *s, int n) { - int i, j, c; - pixel gc; - if (x > XRES-26 || x < 0) - return 26; - if ((b&0xFF) == PT_LIFE) + int x = 0; + for (; *s; s++) { - for (j=1; j<15; j++) + if (!n) + break; + if(((char)*s)=='\b') { - for (i=1; i<27; i++) - { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; - } + s++; + continue; } - c = PIXB(pc) + 3*PIXG(pc) + 2*PIXR(pc); - if (c<544) + x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + n--; + } + return x-1; +} +void Graphics::textnpos(char *s, int n, int w, int *cx, int *cy) +{ + int x = 0; + int y = 0; + int wordlen, charspace; + while (*s&&n) + { + wordlen = strcspn(s," .,!?\n"); + charspace = textwidthx(s, w-x); + if (charspace=-1; s++) { - c = 0; + if (!n) { + break; + } + x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + if (x>=w) + { + x = 0; + y += FONT_H+2; + } + n--; } - drawtext(vid_buf, x+14-textwidth((char *)gmenu[(b>>8)&0xFF].name)/2, y+4, (char *)gmenu[(b>>8)&0xFF].name, c, c, c, 255); } - else if (b>=UI_WALLSTART) + *cx = x-1; + *cy = y; +} + +int Graphics::textwidthx(char *s, int w) +{ + int x=0,n=0,cw; + for (; *s; s++) { - int ds = 0; - if (b-UI_WALLSTART>=0 && b-UI_WALLSTART>1)); i<27; i+=2) - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + s++; + continue; } - else if (ds==2) + cw = font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + if (x+(cw/2) >= w) + break; + x += cw; + n++; + } + return n; +} +int Graphics::textposxy(char *s, int width, int w, int h) +{ + int x=0,y=0,n=0,cw, wordlen, charspace; + while (*s) + { + wordlen = strcspn(s," .,!?\n"); + charspace = textwidthx(s, width-x); + if (charspace=-1; s++) { - for (j=1; j<15; j++) - for (i=1; i<27; i++) - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + cw = font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + if ((x+(cw/2) >= w && y+6 >= h)||(y+6 >= h+FONT_H+2)) + return n++; + x += cw; + if (x>=width) { + x = 0; + y += FONT_H+2; + } + n++; } - else if (ds==4) + } + return n; +} +int Graphics::textwrapheight(char *s, int width) +{ + int x=0, height=FONT_H+2, cw; + int wordlen; + int charspace; + while (*s) + { + wordlen = strcspn(s," .,!?\n"); + charspace = textwidthx(s, width-x); + if (charspace=-1; s++) { - case WL_WALLELEC+100: - for (j=1; j<15; j++) - { - for (i=1; i<27; i++) - { - if (!(i%2) && !(j%2)) - { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; - } - else - { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = PIXPACK(0x808080); - } - } - } - break; - case WL_EWALL+100: - for (j=1; j<15; j++) - { - for (i=1; i<6+j; i++) - { - if (!(i&j&1)) - { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; - } - } - for (; i<27; i++) - { - if (i&j&1) - { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; - } - } - } - break; - case WL_STREAM+100: - for (j=1; j<15; j++) - { - for (i=1; i<27; i++) - { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = i==1||i==26||j==1||j==14 ? PIXPACK(0xA0A0A0) : PIXPACK(0x000000); - drawtext(vid_buf, x+4, y+3, "\x8D", 255, 255, 255, 255); - } - } - for (i=9; i<27; i++) - { - drawpixel(vid_buf, x+i, y+8+(int)(3.9f*cos(i*0.3f)), 255, 255, 255, 255); - } - break; - case WL_SIGN+100: - for (j=1; j<15; j++) + if (*s == '\n') { - for (i=1; i<27; i++) - { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = i==1||i==26||j==1||j==14 ? PIXPACK(0xA0A0A0) : PIXPACK(0x000000); - } + x = 0; + height += FONT_H+2; } - drawtext(vid_buf, x+9, y+3, "\xA1", 32, 64, 128, 255); - drawtext(vid_buf, x+9, y+3, "\xA0", 255, 255, 255, 255); - break; - case WL_ERASE+100: - for (j=1; j<15; j+=2) + else if (*s == '\b') { - for (i=1+(1&(j>>1)); i<13; i+=2) - { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; - } + s++; } - for (j=1; j<15; j++) + else { - for (i=14; i<27; i++) + cw = font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + if (x+cw>=width) { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; + x = 0; + height += FONT_H+2; } - } - break; - case SPC_AIR: - case SPC_HEAT: - case SPC_COOL: - case SPC_VACUUM: - case SPC_WIND: - case SPC_PGRV: - case SPC_NGRV: - case SPC_PROP: - for (j=1; j<15; j++) - for (i=1; i<27; i++) - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; - c = PIXR(pc) + 3*PIXG(pc) + 2*PIXB(pc); - if (c<544) - { - c = 255; - } - else - { - c = 0; - } - if (b==SPC_AIR) - drawtext(vid_buf, x+14-textwidth("AIR")/2, y+4, "AIR", c, c, c, 255); - else if (b==SPC_HEAT) - drawtext(vid_buf, x+14-textwidth("HEAT")/2, y+4, "HEAT", c, c, c, 255); - else if (b==SPC_COOL) - drawtext(vid_buf, x+14-textwidth("COOL")/2, y+4, "COOL", c, c, c, 255); - else if (b==SPC_VACUUM) - drawtext(vid_buf, x+14-textwidth("VAC")/2, y+4, "VAC", c, c, c, 255); - else if (b==SPC_WIND) - drawtext(vid_buf, x+14-textwidth("WIND")/2, y+4, "WIND", c, c, c, 255); - else if (b==SPC_PGRV) - drawtext(vid_buf, x+14-textwidth("PGRV")/2, y+4, "PGRV", c, c, c, 255); - else if (b==SPC_NGRV) - drawtext(vid_buf, x+14-textwidth("NGRV")/2, y+4, "NGRV", c, c, c, 255); - else if (b==SPC_PROP) - drawtext(vid_buf, x+14-textwidth("PROP")/2, y+4, "PROP", c, c, c, 255); - break; - default: - for (j=1; j<15; j++) - for (i=1; i<27; i++) - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; - } - if (b==WL_ERASE+100) - { - for (j=4; j<12; j++) - { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+j+6)] = PIXPACK(0xFF0000); - vid_buf[(XRES+BARSIZE)*(y+j)+(x+j+7)] = PIXPACK(0xFF0000); - vid_buf[(XRES+BARSIZE)*(y+j)+(x-j+21)] = PIXPACK(0xFF0000); - vid_buf[(XRES+BARSIZE)*(y+j)+(x-j+22)] = PIXPACK(0xFF0000); + x += cw; } } } - else + return height; +} + +void Graphics::textsize(const char * s, int & width, int & height) +{ + if(!strlen(s)) { - //x = 2+32*(b/2); - //y = YRES+2+20*(b%2); - for (j=1; j<15; j++) - { - for (i=1; i<27; i++) - { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+i)] = pc; - } - } - if (b==0) - { - for (j=4; j<12; j++) - { - vid_buf[(XRES+BARSIZE)*(y+j)+(x+j+6)] = PIXPACK(0xFF0000); - vid_buf[(XRES+BARSIZE)*(y+j)+(x+j+7)] = PIXPACK(0xFF0000); - vid_buf[(XRES+BARSIZE)*(y+j)+(x-j+21)] = PIXPACK(0xFF0000); - vid_buf[(XRES+BARSIZE)*(y+j)+(x-j+22)] = PIXPACK(0xFF0000); - } - } - c = PIXB(ptypes[b].pcolors) + 3*PIXG(ptypes[b].pcolors) + 2*PIXR(ptypes[b].pcolors); - if (c<544) - { - c = 255; - } - else - { - c = 0; - } - drawtext(vid_buf, x+14-textwidth((char *)ptypes[b].name)/2, y+4, (char *)ptypes[b].name, c, c, c, 255); - } - return 26; -}*/ - -/*void draw_menu(pixel *vid_buf, int i, int hover) -{ - if (i==SEC&&SEC!=0) - drawrect(vid_buf, (XRES+BARSIZE)-16, (i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16), 14, 14, 0, 255, 255, 255); - else - drawrect(vid_buf, (XRES+BARSIZE)-16, (i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16), 14, 14, 255, 255, 255, 255); - if (hover==i) - { - fillrect(vid_buf, (XRES+BARSIZE)-16, (i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16), 14, 14, 255, 255, 255, 255); - drawtext(vid_buf, (XRES+BARSIZE)-13, (i*16)+YRES+MENUSIZE-14-(SC_TOTAL*16), msections[i].icon, 0, 0, 0, 255); - } - else - { - drawtext(vid_buf, (XRES+BARSIZE)-13, (i*16)+YRES+MENUSIZE-14-(SC_TOTAL*16), msections[i].icon, 255, 255, 255, 255); - } -}*/ - -/*void draw_color_menu(pixel *vid_buf, int i, int hover) -{ - drawrect(vid_buf, (XRES+BARSIZE)-16, (i*16)+YRES+MENUSIZE-16-(DECO_SECTIONS*16), 14, 14, 255, 255, 255, 255); - if (hover==i) - { - fillrect(vid_buf, (XRES+BARSIZE)-16, (i*16)+YRES+MENUSIZE-16-(DECO_SECTIONS*16), 14, 14, 255, 255, 255, 255); - drawtext(vid_buf, (XRES+BARSIZE)-13, (i*16)+YRES+MENUSIZE-14-(DECO_SECTIONS*16), colorsections[i].icon, 0, 0, 0, 255); - } - else - { - drawtext(vid_buf, (XRES+BARSIZE)-13, (i*16)+YRES+MENUSIZE-14-(DECO_SECTIONS*16), colorsections[i].icon, 255, 255, 255, 255); - } -}*/ - -//draws a pixel, identical to blendpixel(), except blendpixel has OpenGL support -TPT_INLINE void Graphics::drawpixel(int x, int y, int r, int g, int b, int a) -{ -#ifdef PIXALPHA - pixel t; - if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) - return; - if (a!=255) - { - t = vid[y*(XRES+BARSIZE)+x]; - r = (a*r + (255-a)*PIXR(t)) >> 8; - g = (a*g + (255-a)*PIXG(t)) >> 8; - b = (a*b + (255-a)*PIXB(t)) >> 8; - a = a > PIXA(t) ? a : PIXA(t); - } - vid[y*(XRES+BARSIZE)+x] = PIXRGBA(r,g,b,a); -#else - pixel t; - if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) + width = 0; + height = 0; return; - if (a!=255) - { - t = vid[y*(XRES+BARSIZE)+x]; - r = (a*r + (255-a)*PIXR(t)) >> 8; - g = (a*g + (255-a)*PIXG(t)) >> 8; - b = (a*b + (255-a)*PIXB(t)) >> 8; } - vid[y*(XRES+BARSIZE)+x] = PIXRGB(r,g,b); -#endif -} - -inline int Graphics::drawchar(int x, int y, int c, int r, int g, int b, int a) -{ - int i, j, w, bn = 0, ba = 0; - char *rp = font_data + font_ptrs[c]; - w = *(rp++); - for (j=0; j>= 2; - bn -= 2; - } - return x + w; -} -inline int Graphics::addchar(int x, int y, int c, int r, int g, int b, int a) -{ - int i, j, w, bn = 0, ba = 0; - char *rp = font_data + font_ptrs[c]; - w = *(rp++); - for (j=0; j>= 2; - bn -= 2; - } - return x + w; -} - -int Graphics::drawtext(int x, int y, std::string &s, int r, int g, int b, int a) -{ - return drawtext(x, y, s.c_str(), r, g, b, a); -} - -int Graphics::drawtext(int x, int y, const char *s, int r, int g, int b, int a) -{ - int sx = x; + int cHeight = FONT_H+2, cWidth = 0, lWidth = 0; for (; *s; s++) { if (*s == '\n') { - x = sx; - y += FONT_H+2; + cWidth = 0; + cHeight += FONT_H+2; } else if (*s == '\b') { - switch (s[1]) - { - case 'w': - r = g = b = 255; - break; - case 'g': - r = g = b = 192; - break; - case 'o': - r = 255; - g = 216; - b = 32; - break; - case 'r': - r = 255; - g = b = 0; - break; - case 'l': - r = 255; - g = b = 75; - break; - case 'b': - r = g = 0; - b = 255; - break; - case 't': - b = 255; - g = 170; - r = 32; - break; - } s++; } else - x = drawchar(x, y, *(unsigned char *)s, r, g, b, a); - } - return x; -} - -//Draw text with an outline -int Graphics::drawtext_outline(int x, int y, const char *s, int r, int g, int b, int a, int olr, int olg, int olb, int ola) -{ - drawtext(x-1, y-1, s, olr, olg, olb, ola); - drawtext(x+1, y+1, s, olr, olg, olb, ola); - - drawtext(x-1, y+1, s, olr, olg, olb, ola); - drawtext(x+1, y-1, s, olr, olg, olb, ola); - - return drawtext(x, y, s, r, g, b, a); -} -int Graphics::drawtextwrap(int x, int y, int w, const char *s, int r, int g, int b, int a) -{ - int sx = x; - int rh = 12; - int rw = 0; - int cw = x; - int wordlen; - int charspace; - while (*s) - { - wordlen = strcspn(s," .,!?\n"); - charspace = textwidthx((char *)s, w-(x-cw)); - if (charspace=-1; s++) { - if (*s == '\n') - { - x = sx; - rw = 0; - y += FONT_H+2; - } - else if (*s == '\b') - { - switch (s[1]) - { - case 'w': - r = g = b = 255; - break; - case 'g': - r = g = b = 192; - break; - case 'o': - r = 255; - g = 216; - b = 32; - break; - case 'r': - r = 255; - g = b = 0; - break; - case 'l': - r = 255; - g = b = 75; - break; - case 'b': - r = g = 0; - b = 255; - break; - case 't': - b = 255; - g = 170; - r = 32; - break; - } - s++; - } - else - { - - if (x-cw>=w) - { - x = sx; - rw = 0; - y+=FONT_H+2; - rh+=FONT_H+2; - } - x = drawchar(x, y, *(unsigned char *)s, r, g, b, a); - } + cWidth += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; + if(cWidth>lWidth) + lWidth = cWidth; } } - - return rh; + width = lWidth; + height = cHeight; } -//draws a rectange, (x,y) are the top left coords. -void Graphics::drawrect(int x, int y, int w, int h, int r, int g, int b, int a) +void Graphics::draw_icon(int x, int y, Icon icon) { - int i; - for (i=0; i<=w; i++) - { - drawpixel(x+i, y, r, g, b, a); - drawpixel(x+i, y+h, r, g, b, a); - } - for (i=1; i=w && x+textwidth(s)>=w+5) - break; - x = drawchar(x, y, *(unsigned char *)s, r, g, b, a); + free(tmp); + return NULL; } - if (*s) - for (i=0; i<3; i++) - x = drawchar(x, y, '.', r, g, b, a); - return x; -} -int Graphics::textnwidth(char *s, int n) -{ - int x = 0; - for (; *s; s++) + i = width*height*3; + if (BZ2_bzBuffToBuffDecompress((char *)tmp, (unsigned *)&i, (char *)image, cmp_size, 0, 0)) { - if (!n) - break; - if(((char)*s)=='\b') - { - s++; - continue; - } - x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; - n--; - } - return x-1; -} -void Graphics::textnpos(char *s, int n, int w, int *cx, int *cy) -{ - int x = 0; - int y = 0; - int wordlen, charspace; - while (*s&&n) - { - wordlen = strcspn(s," .,!?\n"); - charspace = textwidthx(s, w-x); - if (charspace=-1; s++) - { - if (!n) { - break; - } - x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; - if (x>=w) - { - x = 0; - y += FONT_H+2; - } - n--; - } - } - *cx = x-1; - *cy = y; -} - -int Graphics::textwidthx(char *s, int w) -{ - int x=0,n=0,cw; - for (; *s; s++) - { - if((char)*s == '\b') - { - s++; - continue; - } - cw = font_data[font_ptrs[(int)(*(unsigned char *)s)]]; - if (x+(cw/2) >= w) - break; - x += cw; - n++; - } - return n; -} -int Graphics::textposxy(char *s, int width, int w, int h) -{ - int x=0,y=0,n=0,cw, wordlen, charspace; - while (*s) - { - wordlen = strcspn(s," .,!?\n"); - charspace = textwidthx(s, width-x); - if (charspace=-1; s++) - { - cw = font_data[font_ptrs[(int)(*(unsigned char *)s)]]; - if ((x+(cw/2) >= w && y+6 >= h)||(y+6 >= h+FONT_H+2)) - return n++; - x += cw; - if (x>=width) { - x = 0; - y += FONT_H+2; - } - n++; - } - } - return n; -} -int Graphics::textwrapheight(char *s, int width) -{ - int x=0, height=FONT_H+2, cw; - int wordlen; - int charspace; - while (*s) - { - wordlen = strcspn(s," .,!?\n"); - charspace = textwidthx(s, width-x); - if (charspace=-1; s++) - { - if (*s == '\n') - { - x = 0; - height += FONT_H+2; - } - else if (*s == '\b') - { - s++; - } - else - { - cw = font_data[font_ptrs[(int)(*(unsigned char *)s)]]; - if (x+cw>=width) - { - x = 0; - height += FONT_H+2; - } - x += cw; - } - } - } - return height; -} - -//the most used function for drawing a pixel, because it has OpenGL support, which is not fully implemented. -TPT_INLINE void Graphics::blendpixel(int x, int y, int r, int g, int b, int a) -{ -#ifdef PIXALPHA - pixel t; - if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) - return; - if (a!=255) - { - t = vid[y*(XRES+BARSIZE)+x]; - r = (a*r + (255-a)*PIXR(t)) >> 8; - g = (a*g + (255-a)*PIXG(t)) >> 8; - b = (a*b + (255-a)*PIXB(t)) >> 8; - a = a > PIXA(t) ? a : PIXA(t); - } - vid[y*(XRES+BARSIZE)+x] = PIXRGBA(r,g,b,a); -#else - pixel t; - if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) - return; - if (a!=255) - { - t = vid[y*(XRES+BARSIZE)+x]; - r = (a*r + (255-a)*PIXR(t)) >> 8; - g = (a*g + (255-a)*PIXG(t)) >> 8; - b = (a*b + (255-a)*PIXB(t)) >> 8; - } - vid[y*(XRES+BARSIZE)+x] = PIXRGB(r,g,b); -#endif -} - -void Graphics::draw_icon(int x, int y, Icon icon) -{ - switch(icon) - { - case IconOpen: - drawchar(x, y, 0x81, 255, 255, 255, 255); - break; - case IconReload: - drawchar(x, y, 0x91, 255, 255, 255, 255); - break; - case IconSave: - drawchar(x, y, 0x82, 255, 255, 255, 255); - break; - case IconVoteUp: - drawchar(x, y, 0xCB, 0, 187, 18, 255); - break; - case IconVoteDown: - drawchar(x, y, 0xCA, 187, 40, 0, 255); - break; - case IconTag: - drawchar(x, y, 0x83, 255, 255, 255, 255); - break; - case IconNew: - drawchar(x, y, 0x92, 255, 255, 255, 255); - break; - case IconLogin: - drawchar(x, y, 0x84, 255, 255, 255, 255); - break; - case IconSimulationSettings: - drawchar(x, y, 0xCF, 255, 255, 255, 255); - break; - case IconRenderSettings: - addchar(x, y, 0xD8, 255, 0, 0, 255); - addchar(x, y, 0xD9, 0, 255, 0, 255); - addchar(x, y, 0xDA, 0, 0, 255, 255); - break; - case IconPause: - drawchar(x, y, 0x90, 255, 255, 255, 255); - break; - case IconReport: - drawchar(x, y, 0xE3, 255, 255, 0, 255); - break; - case IconFavourite: - drawchar(x, y, 0xCC, 192, 160, 64, 255); - break; - case IconVoteSort: - case IconDateSort: - case IconFolder: - case IconSearch: - case IconDelete: - default: - drawchar(x, y, 't', 255, 255, 255, 255); - break; - } -} - -void Graphics::draw_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a) //Draws a line -{ - int dx, dy, i, sx, sy, check, e, x, y; - - dx = abs(x1-x2); - dy = abs(y1-y2); - sx = isign(x2-x1); - sy = isign(y2-y1); - x = x1; - y = y1; - check = 0; - - if (dy>dx) - { - dx = dx+dy; - dy = dx-dy; - dx = dx-dy; - check = 1; - } - - e = (dy<<2)-dx; - for (i=0; i<=dx; i++) - { - if (x>=0 && y>=0 && x=0) - { - if (check==1) - x = x+sx; - else - y = y+sy; - e = e-(dx<<2); - } - if (check==1) - y = y+sy; - else - x = x+sx; - e = e+(dy<<2); - } -} - -//adds color to a pixel, does not overwrite. -void Graphics::addpixel(int x, int y, int r, int g, int b, int a) -{ - pixel t; - if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) - return; - t = vid[y*(XRES+BARSIZE)+x]; - r = (a*r + 255*PIXR(t)) >> 8; - g = (a*g + 255*PIXG(t)) >> 8; - b = (a*b + 255*PIXB(t)) >> 8; - if (r>255) - r = 255; - if (g>255) - g = 255; - if (b>255) - b = 255; - vid[y*(XRES+BARSIZE)+x] = PIXRGB(r,g,b); -} - -//draws one of two colors, so that it is always clearly visible -void Graphics::xor_pixel(int x, int y) -{ - int c; - if (x<0 || y<0 || x>=XRES || y>=YRES) - return; - c = vid[y*(XRES+BARSIZE)+x]; - c = PIXB(c) + 3*PIXG(c) + 2*PIXR(c); - if (c<512) - vid[y*(XRES+BARSIZE)+x] = PIXPACK(0xC0C0C0); - else - vid[y*(XRES+BARSIZE)+x] = PIXPACK(0x404040); -} - -//same as xor_pixel, but draws a line of it -void Graphics::xor_line(int x1, int y1, int x2, int y2) -{ - int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; - float e, de; - if (cp) - { - y = x1; - x1 = y1; - y1 = y; - y = x2; - x2 = y2; - y2 = y; - } - if (x1 > x2) - { - y = x1; - x1 = x2; - x2 = y; - y = y1; - y1 = y2; - y2 = y; - } - dx = x2 - x1; - dy = abs(y2 - y1); - e = 0.0f; - if (dx) - de = dy/(float)dx; - else - de = 0.0f; - y = y1; - sy = (y1= 0.5f) - { - y += sy; - e -= 1.0f; - } - } -} - -//same as blend_pixel, but draws a line of it -void Graphics::blend_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a) -{ - int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; - float e, de; - if (cp) - { - y = x1; - x1 = y1; - y1 = y; - y = x2; - x2 = y2; - y2 = y; - } - if (x1 > x2) - { - y = x1; - x1 = x2; - x2 = y; - y = y1; - y1 = y2; - y2 = y; - } - dx = x2 - x1; - dy = abs(y2 - y1); - e = 0.0f; - if (dx) - de = dy/(float)dx; - else - de = 0.0f; - y = y1; - sy = (y1= 0.5f) - { - y += sy; - e -= 1.0f; - } - } -} - -//same as xor_pixel, but draws a rectangle -void Graphics::xor_rect(int x, int y, int w, int h) -{ - int i; - for (i=0; i>i)&1) - { - // Need a spread of wavelengths to get a smooth spectrum, 5 bits seems to work reasonably well - if (i>2) tmp = 0x1F << (i-2); - else tmp = 0x1F >> (2-i); - cg = 0; - cb = 0; - cr = 0; - for (j=0; j<12; j++) { - cr += (tmp >> (j+18)) & 1; - cb += (tmp >> j) & 1; - } - for (j=0; j<13; j++) - cg += (tmp >> (j+9)) & 1; - tmp = 624/(cr+cg+cb+1); - cr *= tmp; - cg *= tmp; - cb *= tmp; - for (j=0; j255?255:cr,cg>255?255:cg,cb>255?255:cb,255); - } - } -} - -pixel *Graphics::render_packed_rgb(void *image, int width, int height, int cmp_size) -{ - unsigned char *tmp; - pixel *res; - int i; - - tmp = (unsigned char *)malloc(width*height*3); - if (!tmp) - return NULL; - res = (pixel *)malloc(width*height*PIXELSIZE); - if (!res) - { - free(tmp); - return NULL; - } - - i = width*height*3; - if (BZ2_bzBuffToBuffDecompress((char *)tmp, (unsigned *)&i, (char *)image, cmp_size, 0, 0)) - { - free(res); - free(tmp); - return NULL; - } - - for (i=0; i YRES+MENUSIZE) h = (YRES+MENUSIZE)-y; //Adjust height to prevent drawing off the bottom - if(a >= 255) - for (j=0; j0) - r--; - if (g>0) - g--; - if (b>0) - b--; - dst[i] = PIXRGB(r,g,b); - } -} - -void Graphics::dim_copy_pers(pixel *dst, pixel *src) //for persistent view, reduces rgb slowly -{ - int i,r,g,b; - for (i=0; i<(XRES+BARSIZE)*YRES; i++) - { - r = PIXR(src[i]); - g = PIXG(src[i]); - b = PIXB(src[i]); - if (r>0) - r--; - if (g>0) - g--; - if (b>0) - b--; - dst[i] = PIXRGB(r,g,b); - } -} - -/*void render_zoom(pixel *img) //draws the zoom box -{ -#ifdef OGLR - int origBlendSrc, origBlendDst; - float zcx1, zcx0, zcy1, zcy0, yfactor, xfactor, i; //X-Factor is shit, btw - xfactor = 1.0f/(float)XRES; - yfactor = 1.0f/(float)YRES; - - zcx0 = (zoom_x)*xfactor; - zcx1 = (zoom_x+ZSIZE)*xfactor; - zcy0 = (zoom_y)*yfactor; - zcy1 = ((zoom_y+ZSIZE))*yfactor; - - glGetIntegerv(GL_BLEND_SRC, &origBlendSrc); - glGetIntegerv(GL_BLEND_DST, &origBlendDst); - glBlendFunc(GL_ONE, GL_ZERO); - - glEnable( GL_TEXTURE_2D ); - //glReadBuffer(GL_AUX0); - glBindTexture(GL_TEXTURE_2D, partsFboTex); - - glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - glBegin(GL_QUADS); - glTexCoord2d(zcx1, zcy1); - glVertex3f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 1.0); - glTexCoord2d(zcx0, zcy1); - glVertex3f(zoom_wx*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 1.0); - glTexCoord2d(zcx0, zcy0); - glVertex3f(zoom_wx*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 1.0); - glTexCoord2d(zcx1, zcy0); - glVertex3f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 1.0); - glEnd(); - glBindTexture(GL_TEXTURE_2D, 0); - glDisable( GL_TEXTURE_2D ); - - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - glLineWidth(sdl_scale); - glEnable(GL_LINE_SMOOTH); - glBegin(GL_LINES); - glColor4f(0.0f, 0.0f, 0.0f, 1.0f); - for(i = 0; i < ZSIZE; i++) - { - glVertex2f((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR)+i*ZFACTOR)*sdl_scale); - glVertex2f(zoom_wx*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR)+i*ZFACTOR)*sdl_scale); - glVertex2f((zoom_wx+i*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale); - glVertex2f((zoom_wx+i*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale); - } - glEnd(); - - glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - glBegin(GL_LINE_STRIP); - glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); - glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 0); - glVertex3i((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-(zoom_wy+ZSIZE*ZFACTOR))*sdl_scale, 0); - glVertex3i((zoom_wx+ZSIZE*ZFACTOR)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); - glVertex3i((zoom_wx-1)*sdl_scale, (YRES+MENUSIZE-zoom_wy)*sdl_scale, 0); - glEnd(); - glDisable(GL_LINE_SMOOTH); - - glDisable(GL_LINE_SMOOTH); - - if(zoom_en) - { - glEnable(GL_COLOR_LOGIC_OP); - //glEnable(GL_LINE_SMOOTH); - glLogicOp(GL_XOR); - glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - glBegin(GL_LINE_STRIP); - glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); - glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y+ZSIZE))*sdl_scale, 0); - glVertex3i((zoom_x+ZSIZE)*sdl_scale, (YRES+MENUSIZE-(zoom_y+ZSIZE))*sdl_scale, 0); - glVertex3i((zoom_x+ZSIZE)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); - glVertex3i((zoom_x-1)*sdl_scale, (YRES+MENUSIZE-(zoom_y-1))*sdl_scale, 0); - glEnd(); - glDisable(GL_COLOR_LOGIC_OP); - } - glLineWidth(1); - glBlendFunc(origBlendSrc, origBlendDst); -#else - int x, y, i, j; - pixel pix; - drawrect(img, zoom_wx-2, zoom_wy-2, ZSIZE*ZFACTOR+2, ZSIZE*ZFACTOR+2, 192, 192, 192, 255); - drawrect(img, zoom_wx-1, zoom_wy-1, ZSIZE*ZFACTOR, ZSIZE*ZFACTOR, 0, 0, 0, 255); - clearrect(img, zoom_wx, zoom_wy, ZSIZE*ZFACTOR, ZSIZE*ZFACTOR); - for (j=0; jPT_NUM) - return 2; - if (c[5]!=CELL || c[6]!=XRES/CELL || c[7]!=YRES/CELL) - return 3; - i = XRES*YRES; - d = (unsigned char *)malloc(i); - if (!d) - return 1; - - if (BZ2_bzBuffToBuffDecompress((char *)d, (unsigned *)&i, (char *)(c+8), size-8, 0, 0)) - return 1; - size = i; - } - else - d = c; - - if (size < XRES*YRES) - { - if (bzip2) - free(d); - return 1; - } - - sy = 0; - for (y=0; y+scl<=YRES; y+=scl) - { - sx = 0; - for (x=0; x+scl<=XRES; x+=scl) - { - a = 0; - r = g = b = 0; - for (j=0; j=PT_NUM) - goto corrupt; - r += PIXR(ptypes[t].pcolors); - g += PIXG(ptypes[t].pcolors); - b += PIXB(ptypes[t].pcolors); - a ++; - } - } - if (a) - { - a = 256/a; - r = (r*a)>>8; - g = (g*a)>>8; - b = (b*a)>>8; - } - - drawpixel(vid_buf, px+sx, py+sy, r, g, b, 255); - sx++; - } - sy++; - } - - if (bzip2) - free(d); - return 0; - -corrupt: - if (bzip2) - free(d); - return 1; -}*/ - -//draws the cursor -/*void Graphics::render_cursor(pixel *vid, int x, int y, int t, int rx, int ry) -{ -#ifdef OGLR - int i; - if (trx || (j+1)>ry)) - { - xor_pixel(x+i, y+j, vid); - xor_pixel(x-i, y-j, vid); - if (i&&j)xor_pixel(x+i, y-j, vid); - if (i&&j)xor_pixel(x-i, y+j, vid); - } - } - else if (CURRENT_BRUSH==CIRCLE_BRUSH) - { - for (j=0; j<=ry; j++) - for (i=0; i<=rx; i++) - if (pow(i,2)*pow(ry,2)+pow(j,2)*pow(rx,2)<=pow(rx,2)*pow(ry,2) && - (pow(i+1,2)*pow(ry,2)+pow(j,2)*pow(rx,2)>pow(rx,2)*pow(ry,2) || - pow(i,2)*pow(ry,2)+pow(j+1,2)*pow(rx,2)>pow(rx,2)*pow(ry,2))) - { - xor_pixel(x+i, y+j, vid); - if (j) xor_pixel(x+i, y-j, vid); - if (i) xor_pixel(x-i, y+j, vid); - if (i&&j) xor_pixel(x-i, y-j, vid); - } - } - else if (CURRENT_BRUSH==TRI_BRUSH) - { - for (j=-ry; j<=ry; j++) - for (i=-rx; i<=0; i++) - if ((j <= ry ) && ( j >= (((-2.0*ry)/(rx))*i)-ry ) && (j+1>ry || ( j-1 < (((-2.0*ry)/(rx))*i)-ry )) ) - { - xor_pixel(x+i, y+j, vid); - if (i) xor_pixel(x-i, y+j, vid); - } - } - } - else //wall cursor - { - int tc; - c = (rx/CELL) * CELL; - x = (x/CELL) * CELL; - y = (y/CELL) * CELL; - - tc = !((c%(CELL*2))==0); - - x -= c/2; - y -= c/2; - - x += tc*(CELL/2); - y += tc*(CELL/2); - - for (i=0; iparts; - char infobuf[256]; - if(debug_flags & DEBUG_PERFORMANCE_FRAME || debug_flags & DEBUG_PERFORMANCE_CALC) - { - int t1, t2, x = 0, i = debug_perf_istart; - float partiavg = 0, frameavg = 0; - while(i != debug_perf_iend) - { - partiavg += abs(debug_perf_partitime[i]/100000); - frameavg += abs(debug_perf_frametime[i]/100000); - if(debug_flags & DEBUG_PERFORMANCE_CALC) - t1 = abs(debug_perf_partitime[i]/100000); - else - t1 = 0; - - if(debug_flags & DEBUG_PERFORMANCE_FRAME) - t2 = abs(debug_perf_frametime[i]/100000); - else - t2 = 0; - - if(t1 > YRES) - t1 = YRES; - if(t1+t2 > YRES) - t2 = YRES-t1; - - if(t1>0) - draw_line(vid, x, YRES, x, YRES-t1, 0, 255, 120, XRES+BARSIZE); - if(t2>0) - draw_line(vid, x, YRES-t1, x, YRES-(t1+t2), 255, 120, 0, XRES+BARSIZE); - - i++; - x++; - i %= DEBUG_PERF_FRAMECOUNT; - } - - if(debug_flags & DEBUG_PERFORMANCE_CALC) - t1 = abs(partiavg / x); - else - t1 = 0; - - if(debug_flags & DEBUG_PERFORMANCE_FRAME) - t2 = abs(frameavg / x); - else - t2 = 0; - - if(t1 > YRES) - t1 = YRES; - if(t1+t2 > YRES) - t2 = YRES-t1; - - if(t1>0) - fillrect(vid, x, YRES-t1-1, 5, t1+2, 0, 255, 0, 255); - if(t2>0) - fillrect(vid, x, (YRES-t1)-t2-1, 5, t2+1, 255, 0, 0, 255); - } - if(debug_flags & DEBUG_DRAWTOOL) - { - if(lm == 1) //Line tool - { - blend_line(vid, 0, line_y, XRES, line_y, 255, 255, 255, 120); - blend_line(vid, line_x, 0, line_x, YRES, 255, 255, 255, 120); - - blend_line(vid, 0, ly, XRES, ly, 255, 255, 255, 120); - blend_line(vid, lx, 0, lx, YRES, 255, 255, 255, 120); - - sprintf(infobuf, "%d x %d", lx, ly); - drawtext_outline(vid, lx+(lx>line_x?3:-textwidth(infobuf)-3), ly+(lyline_y?-10:3), infobuf, 255, 255, 255, 200, 0, 0, 0, 120); - - sprintf(infobuf, "%d", abs(line_x-lx)); - drawtext_outline(vid, (line_x+lx)/2-textwidth(infobuf)/2, line_y+(ly>line_y?-10:3), infobuf, 255, 255, 255, 200, 0, 0, 0, 120); - - sprintf(infobuf, "%d", abs(line_y-ly)); - drawtext_outline(vid, line_x+(lxparts_lastActiveIndex, NPART, (((float)sim->parts_lastActiveIndex)/((float)NPART))*100.0f); - for(i = 0; i < NPART; i++){ - if(parts[i].type){ - drawpixel(vid, x, y, 255, 255, 255, 180); - } else { - drawpixel(vid, x, y, 0, 0, 0, 180); - } - if(i == sim->parts_lastActiveIndex) - { - lpx = x; - lpy = y; - } - x++; - if(x>=XRES){ - y++; - x = 0; - } - } - draw_line(vid, 0, lpy, XRES, lpy, 0, 255, 120, XRES+BARSIZE); - draw_line(vid, lpx, 0, lpx, YRES, 0, 255, 120, XRES+BARSIZE); - drawpixel(vid, lpx, lpy, 255, 50, 50, 220); - - drawpixel(vid, lpx+1, lpy, 255, 50, 50, 120); - drawpixel(vid, lpx-1, lpy, 255, 50, 50, 120); - drawpixel(vid, lpx, lpy+1, 255, 50, 50, 120); - drawpixel(vid, lpx, lpy-1, 255, 50, 50, 120); - - fillrect(vid, 7, YRES-26, textwidth(infobuf)+5, 14, 0, 0, 0, 180); - drawtext(vid, 10, YRES-22, infobuf, 255, 255, 255, 255); - } -}*/ - -void Graphics::Clear() -{ - memset(vid, 0, PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE))); -#ifdef OGLR - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); -#endif -} - -void Graphics::AttachSDLSurface(SDL_Surface * surface) -{ - sdl_scrn = surface; -#ifdef OGLR - SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glOrtho(0, (XRES+BARSIZE)*sdl_scale, 0, (YRES+MENUSIZE)*sdl_scale, -1, 1); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glRasterPos2i(0, (YRES+MENUSIZE)); - glPixelZoom(1, -1); - - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - //Texture for main UI - glEnable(GL_TEXTURE_2D); - glGenTextures(1, &vidBuf); - glBindTexture(GL_TEXTURE_2D, vidBuf); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, XRES+BARSIZE, YRES+MENUSIZE, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL); - - glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); - - glBindTexture(GL_TEXTURE_2D, 0); - glDisable(GL_TEXTURE_2D); -#endif -} - -void Graphics::Blit() -{ -#ifndef OGLR - if(sdl_scrn) - { - pixel * dst; - pixel * src = vid; - int j, x = 0, y = 0, w = XRES+BARSIZE, h = YRES+MENUSIZE, pitch = XRES+BARSIZE; - if (SDL_MUSTLOCK(sdl_scrn)) - if (SDL_LockSurface(sdl_scrn)<0) - return; - dst=(pixel *)sdl_scrn->pixels+y*sdl_scrn->pitch/PIXELSIZE+x; - for (j=0; jpitch/PIXELSIZE; - src+=pitch; - } - if (SDL_MUSTLOCK(sdl_scrn)) - SDL_UnlockSurface(sdl_scrn); - SDL_UpdateRect(sdl_scrn,0,0,0,0); - } -#else - //glDrawPixels(w,h,GL_BGRA,GL_UNSIGNED_BYTE,src); //Why does this still think it's ABGR? - glEnable( GL_TEXTURE_2D ); - glBindTexture(GL_TEXTURE_2D, vidBuf); - glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES+BARSIZE, YRES+MENUSIZE, GL_BGRA, GL_UNSIGNED_BYTE, vid); - glBegin(GL_QUADS); - glTexCoord2d(1, 0); - glVertex3f((XRES+BARSIZE)*sdl_scale, (YRES+MENUSIZE)*sdl_scale, 1.0); - glTexCoord2d(0, 0); - glVertex3f(0, (YRES+MENUSIZE)*sdl_scale, 1.0); - glTexCoord2d(0, 1); - glVertex3f(0, 0, 1.0); - glTexCoord2d(1, 1); - glVertex3f((XRES+BARSIZE)*sdl_scale, 0, 1.0); - glEnd(); - - glDisable( GL_TEXTURE_2D ); - glFlush(); - SDL_GL_SwapBuffers (); -#endif -} - -Graphics::Graphics(): - sdl_scrn(NULL) -{ - vid = (pixel *)malloc(PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE))); - -#ifdef OGLR -#ifdef WIN32 - status = glewInit(); - if(status != GLEW_OK) - { - fprintf(stderr, "Initializing Glew: %d\n", status); - return 0; - } -#endif -#endif -} - -Graphics::~Graphics() -{ - free(vid); -} diff --git a/src/Graphics.h b/src/Graphics.h index 4e6edf6..df7342b 100644 --- a/src/Graphics.h +++ b/src/Graphics.h @@ -91,92 +91,84 @@ enum Icon IconReport }; +//"Graphics lite" - slightly lower performance due to variable size, +class VideoBuffer +{ +public: + pixel * Buffer; + int Width, Height; + + VideoBuffer(int width, int height): Width(width), Height(height), Buffer((pixel*)calloc(width*height, PIXELSIZE)) { }; + void BlendPixel(int x, int y, int r, int g, int b, int a); + void AddPixel(int x, int y, int r, int g, int b, int a); + void SetPixel(int x, int y, int r, int g, int b, int a); + int BlendCharacter(int x, int y, int c, int r, int g, int b, int a); + int AddCharacter(int x, int y, int c, int r, int g, int b, int a); + int SetCharacter(int x, int y, int c, int r, int g, int b, int a); + ~VideoBuffer() { free(Buffer); }; +}; + class Graphics { public: - SDL_Surface * sdl_scrn; pixel *vid; - pixel *render_packed_rgb(void *image, int width, int height, int cmp_size); + int sdl_scale; +#ifdef OGLR + //OpenGL specific instance variables + GLuint vidBuf, textTexture; +#else + SDL_Surface * sdl_scrn; +#endif + + //Common graphics methods in Graphics.cpp static char * GenerateGradient(pixel * colours, float * points, int pointcount, int size); - //void draw_other(); - void draw_rgba_image(unsigned char *data, int x, int y, float a); + + //PTIF methods static void *ptif_pack(pixel *src, int w, int h, int *result_size); static pixel *ptif_unpack(void *datain, int size, int *w, int *h); static pixel *resample_img_nn(pixel *src, int sw, int sh, int rw, int rh); static pixel *resample_img(pixel *src, int sw, int sh, int rw, int rh); static pixel *rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f); - //void render_gravlensing(pixel *src, pixel * dst); - //void sdl_blit_1(int x, int y, int w, int h, pixel *src, int pitch); - //void sdl_blit_2(int x, int y, int w, int h, pixel *src, int pitch); - //void sdl_blit(int x, int y, int w, int h, pixel *src, int pitch); - inline void drawblob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb); - void draw_tool(int b, int sl, int sr, unsigned pc, unsigned iswall); - //int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc); - //void draw_menu(pixel *vid_buf, int i, int hover); - void drawpixel(int x, int y, int r, int g, int b, int a); - inline int addchar(int x, int y, int c, int r, int g, int b, int a); - inline int drawchar(int x, int y, int c, int r, int g, int b, int a); - int drawtext(int x, int y, std::string &s, int r, int g, int b, int a); - int drawtext(int x, int y, const char *s, int r, int g, int b, int a); - int drawtext_outline(int x, int y, const char *s, int r, int g, int b, int a, int olr, int olg, int olb, int ola); - int drawtextwrap(int x, int y, int w, const char *s, int r, int g, int b, int a); - void drawrect(int x, int y, int w, int h, int r, int g, int b, int a); - void fillrect(int x, int y, int w, int h, int r, int g, int b, int a); - void clearrect(int x, int y, int w, int h); - void drawdots(int x, int y, int h, int r, int g, int b, int a); - static int textwidth(char *s); - int drawtextmax(int x, int y, int w, char *s, int r, int g, int b, int a); + static pixel *render_packed_rgb(void *image, int width, int height, int cmp_size); + + //Font/text metrics static int textnwidth(char *s, int n); static void textnpos(char *s, int n, int w, int *cx, int *cy); static int textwidthx(char *s, int w); static int textposxy(char *s, int width, int w, int h); static int textwrapheight(char *s, int width); - inline void blendpixel(int x, int y, int r, int g, int b, int a); + static int textwidth(const char *s); + static void textsize(const char * s, int & width, int & height); + + void blendpixel(int x, int y, int r, int g, int b, int a); + void addpixel(int x, int y, int r, int g, int b, int a); + void draw_icon(int x, int y, Icon icon); - //void draw_air(); - //void draw_grav_zones(pixel *vid); - //void draw_grav(pixel *vid); - void draw_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a); - inline void addpixel(int x, int y, int r, int g, int b, int a); - void xor_pixel(int x, int y); - void xor_line(int x1, int y1, int x2, int y2); - void xor_rect(int x, int y, int w, int h); - inline void blend_line(int x1, int y1, int x2, int y2, int r, int g, int b, int a); - //void render_parts(pixel *vid); -// #ifdef OGLR -// void draw_parts_fbo(); -// #endif -// void draw_parts(); -// void draw_walls(pixel *vid); -// void create_decorations(int x, int y, int rx, int ry, int r, int g, int b, int click, int tool); -// void create_decoration(int x, int y, int r, int g, int b, int click, int tool); -// void line_decorations(int x1, int y1, int x2, int y2, int rx, int ry, int r, int g, int b, int click, int tool); -// void box_decorations(int x1, int y1, int x2, int y2, int r, int g, int b, int click, int tool); -// void draw_color_menu(pixel *vid_buf, int i, int hover); - inline void draw_wavelengths(int x, int y, int h, int wl); - //void render_signs(); -// void render_fire(pixel *dst); -// void prepare_alpha(int size, float intensity); - inline void draw_image(pixel *img, int x, int y, int w, int h, int a); - static void dim_copy(pixel *dst, pixel *src); - static void dim_copy_pers(pixel *dst, pixel *src); - //void render_zoom(pixel *img); - //int render_thumb(void *thumb, int size, int bzip2, pixel *vid_buf, int px, int py, int scl); - //void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry); - //int sdl_open(void); - //int draw_debug_info(pixel* vid, int lm, int lx, int ly, int cx, int cy, int line_x, int line_y); + void Clear(); - void Blit(); void AttachSDLSurface(SDL_Surface * surface); - #ifdef OGLR - void clearScreen(float alpha); - void ogl_blit(int x, int y, int w, int h, pixel *src, int pitch, int scale); - #endif + void Blit(); + // + int drawtext(int x, int y, const char *s, int r, int g, int b, int a); + int drawtext(int x, int y, std::string s, int r, int g, int b, int a); + int drawchar(int x, int y, int c, int r, int g, int b, int a); + int addchar(int x, int y, int c, int r, int g, int b, int a); + + void xor_pixel(int x, int y); + void xor_line(int x, int y, int x2, int y2); + void xor_rect(int x, int y, int width, int height); + void xor_bitmap(unsigned char * bitmap, int x, int y, int w, int h); + + void draw_line(int x, int y, int x2, int y2, int r, int g, int b, int a); + void drawrect(int x, int y, int width, int height, int r, int g, int b, int a); + void fillrect(int x, int y, int width, int height, int r, int g, int b, int a); + void clearrect(int x, int y, int width, int height); + void gradientrect(int x, int y, int width, int height, int r, int g, int b, int a, int r2, int g2, int b2, int a2); + + void draw_image(pixel *img, int x, int y, int w, int h, int a); + Graphics(); ~Graphics(); -#ifdef OGLR - GLuint vidBuf; -#endif }; #endif diff --git a/src/OpenGLGraphics.cpp b/src/OpenGLGraphics.cpp new file mode 100644 index 0000000..ed2b2ab --- /dev/null +++ b/src/OpenGLGraphics.cpp @@ -0,0 +1,399 @@ +#include "Graphics.h" +#include "font.h" + +#ifdef OGLR + +Graphics::Graphics(): +sdl_scale(1) +{ + +} + +Graphics::~Graphics() +{ +} + +void Graphics::Clear() +{ + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); +} + +void Graphics::AttachSDLSurface(SDL_Surface * surface) +{ + //sdl_scrn = surface; + SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + //glOrtho(0, (XRES+BARSIZE)*sdl_scale, 0, (YRES+MENUSIZE)*sdl_scale, -1, 1); + glOrtho(0, (XRES+BARSIZE)*sdl_scale, (YRES+MENUSIZE)*sdl_scale, 0, -1, 1); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + + //glRasterPos2i(0, (YRES+MENUSIZE)); + glRasterPos2i(0, 0); + glPixelZoom(1, 1); + + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + //Texture for main UI + glEnable(GL_TEXTURE_2D); + + glGenTextures(1, &vidBuf); + glBindTexture(GL_TEXTURE_2D, vidBuf); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, XRES+BARSIZE, YRES+MENUSIZE, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL); + + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + + glBindTexture(GL_TEXTURE_2D, 0); + + glGenTextures(1, &textTexture); + glBindTexture(GL_TEXTURE_2D, textTexture); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + + glBindTexture(GL_TEXTURE_2D, 0); + + glDisable(GL_TEXTURE_2D); +} + +void Graphics::Blit() +{ + //glDrawPixels(w,h,GL_BGRA,GL_UNSIGNED_BYTE,src); //Why does this still think it's ABGR? + /*glEnable( GL_TEXTURE_2D ); + glBindTexture(GL_TEXTURE_2D, vidBuf); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, XRES+BARSIZE, YRES+MENUSIZE, GL_BGRA, GL_UNSIGNED_BYTE, vid); + glBegin(GL_QUADS); + glTexCoord2d(1, 0); + glVertex3f((XRES+BARSIZE)*sdl_scale, (YRES+MENUSIZE)*sdl_scale, 1.0); + glTexCoord2d(0, 0); + glVertex3f(0, (YRES+MENUSIZE)*sdl_scale, 1.0); + glTexCoord2d(0, 1); + glVertex3f(0, 0, 1.0); + glTexCoord2d(1, 1); + glVertex3f((XRES+BARSIZE)*sdl_scale, 0, 1.0); + glEnd(); + + glDisable( GL_TEXTURE_2D );*/ + glFlush(); + SDL_GL_SwapBuffers (); +} + +int Graphics::drawtext(int x, int y, const char *s, int r, int g, int b, int a) +{ + if(!strlen(s)) + return 0; + int width, height; + Graphics::textsize(s, width, height); + VideoBuffer texture(width, height); + int characterX = 0, characterY = 0; + int startX = characterX; + for (; *s; s++) + { + if (*s == '\n') + { + characterX = startX; + characterY += FONT_H+2; + } + else if (*s == '\b') + { + switch (s[1]) + { + case 'w': + r = g = b = 255; + break; + case 'g': + r = g = b = 192; + break; + case 'o': + r = 255; + g = 216; + b = 32; + break; + case 'r': + r = 255; + g = b = 0; + break; + case 'l': + r = 255; + g = b = 75; + break; + case 'b': + r = g = 0; + b = 255; + break; + case 't': + b = 255; + g = 170; + r = 32; + break; + } + s++; + } + else + { + characterX = texture.SetCharacter(characterX, characterY, *(unsigned char *)s, r, g, b, a); + } + } + glEnable(GL_TEXTURE_2D); + + //Generate texture + glBindTexture(GL_TEXTURE_2D, textTexture); + + //Draw texture + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture.Width, texture.Height, 0, GL_BGRA, GL_UNSIGNED_BYTE, texture.Buffer); + + //glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, texture.Width, texture.Height, GL_BGRA, GL_UNSIGNED_BYTE, texture.Buffer); + glBegin(GL_QUADS); + glTexCoord2d(0, 0); + glVertex2f(x, y); + glTexCoord2d(1, 0); + glVertex2f(x+texture.Width, y); + glTexCoord2d(1, 1); + glVertex2f(x+texture.Width, y+texture.Height); + glTexCoord2d(0, 1); + glVertex2f(x, y+texture.Height); + glEnd(); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + + return x; +} + +int Graphics::drawtext(int x, int y, std::string s, int r, int g, int b, int a) +{ + return drawtext(x, y, s.c_str(), r, g, b, a); +} + +TPT_INLINE int Graphics::drawchar(int x, int y, int c, int r, int g, int b, int a) +{ + int i, j, w, bn = 0, ba = 0; + char *rp = font_data + font_ptrs[c]; + w = *(rp++); + VideoBuffer texture(w, 12); + texture.SetCharacter(0, 0, c, r, g, b, a); + + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, textTexture); + + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture.Width, texture.Height, 0, GL_BGRA, GL_UNSIGNED_BYTE, texture.Buffer); + glBegin(GL_QUADS); + glTexCoord2d(0, 0); + glVertex2f(x, y); + glTexCoord2d(1, 0); + glVertex2f(x+texture.Width, y); + glTexCoord2d(1, 1); + glVertex2f(x+texture.Width, y+texture.Height); + glTexCoord2d(0, 1); + glVertex2f(x, y+texture.Height); + glEnd(); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + + return x + w; +} + +TPT_INLINE int Graphics::addchar(int x, int y, int c, int r, int g, int b, int a) +{ + int i, j, w, bn = 0, ba = 0; + char *rp = font_data + font_ptrs[c]; + w = *(rp++); + VideoBuffer texture(w, 12); + texture.AddCharacter(0, 0, c, r, g, b, a); + + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, textTexture); + glBlendFunc(GL_ONE, GL_ONE); + + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture.Width, texture.Height, 0, GL_BGRA, GL_UNSIGNED_BYTE, texture.Buffer); + glBegin(GL_QUADS); + glTexCoord2d(0, 0); + glVertex2f(x, y); + glTexCoord2d(1, 0); + glVertex2f(x+texture.Width, y); + glTexCoord2d(1, 1); + glVertex2f(x+texture.Width, y+texture.Height); + glTexCoord2d(0, 1); + glVertex2f(x, y+texture.Height); + glEnd(); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + + return x + w; +} + +TPT_INLINE void Graphics::xor_pixel(int x, int y) +{ + //OpenGL doesn't support single pixel manipulation, there are ways around it, but with poor performance +} + +TPT_INLINE void Graphics::blendpixel(int x, int y, int r, int g, int b, int a) +{ + //OpenGL doesn't support single pixel manipulation, there are ways around it, but with poor performance +} + +TPT_INLINE void Graphics::addpixel(int x, int y, int r, int g, int b, int a) +{ + //OpenGL doesn't support single pixel manipulation, there are ways around it, but with poor performance +} + +void Graphics::xor_line(int x, int y, int x2, int y2) +{ + glEnable(GL_COLOR_LOGIC_OP); + //glEnable(GL_LINE_SMOOTH); + glLogicOp(GL_XOR); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glBegin(GL_LINES); + glVertex2i(x, y); + glVertex2i(x2, y2); + glEnd(); + glDisable(GL_COLOR_LOGIC_OP); +} + +void Graphics::xor_rect(int x, int y, int width, int height) +{ + glEnable(GL_COLOR_LOGIC_OP); + //glEnable(GL_LINE_SMOOTH); + glLogicOp(GL_XOR); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glBegin(GL_LINE_STRIP); + glVertex2i(x, y); + glVertex2i(x+width, y); + glVertex2i(x+width, y+height); + glVertex2i(x, y+height); + glVertex2i(x, y); + glEnd(); + glDisable(GL_COLOR_LOGIC_OP); +} + +void Graphics::xor_bitmap(unsigned char * bitmap, int x, int y, int w, int h) +{ + //glEnable(GL_COLOR_LOGIC_OP); + //glLogicOp(GL_XOR); + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, textTexture); + + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, w, h, 0, GL_ALPHA, GL_UNSIGNED_BYTE, bitmap); + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + + glBegin(GL_QUADS); + glTexCoord2d(0, 0); + glVertex2f(x, y); + glTexCoord2d(1, 0); + glVertex2f(x+w, y); + glTexCoord2d(1, 1); + glVertex2f(x+w, y+h); + glTexCoord2d(0, 1); + glVertex2f(x, y+h); + glEnd(); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + //glDisable(GL_COLOR_LOGIC_OP); +} + +void Graphics::draw_line(int x, int y, int x2, int y2, int r, int g, int b, int a) +{ + a = 255; + glColor4ub(r, g, b, a); + glBegin(GL_LINES); + glVertex2i(x, y); + glVertex2i(x2, y2); + glEnd(); +} + +void Graphics::drawrect(int x, int y, int width, int height, int r, int g, int b, int a) +{ + x++; + glColor4ub(r, g, b, a); + glBegin(GL_LINE_STRIP); + glVertex2i(x, y); + glVertex2i(x+width, y); + glVertex2i(x+width, y+height); + glVertex2i(x, y+height+1); //+1 is a hack to prevent squares from missing their corners, will make smoothed lines look like SHIT + glVertex2i(x, y); + glEnd(); +} + +void Graphics::fillrect(int x, int y, int width, int height, int r, int g, int b, int a) +{ + x++; + y++; + width-=1; + height-=1; + + glColor4ub(r, g, b, a); + glBegin(GL_QUADS); + glVertex2i(x, y); + glVertex2i(x+width, y); + glVertex2i(x+width, y+height); + glVertex2i(x, y+height); + glEnd(); +} + +void Graphics::gradientrect(int x, int y, int width, int height, int r, int g, int b, int a, int r2, int g2, int b2, int a2) +{ + glBegin(GL_QUADS); + glColor4ub(r, g, b, a); + glVertex2i(x, y); + glColor4ub(r2, g2, b2, a2); + glVertex2i(x+width, y); + glColor4ub(r2, g2, b2, a2); + glVertex2i(x+width, y+height); + glColor4ub(r, g, b, a); + glVertex2i(x, y+height); + glEnd(); +} + +void Graphics::clearrect(int x, int y, int width, int height) +{ + glColor4ub(0, 0, 0, 255); + glBegin(GL_QUADS); + glVertex2i(x, y); + glVertex2i(x+width, y); + glVertex2i(x+width, y+height); + glVertex2i(x, y+height); + glEnd(); +} + +void Graphics::draw_image(pixel *img, int x, int y, int w, int h, int a) +{ + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, textTexture); + + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_BGRA, GL_UNSIGNED_BYTE, img); + glBegin(GL_QUADS); + glTexCoord2d(0, 0); + glVertex2f(x, y); + glTexCoord2d(1, 0); + glVertex2f(x+w, y); + glTexCoord2d(1, 1); + glVertex2f(x+w, y+h); + glTexCoord2d(0, 1); + glVertex2f(x, y+h); + glEnd(); + + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); +} + +#endif diff --git a/src/RasterGraphics.cpp b/src/RasterGraphics.cpp new file mode 100644 index 0000000..472ae3c --- /dev/null +++ b/src/RasterGraphics.cpp @@ -0,0 +1,380 @@ +#include "Graphics.h" +#include "font.h" + +#ifndef OGLR + +Graphics::Graphics(): +sdl_scale(1) +{ + vid = (pixel *)malloc(PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE))); + +} + +Graphics::~Graphics() +{ + free(vid); +} + +void Graphics::Clear() +{ + memset(vid, 0, PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE))); +} + +void Graphics::AttachSDLSurface(SDL_Surface * surface) +{ + sdl_scrn = surface; +} + +void Graphics::Blit() +{ + if(sdl_scrn) + { + pixel * dst; + pixel * src = vid; + int j, x = 0, y = 0, w = XRES+BARSIZE, h = YRES+MENUSIZE, pitch = XRES+BARSIZE; + if (SDL_MUSTLOCK(sdl_scrn)) + if (SDL_LockSurface(sdl_scrn)<0) + return; + dst=(pixel *)sdl_scrn->pixels+y*sdl_scrn->pitch/PIXELSIZE+x; + for (j=0; jpitch/PIXELSIZE; + src+=pitch; + } + if (SDL_MUSTLOCK(sdl_scrn)) + SDL_UnlockSurface(sdl_scrn); + SDL_UpdateRect(sdl_scrn,0,0,0,0); + } +} + +int Graphics::drawtext(int x, int y, const char *s, int r, int g, int b, int a) +{ + if(!strlen(s)) + return 0; + int width, height; + + int characterX = x, characterY = y; + int startX = characterX; + for (; *s; s++) + { + if (*s == '\n') + { + characterX = startX; + characterY += FONT_H+2; + } + else if (*s == '\b') + { + switch (s[1]) + { + case 'w': + r = g = b = 255; + break; + case 'g': + r = g = b = 192; + break; + case 'o': + r = 255; + g = 216; + b = 32; + break; + case 'r': + r = 255; + g = b = 0; + break; + case 'l': + r = 255; + g = b = 75; + break; + case 'b': + r = g = 0; + b = 255; + break; + case 't': + b = 255; + g = 170; + r = 32; + break; + } + s++; + } + else + { + characterX = drawchar(characterX, characterY, *(unsigned char *)s, r, g, b, a); + } + } + return x; +} + +int Graphics::drawtext(int x, int y, std::string s, int r, int g, int b, int a) +{ + return drawtext(x, y, s.c_str(), r, g, b, a); +} + +TPT_INLINE int Graphics::drawchar(int x, int y, int c, int r, int g, int b, int a) +{ + int i, j, w, bn = 0, ba = 0; + char *rp = font_data + font_ptrs[c]; + w = *(rp++); + for (j=0; j>= 2; + bn -= 2; + } + return x + w; +} + +TPT_INLINE int Graphics::addchar(int x, int y, int c, int r, int g, int b, int a) +{ + int i, j, w, bn = 0, ba = 0; + char *rp = font_data + font_ptrs[c]; + w = *(rp++); + for (j=0; j>= 2; + bn -= 2; + } + return x + w; +} + +TPT_INLINE void Graphics::xor_pixel(int x, int y) +{ + int c; + if (x<0 || y<0 || x>=XRES || y>=YRES) + return; + c = vid[y*(XRES+BARSIZE)+x]; + c = PIXB(c) + 3*PIXG(c) + 2*PIXR(c); + if (c<512) + vid[y*(XRES+BARSIZE)+x] = PIXPACK(0xC0C0C0); + else + vid[y*(XRES+BARSIZE)+x] = PIXPACK(0x404040); +} + +TPT_INLINE void Graphics::blendpixel(int x, int y, int r, int g, int b, int a) +{ + pixel t; + if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) + return; + if (a!=255) + { + t = vid[y*(XRES+BARSIZE)+x]; + r = (a*r + (255-a)*PIXR(t)) >> 8; + g = (a*g + (255-a)*PIXG(t)) >> 8; + b = (a*b + (255-a)*PIXB(t)) >> 8; + } + vid[y*(XRES+BARSIZE)+x] = PIXRGB(r,g,b); +} + +TPT_INLINE void Graphics::addpixel(int x, int y, int r, int g, int b, int a) +{ + pixel t; + if (x<0 || y<0 || x>=XRES+BARSIZE || y>=YRES+MENUSIZE) + return; + t = vid[y*(XRES+BARSIZE)+x]; + r = (a*r + 255*PIXR(t)) >> 8; + g = (a*g + 255*PIXG(t)) >> 8; + b = (a*b + 255*PIXB(t)) >> 8; + if (r>255) + r = 255; + if (g>255) + g = 255; + if (b>255) + b = 255; + vid[y*(XRES+BARSIZE)+x] = PIXRGB(r,g,b); +} + +void Graphics::xor_line(int x1, int y1, int x2, int y2) +{ + int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; + float e, de; + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1= 0.5f) + { + y += sy; + e -= 1.0f; + } + } +} + +void Graphics::xor_rect(int x, int y, int w, int h) +{ + int i; + for (i=0; iabs(x2-x1), x, y, dx, dy, sy; + float e, de; + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1= 0.5f) + { + y += sy; + e -= 1.0f; + } + } +} + +void Graphics::drawrect(int x, int y, int w, int h, int r, int g, int b, int a) +{ + int i; + for (i=0; i<=w; i++) + { + blendpixel(x+i, y, r, g, b, a); + blendpixel(x+i, y+h, r, g, b, a); + } + for (i=1; i YRES+MENUSIZE) h = (YRES+MENUSIZE)-y; //Adjust height to prevent drawing off the bottom + if(a >= 255) + for (j=0; j>1)&1; idrawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); + drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); } else if (wtypes[wt].drawstyle==2) { for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); + drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); } else if (wtypes[wt].drawstyle==3) { for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); + drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); } else if (wtypes[wt].drawstyle==4) { for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); + drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); else if (i == j+1 || (i == 0 && j == CELL-1)) - g->drawblob((x*CELL+i), (y*CELL+j), PIXR(gc), PIXG(gc), PIXB(gc)); + drawblob((x*CELL+i), (y*CELL+j), PIXR(gc), PIXG(gc), PIXB(gc)); else - g->drawblob((x*CELL+i), (y*CELL+j), 0x20, 0x20, 0x20); + drawblob((x*CELL+i), (y*CELL+j), 0x20, 0x20, 0x20); } if (bmap[y][x]==WL_EWALL) { @@ -479,14 +493,14 @@ void Renderer::DrawWalls() for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80); + drawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80); } else { for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80); + drawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80); } } else if (bmap[y][x]==WL_WALLELEC) @@ -495,9 +509,9 @@ void Renderer::DrawWalls() for (i=0; idrawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); + drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc)); else - g->drawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80); + drawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80); } } else if (bmap[y][x]==WL_EHOLE) @@ -506,7 +520,7 @@ void Renderer::DrawWalls() { for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), 0x24, 0x24, 0x24); + drawblob((x*CELL+i), (y*CELL+j), 0x24, 0x24, 0x24); for (j=0; jdrawblob((x*CELL+i), (y*CELL+j), 0x24, 0x24, 0x24); + drawblob((x*CELL+i), (y*CELL+j), 0x24, 0x24, 0x24); } } } @@ -535,6 +549,7 @@ void Renderer::DrawWalls() } } +#endif } void Renderer::get_sign_pos(int i, int *x0, int *y0, int *w, int *h) @@ -577,6 +592,10 @@ void Renderer::DrawSigns() { int i, j, x, y, w, h, dx, dy,mx,my,b=1,bq; sign *signs = sim->signs; +#ifdef OGLR + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); + glTranslated(0, MENUSIZE, 0); +#endif for (i=0; i 18) ? -1 : 1; +#ifdef OGLR + glBegin(GL_LINES); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glVertex2i(x, y); + glVertex2i(x+(dx*4), y+(dy*4)); + glEnd(); +#else for (j=0; j<4; j++) { - g->drawpixel(x, y, 192, 192, 192, 255); + g->blendpixel(x, y, 192, 192, 192, 255); x+=dx; y+=dy; } +#endif /*if (MSIGN==i) { bq = b; @@ -642,10 +669,15 @@ void Renderer::DrawSigns() signs[i].y = my; }*/ } +#ifdef OGLR + glTranslated(0, -MENUSIZE, 0); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); +#endif } void Renderer::render_gravlensing() { +#ifndef OGLR int nx, ny, rx, ry, gx, gy, bx, by, co; int r, g, b; pixel t; @@ -675,27 +707,15 @@ void Renderer::render_gravlensing() if (b>255) b = 255; dst[ny*(XRES+BARSIZE)+nx] = PIXRGB(r,g,b); - // addpixel(dst, nx, ny, PIXR(src[ry*(XRES+BARSIZE)+rx]), PIXG(src[gy*(XRES+BARSIZE)+gx]), PIXB(src[by*(XRES+BARSIZE)+bx]), 255); } - - /*rx = nx+(gravxf[(ny*XRES)+nx]*0.5f); - ry = ny+(gravyf[(ny*XRES)+nx]*0.5f); - gx = nx+(gravxf[(ny*XRES)+nx]*0.75f); - gy = ny+(gravyf[(ny*XRES)+nx]*0.75f); - bx = nx+(gravxf[(ny*XRES)+nx]); - by = ny+(gravyf[(ny*XRES)+nx]); - if(rx > 0 && rx < XRES && ry > 0 && ry < YRES && gravp[ny/CELL][nx/CELL]*0.5f > -8.0f) - addpixel(dst, rx, ry, PIXR(src[ry*(XRES+BARSIZE)+rx]), 0, 0, 255); - if(gx > 0 && gx < XRES && gy > 0 && gy < YRES && gravp[ny/CELL][nx/CELL]*0.75f > -8.0f) - addpixel(dst, gx, gy, 0, PIXG(src[ry*(XRES+BARSIZE)+rx]), 0, 255); - if(bx > 0 && bx < XRES && by > 0 && by < YRES && gravp[ny/CELL][nx/CELL] > -8.0f) - addpixel(dst, bx, by, 0, 0, PIXB(src[ry*(XRES+BARSIZE)+rx]), 255);*/ } } +#endif } void Renderer::render_fire() { +#ifndef OGLR int i,j,x,y,r,g,b,nx,ny; for (j=0; j4 ? g-4 : 0; fire_b[j][i] = b>4 ? b-4 : 0; } +#endif } float temp[CELL*3][CELL*3]; @@ -840,6 +861,7 @@ void Renderer::render_parts() glGetIntegerv(GL_BLEND_DST, &origBlendDst); //Render to the particle FBO glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); + glTranslated(0, MENUSIZE, 0); #else /*if (GRID_MODE)//draws the grid { @@ -878,27 +900,6 @@ void Renderer::render_parts() decg = (sim->parts[i].dcolour>>8)&0xFF; decb = (sim->parts[i].dcolour)&0xFF; - /*if(display_mode == RENDER_NONE) - { - if(decorations_enable) - { - colr = (deca*decr + (255-deca)*colr) >> 8; - colg = (deca*decg + (255-deca)*colg) >> 8; - colb = (deca*decb + (255-deca)*colb) >> 8; - } -#ifdef OGLR - flatV[cflatV++] = nx; - flatV[cflatV++] = ny; - flatC[cflatC++] = ((float)colr)/255.0f; - flatC[cflatC++] = ((float)colg)/255.0f; - flatC[cflatC++] = ((float)colb)/255.0f; - flatC[cflatC++] = 1.0f; - cflat++; -#else - vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(colr,colg,colb); -#endif - } - else*/ { if (graphicscache[t].isready) { @@ -1758,10 +1759,9 @@ void Renderer::render_parts() glDisableClientState(GL_VERTEX_ARRAY); //Reset FBO + glTranslated(0, -MENUSIZE, 0); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); - //Drawing the FBO onto the screen sounds like a cool idea now - glBlendFunc(origBlendSrc, origBlendDst); #endif } @@ -1777,6 +1777,8 @@ void Renderer::draw_other() // EMP effect if (emp_decor>0) { #ifdef OGLR + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); + glTranslated(0, MENUSIZE, 0); float femp_decor = ((float)emp_decor)/255.0f; /*int r=emp_decor*2.5, g=100+emp_decor*1.5, b=255; int a=(1.0*emp_decor/110)*255; @@ -1791,6 +1793,8 @@ void Renderer::draw_other() // EMP effect glVertex2f(XRES, YRES+MENUSIZE); glVertex2f(0, YRES+MENUSIZE); glEnd(); + glTranslated(0, -MENUSIZE, 0); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); #else int r=emp_decor*2.5, g=100+emp_decor*1.5, b=255; int a=(1.0*emp_decor/110)*255; @@ -1801,7 +1805,7 @@ void Renderer::draw_other() // EMP effect for (j=0; jg->drawpixel(i, j, r, g, b, a); + this->g->blendpixel(i, j, r, g, b, a); } #endif } @@ -1926,6 +1930,7 @@ void Renderer::draw_air() glEnable( GL_TEXTURE_2D ); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); + glTranslated(0, MENUSIZE, 0); glUseProgram(airProg); @@ -1957,6 +1962,7 @@ void Renderer::draw_air() glUseProgram(0); glBindTexture(GL_TEXTURE_2D, 0); + glTranslated(0, -MENUSIZE, 0); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); glDisable( GL_TEXTURE_2D ); #endif @@ -1974,14 +1980,27 @@ void Renderer::draw_grav_zones() for (j=0; jdrawpixel(x*CELL+i, y*CELL+j, 255, 200, 0, 120); + g->blendpixel(x*CELL+i, y*CELL+j, 255, 200, 0, 120); else - g->drawpixel(x*CELL+i, y*CELL+j, 32, 32, 32, 120); + g->blendpixel(x*CELL+i, y*CELL+j, 32, 32, 32, 120); } } } } +void Renderer::drawblob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb) +{ + g->blendpixel(x+1, y, cr, cg, cb, 112); + g->blendpixel(x-1, y, cr, cg, cb, 112); + g->blendpixel(x, y+1, cr, cg, cb, 112); + g->blendpixel(x, y-1, cr, cg, cb, 112); + + g->blendpixel(x+1, y-1, cr, cg, cb, 64); + g->blendpixel(x-1, y-1, cr, cg, cb, 64); + g->blendpixel(x+1, y+1, cr, cg, cb, 64); + g->blendpixel(x-1, y+1, cr, cg, cb, 64); +} + Renderer::Renderer(Graphics * g, Simulation * sim): sim(NULL), g(NULL), diff --git a/src/Renderer.h b/src/Renderer.h index b69108a..803a486 100644 --- a/src/Renderer.h +++ b/src/Renderer.h @@ -89,6 +89,7 @@ public: void loadShaders(); #endif + void drawblob(int x, int y, unsigned char cr, unsigned char cg, unsigned char cb); //... void get_sign_pos(int i, int *x0, int *y0, int *w, int *h); diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index 5d07279..a918ff1 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -1444,7 +1444,7 @@ int luatpt_get_property(lua_State* l) int luatpt_drawpixel(lua_State* l) { - int x, y, r, g, b, a; + /*int x, y, r, g, b, a; x = luaL_optint(l, 1, 0); y = luaL_optint(l, 2, 0); r = luaL_optint(l, 3, 255); @@ -1466,8 +1466,8 @@ int luatpt_drawpixel(lua_State* l) { luacon_g->drawpixel(x, y, r, g, b, a); return 0; - } - return luaL_error(l, "Screen buffer does not exist"); + }*/ + return luaL_error(l, "Deprecated"); } int luatpt_drawrect(lua_State* l) @@ -1496,11 +1496,7 @@ int luatpt_drawrect(lua_State* l) if (b>255) b = 255; if (a<0) a = 0; if (a>255) a = 255; - if (luacon_g->vid!=NULL) - { - luacon_g->drawrect(x, y, w, h, r, g, b, a); - return 0; - } + luacon_g->drawrect(x, y, w, h, r, g, b, a); return luaL_error(l, "Screen buffer does not exist"); } @@ -1530,11 +1526,7 @@ int luatpt_fillrect(lua_State* l) if (b>255) b = 255; if (a<0) a = 0; if (a>255) a = 255; - if (luacon_g->vid!=NULL) - { - luacon_g->fillrect(x, y, w, h, r, g, b, a); - return 0; - } + luacon_g->fillrect(x, y, w, h, r, g, b, a); return luaL_error(l, "Screen buffer does not exist"); } @@ -1559,11 +1551,7 @@ int luatpt_drawline(lua_State* l) if (b>255) b = 255; if (a<0) a = 0; if (a>255) a = 255; - if (luacon_g->vid!=NULL) - { - luacon_g->blend_line(x1, y1, x2, y2, r, g, b, a); - return 0; - } + luacon_g->draw_line(x1, y1, x2, y2, r, g, b, a); return luaL_error(l, "Screen buffer does not exist"); } diff --git a/src/console/ConsoleView.cpp b/src/console/ConsoleView.cpp index f36a33b..cda871e 100644 --- a/src/console/ConsoleView.cpp +++ b/src/console/ConsoleView.cpp @@ -88,8 +88,8 @@ void ConsoleView::OnDraw() { Graphics * g = ui::Engine::Ref().g; g->fillrect(Position.X, Position.Y, Size.X, Size.Y, 0, 0, 0, 110); - g->blend_line(Position.X, Position.Y+Size.Y-16, Position.X+Size.X, Position.Y+Size.Y-16, 255, 255, 255, 160); - g->blend_line(Position.X, Position.Y+Size.Y, Position.X+Size.X, Position.Y+Size.Y, 255, 255, 255, 200); + g->draw_line(Position.X, Position.Y+Size.Y-16, Position.X+Size.X, Position.Y+Size.Y-16, 255, 255, 255, 160); + g->draw_line(Position.X, Position.Y+Size.Y, Position.X+Size.X, Position.Y+Size.Y, 255, 255, 255, 200); } ConsoleView::~ConsoleView() { diff --git a/src/game/Brush.h b/src/game/Brush.h index 98d1321..656f9f3 100644 --- a/src/game/Brush.h +++ b/src/game/Brush.h @@ -8,14 +8,16 @@ #ifndef BRUSH_H_ #define BRUSH_H_ +#include #include "interface/Point.h" class Brush { protected: - bool * outline; - bool * bitmap; + unsigned char * outline; + unsigned char * bitmap; ui::Point size; + ui::Point radius; void updateOutline() { if(!bitmap) @@ -24,35 +26,35 @@ protected: return; if(outline) free(outline); - int width = size.X*2; - int height = size.Y*2; - outline = (bool *)malloc(sizeof(bool)*((width+1)*(height+1))); - for(int x = 0; x <= width; x++) + outline = (unsigned char *)calloc(size.X*size.Y, sizeof(unsigned char)); + for(int x = 0; x < size.X; x++) { - for(int y = 0; y <= height; y++) + for(int y = 0; y < size.Y; y++) { - if(bitmap[y*width+x] && (!y || !x || y == height || x == width || !bitmap[y*width+(x+1)] || !bitmap[y*width+(x-1)] || !bitmap[(y-1)*width+x] || !bitmap[(y+1)*width+x])) - outline[y*width+x] = true; + if(bitmap[y*size.X+x] && (!y || !x || y == size.X-1 || x == size.Y-1 || !bitmap[y*size.X+(x+1)] || !bitmap[y*size.X+(x-1)] || !bitmap[(y-1)*size.X+x] || !bitmap[(y+1)*size.X+x])) + outline[y*size.X+x] = 255; else - outline[y*width+x] = false; + outline[y*size.X+x] = 0; } } } public: Brush(ui::Point size_): bitmap(NULL), - size(size_), - outline(NULL) + outline(NULL), + radius(0, 0), + size(0, 0) { - + SetRadius(size_); }; ui::Point GetRadius() { - return size; + return radius; } - void SetRadius(ui::Point size) + void SetRadius(ui::Point radius) { - this->size = size; + this->radius = radius; + this->size = radius+radius+ui::Point(1, 1); GenerateBitmap(); updateOutline(); } @@ -93,37 +95,30 @@ public: updateOutline(); if(!outline) return; - for(int x = 0; x <= size.X*2; x++) - { - for(int y = 0; y <= size.Y*2; y++) - { - if(outline[y*(size.X*2)+x]) - g->xor_pixel(position.X-size.X+x, position.Y-size.Y+y); - } - } + g->xor_bitmap(outline, position.X-radius.X, position.Y-radius.Y-1, size.X, size.Y); } virtual void GenerateBitmap() { if(bitmap) free(bitmap); - bitmap = (bool *)malloc(sizeof(bool)*(((size.X*2)+1)*((size.Y*2)+1))); - for(int x = 0; x <= size.X*2; x++) + bitmap = (unsigned char *)calloc((size.X*size.Y), sizeof(unsigned char)); + for(int x = 0; x < size.X; x++) { - for(int y = 0; y <= size.Y*2; y++) + for(int y = 0; y < size.Y; y++) { - bitmap[y*(size.X*2)+x] = true; + bitmap[(y*size.X)+x] = 255; } } } //Get a bitmap for drawing particles - bool * GetBitmap() + unsigned char * GetBitmap() { if(!bitmap) GenerateBitmap(); return bitmap; } - bool * GetOutline() + unsigned char * GetOutline() { if(!outline) updateOutline(); diff --git a/src/game/EllipseBrush.h b/src/game/EllipseBrush.h index 0953c01..26b3cf8 100644 --- a/src/game/EllipseBrush.h +++ b/src/game/EllipseBrush.h @@ -22,20 +22,20 @@ public: { if(bitmap) free(bitmap); - bitmap = (bool *)malloc(sizeof(bool)*(((size.X*2)+1)*((size.Y*2)+1))); - int rx = size.X; - int ry = size.Y; - for(int x = 0; x <= size.X*2; x++) + bitmap = (unsigned char*)calloc((size.X*size.Y), sizeof(unsigned char)); + int rx = radius.X; + int ry = radius.Y; + for(int x = 0; x <= radius.X*2; x++) { - for(int y = 0; y <= size.Y*2; y++) + for(int y = 0; y <= radius.Y*2; y++) { - if((pow(x-size.X,2)*pow(ry,2)+pow(y-size.Y,2)*pow(rx,2)<=pow(rx,2)*pow(ry,2))) + if((pow(x-radius.X,2)*pow(ry,2)+pow(y-radius.Y,2)*pow(rx,2)<=pow(rx,2)*pow(ry,2))) { - bitmap[y*(size.X*2)+x] = true; + bitmap[y*(size.X)+x] = 255; } else { - bitmap[y*(size.X*2)+x] = false; + bitmap[y*(size.X)+x] = 0; } } } diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index f289f49..4f94ab8 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -580,6 +580,9 @@ void GameController::ReloadSim() std::string GameController::ElementResolve(int type) { - return std::string(gameModel->GetSimulation()->ptypes[type].name); + if(gameModel && gameModel->GetSimulation() && gameModel->GetSimulation()->ptypes && type >= 0 && type < PT_NUM) + return std::string(gameModel->GetSimulation()->ptypes[type].name); + else + return ""; } diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index 219c6ee..7e04c6e 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -857,9 +857,8 @@ void GameView::OnDraw() ren->draw_air(); ren->render_parts(); ren->render_fire(); - //ren->draw_grav(); + ren->draw_grav(); ren->DrawWalls(); - ren->FinaliseParts(); if(activeBrush && currentMouse.X > 0 && currentMouse.X < XRES && currentMouse.Y > 0 && currentMouse.Y < YRES) { if(drawMode==DrawRect && isMouseDown) @@ -875,8 +874,9 @@ void GameView::OnDraw() activeBrush->RenderPoint(g, c->PointTranslate(currentMouse)); } } - ren->RenderZoom(); ren->DrawSigns(); + ren->FinaliseParts(); + ren->RenderZoom(); if(selectMode!=SelectNone) { diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 751cbcb..aea89e7 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -74,7 +74,10 @@ void Engine::ShowWindow(Window * window) prevBuffers.push(lastBuffer); } lastBuffer = (pixel*)malloc((width_ * height_) * PIXELSIZE); + +#ifndef OGLR memcpy(lastBuffer, g->vid, (width_ * height_) * PIXELSIZE); +#endif windows.push(state_); } @@ -167,7 +170,9 @@ void Engine::Draw() if(lastBuffer && !(state_->Position.X == 0 && state_->Position.Y == 0 && state_->Size.X == width_ && state_->Size.Y == height_)) { g->Clear(); +#ifndef OGLR memcpy(g->vid, lastBuffer, (width_ * height_) * PIXELSIZE); +#endif } else { diff --git a/src/interface/Slider.cpp b/src/interface/Slider.cpp index 06d6f87..3430ca1 100644 --- a/src/interface/Slider.cpp +++ b/src/interface/Slider.cpp @@ -16,7 +16,9 @@ Slider::Slider(Point position, Point size, int steps): sliderSteps(steps), sliderPosition(0), isMouseDown(false), - bgGradient(NULL) + bgGradient(NULL), + col1(0, 0, 0, 0), + col2(0, 0, 0, 0) { // TODO Auto-generated constructor stub @@ -79,6 +81,8 @@ void Slider::SetColour(Colour col1, Colour col2) { if(bgGradient) free(bgGradient); + this->col1 = col1; + this->col2 = col2; bgGradient = (unsigned char*)Graphics::GenerateGradient( (pixel[2]){PIXRGB(col1.Red, col1.Green, col1.Blue), PIXRGB(col2.Red, col2.Green, col2.Blue)}, (float[2]){0.0f, 1.0f}, 2, Size.X-6); @@ -100,9 +104,13 @@ void Slider::Draw(const Point& screenPos) if(bgGradient) { +#ifndef OGLR for (int j = 3; j < Size.Y-6; j++) for (int i = 3; i < Size.X-6; i++) - g->drawpixel(screenPos.X+i+2, screenPos.Y+j+2, bgGradient[(i-3)*3], bgGradient[(i-3)*3+1], bgGradient[(i-3)*3+2], 255); + g->blendpixel(screenPos.X+i+2, screenPos.Y+j+2, bgGradient[(i-3)*3], bgGradient[(i-3)*3+1], bgGradient[(i-3)*3+2], 255); +#else + g->gradientrect(screenPos.X+3, screenPos.Y+3, Size.X-6, Size.Y-6, col1.Red, col1.Green, col1.Blue, col1.Alpha, col2.Red, col2.Green, col2.Blue, col2.Alpha); +#endif } g->drawrect(screenPos.X+3, screenPos.Y+3, Size.X-6, Size.Y-6, 255, 255, 255, 255); diff --git a/src/interface/Slider.h b/src/interface/Slider.h index 4992f80..21792bc 100644 --- a/src/interface/Slider.h +++ b/src/interface/Slider.h @@ -26,6 +26,7 @@ class Slider: public ui::Component { bool isMouseDown; unsigned char * bgGradient; SliderAction * actionCallback; + Colour col1, col2; void updatePosition(int position); public: Slider(Point position, Point size, int steps); diff --git a/src/interface/Spinner.cpp b/src/interface/Spinner.cpp index 1ecad8d..b988674 100644 --- a/src/interface/Spinner.cpp +++ b/src/interface/Spinner.cpp @@ -27,7 +27,7 @@ void Spinner::Draw(const Point& screenPos) int baseY = screenPos.Y+(Size.Y/2); for(float t = 0.0f; t < 1.0f; t+=0.05f) { - g->drawblob(baseX+(sin(cValue+t)*(Size.X/2)), baseY+(cos(cValue+t)*(Size.X/2)), t*255, t*255, t*255); + //g->drawblob(baseX+(sin(cValue+t)*(Size.X/2)), baseY+(cos(cValue+t)*(Size.X/2)), t*255, t*255, t*255); } } Spinner::~Spinner() diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index eabdcfd..9f435f0 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -434,7 +434,7 @@ void Simulation::ApplyDecorationPoint(int x, int y, int rx, int ry, int colR, in return; } - bool *bitmap = cBrush->GetBitmap(); + unsigned char *bitmap = cBrush->GetBitmap(); for (j=-ry; j<=ry; j++) for (i=-rx; i<=rx; i++) if(bitmap[(j+ry)*(rx*2)+(i+rx)]) @@ -624,10 +624,10 @@ int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags, Bru } else if(cBrush) { - bool *bitmap = cBrush->GetBitmap(); + unsigned char *bitmap = cBrush->GetBitmap(); for (j=-ry; j<=ry; j++) for (i=-rx; i<=rx; i++) - if(bitmap[(j+ry)*(rx*2)+(i+rx)]) + if(bitmap[(j+ry)*((rx*2)+1)+(i+rx+1)]) delete_part(x+i, y+j, 0); } else @@ -647,10 +647,10 @@ int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags, Bru } else if(cBrush) { - bool *bitmap = cBrush->GetBitmap(); + unsigned char *bitmap = cBrush->GetBitmap(); for (j=-ry; j<=ry; j++) for (i=-rx; i<=rx; i++) - if(bitmap[(j+ry)*(rx*2)+(i+rx)]) + if(bitmap[(j+ry)*((rx*2)+1)+(i+rx+1)]) { if ( x+i<0 || y+j<0 || x+i>=XRES || y+j>=YRES) continue; @@ -678,10 +678,10 @@ int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags, Bru } else if(cBrush) { - bool *bitmap = cBrush->GetBitmap(); + unsigned char *bitmap = cBrush->GetBitmap(); for (j=-ry; j<=ry; j++) for (i=-rx; i<=rx; i++) - if(bitmap[(j+ry)*(rx*2)+(i+rx)]) + if(bitmap[(j+ry)*((rx*2)+1)+(i+rx+1)]) if (create_part_add_props(-2, x+i, y+j, c, rx, ry)==-1) f = 1; } -- cgit v0.9.2-21-gd62e From 553cf6552070aae93e1db031b57afdc8c9ba19e0 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 22 Apr 2012 13:44:34 +0100 Subject: Missing font.h changes from previous commit diff --git a/data/font.h b/data/font.h index b991660..4c94825 100644 --- a/data/font.h +++ b/data/font.h @@ -294,5 +294,8 @@ short font_ptrs[] = { 0x10FE, 0x110E, 0x111E, 0x112E, 0x113E, 0x114E, 0x115E, 0x116E, 0x117E, 0x118E, 0x119E, 0x11AE, 0x11BE, 0x11CE, 0x11DE, 0x11EE, }; +#else +extern char font_data[]; +extern short font_ptrs[]; #endif #endif -- cgit v0.9.2-21-gd62e From e38fd405af5f07667203c6f584a5cdb00ed20ca2 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 22 Apr 2012 17:13:43 +0100 Subject: Correct quirks with drawrect and fillrect, change UI components accordingly, shorten save name in save button diff --git a/src/OpenGLGraphics.cpp b/src/OpenGLGraphics.cpp index ed2b2ab..61c422c 100644 --- a/src/OpenGLGraphics.cpp +++ b/src/OpenGLGraphics.cpp @@ -323,22 +323,24 @@ void Graphics::draw_line(int x, int y, int x2, int y2, int r, int g, int b, int void Graphics::drawrect(int x, int y, int width, int height, int r, int g, int b, int a) { x++; + height--; + width--; glColor4ub(r, g, b, a); glBegin(GL_LINE_STRIP); - glVertex2i(x, y); - glVertex2i(x+width, y); - glVertex2i(x+width, y+height); - glVertex2i(x, y+height+1); //+1 is a hack to prevent squares from missing their corners, will make smoothed lines look like SHIT - glVertex2i(x, y); + glVertex2f(x, y); + glVertex2f(x+width, y); + glVertex2f(x+width, y+height); + glVertex2f(x, y+height+1); //+1 is a hack to prevent squares from missing their corners, will make smoothed lines look like SHIT + glVertex2f(x, y); glEnd(); } void Graphics::fillrect(int x, int y, int width, int height, int r, int g, int b, int a) { - x++; + /*x++; y++; width-=1; - height-=1; + height-=1;*/ glColor4ub(r, g, b, a); glBegin(GL_QUADS); diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index cd647e8..0e43231 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -35,6 +35,7 @@ extern "C" IMAGE_DOS_HEADER __ImageBase; SDL_Surface * SDLOpen() { + SDL_Surface * surface; #if defined(WIN32) && defined(WINCONSOLE) FILE * console = fopen("CON", "w" ); #endif @@ -75,10 +76,21 @@ SDL_Surface * SDLOpen() //SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); atexit(SDL_Quit); #ifndef OGLR - return SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_SWSURFACE); + surface = SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_SWSURFACE); #else - return SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_OPENGL); + surface = SDL_SetVideoMode(XRES + BARSIZE, YRES + MENUSIZE, 32, SDL_OPENGL); #endif + +#if defined(WIN32) && defined(OGLR) + int status = glewInit(); + if(status != GLEW_OK) + { + fprintf(stderr, "Initializing Glew: %d\n", status); + exit(-1); + } +#endif + +return surface; } /*int SDLPoll(SDL_Event * event) diff --git a/src/RasterGraphics.cpp b/src/RasterGraphics.cpp index 472ae3c..563aef2 100644 --- a/src/RasterGraphics.cpp +++ b/src/RasterGraphics.cpp @@ -321,6 +321,8 @@ void Graphics::draw_line(int x1, int y1, int x2, int y2, int r, int g, int b, in void Graphics::drawrect(int x, int y, int w, int h, int r, int g, int b, int a) { int i; + w--; + h--; for (i=0; i<=w; i++) { blendpixel(x+i, y, r, g, b, a); @@ -336,8 +338,8 @@ void Graphics::drawrect(int x, int y, int w, int h, int r, int g, int b, int a) void Graphics::fillrect(int x, int y, int w, int h, int r, int g, int b, int a) { int i,j; - for (j=1; jc->OpenSearch(); } }; - searchButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16)); //Open + searchButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(17, 15)); //Open searchButton->SetIcon(IconOpen); currentX+=18; searchButton->SetTogglable(false); @@ -62,7 +62,7 @@ GameView::GameView(): v->c->ReloadSim(); } }; - reloadButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16)); + reloadButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(17, 15)); reloadButton->SetIcon(IconReload); currentX+=18; reloadButton->SetActionCallback(new ReloadAction(this)); @@ -78,9 +78,9 @@ GameView::GameView(): v->c->OpenSaveWindow(); } }; - saveSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X/5, 16)); + saveSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(150, 15)); saveSimulationButton->SetIcon(IconSave); - currentX+=(Size.X/5)+2; + currentX+=151; saveSimulationButton->SetActionCallback(new SaveSimulationAction(this)); AddComponent(saveSimulationButton); @@ -94,9 +94,9 @@ GameView::GameView(): v->c->Vote(1); } }; - upVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16)); + upVoteButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(15, 15)); upVoteButton->SetIcon(IconVoteUp); - currentX+=16; + currentX+=15; upVoteButton->SetActionCallback(new UpVoteAction(this)); AddComponent(upVoteButton); @@ -110,9 +110,9 @@ GameView::GameView(): v->c->Vote(-1); } }; - downVoteButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(16, 16)); + downVoteButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(15, 15)); downVoteButton->SetIcon(IconVoteDown); - currentX+=18; + currentX+=16; downVoteButton->SetActionCallback(new DownVoteAction(this)); AddComponent(downVoteButton); @@ -126,9 +126,9 @@ GameView::GameView(): v->c->OpenTags(); } }; - tagSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-18), ui::Point(Size.X-(currentX+176), 16)); + tagSimulationButton = new ui::Button(ui::Point(currentX, Size.Y-16), ui::Point(250, 15)); tagSimulationButton->SetIcon(IconTag); - currentX+=Size.X-(currentX+176); + currentX+=251; tagSimulationButton->SetActionCallback(new TagSimulationAction(this)); AddComponent(tagSimulationButton); @@ -142,7 +142,7 @@ GameView::GameView(): v->c->ClearSim(); } }; - clearSimButton = new ui::Button(ui::Point(Size.X-174, Size.Y-18), ui::Point(16, 16)); + clearSimButton = new ui::Button(ui::Point(Size.X-159, Size.Y-16), ui::Point(17, 15)); clearSimButton->SetIcon(IconNew); clearSimButton->SetActionCallback(new ClearSimAction(this)); AddComponent(clearSimButton); @@ -157,7 +157,7 @@ GameView::GameView(): v->c->OpenLogin(); } }; - loginButton = new ui::Button(ui::Point(Size.X-156, Size.Y-18), ui::Point(100, 16), "Login"); + loginButton = new ui::Button(ui::Point(Size.X-141, Size.Y-16), ui::Point(92, 15), "Login"); loginButton->SetIcon(IconLogin); loginButton->SetActionCallback(new LoginAction(this)); AddComponent(loginButton); @@ -172,7 +172,7 @@ GameView::GameView(): v->c->OpenOptions(); } }; - simulationOptionButton = new ui::Button(ui::Point(Size.X-54, Size.Y-18), ui::Point(16, 16)); + simulationOptionButton = new ui::Button(ui::Point(Size.X-48, Size.Y-16), ui::Point(15, 15)); simulationOptionButton->SetIcon(IconSimulationSettings); simulationOptionButton->SetActionCallback(new SimulationOptionAction(this)); AddComponent(simulationOptionButton); @@ -187,7 +187,7 @@ GameView::GameView(): v->c->OpenRenderOptions(); } }; - displayModeButton = new ui::Button(ui::Point(Size.X-36, Size.Y-18), ui::Point(16, 16)); + displayModeButton = new ui::Button(ui::Point(Size.X-32, Size.Y-16), ui::Point(15, 15)); displayModeButton->SetIcon(IconRenderSettings); displayModeButton->SetActionCallback(new DisplayModeAction(this)); AddComponent(displayModeButton); @@ -202,7 +202,7 @@ GameView::GameView(): v->c->SetPaused(sender->GetToggleState()); } }; - pauseButton = new ui::Button(ui::Point(Size.X-18, Size.Y-18), ui::Point(16, 16)); //Pause + pauseButton = new ui::Button(ui::Point(Size.X-16, Size.Y-16), ui::Point(15, 15)); //Pause pauseButton->SetIcon(IconPause); pauseButton->SetTogglable(true); pauseButton->SetActionCallback(new PauseAction(this)); @@ -257,7 +257,7 @@ public: void GameView::NotifyMenuListChanged(GameModel * sender) { - int currentY = YRES+MENUSIZE-18-(sender->GetMenuList().size()*18); + int currentY = YRES+MENUSIZE-16-(sender->GetMenuList().size()*16); for(int i = 0; i < menuButtons.size(); i++) { RemoveComponent(menuButtons[i]); @@ -275,10 +275,10 @@ void GameView::NotifyMenuListChanged(GameModel * sender) { std::string tempString = ""; tempString += menuList[i]->GetIcon(); - ui::Button * tempButton = new ui::Button(ui::Point(XRES+BARSIZE-18, currentY), ui::Point(16, 16), tempString); + ui::Button * tempButton = new ui::Button(ui::Point(XRES+BARSIZE-16, currentY), ui::Point(15, 15), tempString); tempButton->SetTogglable(true); tempButton->SetActionCallback(new MenuAction(this, menuList[i])); - currentY+=18; + currentY+=16; AddComponent(tempButton); menuButtons.push_back(tempButton); } @@ -344,9 +344,9 @@ void GameView::NotifyToolListChanged(GameModel * sender) for(int i = 0; i < toolList.size(); i++) { //ToolButton * tempButton = new ToolButton(ui::Point(XRES+1, currentY), ui::Point(28, 15), toolList[i]->GetName()); - ToolButton * tempButton = new ToolButton(ui::Point(currentX, YRES+1), ui::Point(28, 15), toolList[i]->GetName()); + ToolButton * tempButton = new ToolButton(ui::Point(currentX, YRES+1), ui::Point(30, 18), toolList[i]->GetName()); //currentY -= 17; - currentX -= 32; + currentX -= 31; tempButton->SetActionCallback(new ToolAction(this, toolList[i])); tempButton->SetBackgroundColour(ui::Colour(toolList[i]->colRed, toolList[i]->colGreen, toolList[i]->colBlue)); @@ -364,7 +364,7 @@ void GameView::NotifyToolListChanged(GameModel * sender) tempButton->SetSelectionState(2); //Tertiary } - tempButton->SetAlignment(AlignCentre, AlignBottom); + tempButton->SetAlignment(AlignCentre, AlignMiddle); AddComponent(tempButton); toolButtons.push_back(tempButton); } diff --git a/src/game/ToolButton.cpp b/src/game/ToolButton.cpp index 27bbab6..72beed7 100644 --- a/src/game/ToolButton.cpp +++ b/src/game/ToolButton.cpp @@ -12,6 +12,7 @@ ToolButton::ToolButton(ui::Point position, ui::Point size, std::string text_): ui::Button(position, size, text_) { SetSelectionState(-1); + activeBorder = ui::Colour(255, 0, 0); } void ToolButton::OnMouseClick(int x, int y, unsigned int button) @@ -37,9 +38,18 @@ void ToolButton::OnMouseUp(int x, int y, unsigned int button) void ToolButton::Draw(const ui::Point& screenPos) { Graphics * g = ui::Engine::Ref().g; - int totalColour = background.Red + 3*background.Green + 2*background.Blue; + int totalColour = background.Red + (3*background.Green) + (2*background.Blue); - g->fillrect(screenPos.X, screenPos.Y, Size.X, Size.Y, background.Red, background.Green, background.Blue, 255); + g->fillrect(screenPos.X+2, screenPos.Y+2, Size.X-4, Size.Y-4, background.Red, background.Green, background.Blue, background.Alpha); + + if(isMouseInside && currentSelection == -1) + { + g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, activeBorder.Red, activeBorder.Green, activeBorder.Blue, activeBorder.Alpha); + } + else + { + g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, border.Red, border.Green, border.Blue, border.Alpha); + } if (totalColour<544) { @@ -49,12 +59,6 @@ void ToolButton::Draw(const ui::Point& screenPos) { g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, buttonDisplayText.c_str(), 0, 0, 0, 255); } - if(currentSelection!=-1) - { - //g->fillrect(screenPos.X+1, screenPos.Y+1, Size.X-2, Size.Y-2, 255, 255, 255, 170); - g->fillrect(screenPos.X+2, screenPos.Y+2, Size.Y-4, Size.Y-4, 0, 0, 0, 170); - g->drawtext(screenPos.X+5, screenPos.Y+4, selectionText, 255, 255, 255, 255); - } } void ToolButton::SetSelectionState(int state) @@ -63,16 +67,16 @@ void ToolButton::SetSelectionState(int state) switch(state) { case 0: - selectionText = "L"; + border = ui::Colour(255, 0, 0); break; case 1: - selectionText = "R"; + border = ui::Colour(0, 0, 255); break; case 2: - selectionText = "M"; + border = ui::Colour(0, 255, 0); break; default: - selectionText = ""; + border = ui::Colour(0, 0, 0); break; } } diff --git a/src/game/ToolButton.h b/src/game/ToolButton.h index 60a1c7c..94042a9 100644 --- a/src/game/ToolButton.h +++ b/src/game/ToolButton.h @@ -12,7 +12,6 @@ class ToolButton: public ui::Button { int currentSelection; - std::string selectionText; public: ToolButton(ui::Point position, ui::Point size, std::string text_); virtual void OnMouseUp(int x, int y, unsigned int button); diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 5444cdc..3bf302b 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -45,6 +45,8 @@ void Button::TextPosition() buttonDisplayText += "..."; } } + + // Values 3 and 10 are for vertical padding of 3 pixels, middle uses 7 as that's the height of a capital switch(textVAlign) { case AlignTop: @@ -54,7 +56,7 @@ void Button::TextPosition() textPosition.Y = (Size.Y-10)/2; break; case AlignBottom: - textPosition.Y = Size.Y-12; + textPosition.Y = Size.Y-10; break; } @@ -131,20 +133,20 @@ void Button::Draw(const Point& screenPos) { if(isButtonDown || (isTogglable && toggle)) { - g->fillrect(Position.X-1, Position.Y-1, Size.X+2, Size.Y+2, activeBackground.Red, activeBackground.Green, activeBackground.Blue, 255); + g->fillrect(Position.X+1, Position.Y+1, Size.X-2, Size.Y-2, activeBackground.Red, activeBackground.Green, activeBackground.Blue, 255); g->drawrect(Position.X, Position.Y, Size.X, Size.Y, activeBorder.Red, activeBorder.Green, activeBorder.Blue, 255); g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y+1, buttonDisplayText, activeText.Red, activeText.Green, activeText.Blue, 255); } else { - g->fillrect(Position.X, Position.Y, Size.X, Size.Y, background.Red, background.Green, background.Blue, 255); + g->fillrect(Position.X+1, Position.Y+1, Size.X-2, Size.Y-2, background.Red, background.Green, background.Blue, 255); g->drawrect(Position.X, Position.Y, Size.X, Size.Y, border.Red, border.Green, border.Blue, 255); g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y+1, buttonDisplayText, text.Red, text.Green, text.Blue, 255); } } else { - g->fillrect(Position.X, Position.Y, Size.X, Size.Y, background.Red, background.Green, background.Blue, 180); + g->fillrect(Position.X+1, Position.Y+1, Size.X-2, Size.Y-2, background.Red, background.Green, background.Blue, 180); g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 180, 180, 180, 255); g->drawtext(Position.X+textPosition.X, Position.Y+textPosition.Y+1, buttonDisplayText, 180, 180, 180, 255); } diff --git a/src/interface/Checkbox.cpp b/src/interface/Checkbox.cpp index 3244552..2481b23 100644 --- a/src/interface/Checkbox.cpp +++ b/src/interface/Checkbox.cpp @@ -60,12 +60,12 @@ void Checkbox::Draw(const Point& screenPos) Graphics * g = Engine::Ref().g; if(checked) { - g->fillrect(screenPos.X+4, screenPos.Y+4, 8, 8, 255, 255, 255, 255); + g->fillrect(screenPos.X+5, screenPos.Y+5, 6, 6, 255, 255, 255, 255); } if(isMouseOver) { g->drawrect(screenPos.X+2, screenPos.Y+2, 12, 12, 255, 255, 255, 255); - g->fillrect(screenPos.X+4, screenPos.Y+4, 8, 8, 255, 255, 255, 170); + g->fillrect(screenPos.X+5, screenPos.Y+5, 6, 6, 255, 255, 255, 170); g->drawtext(screenPos.X+18, screenPos.Y+4, text, 255, 255, 255, 255); } else diff --git a/src/interface/SaveButton.cpp b/src/interface/SaveButton.cpp index 6e08e95..0848ff5 100644 --- a/src/interface/SaveButton.cpp +++ b/src/interface/SaveButton.cpp @@ -37,6 +37,17 @@ SaveButton::SaveButton(Point position, Point size, Save * save): voteColour.Red = (1.0f-voteRatio)*255; voteColour.Green = voteRatio*255; } + + if(save) + { + name = save->name; + if(Graphics::textwidth((char *)name.c_str()) > Size.X) + { + int position = Graphics::textwidthx((char *)name.c_str(), Size.X - 22); + name = name.erase(position, name.length()-position); + name += "..."; + } + } } SaveButton::~SaveButton() @@ -122,10 +133,10 @@ void SaveButton::Draw(const Point& screenPos) g->drawrect(screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 210, 230, 255, 255); else g->drawrect(screenPos.X-3+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, thumbBoxSize.X, thumbBoxSize.Y, 180, 180, 180, 255); - g->drawrect(screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, 6, thumbBoxSize.Y, 180, 180, 180, 255); + g->drawrect(screenPos.X-4+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, screenPos.Y+(Size.Y-21-thumbBoxSize.Y)/2, 7, thumbBoxSize.Y, 180, 180, 180, 255); - int voteBar = max(10.0f, ((float)(thumbBoxSize.Y-2))*voteRatio); - g->fillrect(1+screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, 1+(screenPos.Y-2)+(thumbBoxSize.Y-voteBar)+(Size.Y-21-thumbBoxSize.Y)/2, 4, voteBar, voteColour.Red, voteColour.Green, voteColour.Blue, 255); + int voteBar = max(10.0f, ((float)(thumbBoxSize.Y-4))*voteRatio); + g->fillrect(1+screenPos.X-3+thumbBoxSize.X+(Size.X-thumbBoxSize.X)/2, (screenPos.Y-2)+(thumbBoxSize.Y-voteBar)+(Size.Y-21-thumbBoxSize.Y)/2, 3, voteBar, voteColour.Red, voteColour.Green, voteColour.Blue, 255); } else { @@ -138,12 +149,12 @@ void SaveButton::Draw(const Point& screenPos) if(isMouseInside) { //g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); - g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->name.c_str()))/2, screenPos.Y+Size.Y - 21, save->name, 255, 255, 255, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)name.c_str()))/2, screenPos.Y+Size.Y - 21, name, 255, 255, 255, 255); g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->userName.c_str()))/2, screenPos.Y+Size.Y - 10, save->userName, 200, 230, 255, 255); } else { - g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->name.c_str()))/2, screenPos.Y+Size.Y - 21, save->name, 180, 180, 180, 255); + g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)name.c_str()))/2, screenPos.Y+Size.Y - 21, name, 180, 180, 180, 255); g->drawtext(screenPos.X+(Size.X-Graphics::textwidth((char *)save->userName.c_str()))/2, screenPos.Y+Size.Y - 10, save->userName, 100, 130, 160, 255); } } diff --git a/src/interface/SaveButton.h b/src/interface/SaveButton.h index de1b6ed..f456639 100644 --- a/src/interface/SaveButton.h +++ b/src/interface/SaveButton.h @@ -24,6 +24,7 @@ class SaveButton : public Component { Save * save; Thumbnail * thumbnail; + std::string name; public: SaveButton(Point position, Point size, Save * save); virtual ~SaveButton(); diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp index 7df1f6b..661423c 100644 --- a/src/preview/PreviewView.cpp +++ b/src/preview/PreviewView.cpp @@ -27,7 +27,7 @@ PreviewView::PreviewView(): v->c->Exit(); } }; - openButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(50, 16), "Open"); + openButton = new ui::Button(ui::Point(0, Size.Y-19), ui::Point(51, 19), "Open"); openButton->SetAlignment(AlignLeft, AlignMiddle); openButton->SetIcon(IconOpen); openButton->SetActionCallback(new OpenAction(this)); @@ -44,7 +44,7 @@ PreviewView::PreviewView(): } }; - favButton = new ui::Button(ui::Point(50, Size.Y-16), ui::Point(50, 16), "Fav."); + favButton = new ui::Button(ui::Point(51, Size.Y-19), ui::Point(51, 19), "Fav."); favButton->SetAlignment(AlignLeft, AlignMiddle); favButton->SetIcon(IconFavourite); favButton->SetActionCallback(new FavAction(this)); @@ -71,7 +71,7 @@ PreviewView::PreviewView(): new TextPrompt("Report Save", "Reason for reporting", true, new ReportPromptCallback(v)); } }; - reportButton = new ui::Button(ui::Point(100, Size.Y-16), ui::Point(50, 16), "Report"); + reportButton = new ui::Button(ui::Point(102, Size.Y-19), ui::Point(51, 19), "Report"); reportButton->SetAlignment(AlignLeft, AlignMiddle); reportButton->SetIcon(IconReport); reportButton->SetActionCallback(new ReportAction(this)); @@ -88,7 +88,7 @@ PreviewView::PreviewView(): } }; - browserOpenButton = new ui::Button(ui::Point((XRES/2)-110, Size.Y-16), ui::Point(110, 16), "Open in browser"); + browserOpenButton = new ui::Button(ui::Point((XRES/2)-108, Size.Y-19), ui::Point(108, 19), "Open in browser"); browserOpenButton->SetAlignment(AlignLeft, AlignMiddle); browserOpenButton->SetIcon(IconOpen); browserOpenButton->SetActionCallback(new BrowserOpenAction(this)); -- cgit v0.9.2-21-gd62e From 892584c5fe241b628b98caa3936bb031c4940fce Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 22 Apr 2012 20:26:40 +0100 Subject: Fix Off-by-one error with zoom Window using OpenGL diff --git a/src/Renderer.cpp b/src/Renderer.cpp index b254e59..3a29d20 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -247,8 +247,8 @@ void Renderer::RenderZoom() zcx1 = (zoomScopePosition.X)*xfactor; zcx0 = (zoomScopePosition.X+zoomScopeSize)*xfactor; - zcy1 = (zoomScopePosition.Y)*yfactor; - zcy0 = ((zoomScopePosition.Y+zoomScopeSize))*yfactor; + zcy1 = (zoomScopePosition.Y-1)*yfactor; + zcy0 = ((zoomScopePosition.Y-1+zoomScopeSize))*yfactor; glGetIntegerv(GL_BLEND_SRC, &origBlendSrc); glGetIntegerv(GL_BLEND_DST, &origBlendDst); -- cgit v0.9.2-21-gd62e From 22d7865e6df4f29b7b1d2d2e31361ac0c9d9f7f1 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 22 Apr 2012 22:37:00 +0100 Subject: Inline restrict_flt diff --git a/src/Misc.cpp b/src/Misc.cpp index c52be54..bba64a0 100644 --- a/src/Misc.cpp +++ b/src/Misc.cpp @@ -74,7 +74,7 @@ int isign(float i) //TODO: INline or macro return 0; } -unsigned clamp_flt(float f, float min, float max) //TODO: Also inline/macro +TPT_INLINE unsigned clamp_flt(float f, float min, float max) //TODO: Also inline/macro { if (f Date: Mon, 23 Apr 2012 17:32:37 +0100 Subject: MOAR PERFORMANCE diff --git a/Makefile b/Makefile index 46359b7..3047497 100644 --- a/Makefile +++ b/Makefile @@ -19,11 +19,11 @@ powder.exe: build/powder.exe powder-release: build/powder-release powder: build/powder -build/powder-release.exe: CFLAGS += -DWIN32 -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -pipe -msse -msse2 -msse3 -mmmx +build/powder-release.exe: CFLAGS += -DWIN32 -O3 -ftree-vectorize -msse2 -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -Wunsafe-loop-optimizations build/powder-release.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -llua -lfftw3f-3 -mwindows build/powder.exe: CFLAGS += -DWIN32 build/powder.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -llua -lfftw3f-3 #-mwindows -build/powder-release: CFLAGS += -DLIN32 -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -pipe -msse -msse2 -msse3 -mmmx +build/powder-release: CFLAGS += -DLIN32 -O3 -ftree-vectorize -msse2 -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -Wunsafe-loop-optimizations build/powder-release: LFLAGS := -lSDL -lm -lbz2 -llua -lfftw3f build/powder: CFLAGS += -DLIN32 build/powder: LFLAGS := -lSDL -lm -lbz2 -llua -lfftw3f -- cgit v0.9.2-21-gd62e From bb8a3f76e3b558a63eab38ab15ebb71f9b5ac762 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Thu, 26 Apr 2012 13:10:47 +0100 Subject: OS X compiling working, Make it a bit more friendly with stricter compilers diff --git a/Makefile b/Makefile index 3047497..42b299d 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ powder-release.exe: build/powder-release.exe powder.exe: build/powder.exe powder-release: build/powder-release powder: build/powder +powder-x: build/powder-x build/powder-release.exe: CFLAGS += -DWIN32 -O3 -ftree-vectorize -msse2 -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -Wunsafe-loop-optimizations build/powder-release.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -llua -lfftw3f-3 -mwindows @@ -27,6 +28,8 @@ build/powder-release: CFLAGS += -DLIN32 -O3 -ftree-vectorize -msse2 -funsafe-ma build/powder-release: LFLAGS := -lSDL -lm -lbz2 -llua -lfftw3f build/powder: CFLAGS += -DLIN32 build/powder: LFLAGS := -lSDL -lm -lbz2 -llua -lfftw3f +build/powder-x: CFLAGS += -DPIX32BGRA -DMACOSX -I/Library/Frameworks/SDL.framework/Headers -I/Library/Frameworks/Lua.framework/Headers +build/powder-x: LFLAGS := -lm -lbz2 -lfftw3f -framework SDL -framework Lua -framework Cocoa CFLAGS += -DGRAVFFT -DLUACONSOLE @@ -55,6 +58,14 @@ build/obj/powder/%.o: src/%.cpp $(HEADERS) buildpaths-powder: $(shell mkdir -p build/obj/powder/) $(shell mkdir -p $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS))))) + +build/powder-x: buildpaths-powder-x $(patsubst build/obj/%.o,build/obj/powder-x/%.o,$(OBJS)) + $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder-x/%.o,$(OBJS)) SDLmain.m $(LFLAGS) -o $@ -ggdb +build/obj/powder-x/%.o: src/%.cpp $(HEADERS) + $(CPPC) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb +buildpaths-powder-x: + $(shell mkdir -p build/obj/powder-x/) + $(shell mkdir -p $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder-x/%.o,$(OBJS))))) clean: rm -r build/obj/* diff --git a/src/Config.h b/src/Config.h index 5c2cab4..575a620 100644 --- a/src/Config.h +++ b/src/Config.h @@ -88,7 +88,7 @@ #define XCNTR 306 #define YCNTR 192 -#define MAX_DISTANCE sqrt(pow(XRES, 2)+pow(YRES, 2)) +#define MAX_DISTANCE sqrt(pow((float)XRES, 2)+pow((float)YRES, 2)) #define GRAV_DIFF diff --git a/src/Misc.cpp b/src/Misc.cpp index bba64a0..920145a 100644 --- a/src/Misc.cpp +++ b/src/Misc.cpp @@ -15,6 +15,7 @@ #include #endif #ifdef MACOSX +#include #include #endif @@ -28,11 +29,11 @@ char *exe_name(void) while ((res = GetModuleFileName(NULL, name, max)) >= max) { #elif defined MACOSX - char *fn=malloc(64),*name=malloc(PATH_MAX); + char *fn=(char*)malloc(64),*name=(char*)malloc(PATH_MAX); uint32_t max=64, res; if (_NSGetExecutablePath(fn, &max) != 0) { - fn = realloc(fn, max); + fn = (char*)realloc(fn, max); _NSGetExecutablePath(fn, &max); } if (realpath(fn, name) == NULL) @@ -368,7 +369,7 @@ void clipboard_push_text(char * text) if (PasteboardClear(newclipboard)!=noErr) return; PasteboardSynchronize(newclipboard); - CFDataRef data = CFDataCreate(kCFAllocatorDefault, text, strlen(text)); + CFDataRef data = CFDataCreate(kCFAllocatorDefault, (const UInt8*)text, strlen(text)); PasteboardPutItemFlavor(newclipboard, (PasteboardItemID)1, CFSTR("com.apple.traditional-mac-plain-text"), data, 0); #elif defined WIN32 if (OpenClipboard(NULL)) @@ -654,9 +655,9 @@ void OpenURI(std::string uri) { #ifdef WIN32 ShellExecute(0, "OPEN", uri.c_str(), NULL, NULL, 0); #elif MACOSX - char *cmd = malloc(7+uri.length()); + char *cmd = (char*)malloc(7+uri.length()); strcpy(cmd, "open "); - strappend(cmd, uri.c_str()); + strappend(cmd, (char*)uri.c_str()); system(cmd); #elif LIN32 char *cmd = (char*)malloc(11+uri.length()); diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index a918ff1..6ee9132 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -326,11 +326,11 @@ int luacon_partread(lua_State* l){ switch(format) { case 0: - tempinteger = *((int*)(((void*)&luacon_sim->parts[i])+offset)); + tempinteger = *((int*)(((unsigned char*)&luacon_sim->parts[i])+offset)); lua_pushnumber(l, tempinteger); break; case 1: - tempfloat = *((float*)(((void*)&luacon_sim->parts[i])+offset)); + tempfloat = *((float*)(((unsigned char*)&luacon_sim->parts[i])+offset)); lua_pushnumber(l, tempfloat); break; } @@ -358,10 +358,10 @@ int luacon_partwrite(lua_State* l){ switch(format) { case 0: - *((int*)(((void*)&luacon_sim->parts[i])+offset)) = luaL_optinteger(l, 3, 0); + *((int*)(((unsigned char*)&luacon_sim->parts[i])+offset)) = luaL_optinteger(l, 3, 0); break; case 1: - *((float*)(((void*)&luacon_sim->parts[i])+offset)) = luaL_optnumber(l, 3, 0); + *((float*)(((unsigned char*)&luacon_sim->parts[i])+offset)) = luaL_optnumber(l, 3, 0); break; } return 1; @@ -488,11 +488,11 @@ int luacon_transitionread(lua_State* l){ switch(format) { case 0: - tempinteger = *((int*)(((void*)&luacon_sim->ptransitions[i])+offset)); + tempinteger = *((int*)(((unsigned char*)&luacon_sim->ptransitions[i])+offset)); lua_pushnumber(l, tempinteger); break; case 1: - tempfloat = *((float*)(((void*)&luacon_sim->ptransitions[i])+offset)); + tempfloat = *((float*)(((unsigned char*)&luacon_sim->ptransitions[i])+offset)); lua_pushnumber(l, tempfloat); break; } @@ -522,10 +522,10 @@ int luacon_transitionwrite(lua_State* l){ switch(format) { case 0: - *((int*)(((void*)&luacon_sim->ptransitions[i])+offset)) = luaL_optinteger(l, 3, 0); + *((int*)(((unsigned char*)&luacon_sim->ptransitions[i])+offset)) = luaL_optinteger(l, 3, 0); break; case 1: - *((float*)(((void*)&luacon_sim->ptransitions[i])+offset)) = luaL_optnumber(l, 3, 0); + *((float*)(((unsigned char*)&luacon_sim->ptransitions[i])+offset)) = luaL_optnumber(l, 3, 0); break; } return 0; @@ -675,19 +675,19 @@ int luacon_elementread(lua_State* l){ switch(format) { case 0: - tempinteger = *((int*)(((void*)&luacon_sim->ptypes[i])+offset)); + tempinteger = *((int*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)); lua_pushnumber(l, tempinteger); break; case 1: - tempfloat = *((float*)(((void*)&luacon_sim->ptypes[i])+offset)); + tempfloat = *((float*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)); lua_pushnumber(l, tempfloat); break; case 2: - tempstring = *((char**)(((void*)&luacon_sim->ptypes[i])+offset)); + tempstring = *((char**)(((unsigned char*)&luacon_sim->ptypes[i])+offset)); lua_pushstring(l, tempstring); break; case 3: - tempinteger = *((unsigned char*)(((void*)&luacon_sim->ptypes[i])+offset)); + tempinteger = *((unsigned char*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)); lua_pushnumber(l, tempinteger); break; } @@ -719,10 +719,10 @@ int luacon_elementwrite(lua_State* l){ switch(format) { case 0: - *((int*)(((void*)&luacon_sim->ptypes[i])+offset)) = luaL_optinteger(l, 3, 0); + *((int*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)) = luaL_optinteger(l, 3, 0); break; case 1: - *((float*)(((void*)&luacon_sim->ptypes[i])+offset)) = luaL_optnumber(l, 3, 0); + *((float*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)) = luaL_optnumber(l, 3, 0); break; case 2: tempstring = mystrdup((char*)luaL_optstring(l, 3, "")); @@ -745,11 +745,11 @@ int luacon_elementwrite(lua_State* l){ return luaL_error(l, "Name in use"); } } - *((char**)(((void*)&luacon_sim->ptypes[i])+offset)) = tempstring; + *((char**)(((unsigned char*)&luacon_sim->ptypes[i])+offset)) = tempstring; //Need some way of cleaning up previous values break; case 3: - *((unsigned char*)(((void*)&luacon_sim->ptypes[i])+offset)) = luaL_optinteger(l, 3, 0); + *((unsigned char*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)) = luaL_optinteger(l, 3, 0); break; } if (modified_stuff) @@ -1212,9 +1212,9 @@ int luatpt_set_property(lua_State* l) } i = r>>8; if(format == CommandInterface::FormatFloat){ - *((float*)(((void*)&luacon_sim->parts[i])+offset)) = f; + *((float*)(((unsigned char*)&luacon_sim->parts[i])+offset)) = f; } else { - *((int*)(((void*)&luacon_sim->parts[i])+offset)) = t; + *((int*)(((unsigned char*)&luacon_sim->parts[i])+offset)) = t; } } } else { @@ -1236,9 +1236,9 @@ int luatpt_set_property(lua_State* l) if (partsel && partsel != luacon_sim->parts[i].type) return 0; if(format == CommandInterface::FormatFloat){ - *((float*)(((void*)&luacon_sim->parts[i])+offset)) = f; + *((float*)(((unsigned char*)&luacon_sim->parts[i])+offset)) = f; } else { - *((int*)(((void*)&luacon_sim->parts[i])+offset)) = t; + *((int*)(((unsigned char*)&luacon_sim->parts[i])+offset)) = t; } } return 0; diff --git a/src/cat/LuaScriptInterface.h b/src/cat/LuaScriptInterface.h index a346b1a..50ec52e 100644 --- a/src/cat/LuaScriptInterface.h +++ b/src/cat/LuaScriptInterface.h @@ -10,9 +10,9 @@ extern "C" { -#include -#include -#include +#include +#include +#include } #include "CommandInterface.h" diff --git a/src/cat/TPTScriptInterface.cpp b/src/cat/TPTScriptInterface.cpp index a3f468c..137ad58 100644 --- a/src/cat/TPTScriptInterface.cpp +++ b/src/cat/TPTScriptInterface.cpp @@ -198,10 +198,10 @@ AnyType TPTScriptInterface::tptS_set(std::deque * words) switch(propertyFormat) { case FormatInt: - *((int*)(((void*)&sim->parts[partIndex])+propertyOffset)) = ((NumberType)value).Value(); + *((int*)(((unsigned char*)&sim->parts[partIndex])+propertyOffset)) = ((NumberType)value).Value(); break; case FormatFloat: - *((float*)(((void*)&sim->parts[partIndex])+propertyOffset)) = ((NumberType)value).Value(); + *((float*)(((unsigned char*)&sim->parts[partIndex])+propertyOffset)) = ((NumberType)value).Value(); break; } returnValue = 1; @@ -217,7 +217,7 @@ AnyType TPTScriptInterface::tptS_set(std::deque * words) if(sim->parts[j].type) { returnValue++; - *((int*)(((void*)&sim->parts[j])+propertyOffset)) = tempNumber; + *((int*)(((unsigned char*)&sim->parts[j])+propertyOffset)) = tempNumber; } } break; @@ -228,7 +228,7 @@ AnyType TPTScriptInterface::tptS_set(std::deque * words) if(sim->parts[j].type) { returnValue++; - *((float*)(((void*)&sim->parts[j])+propertyOffset)) = tempNumber; + *((float*)(((unsigned char*)&sim->parts[j])+propertyOffset)) = tempNumber; } } break; @@ -253,7 +253,7 @@ AnyType TPTScriptInterface::tptS_set(std::deque * words) if(sim->parts[j].type == type) { returnValue++; - *((int*)(((void*)&sim->parts[j])+propertyOffset)) = tempNumber; + *((int*)(((unsigned char*)&sim->parts[j])+propertyOffset)) = tempNumber; } } break; @@ -264,7 +264,7 @@ AnyType TPTScriptInterface::tptS_set(std::deque * words) if(sim->parts[j].type == type) { returnValue++; - *((float*)(((void*)&sim->parts[j])+propertyOffset)) = tempNumber; + *((float*)(((unsigned char*)&sim->parts[j])+propertyOffset)) = tempNumber; } } break; diff --git a/src/elements/bomb.cpp b/src/elements/bomb.cpp index 3b6db26..99eb7f0 100644 --- a/src/elements/bomb.cpp +++ b/src/elements/bomb.cpp @@ -31,7 +31,7 @@ int update_BOMB(UPDATE_FUNC_ARGS) { pmap[y][x] = 0; for (nxj=-(rad+1); nxj<=(rad+1); nxj++) for (nxi=-(rad+1); nxi<=(rad+1); nxi++) - if ((pow(nxi,2))/(pow((rad+1),2))+(pow(nxj,2))/(pow((rad+1),2))<=1) { + if ((pow((float)nxi,2))/(pow((float)(rad+1),2))+(pow((float)nxj,2))/(pow((float)(rad+1),2))<=1) { nb = sim->create_part(-1, x+nxi, y+nxj, PT_BOMB); if (nb!=-1) { parts[nb].tmp = 1; @@ -43,7 +43,7 @@ int update_BOMB(UPDATE_FUNC_ARGS) { } for (nxj=-rad; nxj<=rad; nxj++) for (nxi=-rad; nxi<=rad; nxi++) - if ((pow(nxi,2))/(pow(rad,2))+(pow(nxj,2))/(pow(rad,2))<=1) + if ((pow((float)nxi,2))/(pow((float)rad,2))+(pow((float)nxj,2))/(pow((float)rad,2))<=1) if ((pmap[y+nxj][x+nxi]&0xFF)!=PT_DMND && (pmap[y+nxj][x+nxi]&0xFF)!=PT_CLNE && (pmap[y+nxj][x+nxi]&0xFF)!=PT_PCLN && (pmap[y+nxj][x+nxi]&0xFF)!=PT_BCLN) { sim->delete_part(x+nxi, y+nxj, 0);//it SHOULD kill anything but the exceptions above, doesn't seem to always work sim->pv[(y+nxj)/CELL][(x+nxi)/CELL] += 0.1f; diff --git a/src/elements/figh.cpp b/src/elements/figh.cpp index 6a8bb4e..6b67a27 100644 --- a/src/elements/figh.cpp +++ b/src/elements/figh.cpp @@ -11,8 +11,8 @@ int update_FIGH(UPDATE_FUNC_ARGS) //Set target cords if (sim->player.spwn && sim->player2.spwn) { - if ((pow(sim->player.legs[2]-x, 2) + pow(sim->player.legs[3]-y, 2))<= - (pow(sim->player2.legs[2]-x, 2) + pow(sim->player2.legs[3]-y, 2))) + if ((pow((float)sim->player.legs[2]-x, 2) + pow((float)sim->player.legs[3]-y, 2))<= + (pow((float)sim->player2.legs[2]-x, 2) + pow((float)sim->player2.legs[3]-y, 2))) { tarx = (unsigned int)sim->player.legs[2]; tary = (unsigned int)sim->player.legs[3]; @@ -43,7 +43,7 @@ int update_FIGH(UPDATE_FUNC_ARGS) switch (parts[i].tmp2) { case 1: - if ((pow(tarx-x, 2) + pow(tary-y, 2))<600) + if ((pow(float(tarx-x), 2) + pow(float(tary-y), 2))<600) { if (figh->elem == PT_LIGH || figh->elem == PT_NEUT || sim->ptypes[figh->elem].properties&(PROP_DEADLY|PROP_RADIOACTIVE) diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index f832422..4dd14ef 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -11,7 +11,6 @@ #include "GameModelException.h" GameModel::GameModel(): - activeTools({NULL, NULL, NULL}), sim(NULL), ren(NULL), currentBrush(0), @@ -24,6 +23,8 @@ GameModel::GameModel(): sim = new Simulation(); ren = new Renderer(ui::Engine::Ref().g, sim); + memset(activeTools, 0, sizeof(activeTools)); + //Load config into renderer try { diff --git a/src/simulation/Element.h b/src/simulation/Element.h index 449bf51..f00751e 100644 --- a/src/simulation/Element.h +++ b/src/simulation/Element.h @@ -2,7 +2,7 @@ #define ELEMENT_H // This header should be included by all files in src/elements/ -#include +#include #include "Simulation.h" #include "Renderer.h" #include "ElementFunctions.h" diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 9f435f0..0a69c7b 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1,5 +1,5 @@ //#include -#include +#include #include "Config.h" #include "Simulation.h" #include "Elements.h" @@ -3570,10 +3570,14 @@ Simulation::~Simulation() } Simulation::Simulation(): - sys_pause(0), - portal_rx({-1, 0, 1, 1, 1, 0,-1,-1}), - portal_ry({-1,-1,-1, 0, 1, 1, 1, 0}) + sys_pause(0) { + + int tportal_rx[] = {-1, 0, 1, 1, 1, 0,-1,-1}; + int tportal_ry[] = {-1,-1,-1, 0, 1, 1, 1, 0}; + + memcpy(portal_rx, tportal_rx, sizeof(tportal_rx)); + memcpy(portal_ry, tportal_ry, sizeof(tportal_ry)); //Create and attach gravity simulation grav = new Gravity(); -- cgit v0.9.2-21-gd62e From fb111f42d00dd8a2041bae970c0913e096ac5101 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 27 Apr 2012 17:29:27 +0100 Subject: Update gitignore diff --git a/.gitignore b/.gitignore index d28e45e..cbcbdb7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ *.pref stdout.txt stderr.txt -build/* \ No newline at end of file +build/* +PowderToypp.xcodeproj/* +.DS_Store -- cgit v0.9.2-21-gd62e From 51b17badf4c72270bb762ea795d05d51c8b355e3 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 7 May 2012 17:59:50 +0100 Subject: A bit of refactoring (elements) diff --git a/Makefile b/Makefile index 42b299d..8c7952e 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,15 @@ -HEADERS := $(wildcard src/*.h) $(wildcard src/*/*.h) +HEADERS := $(wildcard src/*.h) $(wildcard src/*/*.h) $(wildcard generated/*.h) -SOURCES := $(wildcard src/*.cpp) $(wildcard src/*/*.cpp) +SOURCES := $(wildcard src/*.cpp) $(wildcard src/*/*.cpp) $(wildcard src/*/*/*.cpp) $(wildcard generated/*.cpp) OBJS := $(patsubst src/%.cpp,build/obj/%.o,$(SOURCES)) +NEWLINE := $(`echo "d\nd"`) +ELEMENTFILES := $(patsubst src/simulation/%,\#include "%"$(NEWLINE),$(wildcard src/simulation/elements/*.cpp)) +#ELEMENTFILES := \#include "elements/watr.cpp" + FOLDERS := -CFLAGS := -w -Isrc/ -Idata/ +CFLAGS := -w -Isrc/ -Idata/ -Igenerated/ OFLAGS := -fkeep-inline-functions CPPC := g++ @@ -59,7 +63,7 @@ buildpaths-powder: $(shell mkdir -p build/obj/powder/) $(shell mkdir -p $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS))))) -build/powder-x: buildpaths-powder-x $(patsubst build/obj/%.o,build/obj/powder-x/%.o,$(OBJS)) +build/powder-x: buildpaths-powder-x generate $(patsubst build/obj/%.o,build/obj/powder-x/%.o,$(OBJS)) $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder-x/%.o,$(OBJS)) SDLmain.m $(LFLAGS) -o $@ -ggdb build/obj/powder-x/%.o: src/%.cpp $(HEADERS) $(CPPC) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb @@ -67,6 +71,9 @@ buildpaths-powder-x: $(shell mkdir -p build/obj/powder-x/) $(shell mkdir -p $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder-x/%.o,$(OBJS))))) +generate: + python generator.py + clean: rm -r build/obj/* rm build/*.exe diff --git a/generator.py b/generator.py new file mode 100644 index 0000000..dc97594 --- /dev/null +++ b/generator.py @@ -0,0 +1,78 @@ +import re, os, shutil, string + +if os.path.isdir("generated/"): + shutil.rmtree("generated/") +os.mkdir("generated") + +elementClasses = dict() + +elementHeader = """#ifndef ELEMENTCLASSES_H +#define ELEMENTCLASSES_H +#include +#include "simulation/Element.h" +#include "simulation/elements/Element.h" +""" + +directives = [] + +elementFiles = os.listdir("src/simulation/Elements") +for elementFile in elementFiles: + f = open("src/simulation/Elements/"+elementFile, "r") + fileData = f.read() + f.close() + + directiveMatcher = '//#TPT-Directive\s+([^\r\n]+)' + matcher = re.compile(directiveMatcher) + directiveMatches = matcher.findall(fileData) + + for match in directiveMatches: + directives.append(match.split(" ")) + +classDirectives = [] +for d in directives: + if d[0] == "ElementClass": + elementClasses[d[1]] = [] + elementHeader += "#define %s %s\n" % (d[2], d[3]) + d[3] = string.atoi(d[3]) + classDirectives.append(d) + +for d in directives: + if d[0] == "ElementHeader": + elementClasses[d[1]].append(string.join(d[2:], " ")+";") + +for className, classMembers in elementClasses.items(): + elementHeader += """class {0}: public Element +{{ + public: + {0}(); + virtual ~{0}(); + {1} +}}; +""".format(className, string.join(classMembers, "\n")) + +elementHeader += """std::vector GetElements(); +#endif +""" + +elementContent = """#include "ElementClasses.h" +std::vector GetElements() +{ + std::vector elements; +"""; + +elementIDs = sorted(classDirectives, key=lambda directive: directive[3]) +for d in elementIDs: + elementContent += """ elements.push_back(%s()); +""" % (d[1]) + +elementContent += """ return elements; +} +"""; + +f = open("generated/ElementClasses.h", "w") +f.write(elementHeader) +f.close() + +f = open("generated/ElementClasses.cpp", "w") +f.write(elementContent) +f.close() \ No newline at end of file diff --git a/src/Console.cpp b/src/Console.cpp index 51f1155..7f5870b 100644 --- a/src/Console.cpp +++ b/src/Console.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include "Console.h" int Console::ParsePartref(char * txt) diff --git a/src/Graphics.cpp b/src/Graphics.cpp index 665da67..13c0457 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/src/Misc.cpp b/src/Misc.cpp index 920145a..7dcb5fe 100644 --- a/src/Misc.cpp +++ b/src/Misc.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include "Config.h" #include "Misc.h" #include "icondoc.h" diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 3a29d20..167b062 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -5,7 +5,7 @@ * Author: Simon */ -#include +#include #include #include #include @@ -14,7 +14,6 @@ #include "Renderer.h" #include "Graphics.h" #include "simulation/Elements.h" -#include "simulation/ElementFunctions.h" #include "simulation/ElementGraphics.h" #include "simulation/Air.h" extern "C" @@ -840,12 +839,11 @@ void Renderer::render_parts() float gradv, flicker, fnx, fny; Particle * parts; part_transition *ptransitions; - part_type *ptypes; + Element *elements; if(!sim) return; parts = sim->parts; - ptransitions = sim->ptransitions; - ptypes = sim->ptypes; + elements = sim->elements; #ifdef OGLR int cfireV = 0, cfireC = 0, cfire = 0; int csmokeV = 0, csmokeC = 0, csmoke = 0; @@ -884,15 +882,15 @@ void Renderer::render_parts() fnx = sim->parts[i].x; fny = sim->parts[i].y; - if((sim->photons[ny][nx]&0xFF) && !(ptypes[t].properties & TYPE_ENERGY)) + if((sim->photons[ny][nx]&0xFF) && !(elements[t].Properties & TYPE_ENERGY)) continue; //Defaults pixel_mode = 0 | PMODE_FLAT; cola = 255; - colr = PIXR(ptypes[t].pcolors); - colg = PIXG(ptypes[t].pcolors); - colb = PIXB(ptypes[t].pcolors); + colr = PIXR(elements[t].Colour); + colg = PIXG(elements[t].Colour); + colb = PIXB(elements[t].Colour); firea = 0; deca = (sim->parts[i].dcolour>>24)&0xFF; @@ -915,9 +913,9 @@ void Renderer::render_parts() } else if(!(colour_mode & COLOUR_BASC)) { - if (ptypes[t].graphics_func) + if (elements[t].Graphics) { - if ((*(ptypes[t].graphics_func))(this, &(sim->parts[i]), nx, ny, &pixel_mode, &cola, &colr, &colg, &colb, &firea, &firer, &fireg, &fireb)) //That's a lot of args, a struct might be better + if ((*(elements[t].Graphics))(this, &(sim->parts[i]), nx, ny, &pixel_mode, &cola, &colr, &colg, &colb, &firea, &firer, &fireg, &fireb)) //That's a lot of args, a struct might be better { graphicscache[t].isready = 1; graphicscache[t].pixel_mode = pixel_mode; @@ -933,25 +931,22 @@ void Renderer::render_parts() } else { - if(graphics_DEFAULT(this, &(sim->parts[i]), nx, ny, &pixel_mode, &cola, &colr, &colg, &colb, &firea, &firer, &fireg, &fireb)) - { - graphicscache[t].isready = 1; - graphicscache[t].pixel_mode = pixel_mode; - graphicscache[t].cola = cola; - graphicscache[t].colr = colr; - graphicscache[t].colg = colg; - graphicscache[t].colb = colb; - graphicscache[t].firea = firea; - graphicscache[t].firer = firer; - graphicscache[t].fireg = fireg; - graphicscache[t].fireb = fireb; - } + graphicscache[t].isready = 1; + graphicscache[t].pixel_mode = pixel_mode; + graphicscache[t].cola = cola; + graphicscache[t].colr = colr; + graphicscache[t].colg = colg; + graphicscache[t].colb = colb; + graphicscache[t].firea = firea; + graphicscache[t].firer = firer; + graphicscache[t].fireg = fireg; + graphicscache[t].fireb = fireb; } } - if((ptypes[t].properties & PROP_HOT_GLOW) && sim->parts[i].temp>(ptransitions[t].thv-800.0f)) + if((elements[t].Properties & PROP_HOT_GLOW) && sim->parts[i].temp>(elements[t].HighTemperature-800.0f)) { - gradv = 3.1415/(2*ptransitions[t].thv-(ptransitions[t].thv-800.0f)); - caddress = (sim->parts[i].temp>ptransitions[t].thv)?ptransitions[t].thv-(ptransitions[t].thv-800.0f):sim->parts[i].temp-(ptransitions[t].thv-800.0f); + gradv = 3.1415/(2*elements[t].HighTemperature-(elements[t].HighTemperature-800.0f)); + caddress = (sim->parts[i].temp>elements[t].HighTemperature)?elements[t].HighTemperature-(elements[t].HighTemperature-800.0f):sim->parts[i].temp-(elements[t].HighTemperature-800.0f); colr += sin(gradv*caddress) * 226;; colg += sin(gradv*caddress*4.55 +3.14) * 34; colb += sin(gradv*caddress*2.22 +3.14) * 64; @@ -994,9 +989,9 @@ void Renderer::render_parts() } else if(colour_mode & COLOUR_BASC) { - colr = PIXR(ptypes[t].pcolors); - colg = PIXG(ptypes[t].pcolors); - colb = PIXB(ptypes[t].pcolors); + colr = PIXR(elements[t].Colour); + colg = PIXG(elements[t].Colour); + colb = PIXB(elements[t].Colour); pixel_mode = PMODE_FLAT; } @@ -1066,9 +1061,9 @@ void Renderer::render_parts() { if (cplayer->elemelem].pcolors); - colg = PIXG(ptypes[cplayer->elem].pcolors); - colb = PIXB(ptypes[cplayer->elem].pcolors); + colr = PIXR(elements[cplayer->elem].Colour); + colg = PIXG(elements[cplayer->elem].Colour); + colb = PIXB(elements[cplayer->elem].Colour); } else { diff --git a/src/cat/CommandInterface.cpp b/src/cat/CommandInterface.cpp index 4554b9f..e8fc7b8 100644 --- a/src/cat/CommandInterface.cpp +++ b/src/cat/CommandInterface.cpp @@ -88,14 +88,14 @@ int CommandInterface::GetParticleType(std::string type) char * txt = (char*)type.c_str(); //Scope - part_type *ptypes = m->GetSimulation()->ptypes; + Element * elements = m->GetSimulation()->elements; // alternative names for some elements if (strcasecmp(txt,"C4")==0) i = PT_PLEX; else if (strcasecmp(txt,"C5")==0) i = PT_C5; else if (strcasecmp(txt,"NONE")==0) i = PT_NONE; for (i=1; iptypes[i].name); j++) - tmpname[j] = tolower(luacon_sim->ptypes[i].name[j]); - tmpname[strlen(luacon_sim->ptypes[i].name)] = 0; + for(j = 0; j < strlen(luacon_sim->elements[i].Name); j++) + tmpname[j] = tolower(luacon_sim->elements[i].Name[j]); + tmpname[strlen(luacon_sim->elements[i].Name)] = 0; lua_newtable(l); currentElement = lua_gettop(l); @@ -190,9 +190,9 @@ tpt.partsdata = nil"); tptElementTransitions = lua_gettop(l); for(i = 1; i < PT_NUM; i++) { - for(j = 0; j < strlen(luacon_sim->ptypes[i].name); j++) - tmpname[j] = tolower(luacon_sim->ptypes[i].name[j]); - tmpname[strlen(luacon_sim->ptypes[i].name)] = 0; + for(j = 0; j < strlen(luacon_sim->elements[i].Name); j++) + tmpname[j] = tolower(luacon_sim->elements[i].Name[j]); + tmpname[strlen(luacon_sim->elements[i].Name)] = 0; lua_newtable(l); currentElement = lua_gettop(l); @@ -488,11 +488,11 @@ int luacon_transitionread(lua_State* l){ switch(format) { case 0: - tempinteger = *((int*)(((unsigned char*)&luacon_sim->ptransitions[i])+offset)); + tempinteger = *((int*)(((unsigned char*)&luacon_sim->elements[i])+offset)); lua_pushnumber(l, tempinteger); break; case 1: - tempfloat = *((float*)(((unsigned char*)&luacon_sim->ptransitions[i])+offset)); + tempfloat = *((float*)(((unsigned char*)&luacon_sim->elements[i])+offset)); lua_pushnumber(l, tempfloat); break; } @@ -522,10 +522,10 @@ int luacon_transitionwrite(lua_State* l){ switch(format) { case 0: - *((int*)(((unsigned char*)&luacon_sim->ptransitions[i])+offset)) = luaL_optinteger(l, 3, 0); + *((int*)(((unsigned char*)&luacon_sim->elements[i])+offset)) = luaL_optinteger(l, 3, 0); break; case 1: - *((float*)(((unsigned char*)&luacon_sim->ptransitions[i])+offset)) = luaL_optnumber(l, 3, 0); + *((float*)(((unsigned char*)&luacon_sim->elements[i])+offset)) = luaL_optnumber(l, 3, 0); break; } return 0; @@ -675,19 +675,19 @@ int luacon_elementread(lua_State* l){ switch(format) { case 0: - tempinteger = *((int*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)); + tempinteger = *((int*)(((unsigned char*)&luacon_sim->elements[i])+offset)); lua_pushnumber(l, tempinteger); break; case 1: - tempfloat = *((float*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)); + tempfloat = *((float*)(((unsigned char*)&luacon_sim->elements[i])+offset)); lua_pushnumber(l, tempfloat); break; case 2: - tempstring = *((char**)(((unsigned char*)&luacon_sim->ptypes[i])+offset)); + tempstring = *((char**)(((unsigned char*)&luacon_sim->elements[i])+offset)); lua_pushstring(l, tempstring); break; case 3: - tempinteger = *((unsigned char*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)); + tempinteger = *((unsigned char*)(((unsigned char*)&luacon_sim->elements[i])+offset)); lua_pushnumber(l, tempinteger); break; } @@ -719,10 +719,10 @@ int luacon_elementwrite(lua_State* l){ switch(format) { case 0: - *((int*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)) = luaL_optinteger(l, 3, 0); + *((int*)(((unsigned char*)&luacon_sim->elements[i])+offset)) = luaL_optinteger(l, 3, 0); break; case 1: - *((float*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)) = luaL_optnumber(l, 3, 0); + *((float*)(((unsigned char*)&luacon_sim->elements[i])+offset)) = luaL_optnumber(l, 3, 0); break; case 2: tempstring = mystrdup((char*)luaL_optstring(l, 3, "")); @@ -745,11 +745,11 @@ int luacon_elementwrite(lua_State* l){ return luaL_error(l, "Name in use"); } } - *((char**)(((unsigned char*)&luacon_sim->ptypes[i])+offset)) = tempstring; + *((char**)(((unsigned char*)&luacon_sim->elements[i])+offset)) = tempstring; //Need some way of cleaning up previous values break; case 3: - *((unsigned char*)(((unsigned char*)&luacon_sim->ptypes[i])+offset)) = luaL_optinteger(l, 3, 0); + *((unsigned char*)(((unsigned char*)&luacon_sim->elements[i])+offset)) = luaL_optinteger(l, 3, 0); break; } if (modified_stuff) @@ -953,7 +953,7 @@ int luatpt_create(lua_State* l) if(x < XRES && y < YRES){ if(lua_isnumber(l, 3)){ t = luaL_optint(l, 3, 0); - if (t<0 || t >= PT_NUM || !luacon_sim->ptypes[t].enabled) + if (t<0 || t >= PT_NUM || !luacon_sim->elements[t].Enabled) return luaL_error(l, "Unrecognised element number '%d'", t); } else { name = (char*)luaL_optstring(l, 3, "dust"); diff --git a/src/elements/O2.cpp b/src/elements/O2.cpp deleted file mode 100644 index 864d9e8..0000000 --- a/src/elements/O2.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "simulation/Element.h" - -int update_O2(UPDATE_FUNC_ARGS) -{ - int r,rx,ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>=0 && x+rx>8].temp+=(rand()/(RAND_MAX/100)); - if(parts[r>>8].tmp&0x01) - parts[r>>8].temp=3473; - parts[r>>8].tmp |= 2; - } - if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM) - { - sim->create_part(i,x,y,PT_FIRE); - parts[i].temp+=(rand()/(RAND_MAX/100)); - parts[i].tmp |= 2; - } - - } - return 0; -} diff --git a/src/elements/acel.cpp b/src/elements/acel.cpp deleted file mode 100644 index 0d69894..0000000 --- a/src/elements/acel.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "simulation/Element.h" - -int update_ACEL(UPDATE_FUNC_ARGS) { - int r, rx, ry; - parts[i].tmp = 0; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; - if ((r>>8)>=NPART || !r) - continue; - if(sim->ptypes[r&0xFF].properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) - { - parts[r>>8].vx *= 1.1f; - parts[r>>8].vy *= 1.1f; - parts[i].tmp = 1; - } - } - return 0; -} - -int graphics_ACEL(GRAPHICS_FUNC_ARGS) -{ - if(cpart->tmp) - *pixel_mode |= PMODE_GLOW; - return 0; -} -int update_DCEL(UPDATE_FUNC_ARGS) { - int r, rx, ry; - parts[i].tmp = 0; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; - if ((r>>8)>=NPART || !r) - continue; - if(sim->ptypes[r&0xFF].properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) - { - parts[r>>8].vx *= 0.9f; - parts[r>>8].vy *= 0.9f; - parts[i].tmp = 1; - } - } - return 0; -} - -int graphics_DCEL(GRAPHICS_FUNC_ARGS) -{ - if(cpart->tmp) - *pixel_mode |= PMODE_GLOW; - return 0; -} diff --git a/src/elements/acid.cpp b/src/elements/acid.cpp deleted file mode 100644 index 8d881fd..0000000 --- a/src/elements/acid.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include "simulation/Element.h" - -int update_ACID(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, np; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxpart_change_type(i,x,y,PT_FIRE); - sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); - parts[i].life = 4; - parts[r>>8].life = 4; - } - else if ((r&0xFF)==PT_WTRV) - { - if(!(rand()%250)) - { - sim->part_change_type(i, x, y, PT_CAUS); - parts[i].life = (rand()%50)+25; - sim->kill_part(r>>8); - } - } - else if (((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && sim->ptypes[r&0xFF].hardness>(rand()%1000))&&parts[i].life>=50) - { - if (sim->parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid - { - float newtemp = ((60.0f-(float)sim->ptypes[r&0xFF].hardness))*7.0f; - if(newtemp < 0){ - newtemp = 0; - } - parts[i].temp += newtemp; - parts[i].life--; - sim->kill_part(r>>8); - } - } - else if (parts[i].life<=50) - { - sim->kill_part(i); - return 1; - } - } - } - for ( trade = 0; trade<2; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rx>8)>=NPART || !r) - continue; - if ((r&0xFF)==PT_ACID&&(parts[i].life>parts[r>>8].life)&&parts[i].life>0)//diffusion - { - int temp = parts[i].life - parts[r>>8].life; - if (temp ==1) - { - parts[r>>8].life ++; - parts[i].life --; - } - else if (temp>0) - { - parts[r>>8].life += temp/2; - parts[i].life -= temp/2; - } - } - } - } - return 0; -} diff --git a/src/elements/amtr.cpp b/src/elements/amtr.cpp deleted file mode 100644 index 5ff4529..0000000 --- a/src/elements/amtr.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "simulation/Element.h" - -int update_AMTR(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxkill_part(i); - return 1; - } - if (10>(rand()/(RAND_MAX/100))) - sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); - else - sim->kill_part(r>>8); - sim->pv[y/CELL][x/CELL] -= 2.0f; - } - } - return 0; -} diff --git a/src/elements/anar.cpp b/src/elements/anar.cpp deleted file mode 100644 index 6db0d2e..0000000 --- a/src/elements/anar.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "simulation/Element.h" - -int update_ANAR(UPDATE_FUNC_ARGS) { - int r, rx, ry; - - //if (parts[i].temp >= 0.23) - // parts[i].temp --; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%22) - { - sim->part_change_type(i,x,y,PT_HFLM); - parts[i].life = rand()%150+50; - parts[r>>8].temp = parts[i].temp = 0; - sim->pv[y/CELL][x/CELL] -= 0.5; - } - } - } - return 0; -} diff --git a/src/elements/aray.cpp b/src/elements/aray.cpp deleted file mode 100644 index a4e8c63..0000000 --- a/src/elements/aray.cpp +++ /dev/null @@ -1,103 +0,0 @@ -#include "simulation/Element.h" - -int update_ARAY(UPDATE_FUNC_ARGS) { - int r, nxx, nyy, docontinue, nxi, nyi, rx, ry, nr, ry1, rx1; - if (parts[i].life==0) { - int colored =0; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life==3) { - int destroy = (parts[r>>8].ctype==PT_PSCN)?1:0; - int nostop = (parts[r>>8].ctype==PT_INST)?1:0; - for (docontinue = 1, nxx = 0, nyy = 0, nxi = rx*-1, nyi = ry*-1; docontinue; nyy+=nyi, nxx+=nxi) { - if (!(x+nxi+nxx= 0 && y+nyi+nyy >= 0)) { - break; - } - r = pmap[y+nyi+nyy][x+nxi+nxx]; - if (!r) { - int nr = sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_BRAY); - if (nr!=-1) { - if (destroy) {//if it came from PSCN - parts[nr].tmp = 2; - parts[nr].life = 2; - } else - parts[nr].ctype = colored; - parts[nr].temp = parts[i].temp; - } - } else if (!destroy) { - if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==0) {//if it hits another BRAY that isn't red - if (nyy!=0 || nxx!=0) { - parts[r>>8].life = 1020;//makes it last a while - parts[r>>8].tmp = 1; - if (!parts[r>>8].ctype)//and colors it if it isn't already - parts[r>>8].ctype = colored; - } - docontinue = 0;//then stop it - } else if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==1) {//if it hits one that already was a long life, reset it - parts[r>>8].life = 1020; - //docontinue = 1; - } else if ((r&0xFF)==PT_FILT) {//get color if passed through FILT - colored = parts[r>>8].ctype; - //this if prevents BRAY from stopping on certain materials - } else if ((r&0xFF)!=PT_STOR && (r&0xFF)!=PT_INWR && ((r&0xFF)!=PT_SPRK || parts[r>>8].ctype!=PT_INWR) && (r&0xFF)!=PT_ARAY && (r&0xFF)!=PT_WIFI && !((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { - if (nyy!=0 || nxx!=0) { - sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK); - } - if (!(nostop && parts[r>>8].type==PT_SPRK && parts[r>>8].ctype >= 0 && parts[r>>8].ctype < PT_NUM && (sim->ptypes[parts[r>>8].ctype].properties&PROP_CONDUCTS))) { - docontinue = 0; - } else { - docontinue = 1; - } - } else if((r&0xFF)==PT_STOR) { - if(parts[r>>8].tmp) - { - //Cause STOR to release - for(ry1 = 1; ry1 >= -1; ry1--){ - for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ - int np = sim->create_part(-1, x+nxi+nxx+rx1, y+nyi+nyy+ry1, parts[r>>8].tmp); - if (np!=-1) - { - parts[np].temp = parts[r>>8].temp; - parts[np].life = parts[r>>8].tmp2; - parts[np].tmp = parts[r>>8].pavg[0]; - parts[np].ctype = parts[r>>8].pavg[1]; - parts[r>>8].tmp = 0; - parts[r>>8].life = 10; - break; - } - } - } - } - else - { - parts[r>>8].life = 10; - } - } - } else if (destroy) { - if ((r&0xFF)==PT_BRAY) { - parts[r>>8].life = 1; - docontinue = 1; - //this if prevents red BRAY from stopping on certain materials - } else if ((r&0xFF)==PT_STOR || (r&0xFF)==PT_INWR || ((r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_INWR) || (r&0xFF)==PT_ARAY || (r&0xFF)==PT_WIFI || (r&0xFF)==PT_FILT || ((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { - if((r&0xFF)==PT_STOR) - { - parts[r>>8].tmp = 0; - parts[r>>8].life = 0; - } - docontinue = 1; - } else { - docontinue = 0; - } - } - } - } - //parts[i].life = 4; - } - } - return 0; -} diff --git a/src/elements/bang.cpp b/src/elements/bang.cpp deleted file mode 100644 index 7a1f673..0000000 --- a/src/elements/bang.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include "simulation/Element.h" - -int update_BANG(UPDATE_FUNC_ARGS) { - int r, rx, ry, nb; - if(parts[i].tmp==0) - { - if(parts[i].temp>=673.0f) - parts[i].tmp = 1; - else - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxflood_prop(x, y, offsetof(Particle, tmp), &tempvalue, 0); - } - else if(parts[i].tmp==2) - { - parts[i].tmp = 3; - } - else if(parts[i].tmp>=3) - { - float otemp = parts[i].temp-275.13f; - //Explode!! - sim->pv[y/CELL][x/CELL] += 0.5f; - parts[i].tmp = 0; - if(!(rand()%3)) - { - if(!(rand()%2)) - { - sim->create_part(i, x, y, PT_FIRE); - parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); - } - else - { - sim->create_part(i, x, y, PT_SMKE); - parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); - } - } - else - { - if(!(rand()%15)) - { - sim->create_part(i, x, y, PT_BOMB); - parts[i].tmp = 1; - parts[i].life = 50; - parts[i].temp = restrict_flt((MAX_TEMP/3)+otemp, MIN_TEMP, MAX_TEMP); - parts[i].vx = rand()%20-10; - parts[i].vy = rand()%20-10; - } - else - { - sim->kill_part(i); - } - } - return 1; - } - return 0; -} diff --git a/src/elements/bcln.cpp b/src/elements/bcln.cpp deleted file mode 100644 index 702b322..0000000 --- a/src/elements/bcln.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "simulation/Element.h" - -int update_BCLN(UPDATE_FUNC_ARGS) { - if (!parts[i].life && sim->pv[y/CELL][x/CELL]>4.0f) - parts[i].life = rand()%40+80; - if (parts[i].life) - { - float advection = 0.1f; - parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; - parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; - } - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) - { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && - (r&0xFF)!=PT_STKM2 && (r&0xFF)!=PT_PBCN && - (r&0xFF)>8].ctype; - } - } - } - else { - if (parts[i].ctype==PT_LIFE) sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); - else sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); - } - return 0; -} diff --git a/src/elements/bcol.cpp b/src/elements/bcol.cpp deleted file mode 100644 index d727abf..0000000 --- a/src/elements/bcol.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include "simulation/Element.h" - -int update_BCOL(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, temp; - if (parts[i].life<=0) { - sim->create_part(i, x, y, PT_FIRE); - return 1; - } else if (parts[i].life < 100) { - parts[i].life--; - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); - } - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) - { - if (parts[i].life>100) { - parts[i].life = 99; - } - } - if ((r&0xFF)==PT_LAVA && 1>(rand()%500)) - { - if (parts[r>>8].ctype == PT_IRON) { - parts[r>>8].ctype = PT_METL; - sim->kill_part(i); - return 1; - } - } - } - /*if(100-parts[i].life > parts[i].tmp2) - parts[i].tmp2 = 100-parts[i].life; - if(parts[i].tmp2 < 0) parts[i].tmp2 = 0; - for ( trade = 0; trade<4; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion - { - int temp = parts[i].tmp2 - parts[r>>8].tmp2; - if(temp < 10) - continue; - if (temp ==1) - { - parts[r>>8].tmp2 ++; - parts[i].tmp2 --; - } - else if (temp>0) - { - parts[r>>8].tmp2 += temp/2; - parts[i].tmp2 -= temp/2; - } - } - } - }*/ - if(parts[i].temp > parts[i].tmp2) - parts[i].tmp2 = parts[i].temp; - return 0; -} diff --git a/src/elements/bizr.cpp b/src/elements/bizr.cpp deleted file mode 100644 index aae09d9..0000000 --- a/src/elements/bizr.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "simulation/Element.h" - -//Used by ALL 3 BIZR states -int update_BIZR(UPDATE_FUNC_ARGS) { - int r, rx, ry, nr, ng, nb, na; - float tr, tg, tb, ta, mr, mg, mb, ma; - float blend; - if(parts[i].dcolour){ - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; - tg = (parts[r>>8].dcolour>>8)&0xFF; - tb = (parts[r>>8].dcolour)&0xFF; - ta = (parts[r>>8].dcolour>>24)&0xFF; - - mr = (parts[i].dcolour>>16)&0xFF; - mg = (parts[i].dcolour>>8)&0xFF; - mb = (parts[i].dcolour)&0xFF; - ma = (parts[i].dcolour>>24)&0xFF; - - nr = (tr*blend) + (mr*(1-blend)); - ng = (tg*blend) + (mg*(1-blend)); - nb = (tb*blend) + (mb*(1-blend)); - na = (ta*blend) + (ma*(1-blend)); - - parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; - } - } - } - if(((r = sim->photons[y][x])&0xFF)==PT_PHOT || ((r = pmap[y][x])&0xFF)==PT_PHOT) - { - sim->part_change_type(r>>8, x, y, PT_ELEC); - parts[r>>8].ctype = 0; - } - return 0; -} diff --git a/src/elements/bmtl.cpp b/src/elements/bmtl.cpp deleted file mode 100644 index 8682561..0000000 --- a/src/elements/bmtl.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "simulation/Element.h" - -int update_BMTL(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, tempFactor; - if (parts[i].tmp>1) - { - parts[i].tmp--; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type; - if ((rt==PT_METL || rt==PT_IRON) && 1>(rand()/(RAND_MAX/100))) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_BMTL); - parts[r>>8].tmp=(parts[i].tmp<=7)?parts[i].tmp=1:parts[i].tmp-(rand()%5);//rand()/(RAND_MAX/300)+100; - } - } - } - else if (parts[i].tmp==1 && 1>rand()%1000) - { - parts[i].tmp = 0; - sim->part_change_type(i,x,y,PT_BRMT); - } - return 0; -} diff --git a/src/elements/bomb.cpp b/src/elements/bomb.cpp deleted file mode 100644 index 99eb7f0..0000000 --- a/src/elements/bomb.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include "simulation/Element.h" - -int update_BOMB(UPDATE_FUNC_ARGS) { - int r, rx, ry, nb; - //Spark is used so much now that it should be a seperate element. - if (parts[i].tmp==1) { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties & (TYPE_SOLID | TYPE_PART | TYPE_LIQUID)) && !(sim->ptypes[r&0xFF].properties & PROP_SPARKSETTLE)) { - sim->kill_part(i); - return 1; - } - } - } else if (parts[i].tmp==0) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+nxi, y+nxj, PT_BOMB); - if (nb!=-1) { - parts[nb].tmp = 1; - parts[nb].life = 50; - parts[nb].temp = MAX_TEMP; - parts[nb].vx = rand()%20-10; - parts[nb].vy = rand()%20-10; - } - } - for (nxj=-rad; nxj<=rad; nxj++) - for (nxi=-rad; nxi<=rad; nxi++) - if ((pow((float)nxi,2))/(pow((float)rad,2))+(pow((float)nxj,2))/(pow((float)rad,2))<=1) - if ((pmap[y+nxj][x+nxi]&0xFF)!=PT_DMND && (pmap[y+nxj][x+nxi]&0xFF)!=PT_CLNE && (pmap[y+nxj][x+nxi]&0xFF)!=PT_PCLN && (pmap[y+nxj][x+nxi]&0xFF)!=PT_BCLN) { - sim->delete_part(x+nxi, y+nxj, 0);//it SHOULD kill anything but the exceptions above, doesn't seem to always work - sim->pv[(y+nxj)/CELL][(x+nxi)/CELL] += 0.1f; - nb = sim->create_part(-1, x+nxi, y+nxj, PT_BOMB); - if (nb!=-1) { - parts[nb].tmp = 2; - parts[nb].life = 2; - parts[nb].temp = MAX_TEMP; - } - } - //create_parts(x, y, 9, 9, PT_BOMB); - //create_parts(x, y, 8, 8, PT_NONE); - sim->kill_part(i); - return 1; - } - } - } - return 0; -} -int graphics_BOMB(GRAPHICS_FUNC_ARGS) -{ - if (cpart->tmp==0) { - //Normal bomb - *pixel_mode |= PMODE_FLARE; - } - else if(cpart->tmp==2) - { - //Flash - *pixel_mode = PMODE_FLAT | FIRE_ADD; - *colr = *colg = *colb = *firer = *fireg = *fireb = *firea = 255; - } - else - { - //Flying spark - *pixel_mode = PMODE_SPARK | PMODE_ADD; - *cola = 4*cpart->life; - } - return 0; -} diff --git a/src/elements/boyl.cpp b/src/elements/boyl.cpp deleted file mode 100644 index 7c0fc24..0000000 --- a/src/elements/boyl.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "simulation/Element.h" - -int update_BOYL(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (sim->pv[y/CELL][x/CELL]<(parts[i].temp/100)) - sim->pv[y/CELL][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL]); - if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp/100)) - sim->pv[y/CELL+1][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL+1][x/CELL]); - if (x+CELLpv[y/CELL][x/CELL+1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL+1]); - if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL+1][x/CELL+1]); - } - if (y-CELL>=0 && sim->pv[y/CELL-1][x/CELL]<(parts[i].temp/100)) - sim->pv[y/CELL-1][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL-1][x/CELL]); - if (x-CELL>=0) - { - sim->pv[y/CELL][x/CELL-1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL-1]); - if (y-CELL>=0) - sim->pv[y/CELL-1][x/CELL-1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL-1][x/CELL-1]); - } - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && - x+rxrand()%30) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_FOG); - } - else if ((r&0xFF)==PT_O2 && 1>rand()%9) - { - sim->kill_part(r>>8); - sim->part_change_type(i,x,y,PT_WATR); - sim->pv[y/CELL][x/CELL] += 4.0; - } - } - return 0; -} diff --git a/src/elements/brmt.cpp b/src/elements/brmt.cpp deleted file mode 100644 index c5be61f..0000000 --- a/src/elements/brmt.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "simulation/Element.h" - -int update_BRMT(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, tempFactor; - if (parts[i].temp > (250.0f+273.15f)) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type; - tempFactor = 1000 - (((250.0f+273.15f)-parts[i].temp)*2); - if(tempFactor < 2) - tempFactor = 2; - if ((rt==PT_BREC) && 1 > (rand()%tempFactor)) - { - if(rand()%2) - { - sim->create_part(r>>8, x+rx, y+ry, PT_THRM); - } - else - { sim->create_part(i, x, y, PT_THRM); - } - return 1; - //part_change_type(r>>8,x+rx,y+ry,PT_BMTL); - //parts[r>>8].tmp=(parts[i].tmp<=7)?parts[i].tmp=1:parts[i].tmp-(rand()%5);//rand()/(RAND_MAX/300)+100; - } - } - } - return 0; -} diff --git a/src/elements/btry.cpp b/src/elements/btry.cpp deleted file mode 100644 index 0168e08..0000000 --- a/src/elements/btry.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "simulation/Element.h" - -int update_BTRY(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type; - if (sim->parts_avg(i,r>>8,PT_INSL) != PT_INSL) - { - if ((sim->ptypes[rt].properties&PROP_CONDUCTS) && !(rt==PT_WATR||rt==PT_SLTW||rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR) && parts[r>>8].life==0 && abs(rx)+abs(ry) < 4) - { - parts[r>>8].life = 4; - parts[r>>8].ctype = rt; - sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - } - } - } - return 0; -} diff --git a/src/elements/c5.cpp b/src/elements/c5.cpp deleted file mode 100644 index 8a10915..0000000 --- a/src/elements/c5.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "simulation/Element.h" - -int update_C5(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].temp<100)||(r&0xFF)==PT_HFLM) - { - if (1>rand()%6) - { - sim->part_change_type(i,x,y,PT_HFLM); - parts[r>>8].temp = parts[i].temp = 0; - parts[i].life = rand()%150+50; - sim->pv[y/CELL][x/CELL] += 1.5; - } - } - } - return 0; -} diff --git a/src/elements/caus.cpp b/src/elements/caus.cpp deleted file mode 100644 index fb71969..0000000 --- a/src/elements/caus.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "simulation/Element.h" - -int update_CAUS(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, np; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].hardness>(rand()%1000))&&parts[i].life>=50) - { - if (sim->parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid - { - float newtemp = ((60.0f-(float)sim->ptypes[r&0xFF].hardness))*7.0f; - if(newtemp < 0){ - newtemp = 0; - } - parts[i].temp += newtemp; - parts[i].life--; - sim->kill_part(r>>8); - } - } - else if (parts[i].life<=50) - { - sim->kill_part(i); - return 1; - } - } - } - return 0; -} diff --git a/src/elements/cbnw.cpp b/src/elements/cbnw.cpp deleted file mode 100644 index b480ed5..0000000 --- a/src/elements/cbnw.cpp +++ /dev/null @@ -1,90 +0,0 @@ -#include "simulation/Element.h" - -int update_CBNW(UPDATE_FUNC_ARGS) { - int r, rx, ry, oldt; - oldt = parts[i].tmp; - if (sim->pv[y/CELL][x/CELL]<=3) - { - if(20>(rand()%80000)) - { - sim->part_change_type(i,x,y,PT_CO2); - parts[i].ctype = 5; - sim->pv[y/CELL][x/CELL] += 0.5f; - } - else if(sim->pv[y/CELL][x/CELL]<=-0.5) - { - sim->part_change_type(i,x,y,PT_CO2); - parts[i].ctype = 5; - sim->pv[y/CELL][x/CELL] += 0.5f; - } - } - if (parts[i].tmp>0) - parts[i].tmp--; - if(!(rand()%200)) - { - parts[i].tmp2 = rand()%40; - } else if(parts[i].tmp2!=20) { - parts[i].tmp2 -= (parts[i].tmp2>20)?1:-1; - } - if(oldt==1) - { - //Explode - if(rand()%4) - { - sim->part_change_type(i,x,y,PT_CO2); - parts[i].ctype = 5; - sim->pv[y/CELL][x/CELL] += 0.2f; - } - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties&TYPE_PART) && parts[i].tmp == 0 && 1>(rand()%250)) - { - //Start explode - parts[i].tmp = rand()%25;//(rand()%100)+50; - } - else if((sim->ptypes[r&0xFF].properties&TYPE_SOLID) && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_GLAS && parts[i].tmp == 0 && (2-sim->pv[y/CELL][x/CELL])>(rand()%20000)) - { - if(rand()%2) - { - sim->part_change_type(i,x,y,PT_CO2); - parts[i].ctype = 5; - sim->pv[y/CELL][x/CELL] += 0.2f; - } - } - if ((r&0xFF)==PT_CBNW) - { - if(!parts[i].tmp && parts[r>>8].tmp) - { - parts[i].tmp = parts[r>>8].tmp; - if((r>>8)>i) //If the other particle hasn't been life updated - parts[i].tmp--; - } - else if(parts[i].tmp && !parts[r>>8].tmp) - { - parts[r>>8].tmp = parts[i].tmp; - if((r>>8)>i) //If the other particle hasn't been life updated - parts[r>>8].tmp++; - } - } - if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - parts[i].ctype = PT_WATR; - } - if ((r&0xFF)==PT_FIRE && parts[r>>8].ctype!=PT_WATR){ - sim->kill_part(r>>8); - if(1>(rand()%150)){ - sim->kill_part(i); - return 1; - } - } - } - return 0; -} diff --git a/src/elements/clne.cpp b/src/elements/clne.cpp deleted file mode 100644 index 303908e..0000000 --- a/src/elements/clne.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "simulation/Element.h" - -int update_CLNE(UPDATE_FUNC_ARGS) { - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) - { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && - (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && - (r&0xFF)>8].ctype; - } - } - } - else { - if (parts[i].ctype==PT_LIFE) sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); - else sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); - } - return 0; -} diff --git a/src/elements/clst.cpp b/src/elements/clst.cpp deleted file mode 100644 index f8653be..0000000 --- a/src/elements/clst.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "simulation/Element.h" - -int update_CLST(UPDATE_FUNC_ARGS) { - int r, rx, ry; - float cxy; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%1500)) - { - sim->part_change_type(i,x,y,PT_PSTS); - sim->kill_part(r>>8); - } - if ((r&0xFF)==PT_NITR) - { - sim->create_part(i, x, y, PT_BANG); - sim->create_part(r>>8, x+rx, y+ry, PT_BANG); - } - if ((r&0xFF)==PT_CLST) - { - if(parts[i].temp <195) - cxy = 0.05; - if(parts[i].temp >= 195 && parts[i].temp <295) - cxy = 0.015; - if(parts[i].temp >= 295 && parts[i].temp <350) - cxy = 0.01; - if(parts[i].temp > 350) - cxy = 0.005; - parts[i].vx += cxy*rx; - parts[i].vy += cxy*ry;//These two can be set not to calculate over 350 later. They do virtually nothing over 0.005. - } - } - return 0; -} diff --git a/src/elements/co2.cpp b/src/elements/co2.cpp deleted file mode 100644 index b267a73..0000000 --- a/src/elements/co2.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#include "simulation/Element.h" - -int update_CO2(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%40000)&&parts[i].ctype==5) - { - parts[i].ctype = 0; - sim->create_part(-3, x, y, PT_WATR); - } - if ((r>>8)>=NPART || !r) - continue; - if ((r&0xFF)==PT_FIRE){ - sim->kill_part(r>>8); - if(1>(rand()%150)){ - sim->kill_part(i); - return 1; - } - } - if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW) && 1>(rand()%250)) - { - sim->part_change_type(i,x,y,PT_CBNW); - sim->kill_part(r>>8); - } - } - if (parts[i].temp > 9773.15 && sim->pv[y/CELL][x/CELL] > 200.0f) - { - if (rand()%5 < 1) - { - int j; - sim->kill_part(i); - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) parts[j].temp = 15000; - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) parts[j].temp = 15000; - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_O2); if (j != -1) parts[j].temp = 15000; - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_SING); if (j != -1) { parts[j].temp = 15000; parts[i].life = rand()%100+450; } - - parts[i].temp += 15000; - sim->pv[y/CELL][x/CELL] += 100; - } - } - return 0; -} diff --git a/src/elements/coal.cpp b/src/elements/coal.cpp deleted file mode 100644 index 23d20ba..0000000 --- a/src/elements/coal.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include "simulation/Element.h" - -int update_COAL(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, temp; - if (parts[i].life<=0) { - sim->create_part(i, x, y, PT_FIRE); - return 1; - } else if (parts[i].life < 100) { - parts[i].life--; - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); - } - if ((sim->pv[y/CELL][x/CELL] > 4.3f)&&parts[i].tmp>40) - parts[i].tmp=39; - else if (parts[i].tmp<40&&parts[i].tmp>0) - parts[i].tmp--; - else if (parts[i].tmp<=0) { - sim->create_part(i, x, y, PT_BCOL); - return 1; - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) - { - if (parts[i].life>100) { - parts[i].life = 99; - } - } - if ((r&0xFF)==PT_LAVA && 1>(rand()%500)) - { - if (parts[r>>8].ctype == PT_IRON) { - parts[r>>8].ctype = PT_METL; - sim->kill_part(i); - return 1; - } - } - } - /*if(100-parts[i].life > parts[i].tmp2) - parts[i].tmp2 = 100-parts[i].life; - if(parts[i].tmp2 < 0) parts[i].tmp2 = 0; - for ( trade = 0; trade<4; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion - { - int temp = parts[i].tmp2 - parts[r>>8].tmp2; - if(temp < 10) - continue; - if (temp ==1) - { - parts[r>>8].tmp2 ++; - parts[i].tmp2 --; - } - else if (temp>0) - { - parts[r>>8].tmp2 += temp/2; - parts[i].tmp2 -= temp/2; - } - } - } - }*/ - if(parts[i].temp > parts[i].tmp2) - parts[i].tmp2 = parts[i].temp; - return 0; -} diff --git a/src/elements/conv.cpp b/src/elements/conv.cpp deleted file mode 100644 index a62cd55..0000000 --- a/src/elements/conv.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "simulation/Element.h" - -int update_CONV(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && - (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && - (r&0xFF)!=PT_CONV && (r&0xFF)>8].ctype; - } - } - } - else if(parts[i].ctype>0 && parts[i].ctype=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if((r&0xFF)!=PT_CONV && (r&0xFF)!=parts[i].ctype) - { - if (parts[i].ctype==PT_LIFE) sim->create_part(r>>8, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); - else sim->create_part(r>>8, x+rx, y+ry, parts[i].ctype); - } - } - } - return 0; -} diff --git a/src/elements/dest.cpp b/src/elements/dest.cpp deleted file mode 100644 index 5c18d55..0000000 --- a/src/elements/dest.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "simulation/Element.h" - -int update_DEST(UPDATE_FUNC_ARGS) { - int r,rx,ry,topv; - rx=rand()%5-2; - ry=rand()%5-2; - - r = pmap[y+ry][x+rx]; - if (!r || (r&0xFF)==PT_DEST || (r&0xFF)==PT_DMND || (r&0xFF)==PT_BCLN || (r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN || (r&0xFF)==PT_PBCN) - return 0; - - if (parts[i].life<=0 || parts[i].life>37) - { - parts[i].life=30+rand()%20; - parts[i].temp+=20000; - sim->pv[y/CELL][x/CELL]+=60.0f; - } - parts[i].temp+=10000; - if ((r&0xFF)==PT_PLUT || (r&0xFF)==PT_DEUT) - { - sim->pv[y/CELL][x/CELL]+=20.0f; - parts[i].temp+=18000; - if (rand()%2==0) - { - float orig_temp = parts[r>>8].temp; - sim->create_part(r>>8, x+rx, y+ry, PT_NEUT); - parts[r>>8].temp = restrict_flt(orig_temp+40000.0f, MIN_TEMP, MAX_TEMP); - sim->pv[y/CELL][x/CELL] += 10.0f; - parts[i].life-=4; - } - } - else if ((r&0xFF)==PT_INSL) - { - sim->create_part(r>>8, x+rx, y+ry, PT_PLSM); - } - else if (rand()%3==0) - { - sim->kill_part(r>>8); - parts[i].life -= 4*((sim->ptypes[r&0xFF].properties&TYPE_SOLID)?3:1); - if (parts[i].life<=0) - parts[i].life=1; - parts[i].temp+=10000; - } - else - { - if (sim->ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+10000.0f, MIN_TEMP, MAX_TEMP); - } - topv=sim->pv[y/CELL][x/CELL]/9+parts[r>>8].temp/900; - if (topv>40.0f) - topv=40.0f; - sim->pv[y/CELL][x/CELL]+=40.0f+topv; - parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); - return 0; -} -int graphics_DEST(GRAPHICS_FUNC_ARGS) -{ - if(cpart->life) - { - *pixel_mode |= PMODE_LFLARE; - } - else - { - *pixel_mode |= PMODE_SPARK; - } - return 0; -} diff --git a/src/elements/deut.cpp b/src/elements/deut.cpp deleted file mode 100644 index 98fa69b..0000000 --- a/src/elements/deut.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include "simulation/Element.h" - -int update_DEUT(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, np; - float gravtot = fabs(sim->gravy[(y/CELL)*(XRES/CELL)+(x/CELL)])+fabs(sim->gravx[(y/CELL)*(XRES/CELL)+(x/CELL)]); - int maxlife = ((10000/(parts[i].temp + 1))-1); - if ((10000%((int)parts[i].temp+1))>rand()%((int)parts[i].temp+1)) - maxlife ++; - // Compress when Newtonian gravity is applied - // multiplier=1 when gravtot=0, multiplier -> 5 as gravtot -> inf - maxlife = maxlife*(5.0f - 8.0f/(gravtot+2.0f)); - if (parts[i].life < maxlife) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=maxlife)) - continue; - if ((r&0xFF)==PT_DEUT&&33>=rand()/(RAND_MAX/100)+1) - { - if ((parts[i].life + parts[r>>8].life + 1) <= maxlife) - { - parts[i].life += parts[r>>8].life + 1; - sim->kill_part(r>>8); - } - } - } - } - else - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create deut - { - np = sim->create_part(-1,x+rx,y+ry,PT_DEUT); - if (np<0) continue; - parts[i].life--; - parts[np].temp = parts[i].temp; - parts[np].life = 0; - } - } - for ( trade = 0; trade<4; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].life)&&parts[i].life>0)//diffusion - { - int temp = parts[i].life - parts[r>>8].life; - if (temp ==1) - { - parts[r>>8].life ++; - parts[i].life --; - } - else if (temp>0) - { - parts[r>>8].life += temp/2; - parts[i].life -= temp/2; - } - } - } - } - return 0; -} - -int graphics_DEUT(GRAPHICS_FUNC_ARGS) -{ - if(cpart->life>=700) - { - *firea = 60; - *firer = *colr += cpart->life*1; - *fireg = *colg += cpart->life*2; - *fireb = *colb += cpart->life*3; - *pixel_mode |= PMODE_GLOW | FIRE_ADD; - } - else - { - *colr += cpart->life*1; - *colg += cpart->life*2; - *colb += cpart->life*3; - *pixel_mode |= PMODE_BLUR; - } - return 0; -} diff --git a/src/elements/dlay.cpp b/src/elements/dlay.cpp deleted file mode 100644 index fe2d175..0000000 --- a/src/elements/dlay.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include "simulation/Element.h" - -int update_DLAY(UPDATE_FUNC_ARGS) { - int r, rx, ry, oldl; - oldl = parts[i].life; - if (parts[i].life>0) - parts[i].life--; - //if (parts[i].life==1) - //{ - if (parts[i].temp>=MAX_TEMP+273.15f) - parts[i].temp = MAX_TEMP+273.15f; - if (parts[i].temp<= 1.0f+273.15f) - parts[i].temp = 1.0f+273.15f; - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxparts_avg(r>>8, i,PT_INSL)==PT_INSL) - continue; - if ((r&0xFF)==PT_SPRK && parts[i].life==0 && parts[r>>8].life>0 && parts[r>>8].life<4 && parts[r>>8].ctype==PT_PSCN) - { - parts[i].life = (int)(parts[i].temp-273.15); - } - else if ((r&0xFF)==PT_DLAY) - { - if(!parts[i].life && parts[r>>8].life) - { - parts[i].life = parts[r>>8].life; - if((r>>8)>i) //If the other particle hasn't been life updated - parts[i].life--; - } - else if(parts[i].life && !parts[r>>8].life) - { - parts[r>>8].life = parts[i].life; - if((r>>8)>i) //If the other particle hasn't been life updated - parts[r>>8].life++; - } - } - else if((r&0xFF)==PT_NSCN && oldl==1) - { - sim->create_part(-1, x+rx, y+ry, PT_SPRK); - } - } - //} - return 0; -} diff --git a/src/elements/dstw.cpp b/src/elements/dstw.cpp deleted file mode 100644 index 21d7db2..0000000 --- a/src/elements/dstw.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "simulation/Element.h" - -int update_DSTW(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) - { - sim->part_change_type(i,x,y,PT_SLTW); - sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); - } - if (((r&0xFF)==PT_WATR||(r&0xFF)==PT_SLTW) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_WATR); - } - if ((r&0xFF)==PT_SLTW && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_SLTW); - } - if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>12.0f) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - } - if ((r&0xFF)==PT_FIRE){ - sim->kill_part(r>>8); - if(1>(rand()%150)){ - sim->kill_part(i); - return 1; - } - } - } - return 0; -} diff --git a/src/elements/elec.cpp b/src/elements/elec.cpp deleted file mode 100644 index 317d9f5..0000000 --- a/src/elements/elec.cpp +++ /dev/null @@ -1,101 +0,0 @@ -#include "simulation/Element.h" - -int update_ELEC(UPDATE_FUNC_ARGS) { - int r, rt, rx, ry, nb, rrx, rry; - float rr, rrr; - parts[i].pavg[0] = x; - parts[i].pavg[1] = y; - if(pmap[y][x]==PT_GLOW) - { - sim->part_change_type(i, x, y, PT_PHOT); - } - for (rx=-2; rx<=2; rx++) - for (ry=-2; ry<=2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)==PT_GLAS) - { - //fire_r[y/CELL][x/CELL] += rand()%200; //D: Doesn't work with OpenGL, also shouldn't be here TODO: FIX THIS SHIT - //fire_g[y/CELL][x/CELL] += rand()%200; - //fire_b[y/CELL][x/CELL] += rand()%200; - for (rrx=-1; rrx<=1; rrx++) - { - for (rry=-1; rry<=1; rry++) - { - if (x+rx+rrx>=0 && y+ry+rry>=0 && x+rx+rrxcreate_part(-1, x+rx+rrx, y+ry+rry, PT_BOMB); - if (nb!=-1) { - parts[nb].tmp = 1; - parts[nb].life = 50; - parts[nb].temp = 400.0f; - parts[nb].vx = rand()%20-10; - parts[nb].vy = rand()%20-10; - } - } - } - } - sim->kill_part(i); - return 1; - } - if ((r&0xFF)==PT_LCRY) - { - parts[r>>8].tmp2 = 5+rand()%5; - } - if ((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_CBNW) - { - if(rand()%2) - { - sim->create_part(r>>8, x+rx, y+ry, PT_H2); - sim->part_change_type(i, x, y, PT_O2); - parts[i].life = 0; - parts[i].ctype = 0; - return 1; - } - else - { - sim->create_part(r>>8, x+rx, y+ry, PT_O2); - sim->part_change_type(i, x, y, PT_H2); - parts[i].life = 0; - parts[i].ctype = 0; - return 1; - } - } - if ((r&0xFF)==PT_NEUT) - { - sim->part_change_type(r>>8, x+rx, y+ry, PT_H2); - parts[r>>8].life = 0; - parts[r>>8].ctype = 0; - } - if ((r&0xFF)==PT_DEUT) - { - if(parts[r>>8].life < 6000) - parts[r>>8].life += 1; - parts[r>>8].temp = 0; - parts[i].temp = 0; - sim->kill_part(i); - return 1; - } - if ((sim->ptypes[r&0xFF].properties & PROP_CONDUCTS) && ((r&0xFF)!=PT_H2||parts[i].tmp!=1)) - { - sim->create_part(-1, x+rx, y+ry, PT_SPRK); - sim->kill_part(i); - return 1; - } - } - return 0; -} - -int graphics_ELEC(GRAPHICS_FUNC_ARGS) -{ - *firea = 70; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode |= FIRE_ADD; - return 0; -} diff --git a/src/elements/elementmisc.cpp b/src/elements/elementmisc.cpp deleted file mode 100644 index 4df53f4..0000000 --- a/src/elements/elementmisc.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "simulation/Element.h" - -int update_MISC(UPDATE_FUNC_ARGS) { - /*int t = parts[i].type; - if (t==PT_LOVE) - ISLOVE=1; - else if (t==PT_LOLZ) - ISLOLZ=1; - else if (t==PT_GRAV) - ISGRAV=1;*/ - return 0; -} diff --git a/src/elements/emp.cpp b/src/elements/emp.cpp deleted file mode 100644 index 6625610..0000000 --- a/src/elements/emp.cpp +++ /dev/null @@ -1,128 +0,0 @@ -#include "simulation/Element.h" - -int update_EMP(UPDATE_FUNC_ARGS) { - int r,rx,ry,ok=0,t,n,nx,ny; - if (parts[i].life) - return 0; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>=0 && x+rx>8].life>0 && parts[r>>8].life<4) - { - ok=1; - break; - } - } - if (!ok) - return 0; - parts[i].life=220; - //emp_decor+=3; TODO: Fix - //if (emp_decor>40) - // emp_decor=40; - for (r=0; r<=sim->parts_lastActiveIndex; r++) - { - t=parts[r].type; - rx=parts[r].x; - ry=parts[r].y; - if (t==PT_SPRK || (t==PT_SWCH && parts[r].life!=0 && parts[r].life!=10) || (t==PT_WIRE && parts[r].ctype>0)) - { - int is_elec=0; - if ((parts[r].ctype==PT_PSCN || parts[r].ctype==PT_NSCN || parts[r].ctype==PT_PTCT || - parts[r].ctype==PT_NTCT || parts[r].ctype==PT_INST || parts[r].ctype==PT_SWCH) || t==PT_WIRE || t==PT_SWCH) - { - is_elec=1; - if (sim->ptypes[parts[r].type].hconduct && rand()%100==0) - parts[r].temp = restrict_flt(parts[r].temp+3000.0f, MIN_TEMP, MAX_TEMP); - if (rand()%80==0) - sim->part_change_type(r, rx, ry, PT_BREC); - else if (rand()%120==0) - sim->part_change_type(r, rx, ry, PT_NTCT); - } - - for (nx=-2; nx<3; nx++) - for (ny=-2; ny<3; ny++) - if (rx+nx>=0 && ry+ny>=0 && rx+nx>8, rx+nx, ry+ny, PT_PLSM); - parts[n>>8].life=rand()%100+70; - parts[n>>8].temp+=3000; - }*/ - - //Some elements should only be affected by wire/swch, or by a spark on inst/semiconductor - //So not affected by spark on metl, watr etc - if (is_elec) - { - if (((n&0xFF)==PT_METL || (n&0xFF)==PT_BMTL) && rand()%280==0) - { - parts[n>>8].temp = restrict_flt(parts[n>>8].temp+3000.0f, MIN_TEMP, MAX_TEMP); - } - if ((n&0xFF)==PT_BMTL && rand()%160==0) - { - sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BMTL);//TODO: Redundant, was this meant to be BRMT or something? - parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); - } - if ((n&0xFF)==PT_METL && rand()%300==0) - { - sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BMTL); - } - if ((n&0xFF)==PT_WIFI && rand()%8==0) - { - //Randomise channel - parts[n>>8].temp = rand()%MAX_TEMP; - } - if ((n&0xFF)==PT_WIFI && rand()%16==0) - { - sim->create_part(n>>8, rx+nx, ry+ny, PT_BREC); - parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); - } - } - if ((n&0xFF)==PT_SWCH && rand()%100==0) - { - sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BREC); - } - if ((n&0xFF)==PT_SWCH && rand()%100==0) - { - parts[n>>8].temp = restrict_flt(parts[n>>8].temp+2000.0f, MIN_TEMP, MAX_TEMP); - } - if ((n&0xFF)==PT_ARAY && rand()%60==0) - { - sim->create_part(n>>8, rx+nx, ry+ny, PT_BREC); - parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); - } - if (t==PT_DLAY && rand()%70==0) - { - //Randomise delay - parts[n>>8].temp = (rand()%256) + 273.15f; - } - } - } - } - return 0; -} -int graphics_EMP(GRAPHICS_FUNC_ARGS) -{ - if(cpart->life) - { - *colr = cpart->life*1.5; - *colg = cpart->life*1.5; - *colb = 200-(cpart->life); - if (*colr>255) - *colr = 255; - if (*colg>255) - *colg = 255; - if (*colb>255) - *colb = 255; - if (*colb<=0) - *colb = 0; - } - return 0; -} diff --git a/src/elements/figh.cpp b/src/elements/figh.cpp deleted file mode 100644 index 6b67a27..0000000 --- a/src/elements/figh.cpp +++ /dev/null @@ -1,107 +0,0 @@ -#include "simulation/Element.h" - -int update_FIGH(UPDATE_FUNC_ARGS) -{ - playerst* figh = &sim->fighters[(unsigned char)parts[i].tmp]; - - unsigned int tarx, tary; - - parts[i].tmp2 = 0; //0 - stay in place, 1 - seek a stick man - - //Set target cords - if (sim->player.spwn && sim->player2.spwn) - { - if ((pow((float)sim->player.legs[2]-x, 2) + pow((float)sim->player.legs[3]-y, 2))<= - (pow((float)sim->player2.legs[2]-x, 2) + pow((float)sim->player2.legs[3]-y, 2))) - { - tarx = (unsigned int)sim->player.legs[2]; - tary = (unsigned int)sim->player.legs[3]; - } - else - { - tarx = (unsigned int)sim->player2.legs[2]; - tary = (unsigned int)sim->player2.legs[3]; - } - parts[i].tmp2 = 1; - } - else - { - if (sim->player.spwn) - { - tarx = (unsigned int)sim->player.legs[2]; - tary = (unsigned int)sim->player.legs[3]; - parts[i].tmp2 = 1; - } - if (sim->player2.spwn) - { - tarx = (unsigned int)sim->player2.legs[2]; - tary = (unsigned int)sim->player2.legs[3]; - parts[i].tmp2 = 1; - } - } - - switch (parts[i].tmp2) - { - case 1: - if ((pow(float(tarx-x), 2) + pow(float(tary-y), 2))<600) - { - if (figh->elem == PT_LIGH || figh->elem == PT_NEUT - || sim->ptypes[figh->elem].properties&(PROP_DEADLY|PROP_RADIOACTIVE) - || sim->ptypes[figh->elem].heat>=323 || sim->ptypes[figh->elem].heat<=243) - figh->comm = (int)figh->comm | 0x08; - } - else - if (tarxeval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+6, NULL) - && sim->eval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+3, NULL))) - figh->comm = 0x01; - else - figh->comm = 0x02; - - if (!sim->eval_move(PT_DUST, figh->legs[4]-4, figh->legs[5]-1, NULL) - || !sim->eval_move(PT_DUST, figh->legs[12]-4, figh->legs[13]-1, NULL) - || sim->eval_move(PT_DUST, 2*figh->legs[4]-figh->legs[6], figh->legs[5]+5, NULL)) - figh->comm = (int)figh->comm | 0x04; - } - else - { - if (!(sim->eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+6, NULL) - && sim->eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+3, NULL))) - figh->comm = 0x02; - else - figh->comm = 0x01; - - if (!sim->eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL) - || !sim->eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL) - || sim->eval_move(PT_DUST, 2*figh->legs[12]-figh->legs[14], figh->legs[13]+5, NULL)) - figh->comm = (int)figh->comm | 0x04; - } - break; - default: - figh->comm = 0; - break; - } - - figh->pcomm = figh->comm; - - run_stickman(figh, UPDATE_FUNC_SUBCALL_ARGS); - return 0; -} - -int graphics_FIGH(GRAPHICS_FUNC_ARGS) -{ - playerst * cplayer;// = &sim->fighters[(unsigned char)cpart->tmp]; - *pixel_mode = PSPEC_STICKMAN; - /*if (cplayer->elemptypes[cplayer->elem].pcolors); - *colg = PIXG(sim->ptypes[cplayer->elem].pcolors); - *colb = PIXB(sim->ptypes[cplayer->elem].pcolors); - } - else*/ - { - *colr = *colg = *colb = 255; - } - return 1; -} diff --git a/src/elements/fire.cpp b/src/elements/fire.cpp deleted file mode 100644 index 3f36916..0000000 --- a/src/elements/fire.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "simulation/Element.h" - -int graphics_FIRE(GRAPHICS_FUNC_ARGS) -{ - int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); - *colr = (unsigned char)ren->flm_data[caddress]; - *colg = (unsigned char)ren->flm_data[caddress+1]; - *colb = (unsigned char)ren->flm_data[caddress+2]; - - *firea = 255; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel - *pixel_mode |= FIRE_ADD; - //Returning 0 means dynamic, do not cache - return 0; -} diff --git a/src/elements/firw.cpp b/src/elements/firw.cpp deleted file mode 100644 index 712d416..0000000 --- a/src/elements/firw.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "simulation/Element.h" - -int update_FIRW(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, np; - if (parts[i].tmp==0) { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type; - if (rt==PT_FIRE||rt==PT_PLSM||rt==PT_THDR) - { - parts[i].tmp = 1; - parts[i].life = rand()%50+60; - } - } - } - else if (parts[i].tmp==1) { - if (parts[i].life==0) { - parts[i].tmp=2; - } else { - float newVel = parts[i].life/25; - parts[i].flags &= ~FLAG_STAGNANT; - /* TODO: - if ((pmap[(int)(ly-newVel)][(int)lx]&0xFF)==PT_NONE && ly-newVel>0) { - parts[i].vy = -newVel; - ly-=newVel; - iy-=newVel; - }*/ - parts[i].vy = -newVel; - } - } - else if (parts[i].tmp==2) { - int col = rand()%200+4; - int tmul; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+rx, y+ry, PT_FIRW); - if (np>-1) - { - parts[np].vx = (rand()%3-1)*tmul; - parts[np].vy = (rand()%3-1)*tmul; - parts[np].tmp = col; - parts[np].life = rand()%100+100; - parts[np].temp = 6000.0f; - parts[np].dcolour = parts[i].dcolour; - } - } - sim->pv[y/CELL][x/CELL] += 20; - sim->kill_part(i); - return 1; - } else if (parts[i].tmp>=3) { - if (parts[i].life<=0) { - sim->kill_part(i); - return 1; - } - } - return 0; -} diff --git a/src/elements/fog.cpp b/src/elements/fog.cpp deleted file mode 100644 index 24ea953..0000000 --- a/src/elements/fog.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "simulation/Element.h" - -int update_FOG(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].state==ST_SOLID&&5>=rand()%50&&parts[i].life==0&&!((r&0xFF)==PT_CLNE||(r&0xFF)==PT_PCLN)) // TODO: should this also exclude BCLN? - { - sim->part_change_type(i,x,y,PT_RIME); - } - if ((r&0xFF)==PT_SPRK) - { - parts[i].life += rand()%20; - } - } - return 0; -} diff --git a/src/elements/fray.cpp b/src/elements/fray.cpp deleted file mode 100644 index eaf82a0..0000000 --- a/src/elements/fray.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "simulation/Element.h" - -int update_FRAY(UPDATE_FUNC_ARGS) { - int r, nxx, nyy, docontinue, len, nxi, nyi, rx, ry, nr, ry1, rx1; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx= 0 && y+nyi+nyy >= 0) || len>10) { - break; - } - r = pmap[y+nyi+nyy][x+nxi+nxx]; - if (!r) - r = sim->photons[y+nyi+nyy][x+nxi+nxx]; - - if (r && !(sim->ptypes[r&0xFF].properties & TYPE_SOLID)){ - parts[r>>8].vx += nxi*((parts[i].temp-273.15)/10.0f); - parts[r>>8].vy += nyi*((parts[i].temp-273.15)/10.0f); - } - } - } - } - return 0; -} diff --git a/src/elements/frzw.cpp b/src/elements/frzw.cpp deleted file mode 100644 index 4569911..0000000 --- a/src/elements/frzw.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "simulation/Element.h" - -int update_FRZW(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%70) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_FRZW); - } - } - if (parts[i].life==0&&13>rand()%2500) - { - sim->part_change_type(i,x,y,PT_ICEI); - parts[i].ctype=PT_FRZW; - parts[i].temp = restrict_flt(parts[i].temp-200.0f, MIN_TEMP, MAX_TEMP); - } - else if ((100-(parts[i].life))>rand()%50000) - { - sim->part_change_type(i,x,y,PT_ICEI); - parts[i].ctype=PT_FRZW; - parts[i].temp = restrict_flt(parts[i].temp-200.0f, MIN_TEMP, MAX_TEMP); - } - return 0; -} diff --git a/src/elements/frzz.cpp b/src/elements/frzz.cpp deleted file mode 100644 index b412cbc..0000000 --- a/src/elements/frzz.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "simulation/Element.h" - -int update_FRZZ(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%100) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_FRZW); - parts[r>>8].life = 100; - parts[i].type = PT_NONE; - } - - } - if (parts[i].type==PT_NONE) { - sim->kill_part(i); - return 1; - } - return 0; -} diff --git a/src/elements/fsep.cpp b/src/elements/fsep.cpp deleted file mode 100644 index 347fc46..0000000 --- a/src/elements/fsep.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "simulation/Element.h" - -int update_FSEP(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life<=0) { - r = sim->create_part(i, x, y, PT_PLSM); - if (r!=-1) - parts[r].life = 50; - return 1; - } else if (parts[i].life < 40) { - parts[i].life--; - if ((rand()%10)==0) { - r = sim->create_part(-1, (rx=x+rand()%3-1), (ry=y+rand()%3-1), PT_PLSM); - if (r!=-1) - parts[r].life = 50; - } - } - else { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=(273.15+400.0f))) && 1>(rand()%15)) - { - if (parts[i].life>40) { - parts[i].life = 39; - } - } - } - } - return 0; -} diff --git a/src/elements/fuse.cpp b/src/elements/fuse.cpp deleted file mode 100644 index 9081b21..0000000 --- a/src/elements/fuse.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "simulation/Element.h" - -int update_FUSE(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life<=0) { - r = sim->create_part(i, x, y, PT_PLSM); - if (r!=-1) - parts[r].life = 50; - return 1; - } else if (parts[i].life < 40) { - parts[i].life--; - if ((rand()%100)==0) { - r = sim->create_part(-1, (rx=x+rand()%3-1), (ry=y+rand()%3-1), PT_PLSM); - if (r!=-1) - parts[r].life = 50; - } - } - if ((sim->pv[y/CELL][x/CELL] > 2.7f)&&parts[i].tmp>40) - parts[i].tmp=39; - else if (parts[i].tmp<40&&parts[i].tmp>0) - parts[i].tmp--; - else if (parts[i].tmp<=0) { - sim->create_part(i, x, y, PT_FSEP); - return 1; - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=(273.15+700.0f)) && 1>(rand()%20))) - { - if (parts[i].life>40) { - parts[i].life = 39; - } - } - } - return 0; -} diff --git a/src/elements/fwrk.cpp b/src/elements/fwrk.cpp deleted file mode 100644 index 64da287..0000000 --- a/src/elements/fwrk.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "simulation/Element.h" - -int update_FWRK(UPDATE_FUNC_ARGS) { - int r, rx, ry, np; - if ((parts[i].temp>400&&(9+parts[i].temp/40)>rand()%100000&&parts[i].life==0&&!pmap[y-1][x])||parts[i].ctype==PT_DUST) - { - np = sim->create_part(-1, x , y-1 , PT_FWRK); - if (np!=-1) - { - parts[np].vy = rand()%8-22; - parts[np].vx = rand()%20-rand()%20; - parts[np].life=rand()%15+25; - parts[np].dcolour = parts[i].dcolour; - sim->kill_part(i); - return 1; - } - } - if (parts[i].life>=45) - parts[i].life=0; - if ((parts[i].life<3&&parts[i].life>0)||(parts[i].vy>6&&parts[i].life>0)) - { - int q = (rand()%255+1); - int w = (rand()%255+1); - int e = (rand()%255+1); - for (rx=-1; rx<2; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=rand()%8) - { - if (!pmap[y+ry][x+rx]) - { - np = sim->create_part(-1, x+rx, y+ry , PT_DUST); - sim->pv[y/CELL][x/CELL] += 2.00f*CFDS; - if (np!=-1) - { - parts[np].vy = -(rand()%10-1); - parts[np].vx = ((rand()%2)*2-1)*rand()%(5+5)+(parts[i].vx)*2 ; - parts[np].life= rand()%37+18; - parts[np].tmp=q; - parts[np].tmp2=w; - parts[np].ctype=e; - parts[np].temp= rand()%20+6000; - parts[np].dcolour = parts[i].dcolour; - } - } - } - } - sim->kill_part(i); - return 1; - } - return 0; -} diff --git a/src/elements/gbmb.cpp b/src/elements/gbmb.cpp deleted file mode 100644 index d1d7c20..0000000 --- a/src/elements/gbmb.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "simulation/Element.h" -int update_GBMB(UPDATE_FUNC_ARGS) { - int rx,ry,r; - if (parts[i].life<=0) - { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - { - r = pmap[y+ry][x+rx]; - if(!r) - continue; - if((r&0xFF)!=PT_BOMB && (r&0xFF)!=PT_GBMB && - (r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_DMND) - { - parts[i].life=60; - break; - } - } - } - if(parts[i].life>20) - sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = 20; - if(parts[i].life<20 && parts[i].life>=1) - sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = -80; - return 0; -} diff --git a/src/elements/gel.cpp b/src/elements/gel.cpp deleted file mode 100644 index 0853a5f..0000000 --- a/src/elements/gel.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include "simulation/Element.h" - -int update_GEL(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxkill_part(r>>8); - } - - char gel = 0; - if ((r&0xFF)==PT_GEL) - gel = 1; - - //Concentration diffusion - if (gel && (parts[r>>8].tmp+1)>8].tmp++; - parts[i].tmp--; - } - - if ((r&0xFF)==PT_SPNG && (parts[r>>8].life+1)>8].life++; - parts[i].tmp--; - } - - float dx, dy; - dx = parts[i].x - parts[r>>8].x; - dy = parts[i].y - parts[r>>8].y; - - //Stickness - if ((dx*dx + dy*dy)>1.5 && (gel || !sim->ptypes[r&0xFF].falldown || (fabs(rx)<2 && fabs(ry)<2))) - { - float per, nd; - nd = dx*dx + dy*dy - 0.5; - - per = 5*(1 - parts[i].tmp/100)*(nd/(dx*dx + dy*dy + nd) - 0.5); - if (sim->ptypes[r&0xFF].state==ST_LIQUID) - per *= 0.1; - - dx *= per; dy *= per; - parts[i].vx += dx; parts[r>>8].vx -= dx; - parts[i].vy += dy; parts[r>>8].vy -= dy; - } - } - return 0; -} - -int graphics_GEL(GRAPHICS_FUNC_ARGS) -{ - int q = cpart->tmp; - *colr = q*(32-255)/120+255; - *colg = q*(48-186)/120+186; - *colb = q*208/120; - return 0; -} - diff --git a/src/elements/glas.cpp b/src/elements/glas.cpp deleted file mode 100644 index ef9e7f7..0000000 --- a/src/elements/glas.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "simulation/Element.h" - -int update_GLAS(UPDATE_FUNC_ARGS) { - parts[i].pavg[0] = parts[i].pavg[1]; - parts[i].pavg[1] = sim->pv[y/CELL][x/CELL]; - if (parts[i].pavg[1]-parts[i].pavg[0] > 0.25f || parts[i].pavg[1]-parts[i].pavg[0] < -0.25f) - { - sim->part_change_type(i,x,y,PT_BGLA); - } - return 0; -} diff --git a/src/elements/glow.cpp b/src/elements/glow.cpp deleted file mode 100644 index 38f7140..0000000 --- a/src/elements/glow.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "simulation/Element.h" - -int update_GLOW(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%2000)) - { - parts[i].type = PT_NONE; - sim->part_change_type(r>>8,x+rx,y+ry,PT_DEUT); - parts[r>>8].life = 10; - } - } - parts[i].ctype = sim->pv[y/CELL][x/CELL]*16; - - parts[i].tmp = abs((int)((sim->vx[y/CELL][x/CELL]+sim->vy[y/CELL][x/CELL])*16.0f)) + abs((int)((parts[i].vx+parts[i].vy)*64.0f)); - //printf("%f %f\n", parts[i].vx, parts[i].vy); - if (parts[i].type==PT_NONE) { - sim->kill_part(i); - return 1; - } - return 0; -} diff --git a/src/elements/goo.cpp b/src/elements/goo.cpp deleted file mode 100644 index 6e66468..0000000 --- a/src/elements/goo.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "simulation/Element.h" - -int update_GOO(UPDATE_FUNC_ARGS) { - if (!parts[i].life && sim->pv[y/CELL][x/CELL]>1.0f) - parts[i].life = rand()%80+300; - if (parts[i].life) - { - float advection = 0.1f; - parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; - parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; - } - return 0; -} diff --git a/src/elements/gpmp.cpp b/src/elements/gpmp.cpp deleted file mode 100644 index 3ad552b..0000000 --- a/src/elements/gpmp.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "simulation/Element.h" - -int update_GPMP(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - if (parts[i].life==10) - { - if (parts[i].temp>=256.0+273.15) - parts[i].temp=256.0+273.15; - if (parts[i].temp<= -256.0+273.15) - parts[i].temp = -256.0+273.15; - - sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = 0.2f*(parts[i].temp-273.15); - if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp-273.15)) - sim->gravmap[(y/CELL+1)*(XRES/CELL)+(x/CELL)] += 0.1f*((parts[i].temp-273.15)-sim->gravmap[(y/CELL+1)*(XRES/CELL)+(x/CELL)]); - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[r>>8].life==0) - parts[r>>8].life = 10; - } - } - } - return 0; -} diff --git a/src/elements/graphics_default.cpp b/src/elements/graphics_default.cpp deleted file mode 100644 index cf394aa..0000000 --- a/src/elements/graphics_default.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "simulation/Element.h" - -int graphics_DEFAULT(GRAPHICS_FUNC_ARGS) -{ - int t = cpart->type; - //Property based defaults - if(ren->sim->ptypes[t].properties & PROP_RADIOACTIVE) *pixel_mode |= PMODE_GLOW; - if(ren->sim->ptypes[t].properties & TYPE_LIQUID) - { - *pixel_mode |= PMODE_BLUR; - } - if(ren->sim->ptypes[t].properties & TYPE_GAS) - { - *pixel_mode &= ~PMODE; - *pixel_mode |= FIRE_BLEND; - *firer = *colr/2; - *fireg = *colg/2; - *fireb = *colb/2; - *firea = 125; - *pixel_mode |= DECO_FIRE; - } - return 1; -} diff --git a/src/elements/h2.cpp b/src/elements/h2.cpp deleted file mode 100644 index fc2e6c8..0000000 --- a/src/elements/h2.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include "simulation/Element.h" - -int update_H2(UPDATE_FUNC_ARGS) -{ - int r,rx,ry,rt; - if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f) - parts[i].tmp = 1; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxpv[y/CELL][x/CELL] > 8.0f && rt == PT_DESL) // This will not work. DESL turns to fire above 5.0 pressure - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); - sim->part_change_type(i,x,y,PT_OIL); - } - if (parts[r>>8].temp > 2273.15)// && pv[y/CELL][x/CELL] > 50.0f) - continue; - if (parts[i].tmp != 1) - { - if (rt==PT_FIRE) - { - parts[r>>8].temp=2473.15; - if(parts[r>>8].tmp&0x02) - parts[r>>8].temp=3473; - parts[r>>8].tmp |= 1; - } - if (rt==PT_FIRE || rt==PT_PLSM || rt==PT_LAVA) - { - sim->create_part(i,x,y,PT_FIRE); - parts[i].temp+=(rand()/(RAND_MAX/100)); - parts[i].tmp |= 1; - } - } - } - if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f) - { - parts[i].tmp = 1; - if (rand()%5 < 1) - { - int j; - float temp = parts[i].temp; - sim->part_change_type(i,x,y,PT_PLSM); - parts[i].life = rand()%150+50; - sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); - sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); - if (j != -1) { parts[j].ctype = 0xFFFF00; parts[j].temp = temp; } - - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); - if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; } - - if (rand()%2) - { - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); - if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; } - } - parts[i].temp += 6000; - sim->pv[y/CELL][x/CELL] += 30; - } - } - return 0; -} diff --git a/src/elements/hswc.cpp b/src/elements/hswc.cpp deleted file mode 100644 index a279947..0000000 --- a/src/elements/hswc.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "simulation/Element.h" - -int update_HSWC(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - if (parts[i].life==10) - { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[r>>8].life==0) - parts[r>>8].life = 10; - } - } - } - return 0; -} diff --git a/src/elements/ice.cpp b/src/elements/ice.cpp deleted file mode 100644 index aab4e0e..0000000 --- a/src/elements/ice.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "simulation/Element.h" - -int update_ICEI(UPDATE_FUNC_ARGS) { //currently used for snow as well - int r, rx, ry; - if (parts[i].ctype==PT_FRZW)//get colder if it is from FRZW - { - parts[i].temp = restrict_flt(parts[i].temp-1.0f, MIN_TEMP, MAX_TEMP); - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) - { - sim->part_change_type(i,x,y,PT_SLTW); - sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); - } - } - return 0; -} diff --git a/src/elements/ignt.cpp b/src/elements/ignt.cpp deleted file mode 100644 index 66b0e18..0000000 --- a/src/elements/ignt.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "simulation/Element.h" - -int update_IGNT(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if(parts[i].tmp==0) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life==1)) - { - parts[i].tmp = 1; - } - } - } - else if(parts[i].life > 0) - { - if(rand()%3) - { - int nb = sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_BOMB); - if (nb!=-1) { - parts[nb].tmp = 1; - parts[nb].life = 30; - parts[nb].vx = rand()%20-10; - parts[nb].vy = rand()%20-10; - parts[nb].temp = restrict_flt(400.0f+parts[i].temp-273.15, MIN_TEMP, MAX_TEMP); - } - } - else - { - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); - } - parts[i].life--; - } - return 0; -} diff --git a/src/elements/iron.cpp b/src/elements/iron.cpp deleted file mode 100644 index 391b708..0000000 --- a/src/elements/iron.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "simulation/Element.h" - -int update_IRON(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()/(RAND_MAX/700))) || - ((r&0xFF) == PT_SLTW && 30>(rand()/(RAND_MAX/2000))) || - ((r&0xFF) == PT_WATR && 5 >(rand()/(RAND_MAX/6000))) || - ((r&0xFF) == PT_O2 && 2 >(rand()/(RAND_MAX/500))) || - ((r&0xFF) == PT_LO2))&& - (!(parts[i].life)) - ) - { - sim->part_change_type(i,x,y,PT_BMTL); - parts[i].tmp=(rand()/(RAND_MAX/10))+20; - } - } - return 0; -} diff --git a/src/elements/isz.cpp b/src/elements/isz.cpp deleted file mode 100644 index 22e6c77..0000000 --- a/src/elements/isz.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "simulation/Element.h" - -int update_ISZ(UPDATE_FUNC_ARGS) { // for both ISZS and ISOZ - float rr, rrr; - if (1>rand()%200 && ((int)(-4.0f*(sim->pv[y/CELL][x/CELL])))>(rand()%1000)) - { - sim->create_part(i, x, y, PT_PHOT); - rr = (rand()%228+128)/127.0f; - rrr = (rand()%360)*3.14159f/180.0f; - parts[i].vx = rr*cosf(rrr); - parts[i].vy = rr*sinf(rrr); - } - return 0; -} diff --git a/src/elements/lava.cpp b/src/elements/lava.cpp deleted file mode 100644 index cc0fbb3..0000000 --- a/src/elements/lava.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "simulation/Element.h" - -int graphics_LAVA(GRAPHICS_FUNC_ARGS) -{ - *colr = cpart->life * 2 + 0xE0; - *colg = cpart->life * 1 + 0x50; - *colb = cpart->life / 2 + 0x10; - if (*colr>255) *colr = 255; - if (*colg>192) *colg = 192; - if (*colb>128) *colb = 128; - *firea = 40; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - *pixel_mode |= FIRE_ADD; - *pixel_mode |= PMODE_BLUR; - //Returning 0 means dynamic, do not cache - return 0; -} diff --git a/src/elements/lcry.cpp b/src/elements/lcry.cpp deleted file mode 100644 index 0ecb84c..0000000 --- a/src/elements/lcry.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "simulation/Element.h" - -int update_LCRY(UPDATE_FUNC_ARGS) -{ - int r, rx, ry; - if(parts[i].tmp==1 || parts[i].tmp==0) - { - if(parts[i].tmp==1) - { - if(parts[i].life<=0) - parts[i].tmp = 0; - else - { - parts[i].life-=2; - if(parts[i].life < 0) - parts[i].life = 0; - parts[i].tmp2 = parts[i].life; - } - } - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].tmp == 3) - { - parts[r>>8].tmp = 1; - } - } - } - else if(parts[i].tmp==2 || parts[i].tmp==3) - { - if(parts[i].tmp==2) - { - if(parts[i].life>=10) - parts[i].tmp = 3; - else - { - parts[i].life+=2; - if(parts[i].life > 10) - parts[i].life = 10; - parts[i].tmp2 = parts[i].life; - } - } - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].tmp == 0) - { - parts[r>>8].tmp = 2; - } - } - } - return 0; -} diff --git a/src/elements/legacy.cpp b/src/elements/legacy.cpp deleted file mode 100644 index f1fcf03..0000000 --- a/src/elements/legacy.cpp +++ /dev/null @@ -1,120 +0,0 @@ -#include "simulation/Element.h" - -// Interactions which only occur when legacy_enable is on -int update_legacy_all(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt; - int t = parts[i].type; - if (!sim->legacy_enable) return 0; - if (t==PT_WTRV) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && - x+rx(rand()%1000)) - { - sim->part_change_type(i,x,y,PT_WATR); - sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); - } - if (((r&0xFF)==PT_ICEI || (r&0xFF)==PT_SNOW) && 1>(rand()%1000)) - { - sim->part_change_type(i,x,y,PT_WATR); - if (1>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); - } - } - } - else if (t==PT_WATR) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && - x+rx(rand()%10)) - { - sim->part_change_type(i,x,y,PT_WTRV); - } - } - } - else if (t==PT_SLTW) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && - x+rx(rand()%10)) - { - sim->part_change_type(i,x,y,PT_SALT); - sim->part_change_type(r>>8,x+rx,y+ry,PT_WTRV); - } - } - } - else if (t==PT_DSTW) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && - x+rx(rand()%10)) - { - sim->part_change_type(i,x,y,PT_WTRV); - } - } - } - else if (t==PT_ICEI) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) - { - sim->part_change_type(i,x,y,PT_ICEI); - sim->part_change_type(r>>8,x+rx,y+ry,PT_ICEI); - } - } - } - else if (t==PT_SNOW) { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) - { - sim->part_change_type(i,x,y,PT_ICEI); - sim->part_change_type(r>>8,x+rx,y+ry,PT_ICEI); - } - if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW) && 15>(rand()%1000)) - sim->part_change_type(i,x,y,PT_WATR); - } - } - if (t==PT_WTRV && sim->pv[y/CELL][x/CELL]>4.0f) - sim->part_change_type(i,x,y,PT_DSTW); - if (t==PT_OIL && sim->pv[y/CELL][x/CELL]<-6.0f) - sim->part_change_type(i,x,y,PT_GAS); - if (t==PT_GAS && sim->pv[y/CELL][x/CELL]>6.0f) - sim->part_change_type(i,x,y,PT_OIL); - if (t==PT_DESL && sim->pv[y/CELL][x/CELL]>12.0f) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = rand()%50+120; - } - return 0; -} diff --git a/src/elements/ligh.cpp b/src/elements/ligh.cpp deleted file mode 100644 index 586dfc4..0000000 --- a/src/elements/ligh.cpp +++ /dev/null @@ -1,296 +0,0 @@ -#include "simulation/Element.h" - -#define LIGHTING_POWER 0.65 - -int LIGH_nearest_part(Simulation * sim, int ci, int max_d) -{ - int distance = (max_d!=-1)?max_d:MAX_DISTANCE; - int ndistance = 0; - int id = -1; - int i = 0; - int cx = (int)sim->parts[ci].x; - int cy = (int)sim->parts[ci].y; - for (i=0; i<=sim->parts_lastActiveIndex; i++) - { - if (sim->parts[i].type && sim->parts[i].life && i!=ci && sim->parts[i].type!=PT_LIGH && sim->parts[i].type!=PT_THDR && sim->parts[i].type!=PT_NEUT && sim->parts[i].type!=PT_PHOT) - { - ndistance = abs(cx-sim->parts[i].x)+abs(cy-sim->parts[i].y);// Faster but less accurate Older: sqrt(pow(cx-parts[i].x, 2)+pow(cy-parts[i].y, 2)); - if (ndistanceparts[i].x, y=sim->parts[i].y; - int r,rx,ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxpmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)==tp) - return r>>8; - } - return -1; -} - -void create_line_par(Simulation * sim, int x1, int y1, int x2, int y2, int c, int temp, int life, int tmp, int tmp2) -{ - int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; - float e, de; - if (c==WL_EHOLE || c==WL_ALLOWGAS || c==WL_ALLOWALLELEC || c==WL_ALLOWSOLID || c==WL_ALLOWAIR || c==WL_WALL || c==WL_DESTROYALL || c==WL_ALLOWLIQUID || c==WL_FAN || c==WL_STREAM || c==WL_DETECT || c==WL_EWALL || c==WL_WALLELEC) - return; // this function only for particles, no walls - if (cp) - { - y = x1; - x1 = y1; - y1 = y; - y = x2; - x2 = y2; - y2 = y; - } - if (x1 > x2) - { - y = x1; - x1 = x2; - x2 = y; - y = y1; - y1 = y2; - y2 = y; - } - dx = x2 - x1; - dy = abs(y2 - y1); - e = 0.0f; - if (dx) - de = dy/(float)dx; - else - de = 0.0f; - y = y1; - sy = (y1create_part(-1, y, x, c); - else - p = sim->create_part(-1, x, y,c); - if (p!=-1) - { - sim->parts[p].life = life; - sim->parts[p].temp = temp; - sim->parts[p].tmp = tmp; - sim->parts[p].tmp2 = tmp2; - } - e += de; - if (e >= 0.5f) - { - y += sy; - e -= 1.0f; - } - } -} - -int update_LIGH(UPDATE_FUNC_ARGS) -{ - /* - * - * tmp2: - * -1 - part will be removed - * 0 - "branches" of the lightning - * 1 - bending - * 2 - branching - * 3 - transfer spark or make destruction - * 4 - first pixel - * - * life - "thickness" of lighting (but anyway one pixel) - * - * tmp - angle of lighting - * - */ - int r,rx,ry, multipler, powderful; - float angle, angle2=-1; - int pNear = 0; - powderful = powderful = parts[i].temp*(1+parts[i].life/40)*LIGHTING_POWER; - update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); - if (sim->aheat_enable) - { - sim->hv[y/CELL][x/CELL]+=powderful/50; - if (sim->hv[y/CELL][x/CELL]>MAX_TEMP) - sim->hv[y/CELL][x/CELL]=MAX_TEMP; - } - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxptypes[r&0xFF].properties&PROP_CONDUCTS) && parts[r>>8].life==0) - { - sim->create_part(r>>8,x+rx,y+ry,PT_SPRK); - } - sim->pv[y/CELL][x/CELL] += powderful/400; - if (sim->ptypes[r&0xFF].hconduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/1.5, MIN_TEMP, MAX_TEMP); - } - if ((r&0xFF)==PT_DEUT || (r&0xFF)==PT_PLUT) // start nuclear reactions - { - parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful, MIN_TEMP, MAX_TEMP); - sim->pv[y/CELL][x/CELL] +=powderful/35; - if (rand()%3==0) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_NEUT); - parts[r>>8].life = rand()%480+480; - parts[r>>8].vx=rand()%10-5; - parts[r>>8].vy=rand()%10-5; - } - } - if ((r&0xFF)==PT_COAL || (r&0xFF)==PT_BCOL) // ignite coal - { - if (parts[r>>8].life>100) { - parts[r>>8].life = 99; - } - } - if (sim->ptypes[r&0xFF].hconduct) - parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/10, MIN_TEMP, MAX_TEMP); - if (((r&0xFF)==PT_STKM && sim->player.elem!=PT_LIGH) || ((r&0xFF)==PT_STKM2 && sim->player2.elem!=PT_LIGH)) - { - parts[r>>8].life-=powderful/100; - } - } - } - if (parts[i].tmp2==3) - { - parts[i].tmp2=0; - return 1; - } - - if (parts[i].tmp2==-1) - { - sim->kill_part(i); - return 1; - } - if (parts[i].tmp2<=0 || parts[i].life<=1) - { - if (parts[i].tmp2>0) - parts[i].tmp2=0; - parts[i].tmp2--; - return 1; - } - if (parts[i].tmp2<=-2) - { - sim->kill_part(i); - return 1; - } - - angle2=-1; - - pNear = LIGH_nearest_part(sim, i, parts[i].life*2.5); - if (pNear!=-1) - { - int t=parts[pNear].type; - float n_angle; // angle to nearest part - rx=parts[pNear].x-x; - ry=parts[pNear].y-y; - if (rx*rx+ry*ry!=0) - n_angle = asin(-ry/sqrt(rx*rx+ry*ry)); - else - n_angle = 0; - if (n_angle<0) - n_angle+=M_PI*2; - if (parts[i].life<5 || fabs(n_angle-parts[i].tmp*M_PI/180)=360) - angle-=360; - if (parts[i].tmp2==2 && pNear==-1) - { - angle2=angle+100-rand()%200; - if (angle2<0) - angle2+=360; - if (angle2>=360) - angle-=360; - } - - multipler=parts[i].life*1.5+rand()%((int)(parts[i].life+1)); - rx=cos(angle*M_PI/180)*multipler; - ry=-sin(angle*M_PI/180)*multipler; - create_line_par(sim, x, y, x+rx, y+ry, PT_LIGH, parts[i].temp, parts[i].life, angle, 0); - - if (x+rx>=0 && y+ry>=0 && x+rx>8].tmp2=1+(rand()%200>parts[i].tmp2*parts[i].tmp2/10+60); - parts[r>>8].life=(int)(1.0*parts[i].life/1.5-rand()%2); - parts[r>>8].tmp=angle; - parts[r>>8].temp=parts[i].temp; - } - } - - if (angle2!=-1) - { - multipler=parts[i].life*1.5+rand()%((int)(parts[i].life+1)); - rx=cos(angle2*M_PI/180)*multipler; - ry=-sin(angle2*M_PI/180)*multipler; - create_line_par(sim, x, y, x+rx, y+ry, PT_LIGH, parts[i].temp, parts[i].life, angle2, 0); - - if (x+rx>=0 && y+ry>0 && x+rx>8].tmp2=1+(rand()%200>parts[i].tmp2*parts[i].tmp2/10+40); - parts[r>>8].life=(int)(1.0*parts[i].life/1.5-rand()%2); - parts[r>>8].tmp=angle; - parts[r>>8].temp=parts[i].temp; - } - } - } - - parts[i].tmp2=-1; - return 1; -} -int graphics_LIGH(GRAPHICS_FUNC_ARGS) -{ - *firea = 120; - *firer = *colr = 235; - *fireg = *colg = 245; - *fireb = *colb = 255; - *pixel_mode |= PMODE_GLOW | FIRE_ADD; - return 1; -} diff --git a/src/elements/merc.cpp b/src/elements/merc.cpp deleted file mode 100644 index 58b19a3..0000000 --- a/src/elements/merc.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include "simulation/Element.h" - -int update_MERC(UPDATE_FUNC_ARGS) { - int r, rx, ry, trade, np; - int maxtmp = ((10000/(parts[i].temp + 1))-1); - if ((10000%((int)parts[i].temp+1))>rand()%((int)parts[i].temp+1)) - maxtmp ++; - if (parts[i].tmp < maxtmp) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=maxtmp)) - continue; - if ((r&0xFF)==PT_MERC&&33>=rand()/(RAND_MAX/100)+1) - { - if ((parts[i].tmp + parts[r>>8].tmp + 1) <= maxtmp) - { - parts[i].tmp += parts[r>>8].tmp + 1; - sim->kill_part(r>>8); - } - } - } - } - else - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create deut - { - np = sim->create_part(-1,x+rx,y+ry,PT_MERC); - if (np<0) continue; - parts[i].tmp--; - parts[np].temp = parts[i].temp; - parts[np].tmp = 0; - } - } - for ( trade = 0; trade<4; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp)&&parts[i].tmp>0)//diffusion - { - int temp = parts[i].tmp - parts[r>>8].tmp; - if (temp ==1) - { - parts[r>>8].tmp ++; - parts[i].tmp --; - } - else if (temp>0) - { - parts[r>>8].tmp += temp/2; - parts[i].tmp -= temp/2; - } - } - } - } - return 0; -} diff --git a/src/elements/mort.cpp b/src/elements/mort.cpp deleted file mode 100644 index 9de088f..0000000 --- a/src/elements/mort.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "simulation/Element.h" - -int update_MORT(UPDATE_FUNC_ARGS) { - sim->create_part(-1, x, y-1, PT_SMKE); - return 0; -} diff --git a/src/elements/nbhl.cpp b/src/elements/nbhl.cpp deleted file mode 100644 index 565416f..0000000 --- a/src/elements/nbhl.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "simulation/Element.h" - -int update_NBHL(UPDATE_FUNC_ARGS) { - sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] += 0.1f; - return 0; -} diff --git a/src/elements/nble.cpp b/src/elements/nble.cpp deleted file mode 100644 index 13e4845..0000000 --- a/src/elements/nble.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "simulation/Element.h" - -int update_NBLE(UPDATE_FUNC_ARGS) -{ - if (parts[i].temp > 5273.15 && sim->pv[y/CELL][x/CELL] > 100.0f) - { - parts[i].tmp = 1; - if (rand()%5 < 1) - { - int j; - float temp = parts[i].temp; - sim->part_change_type(i,x,y,PT_PLSM); - parts[i].life = rand()%150+50; - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); - if (j != -1) { parts[j].ctype = 0xFF0000; parts[j].temp = temp; } - - j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_CO2); - if (j != -1) parts[j].temp = temp-1000; - - parts[i].temp += 10000; - sim->pv[y/CELL][x/CELL] += 30; - } - } - return 0; -} diff --git a/src/elements/neut.cpp b/src/elements/neut.cpp deleted file mode 100644 index c804106..0000000 --- a/src/elements/neut.cpp +++ /dev/null @@ -1,145 +0,0 @@ -#include "simulation/Element.h" - - -int create_n_parts(Simulation * sim, int n, int x, int y, float vx, float vy, float temp, int t)//testing a new deut create part -{ - int i, c; - n = (n/50); - if (n<1) { - n = 1; - } - if (n>340) { - n = 340; - } - if (x<0 || y<0 || x>=XRES || y>=YRES || t<0 || t>=PT_NUM) - return -1; - - for (c=0; cpfree == -1) - return -1; - i = sim->pfree; - sim->pfree = sim->parts[i].life; - if (i>sim->parts_lastActiveIndex) sim->parts_lastActiveIndex = i; - - sim->parts[i].x = (float)x; - sim->parts[i].y = (float)y; - sim->parts[i].type = t; - sim->parts[i].life = rand()%480+480; - sim->parts[i].vx = r*cosf(a); - sim->parts[i].vy = r*sinf(a); - sim->parts[i].ctype = 0; - sim->parts[i].temp = temp; - sim->parts[i].tmp = 0; - if (t!=PT_STKM&&t!=PT_STKM2 && t!=PT_PHOT && t!=PT_NEUT && !sim->pmap[y][x]) - sim->pmap[y][x] = t|(i<<8); - else if ((t==PT_PHOT||t==PT_NEUT) && !sim->photons[y][x]) - sim->photons[y][x] = t|(i<<8); - - sim->pv[y/CELL][x/CELL] += 6.0f * CFDS; - } - return 0; -} - -int update_NEUT(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt; - int pressureFactor = 3 + (int)sim->pv[y/CELL][x/CELL]; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) - { - if (33>rand()%100) - { - sim->create_part(r>>8, x+rx, y+ry, rand()%3 ? PT_LAVA : PT_URAN); - parts[r>>8].temp = MAX_TEMP; - if (parts[r>>8].type==PT_LAVA) { - parts[r>>8].tmp = 100; - parts[r>>8].ctype = PT_PLUT; - } - } - else - { - sim->create_part(r>>8, x+rx, y+ry, PT_NEUT); - parts[r>>8].vx = 0.25f*parts[r>>8].vx + parts[i].vx; - parts[r>>8].vy = 0.25f*parts[r>>8].vy + parts[i].vy; - } - sim->pv[y/CELL][x/CELL] += 10.0f * CFDS; //Used to be 2, some people said nukes weren't powerful enough - update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); - } -#ifdef SDEUT - else if ((r&0xFF)==PT_DEUT && (pressureFactor+1+(parts[r>>8].life/100))>(rand()%1000)) - { - create_n_parts(sim, parts[r>>8].life, x+rx, y+ry, parts[i].vx, parts[i].vy, restrict_flt(parts[r>>8].temp + parts[r>>8].life*500, MIN_TEMP, MAX_TEMP), PT_NEUT); - sim->kill_part(r>>8); - } -#else - else if ((r&0xFF)==PT_DEUT && (pressureFactor+1)>(rand()%1000)) - { - create_part(r>>8, x+rx, y+ry, PT_NEUT); - parts[r>>8].vx = 0.25f*parts[r>>8].vx + parts[i].vx; - parts[r>>8].vy = 0.25f*parts[r>>8].vy + parts[i].vy; - if (parts[r>>8].life>0) - { - parts[r>>8].life --; - parts[r>>8].temp = restrict_flt(parts[r>>8].temp + parts[r>>8].life*17, MIN_TEMP, MAX_TEMP); - pv[y/CELL][x/CELL] += 6.0f * CFDS; - } - else - sim.kill_part(r>>8); - } -#endif - else if ((r&0xFF)==PT_GUNP && 15>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_DUST); - else if ((r&0xFF)==PT_DYST && 15>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_YEST); - else if ((r&0xFF)==PT_YEST) - sim->part_change_type(r>>8,x+rx,y+ry,PT_DYST); - else if ((r&0xFF)==PT_WATR && 15>(rand()%100)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_DSTW); - else if ((r&0xFF)==PT_PLEX && 15>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_GOO); - else if ((r&0xFF)==PT_NITR && 15>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_DESL); - else if ((r&0xFF)==PT_PLNT && 5>(rand()%100)) - sim->create_part(r>>8, x+rx, y+ry, PT_WOOD); - else if ((r&0xFF)==PT_DESL && 15>(rand()%1000)) - sim->part_change_type(r>>8,x+rx,y+ry,PT_GAS); - else if ((r&0xFF)==PT_COAL && 5>(rand()%100)) - sim->create_part(r>>8, x+rx, y+ry, PT_WOOD); - else if ((r&0xFF)==PT_DUST && 5>(rand()%100)) - sim->part_change_type(r>>8, x+rx, y+ry, PT_FWRK); - else if ((r&0xFF)==PT_FWRK && 5>(rand()%100)) - parts[r>>8].ctype = PT_DUST; - else if ((r&0xFF)==PT_ACID && 5>(rand()%100)) - sim->create_part(r>>8, x+rx, y+ry, PT_ISOZ); - /*if(parts[r>>8].type>1 && parts[r>>8].type!=PT_NEUT && parts[r>>8].type-1!=PT_NEUT && parts[r>>8].type-1!=PT_STKM && - (ptypes[parts[r>>8].type-1].menusection==SC_LIQUID|| - ptypes[parts[r>>8].type-1].menusection==SC_EXPLOSIVE|| - ptypes[parts[r>>8].type-1].menusection==SC_GAS|| - ptypes[parts[r>>8].type-1].menusection==SC_POWDERS) && 15>(rand()%1000)) - parts[r>>8].type--;*/ - } - return 0; -} - -int graphics_NEUT(GRAPHICS_FUNC_ARGS) -{ - *firea = 120; - *firer = 10; - *fireg = 80; - *fireb = 120; - - *pixel_mode |= FIRE_ADD; - return 1; -} diff --git a/src/elements/newgraphics.cpp b/src/elements/newgraphics.cpp deleted file mode 100644 index f0fbdae..0000000 --- a/src/elements/newgraphics.cpp +++ /dev/null @@ -1,542 +0,0 @@ -#include "simulation/Element.h" -#include "hmap.h" - -int graphics_QRTZ(GRAPHICS_FUNC_ARGS) //QRTZ and PQRT -{ - int t = cpart->type, z = cpart->tmp - 5;//speckles! - /*if (cpart->temp>(ptransitions[t].thv-800.0f))//hotglow for quartz - { - float frequency = 3.1415/(2*ptransitions[t].thv-(ptransitions[t].thv-800.0f)); - int q = (cpart->temp>ptransitions[t].thv)?ptransitions[t].thv-(ptransitions[t].thv-800.0f):cpart->temp-(ptransitions[t].thv-800.0f); - *colr += sin(frequency*q) * 226 + (z * 16); - *colg += sin(frequency*q*4.55 +3.14) * 34 + (z * 16); - *colb += sin(frequency*q*2.22 +3.14) * 64 + (z * 16); - } - else*/ - { - *colr += z * 16; - *colg += z * 16; - *colb += z * 16; - } - return 0; -} -int graphics_CLST(GRAPHICS_FUNC_ARGS) -{ - int z = cpart->tmp - 5;//speckles! - *colr += z * 16; - *colg += z * 16; - *colb += z * 16; - return 0; -} -int graphics_CBNW(GRAPHICS_FUNC_ARGS) -{ - int z = cpart->tmp2 - 20;//speckles! - *colr += z * 1; - *colg += z * 2; - *colb += z * 8; - return 0; -} -int graphics_SPNG(GRAPHICS_FUNC_ARGS) -{ - *colr -= cpart->life*15; - *colg -= cpart->life*15; - *colb -= cpart->life*15; - if (*colr<=50) - *colr = 50; - if (*colg<=50) - *colg = 50; - if (*colb<=20) - *colb = 20; - return 0; -} -int graphics_LIFE(GRAPHICS_FUNC_ARGS) -{ - pixel pc; - if (cpart->ctype==NGT_LOTE)//colors for life states - { - if (cpart->tmp==2) - pc = PIXRGB(255, 128, 0); - else if (cpart->tmp==1) - pc = PIXRGB(255, 255, 0); - else - pc = PIXRGB(255, 0, 0); - } - else if (cpart->ctype==NGT_FRG2)//colors for life states - { - if (cpart->tmp==2) - pc = PIXRGB(0, 100, 50); - else - pc = PIXRGB(0, 255, 90); - } - else if (cpart->ctype==NGT_STAR)//colors for life states - { - if (cpart->tmp==4) - pc = PIXRGB(0, 0, 128); - else if (cpart->tmp==3) - pc = PIXRGB(0, 0, 150); - else if (cpart->tmp==2) - pc = PIXRGB(0, 0, 190); - else if (cpart->tmp==1) - pc = PIXRGB(0, 0, 230); - else - pc = PIXRGB(0, 0, 70); - } - else if (cpart->ctype==NGT_FROG)//colors for life states - { - if (cpart->tmp==2) - pc = PIXRGB(0, 100, 0); - else - pc = PIXRGB(0, 255, 0); - } - else if (cpart->ctype==NGT_BRAN)//colors for life states - { - if (cpart->tmp==1) - pc = PIXRGB(150, 150, 0); - else - pc = PIXRGB(255, 255, 0); - } else { - pc = PIXRGB(255, 255, 0);//sim->gmenu[cpart->ctype].colour; - } - *colr = PIXR(pc); - *colg = PIXG(pc); - *colb = PIXB(pc); - return 0; -} -int graphics_DUST(GRAPHICS_FUNC_ARGS) -{ - if(cpart->life >= 1) - { - *firea = 120; - *firer = *colr = cpart->flags; - *fireg = *colg = cpart->tmp; - *fireb = *colb = cpart->ctype; - if (ren->decorations_enable && cpart->dcolour) - { - int a = (cpart->dcolour>>24)&0xFF; - *firer = *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; - *fireg = *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; - *fireb = *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; - } - *pixel_mode |= PMODE_GLOW | FIRE_ADD; - /**firea = 255; - *firer = *colr; - *fireg = *colg; - *fireb = *colb;*/ - } - return 0; -} -int graphics_GRAV(GRAPHICS_FUNC_ARGS) -{ - int GRAV_R, GRAV_B, GRAV_G, GRAV_R2, GRAV_B2, GRAV_G2; - *colr = 20; - *colg = 20; - *colb = 20; - if (cpart->vx>0) - { - *colr += (cpart->vx)*GRAV_R; - *colg += (cpart->vx)*GRAV_G; - *colb += (cpart->vx)*GRAV_B; - } - if (cpart->vy>0) - { - *colr += (cpart->vy)*GRAV_G; - *colg += (cpart->vy)*GRAV_B; - *colb += (cpart->vy)*GRAV_R; - - } - if (cpart->vx<0) - { - *colr -= (cpart->vx)*GRAV_B; - *colg -= (cpart->vx)*GRAV_R; - *colb -= (cpart->vx)*GRAV_G; - - } - if (cpart->vy<0) - { - *colr -= (cpart->vy)*GRAV_R2; - *colg -= (cpart->vy)*GRAV_G2; - *colb -= (cpart->vy)*GRAV_B2; - } - return 0; -} -int graphics_WIFI(GRAPHICS_FUNC_ARGS) -{ - float frequency = 0.0628; - int q = cpart->tmp; - *colr = sin(frequency*q + 0) * 127 + 128; - *colg = sin(frequency*q + 2) * 127 + 128; - *colb = sin(frequency*q + 4) * 127 + 128; - return 0; -} -int graphics_PRTI(GRAPHICS_FUNC_ARGS) -{ - *firea = 8; - *firer = 255; - *fireg = 0; - *fireb = 0; - *pixel_mode |= EFFECT_GRAVIN; - *pixel_mode &= ~PMODE; - *pixel_mode |= PMODE_ADD; - return 1; -} -int graphics_PRTO(GRAPHICS_FUNC_ARGS) -{ - *firea = 8; - *firer = 0; - *fireg = 0; - *fireb = 255; - *pixel_mode |= EFFECT_GRAVOUT; - *pixel_mode &= ~PMODE; - *pixel_mode |= PMODE_ADD; - return 1; -} -int graphics_BIZR(GRAPHICS_FUNC_ARGS) //BIZR, BIZRG, BIZRS -{ - int x = 0; - *colg = 0; - *colb = 0; - *colr = 0; - for (x=0; x<12; x++) { - *colr += (cpart->ctype >> (x+18)) & 1; - *colb += (cpart->ctype >> x) & 1; - } - for (x=0; x<12; x++) - *colg += (cpart->ctype >> (x+9)) & 1; - x = 624/(*colr+*colg+*colb+1); - *colr *= x; - *colg *= x; - *colb *= x; - if(fabs(cpart->vx)+fabs(cpart->vy)>0) - { - *firea = 255; - *fireg = *colg/5 * fabs(cpart->vx)+fabs(cpart->vy); - *fireb = *colb/5 * fabs(cpart->vx)+fabs(cpart->vy); - *firer = *colr/5 * fabs(cpart->vx)+fabs(cpart->vy); - *pixel_mode |= FIRE_ADD; - } - return 0; -} -int graphics_INVS(GRAPHICS_FUNC_ARGS) -{ - //pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f - if(cpart->tmp) - { - *cola = 100; - *colr = 15; - *colg = 0; - *colb = 150; - *pixel_mode &= PMODE; - *pixel_mode |= PMODE_BLEND; - } - return 0; -} -int graphics_ACID(GRAPHICS_FUNC_ARGS) -{ - int s = cpart->life; - if (s>75) s = 75; //These two should not be here. - if (s<49) s = 49; - s = (s-49)*3; - if (s==0) s = 1; - *colr += s*4; - *colg += s*1; - *colb += s*2; - *pixel_mode |= PMODE_BLUR; - return 0; -} -int graphics_FILT(GRAPHICS_FUNC_ARGS) -{ - int x, temp_bin = (int)((cpart->temp-273.0f)*0.025f); - if (temp_bin < 0) temp_bin = 0; - if (temp_bin > 25) temp_bin = 25; - cpart->ctype = 0x1F << temp_bin; - *colg = 0; - *colb = 0; - *colr = 0; - for (x=0; x<12; x++) { - *colr += (cpart->ctype >> (x+18)) & 1; - *colb += (cpart->ctype >> x) & 1; - } - for (x=0; x<12; x++) - *colg += (cpart->ctype >> (x+9)) & 1; - x = 624/(*colr+*colg+*colb+1); - *cola = 127; - *colr *= x; - *colg *= x; - *colb *= x; - *pixel_mode &= ~PMODE; - *pixel_mode |= PMODE_BLEND; - return 0; -} -int graphics_BRAY(GRAPHICS_FUNC_ARGS) -{ - int x, trans = 255; - if(cpart->tmp==0) - { - trans = cpart->life * 7; - if (trans>255) trans = 255; - if (cpart->ctype) { - *colg = 0; - *colb = 0; - *colr = 0; - for (x=0; x<12; x++) { - *colr += (cpart->ctype >> (x+18)) & 1; - *colb += (cpart->ctype >> x) & 1; - } - for (x=0; x<12; x++) - *colg += (cpart->ctype >> (x+9)) & 1; - x = 624/(*colr+*colg+*colb+1); - *colr *= x; - *colg *= x; - *colb *= x; - } - } - else if(cpart->tmp==1) - { - trans = cpart->life/4; - if (trans>255) trans = 255; - if (cpart->ctype) { - *colg = 0; - *colb = 0; - *colr = 0; - for (x=0; x<12; x++) { - *colr += (cpart->ctype >> (x+18)) & 1; - *colb += (cpart->ctype >> x) & 1; - } - for (x=0; x<12; x++) - *colg += (cpart->ctype >> (x+9)) & 1; - x = 624/(*colr+*colg+*colb+1); - *colr *= x; - *colg *= x; - *colb *= x; - } - } - else if(cpart->tmp==2) - { - trans = cpart->life*100; - if (trans>255) trans = 255; - *colr = 255; - *colg = 150; - *colb = 50; - } - *cola = trans; - *pixel_mode &= ~PMODE; - *pixel_mode |= PMODE_BLEND | PMODE_GLOW; - return 0; -} -int graphics_SWCH(GRAPHICS_FUNC_ARGS) -{ - if(cpart->life >= 10) - { - *colr = 17; - *colg = 217; - *colb = 24; - *pixel_mode |= PMODE_GLOW; - } - return 0; -} -int graphics_THDR(GRAPHICS_FUNC_ARGS) -{ - *firea = 160; - *fireg = 192; - *fireb = 255; - *firer = 144; - *pixel_mode |= FIRE_ADD; - return 1; -} -int graphics_GLOW(GRAPHICS_FUNC_ARGS) -{ - *firer = restrict_flt(cpart->temp-(275.13f+32.0f), 0, 128)/50.0f; - *fireg = restrict_flt(cpart->ctype, 0, 128)/50.0f; - *fireb = restrict_flt(cpart->tmp, 0, 128)/50.0f; - - *colr = restrict_flt(64.0f+cpart->temp-(275.13f+32.0f), 0, 255); - *colg = restrict_flt(64.0f+cpart->ctype, 0, 255); - *colb = restrict_flt(64.0f+cpart->tmp, 0, 255); - - *pixel_mode |= FIRE_ADD; - return 0; -} -int graphics_LCRY(GRAPHICS_FUNC_ARGS) -{ - if(ren->decorations_enable && cpart->dcolour && (cpart->dcolour&0xFF000000)) - { - *colr = (cpart->dcolour>>16)&0xFF; - *colg = (cpart->dcolour>>8)&0xFF; - *colb = (cpart->dcolour)&0xFF; - - if(cpart->tmp2<10){ - *colr /= 10-cpart->tmp2; - *colg /= 10-cpart->tmp2; - *colb /= 10-cpart->tmp2; - } - - } - else - { - *colr = *colg = *colb = 0x50+((cpart->tmp2>10?10:cpart->tmp2)*10); - } - *pixel_mode |= NO_DECO; - return 0; - - /*int lifemod = ((cpart->tmp2>10?10:cpart->tmp2)*10); - *colr += lifemod; - *colg += lifemod; - *colb += lifemod; - if(decorations_enable && cpart->dcolour && cpart->dcolour&0xFF000000) - { - lifemod *= 2.5f; - if(lifemod < 40) - lifemod = 40; - *colr = (lifemod*((cpart->dcolour>>16)&0xFF) + (255-lifemod)**colr) >> 8; - *colg = (lifemod*((cpart->dcolour>>8)&0xFF) + (255-lifemod)**colg) >> 8; - *colb = (lifemod*((cpart->dcolour)&0xFF) + (255-lifemod)**colb) >> 8; - } - *pixel_mode |= NO_DECO; - return 0;*/ -} -int graphics_PCLN(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*10); - *colr += lifemod; - *colg += lifemod; - return 0; -} -int graphics_PBCN(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*10); - *colr += lifemod; - *colg += lifemod/2; - return 0; -} -int graphics_DLAY(GRAPHICS_FUNC_ARGS) -{ - int stage = (int)(((float)cpart->life/(cpart->temp-273.15))*100.0f); - *colr += stage; - *colg += stage; - *colb += stage; - return 0; -} -int graphics_HSWC(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*19); - *colr += lifemod; - return 0; -} -int graphics_PVOD(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*16); - *colr += lifemod; - return 0; -} -int graphics_STOR(GRAPHICS_FUNC_ARGS) -{ - if(cpart->tmp){ - *pixel_mode |= PMODE_GLOW; - *colr = 0x50; - *colg = 0xDF; - *colb = 0xDF; - } else { - *colr = 0x20; - *colg = 0xAF; - *colb = 0xAF; - } - return 0; -} -int graphics_PUMP(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*19); - *colb += lifemod; - return 0; -} -int graphics_GPMP(GRAPHICS_FUNC_ARGS) -{ - int lifemod = ((cpart->life>10?10:cpart->life)*19); - *colg += lifemod; - *colb += lifemod; - return 0; -} -int graphics_HFLM(GRAPHICS_FUNC_ARGS) -{ - int caddress = restrict_flt(restrict_flt((float)((int)(cpart->life/2)), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); - *colr = (unsigned char)hflm_data[caddress]; - *colg = (unsigned char)hflm_data[caddress+1]; - *colb = (unsigned char)hflm_data[caddress+2]; - - *firea = 255; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel - *pixel_mode |= FIRE_ADD; - //Returning 0 means dynamic, do not cache - return 0; -} -int graphics_FIRW(GRAPHICS_FUNC_ARGS) -{ - if(cpart->tmp>=3) - { - int caddress = restrict_flt(restrict_flt((float)(cpart->tmp-4), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); - *colr = (unsigned char)firw_data[caddress]; - *colg = (unsigned char)firw_data[caddress+1]; - *colb = (unsigned char)firw_data[caddress+2]; - - if (ren->decorations_enable && cpart->dcolour) - { - int a = (cpart->dcolour>>24)&0xFF; - *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; - *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; - *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; - } - - *firea = cpart->life*4; - if(*firea > 240) - *firea = 240; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel - *pixel_mode |= FIRE_ADD; - //Returning 0 means dynamic, do not cache - } - else if(cpart->tmp > 0) - { - *pixel_mode |= PMODE_GLOW; - } - return 0; -} -int graphics_GBMB(GRAPHICS_FUNC_ARGS) -{ - if (cpart->life <= 0) { - *pixel_mode |= PMODE_FLARE; - } - else - { - *pixel_mode |= PMODE_SPARK; - } - return 0; -} -int graphics_COAL(GRAPHICS_FUNC_ARGS) //Both COAL and Broken Coal -{ - *colr += (cpart->tmp2-295.15f)/3; - - if (*colr > 170) - *colr = 170; - if (*colr < *colg) - *colr = *colg; - - *colg = *colb = *colr; - - if((cpart->temp-295.15f) > 300.0f-200.0f) - { - float frequency = 3.1415/(2*300.0f-(300.0f-200.0f)); - int q = ((cpart->temp-295.15f)>300.0f)?300.0f-(300.0f-200.0f):(cpart->temp-295.15f)-(300.0f-200.0f); - - *colr += sin(frequency*q) * 226; - *colg += sin(frequency*q*4.55 +3.14) * 34; - *colb += sin(frequency*q*2.22 +3.14) * 64; - } - return 0; -} - diff --git a/src/elements/none.cpp b/src/elements/none.cpp deleted file mode 100644 index 6974e6c..0000000 --- a/src/elements/none.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "simulation/Element.h" - -int update_(UPDATE_FUNC_ARGS) { - - return 0; -} diff --git a/src/elements/nptct.cpp b/src/elements/nptct.cpp deleted file mode 100644 index f8e29e6..0000000 --- a/src/elements/nptct.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "simulation/Element.h" - -int update_NPTCT(UPDATE_FUNC_ARGS) { - if (parts[i].temp>295.0f) - parts[i].temp -= 2.5f; - return 0; -} diff --git a/src/elements/nwhl.cpp b/src/elements/nwhl.cpp deleted file mode 100644 index cae189a..0000000 --- a/src/elements/nwhl.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "simulation/Element.h" - -int update_NWHL(UPDATE_FUNC_ARGS) { - sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] -= 0.1f; - return 0; -} diff --git a/src/elements/pbcn.cpp b/src/elements/pbcn.cpp deleted file mode 100644 index 3b992d4..0000000 --- a/src/elements/pbcn.cpp +++ /dev/null @@ -1,95 +0,0 @@ -#include "simulation/Element.h" - -int update_PBCN(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - if (!parts[i].tmp2 && sim->pv[y/CELL][x/CELL]>4.0f) - parts[i].tmp2 = rand()%40+80; - if (parts[i].tmp2) - { - float advection = 0.1f; - parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; - parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; - parts[i].tmp2--; - if(!parts[i].tmp2){ - sim->kill_part(i); - return 1; - } - } - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_SPRK && - (r&0xFF)!=PT_NSCN && (r&0xFF)!=PT_PSCN && - (r&0xFF)!=PT_STKM && (r&0xFF)!=PT_STKM2 && - (r&0xFF)!=PT_PBCN && (r&0xFF)>8].ctype; - } - } - if (parts[i].life==10) - { - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[r>>8].life==0) - parts[r>>8].life = 10; - } - } - } - if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x + rx, y + ry, - parts[i].ctype); - if (r != -1) - { - parts[r].vx = rx * 3; - parts[r].vy = ry * 3; - if (r>i) - { - // Make sure movement doesn't happen until next frame, to avoid gaps in the beams of photons produced - parts[r].flags |= FLAG_SKIPMOVE; - } - } - } - } - } - } - else if (parts[i].ctype==PT_LIFE) {//create life a different way - for (rx=-1; rx<2; rx++) { - for (ry=-1; ry<2; ry++) { - sim->create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); - } - } - } else { - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); - } - } - return 0; -} diff --git a/src/elements/pcln.cpp b/src/elements/pcln.cpp deleted file mode 100644 index ba2c721..0000000 --- a/src/elements/pcln.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include "simulation/Element.h" - -int update_PCLN(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life>0 && parts[r>>8].life<4) - { - if (parts[r>>8].ctype==PT_PSCN) - parts[i].life = 10; - else if (parts[r>>8].ctype==PT_NSCN) - parts[i].life = 9; - } - if ((r&0xFF)==PT_PCLN) - { - if (parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[i].life==0&&parts[r>>8].life==10) - parts[i].life = 10; - } - } - if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (!r) - r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && - (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_SPRK && - (r&0xFF)!=PT_NSCN && (r&0xFF)!=PT_PSCN && - (r&0xFF)!=PT_STKM && (r&0xFF)!=PT_STKM2 && - (r&0xFF)!=PT_PBCN && (r&0xFF)>8].ctype; - } - } - if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x + rx, y + ry, - parts[i].ctype); - if (r != -1) - { - parts[r].vx = rx * 3; - parts[r].vy = ry * 3; - if (r>i) - { - // Make sure movement doesn't happen until next frame, to avoid gaps in the beams of photons produced - parts[r].flags |= FLAG_SKIPMOVE; - } - } - } - } - } - } - else if (parts[i].ctype==PT_LIFE) {//create life a different way - for (rx=-1; rx<2; rx++) { - for (ry=-1; ry<2; ry++) { - sim->create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); - } - } - } else { - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); - } - } - return 0; -} diff --git a/src/elements/phot.cpp b/src/elements/phot.cpp deleted file mode 100644 index 29d534b..0000000 --- a/src/elements/phot.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include "simulation/Element.h" - -int update_PHOT(UPDATE_FUNC_ARGS) { - int r, rt, rx, ry; - float rr, rrr; - parts[i].pavg[0] = x; - parts[i].pavg[1] = y; - if (!(parts[i].ctype&0x3FFFFFFF)) { - sim->kill_part(i); - return 1; - } - if (1>rand()%10) update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>=0 && x+rx(rand()%2000)) - { - parts[i].vx *= 0.90; - parts[i].vy *= 0.90; - sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); - rrr = (rand()%360)*3.14159f/180.0f; - rr = (rand()%128+128)/127.0f; - parts[r>>8].vx = rr*cosf(rrr); - parts[r>>8].vy = rr*sinf(rrr); - sim->pv[y/CELL][x/CELL] -= 15.0f * CFDS; - } - if ((r&0xFF)==PT_ISZS && 5>(rand()%2000)) - { - parts[i].vx *= 0.90; - parts[i].vy *= 0.90; - sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); - rr = (rand()%228+128)/127.0f; - rrr = (rand()%360)*3.14159f/180.0f; - parts[r>>8].vx = rr*cosf(rrr); - parts[r>>8].vy = rr*sinf(rrr); - sim->pv[y/CELL][x/CELL] -= 15.0f * CFDS; - } - } - r = pmap[y][x]; - if((r&0xFF) == PT_QRTZ && r)// && parts[i].ctype==0x3FFFFFFF) - { - float a = (rand()%360)*3.14159f/180.0f; - parts[i].vx = 3.0f*cosf(a); - parts[i].vy = 3.0f*sinf(a); - if(parts[i].ctype == 0x3FFFFFFF) - parts[i].ctype = 0x1F<<(rand()%26); - parts[i].life++; //Delay death - } - //r = pmap[y][x]; - //rt = r&0xFF; - /*if (rt==PT_CLNE || rt==PT_PCLN || rt==PT_BCLN || rt==PT_PBCN) { - if (!parts[r>>8].ctype) - parts[r>>8].ctype = PT_PHOT; - }*/ - - return 0; -} - -int graphics_PHOT(GRAPHICS_FUNC_ARGS) -{ - int x = 0; - *colr = *colg = *colb = 0; - for (x=0; x<12; x++) { - *colr += (cpart->ctype >> (x+18)) & 1; - *colb += (cpart->ctype >> x) & 1; - } - for (x=0; x<12; x++) - *colg += (cpart->ctype >> (x+9)) & 1; - x = 624/(*colr+*colg+*colb+1); - *colr *= x; - *colg *= x; - *colb *= x; - - *firea = 100; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode |= FIRE_ADD; - return 0; -} diff --git a/src/elements/pipe.cpp b/src/elements/pipe.cpp deleted file mode 100644 index 05972b6..0000000 --- a/src/elements/pipe.cpp +++ /dev/null @@ -1,334 +0,0 @@ -#include "simulation/Element.h" - -#define PFLAG_NORMALSPEED 0x00010000 - -signed char pos_1_rx[] = {-1,-1,-1, 0, 0, 1, 1, 1}; -signed char pos_1_ry[] = {-1, 0, 1,-1, 1,-1, 0, 1}; - -void pushParticle(Simulation * sim, int i, int count, int original) -{ - int rndstore, rnd, rx, ry, r, x, y, np, q, notctype=(((sim->parts[i].ctype)%3)+2); - if ((sim->parts[i].tmp&0xFF) == 0 || count >= 2)//don't push if there is nothing there, max speed of 2 per frame - return; - x = (int)(sim->parts[i].x+0.5f); - y = (int)(sim->parts[i].y+0.5f); - if( !(sim->parts[i].tmp&0x200) ) - { - //normal random push - rndstore = rand(); - // RAND_MAX is at least 32767 on all platforms i.e. pow(8,5)-1 - // so can go 5 cycles without regenerating rndstore - for (q=0; q<3; q++)//try to push twice - { - rnd = rndstore&7; - rndstore = rndstore>>3; - rx = pos_1_rx[rnd]; - ry = pos_1_ry[rnd]; - if (x+rx>=0 && y+ry>=0 && x+rxpmap[y+ry][x+rx]; - if (!r) - continue; - else if ((r&0xFF)==PT_PIPE && sim->parts[r>>8].ctype!=notctype && (sim->parts[r>>8].tmp&0xFF)==0) - { - sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); - sim->parts[r>>8].temp = sim->parts[i].temp; - sim->parts[r>>8].tmp2 = sim->parts[i].tmp2; - sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; - sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; - if (r>>8 > original) - sim->parts[r>>8].flags |= PFLAG_NORMALSPEED;//skip particle push, normalizes speed - sim->parts[i].tmp &= ~0xFF; - count++; - pushParticle(sim, r>>8,count,original); - } - } - } - } - else //predefined 1 pixel thick pipe movement - { - int coords = 7 - ((sim->parts[i].tmp>>10)&7); - r = sim->pmap[y+ pos_1_ry[coords]][x+ pos_1_rx[coords]]; - if (!r) - { - } - else if ((r&0xFF)==PT_PIPE && sim->parts[r>>8].ctype!=notctype && (sim->parts[r>>8].tmp&0xFF)==0) - { - sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); - sim->parts[r>>8].temp = sim->parts[i].temp; - sim->parts[r>>8].tmp2 = sim->parts[i].tmp2; - sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; - sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; - if (r>>8 > original) - sim->parts[r>>8].flags |= PFLAG_NORMALSPEED;//skip particle push, normalizes speed - sim->parts[i].tmp &= ~0xFF; - count++; - pushParticle(sim, r>>8,count,original); - } - - - } - return; -} - -int update_PIPE(UPDATE_FUNC_ARGS) { - int r, rx, ry, np; - int rnd, rndstore; - if (parts[i].ctype>=2 && parts[i].ctype<=4) - { - if (parts[i].life==3) - { - int lastneighbor = -1; - int neighborcount = 0; - int count = 0; - // make automatic pipe pattern - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==1) - { - parts[r>>8].ctype = (((parts[i].ctype)%3)+2);//reverse - parts[r>>8].life = 6; - if ( parts[i].tmp&0x100)//is a single pixel pipe - { - parts[r>>8].tmp |= 0x200;//will transfer to a single pixel pipe - parts[r>>8].tmp |= count<<10;//coords of where it came from - } - neighborcount ++; - lastneighbor = r>>8; - } - else if ((r&0xFF)==PT_PIPE&&parts[r>>8].ctype!=(((parts[i].ctype-1)%3)+2)) - { - neighborcount ++; - lastneighbor = r>>8; - } - count++; - } - if(neighborcount == 1) - parts[lastneighbor].tmp |= 0x100; - } - else - { - if (parts[i].flags&PFLAG_NORMALSPEED)//skip particle push to prevent particle number being higher causeing speed up - { - parts[i].tmp2 &= ~PFLAG_NORMALSPEED; - } - else - { - pushParticle(sim, i,0,i); - } - - if (nt)//there is something besides PIPE around current particle - { - rndstore = rand(); - rnd = rndstore&7; - rndstore = rndstore>>3; - rx = pos_1_rx[rnd]; - ry = pos_1_ry[rnd]; - if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; - if (surround_space && !r && (parts[i].tmp&0xFF)!=0) //creating at end - { - np = sim->create_part(-1,x+rx,y+ry,parts[i].tmp&0xFF); - if (np!=-1) - { - parts[np].temp = parts[i].temp;//pipe saves temp and life now - parts[np].life = parts[i].tmp2; - parts[np].tmp = parts[i].pavg[0]; - parts[np].ctype = parts[i].pavg[1]; - parts[i].tmp &= ~0xFF; - } - } - //try eating particle at entrance - else if ((parts[i].tmp&0xFF) == 0 && (sim->ptypes[r&0xFF].falldown!= 0 || sim->ptypes[r&0xFF].state == ST_GAS)) - { - if ((r&0xFF)==PT_SOAP) - sim->detach(r>>8); - parts[i].tmp = (parts[i].tmp&~0xFF) | parts[r>>8].type; - parts[i].temp = parts[r>>8].temp; - parts[i].tmp2 = parts[r>>8].life; - parts[i].pavg[0] = parts[r>>8].tmp; - parts[i].pavg[1] = parts[r>>8].ctype; - sim->kill_part(r>>8); - } - else if ((parts[i].tmp&0xFF) == 0 && (r&0xFF)==PT_STOR && parts[r>>8].tmp && (sim->ptypes[parts[r>>8].tmp].falldown!= 0 || sim->ptypes[parts[r>>8].tmp].state == ST_GAS)) - { - parts[i].tmp = parts[r>>8].tmp; - parts[i].temp = parts[r>>8].temp; - parts[i].tmp2 = parts[r>>8].tmp2; - parts[i].pavg[0] = parts[r>>8].pavg[0]; - parts[i].pavg[1] = parts[r>>8].pavg[1]; - parts[r>>8].tmp = 0; - parts[r>>8].life = 0; - } - } - } - } - } - else if (!parts[i].ctype && parts[i].life<=10) - { - if (parts[i].temp<272.15)//manual pipe colors - { - if (parts[i].temp>173.25&&parts[i].temp<273.15) - { - parts[i].ctype = 2; - parts[i].life = 0; - } - if (parts[i].temp>73.25&&parts[i].temp<=173.15) - { - parts[i].ctype = 3; - parts[i].life = 0; - } - if (parts[i].temp>=0&&parts[i].temp<=73.15) - { - parts[i].ctype = 4; - parts[i].life = 0; - } - } - else - { - // make a border - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - { - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_BRCK);//BRCK border, people didn't like DMND - } - } - if (parts[i].life<=1) - parts[i].ctype = 1; - } - } - else if (parts[i].ctype==1)//wait for empty space before starting to generate automatic pipe pattern - { - if (!parts[i].life) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_ALLOWAIR && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_WALL && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_WALLELEC && (sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_EWALL || sim->emap[(y+ry)/CELL][(x+rx)/CELL])) - parts[i].life=50; - } - } - else if (parts[i].life==5)//check for beginning of pipe single pixel - { - int issingle = 1; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxtmp&0xFF)>0 && (cpart->tmp&0xFF)tmp&0xFF; - tpart.temp = cpart->temp; - tpart.life = cpart->tmp2; - tpart.tmp = cpart->pavg[0]; - tpart.ctype = cpart->pavg[1]; - t = tpart.type; - if (ren->graphicscache[t].isready) - { - *pixel_mode = ren->graphicscache[t].pixel_mode; - *colr = ren->graphicscache[t].colr; - *colg = ren->graphicscache[t].colg; - *colb = ren->graphicscache[t].colb; - *firea = ren->graphicscache[t].firea; - *firer = ren->graphicscache[t].firer; - *fireg = ren->graphicscache[t].fireg; - *fireb = ren->graphicscache[t].fireb; - } - else - { - *colr = PIXR(ren->sim->ptypes[t].pcolors); - *colg = PIXR(ren->sim->ptypes[t].pcolors); - *colb = PIXR(ren->sim->ptypes[t].pcolors); - if (ren->sim->ptypes[t].graphics_func) - { - (*(ren->sim->ptypes[t].graphics_func))(ren, &tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); - } - else - { - graphics_DEFAULT(ren, &tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); - } - } - //*colr = PIXR(ptypes[cpart->tmp&0xFF].pcolors); - //*colg = PIXG(ptypes[cpart->tmp&0xFF].pcolors); - //*colb = PIXB(ptypes[cpart->tmp&0xFF].pcolors); - } - else - { - if (cpart->ctype==2) - { - *colr = 50; - *colg = 1; - *colb = 1; - } - else if (cpart->ctype==3) - { - *colr = 1; - *colg = 50; - *colb = 1; - } - else if (cpart->ctype==4) - { - *colr = 1; - *colg = 1; - *colb = 50; - } - else if (cpart->temp<272.15&&cpart->ctype!=1) - { - if (cpart->temp>173.25&&cpart->temp<273.15) - { - *colr = 50; - *colg = 1; - *colb = 1; - } - if (cpart->temp>73.25&&cpart->temp<=173.15) - { - *colr = 1; - *colg = 50; - *colb = 1; - } - if (cpart->temp>=0&&cpart->temp<=73.15) - { - *colr = 1; - *colg = 1; - *colb = 50; - } - } - } - return 0; -} diff --git a/src/elements/plnt.cpp b/src/elements/plnt.cpp deleted file mode 100644 index ef7985f..0000000 --- a/src/elements/plnt.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "simulation/Element.h" - -int update_PLNT(UPDATE_FUNC_ARGS) { - int r, rx, ry, np; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) - { - np = sim->create_part(r>>8,x+rx,y+ry,PT_PLNT); - if (np<0) continue; - parts[np].life = 0; - } - else if ((r&0xFF)==PT_LAVA && 1>(rand()%250)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - } - else if (((r&0xFF)==PT_SMKE || (r&0xFF)==PT_CO2) && (1>rand()%250)) - { - sim->kill_part(r>>8); - parts[i].life = rand()%60 + 60; - } - else if ((r&0xFF)==PT_WOOD && (1>rand()%20) && abs(rx+ry)<=2 && sim->VINE_MODE) - { - int nnx = rand()%3 -1; - int nny = rand()%3 -1; - if (x+rx+nnx>=0 && y+ry+nny>0 && x+rx+nnxcreate_part(-1,x+rx+nnx,y+ry+nny,PT_VINE); - if (np<0) continue; - parts[np].temp = parts[i].temp; - } - } - } - if (parts[i].life==2) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_O2); - } - parts[i].life = 0; - } - return 0; -} diff --git a/src/elements/plsm.cpp b/src/elements/plsm.cpp deleted file mode 100644 index f8b3865..0000000 --- a/src/elements/plsm.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "simulation/Element.h" -#include "hmap.h" - -int graphics_PLSM(GRAPHICS_FUNC_ARGS) -{ - int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); - *colr = (unsigned char)ren->plasma_data[caddress]; - *colg = (unsigned char)ren->plasma_data[caddress+1]; - *colb = (unsigned char)ren->plasma_data[caddress+2]; - - *firea = 255; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - - *pixel_mode = PMODE_GLOW | PMODE_ADD; //Clear default, don't draw pixel - *pixel_mode |= FIRE_ADD; - //Returning 0 means dynamic, do not cache - return 0; -} diff --git a/src/elements/plut.cpp b/src/elements/plut.cpp deleted file mode 100644 index 7c51b2d..0000000 --- a/src/elements/plut.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "simulation/Element.h" - -int update_PLUT(UPDATE_FUNC_ARGS) { - if (1>rand()%100 && ((int)(5.0f*sim->pv[y/CELL][x/CELL]))>(rand()%1000)) - { - sim->create_part(i, x, y, PT_NEUT); - } - return 0; -} diff --git a/src/elements/prti.cpp b/src/elements/prti.cpp deleted file mode 100644 index cb2030d..0000000 --- a/src/elements/prti.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include "simulation/Element.h" -/*these are the count values of where the particle gets stored, depending on where it came from - 0 1 2 - 7 . 3 - 6 5 4 - PRTO does (count+4)%8, so that it will come out at the opposite place to where it came in - PRTO does +/-1 to the count, so it doesn't jam as easily -*/ - -int update_PRTI(UPDATE_FUNC_ARGS) { - int r, nnx, rx, ry, fe = 0; - int count =0; - parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); - if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; - else if (parts[i].tmp<0) parts[i].tmp = 0; - for (count=0; count<8; count++) - { - rx = sim->portal_rx[count]; - ry = sim->portal_ry[count]; - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].falldown== 0 && sim->ptypes[r&0xFF].state != ST_GAS && (r&0xFF)!=PT_SPRK)) - { - r = sim->photons[y+ry][x+rx]; - if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (sim->ptypes[r&0xFF].falldown== 0 && sim->ptypes[r&0xFF].state != ST_GAS && (r&0xFF)!=PT_SPRK)) - continue; - } - - if ((r&0xFF)==PT_STKM || (r&0xFF)==PT_STKM2 || (r&0xFF)==PT_FIGH) - continue;// Handling these is a bit more complicated, and is done in STKM_interact() - - if ((r&0xFF) == PT_SOAP) - sim->detach(r>>8); - - for ( nnx=0; nnx<80; nnx++) - if (!sim->portalp[parts[i].tmp][count][nnx].type) - { - sim->portalp[parts[i].tmp][count][nnx] = parts[r>>8]; - if ((r&0xFF)==PT_SPRK) - sim->part_change_type(r>>8,x+rx,y+ry,parts[r>>8].ctype); - else - sim->kill_part(r>>8); - fe = 1; - break; - } - } - } - - - if (fe) { - int orbd[4] = {0, 0, 0, 0}; //Orbital distances - int orbl[4] = {0, 0, 0, 0}; //Orbital locations - if (!sim->parts[i].life) parts[i].life = rand()*rand()*rand(); - if (!sim->parts[i].ctype) parts[i].ctype = rand()*rand()*rand(); - sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); - for (r = 0; r < 4; r++) { - if (orbd[r]>1) { - orbd[r] -= 12; - if (orbd[r]<1) { - orbd[r] = (rand()%128)+128; - orbl[r] = rand()%255; - } else { - orbl[r] += 2; - orbl[r] = orbl[r]%255; - } - } else { - orbd[r] = (rand()%128)+128; - orbl[r] = rand()%255; - } - } - sim->orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); - } else { - parts[i].life = 0; - parts[i].ctype = 0; - } - return 0; -} diff --git a/src/elements/prto.cpp b/src/elements/prto.cpp deleted file mode 100644 index 88a2927..0000000 --- a/src/elements/prto.cpp +++ /dev/null @@ -1,116 +0,0 @@ -#include "simulation/Element.h" -/*these are the count values of where the particle gets stored, depending on where it came from - 0 1 2 - 7 . 3 - 6 5 4 - PRTO does (count+4)%8, so that it will come out at the opposite place to where it came in - PRTO does +/-1 to the count, so it doesn't jam as easily -*/ -int update_PRTO(UPDATE_FUNC_ARGS) { - int r, nnx, rx, ry, np, fe = 0; - int count = 0; - parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); - if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; - else if (parts[i].tmp<0) parts[i].tmp = 0; - for (count=0; count<8; count++) - { - rx = sim->portal_rx[count]; - ry = sim->portal_ry[count]; - if (x+rx>=0 && y+ry>0 && x+rxportalp[parts[i].tmp][randomness][nnx].type==PT_SPRK)// TODO: make it look better, spark creation - { - sim->create_part(-1,x+1,y,PT_SPRK); - sim->create_part(-1,x+1,y+1,PT_SPRK); - sim->create_part(-1,x+1,y-1,PT_SPRK); - sim->create_part(-1,x,y-1,PT_SPRK); - sim->create_part(-1,x,y+1,PT_SPRK); - sim->create_part(-1,x-1,y+1,PT_SPRK); - sim->create_part(-1,x-1,y,PT_SPRK); - sim->create_part(-1,x-1,y-1,PT_SPRK); - sim->portalp[parts[i].tmp][randomness][nnx] = sim->emptyparticle; - break; - } - else if (sim->portalp[parts[i].tmp][randomness][nnx].type) - { - if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM) - sim->player.spwn = 0; - if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM2) - sim->player2.spwn = 0; - if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_FIGH) - { - sim->fighcount--; - sim->fighters[(unsigned char)sim->portalp[parts[i].tmp][randomness][nnx].tmp].spwn = 0; - } - np = sim->create_part(-1, x+rx, y+ry, sim->portalp[parts[i].tmp][randomness][nnx].type); - if (np<0) - { - if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM) - sim->player.spwn = 1; - if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM2) - sim->player2.spwn = 1; - if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_FIGH) - { - sim->fighcount++; - sim->fighters[(unsigned char)sim->portalp[parts[i].tmp][randomness][nnx].tmp].spwn = 1; - } - continue; - } - if (parts[np].type==PT_FIGH) - { - // Release the fighters[] element allocated by create_part, the one reserved when the fighter went into the portal will be used - sim->fighters[(unsigned char)parts[np].tmp].spwn = 0; - sim->fighters[(unsigned char)sim->portalp[parts[i].tmp][randomness][nnx].tmp].spwn = 1; - } - parts[np] = sim->portalp[parts[i].tmp][randomness][nnx]; - parts[np].x = x+rx; - parts[np].y = y+ry; - sim->portalp[parts[i].tmp][randomness][nnx] = sim->emptyparticle; - break; - } - } - } - } - } - if (fe) { - int orbd[4] = {0, 0, 0, 0}; //Orbital distances - int orbl[4] = {0, 0, 0, 0}; //Orbital locations - if (!sim->parts[i].life) parts[i].life = rand()*rand()*rand(); - if (!sim->parts[i].ctype) parts[i].ctype = rand()*rand()*rand(); - sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); - for (r = 0; r < 4; r++) { - if (orbd[r]<254) { - orbd[r] += 16; - if (orbd[r]>254) { - orbd[r] = 0; - orbl[r] = rand()%255; - } - else - { - orbl[r] += 1; - orbl[r] = orbl[r]%255; - } - //orbl[r] += 1; - //orbl[r] = orbl[r]%255; - } else { - orbd[r] = 0; - orbl[r] = rand()%255; - } - } - sim->orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); - } else { - parts[i].life = 0; - parts[i].ctype = 0; - } - return 0; -} diff --git a/src/elements/pump.cpp b/src/elements/pump.cpp deleted file mode 100644 index af05c02..0000000 --- a/src/elements/pump.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "simulation/Element.h" - -int update_PUMP(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - if (parts[i].life==10) - { - if (parts[i].temp>=256.0+273.15) - parts[i].temp=256.0+273.15; - if (parts[i].temp<= -256.0+273.15) - parts[i].temp = -256.0+273.15; - - if (sim->pv[y/CELL][x/CELL]<(parts[i].temp-273.15)) - sim->pv[y/CELL][x/CELL] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL][x/CELL]); - if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp-273.15)) - sim->pv[y/CELL+1][x/CELL] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL+1][x/CELL]); - if (x+CELLpv[y/CELL][x/CELL+1] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL][x/CELL+1]); - if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL+1][x/CELL+1]); - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[r>>8].life==0) - parts[r>>8].life = 10; - } - } - } - return 0; -} diff --git a/src/elements/pvod.cpp b/src/elements/pvod.cpp deleted file mode 100644 index 921d596..0000000 --- a/src/elements/pvod.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "simulation/Element.h" - -int update_PVOD(UPDATE_FUNC_ARGS) { - int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life>0 && parts[r>>8].life<4) - { - if (parts[r>>8].ctype==PT_PSCN) - parts[i].life = 10; - else if (parts[r>>8].ctype==PT_NSCN) - parts[i].life = 9; - } - if ((r&0xFF)==PT_PVOD) - { - if (parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[i].life==0&&parts[r>>8].life==10) - parts[i].life = 10; - } - } - return 0; -} diff --git a/src/elements/pyro.cpp b/src/elements/pyro.cpp deleted file mode 100644 index 6ffe644..0000000 --- a/src/elements/pyro.cpp +++ /dev/null @@ -1,130 +0,0 @@ -#include "simulation/Element.h" - -int update_PYRO(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, t = parts[i].type; - if (t==PT_PLSM&&parts[i].ctype == PT_NBLE&&parts[i].life <=1) - { - t = PT_NBLE; - sim->part_change_type(i,x,y,t); - parts[i].life = 0; - } - if(t==PT_FIRE && parts[i].life <=1) - { - if (parts[i].tmp==3){ - t = PT_DSTW; - sim->part_change_type(i,x,y,t); - parts[i].life = 0; - parts[i].ctype = PT_FIRE; - } - else if (parts[i].temp<625) - { - t = PT_SMKE; - sim->part_change_type(i,x,y,t); - parts[i].life = rand()%20+250; - } - } - if(t==PT_PLSM && parts[i].life <=1) - { - if (parts[i].tmp==3){ - t = PT_DSTW; - sim->part_change_type(i,x,y,t); - parts[i].life = 0; - parts[i].ctype = PT_FIRE; - } - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL] && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_STREAM) - continue; - rt = parts[r>>8].type; - if ((surround_space || sim->ptypes[rt].explosive) && - (t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL)) && - (t!=PT_PHOT || rt!=PT_INSL) && - (rt!=PT_SPNG || parts[r>>8].life==0) && - (rt!=PT_H2 || (parts[r>>8].temp < 2273.15 && sim->pv[y/CELL][x/CELL] < 50.0f)) && - sim->ptypes[rt].flammable && (sim->ptypes[rt].flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000)) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); - parts[r>>8].temp = restrict_flt(sim->ptypes[PT_FIRE].heat + (sim->ptypes[rt].flammable/2), MIN_TEMP, MAX_TEMP); - parts[r>>8].life = rand()%80+180; - parts[r>>8].tmp = parts[r>>8].ctype = 0; - if (sim->ptypes[rt].explosive) - sim->pv[y/CELL][x/CELL] += 0.25f * CFDS; - } - } - if (sim->legacy_enable) update_legacy_PYRO(UPDATE_FUNC_SUBCALL_ARGS); - return 0; -} - -int update_legacy_PYRO(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, lpv, t = parts[i].type; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL] && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_STREAM) - continue; - rt = r&0xFF; - lpv = (int)sim->pv[(y+ry)/CELL][(x+rx)/CELL]; - if (lpv < 1) lpv = 1; - if (t!=PT_SPRK && sim->ptypes[rt].meltable && ((rt!=PT_RBDM && rt!=PT_LRBD) || t!=PT_SPRK) && ((t!=PT_FIRE&&t!=PT_PLSM) || (rt!=PT_METL && rt!=PT_IRON && rt!=PT_ETRD && rt!=PT_PSCN && rt!=PT_NSCN && rt!=PT_NTCT && rt!=PT_PTCT && rt!=PT_BMTL && rt!=PT_BRMT && rt!=PT_SALT && rt!=PT_INWR)) && - sim->ptypes[rt].meltable*lpv>(rand()%1000)) - { - if (t!=PT_LAVA || parts[i].life>0) - { - parts[r>>8].ctype = (rt==PT_BRMT)?PT_BMTL:parts[r>>8].type; - parts[r>>8].ctype = (parts[r>>8].ctype==PT_SAND)?PT_GLAS:parts[r>>8].ctype; - sim->part_change_type(r>>8,x+rx,y+ry,PT_LAVA); - parts[r>>8].life = rand()%120+240; - } - else - { - parts[i].life = 0; - t = parts[i].type = (parts[i].ctype)?parts[i].ctype:PT_STNE; - parts[i].ctype = PT_NONE;//rt; - sim->part_change_type(i,x,y,t); - return 1; - } - } - if (t!=PT_SPRK && (rt==PT_ICEI || rt==PT_SNOW)) - { - parts[r>>8].type = PT_WATR; - if (t==PT_FIRE) - { - sim->kill_part(i); - return 1; - } - if (t==PT_LAVA) - { - parts[i].life = 0; - t = parts[i].type = PT_STNE; - sim->part_change_type(i,x,y,t); - } - } - if (t!=PT_SPRK && (rt==PT_WATR || rt==PT_DSTW || rt==PT_SLTW)) - { - sim->kill_part(r>>8); - if (t==PT_FIRE) - { - sim->kill_part(i); - return 1; - } - if (t==PT_LAVA) - { - parts[i].life = 0; - t = parts[i].type = (parts[i].ctype)?parts[i].ctype:PT_STNE; - parts[i].ctype = PT_NONE; - sim->part_change_type(i,x,y,t); - } - } - } - return 0; -} diff --git a/src/elements/qrtz.cpp b/src/elements/qrtz.cpp deleted file mode 100644 index c33cacb..0000000 --- a/src/elements/qrtz.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include "simulation/Element.h" - -int update_QRTZ(UPDATE_FUNC_ARGS) { - int r, tmp, trade, rx, ry, np, t; - t = parts[i].type; - if (t == PT_QRTZ) - { - parts[i].pavg[0] = parts[i].pavg[1]; - parts[i].pavg[1] = sim->pv[y/CELL][x/CELL]; - if (parts[i].pavg[1]-parts[i].pavg[0] > 0.05*(parts[i].temp/3) || parts[i].pavg[1]-parts[i].pavg[0] < -0.05*(parts[i].temp/3)) - { - sim->part_change_type(i,x,y,PT_PQRT); - } - } - // absorb SLTW - if (parts[i].ctype!=-1) - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%2500)) - { - sim->kill_part(r>>8); - parts[i].ctype ++; - } - } - // grow if absorbed SLTW - if (parts[i].ctype>0) - { - for ( trade = 0; trade<5; trade ++) - { - rx = rand()%3-1; - ry = rand()%3-1; - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_QRTZ); - if (np>-1) - { - parts[np].tmp = parts[i].tmp; - parts[i].ctype--; - if (5>rand()%10) - { - parts[np].ctype=-1;//dead qrtz - } - else if (!parts[i].ctype && 1>rand()%15) - { - parts[i].ctype=-1; - } - - break; - } - } - } - } - } - // diffuse absorbed SLTW - if (parts[i].ctype>0) - { - for ( trade = 0; trade<9; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].ctype) && parts[r>>8].ctype>=0 )//diffusion - { - tmp = parts[i].ctype - parts[r>>8].ctype; - if (tmp ==1) - { - parts[r>>8].ctype ++; - parts[i].ctype --; - break; - } - if (tmp>0) - { - parts[r>>8].ctype += tmp/2; - parts[i].ctype -= tmp/2; - break; - } - } - } - } - } - return 0; -} diff --git a/src/elements/repl.cpp b/src/elements/repl.cpp deleted file mode 100644 index faa9c58..0000000 --- a/src/elements/repl.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "simulation/Element.h" - -int update_REPL(UPDATE_FUNC_ARGS) { - int r, rx, ry, ri; - for(ri = 0; ri <= 10; ri++) - { - rx = (rand()%20)-10; - ry = (rand()%20)-10; - if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; - - if (r && !(sim->ptypes[r&0xFF].properties & TYPE_SOLID)){ - parts[r>>8].vx += isign(rx)*((parts[i].temp-273.15)/10.0f); - parts[r>>8].vy += isign(ry)*((parts[i].temp-273.15)/10.0f); - } - } - } - return 0; -} diff --git a/src/elements/rime.cpp b/src/elements/rime.cpp deleted file mode 100644 index 878b928..0000000 --- a/src/elements/rime.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "simulation/Element.h" - -int update_RIME(UPDATE_FUNC_ARGS) { - int r, rx, ry; - parts[i].vx = 0; - parts[i].vy = 0; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxpart_change_type(i,x,y,PT_FOG); - parts[i].life = rand()%50 + 60; - } - else if ((r&0xFF)==PT_FOG&&parts[r>>8].life>0) - { - sim->part_change_type(i,x,y,PT_FOG); - parts[i].life = parts[r>>8].life; - } - } - return 0; -} diff --git a/src/elements/shld.cpp b/src/elements/shld.cpp deleted file mode 100644 index ade7edb..0000000 --- a/src/elements/shld.cpp +++ /dev/null @@ -1,162 +0,0 @@ -#include "simulation/Element.h" - -int update_SHLD1(UPDATE_FUNC_ARGS) { - int r, nnx, nny, rx, ry; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%200&&parts[i].life==0) - { - sim->part_change_type(i,x,y,PT_SHLD2); - parts[i].life = 7; - } - for ( nnx=-1; nnx<2; nnx++) - for ( nny=-1; nny<2; nny++) - { - if (!pmap[y+ry+nny][x+rx+nnx]) - { - sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); - //parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; - } - } - } - else if ((r&0xFF)==PT_SHLD3&&4>rand()%10) - { - sim->part_change_type(i,x,y,PT_SHLD2); - parts[i].life = 7; - } - } - return 0; -} - -int update_SHLD2(UPDATE_FUNC_ARGS) { - int r, nnx, nny, rx, ry, np; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx0) - sim->create_part(-1,x+rx,y+ry,PT_SHLD1); - if (!r) - continue; - else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) - { - if (25>rand()%200&&parts[i].life==0) - { - sim->part_change_type(i,x,y,PT_SHLD3); - parts[i].life = 7; - } - for ( nnx=-1; nnx<2; nnx++) - for ( nny=-1; nny<2; nny++) - { - if (!pmap[y+ry+nny][x+rx+nnx]) - { - np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); - if (np<0) continue; - parts[np].life=7; - } - } - } - else if ((r&0xFF)==PT_SHLD4&&4>rand()%10) - { - sim->part_change_type(i,x,y,PT_SHLD3); - parts[i].life = 7; - } - } - return 0; -} - -int update_SHLD3(UPDATE_FUNC_ARGS) { - int r, nnx, nny, rx, ry, np; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%2500) - { - np = sim->create_part(-1,x+rx,y+ry,PT_SHLD1); - if (np<0) continue; - parts[np].life=7; - sim->part_change_type(i,x,y,PT_SHLD2); - } - else - continue; - - } - if ((r&0xFF)==PT_SHLD1 && parts[i].life>3) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_SHLD2); - parts[r>>8].life=7; - } - else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) - { - if (18>rand()%3000&&parts[i].life==0) - { - sim->part_change_type(i,x,y,PT_SHLD4); - parts[i].life = 7; - } - for ( nnx=-1; nnx<2; nnx++) - for ( nny=-1; nny<2; nny++) - { - - if (!pmap[y+ry+nny][x+rx+nnx]) - { - np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); - if (np<0) continue; - parts[np].life=7; - } - } - } - } - return 0; -} - -int update_SHLD4(UPDATE_FUNC_ARGS) { - int r, nnx, nny, rx, ry, np; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxrand()%5500) - { - np = sim->create_part(-1,x+rx,y+ry,PT_SHLD1); - if (np<0) continue; - parts[np].life=7; - sim->part_change_type(i,x,y,PT_SHLD2); - } - else - continue; - - } - if ((r&0xFF)==PT_SHLD2 && parts[i].life>3) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_SHLD3); - parts[r>>8].life = 7; - } - else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) - for ( nnx=-1; nnx<2; nnx++) - for ( nny=-1; nny<2; nny++) - { - if (!pmap[y+ry+nny][x+rx+nnx]) - { - np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); - if (np<0) continue; - parts[np].life=7; - } - } - } - return 0; -} diff --git a/src/elements/sing.cpp b/src/elements/sing.cpp deleted file mode 100644 index de1e329..0000000 --- a/src/elements/sing.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include "simulation/Element.h" - -int update_SING(UPDATE_FUNC_ARGS) { - int r, rx, ry, cry, crx, rad, nxi, nxj, nb, j, spawncount; - int singularity = -parts[i].life; - float angle, v; - - if (sim->pv[y/CELL][x/CELL]pv[y/CELL][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL]); - if (y+CELLpv[y/CELL+1][x/CELL]pv[y/CELL+1][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL+1][x/CELL]); - if (x+CELLpv[y/CELL][x/CELL+1] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL+1]); - if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.1f*(singularity-sim->pv[y/CELL+1][x/CELL+1]); - } - if (y+CELL>0 && sim->pv[y/CELL-1][x/CELL]pv[y/CELL-1][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL-1][x/CELL]); - if (x+CELL>0) - { - sim->pv[y/CELL][x/CELL-1] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL-1]); - if (y+CELL>0) - sim->pv[y/CELL-1][x/CELL-1] += 0.1f*(singularity-sim->pv[y/CELL-1][x/CELL-1]); - } - if (parts[i].life<1) { - //Pop! - for (rx=-2; rx<3; rx++) { - crx = (x/CELL)+rx; - for (ry=-2; ry<3; ry++) { - cry = (y/CELL)+ry; - if (cry > 0 && crx > 0 && crx < (XRES/CELL) && cry < (YRES/CELL)) { - sim->pv[cry][crx] += (float)parts[i].tmp; - } - } - } - spawncount = (parts[i].tmp>255)?255:parts[i].tmp; - if (spawncount>=1) - spawncount = spawncount/8; - spawncount = spawncount*spawncount*M_PI; - for (j=0;jcreate_part(-3, x, y, PT_PHOT); - break; - case 1: - nb = sim->create_part(-3, x, y, PT_NEUT); - break; - case 2: - nb = sim->create_part(-3, x, y, PT_ELEC); - break; - } - if (nb!=-1) { - parts[nb].life = (rand()%300); - parts[nb].temp = MAX_TEMP/2; - angle = rand()*2.0f*M_PI/RAND_MAX; - v = (float)(rand())*5.0f/RAND_MAX; - parts[nb].vx = v*cosf(angle); - parts[nb].vy = v*sinf(angle); - } - else if (sim->pfree==-1) - break;//if we've run out of particles, stop trying to create them - saves a lot of lag on "sing bomb" saves - } - sim->kill_part(i); - return 1; - } - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=rand()/(RAND_MAX/100)+1) - { - if ((r&0xFF)==PT_SING && parts[r>>8].life >10) - { - if (parts[i].life+parts[r>>8].life > 255) - continue; - parts[i].life += parts[r>>8].life; - } - else - { - if (parts[i].life+3 > 255) - { - if (parts[r>>8].type!=PT_SING && 1>rand()%100) - { - int np; - np = sim->create_part(r>>8,x+rx,y+ry,PT_SING); - parts[np].life = rand()%50+60; - } - continue; - } - parts[i].life += 3; - parts[i].tmp++; - } - parts[i].temp = restrict_flt(parts[r>>8].temp+parts[i].temp, MIN_TEMP, MAX_TEMP); - sim->kill_part(r>>8); - } - } - return 0; -} diff --git a/src/elements/sltw.cpp b/src/elements/sltw.cpp deleted file mode 100644 index 507602c..0000000 --- a/src/elements/sltw.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "simulation/Element.h" - -int update_SLTW(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%10000)) - sim->kill_part(r>>8); - if ((r&0xFF)==PT_PLNT&&5>(rand()%1000)) - sim->kill_part(r>>8); - if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && !sim->legacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - } - if ((r&0xFF)==PT_FIRE){ - sim->kill_part(r>>8); - if(1>(rand()%150)){ - sim->kill_part(i); - return 1; - } - } - } - return 0; -} diff --git a/src/elements/smke.cpp b/src/elements/smke.cpp deleted file mode 100644 index e9311bd..0000000 --- a/src/elements/smke.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "simulation/Element.h" - -int graphics_SMKE(GRAPHICS_FUNC_ARGS) -{ - *colr = 55; - *colg = 55; - *colb = 55; - - *firea = 75; - *firer = 55; - *fireg = 55; - *fireb = 55; - - *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel - *pixel_mode |= FIRE_BLEND; - //Returning 1 means static, cache as we please - return 1; -} \ No newline at end of file diff --git a/src/elements/soap.cpp b/src/elements/soap.cpp deleted file mode 100644 index 0d1054f..0000000 --- a/src/elements/soap.cpp +++ /dev/null @@ -1,234 +0,0 @@ -#include "simulation/Element.h" - -int update_SOAP(UPDATE_FUNC_ARGS) -{ - int r, rx, ry, nr, ng, nb, na; - float tr, tg, tb, ta; - float blend; - - //0x01 - bubble on/off - //0x02 - first mate yes/no - //0x04 - "back" mate yes/no - - if ((parts[i].ctype&1) == 1) - { - if (parts[i].temp>0) - { - if (parts[i].life<=0) - { - if ((parts[i].ctype&6) != 6 && parts[i].ctype>1) - { - int target; - - target = i; - - while((parts[target].ctype&6) != 6 && parts[target].ctype>1) - { - if ((parts[target].ctype&2) == 2) - { - target = parts[target].tmp; - sim->detach(target); - } - - if ((parts[target].ctype&4) == 4) - { - target = parts[target].tmp2; - sim->detach(target); - } - } - } - - if ((parts[i].ctype&6) != 6) - parts[i].ctype = 0; - - if ((parts[i].ctype&6) == 6 && (parts[parts[i].tmp].ctype&6) == 6 && parts[parts[i].tmp].tmp == i) - sim->detach(i); - } - - parts[i].vy -= 0.1f; - - parts[i].vy *= 0.5f; - parts[i].vx *= 0.5f; - } - - if((parts[i].ctype&2) != 2) - { - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type == PT_SOAP) && ((parts[r>>8].ctype&1) == 1) - && ((parts[r>>8].ctype&4) != 4)) - { - if ((parts[r>>8].ctype&2) == 2) - { - parts[i].tmp = r>>8; - parts[r>>8].tmp2 = i; - - parts[i].ctype |= 2; - parts[r>>8].ctype |= 4; - } - else - { - if ((parts[i].ctype&2) != 2) - { - parts[i].tmp = r>>8; - parts[r>>8].tmp2 = i; - - parts[i].ctype |= 2; - parts[r>>8].ctype |= 4; - } - } - } - } - } - else - { - if (parts[i].life<=0) - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL]) - continue; - - if (parts[i].temp>0) - { - if (sim->bmap[(y+ry)/CELL][(x+rx)/CELL] - || (r && sim->ptypes[r&0xFF].state != ST_GAS - && (r&0xFF) != PT_SOAP && (r&0xFF) != PT_GLAS) - || (parts[r>>8].ctype == 0 && (r&0xFF) == PT_SOAP - && (abs(parts[r>>8].vx)<2 || abs(parts[r>>8].vy)<2))) - { - sim->detach(i); - continue; - } - } - - if ((r&0xFF) == PT_SOAP && parts[r>>8].ctype == 1) - { - int buf; - - buf = parts[i].tmp; - - parts[i].tmp = r>>8; - parts[buf].tmp2 = r>>8; - parts[r>>8].tmp2 = i; - parts[r>>8].tmp = buf; - parts[r>>8].ctype = 7; - } - - if ((r&0xFF) == PT_SOAP && parts[r>>8].ctype == 7 && parts[i].tmp != r>>8 && parts[i].tmp2 != r>>8) - { - int buf; - - parts[parts[i].tmp].tmp2 = parts[r>>8].tmp2; - parts[parts[r>>8].tmp2].tmp = parts[i].tmp; - parts[r>>8].tmp2 = i; - parts[i].tmp = r>>8; - } - } - } - - if((parts[i].ctype&2) == 2) - { - float d, dx, dy; - - dx = parts[i].x - parts[parts[i].tmp].x; - dy = parts[i].y - parts[parts[i].tmp].y; - - d = 9/(pow(dx, 2)+pow(dy, 2)+9)-0.5; - - parts[parts[i].tmp].vx -= dx*d; - parts[parts[i].tmp].vy -= dy*d; - - parts[i].vx += dx*d; - parts[i].vy += dy*d; - - if (((parts[parts[i].tmp].ctype&2) == 2) && ((parts[parts[i].tmp].ctype&1) == 1) - && ((parts[parts[parts[i].tmp].tmp].ctype&2) == 2) && ((parts[parts[parts[i].tmp].tmp].ctype&1) == 1)) - { - int ii; - - ii = parts[parts[parts[i].tmp].tmp].tmp; - - dx = parts[ii].x - parts[parts[i].tmp].x; - dy = parts[ii].y - parts[parts[i].tmp].y; - - d = 81/(pow(dx, 2)+pow(dy, 2)+81)-0.5; - - parts[parts[i].tmp].vx -= dx*d*0.5f; - parts[parts[i].tmp].vy -= dy*d*0.5f; - - parts[ii].vx += dx*d*0.5f; - parts[ii].vy += dy*d*0.5f; - } - } - } - else - { - if (sim->pv[y/CELL][x/CELL]>0.5f || sim->pv[y/CELL][x/CELL]<(-0.5f)) - { - parts[i].ctype = 1; - parts[i].life = 10; - } - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].vx)/2; - ay = (parts[i].vy + parts[r>>8].vy)/2; - - parts[i].vx = ax; - parts[i].vy = ay; - parts[r>>8].vx = ax; - parts[r>>8].vy = ay; - } - } - } - - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; - tg = (parts[r>>8].dcolour>>8)&0xFF; - tb = (parts[r>>8].dcolour)&0xFF; - ta = (parts[r>>8].dcolour>>24)&0xFF; - - nr = (tr*blend); - ng = (tg*blend); - nb = (tb*blend); - na = (ta*blend); - - parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; - } - } - - return 0; -} diff --git a/src/elements/spng.cpp b/src/elements/spng.cpp deleted file mode 100644 index 868b1e6..0000000 --- a/src/elements/spng.cpp +++ /dev/null @@ -1,110 +0,0 @@ -#include "simulation/Element.h" - -int update_SPNG(UPDATE_FUNC_ARGS) { - int r, trade, rx, ry, tmp, np; - if (sim->pv[y/CELL][x/CELL]<=3 && sim->pv[y/CELL][x/CELL]>=-3&&parts[i].temp<=374.0f) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=rand()/(RAND_MAX/100)+1) - { - parts[i].life++; - sim->kill_part(r>>8); - } - } - } - else - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create water - { - np = sim->create_part(-1,x+rx,y+ry,PT_WATR); - if (np>-1) parts[i].life--; - } - } - for ( trade = 0; trade<9; trade ++) - { - rx = rand()%5-2; - ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].life)&&parts[i].life>0)//diffusion - { - tmp = parts[i].life - parts[r>>8].life; - if (tmp ==1) - { - parts[r>>8].life ++; - parts[i].life --; - trade = 9; - } - else if (tmp>0) - { - parts[r>>8].life += tmp/2; - parts[i].life -= tmp/2; - trade = 9; - } - } - } - } - tmp = 0; - if (parts[i].life>0) - { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].life>60) - parts[r>>8].life -= parts[r>>8].life/60; - else if (parts[r>>8].life>2) - parts[r>>8].life--; - } - } - } - if (tmp && parts[i].life>3) - parts[i].life -= parts[i].life/3; - if (tmp>1) - tmp = tmp/2; - if (tmp || parts[i].temp>=374) - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create steam - { - np = sim->create_part(-1,x+rx,y+ry,PT_WTRV); - if (np>-1) - { - parts[np].temp = parts[i].temp; - tmp--; - parts[i].life--; - parts[i].temp -= 20.0f; - } - } - } - if (tmp>0) - { - if (parts[i].life>tmp) - parts[i].life -= tmp; - else - parts[i].life = 0; - } - return 0; -} diff --git a/src/elements/sprk.cpp b/src/elements/sprk.cpp deleted file mode 100644 index e01c774..0000000 --- a/src/elements/sprk.cpp +++ /dev/null @@ -1,232 +0,0 @@ -#include "simulation/Element.h" - -int update_SPRK(UPDATE_FUNC_ARGS) { - int r, rx, ry, rt, conduct_sprk, nearp, pavg, ct = parts[i].ctype; - update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); - - if (parts[i].life<=0) - { - if (ct==PT_WATR||ct==PT_SLTW||ct==PT_PSCN||ct==PT_NSCN||ct==PT_ETRD||ct==PT_INWR) - parts[i].temp = R_TEMP + 273.15f; - if (ct<=0 || ct>=PT_NUM) - ct = PT_METL; - sim->part_change_type(i,x,y,ct); - parts[i].ctype = PT_NONE; - parts[i].life = 4; - if (ct == PT_WATR) - parts[i].life = 64; - if (ct == PT_SLTW) - parts[i].life = 54; - if (ct == PT_SWCH) - parts[i].life = 14; - return 0; - } - if (ct==PT_SPRK) - { - sim->kill_part(i); - return 1; - } - else if (ct==PT_NTCT || ct==PT_PTCT) - { - update_NPTCT(UPDATE_FUNC_SUBCALL_ARGS); - } - else if (ct==PT_ETRD&&parts[i].life==1) - { - nearp = sim->nearest_part(i, PT_ETRD, -1); - if (nearp!=-1 && sim->parts_avg(i, nearp, PT_INSL)!=PT_INSL) - { - sim->create_line(x, y, (int)(parts[nearp].x+0.5f), (int)(parts[nearp].y+0.5f), 0, 0, PT_PLSM, 0); - sim->part_change_type(i,x,y,ct); - ct = parts[i].ctype = PT_NONE; - parts[i].life = 20; - sim->part_change_type(nearp,(int)(parts[nearp].x+0.5f),(int)(parts[nearp].y+0.5f),PT_SPRK); - parts[nearp].life = 9; - parts[nearp].ctype = PT_ETRD; - } - } - else if (ct==PT_NBLE&&parts[i].life<=1&&parts[i].tmp!=1) - { - parts[i].life = rand()%150+50; - sim->part_change_type(i,x,y,PT_PLSM); - parts[i].ctype = PT_NBLE; - parts[i].temp = 3500; - sim->pv[y/CELL][x/CELL] += 1; - } - else if (ct==PT_TESC) // tesla coil code - { - if (parts[i].tmp>300) - parts[i].tmp=300; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+rx*2, y+ry*2, PT_LIGH); - if (p!=-1) - { - if(parts[i].tmp<=4) //Prevent Arithmetic errors with zero values - continue; - parts[p].life=rand()%(2+parts[i].tmp/15)+parts[i].tmp/7; - if (parts[i].life>60) - parts[i].life=60; - parts[p].temp=parts[p].life*parts[i].tmp/2.5; - parts[p].tmp2=1; - parts[p].tmp=acos(1.0*rx/sqrt(rx*rx+ry*ry))/M_PI*360; - parts[i].temp-=parts[i].tmp*2+parts[i].temp/5; // slight self-cooling - if (fabs(sim->pv[y/CELL][x/CELL])!=0.0f) - { - if (fabs(sim->pv[y/CELL][x/CELL])<=0.5f) - sim->pv[y/CELL][x/CELL]=0; - else - sim->pv[y/CELL][x/CELL]-=(sim->pv[y/CELL][x/CELL]>0)?0.5:-0.5; - } - } - } - } - } - else if (ct==PT_IRON) { - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()/(RAND_MAX/1000))) || - ((r&0xFF) == PT_SLTW && 30>(rand()/(RAND_MAX/1000))) || - ((r&0xFF) == PT_WATR && 30>(rand()/(RAND_MAX/1000)))) - { - if (rand()part_change_type(r>>8,x+rx,y+ry,PT_O2); - else - sim->part_change_type(r>>8,x+rx,y+ry,PT_H2); - } - } - } - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8].type; - conduct_sprk = 1; - - - pavg = sim->parts_avg(r>>8, i,PT_INSL); - if ((rt==PT_SWCH||(rt==PT_SPRK&&parts[r>>8].ctype==PT_SWCH)) && pavg!=PT_INSL && parts[i].life<4) // make sparked SWCH turn off correctly - { - if (rt==PT_SWCH&&ct==PT_PSCN&&parts[r>>8].life<10) { - parts[r>>8].life = 10; - } - if (ct==PT_NSCN) { - sim->part_change_type(r>>8,x+rx,y+ry,PT_SWCH); - parts[r>>8].ctype = PT_NONE; - parts[r>>8].life = 9; - } - } - else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_PUMP||rt==PT_GPMP||rt==PT_HSWC||rt==PT_PBCN) && parts[i].life<4) // PROP_PTOGGLE, Maybe? We seem to use 2 different methods for handling actived elements, this one seems better. Yes, use this one for new elements, PCLN is different for compatibility with existing saves - { - if (ct==PT_PSCN) parts[r>>8].life = 10; - else if (ct==PT_NSCN && parts[r>>8].life>=10) parts[r>>8].life = 9; - } - else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_LCRY&&abs(rx)<2&&abs(ry)<2) && parts[i].life<4) - { - if (ct==PT_PSCN && parts[r>>8].tmp == 0) parts[r>>8].tmp = 2; - else if (ct==PT_NSCN && parts[r>>8].tmp == 3) parts[r>>8].tmp = 1; - } - - - // ct = spark from material, rt = spark to material. Make conduct_sprk = 0 if conduction not allowed - - if (pavg == PT_INSL) conduct_sprk = 0; - if (!((sim->ptypes[rt].properties&PROP_CONDUCTS)||rt==PT_INST||rt==PT_QRTZ)) conduct_sprk = 0; - if (abs(rx)+abs(ry)>=4 &&ct!=PT_SWCH&&rt!=PT_SWCH) - conduct_sprk = 0; - - - if (ct==PT_METL && (rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR||(rt==PT_SPRK&&(parts[r>>8].ctype==PT_NTCT||parts[r>>8].ctype==PT_PTCT))) && pavg!=PT_INSL && parts[i].life<4) - { - parts[r>>8].temp = 473.0f; - if (rt==PT_NTCT||rt==PT_PTCT) - conduct_sprk = 0; - } - if (ct==PT_NTCT && !(rt==PT_PSCN || rt==PT_NTCT || (rt==PT_NSCN&&parts[i].temp>373.0f))) - conduct_sprk = 0; - if (ct==PT_PTCT && !(rt==PT_PSCN || rt==PT_PTCT || (rt==PT_NSCN&&parts[i].temp<373.0f))) - conduct_sprk = 0; - if (ct==PT_INWR && !(rt==PT_NSCN || rt==PT_INWR || rt==PT_PSCN)) - conduct_sprk = 0; - if (ct==PT_NSCN && rt==PT_PSCN) - conduct_sprk = 0; - if (ct==PT_ETRD && !(rt==PT_METL||rt==PT_ETRD||rt==PT_BMTL||rt==PT_BRMT||rt==PT_LRBD||rt==PT_RBDM||rt==PT_PSCN||rt==PT_NSCN)) - conduct_sprk = 0; - if (ct==PT_INST&&rt!=PT_NSCN) conduct_sprk = 0; - if (ct==PT_SWCH && (rt==PT_PSCN||rt==PT_NSCN||rt==PT_WATR||rt==PT_SLTW||rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR)) - conduct_sprk = 0; - if (rt==PT_QRTZ && !((ct==PT_NSCN||ct==PT_METL||ct==PT_PSCN||ct==PT_QRTZ) && (parts[r>>8].temp<173.15||sim->pv[(y+ry)/CELL][(x+rx)/CELL]>8))) - conduct_sprk = 0; - if (rt==PT_NTCT && !(ct==PT_NSCN || ct==PT_NTCT || (ct==PT_PSCN&&parts[r>>8].temp>373.0f))) - conduct_sprk = 0; - if (rt==PT_PTCT && !(ct==PT_NSCN || ct==PT_PTCT || (ct==PT_PSCN&&parts[r>>8].temp<373.0f))) - conduct_sprk = 0; - if (rt==PT_INWR && !(ct==PT_NSCN || ct==PT_INWR || ct==PT_PSCN)) - conduct_sprk = 0; - if (rt==PT_INST&&ct!=PT_PSCN) - conduct_sprk = 0; - if (rt == PT_NBLE && parts[r>>8].tmp == 1) - conduct_sprk = 0; - - if (conduct_sprk) { - if (rt==PT_WATR||rt==PT_SLTW) { - if (parts[r>>8].life==0 && parts[i].life<3) - { - sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - if (rt==PT_WATR) parts[r>>8].life = 6; - else parts[r>>8].life = 5; - parts[r>>8].ctype = rt; - } - } - else if (rt==PT_INST) { - if (parts[r>>8].life==0 && parts[i].life<4) - { - sim->flood_parts(x+rx,y+ry,PT_SPRK,PT_INST,-1, 0);//spark the wire - } - } - else if (parts[r>>8].life==0 && parts[i].life<4) { - parts[r>>8].life = 4; - parts[r>>8].ctype = rt; - sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - if (parts[r>>8].temp+10.0f<673.0f&&!sim->legacy_enable&&(rt==PT_METL||rt==PT_BMTL||rt==PT_BRMT||rt==PT_PSCN||rt==PT_NSCN||rt==PT_ETRD||rt==PT_NBLE||rt==PT_IRON)) - parts[r>>8].temp = parts[r>>8].temp+10.0f; - } - else if (ct==PT_ETRD && parts[i].life==5) - { - sim->part_change_type(i,x,y,ct); - parts[i].ctype = PT_NONE; - parts[i].life = 20; - parts[r>>8].life = 4; - parts[r>>8].ctype = rt; - sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - } - } - } - return 0; -} - -int graphics_SPRK(GRAPHICS_FUNC_ARGS) -{ - *firea = 80; - - *firer = *colr = 170; - *fireg = *colg = 200; - *fireb = *colb = 220; - //*pixel_mode |= FIRE_ADD; - *pixel_mode |= FIRE_ADD; - return 1; -} diff --git a/src/elements/stkm.cpp b/src/elements/stkm.cpp deleted file mode 100644 index e7eecf4..0000000 --- a/src/elements/stkm.cpp +++ /dev/null @@ -1,492 +0,0 @@ -#include "simulation/Element.h" - -int update_SPAWN(UPDATE_FUNC_ARGS) { - if (!sim->player.spwn) - sim->create_part(-1, x, y, PT_STKM); - - return 0; -} - -int update_STKM(UPDATE_FUNC_ARGS) -{ - run_stickman(&sim->player, UPDATE_FUNC_SUBCALL_ARGS); - return 0; -} - -int graphics_STKM(GRAPHICS_FUNC_ARGS) -{ - /**pixel_mode = PSPEC_STICKMAN; - if ((int)sim->player.elemplayer.elem].pcolors); - *colg = PIXG(ptypes[sim->player.elem].pcolors); - *colb = PIXB(ptypes[sim->player.elem].pcolors); - } - else*/ - { - *colr = *colg = *colb = 255; - } - return 1; -} - -int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { - int r, rx, ry; - float pp, d; - float dt = 0.9;///(FPSB*FPSB); //Delta time in square - float gvx, gvy; - float gx, gy, dl, dr; - - if ((parts[i].ctype>0 && parts[i].ctypeptypes[parts[i].ctype].falldown>0) || parts[i].ctype==SPC_AIR || parts[i].ctype == PT_NEUT || parts[i].ctype == PT_PHOT || parts[i].ctype == PT_LIGH) - playerp->elem = parts[i].ctype; - playerp->frames++; - - //Tempirature handling - if (parts[i].temp<243) - parts[i].life -= 1; - if ((parts[i].temp<309.6f) && (parts[i].temp>=243)) - parts[i].temp += 1; - - //Death - if (parts[i].life<1 || (sim->pv[y/CELL][x/CELL]>=4.5f && playerp->elem != SPC_AIR) ) //If his HP is less that 0 or there is very big wind... - { - for (r=-2; r<=1; r++) - { - sim->create_part(-1, x+r, y-2, playerp->elem); - sim->create_part(-1, x+r+1, y+2, playerp->elem); - sim->create_part(-1, x-2, y+r+1, playerp->elem); - sim->create_part(-1, x+2, y+r, playerp->elem); - } - sim->kill_part(i); //Kill him - return 1; - } - - //Follow gravity - gvx = gvy = 0.0f; - switch (sim->gravityMode) - { - default: - case 0: - gvy = 1; - break; - case 1: - gvy = gvx = 0.0f; - break; - case 2: - { - float gravd; - gravd = 0.01f - hypotf((parts[i].x - XCNTR), (parts[i].y - YCNTR)); - gvx = ((float)(parts[i].x - XCNTR) / gravd); - gvy = ((float)(parts[i].y - YCNTR) / gravd); - } - break; - } - - gvx += sim->gravx[((int)parts[i].y/CELL)*(XRES/CELL)+((int)parts[i].x/CELL)]; - gvy += sim->gravy[((int)parts[i].y/CELL)*(XRES/CELL)+((int)parts[i].x/CELL)]; - - parts[i].vx -= gvx*dt; //Head up! - parts[i].vy -= gvy*dt; - - //Verlet integration - pp = 2*playerp->legs[0]-playerp->legs[2]+playerp->accs[0]*dt*dt; - playerp->legs[2] = playerp->legs[0]; - playerp->legs[0] = pp; - pp = 2*playerp->legs[1]-playerp->legs[3]+playerp->accs[1]*dt*dt; - playerp->legs[3] = playerp->legs[1]; - playerp->legs[1] = pp; - - pp = 2*playerp->legs[4]-playerp->legs[6]+(playerp->accs[2]+gvx)*dt*dt; - playerp->legs[6] = playerp->legs[4]; - playerp->legs[4] = pp; - pp = 2*playerp->legs[5]-playerp->legs[7]+(playerp->accs[3]+gvy)*dt*dt; - playerp->legs[7] = playerp->legs[5]; - playerp->legs[5] = pp; - - pp = 2*playerp->legs[8]-playerp->legs[10]+playerp->accs[4]*dt*dt; - playerp->legs[10] = playerp->legs[8]; - playerp->legs[8] = pp; - pp = 2*playerp->legs[9]-playerp->legs[11]+playerp->accs[5]*dt*dt; - playerp->legs[11] = playerp->legs[9]; - playerp->legs[9] = pp; - - pp = 2*playerp->legs[12]-playerp->legs[14]+(playerp->accs[6]+gvx)*dt*dt; - playerp->legs[14] = playerp->legs[12]; - playerp->legs[12] = pp; - pp = 2*playerp->legs[13]-playerp->legs[15]+(playerp->accs[7]+gvy)*dt*dt; - playerp->legs[15] = playerp->legs[13]; - playerp->legs[13] = pp; - - //Setting accseleration to 0 - playerp->accs[0] = 0; - playerp->accs[1] = 0; - - playerp->accs[2] = 0; - playerp->accs[3] = 0; - - playerp->accs[4] = 0; - playerp->accs[5] = 0; - - playerp->accs[6] = 0; - playerp->accs[7] = 0; - - gx = (playerp->legs[4] + playerp->legs[12])/2 - gvy; - gy = (playerp->legs[5] + playerp->legs[13])/2 + gvx; - dl = pow(gx - playerp->legs[4], 2) + pow(gy - playerp->legs[5], 2); - dr = pow(gx - playerp->legs[12], 2) + pow(gy - playerp->legs[13], 2); - - //Go left - if (((int)(playerp->comm)&0x01) == 0x01) - { - if (dl>dr) - { - if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) - { - playerp->accs[2] = -3*gvy-3*gvx; - playerp->accs[3] = 3*gvx-3*gvy; - playerp->accs[0] = -gvy; - playerp->accs[1] = gvx; - } - } - else - { - if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) - { - playerp->accs[6] = -3*gvy-3*gvx; - playerp->accs[7] = 3*gvx-3*gvy; - playerp->accs[0] = -gvy; - playerp->accs[1] = gvx; - } - } - } - - //Go right - if (((int)(playerp->comm)&0x02) == 0x02) - { - if (dleval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) - { - playerp->accs[2] = 3*gvy-3*gvx; - playerp->accs[3] = -3*gvx-3*gvy; - playerp->accs[0] = gvy; - playerp->accs[1] = -gvx; - } - } - else - { - if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) - { - playerp->accs[6] = 3*gvy-3*gvx; - playerp->accs[7] = -3*gvx-3*gvy; - playerp->accs[0] = gvy; - playerp->accs[1] = -gvx; - } - } - } - - //Jump - if (((int)(playerp->comm)&0x04) == 0x04 && - (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL) || !sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL))) - { - parts[i].vy -= 4*gvy; - playerp->accs[3] -= gvy; - playerp->accs[7] -= gvy; - } - - //Charge detector wall if foot inside - if (sim->bmap[(int)(playerp->legs[5]+0.5)/CELL][(int)(playerp->legs[4]+0.5)/CELL]==WL_DETECT) - sim->set_emap((int)playerp->legs[4]/CELL, (int)playerp->legs[5]/CELL); - if (sim->bmap[(int)(playerp->legs[13]+0.5)/CELL][(int)(playerp->legs[12]+0.5)/CELL]==WL_DETECT) - sim->set_emap((int)(playerp->legs[12]+0.5)/CELL, (int)(playerp->legs[13]+0.5)/CELL); - - //Searching for particles near head - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; - - if (!r && !sim->bmap[(y+ry)/CELL][(x+rx)/CELL]) - continue; - - if (sim->ptypes[r&0xFF].falldown!=0 || sim->ptypes[r&0xFF].state == ST_GAS || (r&0xFF) == PT_NEUT || (r&0xFF) == PT_PHOT) - { - playerp->elem = r&0xFF; //Current element - } - if ((r&0xFF)==PT_TESC || (r&0xFF)==PT_LIGH) - playerp->elem = PT_LIGH; - if ((r&0xFF) == PT_PLNT && parts[i].life<100) //Plant gives him 5 HP - { - if (parts[i].life<=95) - parts[i].life += 5; - else - parts[i].life = 100; - sim->kill_part(r>>8); - } - - if ((r&0xFF) == PT_NEUT) - { - if (parts[i].life<=100) parts[i].life -= (102-parts[i].life)/2; - else parts[i].life *= 0.9f; - sim->kill_part(r>>8); - } - if (sim->bmap[(ry+y)/CELL][(rx+x)/CELL]==WL_FAN) - playerp->elem = SPC_AIR; - if ((r&0xFF)==PT_PRTI) - STKM_interact(sim, playerp, i, rx, ry); - if (!parts[i].type)//STKM_interact may kill STKM - return 1; - } - - //Head position - rx = x + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01); - ry = y - 3*(playerp->pcomm == 0); - - //Spawn - if (((int)(playerp->comm)&0x08) == 0x08) - { - ry -= 2*(rand()%2)+1; - r = pmap[ry][rx]; - if (sim->ptypes[r&0xFF].state == ST_SOLID) - { - sim->create_part(-1, rx, ry, PT_SPRK); - playerp->frames = 0; - } - else - { - int np = -1; - if (playerp->elem == SPC_AIR) - sim->create_parts(rx + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01), ry, 4, 4, SPC_AIR, 0); - else if (playerp->elem==PT_LIGH && playerp->frames<30)//limit lightning creation rate - np = -1; - else - np = sim->create_part(-1, rx, ry, playerp->elem); - if ( (np < NPART) && np>=0) - { - if (playerp->elem == PT_PHOT) - { - int random = abs(rand()%3-1)*3; - if (random==0) - { - sim->kill_part(np); - } - else - { - parts[np].vy = 0; - if (((int)playerp->pcomm)&(0x01|0x02)) - parts[np].vx = (((((int)playerp->pcomm)&0x02) == 0x02) - (((int)(playerp->pcomm)&0x01) == 0x01))*random; - else - parts[np].vx = random; - } - } - else if (playerp->elem == PT_LIGH) - { - float angle; - int power = 100; - if (gvx!=0 || gvy!=0) - angle = atan2(gvx, gvy)*180.0f/M_PI; - else - angle = rand()%360; - if (((int)playerp->comm)&0x01) - angle += 180; - if (angle>360) - angle-=360; - if (angle<0) - angle+=360; - parts[np].tmp = angle; - parts[np].life=rand()%(2+power/15)+power/7; - parts[np].temp=parts[np].life*power/2.5; - parts[np].tmp2=1; - } - else if (playerp->elem != SPC_AIR) - { - parts[np].vx -= -gvy*(5*((((int)playerp->pcomm)&0x02) == 0x02) - 5*(((int)(playerp->pcomm)&0x01) == 0x01)); - parts[np].vy -= gvx*(5*((((int)playerp->pcomm)&0x02) == 0x02) - 5*(((int)(playerp->pcomm)&0x01) == 0x01)); - parts[i].vx -= (sim->ptypes[(int)playerp->elem].weight*parts[np].vx)/1000; - } - playerp->frames = 0; - } - - } - } - - //Simulation of joints - d = 25/(pow((playerp->legs[0]-playerp->legs[4]), 2) + pow((playerp->legs[1]-playerp->legs[5]), 2)+25) - 0.5; //Fast distance - playerp->legs[4] -= (playerp->legs[0]-playerp->legs[4])*d; - playerp->legs[5] -= (playerp->legs[1]-playerp->legs[5])*d; - playerp->legs[0] += (playerp->legs[0]-playerp->legs[4])*d; - playerp->legs[1] += (playerp->legs[1]-playerp->legs[5])*d; - - d = 25/(pow((playerp->legs[8]-playerp->legs[12]), 2) + pow((playerp->legs[9]-playerp->legs[13]), 2)+25) - 0.5; - playerp->legs[12] -= (playerp->legs[8]-playerp->legs[12])*d; - playerp->legs[13] -= (playerp->legs[9]-playerp->legs[13])*d; - playerp->legs[8] += (playerp->legs[8]-playerp->legs[12])*d; - playerp->legs[9] += (playerp->legs[9]-playerp->legs[13])*d; - - d = 36/(pow((playerp->legs[0]-parts[i].x), 2) + pow((playerp->legs[1]-parts[i].y), 2)+36) - 0.5; - parts[i].vx -= (playerp->legs[0]-parts[i].x)*d; - parts[i].vy -= (playerp->legs[1]-parts[i].y)*d; - playerp->legs[0] += (playerp->legs[0]-parts[i].x)*d; - playerp->legs[1] += (playerp->legs[1]-parts[i].y)*d; - - d = 36/(pow((playerp->legs[8]-parts[i].x), 2) + pow((playerp->legs[9]-parts[i].y), 2)+36) - 0.5; - parts[i].vx -= (playerp->legs[8]-parts[i].x)*d; - parts[i].vy -= (playerp->legs[9]-parts[i].y)*d; - playerp->legs[8] += (playerp->legs[8]-parts[i].x)*d; - playerp->legs[9] += (playerp->legs[9]-parts[i].y)*d; - - if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) - { - playerp->legs[4] = playerp->legs[6]; - playerp->legs[5] = playerp->legs[7]; - } - - if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) - { - playerp->legs[12] = playerp->legs[14]; - playerp->legs[13] = playerp->legs[15]; - } - - //This makes stick man "pop" from obstacles - if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) - { - float t; - t = playerp->legs[4]; playerp->legs[4] = playerp->legs[6]; playerp->legs[6] = t; - t = playerp->legs[5]; playerp->legs[5] = playerp->legs[7]; playerp->legs[7] = t; - } - - if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) - { - float t; - t = playerp->legs[12]; playerp->legs[12] = playerp->legs[14]; playerp->legs[14] = t; - t = playerp->legs[13]; playerp->legs[13] = playerp->legs[15]; playerp->legs[15] = t; - } - - //Keeping legs distance - if ((pow((playerp->legs[4] - playerp->legs[12]), 2) + pow((playerp->legs[5]-playerp->legs[13]), 2))<16) - { - float tvx, tvy; - tvx = -gvy; - tvy = gvx; - - if (tvx || tvy) - { - playerp->accs[2] -= 0.2*tvx/hypot(tvx, tvy); - playerp->accs[3] -= 0.2*tvy/hypot(tvx, tvy); - - playerp->accs[6] += 0.2*tvx/hypot(tvx, tvy); - playerp->accs[7] += 0.2*tvy/hypot(tvx, tvy); - } - } - - if ((pow((playerp->legs[0] - playerp->legs[8]), 2) + pow((playerp->legs[1]-playerp->legs[9]), 2))<16) - { - float tvx, tvy; - tvx = -gvy; - tvy = gvx; - - if (tvx || tvy) - { - playerp->accs[0] -= 0.2*tvx/hypot(tvx, tvy); - playerp->accs[1] -= 0.2*tvy/hypot(tvx, tvy); - - playerp->accs[4] += 0.2*tvx/hypot(tvx, tvy); - playerp->accs[5] += 0.2*tvy/hypot(tvx, tvy); - } - } - - //If legs touch something - STKM_interact(sim, playerp, i, (int)(playerp->legs[4]+0.5), (int)(playerp->legs[5]+0.5)); - STKM_interact(sim, playerp, i, (int)(playerp->legs[12]+0.5), (int)(playerp->legs[13]+0.5)); - STKM_interact(sim, playerp, i, (int)(playerp->legs[4]+0.5), (int)playerp->legs[5]); - STKM_interact(sim, playerp, i, (int)(playerp->legs[12]+0.5), (int)playerp->legs[13]); - if (!parts[i].type) - return 1; - - parts[i].ctype = playerp->elem; - return 0; -} - -void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y) -{ - int r; - if (x<0 || y<0 || x>=XRES || y>=YRES || !sim->parts[i].type) - return; - r = sim->pmap[y][x]; - if (r) - { - if ((r&0xFF)==PT_SPRK && playerp->elem!=PT_LIGH) //If on charge - { - sim->parts[i].life -= (int)(rand()*20/RAND_MAX)+32; - } - - if (sim->ptypes[r&0xFF].hconduct && ((playerp->elem!=PT_LIGH && sim->parts[r>>8].temp>=323) || sim->parts[r>>8].temp<=243)) - { - sim->parts[i].life -= 2; - playerp->accs[3] -= 1; - } - - if (sim->ptypes[r&0xFF].properties&PROP_DEADLY) - switch (r&0xFF) - { - case PT_ACID: - sim->parts[i].life -= 5; - break; - default: - sim->parts[i].life -= 1; - break; - } - - if (sim->ptypes[r&0xFF].properties&PROP_RADIOACTIVE) - sim->parts[i].life -= 1; - - if ((r&0xFF)==PT_PRTI && sim->parts[i].type) - { - int nnx, count=1;//gives rx=0, ry=1 in update_PRTO - sim->parts[r>>8].tmp = (int)((sim->parts[r>>8].temp-73.15f)/100+1); - if (sim->parts[r>>8].tmp>=CHANNELS) sim->parts[r>>8].tmp = CHANNELS-1; - else if (sim->parts[r>>8].tmp<0) sim->parts[r>>8].tmp = 0; - for (nnx=0; nnx<80; nnx++) - if (!sim->portalp[sim->parts[r>>8].tmp][count][nnx].type) - { - sim->portalp[sim->parts[r>>8].tmp][count][nnx] = sim->parts[i]; - sim->kill_part(i); - //stop new STKM/fighters being created to replace the ones in the portal: - playerp->spwn = 1; - if (sim->portalp[sim->parts[r>>8].tmp][count][nnx].type==PT_FIGH) - sim->fighcount++; - break; - } - } - } -} - -void STKM_init_legs(Simulation * sim, playerst* playerp, int i) -{ - int x, y; - - x = (int)(sim->parts[i].x+0.5f); - y = (int)(sim->parts[i].y+0.5f); - - playerp->legs[0] = x-1; - playerp->legs[1] = y+6; - playerp->legs[2] = x-1; - playerp->legs[3] = y+6; - - playerp->legs[4] = x-3; - playerp->legs[5] = y+12; - playerp->legs[6] = x-3; - playerp->legs[7] = y+12; - - playerp->legs[8] = x+1; - playerp->legs[9] = y+6; - playerp->legs[10] = x+1; - playerp->legs[11] = y+6; - - playerp->legs[12] = x+3; - playerp->legs[13] = y+12; - playerp->legs[14] = x+3; - playerp->legs[15] = y+12; -} diff --git a/src/elements/stkm2.cpp b/src/elements/stkm2.cpp deleted file mode 100644 index d18a7ac..0000000 --- a/src/elements/stkm2.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "simulation/Element.h" - -int update_SPAWN2(UPDATE_FUNC_ARGS) { - if (!sim->player2.spwn) - sim->create_part(-1, x, y, PT_STKM2); - - return 0; -} - -int update_STKM2(UPDATE_FUNC_ARGS) { - run_stickman(&sim->player2, UPDATE_FUNC_SUBCALL_ARGS); - return 0; -} - -int graphics_STKM2(GRAPHICS_FUNC_ARGS) -{ - /**pixel_mode = PSPEC_STICKMAN; - if ((int)sim->player2.elemplayer2.elem].pcolors); - *colg = PIXG(ptypes[sim->player2.elem].pcolors); - *colb = PIXB(ptypes[sim->player2.elem].pcolors); - } - else*/ - { - *colr = *colg = *colb = 255; - } - return 1; -} diff --git a/src/elements/stor.cpp b/src/elements/stor.cpp deleted file mode 100644 index 01c3415..0000000 --- a/src/elements/stor.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "simulation/Element.h" - -int update_STOR(UPDATE_FUNC_ARGS) { - int r, rx, ry, np, rx1, ry1; - if(parts[i].life && !parts[i].tmp) - parts[i].life--; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx>8)>=NPART || !r) - continue; - if (!parts[i].tmp && !parts[i].life && (r&0xFF)!=PT_STOR && !(sim->ptypes[(r&0xFF)].properties&TYPE_SOLID) && (!parts[i].ctype || (r&0xFF)==parts[i].ctype)) - { - parts[i].tmp = parts[r>>8].type; - parts[i].temp = parts[r>>8].temp; - parts[i].tmp2 = parts[r>>8].life; - parts[i].pavg[0] = parts[r>>8].tmp; - parts[i].pavg[1] = parts[r>>8].ctype; - sim->kill_part(r>>8); - } - if(parts[i].tmp && (r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN && parts[r>>8].life>0 && parts[r>>8].life<4) - { - for(ry1 = 1; ry1 >= -1; ry1--){ - for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ // Oscilate the X starting at 0, 1, -1, 3, -5, etc (Though stop at -1) - np = sim->create_part(-1,x+rx1,y+ry1,parts[i].tmp); - if (np!=-1) - { - parts[np].temp = parts[i].temp; - parts[np].life = parts[i].tmp2; - parts[np].tmp = parts[i].pavg[0]; - parts[np].ctype = parts[i].pavg[1]; - parts[i].tmp = 0; - parts[i].life = 10; - break; - } - } - } - } - } - return 0; -} diff --git a/src/elements/swch.cpp b/src/elements/swch.cpp deleted file mode 100644 index 4adc270..0000000 --- a/src/elements/swch.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "simulation/Element.h" - -int update_SWCH(UPDATE_FUNC_ARGS) { - int r, rt, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxparts_avg(i,r>>8,PT_INSL)!=PT_INSL) { - rt = r&0xFF; - if (rt==PT_SWCH) - { - if (parts[i].life>=10&&parts[r>>8].life<10&&parts[r>>8].life>0) - parts[i].life = 9; - else if (parts[i].life==0&&parts[r>>8].life>=10) - { - //Set to other particle's life instead of 10, otherwise spark loops form when SWCH is sparked while turning on - parts[i].life = parts[r>>8].life; - } - } - else if (rt==PT_SPRK&&parts[i].life==10&&parts[r>>8].ctype!=PT_PSCN&&parts[r>>8].ctype!=PT_NSCN) { - sim->part_change_type(i,x,y,PT_SPRK); - parts[i].ctype = PT_SWCH; - parts[i].life = 4; - } - } - } - //turn off SWCH from two red BRAYS - if (parts[i].life==10 && (!(pmap[y-1][x-1]&0xFF) && ((pmap[y-1][x]&0xFF)==PT_BRAY&&parts[pmap[y-1][x]>>8].tmp==2) && !(pmap[y-1][x+1]&0xFF) && ((pmap[y][x+1]&0xFF)==PT_BRAY&&parts[pmap[y][x+1]>>8].tmp==2))) - { - parts[i].life = 9; - } - //turn on SWCH from two red BRAYS - else if (parts[i].life<=5 && (!(pmap[y-1][x-1]&0xFF) && (((pmap[y-1][x]&0xFF)==PT_BRAY&&parts[pmap[y-1][x]>>8].tmp==2) || ((pmap[y+1][x]&0xFF)==PT_BRAY&&parts[pmap[y+1][x]>>8].tmp==2)) && !(pmap[y-1][x+1]&0xFF) && (((pmap[y][x+1]&0xFF)==PT_BRAY&&parts[pmap[y][x+1]>>8].tmp==2) || ((pmap[y][x-1]&0xFF)==PT_BRAY&&parts[pmap[y][x-1]>>8].tmp==2)))) - { - parts[i].life = 14; - } - return 0; -} diff --git a/src/elements/thdr.cpp b/src/elements/thdr.cpp deleted file mode 100644 index 1e3d0ab..0000000 --- a/src/elements/thdr.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "simulation/Element.h" - -int update_THDR(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxptypes[r&0xFF].properties&PROP_CONDUCTS) && parts[r>>8].life==0 && !((r&0xFF)==PT_WATR||(r&0xFF)==PT_SLTW) && parts[r>>8].ctype!=PT_SPRK) - { - parts[i].type = PT_NONE; - parts[r>>8].ctype = parts[r>>8].type; - sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - parts[r>>8].life = 4; - } - else if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT&&(r&0xFF)) - { - sim->pv[y/CELL][x/CELL] += 100.0f; - if (sim->legacy_enable&&1>(rand()%200)) - { - parts[i].life = rand()%50+120; - sim->part_change_type(i,x,y,PT_FIRE); - } - else - { - parts[i].type = PT_NONE; - } - } - } - if (parts[i].type==PT_NONE) { - sim->kill_part(i); - return 1; - } - return 0; -} diff --git a/src/elements/thrm.cpp b/src/elements/thrm.cpp deleted file mode 100644 index 2075e13..0000000 --- a/src/elements/thrm.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "simulation/Element.h" - -int update_THRM(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) { - sim->part_change_type(i,x,y,PT_LAVA); - parts[i].ctype = PT_BMTL; - parts[i].temp = 3500.0f; - sim->pv[y/CELL][x/CELL] += 50.0f; - } else { - sim->part_change_type(i,x,y,PT_LAVA); - parts[i].life = 400; - parts[i].ctype = PT_THRM; - parts[i].temp = 3500.0f; - parts[i].tmp = 20; - } - } - } - return 0; -} diff --git a/src/elements/tron.cpp b/src/elements/tron.cpp deleted file mode 100644 index 3e99eb3..0000000 --- a/src/elements/tron.cpp +++ /dev/null @@ -1,194 +0,0 @@ -#include "simulation/Element.h" - -/* TRON element is meant to resemble a tron bike (or worm) moving around and trying to avoid obstacles itself. - * It has four direction each turn to choose from, 0 (left) 1 (up) 2 (right) 3 (down). - * Each turn has a small random chance to randomly turn one way (so it doesn't do the exact same thing in a large room) - * If the place it wants to move isn't a barrier, it will try and 'see' infront of itself to determine its safety. - * For now the tron can only see its own body length in pixels ahead of itself (and around corners) - * - - - - - - - - - - - * - - - - + - - - - - - * - - - + + + - - - - - * - - +<--+-->+ - - - - * - +<----+---->+ - - - * - - - - H - - - - - - * Where H is the head with tail length 4, it checks the + area to see if it can hit any of the edges, then it is called safe, or picks the biggest area if none safe. - * .tmp bit values: 1st head, 2nd no tail growth, 3rd wait flag, 4th Nodie, 5th Dying, 6th & 7th is direction, 8th - 16th hue - * .tmp2 is tail length (gets longer every few hundred frames) - * .life is the timer that kills the end of the tail (the head uses life for how often it grows longer) - * .ctype Contains the colour, lost on save, regenerated using hue tmp (bits 7 - 16) - */ -#define TRON_HEAD 1 -#define TRON_NOGROW 2 -#define TRON_WAIT 4 //it was just created, so WAIT a frame -#define TRON_NODIE 8 -#define TRON_DEATH 16 //Crashed, now dying -int tron_rx[4] = {-1, 0, 1, 0}; -int tron_ry[4] = { 0,-1, 0, 1}; -int new_tronhead(Simulation * sim, int x, int y, int i, int direction) -{ - int np = sim->create_part(-1, x , y ,PT_TRON); - if (np==-1) - return -1; - if (sim->parts[i].life >= 100) // increase tail length - { - sim->parts[i].tmp2++; - sim->parts[i].life = 5; - } - //give new head our properties - sim->parts[np].tmp = 1 | direction<<5 | sim->parts[i].tmp&(TRON_NOGROW|TRON_NODIE) | (sim->parts[i].tmp&0xF800); - if (np > i) - sim->parts[np].tmp |= TRON_WAIT; - - sim->parts[np].ctype = sim->parts[i].ctype; - sim->parts[np].tmp2 = sim->parts[i].tmp2; - sim->parts[np].life = sim->parts[i].life + 2; - return 1; -} -int trymovetron(Simulation * sim, int x, int y, int dir, int i, int len) -{ - int k,j,r,rx,ry,tx,ty,count; - count = 0; - rx = x; - ry = y; - for (k = 1; k <= len; k ++) - { - rx += tron_rx[dir]; - ry += tron_ry[dir]; - r = sim->pmap[ry][rx]; - if (!r && !sim->bmap[(ry)/CELL][(rx)/CELL] && ry > CELL && rx > CELL && ry < YRES-CELL && rx < XRES-CELL) - { - count++; - for (tx = rx - tron_ry[dir] , ty = ry - tron_rx[dir], j=1; abs(tx-rx) < (len-k) && abs(ty-ry) < (len-k); tx-=tron_ry[dir],ty-=tron_rx[dir],j++) - { - r = sim->pmap[ty][tx]; - if (!r && !sim->bmap[(ty)/CELL][(tx)/CELL] && ty > CELL && tx > CELL && ty < YRES-CELL && tx < XRES-CELL) - { - if (j == (len-k))//there is a safe path, so we can break out - return len+1; - count++; - } - else //we hit a block so no need to check farther here - break; - } - for (tx = rx + tron_ry[dir] , ty = ry + tron_rx[dir], j=1; abs(tx-rx) < (len-k) && abs(ty-ry) < (len-k); tx+=tron_ry[dir],ty+=tron_rx[dir],j++) - { - r = sim->pmap[ty][tx]; - if (!r && !sim->bmap[(ty)/CELL][(tx)/CELL] && ty > CELL && tx > CELL && ty < YRES-CELL && tx < XRES-CELL) - { - if (j == (len-k)) - return len+1; - count++; - } - else - break; - } - } - else //a block infront, no need to continue - break; - } - return count; -} -int update_TRON(UPDATE_FUNC_ARGS) { - int r, rx, ry, np; - if(!parts[i].ctype) - { - int r, g, b; - int hue = (parts[i].tmp&0xF800)>>7; - HSV_to_RGB(hue,255,255,&r,&g,&b); - parts[i].ctype = r<<16 | g<<8 | b; - //Use photon-like wavelength? - } - if (parts[i].tmp&TRON_WAIT) - { - parts[i].tmp &= ~TRON_WAIT; - return 0; - } - if (parts[i].tmp&TRON_HEAD) - { - int firstdircheck = 0,seconddir,seconddircheck = 0,lastdir,lastdircheck = 0; - int direction = (parts[i].tmp>>5 & 0x3); - int originaldir = direction; - - //random turn - int random = rand()%340; - if (random==1 || random==3) - { - //randomly turn left(3) or right(1) - direction = (direction + random)%4; - } - - //check infront - //do sight check - firstdircheck = trymovetron(sim,x,y,direction,i,parts[i].tmp2); - if (firstdircheck < parts[i].tmp2) - { - if (originaldir != direction) //if we just tried a random turn, don't pick random again - { - seconddir = originaldir; - lastdir = (direction + 2)%4; - } - else - { - seconddir = (direction + ((rand()%2)*2)+1)% 4; - lastdir = (seconddir + 2)%4; - } - seconddircheck = trymovetron(sim,x,y,seconddir,i,parts[i].tmp2); - lastdircheck = trymovetron(sim,x,y,lastdir,i,parts[i].tmp2); - } - //find the best move - if (seconddircheck > firstdircheck) - direction = seconddir; - if (lastdircheck > seconddircheck && lastdircheck > firstdircheck) - direction = lastdir; - //now try making new head, even if it fails - if (new_tronhead(sim,x + tron_rx[direction],y + tron_ry[direction],i,direction) == -1) - { - //ohgod crash - parts[i].tmp |= TRON_DEATH; - //trigger tail death for TRON_NODIE, or is that mode even needed? just set a high tail length(but it still won't start dying when it crashes) - } - - //set own life and clear .tmp (it dies if it can't move anyway) - parts[i].life = parts[i].tmp2; - parts[i].tmp &= parts[i].tmp&0xF810; - } - else // fade tail deco, or prevent tail from dieing - { - if (parts[i].tmp&TRON_NODIE) - parts[i].life++; - //parts[i].dcolour = clamp_flt((float)parts[i].life/(float)parts[i].tmp2,0,1.0f) << 24 | parts[i].dcolour&0x00FFFFFF; - } - return 0; -} - -int graphics_TRON(GRAPHICS_FUNC_ARGS) { - if(cpart->tmp & TRON_HEAD) - *pixel_mode |= PMODE_GLOW; - if(cpart->ctype) - { - *colr = (cpart->ctype & 0xFF0000)>>16; - *colg = (cpart->ctype & 0x00FF00)>>8; - *colb = (cpart->ctype & 0x0000FF); - } - else - { - *colr = 255; - *colg = 255; - *colb = 255; - } - if(cpart->tmp & TRON_DEATH) - { - *pixel_mode |= FIRE_ADD | PMODE_FLARE; - *firer = *colr; - *fireg = *colg; - *fireb = *colb; - *firea = 255; - } - if(cpart->life < cpart->tmp2 && !(cpart->tmp & TRON_HEAD)) - { - *pixel_mode |= PMODE_BLEND; - *pixel_mode &= ~PMODE_FLAT; - *cola = (int)((((float)cpart->life)/((float)cpart->tmp2))*255.0f); - } - return 0; -} diff --git a/src/elements/uran.cpp b/src/elements/uran.cpp deleted file mode 100644 index 31e93a7..0000000 --- a/src/elements/uran.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "simulation/Element.h" - -int update_URAN(UPDATE_FUNC_ARGS) { - if (!sim->legacy_enable && sim->pv[y/CELL][x/CELL]>0.0f) - { - float atemp = parts[i].temp + (-MIN_TEMP); - parts[i].temp = restrict_flt((atemp*(1+(sim->pv[y/CELL][x/CELL]/2000)))+MIN_TEMP, MIN_TEMP, MAX_TEMP); - } - return 0; -} diff --git a/src/elements/vine.cpp b/src/elements/vine.cpp deleted file mode 100644 index c8d51ba..0000000 --- a/src/elements/vine.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "simulation/Element.h" - -int update_VINE(UPDATE_FUNC_ARGS) { - int r, np, rx =(rand()%3)-1, ry=(rand()%3)-1; - if (x+rx>=0 && y+ry>0 && x+rxrand()%15) - sim->part_change_type(i,x,y,PT_PLNT); - else if (!r) - { - np = sim->create_part(-1,x+rx,y+ry,PT_VINE); - if (np<0) return 0; - parts[np].temp = parts[i].temp; - sim->part_change_type(i,x,y,PT_PLNT); - } - } - return 0; -} diff --git a/src/elements/warp.cpp b/src/elements/warp.cpp deleted file mode 100644 index 88315a9..0000000 --- a/src/elements/warp.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "simulation/Element.h" - -int update_WARP(UPDATE_FUNC_ARGS) { - int trade, r, rx, ry; - for ( trade = 0; trade<5; trade ++) - { - rx = rand()%3-1; - ry = rand()%3-1; - if (x+rx>=0 && y+ry>0 && x+rx=rand()%200)) - { - parts[i].x = parts[r>>8].x; - parts[i].y = parts[r>>8].y; - parts[r>>8].x = x; - parts[r>>8].y = y; - parts[i].life += 4; - pmap[y][x] = r; - pmap[y+ry][x+rx] = (i<<8)|parts[i].type; - trade = 5; - } - } - } - return 0; -} diff --git a/src/elements/watr.cpp b/src/elements/watr.cpp deleted file mode 100644 index f6a9933..0000000 --- a/src/elements/watr.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "simulation/Element.h" - -int update_WATR(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) - { - sim->part_change_type(i,x,y,PT_SLTW); - sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); - } - if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - parts[i].ctype = PT_WATR; - } - if ((r&0xFF)==PT_FIRE && parts[r>>8].ctype!=PT_WATR){ - sim->kill_part(r>>8); - if(1>(rand()%150)){ - sim->kill_part(i); - return 1; - } - } - /*if ((r&0xFF)==PT_CNCT && 1>(rand()%500)) Concrete+Water to paste, not very popular - { - part_change_type(i,x,y,PT_PSTE); - sim.kill_part(r>>8); - }*/ - } - return 0; -} diff --git a/src/elements/wifi.cpp b/src/elements/wifi.cpp deleted file mode 100644 index 9a25128..0000000 --- a/src/elements/wifi.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "simulation/Element.h" - -int update_WIFI(UPDATE_FUNC_ARGS) { - int r, rx, ry; - parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); - if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; - else if (parts[i].tmp<0) parts[i].tmp = 0; - for (rx=-1; rx<2; rx++) - for (ry=-1; ry<2; ry++) - if (x+rx>=0 && y+ry>0 && x+rxwireless[parts[i].tmp][0]) - { - if (((r&0xFF)==PT_NSCN||(r&0xFF)==PT_PSCN||(r&0xFF)==PT_INWR)&&parts[r>>8].life==0 && sim->wireless[parts[i].tmp][0]) - { - parts[r>>8].ctype = r&0xFF; - sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); - parts[r>>8].life = 4; - } - } - else - { - if ((r&0xFF)==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3) - { - sim->wireless[parts[i].tmp][1] = 1; - sim->ISWIRE = 2; - } - } - } - return 0; -} diff --git a/src/elements/wire.cpp b/src/elements/wire.cpp deleted file mode 100644 index 88d2a5e..0000000 --- a/src/elements/wire.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include "simulation/Element.h" - -int update_WIRE(UPDATE_FUNC_ARGS) { - int s,r,rx,ry,count; - /* - 0: wire - 1: spark head - 2: spark tail - - tmp is previous state, ctype is current state - */ - //parts[i].tmp=parts[i].ctype; - parts[i].ctype=0; - if(parts[i].tmp==1) - { - parts[i].ctype=2; - } - if(parts[i].tmp==2) - { - parts[i].ctype=0; - } - - count=0; - for(rx=-1; rx<2; rx++) - for(ry=-1; ry<2; ry++) - { - if(x+rx>=0 && y+ry>0 && x+rx>8].life==3 && parts[r>>8].ctype==PT_PSCN) - { - parts[i].ctype=1; - return 0; - } - else if((r&0xFF)==PT_NSCN && parts[i].tmp==1){sim->create_part(-1, x+rx, y+ry, PT_SPRK);} - else if((r&0xFF)==PT_WIRE && parts[r>>8].tmp==1 && !parts[i].tmp){count++;} - } - } - if(count==1 || count==2) - parts[i].ctype=1; - return 0; -} - -int graphics_WIRE(GRAPHICS_FUNC_ARGS) -{ - if (cpart->ctype==0) - { - *colr = 255; - *colg = 204; - *colb = 0; - return 0; - } - if (cpart->ctype==1) - { - *colr = 50; - *colg = 100; - *colb = 255; - //*pixel_mode |= PMODE_GLOW; - return 0; - } - if (cpart->ctype==2) - { - *colr = 255; - *colg = 100; - *colb = 50; - //*pixel_mode |= PMODE_GLOW; - return 0; - } - return 0; -} diff --git a/src/elements/wtrv.cpp b/src/elements/wtrv.cpp deleted file mode 100644 index 9c07e9f..0000000 --- a/src/elements/wtrv.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "simulation/Element.h" - -int update_WTRV(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rxlegacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500)) - { - sim->part_change_type(i,x,y,PT_FIRE); - parts[i].life = 4; - parts[i].ctype = PT_WATR; - } - } - if(parts[i].temp>1273&&parts[i].ctype==PT_FIRE) - parts[i].temp-=parts[i].temp/1000; - return 0; -} diff --git a/src/elements/yest.cpp b/src/elements/yest.cpp deleted file mode 100644 index 5b3fc95..0000000 --- a/src/elements/yest.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "simulation/Element.h" - -int update_YEST(UPDATE_FUNC_ARGS) { - int r, rx, ry; - for (rx=-2; rx<3; rx++) - for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx(rand()%30) && !sim->legacy_enable) - { - sim->part_change_type(i,x,y,PT_DYST); - } - } - if (parts[i].temp>303&&parts[i].temp<317) { - sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_YEST); - } - return 0; -} diff --git a/src/game/EllipseBrush.h b/src/game/EllipseBrush.h index 26b3cf8..8a1dc9a 100644 --- a/src/game/EllipseBrush.h +++ b/src/game/EllipseBrush.h @@ -8,6 +8,7 @@ #ifndef ELIPSEBRUSH_H_ #define ELIPSEBRUSH_H_ +#include #include "Brush.h" class EllipseBrush: public Brush @@ -29,7 +30,7 @@ public: { for(int y = 0; y <= radius.Y*2; y++) { - if((pow(x-radius.X,2)*pow(ry,2)+pow(y-radius.Y,2)*pow(rx,2)<=pow(rx,2)*pow(ry,2))) + if((pow(x-radius.X,2.0f)*pow(ry,2.0f)+pow(y-radius.Y,2.0f)*pow(rx,2.0f)<=pow(rx,2.0f)*pow(ry,2.0f))) { bitmap[y*(size.X)+x] = 255; } diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 4f94ab8..529137a 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -580,8 +580,8 @@ void GameController::ReloadSim() std::string GameController::ElementResolve(int type) { - if(gameModel && gameModel->GetSimulation() && gameModel->GetSimulation()->ptypes && type >= 0 && type < PT_NUM) - return std::string(gameModel->GetSimulation()->ptypes[type].name); + if(gameModel && gameModel->GetSimulation() && gameModel->GetSimulation()->elements && type >= 0 && type < PT_NUM) + return std::string(gameModel->GetSimulation()->elements[type].Name); else return ""; } diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 4dd14ef..bb69479 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -71,10 +71,10 @@ GameModel::GameModel(): //Build menus from Simulation elements for(int i = 0; i < PT_NUM; i++) { - if(sim->ptypes[i].menusection < 12 && sim->ptypes[i].enabled && sim->ptypes[i].menu) + if(sim->elements[i].MenuSection < 12 && sim->elements[i].Enabled && sim->elements[i].MenuVisible) { - Tool * tempTool = new ElementTool(i, sim->ptypes[i].name, PIXR(sim->ptypes[i].pcolors), PIXG(sim->ptypes[i].pcolors), PIXB(sim->ptypes[i].pcolors)); - menuList[sim->ptypes[i].menusection]->AddTool(tempTool); + Tool * tempTool = new ElementTool(i, sim->elements[i].Name, PIXR(sim->elements[i].Colour), PIXG(sim->elements[i].Colour), PIXB(sim->elements[i].Colour)); + menuList[sim->elements[i].MenuSection]->AddTool(tempTool); } } @@ -106,8 +106,8 @@ GameModel::GameModel(): brushList.push_back(new EllipseBrush(ui::Point(4, 4))); //Set default tools - activeTools[0] = menuList[SC_POWDERS]->GetToolList()[0]; - activeTools[1] = menuList[SC_SPECIAL]->GetToolList()[0]; + //activeTools[0] = menuList[SC_POWDERS]->GetToolList()[0]; + //activeTools[1] = menuList[SC_SPECIAL]->GetToolList()[0]; //Set default menu activeMenu = menuList[SC_POWDERS]; diff --git a/src/interface/Spinner.cpp b/src/interface/Spinner.cpp index b988674..a98be2b 100644 --- a/src/interface/Spinner.cpp +++ b/src/interface/Spinner.cpp @@ -6,7 +6,7 @@ */ -#include +#include #include #include "Spinner.h" diff --git a/src/search/SearchModel.h b/src/search/SearchModel.h index 980c06d..fef9f6a 100644 --- a/src/search/SearchModel.h +++ b/src/search/SearchModel.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include "Save.h" #include "SearchView.h" diff --git a/src/simulation/Air.cpp b/src/simulation/Air.cpp index ff61bac..e798181 100644 --- a/src/simulation/Air.cpp +++ b/src/simulation/Air.cpp @@ -1,4 +1,4 @@ -#include +#include #include "Config.h" #include "Air.h" //#include diff --git a/src/simulation/Element.h b/src/simulation/Element.h index f00751e..7cd379e 100644 --- a/src/simulation/Element.h +++ b/src/simulation/Element.h @@ -5,10 +5,19 @@ #include #include "Simulation.h" #include "Renderer.h" -#include "ElementFunctions.h" -//#include "powder.h" #include "Gravity.h" #include "Misc.h" #include "ElementGraphics.h" +#define IPL -257.0f +#define IPH 257.0f +#define ITL MIN_TEMP-1 +#define ITH MAX_TEMP+1 + +// no transition (PT_NONE means kill part) +#define NT -1 + +// special transition - lava ctypes etc need extra code, which is only found and run if ST is given +#define ST PT_NUM + #endif diff --git a/src/simulation/ElementFunctions.h b/src/simulation/ElementFunctions.h deleted file mode 100644 index b1d6409..0000000 --- a/src/simulation/ElementFunctions.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * ElementFunctions.h - * - * Created on: Jan 5, 2012 - * Author: Simon - */ - -#ifndef ELEMENTFUNCTIONS_H_ -#define ELEMENTFUNCTIONS_H_ -#include "Elements.h" - -int update_ACID(UPDATE_FUNC_ARGS); -int update_ANAR(UPDATE_FUNC_ARGS); -int update_AMTR(UPDATE_FUNC_ARGS); -int update_ARAY(UPDATE_FUNC_ARGS); -int update_BCLN(UPDATE_FUNC_ARGS); -int update_BCOL(UPDATE_FUNC_ARGS); -int update_BMTL(UPDATE_FUNC_ARGS); -int update_BRMT(UPDATE_FUNC_ARGS); -int update_BOMB(UPDATE_FUNC_ARGS); -int update_BOYL(UPDATE_FUNC_ARGS); -int update_BTRY(UPDATE_FUNC_ARGS); -int update_C5(UPDATE_FUNC_ARGS); -int update_CLNE(UPDATE_FUNC_ARGS); -int update_COAL(UPDATE_FUNC_ARGS); -int update_DEUT(UPDATE_FUNC_ARGS); -int update_DSTW(UPDATE_FUNC_ARGS); -int update_FOG(UPDATE_FUNC_ARGS); -int update_FRZW(UPDATE_FUNC_ARGS); -int update_FRZZ(UPDATE_FUNC_ARGS); -int update_FSEP(UPDATE_FUNC_ARGS); -int update_FUSE(UPDATE_FUNC_ARGS); -int update_FIRW(UPDATE_FUNC_ARGS); -int update_FWRK(UPDATE_FUNC_ARGS); -int update_GLAS(UPDATE_FUNC_ARGS); -int update_GLOW(UPDATE_FUNC_ARGS); -int update_GOO(UPDATE_FUNC_ARGS); -int update_HSWC(UPDATE_FUNC_ARGS); -int update_IRON(UPDATE_FUNC_ARGS); -int update_ICEI(UPDATE_FUNC_ARGS); -int update_ISZ(UPDATE_FUNC_ARGS); -int update_LCRY(UPDATE_FUNC_ARGS); -int update_MORT(UPDATE_FUNC_ARGS); -int update_NEUT(UPDATE_FUNC_ARGS); -int update_NPTCT(UPDATE_FUNC_ARGS); -int update_PCLN(UPDATE_FUNC_ARGS); -int update_PHOT(UPDATE_FUNC_ARGS); -int update_PIPE(UPDATE_FUNC_ARGS); -int update_PLNT(UPDATE_FUNC_ARGS); -int update_PLUT(UPDATE_FUNC_ARGS); -int update_PRTI(UPDATE_FUNC_ARGS); -int update_PRTO(UPDATE_FUNC_ARGS); -int update_PYRO(UPDATE_FUNC_ARGS); -int update_PUMP(UPDATE_FUNC_ARGS); -int update_QRTZ(UPDATE_FUNC_ARGS); -int update_RIME(UPDATE_FUNC_ARGS); -int update_SHLD1(UPDATE_FUNC_ARGS); -int update_SHLD2(UPDATE_FUNC_ARGS); -int update_SHLD3(UPDATE_FUNC_ARGS); -int update_SHLD4(UPDATE_FUNC_ARGS); -int update_SING(UPDATE_FUNC_ARGS); -int update_SLTW(UPDATE_FUNC_ARGS); -int update_SPAWN(UPDATE_FUNC_ARGS); -int update_SPAWN2(UPDATE_FUNC_ARGS); -int update_SPNG(UPDATE_FUNC_ARGS); -int update_SPRK(UPDATE_FUNC_ARGS); -int update_STKM(UPDATE_FUNC_ARGS); -int update_STKM2(UPDATE_FUNC_ARGS); -int update_SWCH(UPDATE_FUNC_ARGS); -int update_THDR(UPDATE_FUNC_ARGS); -int update_THRM(UPDATE_FUNC_ARGS); -int update_URAN(UPDATE_FUNC_ARGS); -int update_VINE(UPDATE_FUNC_ARGS); -int update_WARP(UPDATE_FUNC_ARGS); -int update_WATR(UPDATE_FUNC_ARGS); -int update_WIFI(UPDATE_FUNC_ARGS); -int update_WTRV(UPDATE_FUNC_ARGS); -int update_YEST(UPDATE_FUNC_ARGS); -int update_SOAP(UPDATE_FUNC_ARGS); -int update_O2(UPDATE_FUNC_ARGS); -int update_H2(UPDATE_FUNC_ARGS); -int update_NBHL(UPDATE_FUNC_ARGS); -int update_NWHL(UPDATE_FUNC_ARGS); -int update_MERC(UPDATE_FUNC_ARGS); -int update_PBCN(UPDATE_FUNC_ARGS); -int update_GPMP(UPDATE_FUNC_ARGS); -int update_CLST(UPDATE_FUNC_ARGS); -int update_DLAY(UPDATE_FUNC_ARGS); -int update_WIRE(UPDATE_FUNC_ARGS); -int update_GBMB(UPDATE_FUNC_ARGS); -int update_CO2(UPDATE_FUNC_ARGS); -int update_CBNW(UPDATE_FUNC_ARGS); -int update_STOR(UPDATE_FUNC_ARGS); -int update_BIZR(UPDATE_FUNC_ARGS); -int update_PVOD(UPDATE_FUNC_ARGS); -int update_CONV(UPDATE_FUNC_ARGS); -int update_CAUS(UPDATE_FUNC_ARGS); -int update_DEST(UPDATE_FUNC_ARGS); -int update_EMP(UPDATE_FUNC_ARGS); -int update_LIGH(UPDATE_FUNC_ARGS); -int update_FIGH(UPDATE_FUNC_ARGS); -int update_ELEC(UPDATE_FUNC_ARGS); -int update_ACEL(UPDATE_FUNC_ARGS); -int update_DCEL(UPDATE_FUNC_ARGS); -int update_BANG(UPDATE_FUNC_ARGS); -int update_IGNT(UPDATE_FUNC_ARGS); -int update_MISC(UPDATE_FUNC_ARGS); -int update_FRAY(UPDATE_FUNC_ARGS); -int update_REPL(UPDATE_FUNC_ARGS); -int update_NBLE(UPDATE_FUNC_ARGS); -int update_GEL(UPDATE_FUNC_ARGS); -int update_TRON(UPDATE_FUNC_ARGS); -int update_legacy_PYRO(UPDATE_FUNC_ARGS); -int update_legacy_all(UPDATE_FUNC_ARGS); -int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS); -void STKM_init_legs(Simulation * sim, playerst* playerp, int i); -void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y); - - -int graphics_FIRE(GRAPHICS_FUNC_ARGS); -int graphics_SMKE(GRAPHICS_FUNC_ARGS); -int graphics_PLSM(GRAPHICS_FUNC_ARGS); -int graphics_DEUT(GRAPHICS_FUNC_ARGS); -int graphics_PHOT(GRAPHICS_FUNC_ARGS); -int graphics_NEUT(GRAPHICS_FUNC_ARGS); -int graphics_LAVA(GRAPHICS_FUNC_ARGS); -int graphics_SPRK(GRAPHICS_FUNC_ARGS); -int graphics_QRTZ(GRAPHICS_FUNC_ARGS); -int graphics_CLST(GRAPHICS_FUNC_ARGS); -int graphics_CBNW(GRAPHICS_FUNC_ARGS); -int graphics_SPNG(GRAPHICS_FUNC_ARGS); -int graphics_LIFE(GRAPHICS_FUNC_ARGS); -int graphics_DUST(GRAPHICS_FUNC_ARGS); -int graphics_GRAV(GRAPHICS_FUNC_ARGS); -int graphics_WIFI(GRAPHICS_FUNC_ARGS); -int graphics_PRTI(GRAPHICS_FUNC_ARGS); -int graphics_PRTO(GRAPHICS_FUNC_ARGS); -int graphics_BIZR(GRAPHICS_FUNC_ARGS); -int graphics_PIPE(GRAPHICS_FUNC_ARGS); -int graphics_INVS(GRAPHICS_FUNC_ARGS); -int graphics_ACID(GRAPHICS_FUNC_ARGS); -int graphics_FILT(GRAPHICS_FUNC_ARGS); -int graphics_BRAY(GRAPHICS_FUNC_ARGS); -int graphics_SWCH(GRAPHICS_FUNC_ARGS); -int graphics_THDR(GRAPHICS_FUNC_ARGS); -int graphics_GLOW(GRAPHICS_FUNC_ARGS); -int graphics_LCRY(GRAPHICS_FUNC_ARGS); -int graphics_PCLN(GRAPHICS_FUNC_ARGS); -int graphics_PBCN(GRAPHICS_FUNC_ARGS); -int graphics_DLAY(GRAPHICS_FUNC_ARGS); -int graphics_HSWC(GRAPHICS_FUNC_ARGS); -int graphics_PVOD(GRAPHICS_FUNC_ARGS); -int graphics_STOR(GRAPHICS_FUNC_ARGS); -int graphics_PUMP(GRAPHICS_FUNC_ARGS); -int graphics_GPMP(GRAPHICS_FUNC_ARGS); -int graphics_HFLM(GRAPHICS_FUNC_ARGS); -int graphics_FIRW(GRAPHICS_FUNC_ARGS); -int graphics_BOMB(GRAPHICS_FUNC_ARGS); -int graphics_GBMB(GRAPHICS_FUNC_ARGS); -int graphics_COAL(GRAPHICS_FUNC_ARGS); -int graphics_STKM(GRAPHICS_FUNC_ARGS); -int graphics_STKM2(GRAPHICS_FUNC_ARGS); -int graphics_DEST(GRAPHICS_FUNC_ARGS); -int graphics_EMP(GRAPHICS_FUNC_ARGS); -int graphics_LIGH(GRAPHICS_FUNC_ARGS); -int graphics_FIGH(GRAPHICS_FUNC_ARGS); -int graphics_ELEC(GRAPHICS_FUNC_ARGS); -int graphics_WIRE(GRAPHICS_FUNC_ARGS); -int graphics_ACEL(GRAPHICS_FUNC_ARGS); -int graphics_DCEL(GRAPHICS_FUNC_ARGS); -int graphics_GEL(GRAPHICS_FUNC_ARGS); -int graphics_TRON(GRAPHICS_FUNC_ARGS); -int graphics_DEFAULT(GRAPHICS_FUNC_ARGS); - -#endif /* ELEMENTFUNCTIONS_H_ */ diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h index 5106c5f..2753b52 100644 --- a/src/simulation/Elements.h +++ b/src/simulation/Elements.h @@ -5,21 +5,12 @@ * Author: Simon */ -//#ifndef ELEMENTS_H_ -//#define ELEMENTS_H_ +#ifndef ELEMENTS_H_ +#define ELEMENTS_H_ //#include "Config.h" //#include "Simulation.h" -#define IPL -257.0f -#define IPH 257.0f -#define ITL MIN_TEMP-1 -#define ITH MAX_TEMP+1 -// no transition (PT_NONE means kill part) -#define NT -1 -// special transition - lava ctypes etc need extra code, which is only found and run if ST is given -#define ST PT_NUM - #define R_TEMP 22 #define MAX_TEMP 9999 #define MIN_TEMP 0 @@ -55,7 +46,6 @@ #define ST_GAS 3 #define UPDATE_FUNC_ARGS Simulation* sim, int i, int x, int y, int surround_space, int nt, Particle *parts, int pmap[YRES][XRES] -// to call another update function with same arguments: #define UPDATE_FUNC_SUBCALL_ARGS sim, i, x, y, surround_space, nt, parts, pmap #define GRAPHICS_FUNC_ARGS Renderer * ren, Particle *cpart, int nx, int ny, int *pixel_mode, int* cola, int *colr, int *colg, int *colb, int *firea, int *firer, int *fireg, int *fireb @@ -119,168 +109,14 @@ #define NGT_FROG 22 #define NGT_BRAN 23 -#define PT_NONE 0 -#define PT_DUST 1 -#define PT_WATR 2 -#define PT_OIL 3 -#define PT_FIRE 4 -#define PT_STNE 5 -#define PT_LAVA 6 -#define PT_GUNP 7 -#define PT_NITR 8 -#define PT_CLNE 9 -#define PT_GAS 10 -#define PT_PLEX 11 -#define PT_GOO 12 -#define PT_ICEI 13 -#define PT_METL 14 -#define PT_SPRK 15 -#define PT_SNOW 16 -#define PT_WOOD 17 -#define PT_NEUT 18 -#define PT_PLUT 19 -#define PT_PLNT 20 -#define PT_ACID 21 -#define PT_VOID 22 -#define PT_WTRV 23 -#define PT_CNCT 24 -#define PT_DSTW 25 -#define PT_SALT 26 -#define PT_SLTW 27 -#define PT_DMND 28 -#define PT_BMTL 29 -#define PT_BRMT 30 -#define PT_PHOT 31 -#define PT_URAN 32 -#define PT_WAX 33 -#define PT_MWAX 34 -#define PT_PSCN 35 -#define PT_NSCN 36 -#define PT_LNTG 37 -#define PT_INSL 38 -#define PT_BHOL 39 -#define PT_WHOL 40 -#define PT_RBDM 41 -#define PT_LRBD 42 -#define PT_NTCT 43 -#define PT_SAND 44 -#define PT_GLAS 45 -#define PT_PTCT 46 -#define PT_BGLA 47 -#define PT_THDR 48 -#define PT_PLSM 49 -#define PT_ETRD 50 -#define PT_NICE 51 -#define PT_NBLE 52 -#define PT_BTRY 53 -#define PT_LCRY 54 -#define PT_STKM 55 -#define PT_SWCH 56 -#define PT_SMKE 57 -#define PT_DESL 58 -#define PT_COAL 59 -#define PT_LO2 60 -#define PT_O2 61 -#define PT_INWR 62 -#define PT_YEST 63 -#define PT_DYST 64 -#define PT_THRM 65 -#define PT_GLOW 66 -#define PT_BRCK 67 -#define PT_HFLM 68 -#define PT_FIRW 69 -#define PT_FUSE 70 -#define PT_FSEP 71 -#define PT_AMTR 72 -#define PT_BCOL 73 -#define PT_PCLN 74 -#define PT_HSWC 75 -#define PT_IRON 76 -#define PT_MORT 77 -#define PT_LIFE 78 -#define PT_DLAY 79 -#define PT_CO2 80 -#define PT_DRIC 81 -#define PT_CBNW 82 -#define PT_STOR 83 -#define PT_PVOD 84 -#define PT_CONV 85 -#define PT_CAUS 86 +#define OLD_PT_WIND 147 -#define PT_LIGH 87 -#define PT_TESC 88 -#define PT_DEST 89 +//#define PT_NUM 161 +#define PT_NUM 256 -#define PT_SPNG 90 -#define PT_RIME 91 -#define PT_FOG 92 -#define PT_BCLN 93 -#define PT_LOVE 94 -#define PT_DEUT 95 -#define PT_WARP 96 -#define PT_PUMP 97 -#define PT_FWRK 98 -#define PT_PIPE 99 -#define PT_FRZZ 100 -#define PT_FRZW 101 -#define PT_GRAV 102 -#define PT_BIZR 103 -#define PT_BIZRG 104 -#define PT_BIZRS 105 -#define PT_INST 106 -#define PT_ISOZ 107 -#define PT_ISZS 108 -#define PT_PRTI 109 -#define PT_PRTO 110 -#define PT_PSTE 111 -#define PT_PSTS 112 -#define PT_ANAR 113 -#define PT_VINE 114 -#define PT_INVIS 115 -#define PT_EQUALVEL 116 //all particles equal their velocities -#define PT_SPAWN2 117 -#define PT_SPAWN 118 -#define PT_SHLD1 119 -#define PT_SHLD2 120 -#define PT_SHLD3 121 -#define PT_SHLD4 122 -#define PT_LOLZ 123 -#define PT_WIFI 124 -#define PT_FILT 125 -#define PT_ARAY 126 -#define PT_BRAY 127 -#define PT_STKM2 128 -#define PT_BOMB 129 -#define PT_C5 130 -#define PT_SING 131 -#define PT_QRTZ 132 -#define PT_PQRT 133 -#define PT_EMP 134 -#define PT_BREC 135 -#define PT_ELEC 136 -#define PT_ACEL 137 -#define PT_DCEL 138 -#define PT_BANG 139 -#define PT_IGNT 140 -#define PT_BOYL 141 -#define PT_GEL 142 -#define PT_TRON 143 +struct playerst; -#define OLD_PT_WIND 147 -#define PT_H2 148 -#define PT_SOAP 149 -#define PT_NBHL 150 -#define PT_NWHL 151 -#define PT_MERC 152 -#define PT_PBCN 153 -#define PT_GPMP 154 -#define PT_CLST 155 -#define PT_WIRE 156 -#define PT_GBMB 157 -#define PT_FIGH 158 -#define PT_FRAY 159 -#define PT_REPL 160 -#define PT_NUM 161 +#include "ElementClasses.h" -//#endif /* ELEMENTS_H_ */ +#endif /* ELEMENTS_H_ */ diff --git a/src/simulation/Gravity.cpp b/src/simulation/Gravity.cpp index 1a74566..b0372a3 100644 --- a/src/simulation/Gravity.cpp +++ b/src/simulation/Gravity.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include "Config.h" @@ -237,9 +237,9 @@ void Gravity::grav_fft_init() for (x=0; x -#include +#include #include "SaveLoader.h" //!TODO: enum for LoadSave return @@ -497,7 +497,7 @@ int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim, } else { - parts[i-1].temp = sim->ptypes[parts[i-1].type].heat; + parts[i-1].temp = sim->elements[parts[i-1].type].Temperature; } } } @@ -607,7 +607,7 @@ int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim, parts[i-1].tmp2 = parts[i-1].life; } } - if (!sim->ptypes[parts[i-1].type].enabled) + if (!sim->elements[parts[i-1].type].Enabled) parts[i-1].type = PT_NONE; } } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 0a69c7b..89295f4 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3,10 +3,11 @@ #include "Config.h" #include "Simulation.h" #include "Elements.h" -#include "ElementFunctions.h" +//#include "ElementFunctions.h" #include "Air.h" #include "Gravity.h" #include "SaveLoader.h" +#include "elements/Element.h" #undef LUACONSOLE //#include "cat/LuaScriptHelper.h" @@ -263,7 +264,7 @@ int Simulation::flood_water(int x, int y, int i, int originaly, int check) while (x1>=CELL) { - if ((ptypes[(pmap[y][x1-1]&0xFF)].falldown)!=2) + if ((elements[(pmap[y][x1-1]&0xFF)].Falldown)!=2) { break; } @@ -271,7 +272,7 @@ int Simulation::flood_water(int x, int y, int i, int originaly, int check) } while (x2=CELL+1) for (x=x1; x<=x2; x++) - if ((ptypes[(pmap[y-1][x]&0xFF)].falldown)==2 && parts[pmap[y-1][x]>>8].tmp2 == check) + if ((elements[(pmap[y-1][x]&0xFF)].Falldown)==2 && parts[pmap[y-1][x]>>8].tmp2 == check) if (!flood_water(x, y-1, i, originaly, check)) return 0; if (y>8].tmp2 == check) + if ((elements[(pmap[y+1][x]&0xFF)].Falldown)==2 && parts[pmap[y+1][x]>>8].tmp2 == check) if (!flood_water(x, y+1, i, originaly, check)) return 0; return 1; @@ -1175,16 +1176,16 @@ void Simulation::init_can_move() for (rt=1;rt>8].temp = parts[i].temp; - if ((r & 0xFF) < PT_NUM && ptypes[r&0xFF].hconduct && ((r&0xFF)!=PT_HSWC||parts[r>>8].life==10) && (r&0xFF)!=PT_FILT) + if ((r & 0xFF) < PT_NUM && elements[r&0xFF].HeatConduct && ((r&0xFF)!=PT_HSWC||parts[r>>8].life==10) && (r&0xFF)!=PT_FILT) parts[i].temp = parts[r>>8].temp = restrict_flt((parts[r>>8].temp+parts[i].temp)/2, MIN_TEMP, MAX_TEMP); } if ((parts[i].type==PT_NEUT || parts[i].type==PT_ELEC) && ((r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN || (r&0xFF)==PT_BCLN || (r&0xFF)==PT_PBCN)) { @@ -1403,7 +1404,7 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) } //else e=1 , we are trying to swap the particles, return 0 no swap/move, 1 is still overlap/move, because the swap takes place later - if (parts[i].type == PT_NEUT && (ptypes[r & 0xFF].properties & PROP_NEUTABSORB)) + if (parts[i].type == PT_NEUT && (elements[r & 0xFF].Properties & PROP_NEUTABSORB)) { kill_part(i); return 0; @@ -1447,7 +1448,7 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) if (parts[i].type==PT_NEUT) { // target material is NEUTPENETRATE, meaning it gets moved around when neutron passes unsigned s = pmap[y][x]; - if (!(ptypes[s&0xFF].properties&PROP_NEUTPENETRATE)) + if (!(elements[s&0xFF].Properties&PROP_NEUTPENETRATE)) return 1; // if the element currently underneath neutron isn't NEUTPENETRATE, don't move anything except the neutron // if nothing is currently underneath neutron, only move target particle if (s) @@ -1746,7 +1747,7 @@ void Simulation::part_change_type(int i, int x, int y, int t)//changes the type { if (x<0 || y<0 || x>=XRES || y>=YRES || i>=NPART || t<0 || t>=PT_NUM) return; - if (!ptypes[t].enabled) + if (!elements[t].Enabled) t = PT_NONE; if (parts[i].type == PT_STKM) @@ -1785,7 +1786,7 @@ int Simulation::create_part(int p, int x, int y, int tv)//the function for creat if (x<0 || y<0 || x>=XRES || y>=YRES || ((t<0 || t>=PT_NUM)&&t!=SPC_HEAT&&t!=SPC_COOL&&t!=SPC_AIR&&t!=SPC_VACUUM&&t!=SPC_PGRV&&t!=SPC_NGRV)) return -1; - if (t>=0 && t=0 && t>8].ctype=PT_DUST; } - if (!((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS))) + if (!((pmap[y][x]&0xFF)==PT_INST||(elements[pmap[y][x]&0xFF].Properties&PROP_CONDUCTS))) return -1; if (parts[pmap[y][x]>>8].life!=0) return -1; @@ -1905,7 +1906,7 @@ int Simulation::create_part(int p, int x, int y, int tv)//the function for creat if (pmap[y][x]) { if (( - ((pmap[y][x]&0xFF)==PT_STOR&&!(ptypes[t].properties&TYPE_SOLID))|| + ((pmap[y][x]&0xFF)==PT_STOR&&!(elements[t].Properties&TYPE_SOLID))|| (pmap[y][x]&0xFF)==PT_CLNE|| (pmap[y][x]&0xFF)==PT_BCLN|| (pmap[y][x]&0xFF)==PT_CONV|| @@ -1973,7 +1974,7 @@ int Simulation::create_part(int p, int x, int y, int tv)//the function for creat parts[i].vy = 0; parts[i].life = 0; parts[i].ctype = 0; - parts[i].temp = ptypes[t].heat; + parts[i].temp = elements[t].Temperature; parts[i].tmp = 0; parts[i].tmp2 = 0; } @@ -2016,7 +2017,7 @@ int Simulation::create_part(int p, int x, int y, int tv)//the function for creat parts[i].life = 50; parts[i].tmp = 50; } - /*if (ptypes[t].properties&PROP_LIFE) { + /*if (elements[t].Properties&PROP_LIFE) { int r; for (r = 0; r255 ? 255 : (colr<0 ? 0 : colr); colg = colg>255 ? 255 : (colg<0 ? 0 : colg); colb = colb>255 ? 255 : (colb<0 ? 0 : colb); @@ -2463,7 +2464,7 @@ void Simulation::update_particles_i(int start, int inc) continue; } - elem_properties = ptypes[t].properties; + elem_properties = elements[t].Properties; if (parts[i].life>0 && (elem_properties&PROP_LIFE_DEC)) { // automatically decrease life @@ -2499,10 +2500,10 @@ void Simulation::update_particles_i(int start, int inc) bmap[y/CELL][x/CELL]==WL_WALLELEC || bmap[y/CELL][x/CELL]==WL_ALLOWAIR || (bmap[y/CELL][x/CELL]==WL_DESTROYALL) || - (bmap[y/CELL][x/CELL]==WL_ALLOWLIQUID && ptypes[t].falldown!=2) || - (bmap[y/CELL][x/CELL]==WL_ALLOWSOLID && ptypes[t].falldown!=1) || - (bmap[y/CELL][x/CELL]==WL_ALLOWGAS && !(ptypes[t].properties&TYPE_GAS)) || //&& ptypes[t].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE && parts[i].type!=PT_HFLM) || - (bmap[y/CELL][x/CELL]==WL_ALLOWENERGY && !(ptypes[t].properties&TYPE_ENERGY)) || + (bmap[y/CELL][x/CELL]==WL_ALLOWLIQUID && elements[t].Falldown!=2) || + (bmap[y/CELL][x/CELL]==WL_ALLOWSOLID && elements[t].Falldown!=1) || + (bmap[y/CELL][x/CELL]==WL_ALLOWGAS && !(elements[t].Properties&TYPE_GAS)) || //&& elements[t].Falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE && parts[i].type!=PT_HFLM) || + (bmap[y/CELL][x/CELL]==WL_ALLOWENERGY && !(elements[t].Properties&TYPE_ENERGY)) || (bmap[y/CELL][x/CELL]==WL_DETECT && (t==PT_METL || t==PT_SPRK)) || (bmap[y/CELL][x/CELL]==WL_EWALL && !emap[y/CELL][x/CELL])) && (t!=PT_STKM) && (t!=PT_STKM2) && (t!=PT_FIGH))) { @@ -2513,33 +2514,33 @@ void Simulation::update_particles_i(int start, int inc) set_emap(x/CELL, y/CELL); //adding to velocity from the particle's velocity - vx[y/CELL][x/CELL] = vx[y/CELL][x/CELL]*ptypes[t].airloss + ptypes[t].airdrag*parts[i].vx; - vy[y/CELL][x/CELL] = vy[y/CELL][x/CELL]*ptypes[t].airloss + ptypes[t].airdrag*parts[i].vy; + vx[y/CELL][x/CELL] = vx[y/CELL][x/CELL]*elements[t].AirLoss + elements[t].AirDrag*parts[i].vx; + vy[y/CELL][x/CELL] = vy[y/CELL][x/CELL]*elements[t].AirLoss + elements[t].AirDrag*parts[i].vy; if (t==PT_GAS||t==PT_NBLE) { if (pv[y/CELL][x/CELL]<3.5f) - pv[y/CELL][x/CELL] += ptypes[t].hotair*(3.5f-pv[y/CELL][x/CELL]); + pv[y/CELL][x/CELL] += elements[t].HotAir*(3.5f-pv[y/CELL][x/CELL]); if (y+CELL= 0 && y-2 < YRES && (ptypes[t].properties&TYPE_LIQUID) && (t!=PT_GEL || gel_scale>(1+rand()%255))) {//some heat convection for liquids + if (y-2 >= 0 && y-2 < YRES && (elements[t].Properties&TYPE_LIQUID) && (t!=PT_GEL || gel_scale>(1+rand()%255))) {//some heat convection for liquids r = pmap[y-2][x]; if (!(!r || parts[i].type != (r&0xFF))) { if (parts[i].temp>parts[r>>8].temp) { @@ -2628,19 +2629,19 @@ void Simulation::update_particles_i(int start, int inc) //heat transfer code h_count = 0; #ifdef REALISTIC - if (t&&(t!=PT_HSWC||parts[i].life==10)&&(ptypes[t].hconduct*gel_scale)) + if (t&&(t!=PT_HSWC||parts[i].life==10)&&(elements[t].HeatConduct*gel_scale)) { float c_Cm = 0.0f; #else - if (t&&(t!=PT_HSWC||parts[i].life==10)&&(ptypes[t].hconduct*gel_scale)>(rand()%250)) + if (t&&(t!=PT_HSWC||parts[i].life==10)&&(elements[t].HeatConduct*gel_scale)>(rand()%250)) { float c_Cm = 0.0f; #endif if (aheat_enable) { #ifdef REALISTIC - c_heat = parts[i].temp*96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight) + hv[y/CELL][x/CELL]*100*(pv[y/CELL][x/CELL]+273.15f)/256; - c_Cm = 96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight) + 100*(pv[y/CELL][x/CELL]+273.15f)/256; + c_heat = parts[i].temp*96.645/elements[t].HeatConduct*gel_scale*fabs(elements[t].Weight) + hv[y/CELL][x/CELL]*100*(pv[y/CELL][x/CELL]+273.15f)/256; + c_Cm = 96.645/elements[t].HeatConduct*gel_scale*fabs(elements[t].Weight) + 100*(pv[y/CELL][x/CELL]+273.15f)/256; pt = c_heat/c_Cm; pt = restrict_flt(pt, -MAX_TEMP+MIN_TEMP, MAX_TEMP-MIN_TEMP); parts[i].temp = pt; @@ -2663,7 +2664,7 @@ void Simulation::update_particles_i(int start, int inc) if (!r) continue; rt = r&0xFF; - if (rt&&ptypes[rt].hconduct&&(rt!=PT_HSWC||parts[r>>8].life==10) + if (rt&&elements[rt].HeatConduct&&(rt!=PT_HSWC||parts[r>>8].life==10) &&(t!=PT_FILT||(rt!=PT_BRAY&&rt!=PT_BIZR&&rt!=PT_BIZRG)) &&(rt!=PT_FILT||(t!=PT_BRAY&&t!=PT_PHOT&&t!=PT_BIZR&&t!=PT_BIZRG))) { @@ -2673,8 +2674,8 @@ void Simulation::update_particles_i(int start, int inc) gel_scale = parts[r>>8].tmp*2.55f; else gel_scale = 1.0f; - c_heat += parts[r>>8].temp*96.645/ptypes[rt].hconduct*gel_scale*fabs(ptypes[rt].weight); - c_Cm += 96.645/ptypes[rt].hconduct*gel_scale*fabs(ptypes[rt].weight); + c_heat += parts[r>>8].temp*96.645/elements[rt].HeatConduct*gel_scale*fabs(elements[rt].Weight); + c_Cm += 96.645/elements[rt].HeatConduct*gel_scale*fabs(elements[rt].Weight); #else c_heat += parts[r>>8].temp; #endif @@ -2689,10 +2690,10 @@ void Simulation::update_particles_i(int start, int inc) if (t == PT_PHOT) pt = (c_heat+parts[i].temp*96.645)/(c_Cm+96.645); else - pt = (c_heat+parts[i].temp*96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight))/(c_Cm+96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight)); + pt = (c_heat+parts[i].temp*96.645/elements[t].HeatConduct*gel_scale*fabs(elements[t].Weight))/(c_Cm+96.645/elements[t].HeatConduct*gel_scale*fabs(elements[t].Weight)); - c_heat += parts[i].temp*96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight); - c_Cm += 96.645/ptypes[t].hconduct*gel_scale*fabs(ptypes[t].weight); + c_heat += parts[i].temp*96.645/elements[t].HeatConduct*gel_scale*fabs(elements[t].Weight); + c_Cm += 96.645/elements[t].HeatConduct*gel_scale*fabs(elements[t].Weight); parts[i].temp = restrict_flt(pt, MIN_TEMP, MAX_TEMP); #else pt = (c_heat+parts[i].temp)/(h_count+1); @@ -2705,10 +2706,10 @@ void Simulation::update_particles_i(int start, int inc) ctemph = ctempl = pt; // change boiling point with pressure - if ((ptypes[t].state==ST_LIQUID && ptransitions[t].tht>-1 && ptransitions[t].tht-1 && elements[t].HighTemperatureTransition-1 && ptransitions[t].tlt-1 && elements[t].LowTemperatureTransition=PT_NUM || parts[i].ctype==PT_ICEI)) parts[i].ctype = PT_WATR; - if (ctemph>ptransitions[t].thv&&ptransitions[t].tht>-1) { + if (ctemph>elements[t].HighTemperature&&elements[t].HighTemperatureTransition>-1) { // particle type change due to high temperature #ifdef REALISTIC float dbt = ctempl - pt; - if (ptransitions[t].tht!=PT_NUM) + if (elements[t].HighTemperatureTransition!=PT_NUM) { - if (platent[t] <= (c_heat - (ptransitions[t].thv - dbt)*c_Cm)) + if (platent[t] <= (c_heat - (elements[t].HighTemperature - dbt)*c_Cm)) { pt = (c_heat - platent[t])/c_Cm; - t = ptransitions[t].tht; + t = elements[t].HighTemperatureTransition; } else { - parts[i].temp = restrict_flt(ptransitions[t].thv - dbt, MIN_TEMP, MAX_TEMP); + parts[i].temp = restrict_flt(elements[t].HighTemperature - dbt, MIN_TEMP, MAX_TEMP); s = 0; } } #else - if (ptransitions[t].tht!=PT_NUM) - t = ptransitions[t].tht; + if (elements[t].HighTemperatureTransition!=PT_NUM) + t = elements[t].HighTemperatureTransition; #endif else if (t==PT_ICEI) { if (parts[i].ctype-1) { + } else if (ctempl-1) { // particle type change due to low temperature #ifdef REALISTIC float dbt = ctempl - pt; - if (ptransitions[t].tlt!=PT_NUM) + if (elements[t].LowTemperatureTransition!=PT_NUM) { - if (platent[ptransitions[t].tlt] >= (c_heat - (ptransitions[t].tlv - dbt)*c_Cm)) + if (platent[elements[t].LowTemperatureTransition] >= (c_heat - (elements[t].LowTemperature - dbt)*c_Cm)) { - pt = (c_heat + platent[ptransitions[t].tlt])/c_Cm; - t = ptransitions[t].tlt; + pt = (c_heat + platent[elements[t].LowTemperatureTransition])/c_Cm; + t = elements[t].LowTemperatureTransition; } else { - parts[i].temp = restrict_flt(ptransitions[t].tlv - dbt, MIN_TEMP, MAX_TEMP); + parts[i].temp = restrict_flt(elements[t].LowTemperature - dbt, MIN_TEMP, MAX_TEMP); s = 0; } } #else - if (ptransitions[t].tlt!=PT_NUM) - t = ptransitions[t].tlt; + if (elements[t].LowTemperatureTransition!=PT_NUM) + t = elements[t].LowTemperatureTransition; #endif else if (t==PT_WTRV) { if (pt<273.0f) t = PT_RIME; @@ -2812,9 +2813,9 @@ void Simulation::update_particles_i(int start, int inc) } else if (t==PT_LAVA) { if (parts[i].ctype>0 && parts[i].ctype=ptransitions[PT_BMTL].thv) s = 0; - else if (ptransitions[parts[i].ctype].tht==PT_LAVA) { - if (pt>=ptransitions[parts[i].ctype].thv) s = 0; + if (parts[i].ctype==PT_THRM&&pt>=elements[PT_BMTL].HighTemperature) s = 0; + else if (elements[parts[i].ctype].HighTemperatureTransition==PT_LAVA) { + if (pt>=elements[parts[i].ctype].HighTemperature) s = 0; } else if (pt>=973.0f) s = 0; // freezing point for lava with any other (not listed in ptransitions as turning into lava) ctype if (s) { @@ -2848,7 +2849,7 @@ void Simulation::update_particles_i(int start, int inc) if (t==PT_ICEI||t==PT_LAVA) parts[i].ctype = parts[i].type; if (!(t==PT_ICEI&&parts[i].ctype==PT_FRZW)) parts[i].life = 0; - if (ptypes[t].state==ST_GAS&&ptypes[parts[i].type].state!=ST_GAS) + if (elements[t].State==ST_GAS&&elements[parts[i].type].State!=ST_GAS) pv[y/CELL][x/CELL] += 0.50f; part_change_type(i,x,y,t); if (t==PT_FIRE||t==PT_PLSM||t==PT_HFLM) @@ -2894,7 +2895,7 @@ void Simulation::update_particles_i(int start, int inc) //wire_placed = 1; } //spark updates from walls - if ((ptypes[t].properties&PROP_CONDUCTS) || t==PT_SPRK) + if ((elements[t].Properties&PROP_CONDUCTS) || t==PT_SPRK) { nx = x % CELL; if (nx == 0) @@ -2928,10 +2929,10 @@ void Simulation::update_particles_i(int start, int inc) } //the basic explosion, from the .explosive variable - if ((ptypes[t].explosive&2) && pv[y/CELL][x/CELL]>2.5f) + if ((elements[t].Explosive&2) && pv[y/CELL][x/CELL]>2.5f) { parts[i].life = rand()%80+180; - parts[i].temp = restrict_flt(ptypes[PT_FIRE].heat + (ptypes[t].flammable/2), MIN_TEMP, MAX_TEMP); + parts[i].temp = restrict_flt(elements[PT_FIRE].Temperature + (elements[t].Flammable/2), MIN_TEMP, MAX_TEMP); t = PT_FIRE; part_change_type(i,x,y,t); pv[y/CELL][x/CELL] += 0.25f * CFDS; @@ -2940,10 +2941,10 @@ void Simulation::update_particles_i(int start, int inc) s = 1; gravtot = fabs(gravy[(y/CELL)*(XRES/CELL)+(x/CELL)])+fabs(gravx[(y/CELL)*(XRES/CELL)+(x/CELL)]); - if (pv[y/CELL][x/CELL]>ptransitions[t].phv&&ptransitions[t].pht>-1) { + if (pv[y/CELL][x/CELL]>elements[t].HighPressure&&elements[t].HighPressureTransition>-1) { // particle type change due to high pressure - if (ptransitions[t].pht!=PT_NUM) - t = ptransitions[t].pht; + if (elements[t].HighPressureTransition!=PT_NUM) + t = elements[t].HighPressureTransition; else if (t==PT_BMTL) { if (pv[y/CELL][x/CELL]>2.5f) t = PT_BRMT; @@ -2952,15 +2953,15 @@ void Simulation::update_particles_i(int start, int inc) else s = 0; } else s = 0; - } else if (pv[y/CELL][x/CELL]-1) { + } else if (pv[y/CELL][x/CELL]-1) { // particle type change due to low pressure - if (ptransitions[t].plt!=PT_NUM) - t = ptransitions[t].plt; + if (elements[t].LowPressureTransition!=PT_NUM) + t = elements[t].LowPressureTransition; else s = 0; - } else if (gravtot>(ptransitions[t].phv/4.0f)&&ptransitions[t].pht>-1) { + } else if (gravtot>(elements[t].HighPressure/4.0f)&&elements[t].HighPressureTransition>-1) { // particle type change due to high gravity - if (ptransitions[t].pht!=PT_NUM) - t = ptransitions[t].pht; + if (elements[t].HighPressureTransition!=PT_NUM) + t = elements[t].HighPressureTransition; else if (t==PT_BMTL) { if (gravtot>0.625f) t = PT_BRMT; @@ -2983,12 +2984,12 @@ void Simulation::update_particles_i(int start, int inc) //call the particle update function, if there is one #ifdef LUACONSOLE - if (ptypes[t].update_func && lua_el_mode[t] != 2) + if (elements[t].Update && lua_el_mode[t] != 2) #else - if (ptypes[t].update_func) + if (elements[t].Update) #endif { - if ((*(ptypes[t].update_func))(this, i,x,y,surround_space,nt, parts, pmap)) + if ((*(elements[t].Update))(this, i,x,y,surround_space,nt, parts, pmap)) continue; else if (t==PT_WARP) { @@ -3007,8 +3008,8 @@ void Simulation::update_particles_i(int start, int inc) y = (int)(parts[i].y+0.5f); } #endif - if (legacy_enable)//if heat sim is off - update_legacy_all(this, i,x,y,surround_space,nt, parts, pmap); + //if (legacy_enable)//if heat sim is off + //update_legacy_all(this, i,x,y,surround_space,nt, parts, pmap); //TODO:pop killed: if (parts[i].type == PT_NONE)//if its dead, skip to next particle @@ -3191,7 +3192,7 @@ killed: } } } - else if (ptypes[t].falldown==0) + else if (elements[t].Falldown==0) { // gasses and solids (but not powders) if (!do_move(i, x, y, fin_xf, fin_yf)) @@ -3207,22 +3208,22 @@ killed: if (fin_y= rand()%400)//checking stagnant is cool, but then it doesn't update when you change it later. + if (water_equal_test && elements[t].Falldown == 2 && 1>= rand()%400)//checking stagnant is cool, but then it doesn't update when you change it later. { if (!flood_water(x,y,i,y, parts[i].tmp2)) goto movedone; @@ -3234,13 +3235,13 @@ killed: continue; if (fin_x!=x && do_move(i, x, y, fin_xf, clear_yf)) { - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; + parts[i].vx *= elements[t].Collision; + parts[i].vy *= elements[t].Collision; } else if (fin_y!=y && do_move(i, x, y, clear_xf, fin_yf)) { - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; + parts[i].vx *= elements[t].Collision; + parts[i].vy *= elements[t].Collision; } else { @@ -3261,8 +3262,8 @@ killed: dy /= mv; if (do_move(i, x, y, clear_xf+dx, clear_yf+dy)) { - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; + parts[i].vx *= elements[t].Collision; + parts[i].vy *= elements[t].Collision; goto movedone; } swappage = dx; @@ -3270,12 +3271,12 @@ killed: dy = -swappage*r; if (do_move(i, x, y, clear_xf+dx, clear_yf+dy)) { - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; + parts[i].vx *= elements[t].Collision; + parts[i].vy *= elements[t].Collision; goto movedone; } } - if (ptypes[t].falldown>1 && !ngrav_enable && gravityMode==0 && parts[i].vy>fabsf(parts[i].vx)) + if (elements[t].Falldown>1 && !ngrav_enable && gravityMode==0 && parts[i].vy>fabsf(parts[i].vx)) { s = 0; // stagnant is true if FLAG_STAGNANT was set for this particle in previous frame @@ -3321,12 +3322,12 @@ killed: else if (s==-1) {} // particle is out of bounds else if ((clear_x!=x||clear_y!=y) && do_move(i, x, y, clear_xf, clear_yf)) {} else parts[i].flags |= FLAG_STAGNANT; - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; + parts[i].vx *= elements[t].Collision; + parts[i].vy *= elements[t].Collision; } - else if (ptypes[t].falldown>1 && fabsf(pGravX*parts[i].vx+pGravY*parts[i].vy)>fabsf(pGravY*parts[i].vx-pGravX*parts[i].vy)) + else if (elements[t].Falldown>1 && fabsf(pGravX*parts[i].vx+pGravY*parts[i].vy)>fabsf(pGravY*parts[i].vx-pGravX*parts[i].vy)) { - float nxf, nyf, prev_pGravX, prev_pGravY, ptGrav = ptypes[t].gravity; + float nxf, nyf, prev_pGravX, prev_pGravY, ptGrav = elements[t].Gravity; s = 0; // stagnant is true if FLAG_STAGNANT was set for this particle in previous frame if (!stagnant || nt) //nt is if there is an something else besides the current particle type, around the particle @@ -3439,16 +3440,16 @@ killed: else if (s==-1) {} // particle is out of bounds else if ((clear_x!=x||clear_y!=y) && do_move(i, x, y, clear_xf, clear_yf)) {} else parts[i].flags |= FLAG_STAGNANT; - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; + parts[i].vx *= elements[t].Collision; + parts[i].vy *= elements[t].Collision; } else { // if interpolation was done, try moving to last clear position if ((clear_x!=x||clear_y!=y) && do_move(i, x, y, clear_xf, clear_yf)) {} else parts[i].flags |= FLAG_STAGNANT; - parts[i].vx *= ptypes[t].collision; - parts[i].vy *= ptypes[t].collision; + parts[i].vx *= elements[t].Collision; + parts[i].vy *= elements[t].Collision; } } } @@ -3615,20 +3616,18 @@ Simulation::Simulation(): memcpy(wtypes, wtypesT, wallCount * sizeof(wall_type)); free(wtypesT); - int elementCount; - part_type * ptypesT = LoadElements(elementCount); - memcpy(ptypes, ptypesT, elementCount * sizeof(part_type)); - free(ptypesT); - + platent = new unsigned[PT_NUM]; int latentCount; unsigned int * platentT = LoadLatent(latentCount); memcpy(platent, platentT, latentCount * sizeof(unsigned int)); free(platentT); - - int transitionCount; - part_transition * ptransitionsT = LoadTransitions(transitionCount); - memcpy(ptransitions, ptransitionsT, sizeof(part_transition) * transitionCount); - free(ptransitionsT); + + elements = new Element[PT_NUM]; + std::vector elementList = GetElements(); + for(int i = 0; i < elementList.size(); i++) + { + elements[i] = elementList[i]; + } int golRulesCount; int * golRulesT = LoadGOLRules(golRulesCount); diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index 1258373..62427fc 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -139,9 +139,8 @@ public: Gravity * grav; Air * air; - part_type ptypes[PT_NUM]; - unsigned int platent[PT_NUM]; - part_transition ptransitions[PT_NUM]; + Element * elements; + unsigned int * platent; wall_type wtypes[UI_WALLCOUNT]; gol_menu gmenu[NGOL]; int goltype[NGOL]; diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 043091e..60def19 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -5,9 +5,22 @@ * Author: Simon */ #include "SimulationData.h" -#include "ElementFunctions.h" +//#include "ElementFunctions.h" #include "ElementGraphics.h" +std::vector GetDefaultElements() +{ + std::vector elements; + //class Element; + //elements.push_back(dynamic_cast(new NULLElement())); + //elements.push_back(dynamic_cast(new DUSTElement())); + //elements.push_back(dynamic_cast(new WATRElement())); + //for(int i = 3; i < PT_NUM; i++) + // elements.push_back(dynamic_cast(new DUSTElement())); + + return elements; +} + gol_menu * LoadGOLMenu(int & golMenuCount) { gol_menu golMenu[NGOL] = @@ -185,7 +198,7 @@ part_type * LoadElements(int & elementCount) part_type ptypes[PT_NUM] = { //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description - {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}, + /*{"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}, {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}, {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL}, {"OIL", PIXPACK(0x404010), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 20, 0, 0, 5, 1, 1, 20, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Flammable.", ST_LIQUID, TYPE_LIQUID, NULL, NULL}, @@ -333,10 +346,10 @@ part_type * LoadElements(int & elementCount) {"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL}, {"GEL", PIXPACK(0xFF9900), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Gel. A liquid with variable viscosity and heat conductivity", ST_LIQUID, TYPE_LIQUID|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_GEL, &graphics_GEL}, {"TRON", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, 0.0f, 40, "Smart particles, Travels in straight lines and avoids obstacles. Grows with time.", ST_NONE, TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL, &update_TRON, &graphics_TRON}, - /*FREE*/{"STAR", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Star Wars rule S3456/B278/6", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"FROG", PIXPACK(0x00AA00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Frogs S12/B34/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"BRAN", PIXPACK(0xCCCC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Brian 6 S6/B246/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, - /*FREE*/{"WIND", PIXPACK(0x101010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_SPECIAL, 0.0f, 40, "", ST_NONE, ST_NONE, NULL, NULL}, + {"STAR", PIXPACK(0x0000FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Like Star Wars rule S3456/B278/6", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + {"FROG", PIXPACK(0x00AA00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Frogs S12/B34/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + {"BRAN", PIXPACK(0xCCCC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Brian 6 S6/B246/3", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL, NULL}, + {"WIND", PIXPACK(0x101010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_SPECIAL, 0.0f, 40, "", ST_NONE, ST_NONE, NULL, NULL}, {"HYGN", PIXPACK(0x5070FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.10f, 0.00f, 3.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+0.0f +273.15f, 251, "Combines with O2 to make WATR", ST_GAS, TYPE_GAS, &update_H2, NULL}, {"SOAP", PIXPACK(0xF5F5DC), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 35, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Soap. Creates bubbles.", ST_LIQUID, TYPE_LIQUID|PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_SOAP, NULL}, {"BHOL", PIXPACK(0x202020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "Black hole (Requires newtonian gravity)", ST_SOLID, TYPE_SOLID, &update_NBHL, NULL}, @@ -349,7 +362,7 @@ part_type * LoadElements(int & elementCount) {"GBMB", PIXPACK(0x1144BB), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Sticks to first object it touches then produces strong gravity push.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GBMB, &graphics_GBMB}, {"FIGH", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Fighter. Tries to kill stickmen.", ST_NONE, 0, &update_FIGH, &graphics_FIGH}, {"FRAY", PIXPACK(0x00BBFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_FORCE, 20.0f+0.0f +273.15f, 0, "Force Emitter. Push or pull objects based on temp value, use like ARAY", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_FRAY, NULL}, - {"RPEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_FORCE, 20.0f+0.0f +273.15f, 0, "Repel or attract particles based on temp value.", ST_NONE, TYPE_SOLID, &update_REPL, NULL}, + {"RPEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_FORCE, 20.0f+0.0f +273.15f, 0, "Repel or attract particles based on temp value.", ST_NONE, TYPE_SOLID, &update_REPL, NULL},*/ //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description }; elementCount = PT_NUM; diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index 03c491a..0624322 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -5,6 +5,8 @@ * Author: Simon */ +#include + #define SC_WALL 0 #define SC_ELEC 1 #define SC_POWERED 2 @@ -118,6 +120,7 @@ #ifndef SIMULATIONDATA_H_ #define SIMULATIONDATA_H_ +//#include "elements/NULLElement.h" #include "Simulation.h" /*class Simulation; @@ -136,6 +139,9 @@ struct menu_section; struct wall_type; +class Element; +std::vector GetDefaultElements(); + gol_menu * LoadGOLMenu(int & golMenuCount); int * LoadGOLTypes(int & golTypeCount); diff --git a/src/simulation/elements/116.cpp b/src/simulation/elements/116.cpp new file mode 100644 index 0000000..9b939ff --- /dev/null +++ b/src/simulation/elements/116.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_116 PT_116 116 +Element_116::Element_116() +{ + Identifier = "DEFAULT_PT_116"; + Name = "EQVE"; + Colour = PIXPACK(0xFFE0A0); + MenuVisible = 0; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.96f; + Loss = 0.80f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 30; + + Weight = 85; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Shared velocity test"; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_116::~Element_116() {} \ No newline at end of file diff --git a/src/simulation/elements/144.cpp b/src/simulation/elements/144.cpp new file mode 100644 index 0000000..82f1d7e --- /dev/null +++ b/src/simulation/elements/144.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_144 PT_144 144 +Element_144::Element_144() +{ + Identifier = "DEFAULT_PT_144"; + Name = "STAR"; + Colour = PIXPACK(0x0000FF); + MenuVisible = 0; + MenuSection = SC_LIFE; + Enabled = 0; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = 9000.0f; + HeatConduct = 40; + Description = "Like Star Wars rule S3456/B278/6"; + + State = ST_NONE; + Properties = TYPE_SOLID|PROP_LIFE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_144::~Element_144() {} \ No newline at end of file diff --git a/src/simulation/elements/145.cpp b/src/simulation/elements/145.cpp new file mode 100644 index 0000000..de9b4c2 --- /dev/null +++ b/src/simulation/elements/145.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_145 PT_145 145 +Element_145::Element_145() +{ + Identifier = "DEFAULT_PT_145"; + Name = "FROG"; + Colour = PIXPACK(0x00AA00); + MenuVisible = 0; + MenuSection = SC_LIFE; + Enabled = 0; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = 9000.0f; + HeatConduct = 40; + Description = "Frogs S12/B34/3"; + + State = ST_NONE; + Properties = TYPE_SOLID|PROP_LIFE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_145::~Element_145() {} \ No newline at end of file diff --git a/src/simulation/elements/146.cpp b/src/simulation/elements/146.cpp new file mode 100644 index 0000000..8afb8e4 --- /dev/null +++ b/src/simulation/elements/146.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_146 PT_146 146 +Element_146::Element_146() +{ + Identifier = "DEFAULT_PT_146"; + Name = "BRAN"; + Colour = PIXPACK(0xCCCC00); + MenuVisible = 0; + MenuSection = SC_LIFE; + Enabled = 0; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = 9000.0f; + HeatConduct = 40; + Description = "Brian 6 S6/B246/3"; + + State = ST_NONE; + Properties = TYPE_SOLID|PROP_LIFE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_146::~Element_146() {} \ No newline at end of file diff --git a/src/simulation/elements/147.cpp b/src/simulation/elements/147.cpp new file mode 100644 index 0000000..868c766 --- /dev/null +++ b/src/simulation/elements/147.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_147 PT_147 147 +Element_147::Element_147() +{ + Identifier = "DEFAULT_PT_147"; + Name = "WIND"; + Colour = PIXPACK(0x101010); + MenuVisible = 0; + MenuSection = SC_SPECIAL; + Enabled = 0; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = 0.0f; + HeatConduct = 40; + Description = ""; + + State = ST_NONE; + Properties = ST_NONE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_147::~Element_147() {} \ No newline at end of file diff --git a/src/simulation/elements/ACEL.cpp b/src/simulation/elements/ACEL.cpp new file mode 100644 index 0000000..8dfad79 --- /dev/null +++ b/src/simulation/elements/ACEL.cpp @@ -0,0 +1,85 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_ACEL PT_ACEL 137 +Element_ACEL::Element_ACEL() +{ + Identifier = "DEFAULT_PT_ACEL"; + Name = "ACEL"; + Colour = PIXPACK(0x0099CC); + MenuVisible = 1; + MenuSection = SC_FORCE; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Accelerator"; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_ACEL::update; + Graphics = &Element_ACEL::graphics; +} + +//#TPT-Directive ElementHeader Element_ACEL static int update(UPDATE_FUNC_ARGS) +int Element_ACEL::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + parts[i].tmp = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; + if ((r>>8)>=NPART || !r) + continue; + if(sim->elements[r&0xFF].Properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) + { + parts[r>>8].vx *= 1.1f; + parts[r>>8].vy *= 1.1f; + parts[i].tmp = 1; + } + } + return 0; +} + + + +//#TPT-Directive ElementHeader Element_ACEL static int graphics(GRAPHICS_FUNC_ARGS) +int Element_ACEL::graphics(GRAPHICS_FUNC_ARGS) + +{ + if(cpart->tmp) + *pixel_mode |= PMODE_GLOW; + return 0; +} + + +Element_ACEL::~Element_ACEL() {} \ No newline at end of file diff --git a/src/simulation/elements/ACID.cpp b/src/simulation/elements/ACID.cpp new file mode 100644 index 0000000..fb6cb81 --- /dev/null +++ b/src/simulation/elements/ACID.cpp @@ -0,0 +1,144 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_ACID PT_ACID 21 +Element_ACID::Element_ACID() +{ + Identifier = "DEFAULT_PT_ACID"; + Name = "ACID"; + Colour = PIXPACK(0xED55FF); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 40; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 10; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 34; + Description = "Dissolves almost everything."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_DEADLY; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_ACID::update; + Graphics = &Element_ACID::graphics; +} + +//#TPT-Directive ElementHeader Element_ACID static int update(UPDATE_FUNC_ARGS) +int Element_ACID::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, trade, np; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxpart_change_type(i,x,y,PT_FIRE); + sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); + parts[i].life = 4; + parts[r>>8].life = 4; + } + else if ((r&0xFF)==PT_WTRV) + { + if(!(rand()%250)) + { + sim->part_change_type(i, x, y, PT_CAUS); + parts[i].life = (rand()%50)+25; + sim->kill_part(r>>8); + } + } + else if (((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && sim->elements[r&0xFF].Hardness>(rand()%1000))&&parts[i].life>=50) + { + if (sim->parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid + { + float newtemp = ((60.0f-(float)sim->elements[r&0xFF].Hardness))*7.0f; + if(newtemp < 0){ + newtemp = 0; + } + parts[i].temp += newtemp; + parts[i].life--; + sim->kill_part(r>>8); + } + } + else if (parts[i].life<=50) + { + sim->kill_part(i); + return 1; + } + } + } + for ( trade = 0; trade<2; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rx>8)>=NPART || !r) + continue; + if ((r&0xFF)==PT_ACID&&(parts[i].life>parts[r>>8].life)&&parts[i].life>0)//diffusion + { + int temp = parts[i].life - parts[r>>8].life; + if (temp ==1) + { + parts[r>>8].life ++; + parts[i].life --; + } + else if (temp>0) + { + parts[r>>8].life += temp/2; + parts[i].life -= temp/2; + } + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_ACID static int graphics(GRAPHICS_FUNC_ARGS) +int Element_ACID::graphics(GRAPHICS_FUNC_ARGS) + +{ + int s = cpart->life; + if (s>75) s = 75; //These two should not be here. + if (s<49) s = 49; + s = (s-49)*3; + if (s==0) s = 1; + *colr += s*4; + *colg += s*1; + *colb += s*2; + *pixel_mode |= PMODE_BLUR; + return 0; +} + + +Element_ACID::~Element_ACID() {} \ No newline at end of file diff --git a/src/simulation/elements/AMTR.cpp b/src/simulation/elements/AMTR.cpp new file mode 100644 index 0000000..a93d1cd --- /dev/null +++ b/src/simulation/elements/AMTR.cpp @@ -0,0 +1,79 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_AMTR PT_AMTR 72 +Element_AMTR::Element_AMTR() +{ + Identifier = "DEFAULT_PT_AMTR"; + Name = "AMTR"; + Colour = PIXPACK(0x808080); + MenuVisible = 1; + MenuSection = SC_NUCLEAR; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.96f; + Loss = 0.80f; + Collision = 0.00f; + Gravity = 0.10f; + Diffusion = 1.00f; + HotAir = 0.0000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Anti-Matter, Destroys a majority of particles"; + + State = ST_NONE; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_AMTR::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_AMTR static int update(UPDATE_FUNC_ARGS) +int Element_AMTR::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxkill_part(i); + return 1; + } + if (10>(rand()/(RAND_MAX/100))) + sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); + else + sim->kill_part(r>>8); + sim->pv[y/CELL][x/CELL] -= 2.0f; + } + } + return 0; +} + + +Element_AMTR::~Element_AMTR() {} \ No newline at end of file diff --git a/src/simulation/elements/ANAR.cpp b/src/simulation/elements/ANAR.cpp new file mode 100644 index 0000000..c35c58c --- /dev/null +++ b/src/simulation/elements/ANAR.cpp @@ -0,0 +1,78 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_ANAR PT_ANAR 113 +Element_ANAR::Element_ANAR() +{ + Identifier = "DEFAULT_PT_ANAR"; + Name = "ANAR"; + Colour = PIXPACK(0xFFFFEE); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = -0.7f; + AirDrag = -0.02f * CFDS; + AirLoss = 0.96f; + Loss = 0.80f; + Collision = 0.1f; + Gravity = -0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 30; + + Weight = 85; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Very light dust. Behaves opposite gravity"; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_ANAR::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_ANAR static int update(UPDATE_FUNC_ARGS) +int Element_ANAR::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + + //if (parts[i].temp >= 0.23) + // parts[i].temp --; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%22) + { + sim->part_change_type(i,x,y,PT_HFLM); + parts[i].life = rand()%150+50; + parts[r>>8].temp = parts[i].temp = 0; + sim->pv[y/CELL][x/CELL] -= 0.5; + } + } + } + return 0; +} + + +Element_ANAR::~Element_ANAR() {} \ No newline at end of file diff --git a/src/simulation/elements/ARAY.cpp b/src/simulation/elements/ARAY.cpp new file mode 100644 index 0000000..c455f07 --- /dev/null +++ b/src/simulation/elements/ARAY.cpp @@ -0,0 +1,154 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_ARAY PT_ARAY 126 +Element_ARAY::Element_ARAY() +{ + Identifier = "DEFAULT_PT_ARAY"; + Name = "ARAY"; + Colour = PIXPACK(0xFFBB00); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "Ray Emitter. Rays create points when they collide"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_ARAY::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_ARAY static int update(UPDATE_FUNC_ARGS) +int Element_ARAY::update(UPDATE_FUNC_ARGS) + { + int r, nxx, nyy, docontinue, nxi, nyi, rx, ry, nr, ry1, rx1; + if (parts[i].life==0) { + int colored =0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life==3) { + int destroy = (parts[r>>8].ctype==PT_PSCN)?1:0; + int nostop = (parts[r>>8].ctype==PT_INST)?1:0; + for (docontinue = 1, nxx = 0, nyy = 0, nxi = rx*-1, nyi = ry*-1; docontinue; nyy+=nyi, nxx+=nxi) { + if (!(x+nxi+nxx= 0 && y+nyi+nyy >= 0)) { + break; + } + r = pmap[y+nyi+nyy][x+nxi+nxx]; + if (!r) { + int nr = sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_BRAY); + if (nr!=-1) { + if (destroy) {//if it came from PSCN + parts[nr].tmp = 2; + parts[nr].life = 2; + } else + parts[nr].ctype = colored; + parts[nr].temp = parts[i].temp; + } + } else if (!destroy) { + if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==0) {//if it hits another BRAY that isn't red + if (nyy!=0 || nxx!=0) { + parts[r>>8].life = 1020;//makes it last a while + parts[r>>8].tmp = 1; + if (!parts[r>>8].ctype)//and colors it if it isn't already + parts[r>>8].ctype = colored; + } + docontinue = 0;//then stop it + } else if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==1) {//if it hits one that already was a long life, reset it + parts[r>>8].life = 1020; + //docontinue = 1; + } else if ((r&0xFF)==PT_FILT) {//get color if passed through FILT + colored = parts[r>>8].ctype; + //this if prevents BRAY from stopping on certain materials + } else if ((r&0xFF)!=PT_STOR && (r&0xFF)!=PT_INWR && ((r&0xFF)!=PT_SPRK || parts[r>>8].ctype!=PT_INWR) && (r&0xFF)!=PT_ARAY && (r&0xFF)!=PT_WIFI && !((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { + if (nyy!=0 || nxx!=0) { + sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK); + } + if (!(nostop && parts[r>>8].type==PT_SPRK && parts[r>>8].ctype >= 0 && parts[r>>8].ctype < PT_NUM && (sim->elements[parts[r>>8].ctype].Properties&PROP_CONDUCTS))) { + docontinue = 0; + } else { + docontinue = 1; + } + } else if((r&0xFF)==PT_STOR) { + if(parts[r>>8].tmp) + { + //Cause STOR to release + for(ry1 = 1; ry1 >= -1; ry1--){ + for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ + int np = sim->create_part(-1, x+nxi+nxx+rx1, y+nyi+nyy+ry1, parts[r>>8].tmp); + if (np!=-1) + { + parts[np].temp = parts[r>>8].temp; + parts[np].life = parts[r>>8].tmp2; + parts[np].tmp = parts[r>>8].pavg[0]; + parts[np].ctype = parts[r>>8].pavg[1]; + parts[r>>8].tmp = 0; + parts[r>>8].life = 10; + break; + } + } + } + } + else + { + parts[r>>8].life = 10; + } + } + } else if (destroy) { + if ((r&0xFF)==PT_BRAY) { + parts[r>>8].life = 1; + docontinue = 1; + //this if prevents red BRAY from stopping on certain materials + } else if ((r&0xFF)==PT_STOR || (r&0xFF)==PT_INWR || ((r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_INWR) || (r&0xFF)==PT_ARAY || (r&0xFF)==PT_WIFI || (r&0xFF)==PT_FILT || ((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { + if((r&0xFF)==PT_STOR) + { + parts[r>>8].tmp = 0; + parts[r>>8].life = 0; + } + docontinue = 1; + } else { + docontinue = 0; + } + } + } + } + //parts[i].life = 4; + } + } + return 0; +} + + +Element_ARAY::~Element_ARAY() {} \ No newline at end of file diff --git a/src/simulation/elements/BANG.cpp b/src/simulation/elements/BANG.cpp new file mode 100644 index 0000000..ac538ca --- /dev/null +++ b/src/simulation/elements/BANG.cpp @@ -0,0 +1,126 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BANG PT_BANG 139 +Element_BANG::Element_BANG() +{ + Identifier = "DEFAULT_PT_BANG"; + Name = "TNT"; + Colour = PIXPACK(0xC05050); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 88; + Description = "Explosive."; + + State = ST_SOLID; + Properties = TYPE_SOLID | PROP_NEUTPENETRATE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_BANG::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_BANG static int update(UPDATE_FUNC_ARGS) +int Element_BANG::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, nb; + if(parts[i].tmp==0) + { + if(parts[i].temp>=673.0f) + parts[i].tmp = 1; + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxflood_prop(x, y, offsetof(Particle, tmp), &tempvalue, 0); + } + else if(parts[i].tmp==2) + { + parts[i].tmp = 3; + } + else if(parts[i].tmp>=3) + { + float otemp = parts[i].temp-275.13f; + //Explode!! + sim->pv[y/CELL][x/CELL] += 0.5f; + parts[i].tmp = 0; + if(!(rand()%3)) + { + if(!(rand()%2)) + { + sim->create_part(i, x, y, PT_FIRE); + parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); + } + else + { + sim->create_part(i, x, y, PT_SMKE); + parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); + } + } + else + { + if(!(rand()%15)) + { + sim->create_part(i, x, y, PT_BOMB); + parts[i].tmp = 1; + parts[i].life = 50; + parts[i].temp = restrict_flt((MAX_TEMP/3)+otemp, MIN_TEMP, MAX_TEMP); + parts[i].vx = rand()%20-10; + parts[i].vy = rand()%20-10; + } + else + { + sim->kill_part(i); + } + } + return 1; + } + return 0; +} + + +Element_BANG::~Element_BANG() {} \ No newline at end of file diff --git a/src/simulation/elements/BCLN.cpp b/src/simulation/elements/BCLN.cpp new file mode 100644 index 0000000..3db0654 --- /dev/null +++ b/src/simulation/elements/BCLN.cpp @@ -0,0 +1,91 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BCLN PT_BCLN 93 +Element_BCLN::Element_BCLN() +{ + Identifier = "DEFAULT_PT_BCLN"; + Name = "BCLN"; + Colour = PIXPACK(0xFFD040); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.97f; + Loss = 0.50f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 12; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Breakable Clone."; + + State = ST_NONE; + Properties = TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_BCLN::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_BCLN static int update(UPDATE_FUNC_ARGS) +int Element_BCLN::update(UPDATE_FUNC_ARGS) + { + if (!parts[i].life && sim->pv[y/CELL][x/CELL]>4.0f) + parts[i].life = rand()%40+80; + if (parts[i].life) + { + float advection = 0.1f; + parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; + parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; + } + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && + (r&0xFF)!=PT_STKM2 && (r&0xFF)!=PT_PBCN && + (r&0xFF)>8].ctype; + } + } + } + else { + if (parts[i].ctype==PT_LIFE) sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); + else sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + return 0; +} + + +Element_BCLN::~Element_BCLN() {} \ No newline at end of file diff --git a/src/simulation/elements/BCOL.cpp b/src/simulation/elements/BCOL.cpp new file mode 100644 index 0000000..1fb6f82 --- /dev/null +++ b/src/simulation/elements/BCOL.cpp @@ -0,0 +1,146 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BCOL PT_BCOL 73 +Element_BCOL::Element_BCOL() +{ + Identifier = "DEFAULT_PT_BCOL"; + Name = "BCOL"; + Colour = PIXPACK(0x333333); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.94f; + Loss = 0.95f; + Collision = -0.1f; + Gravity = 0.3f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 5; + Hardness = 2; + + Weight = 90; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 150; + Description = "Broken Coal. Heavy particles. See COAL"; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_BCOL::update; + Graphics = &Element_BCOL::graphics; +} + +//#TPT-Directive ElementHeader Element_BCOL static int update(UPDATE_FUNC_ARGS) +int Element_BCOL::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, trade, temp; + if (parts[i].life<=0) { + sim->create_part(i, x, y, PT_FIRE); + return 1; + } else if (parts[i].life < 100) { + parts[i].life--; + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) + { + if (parts[i].life>100) { + parts[i].life = 99; + } + } + if ((r&0xFF)==PT_LAVA && 1>(rand()%500)) + { + if (parts[r>>8].ctype == PT_IRON) { + parts[r>>8].ctype = PT_METL; + sim->kill_part(i); + return 1; + } + } + } + /*if(100-parts[i].life > parts[i].tmp2) + parts[i].tmp2 = 100-parts[i].life; + if(parts[i].tmp2 < 0) parts[i].tmp2 = 0; + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion + { + int temp = parts[i].tmp2 - parts[r>>8].tmp2; + if(temp < 10) + continue; + if (temp ==1) + { + parts[r>>8].tmp2 ++; + parts[i].tmp2 --; + } + else if (temp>0) + { + parts[r>>8].tmp2 += temp/2; + parts[i].tmp2 -= temp/2; + } + } + } + }*/ + if(parts[i].temp > parts[i].tmp2) + parts[i].tmp2 = parts[i].temp; + return 0; +} + + +//#TPT-Directive ElementHeader Element_BCOL static int graphics(GRAPHICS_FUNC_ARGS) +int Element_BCOL::graphics(GRAPHICS_FUNC_ARGS) + //Both COAL and Broken Coal +{ + *colr += (cpart->tmp2-295.15f)/3; + + if (*colr > 170) + *colr = 170; + if (*colr < *colg) + *colr = *colg; + + *colg = *colb = *colr; + + if((cpart->temp-295.15f) > 300.0f-200.0f) + { + float frequency = 3.1415/(2*300.0f-(300.0f-200.0f)); + int q = ((cpart->temp-295.15f)>300.0f)?300.0f-(300.0f-200.0f):(cpart->temp-295.15f)-(300.0f-200.0f); + + *colr += sin(frequency*q) * 226; + *colg += sin(frequency*q*4.55 +3.14) * 34; + *colb += sin(frequency*q*2.22 +3.14) * 64; + } + return 0; +} + + + +Element_BCOL::~Element_BCOL() {} \ No newline at end of file diff --git a/src/simulation/elements/BGLA.cpp b/src/simulation/elements/BGLA.cpp new file mode 100644 index 0000000..756842a --- /dev/null +++ b/src/simulation/elements/BGLA.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BGLA PT_BGLA 47 +Element_BGLA::Element_BGLA() +{ + Identifier = "DEFAULT_PT_BGLA"; + Name = "BGLA"; + Colour = PIXPACK(0x606060); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.94f; + Loss = 0.95f; + Collision = -0.1f; + Gravity = 0.3f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 5; + Hardness = 2; + + Weight = 90; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 150; + Description = "Broken Glass, Heavy particles. Meltable. Bagels."; + + State = ST_SOLID; + Properties = TYPE_PART | PROP_HOT_GLOW; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1973.0f; + HighTemperatureTransition = PT_LAVA; + + Update = NULL; + Graphics = NULL; +} + +Element_BGLA::~Element_BGLA() {} \ No newline at end of file diff --git a/src/simulation/elements/BHOL.cpp b/src/simulation/elements/BHOL.cpp new file mode 100644 index 0000000..7a11985 --- /dev/null +++ b/src/simulation/elements/BHOL.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BHOL PT_BHOL 39 +Element_BHOL::Element_BHOL() +{ + Identifier = "DEFAULT_PT_BHOL"; + Name = "VACU"; + Colour = PIXPACK(0x303030); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.95f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = -0.01f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP+70.0f+273.15f; + HeatConduct = 255; + Description = "Vacuum, sucks in other particles and heats up."; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_BHOL::~Element_BHOL() {} \ No newline at end of file diff --git a/src/simulation/elements/BIZR.cpp b/src/simulation/elements/BIZR.cpp new file mode 100644 index 0000000..13df996 --- /dev/null +++ b/src/simulation/elements/BIZR.cpp @@ -0,0 +1,124 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BIZR PT_BIZR 103 +Element_BIZR::Element_BIZR() +{ + Identifier = "DEFAULT_PT_BIZR"; + Name = "BIZR"; + Colour = PIXPACK(0x00FF77); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 30; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 29; + Description = "Bizarre... contradicts the normal state changes."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 100.0f; + LowTemperatureTransition = PT_BIZRG; + HighTemperature = 400.0f; + HighTemperatureTransition = PT_BIZRS; + + Update = &Element_BIZR::update; + Graphics = &Element_BIZR::graphics; +} + +//#TPT-Directive ElementHeader Element_BIZR static int update(UPDATE_FUNC_ARGS) +int Element_BIZR::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, nr, ng, nb, na; + float tr, tg, tb, ta, mr, mg, mb, ma; + float blend; + if(parts[i].dcolour){ + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; + tg = (parts[r>>8].dcolour>>8)&0xFF; + tb = (parts[r>>8].dcolour)&0xFF; + ta = (parts[r>>8].dcolour>>24)&0xFF; + + mr = (parts[i].dcolour>>16)&0xFF; + mg = (parts[i].dcolour>>8)&0xFF; + mb = (parts[i].dcolour)&0xFF; + ma = (parts[i].dcolour>>24)&0xFF; + + nr = (tr*blend) + (mr*(1-blend)); + ng = (tg*blend) + (mg*(1-blend)); + nb = (tb*blend) + (mb*(1-blend)); + na = (ta*blend) + (ma*(1-blend)); + + parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; + } + } + } + if(((r = sim->photons[y][x])&0xFF)==PT_PHOT || ((r = pmap[y][x])&0xFF)==PT_PHOT) + { + sim->part_change_type(r>>8, x, y, PT_ELEC); + parts[r>>8].ctype = 0; + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_BIZR static int graphics(GRAPHICS_FUNC_ARGS) +int Element_BIZR::graphics(GRAPHICS_FUNC_ARGS) + //BIZR, BIZRG, BIZRS +{ + int x = 0; + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + if(fabs(cpart->vx)+fabs(cpart->vy)>0) + { + *firea = 255; + *fireg = *colg/5 * fabs(cpart->vx)+fabs(cpart->vy); + *fireb = *colb/5 * fabs(cpart->vx)+fabs(cpart->vy); + *firer = *colr/5 * fabs(cpart->vx)+fabs(cpart->vy); + *pixel_mode |= FIRE_ADD; + } + return 0; +} + + +Element_BIZR::~Element_BIZR() {} \ No newline at end of file diff --git a/src/simulation/elements/BIZRG.cpp b/src/simulation/elements/BIZRG.cpp new file mode 100644 index 0000000..1e5f27f --- /dev/null +++ b/src/simulation/elements/BIZRG.cpp @@ -0,0 +1,124 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BIZRG PT_BIZRG 104 +Element_BIZRG::Element_BIZRG() +{ + Identifier = "DEFAULT_PT_BIZRG"; + Name = "BIZG"; + Colour = PIXPACK(0x00FFBB); + MenuVisible = 1; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 1.0f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.99f; + Loss = 0.30f; + Collision = -0.1f; + Gravity = 0.0f; + Diffusion = 2.75f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 1; + + Temperature = R_TEMP-200.0f+273.15f; + HeatConduct = 42; + Description = "Bizarre gas"; + + State = ST_GAS; + Properties = TYPE_GAS; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 100.0f; + HighTemperatureTransition = PT_BIZR; + + Update = &Element_BIZRG::update; + Graphics = &Element_BIZRG::graphics; +} + +//#TPT-Directive ElementHeader Element_BIZRG static int update(UPDATE_FUNC_ARGS) +int Element_BIZRG::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, nr, ng, nb, na; + float tr, tg, tb, ta, mr, mg, mb, ma; + float blend; + if(parts[i].dcolour){ + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; + tg = (parts[r>>8].dcolour>>8)&0xFF; + tb = (parts[r>>8].dcolour)&0xFF; + ta = (parts[r>>8].dcolour>>24)&0xFF; + + mr = (parts[i].dcolour>>16)&0xFF; + mg = (parts[i].dcolour>>8)&0xFF; + mb = (parts[i].dcolour)&0xFF; + ma = (parts[i].dcolour>>24)&0xFF; + + nr = (tr*blend) + (mr*(1-blend)); + ng = (tg*blend) + (mg*(1-blend)); + nb = (tb*blend) + (mb*(1-blend)); + na = (ta*blend) + (ma*(1-blend)); + + parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; + } + } + } + if(((r = sim->photons[y][x])&0xFF)==PT_PHOT || ((r = pmap[y][x])&0xFF)==PT_PHOT) + { + sim->part_change_type(r>>8, x, y, PT_ELEC); + parts[r>>8].ctype = 0; + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_BIZRG static int graphics(GRAPHICS_FUNC_ARGS) +int Element_BIZRG::graphics(GRAPHICS_FUNC_ARGS) + //BIZR, BIZRG, BIZRS +{ + int x = 0; + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + if(fabs(cpart->vx)+fabs(cpart->vy)>0) + { + *firea = 255; + *fireg = *colg/5 * fabs(cpart->vx)+fabs(cpart->vy); + *fireb = *colb/5 * fabs(cpart->vx)+fabs(cpart->vy); + *firer = *colr/5 * fabs(cpart->vx)+fabs(cpart->vy); + *pixel_mode |= FIRE_ADD; + } + return 0; +} + + +Element_BIZRG::~Element_BIZRG() {} \ No newline at end of file diff --git a/src/simulation/elements/BIZRS.cpp b/src/simulation/elements/BIZRS.cpp new file mode 100644 index 0000000..439a723 --- /dev/null +++ b/src/simulation/elements/BIZRS.cpp @@ -0,0 +1,124 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BIZRS PT_BIZRS 105 +Element_BIZRS::Element_BIZRS() +{ + Identifier = "DEFAULT_PT_BIZRS"; + Name = "BIZS"; + Colour = PIXPACK(0x00E455); + MenuVisible = 1; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+300.0f+273.15f; + HeatConduct = 251; + Description = "Bizarre solid"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 400.0f; + LowTemperatureTransition = PT_BIZR; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_BIZRS::update; + Graphics = &Element_BIZRS::graphics; +} + +//#TPT-Directive ElementHeader Element_BIZRS static int update(UPDATE_FUNC_ARGS) +int Element_BIZRS::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, nr, ng, nb, na; + float tr, tg, tb, ta, mr, mg, mb, ma; + float blend; + if(parts[i].dcolour){ + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; + tg = (parts[r>>8].dcolour>>8)&0xFF; + tb = (parts[r>>8].dcolour)&0xFF; + ta = (parts[r>>8].dcolour>>24)&0xFF; + + mr = (parts[i].dcolour>>16)&0xFF; + mg = (parts[i].dcolour>>8)&0xFF; + mb = (parts[i].dcolour)&0xFF; + ma = (parts[i].dcolour>>24)&0xFF; + + nr = (tr*blend) + (mr*(1-blend)); + ng = (tg*blend) + (mg*(1-blend)); + nb = (tb*blend) + (mb*(1-blend)); + na = (ta*blend) + (ma*(1-blend)); + + parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; + } + } + } + if(((r = sim->photons[y][x])&0xFF)==PT_PHOT || ((r = pmap[y][x])&0xFF)==PT_PHOT) + { + sim->part_change_type(r>>8, x, y, PT_ELEC); + parts[r>>8].ctype = 0; + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_BIZRS static int graphics(GRAPHICS_FUNC_ARGS) +int Element_BIZRS::graphics(GRAPHICS_FUNC_ARGS) + //BIZR, BIZRG, BIZRS +{ + int x = 0; + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + if(fabs(cpart->vx)+fabs(cpart->vy)>0) + { + *firea = 255; + *fireg = *colg/5 * fabs(cpart->vx)+fabs(cpart->vy); + *fireb = *colb/5 * fabs(cpart->vx)+fabs(cpart->vy); + *firer = *colr/5 * fabs(cpart->vx)+fabs(cpart->vy); + *pixel_mode |= FIRE_ADD; + } + return 0; +} + + +Element_BIZRS::~Element_BIZRS() {} \ No newline at end of file diff --git a/src/simulation/elements/BMTL.cpp b/src/simulation/elements/BMTL.cpp new file mode 100644 index 0000000..66a9af2 --- /dev/null +++ b/src/simulation/elements/BMTL.cpp @@ -0,0 +1,80 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BMTL PT_BMTL 29 +Element_BMTL::Element_BMTL() +{ + Identifier = "DEFAULT_PT_BMTL"; + Name = "BMTL"; + Colour = PIXPACK(0x505070); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Breakable metal."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 1.0f; + HighPressureTransition = ST; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1273.0f; + HighTemperatureTransition = PT_LAVA; + + Update = &Element_BMTL::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_BMTL static int update(UPDATE_FUNC_ARGS) +int Element_BMTL::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, rt, tempFactor; + if (parts[i].tmp>1) + { + parts[i].tmp--; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + if ((rt==PT_METL || rt==PT_IRON) && 1>(rand()/(RAND_MAX/100))) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_BMTL); + parts[r>>8].tmp=(parts[i].tmp<=7)?parts[i].tmp=1:parts[i].tmp-(rand()%5);//rand()/(RAND_MAX/300)+100; + } + } + } + else if (parts[i].tmp==1 && 1>rand()%1000) + { + parts[i].tmp = 0; + sim->part_change_type(i,x,y,PT_BRMT); + } + return 0; +} + + +Element_BMTL::~Element_BMTL() {} \ No newline at end of file diff --git a/src/simulation/elements/BOMB.cpp b/src/simulation/elements/BOMB.cpp new file mode 100644 index 0000000..ca3be8d --- /dev/null +++ b/src/simulation/elements/BOMB.cpp @@ -0,0 +1,140 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BOMB PT_BOMB 129 +Element_BOMB::Element_BOMB() +{ + Identifier = "DEFAULT_PT_BOMB"; + Name = "BOMB"; + Colour = PIXPACK(0xFFF288); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 30; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 29; + Description = "Bomb."; + + State = ST_NONE; + Properties = TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC|PROP_SPARKSETTLE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_BOMB::update; + Graphics = &Element_BOMB::graphics; +} + +//#TPT-Directive ElementHeader Element_BOMB static int update(UPDATE_FUNC_ARGS) +int Element_BOMB::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, nb; + //Spark is used so much now that it should be a seperate element. + if (parts[i].tmp==1) { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxelements[r&0xFF].Properties & (TYPE_SOLID | TYPE_PART | TYPE_LIQUID)) && !(sim->elements[r&0xFF].Properties & PROP_SPARKSETTLE)) { + sim->kill_part(i); + return 1; + } + } + } else if (parts[i].tmp==0) { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+nxi, y+nxj, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 1; + parts[nb].life = 50; + parts[nb].temp = MAX_TEMP; + parts[nb].vx = rand()%20-10; + parts[nb].vy = rand()%20-10; + } + } + for (nxj=-rad; nxj<=rad; nxj++) + for (nxi=-rad; nxi<=rad; nxi++) + if ((pow((float)nxi,2))/(pow((float)rad,2))+(pow((float)nxj,2))/(pow((float)rad,2))<=1) + if ((pmap[y+nxj][x+nxi]&0xFF)!=PT_DMND && (pmap[y+nxj][x+nxi]&0xFF)!=PT_CLNE && (pmap[y+nxj][x+nxi]&0xFF)!=PT_PCLN && (pmap[y+nxj][x+nxi]&0xFF)!=PT_BCLN) { + sim->delete_part(x+nxi, y+nxj, 0);//it SHOULD kill anything but the exceptions above, doesn't seem to always work + sim->pv[(y+nxj)/CELL][(x+nxi)/CELL] += 0.1f; + nb = sim->create_part(-1, x+nxi, y+nxj, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 2; + parts[nb].life = 2; + parts[nb].temp = MAX_TEMP; + } + } + //create_parts(x, y, 9, 9, PT_BOMB); + //create_parts(x, y, 8, 8, PT_NONE); + sim->kill_part(i); + return 1; + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_BOMB static int graphics(GRAPHICS_FUNC_ARGS) +int Element_BOMB::graphics(GRAPHICS_FUNC_ARGS) + +{ + if (cpart->tmp==0) { + //Normal bomb + *pixel_mode |= PMODE_FLARE; + } + else if(cpart->tmp==2) + { + //Flash + *pixel_mode = PMODE_FLAT | FIRE_ADD; + *colr = *colg = *colb = *firer = *fireg = *fireb = *firea = 255; + } + else + { + //Flying spark + *pixel_mode = PMODE_SPARK | PMODE_ADD; + *cola = 4*cpart->life; + } + return 0; +} + + +Element_BOMB::~Element_BOMB() {} \ No newline at end of file diff --git a/src/simulation/elements/BOYL.cpp b/src/simulation/elements/BOYL.cpp new file mode 100644 index 0000000..3fd36c9 --- /dev/null +++ b/src/simulation/elements/BOYL.cpp @@ -0,0 +1,94 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BOYL PT_BOYL 141 +Element_BOYL::Element_BOYL() +{ + Identifier = "DEFAULT_PT_BOYL"; + Name = "BOYL"; + Colour = PIXPACK(0x0A3200); + MenuVisible = 1; + MenuSection = SC_GAS; + Enabled = 1; + + Advection = 1.0f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.99f; + Loss = 0.30f; + Collision = -0.1f; + Gravity = 0.0f; + Diffusion = 0.18f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 1; + + Temperature = R_TEMP+2.0f +273.15f; + HeatConduct = 42; + Description = "Boyle, variable pressure gas. Expands when heated."; + + State = ST_GAS; + Properties = TYPE_GAS; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_BOYL::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_BOYL static int update(UPDATE_FUNC_ARGS) +int Element_BOYL::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + if (sim->pv[y/CELL][x/CELL]<(parts[i].temp/100)) + sim->pv[y/CELL][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL]); + if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp/100)) + sim->pv[y/CELL+1][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL+1][x/CELL]); + if (x+CELLpv[y/CELL][x/CELL+1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL+1]); + if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL+1][x/CELL+1]); + } + if (y-CELL>=0 && sim->pv[y/CELL-1][x/CELL]<(parts[i].temp/100)) + sim->pv[y/CELL-1][x/CELL] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL-1][x/CELL]); + if (x-CELL>=0) + { + sim->pv[y/CELL][x/CELL-1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL][x/CELL-1]); + if (y-CELL>=0) + sim->pv[y/CELL-1][x/CELL-1] += 0.001f*((parts[i].temp/100)-sim->pv[y/CELL-1][x/CELL-1]); + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && + x+rxrand()%30) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FOG); + } + else if ((r&0xFF)==PT_O2 && 1>rand()%9) + { + sim->kill_part(r>>8); + sim->part_change_type(i,x,y,PT_WATR); + sim->pv[y/CELL][x/CELL] += 4.0; + } + } + return 0; +} + + +Element_BOYL::~Element_BOYL() {} \ No newline at end of file diff --git a/src/simulation/elements/BRAY.cpp b/src/simulation/elements/BRAY.cpp new file mode 100644 index 0000000..7b9c407 --- /dev/null +++ b/src/simulation/elements/BRAY.cpp @@ -0,0 +1,109 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BRAY PT_BRAY 127 +Element_BRAY::Element_BRAY() +{ + Identifier = "DEFAULT_PT_BRAY"; + Name = "BRAY"; + Colour = PIXPACK(0xFFFFFF); + MenuVisible = 0; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Ray Point. Rays create points when they collide"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = &Element_BRAY::graphics; +} + +//#TPT-Directive ElementHeader Element_BRAY static int graphics(GRAPHICS_FUNC_ARGS) +int Element_BRAY::graphics(GRAPHICS_FUNC_ARGS) + +{ + int x, trans = 255; + if(cpart->tmp==0) + { + trans = cpart->life * 7; + if (trans>255) trans = 255; + if (cpart->ctype) { + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + } + } + else if(cpart->tmp==1) + { + trans = cpart->life/4; + if (trans>255) trans = 255; + if (cpart->ctype) { + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + } + } + else if(cpart->tmp==2) + { + trans = cpart->life*100; + if (trans>255) trans = 255; + *colr = 255; + *colg = 150; + *colb = 50; + } + *cola = trans; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_BLEND | PMODE_GLOW; + return 0; +} + + +Element_BRAY::~Element_BRAY() {} \ No newline at end of file diff --git a/src/simulation/elements/BRCK.cpp b/src/simulation/elements/BRCK.cpp new file mode 100644 index 0000000..0a1bba7 --- /dev/null +++ b/src/simulation/elements/BRCK.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BRCK PT_BRCK 67 +Element_BRCK::Element_BRCK() +{ + Identifier = "DEFAULT_PT_BRCK"; + Name = "BRCK"; + Colour = PIXPACK(0x808080); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Brick, breakable building material."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_HOT_GLOW; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 8.8f; + HighPressureTransition = PT_STNE; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1223.0f; + HighTemperatureTransition = PT_LAVA; + + Update = NULL; + Graphics = NULL; +} + +Element_BRCK::~Element_BRCK() {} \ No newline at end of file diff --git a/src/simulation/elements/BREC.cpp b/src/simulation/elements/BREC.cpp new file mode 100644 index 0000000..9668785 --- /dev/null +++ b/src/simulation/elements/BREC.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BREC PT_BREC 135 +Element_BREC::Element_BREC() +{ + Identifier = "DEFAULT_PT_BREC"; + Name = "BREL"; + Colour = PIXPACK(0x707060); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.94f; + Loss = 0.95f; + Collision = -0.1f; + Gravity = 0.18f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 2; + Hardness = 2; + + Weight = 90; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 211; + Description = "Broken electronics"; + + State = ST_SOLID; + Properties = TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_BREC::~Element_BREC() {} \ No newline at end of file diff --git a/src/simulation/elements/BRMT.cpp b/src/simulation/elements/BRMT.cpp new file mode 100644 index 0000000..11773e2 --- /dev/null +++ b/src/simulation/elements/BRMT.cpp @@ -0,0 +1,85 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BRMT PT_BRMT 30 +Element_BRMT::Element_BRMT() +{ + Identifier = "DEFAULT_PT_BRMT"; + Name = "BRMT"; + Colour = PIXPACK(0x705060); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.94f; + Loss = 0.95f; + Collision = -0.1f; + Gravity = 0.3f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 2; + Hardness = 2; + + Weight = 90; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 211; + Description = "Broken metal."; + + State = ST_SOLID; + Properties = TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1273.0f; + HighTemperatureTransition = PT_LAVA; + + Update = &Element_BRMT::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_BRMT static int update(UPDATE_FUNC_ARGS) +int Element_BRMT::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, rt, tempFactor; + if (parts[i].temp > (250.0f+273.15f)) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + tempFactor = 1000 - (((250.0f+273.15f)-parts[i].temp)*2); + if(tempFactor < 2) + tempFactor = 2; + if ((rt==PT_BREC) && 1 > (rand()%tempFactor)) + { + if(rand()%2) + { + sim->create_part(r>>8, x+rx, y+ry, PT_THRM); + } + else + { sim->create_part(i, x, y, PT_THRM); + } + return 1; + //part_change_type(r>>8,x+rx,y+ry,PT_BMTL); + //parts[r>>8].tmp=(parts[i].tmp<=7)?parts[i].tmp=1:parts[i].tmp-(rand()%5);//rand()/(RAND_MAX/300)+100; + } + } + } + return 0; +} + + +Element_BRMT::~Element_BRMT() {} \ No newline at end of file diff --git a/src/simulation/elements/BTRY.cpp b/src/simulation/elements/BTRY.cpp new file mode 100644 index 0000000..6aa00ec --- /dev/null +++ b/src/simulation/elements/BTRY.cpp @@ -0,0 +1,75 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_BTRY PT_BTRY 53 +Element_BTRY::Element_BTRY() +{ + Identifier = "DEFAULT_PT_BTRY"; + Name = "BTRY"; + Colour = PIXPACK(0x858505); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Solid. Generates Electricity."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 2273.0f; + HighTemperatureTransition = PT_PLSM; + + Update = &Element_BTRY::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_BTRY static int update(UPDATE_FUNC_ARGS) +int Element_BTRY::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, rt; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + if (sim->parts_avg(i,r>>8,PT_INSL) != PT_INSL) + { + if ((sim->elements[rt].Properties&PROP_CONDUCTS) && !(rt==PT_WATR||rt==PT_SLTW||rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR) && parts[r>>8].life==0 && abs(rx)+abs(ry) < 4) + { + parts[r>>8].life = 4; + parts[r>>8].ctype = rt; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + } + } + } + return 0; +} + + +Element_BTRY::~Element_BTRY() {} \ No newline at end of file diff --git a/src/simulation/elements/C5.cpp b/src/simulation/elements/C5.cpp new file mode 100644 index 0000000..8524f9b --- /dev/null +++ b/src/simulation/elements/C5.cpp @@ -0,0 +1,75 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_C5 PT_C5 130 +Element_C5::Element_C5() +{ + Identifier = "DEFAULT_PT_C5"; + Name = "C-5"; + Colour = PIXPACK(0x2050E0); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 88; + Description = "Cold explosive"; + + State = ST_SOLID; + Properties = TYPE_SOLID | PROP_NEUTPENETRATE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_C5::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_C5 static int update(UPDATE_FUNC_ARGS) +int Element_C5::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].temp<100)||(r&0xFF)==PT_HFLM) + { + if (1>rand()%6) + { + sim->part_change_type(i,x,y,PT_HFLM); + parts[r>>8].temp = parts[i].temp = 0; + parts[i].life = rand()%150+50; + sim->pv[y/CELL][x/CELL] += 1.5; + } + } + } + return 0; +} + + +Element_C5::~Element_C5() {} \ No newline at end of file diff --git a/src/simulation/elements/CAUS.cpp b/src/simulation/elements/CAUS.cpp new file mode 100644 index 0000000..b336f9e --- /dev/null +++ b/src/simulation/elements/CAUS.cpp @@ -0,0 +1,86 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_CAUS PT_CAUS 86 +Element_CAUS::Element_CAUS() +{ + Identifier = "DEFAULT_PT_CAUS"; + Name = "CAUS"; + Colour = PIXPACK(0x80FFA0); + MenuVisible = 1; + MenuSection = SC_GAS; + Enabled = 1; + + Advection = 2.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.99f; + Loss = 0.30f; + Collision = -0.1f; + Gravity = 0.0f; + Diffusion = 1.50f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 1; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Caustic Gas, acts like Acid"; + + State = ST_GAS; + Properties = TYPE_GAS|PROP_DEADLY; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_CAUS::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_CAUS static int update(UPDATE_FUNC_ARGS) +int Element_CAUS::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, trade, np; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxelements[r&0xFF].Hardness>(rand()%1000))&&parts[i].life>=50) + { + if (sim->parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid + { + float newtemp = ((60.0f-(float)sim->elements[r&0xFF].Hardness))*7.0f; + if(newtemp < 0){ + newtemp = 0; + } + parts[i].temp += newtemp; + parts[i].life--; + sim->kill_part(r>>8); + } + } + else if (parts[i].life<=50) + { + sim->kill_part(i); + return 1; + } + } + } + return 0; +} + + +Element_CAUS::~Element_CAUS() {} \ No newline at end of file diff --git a/src/simulation/elements/CBNW.cpp b/src/simulation/elements/CBNW.cpp new file mode 100644 index 0000000..4331750 --- /dev/null +++ b/src/simulation/elements/CBNW.cpp @@ -0,0 +1,153 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_CBNW PT_CBNW 82 +Element_CBNW::Element_CBNW() +{ + Identifier = "DEFAULT_PT_CBNW"; + Name = "BUBW"; + Colour = PIXPACK(0x2030D0); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 30; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 29; + Description = "Carbonated water. Conducts electricity. Freezes. Extinguishes fires."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 273.15f; + LowTemperatureTransition = PT_ICEI; + HighTemperature = 373.0f; + HighTemperatureTransition = PT_WTRV; + + Update = &Element_CBNW::update; + Graphics = &Element_CBNW::graphics; +} + +//#TPT-Directive ElementHeader Element_CBNW static int update(UPDATE_FUNC_ARGS) +int Element_CBNW::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, oldt; + oldt = parts[i].tmp; + if (sim->pv[y/CELL][x/CELL]<=3) + { + if(20>(rand()%80000)) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.5f; + } + else if(sim->pv[y/CELL][x/CELL]<=-0.5) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.5f; + } + } + if (parts[i].tmp>0) + parts[i].tmp--; + if(!(rand()%200)) + { + parts[i].tmp2 = rand()%40; + } else if(parts[i].tmp2!=20) { + parts[i].tmp2 -= (parts[i].tmp2>20)?1:-1; + } + if(oldt==1) + { + //Explode + if(rand()%4) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.2f; + } + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxelements[r&0xFF].Properties&TYPE_PART) && parts[i].tmp == 0 && 1>(rand()%250)) + { + //Start explode + parts[i].tmp = rand()%25;//(rand()%100)+50; + } + else if((sim->elements[r&0xFF].Properties&TYPE_SOLID) && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_GLAS && parts[i].tmp == 0 && (2-sim->pv[y/CELL][x/CELL])>(rand()%20000)) + { + if(rand()%2) + { + sim->part_change_type(i,x,y,PT_CO2); + parts[i].ctype = 5; + sim->pv[y/CELL][x/CELL] += 0.2f; + } + } + if ((r&0xFF)==PT_CBNW) + { + if(!parts[i].tmp && parts[r>>8].tmp) + { + parts[i].tmp = parts[r>>8].tmp; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[i].tmp--; + } + else if(parts[i].tmp && !parts[r>>8].tmp) + { + parts[r>>8].tmp = parts[i].tmp; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[r>>8].tmp++; + } + } + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + parts[i].ctype = PT_WATR; + } + if ((r&0xFF)==PT_FIRE && parts[r>>8].ctype!=PT_WATR){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_CBNW static int graphics(GRAPHICS_FUNC_ARGS) +int Element_CBNW::graphics(GRAPHICS_FUNC_ARGS) + +{ + int z = cpart->tmp2 - 20;//speckles! + *colr += z * 1; + *colg += z * 2; + *colb += z * 8; + return 0; +} + + +Element_CBNW::~Element_CBNW() {} \ No newline at end of file diff --git a/src/simulation/elements/CLNE.cpp b/src/simulation/elements/CLNE.cpp new file mode 100644 index 0000000..56839f0 --- /dev/null +++ b/src/simulation/elements/CLNE.cpp @@ -0,0 +1,83 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_CLNE PT_CLNE 9 +Element_CLNE::Element_CLNE() +{ + Identifier = "DEFAULT_PT_CLNE"; + Name = "CLNE"; + Colour = PIXPACK(0xFFD010); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Solid. Duplicates any particles it touches."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_CLNE::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_CLNE static int update(UPDATE_FUNC_ARGS) +int Element_CLNE::update(UPDATE_FUNC_ARGS) + { + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && + (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && + (r&0xFF)>8].ctype; + } + } + } + else { + if (parts[i].ctype==PT_LIFE) sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); + else sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + return 0; +} + + +Element_CLNE::~Element_CLNE() {} \ No newline at end of file diff --git a/src/simulation/elements/CLST.cpp b/src/simulation/elements/CLST.cpp new file mode 100644 index 0000000..3cab1f7 --- /dev/null +++ b/src/simulation/elements/CLST.cpp @@ -0,0 +1,101 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_CLST PT_CLST 155 +Element_CLST::Element_CLST() +{ + Identifier = "DEFAULT_PT_CLST"; + Name = "CLST"; + Colour = PIXPACK(0xE4A4A4); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.94f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.2f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 2; + Hardness = 2; + + Weight = 55; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Clay dust. Produces paste when mixed with water."; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1256.0f; + HighTemperatureTransition = PT_LAVA; + + Update = &Element_CLST::update; + Graphics = &Element_CLST::graphics; +} + +//#TPT-Directive ElementHeader Element_CLST static int update(UPDATE_FUNC_ARGS) +int Element_CLST::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + float cxy; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1500)) + { + sim->part_change_type(i,x,y,PT_PSTS); + sim->kill_part(r>>8); + } + if ((r&0xFF)==PT_NITR) + { + sim->create_part(i, x, y, PT_BANG); + sim->create_part(r>>8, x+rx, y+ry, PT_BANG); + } + if ((r&0xFF)==PT_CLST) + { + if(parts[i].temp <195) + cxy = 0.05; + if(parts[i].temp >= 195 && parts[i].temp <295) + cxy = 0.015; + if(parts[i].temp >= 295 && parts[i].temp <350) + cxy = 0.01; + if(parts[i].temp > 350) + cxy = 0.005; + parts[i].vx += cxy*rx; + parts[i].vy += cxy*ry;//These two can be set not to calculate over 350 later. They do virtually nothing over 0.005. + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_CLST static int graphics(GRAPHICS_FUNC_ARGS) +int Element_CLST::graphics(GRAPHICS_FUNC_ARGS) + +{ + int z = cpart->tmp - 5;//speckles! + *colr += z * 16; + *colg += z * 16; + *colb += z * 16; + return 0; +} + + +Element_CLST::~Element_CLST() {} \ No newline at end of file diff --git a/src/simulation/elements/CNCT.cpp b/src/simulation/elements/CNCT.cpp new file mode 100644 index 0000000..3ef0136 --- /dev/null +++ b/src/simulation/elements/CNCT.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_CNCT PT_CNCT 24 +Element_CNCT::Element_CNCT() +{ + Identifier = "DEFAULT_PT_CNCT"; + Name = "CNCT"; + Colour = PIXPACK(0xC0C0C0); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.94f; + Loss = 0.95f; + Collision = -0.1f; + Gravity = 0.3f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 2; + Hardness = 2; + + Weight = 55; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 100; + Description = "Concrete, stronger than stone."; + + State = ST_SOLID; + Properties = TYPE_PART|PROP_HOT_GLOW; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1123.0f; + HighTemperatureTransition = PT_LAVA; + + Update = NULL; + Graphics = NULL; +} + +Element_CNCT::~Element_CNCT() {} \ No newline at end of file diff --git a/src/simulation/elements/CO2.cpp b/src/simulation/elements/CO2.cpp new file mode 100644 index 0000000..2015883 --- /dev/null +++ b/src/simulation/elements/CO2.cpp @@ -0,0 +1,97 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_CO2 PT_CO2 80 +Element_CO2::Element_CO2() +{ + Identifier = "DEFAULT_PT_CO2"; + Name = "CO2"; + Colour = PIXPACK(0x666666); + MenuVisible = 1; + MenuSection = SC_GAS; + Enabled = 1; + + Advection = 2.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.99f; + Loss = 0.30f; + Collision = -0.1f; + Gravity = 0.1f; + Diffusion = 1.0f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 1; + + Temperature = R_TEMP+273.15f; + HeatConduct = 88; + Description = "Carbon Dioxide"; + + State = ST_GAS; + Properties = TYPE_GAS; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 194.65f; + LowTemperatureTransition = PT_DRIC; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_CO2::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_CO2 static int update(UPDATE_FUNC_ARGS) +int Element_CO2::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%40000)&&parts[i].ctype==5) + { + parts[i].ctype = 0; + sim->create_part(-3, x, y, PT_WATR); + } + if ((r>>8)>=NPART || !r) + continue; + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + if (((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW) && 1>(rand()%250)) + { + sim->part_change_type(i,x,y,PT_CBNW); + sim->kill_part(r>>8); + } + } + if (parts[i].temp > 9773.15 && sim->pv[y/CELL][x/CELL] > 200.0f) + { + if (rand()%5 < 1) + { + int j; + sim->kill_part(i); + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) parts[j].temp = 15000; + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) parts[j].temp = 15000; + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_O2); if (j != -1) parts[j].temp = 15000; + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_SING); if (j != -1) { parts[j].temp = 15000; parts[i].life = rand()%100+450; } + + parts[i].temp += 15000; + sim->pv[y/CELL][x/CELL] += 100; + } + } + return 0; +} + + +Element_CO2::~Element_CO2() {} \ No newline at end of file diff --git a/src/simulation/elements/COAL.cpp b/src/simulation/elements/COAL.cpp new file mode 100644 index 0000000..eae7450 --- /dev/null +++ b/src/simulation/elements/COAL.cpp @@ -0,0 +1,153 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_COAL PT_COAL 59 +Element_COAL::Element_COAL() +{ + Identifier = "DEFAULT_PT_COAL"; + Name = "COAL"; + Colour = PIXPACK(0x222222); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.0f; + HotAir = 0.0f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 200; + Description = "Solid. Burns slowly."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_COAL::update; + Graphics = &Element_COAL::graphics; +} + +//#TPT-Directive ElementHeader Element_COAL static int update(UPDATE_FUNC_ARGS) +int Element_COAL::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, trade, temp; + if (parts[i].life<=0) { + sim->create_part(i, x, y, PT_FIRE); + return 1; + } else if (parts[i].life < 100) { + parts[i].life--; + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); + } + if ((sim->pv[y/CELL][x/CELL] > 4.3f)&&parts[i].tmp>40) + parts[i].tmp=39; + else if (parts[i].tmp<40&&parts[i].tmp>0) + parts[i].tmp--; + else if (parts[i].tmp<=0) { + sim->create_part(i, x, y, PT_BCOL); + return 1; + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) + { + if (parts[i].life>100) { + parts[i].life = 99; + } + } + if ((r&0xFF)==PT_LAVA && 1>(rand()%500)) + { + if (parts[r>>8].ctype == PT_IRON) { + parts[r>>8].ctype = PT_METL; + sim->kill_part(i); + return 1; + } + } + } + /*if(100-parts[i].life > parts[i].tmp2) + parts[i].tmp2 = 100-parts[i].life; + if(parts[i].tmp2 < 0) parts[i].tmp2 = 0; + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion + { + int temp = parts[i].tmp2 - parts[r>>8].tmp2; + if(temp < 10) + continue; + if (temp ==1) + { + parts[r>>8].tmp2 ++; + parts[i].tmp2 --; + } + else if (temp>0) + { + parts[r>>8].tmp2 += temp/2; + parts[i].tmp2 -= temp/2; + } + } + } + }*/ + if(parts[i].temp > parts[i].tmp2) + parts[i].tmp2 = parts[i].temp; + return 0; +} + + +//#TPT-Directive ElementHeader Element_COAL static int graphics(GRAPHICS_FUNC_ARGS) +int Element_COAL::graphics(GRAPHICS_FUNC_ARGS) + //Both COAL and Broken Coal +{ + *colr += (cpart->tmp2-295.15f)/3; + + if (*colr > 170) + *colr = 170; + if (*colr < *colg) + *colr = *colg; + + *colg = *colb = *colr; + + if((cpart->temp-295.15f) > 300.0f-200.0f) + { + float frequency = 3.1415/(2*300.0f-(300.0f-200.0f)); + int q = ((cpart->temp-295.15f)>300.0f)?300.0f-(300.0f-200.0f):(cpart->temp-295.15f)-(300.0f-200.0f); + + *colr += sin(frequency*q) * 226; + *colg += sin(frequency*q*4.55 +3.14) * 34; + *colb += sin(frequency*q*2.22 +3.14) * 64; + } + return 0; +} + + + +Element_COAL::~Element_COAL() {} \ No newline at end of file diff --git a/src/simulation/elements/CONV.cpp b/src/simulation/elements/CONV.cpp new file mode 100644 index 0000000..82e0594 --- /dev/null +++ b/src/simulation/elements/CONV.cpp @@ -0,0 +1,96 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_CONV PT_CONV 85 +Element_CONV::Element_CONV() +{ + Identifier = "DEFAULT_PT_CONV"; + Name = "CONV"; + Colour = PIXPACK(0x0AAB0A); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Solid. Converts whatever touches it into its ctype."; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_CONV::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_CONV static int update(UPDATE_FUNC_ARGS) +int Element_CONV::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && + (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && + (r&0xFF)!=PT_CONV && (r&0xFF)>8].ctype; + } + } + } + else if(parts[i].ctype>0 && parts[i].ctype=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if((r&0xFF)!=PT_CONV && (r&0xFF)!=parts[i].ctype) + { + if (parts[i].ctype==PT_LIFE) sim->create_part(r>>8, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); + else sim->create_part(r>>8, x+rx, y+ry, parts[i].ctype); + } + } + } + return 0; +} + + +Element_CONV::~Element_CONV() {} \ No newline at end of file diff --git a/src/simulation/elements/DESL.cpp b/src/simulation/elements/DESL.cpp new file mode 100644 index 0000000..6401b3c --- /dev/null +++ b/src/simulation/elements/DESL.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_DESL PT_DESL 58 +Element_DESL::Element_DESL() +{ + Identifier = "DEFAULT_PT_DESL"; + Name = "DESL"; + Colour = PIXPACK(0x440000); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 1.0f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.0f; + HotAir = 0.0f * CFDS; + Falldown = 2; + + Flammable = 2; + Explosive = 0; + Meltable = 0; + Hardness = 5; + + Weight = 15; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 42; + Description = "Liquid. Explodes under high pressure and temperatures"; + + State = ST_LIQUID; + Properties = TYPE_LIQUID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 5.0f; + HighPressureTransition = PT_FIRE; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 335.0f; + HighTemperatureTransition = PT_FIRE; + + Update = NULL; + Graphics = NULL; +} + +Element_DESL::~Element_DESL() {} \ No newline at end of file diff --git a/src/simulation/elements/DEST.cpp b/src/simulation/elements/DEST.cpp new file mode 100644 index 0000000..a4f7891 --- /dev/null +++ b/src/simulation/elements/DEST.cpp @@ -0,0 +1,121 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_DEST PT_DEST 89 +Element_DEST::Element_DEST() +{ + Identifier = "DEFAULT_PT_DEST"; + Name = "DEST"; + Colour = PIXPACK(0xFF3311); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = -0.05f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.95f; + Loss = 0.95f; + Collision = -0.1f; + Gravity = 0.4f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 101; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 150; + Description = "More destructive Bomb."; + + State = ST_SOLID; + Properties = TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_DEST::update; + Graphics = &Element_DEST::graphics; +} + +//#TPT-Directive ElementHeader Element_DEST static int update(UPDATE_FUNC_ARGS) +int Element_DEST::update(UPDATE_FUNC_ARGS) + { + int r,rx,ry,topv; + rx=rand()%5-2; + ry=rand()%5-2; + + r = pmap[y+ry][x+rx]; + if (!r || (r&0xFF)==PT_DEST || (r&0xFF)==PT_DMND || (r&0xFF)==PT_BCLN || (r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN || (r&0xFF)==PT_PBCN) + return 0; + + if (parts[i].life<=0 || parts[i].life>37) + { + parts[i].life=30+rand()%20; + parts[i].temp+=20000; + sim->pv[y/CELL][x/CELL]+=60.0f; + } + parts[i].temp+=10000; + if ((r&0xFF)==PT_PLUT || (r&0xFF)==PT_DEUT) + { + sim->pv[y/CELL][x/CELL]+=20.0f; + parts[i].temp+=18000; + if (rand()%2==0) + { + float orig_temp = parts[r>>8].temp; + sim->create_part(r>>8, x+rx, y+ry, PT_NEUT); + parts[r>>8].temp = restrict_flt(orig_temp+40000.0f, MIN_TEMP, MAX_TEMP); + sim->pv[y/CELL][x/CELL] += 10.0f; + parts[i].life-=4; + } + } + else if ((r&0xFF)==PT_INSL) + { + sim->create_part(r>>8, x+rx, y+ry, PT_PLSM); + } + else if (rand()%3==0) + { + sim->kill_part(r>>8); + parts[i].life -= 4*((sim->elements[r&0xFF].Properties&TYPE_SOLID)?3:1); + if (parts[i].life<=0) + parts[i].life=1; + parts[i].temp+=10000; + } + else + { + if (sim->elements[r&0xFF].HeatConduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+10000.0f, MIN_TEMP, MAX_TEMP); + } + topv=sim->pv[y/CELL][x/CELL]/9+parts[r>>8].temp/900; + if (topv>40.0f) + topv=40.0f; + sim->pv[y/CELL][x/CELL]+=40.0f+topv; + parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); + return 0; +} + + +//#TPT-Directive ElementHeader Element_DEST static int graphics(GRAPHICS_FUNC_ARGS) +int Element_DEST::graphics(GRAPHICS_FUNC_ARGS) + +{ + if(cpart->life) + { + *pixel_mode |= PMODE_LFLARE; + } + else + { + *pixel_mode |= PMODE_SPARK; + } + return 0; +} + + +Element_DEST::~Element_DEST() {} \ No newline at end of file diff --git a/src/simulation/elements/DEUT.cpp b/src/simulation/elements/DEUT.cpp new file mode 100644 index 0000000..b8209e4 --- /dev/null +++ b/src/simulation/elements/DEUT.cpp @@ -0,0 +1,149 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_DEUT PT_DEUT 95 +Element_DEUT::Element_DEUT() +{ + Identifier = "DEFAULT_PT_DEUT"; + Name = "DEUT"; + Colour = PIXPACK(0x00153F); + MenuVisible = 1; + MenuSection = SC_NUCLEAR; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 31; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 251; + Description = "Deuterium oxide. Volume changes with temp, radioactive with neutrons."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_NEUTPENETRATE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_DEUT::update; + Graphics = &Element_DEUT::graphics; +} + +//#TPT-Directive ElementHeader Element_DEUT static int update(UPDATE_FUNC_ARGS) +int Element_DEUT::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, trade, np; + float gravtot = fabs(sim->gravy[(y/CELL)*(XRES/CELL)+(x/CELL)])+fabs(sim->gravx[(y/CELL)*(XRES/CELL)+(x/CELL)]); + int maxlife = ((10000/(parts[i].temp + 1))-1); + if ((10000%((int)parts[i].temp+1))>rand()%((int)parts[i].temp+1)) + maxlife ++; + // Compress when Newtonian gravity is applied + // multiplier=1 when gravtot=0, multiplier -> 5 as gravtot -> inf + maxlife = maxlife*(5.0f - 8.0f/(gravtot+2.0f)); + if (parts[i].life < maxlife) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=maxlife)) + continue; + if ((r&0xFF)==PT_DEUT&&33>=rand()/(RAND_MAX/100)+1) + { + if ((parts[i].life + parts[r>>8].life + 1) <= maxlife) + { + parts[i].life += parts[r>>8].life + 1; + sim->kill_part(r>>8); + } + } + } + } + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create deut + { + np = sim->create_part(-1,x+rx,y+ry,PT_DEUT); + if (np<0) continue; + parts[i].life--; + parts[np].temp = parts[i].temp; + parts[np].life = 0; + } + } + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].life)&&parts[i].life>0)//diffusion + { + int temp = parts[i].life - parts[r>>8].life; + if (temp ==1) + { + parts[r>>8].life ++; + parts[i].life --; + } + else if (temp>0) + { + parts[r>>8].life += temp/2; + parts[i].life -= temp/2; + } + } + } + } + return 0; +} + + + +//#TPT-Directive ElementHeader Element_DEUT static int graphics(GRAPHICS_FUNC_ARGS) +int Element_DEUT::graphics(GRAPHICS_FUNC_ARGS) + +{ + if(cpart->life>=700) + { + *firea = 60; + *firer = *colr += cpart->life*1; + *fireg = *colg += cpart->life*2; + *fireb = *colb += cpart->life*3; + *pixel_mode |= PMODE_GLOW | FIRE_ADD; + } + else + { + *colr += cpart->life*1; + *colg += cpart->life*2; + *colb += cpart->life*3; + *pixel_mode |= PMODE_BLUR; + } + return 0; +} + + +Element_DEUT::~Element_DEUT() {} \ No newline at end of file diff --git a/src/simulation/elements/DLAY.cpp b/src/simulation/elements/DLAY.cpp new file mode 100644 index 0000000..0ac76c5 --- /dev/null +++ b/src/simulation/elements/DLAY.cpp @@ -0,0 +1,111 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_DLAY PT_DLAY 79 +Element_DLAY::Element_DLAY() +{ + Identifier = "DEFAULT_PT_DLAY"; + Name = "DLAY"; + Colour = PIXPACK(0x753590); + MenuVisible = 1; + MenuSection = SC_POWERED; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = 4.0f+273.15f; + HeatConduct = 0; + Description = "Conducts with temperature-dependent delay. (use HEAT/COOL)."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_DLAY::update; + Graphics = &Element_DLAY::graphics; +} + +//#TPT-Directive ElementHeader Element_DLAY static int update(UPDATE_FUNC_ARGS) +int Element_DLAY::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, oldl; + oldl = parts[i].life; + if (parts[i].life>0) + parts[i].life--; + //if (parts[i].life==1) + //{ + if (parts[i].temp>=MAX_TEMP+273.15f) + parts[i].temp = MAX_TEMP+273.15f; + if (parts[i].temp<= 1.0f+273.15f) + parts[i].temp = 1.0f+273.15f; + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxparts_avg(r>>8, i,PT_INSL)==PT_INSL) + continue; + if ((r&0xFF)==PT_SPRK && parts[i].life==0 && parts[r>>8].life>0 && parts[r>>8].life<4 && parts[r>>8].ctype==PT_PSCN) + { + parts[i].life = (int)(parts[i].temp-273.15); + } + else if ((r&0xFF)==PT_DLAY) + { + if(!parts[i].life && parts[r>>8].life) + { + parts[i].life = parts[r>>8].life; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[i].life--; + } + else if(parts[i].life && !parts[r>>8].life) + { + parts[r>>8].life = parts[i].life; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[r>>8].life++; + } + } + else if((r&0xFF)==PT_NSCN && oldl==1) + { + sim->create_part(-1, x+rx, y+ry, PT_SPRK); + } + } + //} + return 0; +} + + +//#TPT-Directive ElementHeader Element_DLAY static int graphics(GRAPHICS_FUNC_ARGS) +int Element_DLAY::graphics(GRAPHICS_FUNC_ARGS) + +{ + int stage = (int)(((float)cpart->life/(cpart->temp-273.15))*100.0f); + *colr += stage; + *colg += stage; + *colb += stage; + return 0; +} + + +Element_DLAY::~Element_DLAY() {} \ No newline at end of file diff --git a/src/simulation/elements/DMND.cpp b/src/simulation/elements/DMND.cpp new file mode 100644 index 0000000..fe158f8 --- /dev/null +++ b/src/simulation/elements/DMND.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_DMND PT_DMND 28 +Element_DMND::Element_DMND() +{ + Identifier = "DEFAULT_PT_DMND"; + Name = "DMND"; + Colour = PIXPACK(0xCCFFFF); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 186; + Description = "Diamond. Indestructible."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_DMND::~Element_DMND() {} \ No newline at end of file diff --git a/src/simulation/elements/DRIC.cpp b/src/simulation/elements/DRIC.cpp new file mode 100644 index 0000000..7112bbc --- /dev/null +++ b/src/simulation/elements/DRIC.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_DRIC PT_DRIC 81 +Element_DRIC::Element_DRIC() +{ + Identifier = "DEFAULT_PT_DRIC"; + Name = "DRIC"; + Colour = PIXPACK(0xE0E0E0); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = -0.0005f* CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 100; + + Temperature = 172.65f; + HeatConduct = 2; + Description = "Dry Ice."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 195.65f; + HighTemperatureTransition = PT_CO2; + + Update = NULL; + Graphics = NULL; +} + +Element_DRIC::~Element_DRIC() {} \ No newline at end of file diff --git a/src/simulation/elements/DSTW.cpp b/src/simulation/elements/DSTW.cpp new file mode 100644 index 0000000..c04bf5b --- /dev/null +++ b/src/simulation/elements/DSTW.cpp @@ -0,0 +1,90 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_DSTW PT_DSTW 25 +Element_DSTW::Element_DSTW() +{ + Identifier = "DEFAULT_PT_DSTW"; + Name = "DSTW"; + Colour = PIXPACK(0x1020C0); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 30; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 23; + Description = "Distilled water, does not conduct electricity."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_NEUTPENETRATE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 273.15f; + LowTemperatureTransition = PT_ICEI; + HighTemperature = 373.0f; + HighTemperatureTransition = PT_WTRV; + + Update = &Element_DSTW::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_DSTW static int update(UPDATE_FUNC_ARGS) +int Element_DSTW::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) + { + sim->part_change_type(i,x,y,PT_SLTW); + sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); + } + if (((r&0xFF)==PT_WATR||(r&0xFF)==PT_SLTW) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_WATR); + } + if ((r&0xFF)==PT_SLTW && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_SLTW); + } + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>12.0f) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + } + return 0; +} + + +Element_DSTW::~Element_DSTW() {} \ No newline at end of file diff --git a/src/simulation/elements/DUST.cpp b/src/simulation/elements/DUST.cpp new file mode 100644 index 0000000..353bfbd --- /dev/null +++ b/src/simulation/elements/DUST.cpp @@ -0,0 +1,76 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_DUST PT_DUST 1 +Element_DUST::Element_DUST() +{ + Identifier = "DEFAULT_PT_DUST"; + Name = "DUST"; + Colour = PIXPACK(0xFFE0A0); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.96f; + Loss = 0.80f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 10; + Explosive = 0; + Meltable = 0; + Hardness = 30; + + Weight = 85; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Very light dust. Flammable."; + + State = ST_SOLID; + Properties = TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = &Element_DUST::graphics; +} + +//#TPT-Directive ElementHeader Element_DUST static int graphics(GRAPHICS_FUNC_ARGS) +int Element_DUST::graphics(GRAPHICS_FUNC_ARGS) + +{ + if(cpart->life >= 1) + { + *firea = 120; + *firer = *colr = cpart->flags; + *fireg = *colg = cpart->tmp; + *fireb = *colb = cpart->ctype; + if (ren->decorations_enable && cpart->dcolour) + { + int a = (cpart->dcolour>>24)&0xFF; + *firer = *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; + *fireg = *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; + *fireb = *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; + } + *pixel_mode |= PMODE_GLOW | FIRE_ADD; + /**firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb;*/ + } + return 0; +} + + +Element_DUST::~Element_DUST() {} \ No newline at end of file diff --git a/src/simulation/elements/DYST.cpp b/src/simulation/elements/DYST.cpp new file mode 100644 index 0000000..5db167f --- /dev/null +++ b/src/simulation/elements/DYST.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_DYST PT_DYST 64 +Element_DYST::Element_DYST() +{ + Identifier = "DEFAULT_PT_DYST"; + Name = "DYST"; + Colour = PIXPACK(0xBBB0A0); + MenuVisible = 0; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.96f; + Loss = 0.80f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 20; + Explosive = 0; + Meltable = 0; + Hardness = 30; + + Weight = 80; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Dead Yeast."; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 473.0f; + HighTemperatureTransition = PT_DUST; + + Update = NULL; + Graphics = NULL; +} + +Element_DYST::~Element_DYST() {} \ No newline at end of file diff --git a/src/simulation/elements/ELEC.cpp b/src/simulation/elements/ELEC.cpp new file mode 100644 index 0000000..16bad1a --- /dev/null +++ b/src/simulation/elements/ELEC.cpp @@ -0,0 +1,156 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_ELEC PT_ELEC 136 +Element_ELEC::Element_ELEC() +{ + Identifier = "DEFAULT_PT_ELEC"; + Name = "ELEC"; + Colour = PIXPACK(0xDFEFFF); + MenuVisible = 1; + MenuSection = SC_NUCLEAR; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 1.00f; + Collision = -0.99f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = -1; + + Temperature = R_TEMP+200.0f+273.15f; + HeatConduct = 251; + Description = "Electrons"; + + State = ST_GAS; + Properties = TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_ELEC::update; + Graphics = &Element_ELEC::graphics; +} + +//#TPT-Directive ElementHeader Element_ELEC static int update(UPDATE_FUNC_ARGS) +int Element_ELEC::update(UPDATE_FUNC_ARGS) + { + int r, rt, rx, ry, nb, rrx, rry; + float rr, rrr; + parts[i].pavg[0] = x; + parts[i].pavg[1] = y; + if(pmap[y][x]==PT_GLOW) + { + sim->part_change_type(i, x, y, PT_PHOT); + } + for (rx=-2; rx<=2; rx++) + for (ry=-2; ry<=2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)==PT_GLAS) + { + //fire_r[y/CELL][x/CELL] += rand()%200; //D: Doesn't work with OpenGL, also shouldn't be here TODO: FIX THIS SHIT + //fire_g[y/CELL][x/CELL] += rand()%200; + //fire_b[y/CELL][x/CELL] += rand()%200; + for (rrx=-1; rrx<=1; rrx++) + { + for (rry=-1; rry<=1; rry++) + { + if (x+rx+rrx>=0 && y+ry+rry>=0 && x+rx+rrxcreate_part(-1, x+rx+rrx, y+ry+rry, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 1; + parts[nb].life = 50; + parts[nb].temp = 400.0f; + parts[nb].vx = rand()%20-10; + parts[nb].vy = rand()%20-10; + } + } + } + } + sim->kill_part(i); + return 1; + } + if ((r&0xFF)==PT_LCRY) + { + parts[r>>8].tmp2 = 5+rand()%5; + } + if ((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_CBNW) + { + if(rand()%2) + { + sim->create_part(r>>8, x+rx, y+ry, PT_H2); + sim->part_change_type(i, x, y, PT_O2); + parts[i].life = 0; + parts[i].ctype = 0; + return 1; + } + else + { + sim->create_part(r>>8, x+rx, y+ry, PT_O2); + sim->part_change_type(i, x, y, PT_H2); + parts[i].life = 0; + parts[i].ctype = 0; + return 1; + } + } + if ((r&0xFF)==PT_NEUT) + { + sim->part_change_type(r>>8, x+rx, y+ry, PT_H2); + parts[r>>8].life = 0; + parts[r>>8].ctype = 0; + } + if ((r&0xFF)==PT_DEUT) + { + if(parts[r>>8].life < 6000) + parts[r>>8].life += 1; + parts[r>>8].temp = 0; + parts[i].temp = 0; + sim->kill_part(i); + return 1; + } + if ((sim->elements[r&0xFF].Properties & PROP_CONDUCTS) && ((r&0xFF)!=PT_H2||parts[i].tmp!=1)) + { + sim->create_part(-1, x+rx, y+ry, PT_SPRK); + sim->kill_part(i); + return 1; + } + } + return 0; +} + + + +//#TPT-Directive ElementHeader Element_ELEC static int graphics(GRAPHICS_FUNC_ARGS) +int Element_ELEC::graphics(GRAPHICS_FUNC_ARGS) + +{ + *firea = 70; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode |= FIRE_ADD; + return 0; +} + + +Element_ELEC::~Element_ELEC() {} \ No newline at end of file diff --git a/src/simulation/elements/EMP.cpp b/src/simulation/elements/EMP.cpp new file mode 100644 index 0000000..175e7e7 --- /dev/null +++ b/src/simulation/elements/EMP.cpp @@ -0,0 +1,183 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_EMP PT_EMP 134 +Element_EMP::Element_EMP() +{ + Identifier = "DEFAULT_PT_EMP"; + Name = "EMP"; + Colour = PIXPACK(0x66AAFF); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.0f; + HotAir = 0.0f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 3; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 121; + Description = "Breaks activated electronics."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_EMP::update; + Graphics = &Element_EMP::graphics; +} + +//#TPT-Directive ElementHeader Element_EMP static int update(UPDATE_FUNC_ARGS) +int Element_EMP::update(UPDATE_FUNC_ARGS) + { + int r,rx,ry,ok=0,t,n,nx,ny; + if (parts[i].life) + return 0; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rx>8].life>0 && parts[r>>8].life<4) + { + ok=1; + break; + } + } + if (!ok) + return 0; + parts[i].life=220; + //emp_decor+=3; TODO: Fix + //if (emp_decor>40) + // emp_decor=40; + for (r=0; r<=sim->parts_lastActiveIndex; r++) + { + t=parts[r].type; + rx=parts[r].x; + ry=parts[r].y; + if (t==PT_SPRK || (t==PT_SWCH && parts[r].life!=0 && parts[r].life!=10) || (t==PT_WIRE && parts[r].ctype>0)) + { + int is_elec=0; + if ((parts[r].ctype==PT_PSCN || parts[r].ctype==PT_NSCN || parts[r].ctype==PT_PTCT || + parts[r].ctype==PT_NTCT || parts[r].ctype==PT_INST || parts[r].ctype==PT_SWCH) || t==PT_WIRE || t==PT_SWCH) + { + is_elec=1; + if (sim->elements[parts[r].type].HeatConduct && rand()%100==0) + parts[r].temp = restrict_flt(parts[r].temp+3000.0f, MIN_TEMP, MAX_TEMP); + if (rand()%80==0) + sim->part_change_type(r, rx, ry, PT_BREC); + else if (rand()%120==0) + sim->part_change_type(r, rx, ry, PT_NTCT); + } + + for (nx=-2; nx<3; nx++) + for (ny=-2; ny<3; ny++) + if (rx+nx>=0 && ry+ny>=0 && rx+nx>8, rx+nx, ry+ny, PT_PLSM); + parts[n>>8].life=rand()%100+70; + parts[n>>8].temp+=3000; + }*/ + + //Some elements should only be affected by wire/swch, or by a spark on inst/semiconductor + //So not affected by spark on metl, watr etc + if (is_elec) + { + if (((n&0xFF)==PT_METL || (n&0xFF)==PT_BMTL) && rand()%280==0) + { + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+3000.0f, MIN_TEMP, MAX_TEMP); + } + if ((n&0xFF)==PT_BMTL && rand()%160==0) + { + sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BMTL);//TODO: Redundant, was this meant to be BRMT or something? + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); + } + if ((n&0xFF)==PT_METL && rand()%300==0) + { + sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BMTL); + } + if ((n&0xFF)==PT_WIFI && rand()%8==0) + { + //Randomise channel + parts[n>>8].temp = rand()%MAX_TEMP; + } + if ((n&0xFF)==PT_WIFI && rand()%16==0) + { + sim->create_part(n>>8, rx+nx, ry+ny, PT_BREC); + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); + } + } + if ((n&0xFF)==PT_SWCH && rand()%100==0) + { + sim->part_change_type(n>>8, rx+nx, ry+ny, PT_BREC); + } + if ((n&0xFF)==PT_SWCH && rand()%100==0) + { + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+2000.0f, MIN_TEMP, MAX_TEMP); + } + if ((n&0xFF)==PT_ARAY && rand()%60==0) + { + sim->create_part(n>>8, rx+nx, ry+ny, PT_BREC); + parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); + } + if (t==PT_DLAY && rand()%70==0) + { + //Randomise delay + parts[n>>8].temp = (rand()%256) + 273.15f; + } + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_EMP static int graphics(GRAPHICS_FUNC_ARGS) +int Element_EMP::graphics(GRAPHICS_FUNC_ARGS) + +{ + if(cpart->life) + { + *colr = cpart->life*1.5; + *colg = cpart->life*1.5; + *colb = 200-(cpart->life); + if (*colr>255) + *colr = 255; + if (*colg>255) + *colg = 255; + if (*colb>255) + *colb = 255; + if (*colb<=0) + *colb = 0; + } + return 0; +} + + +Element_EMP::~Element_EMP() {} \ No newline at end of file diff --git a/src/simulation/elements/ETRD.cpp b/src/simulation/elements/ETRD.cpp new file mode 100644 index 0000000..b3eacfb --- /dev/null +++ b/src/simulation/elements/ETRD.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_ETRD PT_ETRD 50 +Element_ETRD::Element_ETRD() +{ + Identifier = "DEFAULT_PT_ETRD"; + Name = "ETRD"; + Colour = PIXPACK(0x404040); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)"; + + State = ST_NONE; + Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_ETRD::~Element_ETRD() {} \ No newline at end of file diff --git a/src/simulation/elements/Element.cpp b/src/simulation/elements/Element.cpp new file mode 100644 index 0000000..44e7251 --- /dev/null +++ b/src/simulation/elements/Element.cpp @@ -0,0 +1,69 @@ +#include "simulation/Elements.h" + +Element::Element(): + Identifier("DEFAULT_INVALID"), + Name(""), + Colour(PIXPACK(0xFFFFFF)), + MenuVisible(0), + MenuSection(0), + Enabled(0), + + Advection(0.0f), + AirDrag(-0.0f * CFDS), + AirLoss(1.0f), + Loss(1.0f), + Collision(0.0f), + Gravity(0.0f), + Diffusion(0.0f), + HotAir(0.0f * CFDS), + Falldown(0), + + Flammable(0), + Explosive(0), + Meltable(0), + Hardness(30), + + Weight(50), + + Temperature(273.15f), + HeatConduct(128), + Description("No description"), + + State(ST_SOLID), + Properties(TYPE_SOLID), + + LowPressure(IPL), + LowPressureTransition(NT), + HighPressure(IPH), + HighPressureTransition(NT), + LowTemperature(ITL), + LowTemperatureTransition(NT), + HighTemperature(ITH), + HighTemperatureTransition(NT), + + Update(NULL), + Graphics(&Element::defaultGraphics) +{ +} + +int Element::defaultGraphics(GRAPHICS_FUNC_ARGS) +{ + int t = cpart->type; + //Property based defaults + if(ren->sim->elements[t].Properties & PROP_RADIOACTIVE) *pixel_mode |= PMODE_GLOW; + if(ren->sim->elements[t].Properties & TYPE_LIQUID) + { + *pixel_mode |= PMODE_BLUR; + } + if(ren->sim->elements[t].Properties & TYPE_GAS) + { + *pixel_mode &= ~PMODE; + *pixel_mode |= FIRE_BLEND; + *firer = *colr/2; + *fireg = *colg/2; + *fireb = *colb/2; + *firea = 125; + *pixel_mode |= DECO_FIRE; + } + return 1; +} \ No newline at end of file diff --git a/src/simulation/elements/Element.h b/src/simulation/elements/Element.h new file mode 100644 index 0000000..b584506 --- /dev/null +++ b/src/simulation/elements/Element.h @@ -0,0 +1,56 @@ +#ifndef ELEMENTCLASS_H +#define ELEMENTCLASS_H + +#include "simulation/Simulation.h" +#include "Renderer.h" +#include "simulation/Elements.h" + +class Simulation; +class Renderer; +struct Particle; +class Element +{ +public: + char *Identifier; + char *Name; + pixel Colour; + float Advection; + float AirDrag; + float AirLoss; + float Loss; + float Collision; + float Gravity; + float Diffusion; + float HotAir; + int Falldown; + int Flammable; + int Explosive; + int Meltable; + int Hardness; + int MenuVisible; + int Enabled; + int Weight; + int MenuSection; + float Temperature; + unsigned char HeatConduct; + char *Description; + char State; + unsigned int Properties; + int (*Update) (UPDATE_FUNC_ARGS); + int (*Graphics) (GRAPHICS_FUNC_ARGS); + + float HighPressure; + int HighPressureTransition; + float LowPressure; + int LowPressureTransition; + float HighTemperature; + int HighTemperatureTransition; + float LowTemperature; + int LowTemperatureTransition; + + Element(); + virtual ~Element() {} + static int defaultGraphics(GRAPHICS_FUNC_ARGS); +}; + +#endif \ No newline at end of file diff --git a/src/simulation/elements/FIGH.cpp b/src/simulation/elements/FIGH.cpp new file mode 100644 index 0000000..a28060e --- /dev/null +++ b/src/simulation/elements/FIGH.cpp @@ -0,0 +1,162 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_FIGH PT_FIGH 158 +Element_FIGH::Element_FIGH() +{ + Identifier = "DEFAULT_PT_FIGH"; + Name = "FIGH"; + Colour = PIXPACK(0x000000); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.5f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.2f; + Loss = 1.0f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.0f; + HotAir = 0.00f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 50; + + Temperature = R_TEMP+14.6f+273.15f; + HeatConduct = 0; + Description = "Fighter. Tries to kill stickmen."; + + State = ST_NONE; + Properties = 0; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 620.0f; + HighTemperatureTransition = PT_FIRE; + + Update = &Element_FIGH::update; + Graphics = &Element_FIGH::graphics; +} + +//#TPT-Directive ElementHeader Element_FIGH static int update(UPDATE_FUNC_ARGS) +int Element_FIGH::update(UPDATE_FUNC_ARGS) + +{ + playerst* figh = &sim->fighters[(unsigned char)parts[i].tmp]; + + unsigned int tarx, tary; + + parts[i].tmp2 = 0; //0 - stay in place, 1 - seek a stick man + + //Set target cords + if (sim->player.spwn && sim->player2.spwn) + { + if ((pow((float)sim->player.legs[2]-x, 2) + pow((float)sim->player.legs[3]-y, 2))<= + (pow((float)sim->player2.legs[2]-x, 2) + pow((float)sim->player2.legs[3]-y, 2))) + { + tarx = (unsigned int)sim->player.legs[2]; + tary = (unsigned int)sim->player.legs[3]; + } + else + { + tarx = (unsigned int)sim->player2.legs[2]; + tary = (unsigned int)sim->player2.legs[3]; + } + parts[i].tmp2 = 1; + } + else + { + if (sim->player.spwn) + { + tarx = (unsigned int)sim->player.legs[2]; + tary = (unsigned int)sim->player.legs[3]; + parts[i].tmp2 = 1; + } + if (sim->player2.spwn) + { + tarx = (unsigned int)sim->player2.legs[2]; + tary = (unsigned int)sim->player2.legs[3]; + parts[i].tmp2 = 1; + } + } + + switch (parts[i].tmp2) + { + case 1: + if ((pow(float(tarx-x), 2) + pow(float(tary-y), 2))<600) + { + if (figh->elem == PT_LIGH || figh->elem == PT_NEUT + || sim->elements[figh->elem].Properties&(PROP_DEADLY|PROP_RADIOACTIVE) + || sim->elements[figh->elem].Temperature>=323 || sim->elements[figh->elem].Temperature<=243) + figh->comm = (int)figh->comm | 0x08; + } + else + if (tarxeval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+6, NULL) + && sim->eval_move(PT_DUST, figh->legs[4]-10, figh->legs[5]+3, NULL))) + figh->comm = 0x01; + else + figh->comm = 0x02; + + if (!sim->eval_move(PT_DUST, figh->legs[4]-4, figh->legs[5]-1, NULL) + || !sim->eval_move(PT_DUST, figh->legs[12]-4, figh->legs[13]-1, NULL) + || sim->eval_move(PT_DUST, 2*figh->legs[4]-figh->legs[6], figh->legs[5]+5, NULL)) + figh->comm = (int)figh->comm | 0x04; + } + else + { + if (!(sim->eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+6, NULL) + && sim->eval_move(PT_DUST, figh->legs[12]+10, figh->legs[13]+3, NULL))) + figh->comm = 0x02; + else + figh->comm = 0x01; + + if (!sim->eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL) + || !sim->eval_move(PT_DUST, figh->legs[4]+4, figh->legs[5]-1, NULL) + || sim->eval_move(PT_DUST, 2*figh->legs[12]-figh->legs[14], figh->legs[13]+5, NULL)) + figh->comm = (int)figh->comm | 0x04; + } + break; + default: + figh->comm = 0; + break; + } + + figh->pcomm = figh->comm; + + Element_STKM::run_stickman(figh, UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + + + +//#TPT-Directive ElementHeader Element_FIGH static int graphics(GRAPHICS_FUNC_ARGS) +int Element_FIGH::graphics(GRAPHICS_FUNC_ARGS) + +{ + playerst * cplayer;// = &sim->fighters[(unsigned char)cpart->tmp]; + *pixel_mode = PSPEC_STICKMAN; + /*if (cplayer->elemelements[cplayer->elem].pcolors); + *colg = PIXG(sim->elements[cplayer->elem].pcolors); + *colb = PIXB(sim->elements[cplayer->elem].pcolors); + } + else*/ + { + *colr = *colg = *colb = 255; + } + return 1; +} + + +Element_FIGH::~Element_FIGH() {} \ No newline at end of file diff --git a/src/simulation/elements/FILT.cpp b/src/simulation/elements/FILT.cpp new file mode 100644 index 0000000..c978690 --- /dev/null +++ b/src/simulation/elements/FILT.cpp @@ -0,0 +1,77 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_FILT PT_FILT 125 +Element_FILT::Element_FILT() +{ + Identifier = "DEFAULT_PT_FILT"; + Name = "FILT"; + Colour = PIXPACK(0x000056); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Filter for photons, changes the color."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = &Element_FILT::graphics; +} + +//#TPT-Directive ElementHeader Element_FILT static int graphics(GRAPHICS_FUNC_ARGS) +int Element_FILT::graphics(GRAPHICS_FUNC_ARGS) + +{ + int x, temp_bin = (int)((cpart->temp-273.0f)*0.025f); + if (temp_bin < 0) temp_bin = 0; + if (temp_bin > 25) temp_bin = 25; + cpart->ctype = 0x1F << temp_bin; + *colg = 0; + *colb = 0; + *colr = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *cola = 127; + *colr *= x; + *colg *= x; + *colb *= x; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_BLEND; + return 0; +} + + +Element_FILT::~Element_FILT() {} \ No newline at end of file diff --git a/src/simulation/elements/FIRE.cpp b/src/simulation/elements/FIRE.cpp new file mode 100644 index 0000000..0a98149 --- /dev/null +++ b/src/simulation/elements/FIRE.cpp @@ -0,0 +1,202 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_FIRE PT_FIRE 4 +Element_FIRE::Element_FIRE() +{ + Identifier = "DEFAULT_PT_FIRE"; + Name = "FIRE"; + Colour = PIXPACK(0xFF1000); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.9f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.97f; + Loss = 0.20f; + Collision = 0.0f; + Gravity = -0.1f; + Diffusion = 0.00f; + HotAir = 0.001f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 2; + + Temperature = R_TEMP+400.0f+273.15f; + HeatConduct = 88; + Description = "Ignites flammable materials. Heats air."; + + State = ST_GAS; + Properties = TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 2773.0f; + HighTemperatureTransition = PT_PLSM; + + Update = &Element_FIRE::update; + Graphics = &Element_FIRE::graphics; +} + +//#TPT-Directive ElementHeader Element_FIRE static int update(UPDATE_FUNC_ARGS) +int Element_FIRE::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, rt, t = parts[i].type; + if (t==PT_PLSM&&parts[i].ctype == PT_NBLE&&parts[i].life <=1) + { + t = PT_NBLE; + sim->part_change_type(i,x,y,t); + parts[i].life = 0; + } + if(t==PT_FIRE && parts[i].life <=1) + { + if (parts[i].tmp==3){ + t = PT_DSTW; + sim->part_change_type(i,x,y,t); + parts[i].life = 0; + parts[i].ctype = PT_FIRE; + } + else if (parts[i].temp<625) + { + t = PT_SMKE; + sim->part_change_type(i,x,y,t); + parts[i].life = rand()%20+250; + } + } + if(t==PT_PLSM && parts[i].life <=1) + { + if (parts[i].tmp==3){ + t = PT_DSTW; + sim->part_change_type(i,x,y,t); + parts[i].life = 0; + parts[i].ctype = PT_FIRE; + } + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL] && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_STREAM) + continue; + rt = parts[r>>8].type; + if ((surround_space || sim->elements[rt].Explosive) && + (t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL)) && + (t!=PT_PHOT || rt!=PT_INSL) && + (rt!=PT_SPNG || parts[r>>8].life==0) && + (rt!=PT_H2 || (parts[r>>8].temp < 2273.15 && sim->pv[y/CELL][x/CELL] < 50.0f)) && + sim->elements[rt].Flammable && (sim->elements[rt].Flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000)) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE); + parts[r>>8].temp = restrict_flt(sim->elements[PT_FIRE].Temperature + (sim->elements[rt].Flammable/2), MIN_TEMP, MAX_TEMP); + parts[r>>8].life = rand()%80+180; + parts[r>>8].tmp = parts[r>>8].ctype = 0; + if (sim->elements[rt].Explosive) + sim->pv[y/CELL][x/CELL] += 0.25f * CFDS; + } + } + if (sim->legacy_enable) updateLegacy(UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + +//#TPT-Directive ElementHeader Element_FIRE static int updateLegacy(UPDATE_FUNC_ARGS) +int Element_FIRE::updateLegacy(UPDATE_FUNC_ARGS) { + int r, rx, ry, rt, lpv, t = parts[i].type; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL] && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_STREAM) + continue; + rt = r&0xFF; + lpv = (int)sim->pv[(y+ry)/CELL][(x+rx)/CELL]; + if (lpv < 1) lpv = 1; + if (t!=PT_SPRK && sim->elements[rt].Meltable && ((rt!=PT_RBDM && rt!=PT_LRBD) || t!=PT_SPRK) && ((t!=PT_FIRE&&t!=PT_PLSM) || (rt!=PT_METL && rt!=PT_IRON && rt!=PT_ETRD && rt!=PT_PSCN && rt!=PT_NSCN && rt!=PT_NTCT && rt!=PT_PTCT && rt!=PT_BMTL && rt!=PT_BRMT && rt!=PT_SALT && rt!=PT_INWR)) && + sim->elements[rt].Meltable*lpv>(rand()%1000)) + { + if (t!=PT_LAVA || parts[i].life>0) + { + parts[r>>8].ctype = (rt==PT_BRMT)?PT_BMTL:parts[r>>8].type; + parts[r>>8].ctype = (parts[r>>8].ctype==PT_SAND)?PT_GLAS:parts[r>>8].ctype; + sim->part_change_type(r>>8,x+rx,y+ry,PT_LAVA); + parts[r>>8].life = rand()%120+240; + } + else + { + parts[i].life = 0; + t = parts[i].type = (parts[i].ctype)?parts[i].ctype:PT_STNE; + parts[i].ctype = PT_NONE;//rt; + sim->part_change_type(i,x,y,t); + return 1; + } + } + if (t!=PT_SPRK && (rt==PT_ICEI || rt==PT_SNOW)) + { + parts[r>>8].type = PT_WATR; + if (t==PT_FIRE) + { + sim->kill_part(i); + return 1; + } + if (t==PT_LAVA) + { + parts[i].life = 0; + t = parts[i].type = PT_STNE; + sim->part_change_type(i,x,y,t); + } + } + if (t!=PT_SPRK && (rt==PT_WATR || rt==PT_DSTW || rt==PT_SLTW)) + { + sim->kill_part(r>>8); + if (t==PT_FIRE) + { + sim->kill_part(i); + return 1; + } + if (t==PT_LAVA) + { + parts[i].life = 0; + t = parts[i].type = (parts[i].ctype)?parts[i].ctype:PT_STNE; + parts[i].ctype = PT_NONE; + sim->part_change_type(i,x,y,t); + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_FIRE static int graphics(GRAPHICS_FUNC_ARGS) +int Element_FIRE::graphics(GRAPHICS_FUNC_ARGS) + +{ + int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = (unsigned char)ren->flm_data[caddress]; + *colg = (unsigned char)ren->flm_data[caddress+1]; + *colb = (unsigned char)ren->flm_data[caddress+2]; + + *firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + return 0; +} + +Element_FIRE::~Element_FIRE() {} \ No newline at end of file diff --git a/src/simulation/elements/FIRW.cpp b/src/simulation/elements/FIRW.cpp new file mode 100644 index 0000000..a23d013 --- /dev/null +++ b/src/simulation/elements/FIRW.cpp @@ -0,0 +1,154 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_FIRW PT_FIRW 69 +Element_FIRW::Element_FIRW() +{ + Identifier = "DEFAULT_PT_FIRW"; + Name = "FIRW"; + Colour = PIXPACK(0xFFA040); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.96f; + Loss = 0.80f; + Collision = -0.99f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 30; + + Weight = 55; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Fireworks!"; + + State = ST_SOLID; + Properties = TYPE_PART|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_FIRW::update; + Graphics = &Element_FIRW::graphics; +} + +//#TPT-Directive ElementHeader Element_FIRW static int update(UPDATE_FUNC_ARGS) +int Element_FIRW::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, rt, np; + if (parts[i].tmp==0) { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + if (rt==PT_FIRE||rt==PT_PLSM||rt==PT_THDR) + { + parts[i].tmp = 1; + parts[i].life = rand()%50+60; + } + } + } + else if (parts[i].tmp==1) { + if (parts[i].life==0) { + parts[i].tmp=2; + } else { + float newVel = parts[i].life/25; + parts[i].flags &= ~FLAG_STAGNANT; + /* TODO: + if ((pmap[(int)(ly-newVel)][(int)lx]&0xFF)==PT_NONE && ly-newVel>0) { + parts[i].vy = -newVel; + ly-=newVel; + iy-=newVel; + }*/ + parts[i].vy = -newVel; + } + } + else if (parts[i].tmp==2) { + int col = rand()%200+4; + int tmul; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+rx, y+ry, PT_FIRW); + if (np>-1) + { + parts[np].vx = (rand()%3-1)*tmul; + parts[np].vy = (rand()%3-1)*tmul; + parts[np].tmp = col; + parts[np].life = rand()%100+100; + parts[np].temp = 6000.0f; + parts[np].dcolour = parts[i].dcolour; + } + } + sim->pv[y/CELL][x/CELL] += 20; + sim->kill_part(i); + return 1; + } else if (parts[i].tmp>=3) { + if (parts[i].life<=0) { + sim->kill_part(i); + return 1; + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_FIRW static int graphics(GRAPHICS_FUNC_ARGS) +int Element_FIRW::graphics(GRAPHICS_FUNC_ARGS) + +{ + if(cpart->tmp>=3) + { + int caddress = restrict_flt(restrict_flt((float)(cpart->tmp-4), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = 0;//(unsigned char)firw_data[caddress]; + *colg = 0;//(unsigned char)firw_data[caddress+1]; + *colb = 0;//(unsigned char)firw_data[caddress+2]; + + if (ren->decorations_enable && cpart->dcolour) + { + int a = (cpart->dcolour>>24)&0xFF; + *colr = (a*((cpart->dcolour>>16)&0xFF) + (255-a)**colr) >> 8; + *colg = (a*((cpart->dcolour>>8)&0xFF) + (255-a)**colg) >> 8; + *colb = (a*((cpart->dcolour)&0xFF) + (255-a)**colb) >> 8; + } + + *firea = cpart->life*4; + if(*firea > 240) + *firea = 240; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + } + else if(cpart->tmp > 0) + { + *pixel_mode |= PMODE_GLOW; + } + return 0; +} + + +Element_FIRW::~Element_FIRW() {} \ No newline at end of file diff --git a/src/simulation/elements/FOG.cpp b/src/simulation/elements/FOG.cpp new file mode 100644 index 0000000..ca2beb4 --- /dev/null +++ b/src/simulation/elements/FOG.cpp @@ -0,0 +1,73 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_FOG PT_FOG 92 +Element_FOG::Element_FOG() +{ + Identifier = "DEFAULT_PT_FOG"; + Name = "FOG"; + Colour = PIXPACK(0xAAAAAA); + MenuVisible = 1; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.8f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.4f; + Loss = 0.70f; + Collision = -0.1f; + Gravity = 0.0f; + Diffusion = 0.99f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 30; + + Weight = 1; + + Temperature = 243.15f; + HeatConduct = 100; + Description = "Not quite Steam"; + + State = ST_GAS; + Properties = TYPE_GAS|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 373.15f; + HighTemperatureTransition = PT_WTRV; + + Update = &Element_FOG::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_FOG static int update(UPDATE_FUNC_ARGS) +int Element_FOG::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxelements[r&0xFF].State==ST_SOLID&&5>=rand()%50&&parts[i].life==0&&!((r&0xFF)==PT_CLNE||(r&0xFF)==PT_PCLN)) // TODO: should this also exclude BCLN? + { + sim->part_change_type(i,x,y,PT_RIME); + } + if ((r&0xFF)==PT_SPRK) + { + parts[i].life += rand()%20; + } + } + return 0; +} + + +Element_FOG::~Element_FOG() {} \ No newline at end of file diff --git a/src/simulation/elements/FRAY.cpp b/src/simulation/elements/FRAY.cpp new file mode 100644 index 0000000..b81db07 --- /dev/null +++ b/src/simulation/elements/FRAY.cpp @@ -0,0 +1,80 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_FRAY PT_FRAY 159 +Element_FRAY::Element_FRAY() +{ + Identifier = "DEFAULT_PT_FRAY"; + Name = "FRAY"; + Colour = PIXPACK(0x00BBFF); + MenuVisible = 1; + MenuSection = SC_FORCE; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = 20.0f+0.0f +273.15f; + HeatConduct = 0; + Description = "Force Emitter. Push or pull objects based on temp value, use like ARAY"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_FRAY::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_FRAY static int update(UPDATE_FUNC_ARGS) +int Element_FRAY::update(UPDATE_FUNC_ARGS) + { + int r, nxx, nyy, docontinue, len, nxi, nyi, rx, ry, nr, ry1, rx1; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx= 0 && y+nyi+nyy >= 0) || len>10) { + break; + } + r = pmap[y+nyi+nyy][x+nxi+nxx]; + if (!r) + r = sim->photons[y+nyi+nyy][x+nxi+nxx]; + + if (r && !(sim->elements[r&0xFF].Properties & TYPE_SOLID)){ + parts[r>>8].vx += nxi*((parts[i].temp-273.15)/10.0f); + parts[r>>8].vy += nyi*((parts[i].temp-273.15)/10.0f); + } + } + } + } + return 0; +} + + +Element_FRAY::~Element_FRAY() {} \ No newline at end of file diff --git a/src/simulation/elements/FRZW.cpp b/src/simulation/elements/FRZW.cpp new file mode 100644 index 0000000..5c124b4 --- /dev/null +++ b/src/simulation/elements/FRZW.cpp @@ -0,0 +1,81 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_FRZW PT_FRZW 101 +Element_FRZW::Element_FRZW() +{ + Identifier = "DEFAULT_PT_FRZW"; + Name = "FRZW"; + Colour = PIXPACK(0x1020C0); + MenuVisible = 1; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 30; + + Temperature = 120.0f; + HeatConduct = 29; + Description = "FREEZE WATER"; + + State = ST_LIQUID; + Properties = TYPE_LIQUID||PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 53.0f; + HighTemperatureTransition = PT_ICEI; + + Update = &Element_FRZW::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_FRZW static int update(UPDATE_FUNC_ARGS) +int Element_FRZW::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%70) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FRZW); + } + } + if (parts[i].life==0&&13>rand()%2500) + { + sim->part_change_type(i,x,y,PT_ICEI); + parts[i].ctype=PT_FRZW; + parts[i].temp = restrict_flt(parts[i].temp-200.0f, MIN_TEMP, MAX_TEMP); + } + else if ((100-(parts[i].life))>rand()%50000) + { + sim->part_change_type(i,x,y,PT_ICEI); + parts[i].ctype=PT_FRZW; + parts[i].temp = restrict_flt(parts[i].temp-200.0f, MIN_TEMP, MAX_TEMP); + } + return 0; +} + + +Element_FRZW::~Element_FRZW() {} \ No newline at end of file diff --git a/src/simulation/elements/FRZZ.cpp b/src/simulation/elements/FRZZ.cpp new file mode 100644 index 0000000..14d2f1a --- /dev/null +++ b/src/simulation/elements/FRZZ.cpp @@ -0,0 +1,76 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_FRZZ PT_FRZZ 100 +Element_FRZZ::Element_FRZZ() +{ + Identifier = "DEFAULT_PT_FRZZ"; + Name = "FRZZ"; + Colour = PIXPACK(0xC0E0FF); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.96f; + Loss = 0.90f; + Collision = -0.1f; + Gravity = 0.05f; + Diffusion = 0.01f; + HotAir = -0.00005f* CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 50; + + Temperature = 90.0f; + HeatConduct = 46; + Description = "FREEZE"; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_FRZZ::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_FRZZ static int update(UPDATE_FUNC_ARGS) +int Element_FRZZ::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%100) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_FRZW); + parts[r>>8].life = 100; + parts[i].type = PT_NONE; + } + + } + if (parts[i].type==PT_NONE) { + sim->kill_part(i); + return 1; + } + return 0; +} + + +Element_FRZZ::~Element_FRZZ() {} \ No newline at end of file diff --git a/src/simulation/elements/FSEP.cpp b/src/simulation/elements/FSEP.cpp new file mode 100644 index 0000000..80b10f4 --- /dev/null +++ b/src/simulation/elements/FSEP.cpp @@ -0,0 +1,86 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_FSEP PT_FSEP 71 +Element_FSEP::Element_FSEP() +{ + Identifier = "DEFAULT_PT_FSEP"; + Name = "FSEP"; + Colour = PIXPACK(0x63AD5F); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.96f; + Loss = 0.80f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 30; + + Weight = 70; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Fuse Powder. See FUSE."; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_FSEP::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_FSEP static int update(UPDATE_FUNC_ARGS) +int Element_FSEP::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + if (parts[i].life<=0) { + r = sim->create_part(i, x, y, PT_PLSM); + if (r!=-1) + parts[r].life = 50; + return 1; + } else if (parts[i].life < 40) { + parts[i].life--; + if ((rand()%10)==0) { + r = sim->create_part(-1, (rx=x+rand()%3-1), (ry=y+rand()%3-1), PT_PLSM); + if (r!=-1) + parts[r].life = 50; + } + } + else { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=(273.15+400.0f))) && 1>(rand()%15)) + { + if (parts[i].life>40) { + parts[i].life = 39; + } + } + } + } + return 0; +} + + +Element_FSEP::~Element_FSEP() {} \ No newline at end of file diff --git a/src/simulation/elements/FUSE.cpp b/src/simulation/elements/FUSE.cpp new file mode 100644 index 0000000..e066afa --- /dev/null +++ b/src/simulation/elements/FUSE.cpp @@ -0,0 +1,92 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_FUSE PT_FUSE 70 +Element_FUSE::Element_FUSE() +{ + Identifier = "DEFAULT_PT_FUSE"; + Name = "FUSE"; + Colour = PIXPACK(0x0A5706); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.0f; + HotAir = 0.0f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 200; + Description = "Solid. Burns slowly. Ignites at somewhat high temperatures and electricity."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_FUSE::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_FUSE static int update(UPDATE_FUNC_ARGS) +int Element_FUSE::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + if (parts[i].life<=0) { + r = sim->create_part(i, x, y, PT_PLSM); + if (r!=-1) + parts[r].life = 50; + return 1; + } else if (parts[i].life < 40) { + parts[i].life--; + if ((rand()%100)==0) { + r = sim->create_part(-1, (rx=x+rand()%3-1), (ry=y+rand()%3-1), PT_PLSM); + if (r!=-1) + parts[r].life = 50; + } + } + if ((sim->pv[y/CELL][x/CELL] > 2.7f)&&parts[i].tmp>40) + parts[i].tmp=39; + else if (parts[i].tmp<40&&parts[i].tmp>0) + parts[i].tmp--; + else if (parts[i].tmp<=0) { + sim->create_part(i, x, y, PT_FSEP); + return 1; + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=(273.15+700.0f)) && 1>(rand()%20))) + { + if (parts[i].life>40) { + parts[i].life = 39; + } + } + } + return 0; +} + + +Element_FUSE::~Element_FUSE() {} \ No newline at end of file diff --git a/src/simulation/elements/FWRK.cpp b/src/simulation/elements/FWRK.cpp new file mode 100644 index 0000000..6876447 --- /dev/null +++ b/src/simulation/elements/FWRK.cpp @@ -0,0 +1,104 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_FWRK PT_FWRK 98 +Element_FWRK::Element_FWRK() +{ + Identifier = "DEFAULT_PT_FWRK"; + Name = "FWRK"; + Colour = PIXPACK(0x666666); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.99f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.4f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 97; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 100; + Description = "First fireworks made, activated by heat/neutrons."; + + State = ST_SOLID; + Properties = TYPE_PART|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_FWRK::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_FWRK static int update(UPDATE_FUNC_ARGS) +int Element_FWRK::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, np; + if ((parts[i].temp>400&&(9+parts[i].temp/40)>rand()%100000&&parts[i].life==0&&!pmap[y-1][x])||parts[i].ctype==PT_DUST) + { + np = sim->create_part(-1, x , y-1 , PT_FWRK); + if (np!=-1) + { + parts[np].vy = rand()%8-22; + parts[np].vx = rand()%20-rand()%20; + parts[np].life=rand()%15+25; + parts[np].dcolour = parts[i].dcolour; + sim->kill_part(i); + return 1; + } + } + if (parts[i].life>=45) + parts[i].life=0; + if ((parts[i].life<3&&parts[i].life>0)||(parts[i].vy>6&&parts[i].life>0)) + { + int q = (rand()%255+1); + int w = (rand()%255+1); + int e = (rand()%255+1); + for (rx=-1; rx<2; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=rand()%8) + { + if (!pmap[y+ry][x+rx]) + { + np = sim->create_part(-1, x+rx, y+ry , PT_DUST); + sim->pv[y/CELL][x/CELL] += 2.00f*CFDS; + if (np!=-1) + { + parts[np].vy = -(rand()%10-1); + parts[np].vx = ((rand()%2)*2-1)*rand()%(5+5)+(parts[i].vx)*2 ; + parts[np].life= rand()%37+18; + parts[np].tmp=q; + parts[np].tmp2=w; + parts[np].ctype=e; + parts[np].temp= rand()%20+6000; + parts[np].dcolour = parts[i].dcolour; + } + } + } + } + sim->kill_part(i); + return 1; + } + return 0; +} + + +Element_FWRK::~Element_FWRK() {} \ No newline at end of file diff --git a/src/simulation/elements/GAS.cpp b/src/simulation/elements/GAS.cpp new file mode 100644 index 0000000..3c406a9 --- /dev/null +++ b/src/simulation/elements/GAS.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_GAS PT_GAS 10 +Element_GAS::Element_GAS() +{ + Identifier = "DEFAULT_PT_GAS"; + Name = "GAS"; + Colour = PIXPACK(0xE0FF20); + MenuVisible = 1; + MenuSection = SC_GAS; + Enabled = 1; + + Advection = 1.0f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.99f; + Loss = 0.30f; + Collision = -0.1f; + Gravity = 0.0f; + Diffusion = 0.75f; + HotAir = 0.001f * CFDS; + Falldown = 0; + + Flammable = 600; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 1; + + Temperature = R_TEMP+2.0f +273.15f; + HeatConduct = 42; + Description = "Gas. Diffuses. Flammable. Liquefies under pressure."; + + State = ST_GAS; + Properties = TYPE_GAS; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 6.0f; + HighPressureTransition = PT_OIL; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 573.0f; + HighTemperatureTransition = PT_FIRE; + + Update = NULL; + Graphics = NULL; +} + +Element_GAS::~Element_GAS() {} \ No newline at end of file diff --git a/src/simulation/elements/GBMB.cpp b/src/simulation/elements/GBMB.cpp new file mode 100644 index 0000000..827f062 --- /dev/null +++ b/src/simulation/elements/GBMB.cpp @@ -0,0 +1,93 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_GBMB PT_GBMB 157 +Element_GBMB::Element_GBMB() +{ + Identifier = "DEFAULT_PT_GBMB"; + Name = "GBMB"; + Colour = PIXPACK(0x1144BB); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 30; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 29; + Description = "Sticks to first object it touches then produces strong gravity push."; + + State = ST_NONE; + Properties = TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_GBMB::update; + Graphics = &Element_GBMB::graphics; +} + +//#TPT-Directive ElementHeader Element_GBMB static int update(UPDATE_FUNC_ARGS) +int Element_GBMB::update(UPDATE_FUNC_ARGS) + { + int rx,ry,r; + if (parts[i].life<=0) + { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + { + r = pmap[y+ry][x+rx]; + if(!r) + continue; + if((r&0xFF)!=PT_BOMB && (r&0xFF)!=PT_GBMB && + (r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_DMND) + { + parts[i].life=60; + break; + } + } + } + if(parts[i].life>20) + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = 20; + if(parts[i].life<20 && parts[i].life>=1) + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = -80; + return 0; +} + + +//#TPT-Directive ElementHeader Element_GBMB static int graphics(GRAPHICS_FUNC_ARGS) +int Element_GBMB::graphics(GRAPHICS_FUNC_ARGS) + +{ + if (cpart->life <= 0) { + *pixel_mode |= PMODE_FLARE; + } + else + { + *pixel_mode |= PMODE_SPARK; + } + return 0; +} + + +Element_GBMB::~Element_GBMB() {} \ No newline at end of file diff --git a/src/simulation/elements/GEL.cpp b/src/simulation/elements/GEL.cpp new file mode 100644 index 0000000..2d3baeb --- /dev/null +++ b/src/simulation/elements/GEL.cpp @@ -0,0 +1,123 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_GEL PT_GEL 142 +Element_GEL::Element_GEL() +{ + Identifier = "DEFAULT_PT_GEL"; + Name = "GEL"; + Colour = PIXPACK(0xFF9900); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 35; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 29; + Description = "Gel. A liquid with variable viscosity and heat conductivity"; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_LIFE_DEC|PROP_NEUTPENETRATE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_GEL::update; + Graphics = &Element_GEL::graphics; +} + +//#TPT-Directive ElementHeader Element_GEL static int update(UPDATE_FUNC_ARGS) +int Element_GEL::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxkill_part(r>>8); + } + + char gel = 0; + if ((r&0xFF)==PT_GEL) + gel = 1; + + //Concentration diffusion + if (gel && (parts[r>>8].tmp+1)>8].tmp++; + parts[i].tmp--; + } + + if ((r&0xFF)==PT_SPNG && (parts[r>>8].life+1)>8].life++; + parts[i].tmp--; + } + + float dx, dy; + dx = parts[i].x - parts[r>>8].x; + dy = parts[i].y - parts[r>>8].y; + + //Stickness + if ((dx*dx + dy*dy)>1.5 && (gel || !sim->elements[r&0xFF].Falldown || (fabs(rx)<2 && fabs(ry)<2))) + { + float per, nd; + nd = dx*dx + dy*dy - 0.5; + + per = 5*(1 - parts[i].tmp/100)*(nd/(dx*dx + dy*dy + nd) - 0.5); + if (sim->elements[r&0xFF].State==ST_LIQUID) + per *= 0.1; + + dx *= per; dy *= per; + parts[i].vx += dx; parts[r>>8].vx -= dx; + parts[i].vy += dy; parts[r>>8].vy -= dy; + } + } + return 0; +} + + + +//#TPT-Directive ElementHeader Element_GEL static int graphics(GRAPHICS_FUNC_ARGS) +int Element_GEL::graphics(GRAPHICS_FUNC_ARGS) + +{ + int q = cpart->tmp; + *colr = q*(32-255)/120+255; + *colg = q*(48-186)/120+186; + *colb = q*208/120; + return 0; +} + + + +Element_GEL::~Element_GEL() {} \ No newline at end of file diff --git a/src/simulation/elements/GLAS.cpp b/src/simulation/elements/GLAS.cpp new file mode 100644 index 0000000..58fc55d --- /dev/null +++ b/src/simulation/elements/GLAS.cpp @@ -0,0 +1,62 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_GLAS PT_GLAS 45 +Element_GLAS::Element_GLAS() +{ + Identifier = "DEFAULT_PT_GLAS"; + Name = "GLAS"; + Colour = PIXPACK(0x404040); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 150; + Description = "Solid. Meltable. Shatters under pressure"; + + State = ST_SOLID; + Properties = TYPE_SOLID | PROP_NEUTPASS | PROP_HOT_GLOW | PROP_SPARKSETTLE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1973.0f; + HighTemperatureTransition = PT_LAVA; + + Update = &Element_GLAS::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_GLAS static int update(UPDATE_FUNC_ARGS) +int Element_GLAS::update(UPDATE_FUNC_ARGS) + { + parts[i].pavg[0] = parts[i].pavg[1]; + parts[i].pavg[1] = sim->pv[y/CELL][x/CELL]; + if (parts[i].pavg[1]-parts[i].pavg[0] > 0.25f || parts[i].pavg[1]-parts[i].pavg[0] < -0.25f) + { + sim->part_change_type(i,x,y,PT_BGLA); + } + return 0; +} + + +Element_GLAS::~Element_GLAS() {} \ No newline at end of file diff --git a/src/simulation/elements/GLOW.cpp b/src/simulation/elements/GLOW.cpp new file mode 100644 index 0000000..775e188 --- /dev/null +++ b/src/simulation/elements/GLOW.cpp @@ -0,0 +1,96 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_GLOW PT_GLOW 66 +Element_GLOW::Element_GLOW() +{ + Identifier = "DEFAULT_PT_GLOW"; + Name = "GLOW"; + Colour = PIXPACK(0x445464); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.3f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.98f; + Loss = 0.80f; + Collision = 0.0f; + Gravity = 0.15f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 2; + + Weight = 40; + + Temperature = R_TEMP+20.0f+273.15f; + HeatConduct = 44; + Description = "Glow, Glows under pressure"; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_GLOW::update; + Graphics = &Element_GLOW::graphics; +} + +//#TPT-Directive ElementHeader Element_GLOW static int update(UPDATE_FUNC_ARGS) +int Element_GLOW::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%2000)) + { + parts[i].type = PT_NONE; + sim->part_change_type(r>>8,x+rx,y+ry,PT_DEUT); + parts[r>>8].life = 10; + } + } + parts[i].ctype = sim->pv[y/CELL][x/CELL]*16; + + parts[i].tmp = abs((int)((sim->vx[y/CELL][x/CELL]+sim->vy[y/CELL][x/CELL])*16.0f)) + abs((int)((parts[i].vx+parts[i].vy)*64.0f)); + //printf("%f %f\n", parts[i].vx, parts[i].vy); + if (parts[i].type==PT_NONE) { + sim->kill_part(i); + return 1; + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_GLOW static int graphics(GRAPHICS_FUNC_ARGS) +int Element_GLOW::graphics(GRAPHICS_FUNC_ARGS) + +{ + *firer = restrict_flt(cpart->temp-(275.13f+32.0f), 0, 128)/50.0f; + *fireg = restrict_flt(cpart->ctype, 0, 128)/50.0f; + *fireb = restrict_flt(cpart->tmp, 0, 128)/50.0f; + + *colr = restrict_flt(64.0f+cpart->temp-(275.13f+32.0f), 0, 255); + *colg = restrict_flt(64.0f+cpart->ctype, 0, 255); + *colb = restrict_flt(64.0f+cpart->tmp, 0, 255); + + *pixel_mode |= FIRE_ADD; + return 0; +} + + +Element_GLOW::~Element_GLOW() {} \ No newline at end of file diff --git a/src/simulation/elements/GOO.cpp b/src/simulation/elements/GOO.cpp new file mode 100644 index 0000000..c0ea21b --- /dev/null +++ b/src/simulation/elements/GOO.cpp @@ -0,0 +1,64 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_GOO PT_GOO 12 +Element_GOO::Element_GOO() +{ + Identifier = "DEFAULT_PT_GOO"; + Name = "GOO"; + Colour = PIXPACK(0x804000); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.97f; + Loss = 0.50f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 12; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 75; + Description = "Solid. Deforms and disappears under pressure."; + + State = ST_SOLID; + Properties = TYPE_SOLID | PROP_NEUTPENETRATE|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_GOO::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_GOO static int update(UPDATE_FUNC_ARGS) +int Element_GOO::update(UPDATE_FUNC_ARGS) + { + if (!parts[i].life && sim->pv[y/CELL][x/CELL]>1.0f) + parts[i].life = rand()%80+300; + if (parts[i].life) + { + float advection = 0.1f; + parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; + parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; + } + return 0; +} + + +Element_GOO::~Element_GOO() {} \ No newline at end of file diff --git a/src/simulation/elements/GPMP.cpp b/src/simulation/elements/GPMP.cpp new file mode 100644 index 0000000..d36579c --- /dev/null +++ b/src/simulation/elements/GPMP.cpp @@ -0,0 +1,96 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_GPMP PT_GPMP 154 +Element_GPMP::Element_GPMP() +{ + Identifier = "DEFAULT_PT_GPMP"; + Name = "GPMP"; + Colour = PIXPACK(0x0A3B3B); + MenuVisible = 1; + MenuSection = SC_POWERED; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = 0.0f +273.15f; + HeatConduct = 0; + Description = "Changes gravity to its temp when activated. (use HEAT/COOL)."; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_GPMP::update; + Graphics = &Element_GPMP::graphics; +} + +//#TPT-Directive ElementHeader Element_GPMP static int update(UPDATE_FUNC_ARGS) +int Element_GPMP::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (parts[i].life==10) + { + if (parts[i].temp>=256.0+273.15) + parts[i].temp=256.0+273.15; + if (parts[i].temp<= -256.0+273.15) + parts[i].temp = -256.0+273.15; + + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] = 0.2f*(parts[i].temp-273.15); + if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp-273.15)) + sim->gravmap[(y/CELL+1)*(XRES/CELL)+(x/CELL)] += 0.1f*((parts[i].temp-273.15)-sim->gravmap[(y/CELL+1)*(XRES/CELL)+(x/CELL)]); + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_GPMP static int graphics(GRAPHICS_FUNC_ARGS) +int Element_GPMP::graphics(GRAPHICS_FUNC_ARGS) + +{ + int lifemod = ((cpart->life>10?10:cpart->life)*19); + *colg += lifemod; + *colb += lifemod; + return 0; +} + + +Element_GPMP::~Element_GPMP() {} \ No newline at end of file diff --git a/src/simulation/elements/GRAV.cpp b/src/simulation/elements/GRAV.cpp new file mode 100644 index 0000000..ea8ff4d --- /dev/null +++ b/src/simulation/elements/GRAV.cpp @@ -0,0 +1,101 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_GRAV PT_GRAV 102 +Element_GRAV::Element_GRAV() +{ + Identifier = "DEFAULT_PT_GRAV"; + Name = "GRAV"; + Colour = PIXPACK(0xFFE0A0); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 1.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 10; + Explosive = 0; + Meltable = 0; + Hardness = 30; + + Weight = 85; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Very light dust. Changes colour based on velocity."; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_GRAV::update; + Graphics = &Element_GRAV::graphics; +} + +//#TPT-Directive ElementHeader Element_GRAV static int update(UPDATE_FUNC_ARGS) +int Element_GRAV::update(UPDATE_FUNC_ARGS) + { + /*int t = parts[i].type; + if (t==PT_LOVE) + ISLOVE=1; + else if (t==PT_LOLZ) + ISLOLZ=1; + else if (t==PT_GRAV) + ISGRAV=1;*/ + return 0; +} + + +//#TPT-Directive ElementHeader Element_GRAV static int graphics(GRAPHICS_FUNC_ARGS) +int Element_GRAV::graphics(GRAPHICS_FUNC_ARGS) + +{ + int GRAV_R, GRAV_B, GRAV_G, GRAV_R2, GRAV_B2, GRAV_G2; + *colr = 20; + *colg = 20; + *colb = 20; + if (cpart->vx>0) + { + *colr += (cpart->vx)*GRAV_R; + *colg += (cpart->vx)*GRAV_G; + *colb += (cpart->vx)*GRAV_B; + } + if (cpart->vy>0) + { + *colr += (cpart->vy)*GRAV_G; + *colg += (cpart->vy)*GRAV_B; + *colb += (cpart->vy)*GRAV_R; + + } + if (cpart->vx<0) + { + *colr -= (cpart->vx)*GRAV_B; + *colg -= (cpart->vx)*GRAV_R; + *colb -= (cpart->vx)*GRAV_G; + + } + if (cpart->vy<0) + { + *colr -= (cpart->vy)*GRAV_R2; + *colg -= (cpart->vy)*GRAV_G2; + *colb -= (cpart->vy)*GRAV_B2; + } + return 0; +} + + +Element_GRAV::~Element_GRAV() {} \ No newline at end of file diff --git a/src/simulation/elements/GUNP.cpp b/src/simulation/elements/GUNP.cpp new file mode 100644 index 0000000..fd5334c --- /dev/null +++ b/src/simulation/elements/GUNP.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_GUNP PT_GUNP 7 +Element_GUNP::Element_GUNP() +{ + Identifier = "DEFAULT_PT_GUNP"; + Name = "GUN"; + Colour = PIXPACK(0xC0C0D0); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.94f; + Loss = 0.80f; + Collision = -0.1f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 600; + Explosive = 1; + Meltable = 0; + Hardness = 10; + + Weight = 85; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 97; + Description = "Light dust. Explosive."; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 673.0f; + HighTemperatureTransition = PT_FIRE; + + Update = NULL; + Graphics = NULL; +} + +Element_GUNP::~Element_GUNP() {} \ No newline at end of file diff --git a/src/simulation/elements/H2.cpp b/src/simulation/elements/H2.cpp new file mode 100644 index 0000000..a75fd13 --- /dev/null +++ b/src/simulation/elements/H2.cpp @@ -0,0 +1,118 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_H2 PT_H2 148 +Element_H2::Element_H2() +{ + Identifier = "DEFAULT_PT_H2"; + Name = "HYGN"; + Colour = PIXPACK(0x5070FF); + MenuVisible = 1; + MenuSection = SC_GAS; + Enabled = 1; + + Advection = 2.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.99f; + Loss = 0.30f; + Collision = -0.10f; + Gravity = 0.00f; + Diffusion = 3.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 1; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Combines with O2 to make WATR"; + + State = ST_GAS; + Properties = TYPE_GAS; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_H2::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_H2 static int update(UPDATE_FUNC_ARGS) +int Element_H2::update(UPDATE_FUNC_ARGS) + +{ + int r,rx,ry,rt; + if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f) + parts[i].tmp = 1; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxpv[y/CELL][x/CELL] > 8.0f && rt == PT_DESL) // This will not work. DESL turns to fire above 5.0 pressure + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_WATR); + sim->part_change_type(i,x,y,PT_OIL); + } + if (parts[r>>8].temp > 2273.15)// && pv[y/CELL][x/CELL] > 50.0f) + continue; + if (parts[i].tmp != 1) + { + if (rt==PT_FIRE) + { + parts[r>>8].temp=2473.15; + if(parts[r>>8].tmp&0x02) + parts[r>>8].temp=3473; + parts[r>>8].tmp |= 1; + } + if (rt==PT_FIRE || rt==PT_PLSM || rt==PT_LAVA) + { + sim->create_part(i,x,y,PT_FIRE); + parts[i].temp+=(rand()/(RAND_MAX/100)); + parts[i].tmp |= 1; + } + } + } + if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f) + { + parts[i].tmp = 1; + if (rand()%5 < 1) + { + int j; + float temp = parts[i].temp; + sim->part_change_type(i,x,y,PT_PLSM); + parts[i].life = rand()%150+50; + sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); + sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); + if (j != -1) { parts[j].ctype = 0xFFFF00; parts[j].temp = temp; } + + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); + if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; } + + if (rand()%2) + { + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); + if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; } + } + parts[i].temp += 6000; + sim->pv[y/CELL][x/CELL] += 30; + } + } + return 0; +} + + +Element_H2::~Element_H2() {} \ No newline at end of file diff --git a/src/simulation/elements/HFLM.cpp b/src/simulation/elements/HFLM.cpp new file mode 100644 index 0000000..dcd9f9a --- /dev/null +++ b/src/simulation/elements/HFLM.cpp @@ -0,0 +1,70 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_HFLM PT_HFLM 68 +Element_HFLM::Element_HFLM() +{ + Identifier = "DEFAULT_PT_HFLM"; + Name = "CFLM"; + Colour = PIXPACK(0x8080FF); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.9f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.97f; + Loss = 0.20f; + Collision = 0.0f; + Gravity = -0.1f; + Diffusion = 0.00f; + HotAir = 0.0005f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 2; + + Temperature = 0.0f; + HeatConduct = 88; + Description = "Sub-zero flame."; + + State = ST_LIQUID; + Properties = TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = &Element_HFLM::graphics; +} + +//#TPT-Directive ElementHeader Element_HFLM static int graphics(GRAPHICS_FUNC_ARGS) +int Element_HFLM::graphics(GRAPHICS_FUNC_ARGS) + +{ + int caddress = restrict_flt(restrict_flt((float)((int)(cpart->life/2)), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = 0;//(unsigned char)hflm_data[caddress]; + *colg = 0;//(unsigned char)hflm_data[caddress+1]; + *colb = 0;//(unsigned char)hflm_data[caddress+2]; + + *firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + return 0; +} + + +Element_HFLM::~Element_HFLM() {} \ No newline at end of file diff --git a/src/simulation/elements/HSWC.cpp b/src/simulation/elements/HSWC.cpp new file mode 100644 index 0000000..1b00914 --- /dev/null +++ b/src/simulation/elements/HSWC.cpp @@ -0,0 +1,87 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_HSWC PT_HSWC 75 +Element_HSWC::Element_HSWC() +{ + Identifier = "DEFAULT_PT_HSWC"; + Name = "HSWC"; + Colour = PIXPACK(0x3B0A0A); + MenuVisible = 1; + MenuSection = SC_POWERED; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Heat switch. Conducts Heat only when activated"; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_HSWC::update; + Graphics = &Element_HSWC::graphics; +} + +//#TPT-Directive ElementHeader Element_HSWC static int update(UPDATE_FUNC_ARGS) +int Element_HSWC::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (parts[i].life==10) + { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_HSWC static int graphics(GRAPHICS_FUNC_ARGS) +int Element_HSWC::graphics(GRAPHICS_FUNC_ARGS) + +{ + int lifemod = ((cpart->life>10?10:cpart->life)*19); + *colr += lifemod; + return 0; +} + + +Element_HSWC::~Element_HSWC() {} \ No newline at end of file diff --git a/src/simulation/elements/ICEI.cpp b/src/simulation/elements/ICEI.cpp new file mode 100644 index 0000000..7352d60 --- /dev/null +++ b/src/simulation/elements/ICEI.cpp @@ -0,0 +1,74 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_ICEI PT_ICEI 13 +Element_ICEI::Element_ICEI() +{ + Identifier = "DEFAULT_PT_ICEI"; + Name = "ICE"; + Colour = PIXPACK(0xA0C0FF); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = -0.0003f* CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 100; + + Temperature = R_TEMP-50.0f+273.15f; + HeatConduct = 46; + Description = "Solid. Freezes water. Crushes under pressure. Cools down air."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 0.8f; + HighPressureTransition = PT_SNOW; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 233.0f; + HighTemperatureTransition = ST; + + Update = &Element_ICEI::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_ICEI static int update(UPDATE_FUNC_ARGS) +int Element_ICEI::update(UPDATE_FUNC_ARGS) + { //currently used for snow as well + int r, rx, ry; + if (parts[i].ctype==PT_FRZW)//get colder if it is from FRZW + { + parts[i].temp = restrict_flt(parts[i].temp-1.0f, MIN_TEMP, MAX_TEMP); + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_SLTW); + sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); + } + } + return 0; +} + + +Element_ICEI::~Element_ICEI() {} \ No newline at end of file diff --git a/src/simulation/elements/IGNT.cpp b/src/simulation/elements/IGNT.cpp new file mode 100644 index 0000000..8e2af19 --- /dev/null +++ b/src/simulation/elements/IGNT.cpp @@ -0,0 +1,95 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_IGNT PT_IGNT 140 +Element_IGNT::Element_IGNT() +{ + Identifier = "DEFAULT_PT_IGNT"; + Name = "IGNC"; + Colour = PIXPACK(0xC0B050); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 88; + Description = "Ignition cord."; + + State = ST_SOLID; + Properties = TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 673.0f; + HighTemperatureTransition = PT_FIRE; + + Update = &Element_IGNT::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_IGNT static int update(UPDATE_FUNC_ARGS) +int Element_IGNT::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + if(parts[i].tmp==0) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life==1)) + { + parts[i].tmp = 1; + } + } + } + else if(parts[i].life > 0) + { + if(rand()%3) + { + int nb = sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_BOMB); + if (nb!=-1) { + parts[nb].tmp = 1; + parts[nb].life = 30; + parts[nb].vx = rand()%20-10; + parts[nb].vy = rand()%20-10; + parts[nb].temp = restrict_flt(400.0f+parts[i].temp-273.15, MIN_TEMP, MAX_TEMP); + } + } + else + { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_FIRE); + } + parts[i].life--; + } + return 0; +} + + +Element_IGNT::~Element_IGNT() {} \ No newline at end of file diff --git a/src/simulation/elements/INSL.cpp b/src/simulation/elements/INSL.cpp new file mode 100644 index 0000000..a7d1ce1 --- /dev/null +++ b/src/simulation/elements/INSL.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_INSL PT_INSL 38 +Element_INSL::Element_INSL() +{ + Identifier = "DEFAULT_PT_INSL"; + Name = "INSL"; + Colour = PIXPACK(0x9EA3B6); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.95f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 7; + Explosive = 0; + Meltable = 0; + Hardness = 10; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "Insulator, does not conduct heat or electricity."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_INSL::~Element_INSL() {} \ No newline at end of file diff --git a/src/simulation/elements/INST.cpp b/src/simulation/elements/INST.cpp new file mode 100644 index 0000000..78990ef --- /dev/null +++ b/src/simulation/elements/INST.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_INST PT_INST 106 +Element_INST::Element_INST() +{ + Identifier = "DEFAULT_PT_INST"; + Name = "INST"; + Colour = PIXPACK(0x404039); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Instantly conducts, PSCN to charge, NSCN to take."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_INST::~Element_INST() {} \ No newline at end of file diff --git a/src/simulation/elements/INVIS.cpp b/src/simulation/elements/INVIS.cpp new file mode 100644 index 0000000..b14f8b6 --- /dev/null +++ b/src/simulation/elements/INVIS.cpp @@ -0,0 +1,67 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_INVIS PT_INVIS 115 +Element_INVIS::Element_INVIS() +{ + Identifier = "DEFAULT_PT_INVIS"; + Name = "INVS"; + Colour = PIXPACK(0x00CCCC); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 15; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 164; + Description = "Invisible to everything while under pressure."; + + State = ST_SOLID; + Properties = TYPE_SOLID | PROP_NEUTPASS; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = &Element_INVIS::graphics; +} + +//#TPT-Directive ElementHeader Element_INVIS static int graphics(GRAPHICS_FUNC_ARGS) +int Element_INVIS::graphics(GRAPHICS_FUNC_ARGS) + +{ + //pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f + if(cpart->tmp) + { + *cola = 100; + *colr = 15; + *colg = 0; + *colb = 150; + *pixel_mode &= PMODE; + *pixel_mode |= PMODE_BLEND; + } + return 0; +} + + +Element_INVIS::~Element_INVIS() {} \ No newline at end of file diff --git a/src/simulation/elements/INWR.cpp b/src/simulation/elements/INWR.cpp new file mode 100644 index 0000000..0368f06 --- /dev/null +++ b/src/simulation/elements/INWR.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_INWR PT_INWR 62 +Element_INWR::Element_INWR() +{ + Identifier = "DEFAULT_PT_INWR"; + Name = "INWR"; + Colour = PIXPACK(0x544141); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Insulated Wire. Doesn't conduct to metal or semiconductors."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1687.0f; + HighTemperatureTransition = PT_LAVA; + + Update = NULL; + Graphics = NULL; +} + +Element_INWR::~Element_INWR() {} \ No newline at end of file diff --git a/src/simulation/elements/IRON.cpp b/src/simulation/elements/IRON.cpp new file mode 100644 index 0000000..a447a29 --- /dev/null +++ b/src/simulation/elements/IRON.cpp @@ -0,0 +1,76 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_IRON PT_IRON 76 +Element_IRON::Element_IRON() +{ + Identifier = "DEFAULT_PT_IRON"; + Name = "IRON"; + Colour = PIXPACK(0x707070); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 50; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Rusts with salt, can be used for electrolysis of WATR"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1687.0f; + HighTemperatureTransition = PT_LAVA; + + Update = &Element_IRON::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_IRON static int update(UPDATE_FUNC_ARGS) +int Element_IRON::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()/(RAND_MAX/700))) || + ((r&0xFF) == PT_SLTW && 30>(rand()/(RAND_MAX/2000))) || + ((r&0xFF) == PT_WATR && 5 >(rand()/(RAND_MAX/6000))) || + ((r&0xFF) == PT_O2 && 2 >(rand()/(RAND_MAX/500))) || + ((r&0xFF) == PT_LO2))&& + (!(parts[i].life)) + ) + { + sim->part_change_type(i,x,y,PT_BMTL); + parts[i].tmp=(rand()/(RAND_MAX/10))+20; + } + } + return 0; +} + + +Element_IRON::~Element_IRON() {} \ No newline at end of file diff --git a/src/simulation/elements/ISOZ.cpp b/src/simulation/elements/ISOZ.cpp new file mode 100644 index 0000000..f98cb25 --- /dev/null +++ b/src/simulation/elements/ISOZ.cpp @@ -0,0 +1,65 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_ISOZ PT_ISOZ 107 +Element_ISOZ::Element_ISOZ() +{ + Identifier = "DEFAULT_PT_ISOZ"; + Name = "ISOZ"; + Colour = PIXPACK(0xAA30D0); + MenuVisible = 1; + MenuSection = SC_NUCLEAR; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 24; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 29; + Description = "Radioactive liquid"; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_NEUTPENETRATE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 160.0f; + LowTemperatureTransition = PT_ISZS; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_ISOZ::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_ISOZ static int update(UPDATE_FUNC_ARGS) +int Element_ISOZ::update(UPDATE_FUNC_ARGS) + { // for both ISZS and ISOZ + float rr, rrr; + if (1>rand()%200 && ((int)(-4.0f*(sim->pv[y/CELL][x/CELL])))>(rand()%1000)) + { + sim->create_part(i, x, y, PT_PHOT); + rr = (rand()%228+128)/127.0f; + rrr = (rand()%360)*3.14159f/180.0f; + parts[i].vx = rr*cosf(rrr); + parts[i].vy = rr*sinf(rrr); + } + return 0; +} + + +Element_ISOZ::~Element_ISOZ() {} \ No newline at end of file diff --git a/src/simulation/elements/ISZS.cpp b/src/simulation/elements/ISZS.cpp new file mode 100644 index 0000000..650ef1b --- /dev/null +++ b/src/simulation/elements/ISZS.cpp @@ -0,0 +1,65 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_ISZS PT_ISZS 108 +Element_ISZS::Element_ISZS() +{ + Identifier = "DEFAULT_PT_ISZS"; + Name = "ISZS"; + Colour = PIXPACK(0x662089); + MenuVisible = 1; + MenuSection = SC_NUCLEAR; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = -0.0007f* CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = 140.00f; + HeatConduct = 251; + Description = "Solid form of ISOZ, slowly decays."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 300.0f; + HighTemperatureTransition = PT_ISOZ; + + Update = &Element_ISZS::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_ISZS static int update(UPDATE_FUNC_ARGS) +int Element_ISZS::update(UPDATE_FUNC_ARGS) + { // for both ISZS and ISOZ + float rr, rrr; + if (1>rand()%200 && ((int)(-4.0f*(sim->pv[y/CELL][x/CELL])))>(rand()%1000)) + { + sim->create_part(i, x, y, PT_PHOT); + rr = (rand()%228+128)/127.0f; + rrr = (rand()%360)*3.14159f/180.0f; + parts[i].vx = rr*cosf(rrr); + parts[i].vy = rr*sinf(rrr); + } + return 0; +} + + +Element_ISZS::~Element_ISZS() {} \ No newline at end of file diff --git a/src/simulation/elements/LAVA.cpp b/src/simulation/elements/LAVA.cpp new file mode 100644 index 0000000..35eefec --- /dev/null +++ b/src/simulation/elements/LAVA.cpp @@ -0,0 +1,71 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_LAVA PT_LAVA 6 +Element_LAVA::Element_LAVA() +{ + Identifier = "DEFAULT_PT_LAVA"; + Name = "LAVA"; + Colour = PIXPACK(0xE05010); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.3f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.95f; + Loss = 0.80f; + Collision = 0.0f; + Gravity = 0.15f; + Diffusion = 0.00f; + HotAir = 0.0003f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 2; + + Weight = 45; + + Temperature = R_TEMP+1500.0f+273.15f; + HeatConduct = 60; + Description = "Heavy liquid. Ignites flammable materials. Solidifies when cold."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 2573.15f; + LowTemperatureTransition = ST; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_FIRE::update; + Graphics = &Element_LAVA::graphics; +} + + +//#TPT-Directive ElementHeader Element_LAVA static int graphics(GRAPHICS_FUNC_ARGS) +int Element_LAVA::graphics(GRAPHICS_FUNC_ARGS) + +{ + *colr = cpart->life * 2 + 0xE0; + *colg = cpart->life * 1 + 0x50; + *colb = cpart->life / 2 + 0x10; + if (*colr>255) *colr = 255; + if (*colg>192) *colg = 192; + if (*colb>128) *colb = 128; + *firea = 40; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + *pixel_mode |= FIRE_ADD; + *pixel_mode |= PMODE_BLUR; + //Returning 0 means dynamic, do not cache + return 0; +} + + +Element_LAVA::~Element_LAVA() {} \ No newline at end of file diff --git a/src/simulation/elements/LCRY.cpp b/src/simulation/elements/LCRY.cpp new file mode 100644 index 0000000..e06feec --- /dev/null +++ b/src/simulation/elements/LCRY.cpp @@ -0,0 +1,154 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_LCRY PT_LCRY 54 +Element_LCRY::Element_LCRY() +{ + Identifier = "DEFAULT_PT_LCRY"; + Name = "LCRY"; + Colour = PIXPACK(0x505050); + MenuVisible = 1; + MenuSection = SC_POWERED; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1273.0f; + HighTemperatureTransition = PT_BGLA; + + Update = &Element_LCRY::update; + Graphics = &Element_LCRY::graphics; +} + +//#TPT-Directive ElementHeader Element_LCRY static int update(UPDATE_FUNC_ARGS) +int Element_LCRY::update(UPDATE_FUNC_ARGS) + +{ + int r, rx, ry; + if(parts[i].tmp==1 || parts[i].tmp==0) + { + if(parts[i].tmp==1) + { + if(parts[i].life<=0) + parts[i].tmp = 0; + else + { + parts[i].life-=2; + if(parts[i].life < 0) + parts[i].life = 0; + parts[i].tmp2 = parts[i].life; + } + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].tmp == 3) + { + parts[r>>8].tmp = 1; + } + } + } + else if(parts[i].tmp==2 || parts[i].tmp==3) + { + if(parts[i].tmp==2) + { + if(parts[i].life>=10) + parts[i].tmp = 3; + else + { + parts[i].life+=2; + if(parts[i].life > 10) + parts[i].life = 10; + parts[i].tmp2 = parts[i].life; + } + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].tmp == 0) + { + parts[r>>8].tmp = 2; + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_LCRY static int graphics(GRAPHICS_FUNC_ARGS) +int Element_LCRY::graphics(GRAPHICS_FUNC_ARGS) + +{ + if(ren->decorations_enable && cpart->dcolour && (cpart->dcolour&0xFF000000)) + { + *colr = (cpart->dcolour>>16)&0xFF; + *colg = (cpart->dcolour>>8)&0xFF; + *colb = (cpart->dcolour)&0xFF; + + if(cpart->tmp2<10){ + *colr /= 10-cpart->tmp2; + *colg /= 10-cpart->tmp2; + *colb /= 10-cpart->tmp2; + } + + } + else + { + *colr = *colg = *colb = 0x50+((cpart->tmp2>10?10:cpart->tmp2)*10); + } + *pixel_mode |= NO_DECO; + return 0; + + /*int lifemod = ((cpart->tmp2>10?10:cpart->tmp2)*10); + *colr += lifemod; + *colg += lifemod; + *colb += lifemod; + if(decorations_enable && cpart->dcolour && cpart->dcolour&0xFF000000) + { + lifemod *= 2.5f; + if(lifemod < 40) + lifemod = 40; + *colr = (lifemod*((cpart->dcolour>>16)&0xFF) + (255-lifemod)**colr) >> 8; + *colg = (lifemod*((cpart->dcolour>>8)&0xFF) + (255-lifemod)**colg) >> 8; + *colb = (lifemod*((cpart->dcolour)&0xFF) + (255-lifemod)**colb) >> 8; + } + *pixel_mode |= NO_DECO; + return 0;*/ +} + + +Element_LCRY::~Element_LCRY() {} \ No newline at end of file diff --git a/src/simulation/elements/LIFE.cpp b/src/simulation/elements/LIFE.cpp new file mode 100644 index 0000000..84cec67 --- /dev/null +++ b/src/simulation/elements/LIFE.cpp @@ -0,0 +1,106 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_LIFE PT_LIFE 78 +Element_LIFE::Element_LIFE() +{ + Identifier = "DEFAULT_PT_LIFE"; + Name = "LIFE"; + Colour = PIXPACK(0x0CAC00); + MenuVisible = 0; + MenuSection = SC_LIFE; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = 9000.0f; + HeatConduct = 40; + Description = "Game Of Life! B3/S23"; + + State = ST_NONE; + Properties = TYPE_SOLID|PROP_LIFE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = &Element_LIFE::graphics; +} + +//#TPT-Directive ElementHeader Element_LIFE static int graphics(GRAPHICS_FUNC_ARGS) +int Element_LIFE::graphics(GRAPHICS_FUNC_ARGS) + +{ + pixel pc; + if (cpart->ctype==NGT_LOTE)//colors for life states + { + if (cpart->tmp==2) + pc = PIXRGB(255, 128, 0); + else if (cpart->tmp==1) + pc = PIXRGB(255, 255, 0); + else + pc = PIXRGB(255, 0, 0); + } + else if (cpart->ctype==NGT_FRG2)//colors for life states + { + if (cpart->tmp==2) + pc = PIXRGB(0, 100, 50); + else + pc = PIXRGB(0, 255, 90); + } + else if (cpart->ctype==NGT_STAR)//colors for life states + { + if (cpart->tmp==4) + pc = PIXRGB(0, 0, 128); + else if (cpart->tmp==3) + pc = PIXRGB(0, 0, 150); + else if (cpart->tmp==2) + pc = PIXRGB(0, 0, 190); + else if (cpart->tmp==1) + pc = PIXRGB(0, 0, 230); + else + pc = PIXRGB(0, 0, 70); + } + else if (cpart->ctype==NGT_FROG)//colors for life states + { + if (cpart->tmp==2) + pc = PIXRGB(0, 100, 0); + else + pc = PIXRGB(0, 255, 0); + } + else if (cpart->ctype==NGT_BRAN)//colors for life states + { + if (cpart->tmp==1) + pc = PIXRGB(150, 150, 0); + else + pc = PIXRGB(255, 255, 0); + } else { + pc = PIXRGB(255, 255, 0);//sim->gmenu[cpart->ctype].colour; + } + *colr = PIXR(pc); + *colg = PIXG(pc); + *colb = PIXB(pc); + return 0; +} + + +Element_LIFE::~Element_LIFE() {} \ No newline at end of file diff --git a/src/simulation/elements/LIGH.cpp b/src/simulation/elements/LIGH.cpp new file mode 100644 index 0000000..27b5c4b --- /dev/null +++ b/src/simulation/elements/LIGH.cpp @@ -0,0 +1,355 @@ +#include "simulation/Elements.h" + +//#TPT-Directive ElementClass Element_LIGH PT_LIGH 87 +Element_LIGH::Element_LIGH() +{ + Identifier = "DEFAULT_PT_LIGH"; + Name = "LIGH"; + Colour = PIXPACK(0xFFFFC0); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "More realistic lightning. Set pen size to set the size of the lightning."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_LIGH::update; + Graphics = &Element_LIGH::graphics; +} + +#define LIGHTING_POWER 0.65 + +//#TPT-Directive ElementHeader Element_LIGH static int update(UPDATE_FUNC_ARGS) +int Element_LIGH::update(UPDATE_FUNC_ARGS) + +{ + /* + * + * tmp2: + * -1 - part will be removed + * 0 - "branches" of the lightning + * 1 - bending + * 2 - branching + * 3 - transfer spark or make destruction + * 4 - first pixel + * + * life - "thickness" of lighting (but anyway one pixel) + * + * tmp - angle of lighting + * + */ + int r,rx,ry, multipler, powderful; + float angle, angle2=-1; + int pNear = 0; + powderful = powderful = parts[i].temp*(1+parts[i].life/40)*LIGHTING_POWER; + Element_FIRE::update(UPDATE_FUNC_SUBCALL_ARGS); + if (sim->aheat_enable) + { + sim->hv[y/CELL][x/CELL]+=powderful/50; + if (sim->hv[y/CELL][x/CELL]>MAX_TEMP) + sim->hv[y/CELL][x/CELL]=MAX_TEMP; + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxelements[r&0xFF].Properties&PROP_CONDUCTS) && parts[r>>8].life==0) + { + sim->create_part(r>>8,x+rx,y+ry,PT_SPRK); + } + sim->pv[y/CELL][x/CELL] += powderful/400; + if (sim->elements[r&0xFF].HeatConduct) parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/1.5, MIN_TEMP, MAX_TEMP); + } + if ((r&0xFF)==PT_DEUT || (r&0xFF)==PT_PLUT) // start nuclear reactions + { + parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful, MIN_TEMP, MAX_TEMP); + sim->pv[y/CELL][x/CELL] +=powderful/35; + if (rand()%3==0) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_NEUT); + parts[r>>8].life = rand()%480+480; + parts[r>>8].vx=rand()%10-5; + parts[r>>8].vy=rand()%10-5; + } + } + if ((r&0xFF)==PT_COAL || (r&0xFF)==PT_BCOL) // ignite coal + { + if (parts[r>>8].life>100) { + parts[r>>8].life = 99; + } + } + if (sim->elements[r&0xFF].HeatConduct) + parts[r>>8].temp = restrict_flt(parts[r>>8].temp+powderful/10, MIN_TEMP, MAX_TEMP); + if (((r&0xFF)==PT_STKM && sim->player.elem!=PT_LIGH) || ((r&0xFF)==PT_STKM2 && sim->player2.elem!=PT_LIGH)) + { + parts[r>>8].life-=powderful/100; + } + } + } + if (parts[i].tmp2==3) + { + parts[i].tmp2=0; + return 1; + } + + if (parts[i].tmp2==-1) + { + sim->kill_part(i); + return 1; + } + if (parts[i].tmp2<=0 || parts[i].life<=1) + { + if (parts[i].tmp2>0) + parts[i].tmp2=0; + parts[i].tmp2--; + return 1; + } + if (parts[i].tmp2<=-2) + { + sim->kill_part(i); + return 1; + } + + angle2=-1; + + pNear = LIGH_nearest_part(sim, i, parts[i].life*2.5); + if (pNear!=-1) + { + int t=parts[pNear].type; + float n_angle; // angle to nearest part + rx=parts[pNear].x-x; + ry=parts[pNear].y-y; + if (rx*rx+ry*ry!=0) + n_angle = asin(-ry/sqrt(rx*rx+ry*ry)); + else + n_angle = 0; + if (n_angle<0) + n_angle+=M_PI*2; + if (parts[i].life<5 || fabs(n_angle-parts[i].tmp*M_PI/180)=360) + angle-=360; + if (parts[i].tmp2==2 && pNear==-1) + { + angle2=angle+100-rand()%200; + if (angle2<0) + angle2+=360; + if (angle2>=360) + angle-=360; + } + + multipler=parts[i].life*1.5+rand()%((int)(parts[i].life+1)); + rx=cos(angle*M_PI/180)*multipler; + ry=-sin(angle*M_PI/180)*multipler; + create_line_par(sim, x, y, x+rx, y+ry, PT_LIGH, parts[i].temp, parts[i].life, angle, 0); + + if (x+rx>=0 && y+ry>=0 && x+rx>8].tmp2=1+(rand()%200>parts[i].tmp2*parts[i].tmp2/10+60); + parts[r>>8].life=(int)(1.0*parts[i].life/1.5-rand()%2); + parts[r>>8].tmp=angle; + parts[r>>8].temp=parts[i].temp; + } + } + + if (angle2!=-1) + { + multipler=parts[i].life*1.5+rand()%((int)(parts[i].life+1)); + rx=cos(angle2*M_PI/180)*multipler; + ry=-sin(angle2*M_PI/180)*multipler; + create_line_par(sim, x, y, x+rx, y+ry, PT_LIGH, parts[i].temp, parts[i].life, angle2, 0); + + if (x+rx>=0 && y+ry>0 && x+rx>8].tmp2=1+(rand()%200>parts[i].tmp2*parts[i].tmp2/10+40); + parts[r>>8].life=(int)(1.0*parts[i].life/1.5-rand()%2); + parts[r>>8].tmp=angle; + parts[r>>8].temp=parts[i].temp; + } + } + } + + parts[i].tmp2=-1; + return 1; +} + +//#TPT-Directive ElementHeader Element_LIGH static int LIGH_nearest_part(Simulation * sim, int ci, int max_d) +int Element_LIGH::LIGH_nearest_part(Simulation * sim, int ci, int max_d) +{ + int distance = (max_d!=-1)?max_d:MAX_DISTANCE; + int ndistance = 0; + int id = -1; + int i = 0; + int cx = (int)sim->parts[ci].x; + int cy = (int)sim->parts[ci].y; + for (i=0; i<=sim->parts_lastActiveIndex; i++) + { + if (sim->parts[i].type && sim->parts[i].life && i!=ci && sim->parts[i].type!=PT_LIGH && sim->parts[i].type!=PT_THDR && sim->parts[i].type!=PT_NEUT && sim->parts[i].type!=PT_PHOT) + { + ndistance = abs(cx-sim->parts[i].x)+abs(cy-sim->parts[i].y);// Faster but less accurate Older: sqrt(pow(cx-parts[i].x, 2)+pow(cy-parts[i].y, 2)); + if (ndistanceparts[i].x, y=sim->parts[i].y; + int r,rx,ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxpmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)==tp) + return r>>8; + } + return -1; +} + +//#TPT-Directive ElementHeader Element_LIGH static void create_line_par(Simulation * sim, int x1, int y1, int x2, int y2, int c, int temp, int life, int tmp, int tmp2) +void Element_LIGH::create_line_par(Simulation * sim, int x1, int y1, int x2, int y2, int c, int temp, int life, int tmp, int tmp2) +{ + int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; + float e, de; + if (c==WL_EHOLE || c==WL_ALLOWGAS || c==WL_ALLOWALLELEC || c==WL_ALLOWSOLID || c==WL_ALLOWAIR || c==WL_WALL || c==WL_DESTROYALL || c==WL_ALLOWLIQUID || c==WL_FAN || c==WL_STREAM || c==WL_DETECT || c==WL_EWALL || c==WL_WALLELEC) + return; // this function only for particles, no walls + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1create_part(-1, y, x, c); + else + p = sim->create_part(-1, x, y,c); + if (p!=-1) + { + sim->parts[p].life = life; + sim->parts[p].temp = temp; + sim->parts[p].tmp = tmp; + sim->parts[p].tmp2 = tmp2; + } + e += de; + if (e >= 0.5f) + { + y += sy; + e -= 1.0f; + } + } +} + + +//#TPT-Directive ElementHeader Element_LIGH static int graphics(GRAPHICS_FUNC_ARGS) +int Element_LIGH::graphics(GRAPHICS_FUNC_ARGS) + +{ + *firea = 120; + *firer = *colr = 235; + *fireg = *colg = 245; + *fireb = *colb = 255; + *pixel_mode |= PMODE_GLOW | FIRE_ADD; + return 1; +} + + +Element_LIGH::~Element_LIGH() {} \ No newline at end of file diff --git a/src/simulation/elements/LNTG.cpp b/src/simulation/elements/LNTG.cpp new file mode 100644 index 0000000..ce776c8 --- /dev/null +++ b/src/simulation/elements/LNTG.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_LNTG PT_LNTG 37 +Element_LNTG::Element_LNTG() +{ + Identifier = "DEFAULT_PT_LNTG"; + Name = "LN2"; + Colour = PIXPACK(0x80A0DF); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 30; + + Temperature = 70.15f; + HeatConduct = 70; + Description = "Liquid Nitrogen. Very cold."; + + State = ST_SOLID; + Properties = TYPE_LIQUID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 63.0f; + LowTemperatureTransition = PT_NICE; + HighTemperature = 77.0f; + HighTemperatureTransition = PT_NONE; + + Update = NULL; + Graphics = NULL; +} + +Element_LNTG::~Element_LNTG() {} \ No newline at end of file diff --git a/src/simulation/elements/LO2.cpp b/src/simulation/elements/LO2.cpp new file mode 100644 index 0000000..cc0c557 --- /dev/null +++ b/src/simulation/elements/LO2.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_LO2 PT_LO2 60 +Element_LO2::Element_LO2() +{ + Identifier = "DEFAULT_PT_LO2"; + Name = "LOXY"; + Colour = PIXPACK(0x80A0EF); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 5000; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 30; + + Temperature = 80.0f; + HeatConduct = 70; + Description = "Liquid Oxygen. Very cold. Reacts with fire"; + + State = ST_LIQUID; + Properties = TYPE_LIQUID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 90.1f; + HighTemperatureTransition = PT_O2; + + Update = NULL; + Graphics = NULL; +} + +Element_LO2::~Element_LO2() {} \ No newline at end of file diff --git a/src/simulation/elements/LOLZ.cpp b/src/simulation/elements/LOLZ.cpp new file mode 100644 index 0000000..14c5757 --- /dev/null +++ b/src/simulation/elements/LOLZ.cpp @@ -0,0 +1,63 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_LOLZ PT_LOLZ 123 +Element_LOLZ::Element_LOLZ() +{ + Identifier = "DEFAULT_PT_LOLZ"; + Name = "LOLZ"; + Colour = PIXPACK(0x569212); + MenuVisible = 1; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.0f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = 373.0f; + HeatConduct = 40; + Description = "Lolz"; + + State = ST_GAS; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_LOLZ::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_LOLZ static int update(UPDATE_FUNC_ARGS) +int Element_LOLZ::update(UPDATE_FUNC_ARGS) + { + /*int t = parts[i].type; + if (t==PT_LOVE) + ISLOVE=1; + else if (t==PT_LOLZ) + ISLOLZ=1; + else if (t==PT_GRAV) + ISGRAV=1;*/ + return 0; +} + + +Element_LOLZ::~Element_LOLZ() {} \ No newline at end of file diff --git a/src/simulation/elements/LOVE.cpp b/src/simulation/elements/LOVE.cpp new file mode 100644 index 0000000..9776336 --- /dev/null +++ b/src/simulation/elements/LOVE.cpp @@ -0,0 +1,63 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_LOVE PT_LOVE 94 +Element_LOVE::Element_LOVE() +{ + Identifier = "DEFAULT_PT_LOVE"; + Name = "LOVE"; + Colour = PIXPACK(0xFF30FF); + MenuVisible = 1; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.0f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = 373.0f; + HeatConduct = 40; + Description = "Love..."; + + State = ST_GAS; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_LOVE::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_LOVE static int update(UPDATE_FUNC_ARGS) +int Element_LOVE::update(UPDATE_FUNC_ARGS) + { + /*int t = parts[i].type; + if (t==PT_LOVE) + ISLOVE=1; + else if (t==PT_LOLZ) + ISLOLZ=1; + else if (t==PT_GRAV) + ISGRAV=1;*/ + return 0; +} + + +Element_LOVE::~Element_LOVE() {} \ No newline at end of file diff --git a/src/simulation/elements/LRBD.cpp b/src/simulation/elements/LRBD.cpp new file mode 100644 index 0000000..445541f --- /dev/null +++ b/src/simulation/elements/LRBD.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_LRBD PT_LRBD 42 +Element_LRBD::Element_LRBD() +{ + Identifier = "DEFAULT_PT_LRBD"; + Name = "LRBD"; + Colour = PIXPACK(0xAAAAAA); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.3f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.95f; + Loss = 0.80f; + Collision = 0.0f; + Gravity = 0.15f; + Diffusion = 0.00f; + HotAir = 0.000001f* CFDS; + Falldown = 2; + + Flammable = 1000; + Explosive = 1; + Meltable = 0; + Hardness = 2; + + Weight = 45; + + Temperature = R_TEMP+45.0f+273.15f; + HeatConduct = 170; + Description = "Liquid Rubidium."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 311.0f; + LowTemperatureTransition = PT_RBDM; + HighTemperature = 961.0f; + HighTemperatureTransition = PT_FIRE; + + Update = NULL; + Graphics = NULL; +} + +Element_LRBD::~Element_LRBD() {} \ No newline at end of file diff --git a/src/simulation/elements/MERC.cpp b/src/simulation/elements/MERC.cpp new file mode 100644 index 0000000..9e7ee38 --- /dev/null +++ b/src/simulation/elements/MERC.cpp @@ -0,0 +1,121 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_MERC PT_MERC 152 +Element_MERC::Element_MERC() +{ + Identifier = "DEFAULT_PT_MERC"; + Name = "MERC"; + Colour = PIXPACK(0x736B6D); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.94f; + Loss = 0.80f; + Collision = 0.0f; + Gravity = 0.3f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 91; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Mercury. Volume changes with temperature, Conductive."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_CONDUCTS|PROP_NEUTABSORB|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_MERC::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_MERC static int update(UPDATE_FUNC_ARGS) +int Element_MERC::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, trade, np; + int maxtmp = ((10000/(parts[i].temp + 1))-1); + if ((10000%((int)parts[i].temp+1))>rand()%((int)parts[i].temp+1)) + maxtmp ++; + if (parts[i].tmp < maxtmp) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=maxtmp)) + continue; + if ((r&0xFF)==PT_MERC&&33>=rand()/(RAND_MAX/100)+1) + { + if ((parts[i].tmp + parts[r>>8].tmp + 1) <= maxtmp) + { + parts[i].tmp += parts[r>>8].tmp + 1; + sim->kill_part(r>>8); + } + } + } + } + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create deut + { + np = sim->create_part(-1,x+rx,y+ry,PT_MERC); + if (np<0) continue; + parts[i].tmp--; + parts[np].temp = parts[i].temp; + parts[np].tmp = 0; + } + } + for ( trade = 0; trade<4; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].tmp)&&parts[i].tmp>0)//diffusion + { + int temp = parts[i].tmp - parts[r>>8].tmp; + if (temp ==1) + { + parts[r>>8].tmp ++; + parts[i].tmp --; + } + else if (temp>0) + { + parts[r>>8].tmp += temp/2; + parts[i].tmp -= temp/2; + } + } + } + } + return 0; +} + + +Element_MERC::~Element_MERC() {} \ No newline at end of file diff --git a/src/simulation/elements/METL.cpp b/src/simulation/elements/METL.cpp new file mode 100644 index 0000000..a013708 --- /dev/null +++ b/src/simulation/elements/METL.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_METL PT_METL 14 +Element_METL::Element_METL() +{ + Identifier = "DEFAULT_PT_METL"; + Name = "METL"; + Colour = PIXPACK(0x404060); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Solid. Conducts electricity. Meltable."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1273.0f; + HighTemperatureTransition = PT_LAVA; + + Update = NULL; + Graphics = NULL; +} + +Element_METL::~Element_METL() {} \ No newline at end of file diff --git a/src/simulation/elements/MORT.cpp b/src/simulation/elements/MORT.cpp new file mode 100644 index 0000000..3acaf0c --- /dev/null +++ b/src/simulation/elements/MORT.cpp @@ -0,0 +1,57 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_MORT PT_MORT 77 +Element_MORT::Element_MORT() +{ + Identifier = "DEFAULT_PT_MORT"; + Name = "MORT"; + Colour = PIXPACK(0xE0E0E0); + MenuVisible = 1; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 1.00f; + Collision = -0.99f; + Gravity = 0.0f; + Diffusion = 0.01f; + HotAir = 0.002f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = -1; + + Temperature = R_TEMP+4.0f +273.15f; + HeatConduct = 60; + Description = "Steam Train."; + + State = ST_NONE; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_MORT::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_MORT static int update(UPDATE_FUNC_ARGS) +int Element_MORT::update(UPDATE_FUNC_ARGS) + { + sim->create_part(-1, x, y-1, PT_SMKE); + return 0; +} + + +Element_MORT::~Element_MORT() {} \ No newline at end of file diff --git a/src/simulation/elements/MWAX.cpp b/src/simulation/elements/MWAX.cpp new file mode 100644 index 0000000..d9428eb --- /dev/null +++ b/src/simulation/elements/MWAX.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_MWAX PT_MWAX 34 +Element_MWAX::Element_MWAX() +{ + Identifier = "DEFAULT_PT_MWAX"; + Name = "MWAX"; + Colour = PIXPACK(0xE0E0AA); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.3f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.95f; + Loss = 0.80f; + Collision = 0.0f; + Gravity = 0.15f; + Diffusion = 0.00f; + HotAir = 0.000001f* CFDS; + Falldown = 2; + + Flammable = 5; + Explosive = 0; + Meltable = 0; + Hardness = 2; + + Weight = 25; + + Temperature = R_TEMP+28.0f+273.15f; + HeatConduct = 44; + Description = "Liquid Wax."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 318.0f; + LowTemperatureTransition = PT_WAX; + HighTemperature = 673.0f; + HighTemperatureTransition = PT_FIRE; + + Update = NULL; + Graphics = NULL; +} + +Element_MWAX::~Element_MWAX() {} \ No newline at end of file diff --git a/src/simulation/elements/NBHL.cpp b/src/simulation/elements/NBHL.cpp new file mode 100644 index 0000000..88d6ec2 --- /dev/null +++ b/src/simulation/elements/NBHL.cpp @@ -0,0 +1,57 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_NBHL PT_NBHL 150 +Element_NBHL::Element_NBHL() +{ + Identifier = "DEFAULT_PT_NBHL"; + Name = "BHOL"; + Colour = PIXPACK(0x202020); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 186; + Description = "Black hole (Requires newtonian gravity)"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_NBHL::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_NBHL static int update(UPDATE_FUNC_ARGS) +int Element_NBHL::update(UPDATE_FUNC_ARGS) + { + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] += 0.1f; + return 0; +} + + +Element_NBHL::~Element_NBHL() {} \ No newline at end of file diff --git a/src/simulation/elements/NBLE.cpp b/src/simulation/elements/NBLE.cpp new file mode 100644 index 0000000..3cd0259 --- /dev/null +++ b/src/simulation/elements/NBLE.cpp @@ -0,0 +1,78 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_NBLE PT_NBLE 52 +Element_NBLE::Element_NBLE() +{ + Identifier = "DEFAULT_PT_NBLE"; + Name = "NBLE"; + Colour = PIXPACK(0xEB4917); + MenuVisible = 1; + MenuSection = SC_GAS; + Enabled = 1; + + Advection = 1.0f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.99f; + Loss = 0.30f; + Collision = -0.1f; + Gravity = 0.0f; + Diffusion = 0.75f; + HotAir = 0.001f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 1; + + Temperature = R_TEMP+2.0f +273.15f; + HeatConduct = 106; + Description = "Noble Gas. Diffuses. Conductive. Ionizes into plasma when introduced to electricity"; + + State = ST_GAS; + Properties = TYPE_GAS|PROP_CONDUCTS|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_NBLE::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_NBLE static int update(UPDATE_FUNC_ARGS) +int Element_NBLE::update(UPDATE_FUNC_ARGS) + +{ + if (parts[i].temp > 5273.15 && sim->pv[y/CELL][x/CELL] > 100.0f) + { + parts[i].tmp = 1; + if (rand()%5 < 1) + { + int j; + float temp = parts[i].temp; + sim->part_change_type(i,x,y,PT_PLSM); + parts[i].life = rand()%150+50; + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT); + if (j != -1) { parts[j].ctype = 0xFF0000; parts[j].temp = temp; } + + j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_CO2); + if (j != -1) parts[j].temp = temp-1000; + + parts[i].temp += 10000; + sim->pv[y/CELL][x/CELL] += 30; + } + } + return 0; +} + + +Element_NBLE::~Element_NBLE() {} \ No newline at end of file diff --git a/src/simulation/elements/NEUT.cpp b/src/simulation/elements/NEUT.cpp new file mode 100644 index 0000000..108ae72 --- /dev/null +++ b/src/simulation/elements/NEUT.cpp @@ -0,0 +1,200 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_NEUT PT_NEUT 18 +Element_NEUT::Element_NEUT() +{ + Identifier = "DEFAULT_PT_NEUT"; + Name = "NEUT"; + Colour = PIXPACK(0x20E0FF); + MenuVisible = 1; + MenuSection = SC_NUCLEAR; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 1.00f; + Collision = -0.99f; + Gravity = 0.0f; + Diffusion = 0.01f; + HotAir = 0.002f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = -1; + + Temperature = R_TEMP+4.0f +273.15f; + HeatConduct = 60; + Description = "Neutrons. Interact with matter in odd ways."; + + State = ST_GAS; + Properties = TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_NEUT::update; + Graphics = &Element_NEUT::graphics; +} + +//#TPT-Directive ElementHeader Element_NEUT static int update(UPDATE_FUNC_ARGS) +int Element_NEUT::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, rt; + int pressureFactor = 3 + (int)sim->pv[y/CELL][x/CELL]; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) + { + if (33>rand()%100) + { + sim->create_part(r>>8, x+rx, y+ry, rand()%3 ? PT_LAVA : PT_URAN); + parts[r>>8].temp = MAX_TEMP; + if (parts[r>>8].type==PT_LAVA) { + parts[r>>8].tmp = 100; + parts[r>>8].ctype = PT_PLUT; + } + } + else + { + sim->create_part(r>>8, x+rx, y+ry, PT_NEUT); + parts[r>>8].vx = 0.25f*parts[r>>8].vx + parts[i].vx; + parts[r>>8].vy = 0.25f*parts[r>>8].vy + parts[i].vy; + } + sim->pv[y/CELL][x/CELL] += 10.0f * CFDS; //Used to be 2, some people said nukes weren't powerful enough + Element_FIRE::update(UPDATE_FUNC_SUBCALL_ARGS); + } +#ifdef SDEUT + else if ((r&0xFF)==PT_DEUT && (pressureFactor+1+(parts[r>>8].life/100))>(rand()%1000)) + { + create_n_parts(sim, parts[r>>8].life, x+rx, y+ry, parts[i].vx, parts[i].vy, restrict_flt(parts[r>>8].temp + parts[r>>8].life*500, MIN_TEMP, MAX_TEMP), PT_NEUT); + sim->kill_part(r>>8); + } +#else + else if ((r&0xFF)==PT_DEUT && (pressureFactor+1)>(rand()%1000)) + { + create_part(r>>8, x+rx, y+ry, PT_NEUT); + parts[r>>8].vx = 0.25f*parts[r>>8].vx + parts[i].vx; + parts[r>>8].vy = 0.25f*parts[r>>8].vy + parts[i].vy; + if (parts[r>>8].life>0) + { + parts[r>>8].life --; + parts[r>>8].temp = restrict_flt(parts[r>>8].temp + parts[r>>8].life*17, MIN_TEMP, MAX_TEMP); + pv[y/CELL][x/CELL] += 6.0f * CFDS; + } + else + sim.kill_part(r>>8); + } +#endif + else if ((r&0xFF)==PT_GUNP && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DUST); + else if ((r&0xFF)==PT_DYST && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_YEST); + else if ((r&0xFF)==PT_YEST) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DYST); + else if ((r&0xFF)==PT_WATR && 15>(rand()%100)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DSTW); + else if ((r&0xFF)==PT_PLEX && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_GOO); + else if ((r&0xFF)==PT_NITR && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_DESL); + else if ((r&0xFF)==PT_PLNT && 5>(rand()%100)) + sim->create_part(r>>8, x+rx, y+ry, PT_WOOD); + else if ((r&0xFF)==PT_DESL && 15>(rand()%1000)) + sim->part_change_type(r>>8,x+rx,y+ry,PT_GAS); + else if ((r&0xFF)==PT_COAL && 5>(rand()%100)) + sim->create_part(r>>8, x+rx, y+ry, PT_WOOD); + else if ((r&0xFF)==PT_DUST && 5>(rand()%100)) + sim->part_change_type(r>>8, x+rx, y+ry, PT_FWRK); + else if ((r&0xFF)==PT_FWRK && 5>(rand()%100)) + parts[r>>8].ctype = PT_DUST; + else if ((r&0xFF)==PT_ACID && 5>(rand()%100)) + sim->create_part(r>>8, x+rx, y+ry, PT_ISOZ); + /*if(parts[r>>8].type>1 && parts[r>>8].type!=PT_NEUT && parts[r>>8].type-1!=PT_NEUT && parts[r>>8].type-1!=PT_STKM && + (elements[parts[r>>8].type-1].menusection==SC_LIQUID|| + elements[parts[r>>8].type-1].menusection==SC_EXPLOSIVE|| + elements[parts[r>>8].type-1].menusection==SC_GAS|| + elements[parts[r>>8].type-1].menusection==SC_POWDERS) && 15>(rand()%1000)) + parts[r>>8].type--;*/ + } + return 0; +} + + + +//#TPT-Directive ElementHeader Element_NEUT static int graphics(GRAPHICS_FUNC_ARGS) +int Element_NEUT::graphics(GRAPHICS_FUNC_ARGS) + +{ + *firea = 120; + *firer = 10; + *fireg = 80; + *fireb = 120; + + *pixel_mode |= FIRE_ADD; + return 1; +} + +//#TPT-Directive ElementHeader Element_NEUT static int create_n_parts(Simulation * sim, int n, int x, int y, float vx, float vy, float temp, int t) +int Element_NEUT::create_n_parts(Simulation * sim, int n, int x, int y, float vx, float vy, float temp, int t)//testing a new deut create part +{ + int i, c; + n = (n/50); + if (n<1) { + n = 1; + } + if (n>340) { + n = 340; + } + if (x<0 || y<0 || x>=XRES || y>=YRES || t<0 || t>=PT_NUM) + return -1; + + for (c=0; cpfree == -1) + return -1; + i = sim->pfree; + sim->pfree = sim->parts[i].life; + if (i>sim->parts_lastActiveIndex) sim->parts_lastActiveIndex = i; + + sim->parts[i].x = (float)x; + sim->parts[i].y = (float)y; + sim->parts[i].type = t; + sim->parts[i].life = rand()%480+480; + sim->parts[i].vx = r*cosf(a); + sim->parts[i].vy = r*sinf(a); + sim->parts[i].ctype = 0; + sim->parts[i].temp = temp; + sim->parts[i].tmp = 0; + if (t!=PT_STKM&&t!=PT_STKM2 && t!=PT_PHOT && t!=PT_NEUT && !sim->pmap[y][x]) + sim->pmap[y][x] = t|(i<<8); + else if ((t==PT_PHOT||t==PT_NEUT) && !sim->photons[y][x]) + sim->photons[y][x] = t|(i<<8); + + sim->pv[y/CELL][x/CELL] += 6.0f * CFDS; + } + return 0; +} + + +Element_NEUT::~Element_NEUT() {} \ No newline at end of file diff --git a/src/simulation/elements/NICE.cpp b/src/simulation/elements/NICE.cpp new file mode 100644 index 0000000..8c01ea4 --- /dev/null +++ b/src/simulation/elements/NICE.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_NICE PT_NICE 51 +Element_NICE::Element_NICE() +{ + Identifier = "DEFAULT_PT_NICE"; + Name = "NICE"; + Colour = PIXPACK(0xC0E0FF); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = -0.0005f* CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 100; + + Temperature = 35.0f; + HeatConduct = 46; + Description = "Nitrogen Ice."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 63.1f; + HighTemperatureTransition = PT_LNTG; + + Update = NULL; + Graphics = NULL; +} + +Element_NICE::~Element_NICE() {} \ No newline at end of file diff --git a/src/simulation/elements/NITR.cpp b/src/simulation/elements/NITR.cpp new file mode 100644 index 0000000..45877f2 --- /dev/null +++ b/src/simulation/elements/NITR.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_NITR PT_NITR 8 +Element_NITR::Element_NITR() +{ + Identifier = "DEFAULT_PT_NITR"; + Name = "NITR"; + Colour = PIXPACK(0x20E010); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.5f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.92f; + Loss = 0.97f; + Collision = 0.0f; + Gravity = 0.2f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 1000; + Explosive = 2; + Meltable = 0; + Hardness = 3; + + Weight = 23; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 50; + Description = "Liquid. Pressure sensitive explosive."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 673.0f; + HighTemperatureTransition = PT_FIRE; + + Update = NULL; + Graphics = NULL; +} + +Element_NITR::~Element_NITR() {} \ No newline at end of file diff --git a/src/simulation/elements/NONE.cpp b/src/simulation/elements/NONE.cpp new file mode 100644 index 0000000..8029bee --- /dev/null +++ b/src/simulation/elements/NONE.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_NONE PT_NONE 0 +Element_NONE::Element_NONE() +{ + Identifier = "DEFAULT_PT_NONE"; + Name = ""; + Colour = PIXPACK(0x000000); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Erases particles."; + + State = ST_NONE; + Properties = 0; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_NONE::~Element_NONE() {} \ No newline at end of file diff --git a/src/simulation/elements/NSCN.cpp b/src/simulation/elements/NSCN.cpp new file mode 100644 index 0000000..3d93645 --- /dev/null +++ b/src/simulation/elements/NSCN.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_NSCN PT_NSCN 36 +Element_NSCN::Element_NSCN() +{ + Identifier = "DEFAULT_PT_NSCN"; + Name = "NSCN"; + Colour = PIXPACK(0x505080); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "N-Type Silicon, Will not transfer current to P-Type Silicon."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1687.0f; + HighTemperatureTransition = PT_LAVA; + + Update = NULL; + Graphics = NULL; +} + +Element_NSCN::~Element_NSCN() {} \ No newline at end of file diff --git a/src/simulation/elements/NTCT.cpp b/src/simulation/elements/NTCT.cpp new file mode 100644 index 0000000..0e4d67b --- /dev/null +++ b/src/simulation/elements/NTCT.cpp @@ -0,0 +1,58 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_NTCT PT_NTCT 43 +Element_NTCT::Element_NTCT() +{ + Identifier = "DEFAULT_PT_NTCT"; + Name = "NTCT"; + Colour = PIXPACK(0x505040); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Semi-conductor. Only conducts electricity when hot (More than 100C)"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1687.0f; + HighTemperatureTransition = PT_LAVA; + + Update = &Element_NTCT::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_NTCT static int update(UPDATE_FUNC_ARGS) +int Element_NTCT::update(UPDATE_FUNC_ARGS) + { + if (parts[i].temp>295.0f) + parts[i].temp -= 2.5f; + return 0; +} + + +Element_NTCT::~Element_NTCT() {} \ No newline at end of file diff --git a/src/simulation/elements/NWHL.cpp b/src/simulation/elements/NWHL.cpp new file mode 100644 index 0000000..aadce99 --- /dev/null +++ b/src/simulation/elements/NWHL.cpp @@ -0,0 +1,57 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_NWHL PT_NWHL 151 +Element_NWHL::Element_NWHL() +{ + Identifier = "DEFAULT_PT_NWHL"; + Name = "WHOL"; + Colour = PIXPACK(0xFFFFFF); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 186; + Description = "White hole (Requires newtonian gravity)"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_NWHL::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_NWHL static int update(UPDATE_FUNC_ARGS) +int Element_NWHL::update(UPDATE_FUNC_ARGS) + { + sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] -= 0.1f; + return 0; +} + + +Element_NWHL::~Element_NWHL() {} \ No newline at end of file diff --git a/src/simulation/elements/O2.cpp b/src/simulation/elements/O2.cpp new file mode 100644 index 0000000..385d1f3 --- /dev/null +++ b/src/simulation/elements/O2.cpp @@ -0,0 +1,81 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_O2 PT_O2 61 +Element_O2::Element_O2() +{ + Identifier = "DEFAULT_PT_O2"; + Name = "OXYG"; + Colour = PIXPACK(0x80A0FF); + MenuVisible = 1; + MenuSection = SC_GAS; + Enabled = 1; + + Advection = 2.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.99f; + Loss = 0.30f; + Collision = -0.1f; + Gravity = 0.0f; + Diffusion = 3.0f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 1; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Gas. Ignites easily."; + + State = ST_GAS; + Properties = TYPE_GAS; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 90.0f; + LowTemperatureTransition = PT_LO2; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_O2::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_O2 static int update(UPDATE_FUNC_ARGS) +int Element_O2::update(UPDATE_FUNC_ARGS) + +{ + int r,rx,ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>=0 && x+rx>8].temp+=(rand()/(RAND_MAX/100)); + if(parts[r>>8].tmp&0x01) + parts[r>>8].temp=3473; + parts[r>>8].tmp |= 2; + } + if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM) + { + sim->create_part(i,x,y,PT_FIRE); + parts[i].temp+=(rand()/(RAND_MAX/100)); + parts[i].tmp |= 2; + } + + } + return 0; +} + + +Element_O2::~Element_O2() {} \ No newline at end of file diff --git a/src/simulation/elements/OIL.cpp b/src/simulation/elements/OIL.cpp new file mode 100644 index 0000000..3504a1f --- /dev/null +++ b/src/simulation/elements/OIL.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_OIL PT_OIL 3 +Element_OIL::Element_OIL() +{ + Identifier = "DEFAULT_PT_OIL"; + Name = "OIL"; + Colour = PIXPACK(0x404010); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 20; + Explosive = 0; + Meltable = 0; + Hardness = 5; + + Weight = 20; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 42; + Description = "Liquid. Flammable."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 333.0f; + HighTemperatureTransition = PT_GAS; + + Update = NULL; + Graphics = NULL; +} + +Element_OIL::~Element_OIL() {} \ No newline at end of file diff --git a/src/simulation/elements/PBCN.cpp b/src/simulation/elements/PBCN.cpp new file mode 100644 index 0000000..270bfb5 --- /dev/null +++ b/src/simulation/elements/PBCN.cpp @@ -0,0 +1,157 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PBCN PT_PBCN 153 +Element_PBCN::Element_PBCN() +{ + Identifier = "DEFAULT_PT_PBCN"; + Name = "PBCN"; + Colour = PIXPACK(0x3B1D0A); + MenuVisible = 1; + MenuSection = SC_POWERED; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.97f; + Loss = 0.50f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 12; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Powered breakable clone"; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_PBCN::update; + Graphics = &Element_PBCN::graphics; +} + +//#TPT-Directive ElementHeader Element_PBCN static int update(UPDATE_FUNC_ARGS) +int Element_PBCN::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (!parts[i].tmp2 && sim->pv[y/CELL][x/CELL]>4.0f) + parts[i].tmp2 = rand()%40+80; + if (parts[i].tmp2) + { + float advection = 0.1f; + parts[i].vx += advection*sim->vx[y/CELL][x/CELL]; + parts[i].vy += advection*sim->vy[y/CELL][x/CELL]; + parts[i].tmp2--; + if(!parts[i].tmp2){ + sim->kill_part(i); + return 1; + } + } + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_SPRK && + (r&0xFF)!=PT_NSCN && (r&0xFF)!=PT_PSCN && + (r&0xFF)!=PT_STKM && (r&0xFF)!=PT_STKM2 && + (r&0xFF)!=PT_PBCN && (r&0xFF)>8].ctype; + } + } + if (parts[i].life==10) + { + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x + rx, y + ry, + parts[i].ctype); + if (r != -1) + { + parts[r].vx = rx * 3; + parts[r].vy = ry * 3; + if (r>i) + { + // Make sure movement doesn't happen until next frame, to avoid gaps in the beams of photons produced + parts[r].flags |= FLAG_SKIPMOVE; + } + } + } + } + } + } + else if (parts[i].ctype==PT_LIFE) {//create life a different way + for (rx=-1; rx<2; rx++) { + for (ry=-1; ry<2; ry++) { + sim->create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); + } + } + } else { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_PBCN static int graphics(GRAPHICS_FUNC_ARGS) +int Element_PBCN::graphics(GRAPHICS_FUNC_ARGS) + +{ + int lifemod = ((cpart->life>10?10:cpart->life)*10); + *colr += lifemod; + *colg += lifemod/2; + return 0; +} + + +Element_PBCN::~Element_PBCN() {} \ No newline at end of file diff --git a/src/simulation/elements/PCLN.cpp b/src/simulation/elements/PCLN.cpp new file mode 100644 index 0000000..14991b5 --- /dev/null +++ b/src/simulation/elements/PCLN.cpp @@ -0,0 +1,147 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PCLN PT_PCLN 74 +Element_PCLN::Element_PCLN() +{ + Identifier = "DEFAULT_PT_PCLN"; + Name = "PCLN"; + Colour = PIXPACK(0x3B3B0A); + MenuVisible = 1; + MenuSection = SC_POWERED; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Solid. When activated, duplicates any particles it touches."; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_PCLN::update; + Graphics = &Element_PCLN::graphics; +} + +//#TPT-Directive ElementHeader Element_PCLN static int update(UPDATE_FUNC_ARGS) +int Element_PCLN::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life>0 && parts[r>>8].life<4) + { + if (parts[r>>8].ctype==PT_PSCN) + parts[i].life = 10; + else if (parts[r>>8].ctype==PT_NSCN) + parts[i].life = 9; + } + if ((r&0xFF)==PT_PCLN) + { + if (parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[i].life==0&&parts[r>>8].life==10) + parts[i].life = 10; + } + } + if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT))) + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (!r) + r = pmap[y+ry][x+rx]; + if (!r) + continue; + if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && + (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_SPRK && + (r&0xFF)!=PT_NSCN && (r&0xFF)!=PT_PSCN && + (r&0xFF)!=PT_STKM && (r&0xFF)!=PT_STKM2 && + (r&0xFF)!=PT_PBCN && (r&0xFF)>8].ctype; + } + } + if (parts[i].ctype>0 && parts[i].ctypecreate_part(-1, x + rx, y + ry, + parts[i].ctype); + if (r != -1) + { + parts[r].vx = rx * 3; + parts[r].vy = ry * 3; + if (r>i) + { + // Make sure movement doesn't happen until next frame, to avoid gaps in the beams of photons produced + parts[r].flags |= FLAG_SKIPMOVE; + } + } + } + } + } + } + else if (parts[i].ctype==PT_LIFE) {//create life a different way + for (rx=-1; rx<2; rx++) { + for (ry=-1; ry<2; ry++) { + sim->create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); + } + } + } else { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_PCLN static int graphics(GRAPHICS_FUNC_ARGS) +int Element_PCLN::graphics(GRAPHICS_FUNC_ARGS) + +{ + int lifemod = ((cpart->life>10?10:cpart->life)*10); + *colr += lifemod; + *colg += lifemod; + return 0; +} + + +Element_PCLN::~Element_PCLN() {} \ No newline at end of file diff --git a/src/simulation/elements/PHOT.cpp b/src/simulation/elements/PHOT.cpp new file mode 100644 index 0000000..a32c81f --- /dev/null +++ b/src/simulation/elements/PHOT.cpp @@ -0,0 +1,139 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PHOT PT_PHOT 31 +Element_PHOT::Element_PHOT() +{ + Identifier = "DEFAULT_PT_PHOT"; + Name = "PHOT"; + Colour = PIXPACK(0xFFFFFF); + MenuVisible = 1; + MenuSection = SC_NUCLEAR; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 1.00f; + Collision = -0.99f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = -1; + + Temperature = R_TEMP+900.0f+273.15f; + HeatConduct = 251; + Description = "Photons. Travel in straight lines."; + + State = ST_GAS; + Properties = TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_PHOT::update; + Graphics = &Element_PHOT::graphics; +} + +//#TPT-Directive ElementHeader Element_PHOT static int update(UPDATE_FUNC_ARGS) +int Element_PHOT::update(UPDATE_FUNC_ARGS) + { + int r, rt, rx, ry; + float rr, rrr; + parts[i].pavg[0] = x; + parts[i].pavg[1] = y; + if (!(parts[i].ctype&0x3FFFFFFF)) { + sim->kill_part(i); + return 1; + } + if (1>rand()%10) Element_FIRE::update(UPDATE_FUNC_SUBCALL_ARGS); + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>=0 && x+rx(rand()%2000)) + { + parts[i].vx *= 0.90; + parts[i].vy *= 0.90; + sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); + rrr = (rand()%360)*3.14159f/180.0f; + rr = (rand()%128+128)/127.0f; + parts[r>>8].vx = rr*cosf(rrr); + parts[r>>8].vy = rr*sinf(rrr); + sim->pv[y/CELL][x/CELL] -= 15.0f * CFDS; + } + if ((r&0xFF)==PT_ISZS && 5>(rand()%2000)) + { + parts[i].vx *= 0.90; + parts[i].vy *= 0.90; + sim->create_part(r>>8, x+rx, y+ry, PT_PHOT); + rr = (rand()%228+128)/127.0f; + rrr = (rand()%360)*3.14159f/180.0f; + parts[r>>8].vx = rr*cosf(rrr); + parts[r>>8].vy = rr*sinf(rrr); + sim->pv[y/CELL][x/CELL] -= 15.0f * CFDS; + } + } + r = pmap[y][x]; + if((r&0xFF) == PT_QRTZ && r)// && parts[i].ctype==0x3FFFFFFF) + { + float a = (rand()%360)*3.14159f/180.0f; + parts[i].vx = 3.0f*cosf(a); + parts[i].vy = 3.0f*sinf(a); + if(parts[i].ctype == 0x3FFFFFFF) + parts[i].ctype = 0x1F<<(rand()%26); + parts[i].life++; //Delay death + } + //r = pmap[y][x]; + //rt = r&0xFF; + /*if (rt==PT_CLNE || rt==PT_PCLN || rt==PT_BCLN || rt==PT_PBCN) { + if (!parts[r>>8].ctype) + parts[r>>8].ctype = PT_PHOT; + }*/ + + return 0; +} + + + +//#TPT-Directive ElementHeader Element_PHOT static int graphics(GRAPHICS_FUNC_ARGS) +int Element_PHOT::graphics(GRAPHICS_FUNC_ARGS) + +{ + int x = 0; + *colr = *colg = *colb = 0; + for (x=0; x<12; x++) { + *colr += (cpart->ctype >> (x+18)) & 1; + *colb += (cpart->ctype >> x) & 1; + } + for (x=0; x<12; x++) + *colg += (cpart->ctype >> (x+9)) & 1; + x = 624/(*colr+*colg+*colb+1); + *colr *= x; + *colg *= x; + *colb *= x; + + *firea = 100; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode |= FIRE_ADD; + return 0; +} + + +Element_PHOT::~Element_PHOT() {} \ No newline at end of file diff --git a/src/simulation/elements/PIPE.cpp b/src/simulation/elements/PIPE.cpp new file mode 100644 index 0000000..216d3d7 --- /dev/null +++ b/src/simulation/elements/PIPE.cpp @@ -0,0 +1,390 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PIPE PT_PIPE 99 +Element_PIPE::Element_PIPE() +{ + Identifier = "DEFAULT_PT_PIPE"; + Name = "PIPE"; + Colour = PIXPACK(0x444444); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.95f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = 273.15f; + HeatConduct = 0; + Description = "Moves elements around, read FAQ on website for help."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 10.0f; + HighPressureTransition = PT_BRMT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_PIPE::update; + Graphics = &Element_PIPE::graphics; +} + +#define PFLAG_NORMALSPEED 0x00010000 + +signed char pos_1_rx[] = {-1,-1,-1, 0, 0, 1, 1, 1}; +signed char pos_1_ry[] = {-1, 0, 1,-1, 1,-1, 0, 1}; + +//#TPT-Directive ElementHeader Element_PIPE static int update(UPDATE_FUNC_ARGS) +int Element_PIPE::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, np; + int rnd, rndstore; + if (parts[i].ctype>=2 && parts[i].ctype<=4) + { + if (parts[i].life==3) + { + int lastneighbor = -1; + int neighborcount = 0; + int count = 0; + // make automatic pipe pattern + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].ctype==1) + { + parts[r>>8].ctype = (((parts[i].ctype)%3)+2);//reverse + parts[r>>8].life = 6; + if ( parts[i].tmp&0x100)//is a single pixel pipe + { + parts[r>>8].tmp |= 0x200;//will transfer to a single pixel pipe + parts[r>>8].tmp |= count<<10;//coords of where it came from + } + neighborcount ++; + lastneighbor = r>>8; + } + else if ((r&0xFF)==PT_PIPE&&parts[r>>8].ctype!=(((parts[i].ctype-1)%3)+2)) + { + neighborcount ++; + lastneighbor = r>>8; + } + count++; + } + if(neighborcount == 1) + parts[lastneighbor].tmp |= 0x100; + } + else + { + if (parts[i].flags&PFLAG_NORMALSPEED)//skip particle push to prevent particle number being higher causeing speed up + { + parts[i].tmp2 &= ~PFLAG_NORMALSPEED; + } + else + { + pushParticle(sim, i,0,i); + } + + if (nt)//there is something besides PIPE around current particle + { + rndstore = rand(); + rnd = rndstore&7; + rndstore = rndstore>>3; + rx = pos_1_rx[rnd]; + ry = pos_1_ry[rnd]; + if (x+rx>=0 && y+ry>=0 && x+rxphotons[y+ry][x+rx]; + if (surround_space && !r && (parts[i].tmp&0xFF)!=0) //creating at end + { + np = sim->create_part(-1,x+rx,y+ry,parts[i].tmp&0xFF); + if (np!=-1) + { + parts[np].temp = parts[i].temp;//pipe saves temp and life now + parts[np].life = parts[i].tmp2; + parts[np].tmp = parts[i].pavg[0]; + parts[np].ctype = parts[i].pavg[1]; + parts[i].tmp &= ~0xFF; + } + } + //try eating particle at entrance + else if ((parts[i].tmp&0xFF) == 0 && (sim->elements[r&0xFF].Falldown!= 0 || sim->elements[r&0xFF].State == ST_GAS)) + { + if ((r&0xFF)==PT_SOAP) + sim->detach(r>>8); + parts[i].tmp = (parts[i].tmp&~0xFF) | parts[r>>8].type; + parts[i].temp = parts[r>>8].temp; + parts[i].tmp2 = parts[r>>8].life; + parts[i].pavg[0] = parts[r>>8].tmp; + parts[i].pavg[1] = parts[r>>8].ctype; + sim->kill_part(r>>8); + } + else if ((parts[i].tmp&0xFF) == 0 && (r&0xFF)==PT_STOR && parts[r>>8].tmp && (sim->elements[parts[r>>8].tmp].Falldown!= 0 || sim->elements[parts[r>>8].tmp].State == ST_GAS)) + { + parts[i].tmp = parts[r>>8].tmp; + parts[i].temp = parts[r>>8].temp; + parts[i].tmp2 = parts[r>>8].tmp2; + parts[i].pavg[0] = parts[r>>8].pavg[0]; + parts[i].pavg[1] = parts[r>>8].pavg[1]; + parts[r>>8].tmp = 0; + parts[r>>8].life = 0; + } + } + } + } + } + else if (!parts[i].ctype && parts[i].life<=10) + { + if (parts[i].temp<272.15)//manual pipe colors + { + if (parts[i].temp>173.25&&parts[i].temp<273.15) + { + parts[i].ctype = 2; + parts[i].life = 0; + } + if (parts[i].temp>73.25&&parts[i].temp<=173.15) + { + parts[i].ctype = 3; + parts[i].life = 0; + } + if (parts[i].temp>=0&&parts[i].temp<=73.15) + { + parts[i].ctype = 4; + parts[i].life = 0; + } + } + else + { + // make a border + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + { + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_BRCK);//BRCK border, people didn't like DMND + } + } + if (parts[i].life<=1) + parts[i].ctype = 1; + } + } + else if (parts[i].ctype==1)//wait for empty space before starting to generate automatic pipe pattern + { + if (!parts[i].life) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_ALLOWAIR && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_WALL && sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_WALLELEC && (sim->bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_EWALL || sim->emap[(y+ry)/CELL][(x+rx)/CELL])) + parts[i].life=50; + } + } + else if (parts[i].life==5)//check for beginning of pipe single pixel + { + int issingle = 1; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxtmp&0xFF)>0 && (cpart->tmp&0xFF)tmp&0xFF; + tpart.temp = cpart->temp; + tpart.life = cpart->tmp2; + tpart.tmp = cpart->pavg[0]; + tpart.ctype = cpart->pavg[1]; + t = tpart.type; + if (ren->graphicscache[t].isready) + { + *pixel_mode = ren->graphicscache[t].pixel_mode; + *colr = ren->graphicscache[t].colr; + *colg = ren->graphicscache[t].colg; + *colb = ren->graphicscache[t].colb; + *firea = ren->graphicscache[t].firea; + *firer = ren->graphicscache[t].firer; + *fireg = ren->graphicscache[t].fireg; + *fireb = ren->graphicscache[t].fireb; + } + else + { + *colr = PIXR(ren->sim->elements[t].Colour); + *colg = PIXR(ren->sim->elements[t].Colour); + *colb = PIXR(ren->sim->elements[t].Colour); + if (ren->sim->elements[t].Graphics) + { + (*(ren->sim->elements[t].Graphics))(ren, &tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); + } + else + { + Element::defaultGraphics(ren, &tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); + } + } + //*colr = PIXR(elements[cpart->tmp&0xFF].pcolors); + //*colg = PIXG(elements[cpart->tmp&0xFF].pcolors); + //*colb = PIXB(elements[cpart->tmp&0xFF].pcolors); + } + else + { + if (cpart->ctype==2) + { + *colr = 50; + *colg = 1; + *colb = 1; + } + else if (cpart->ctype==3) + { + *colr = 1; + *colg = 50; + *colb = 1; + } + else if (cpart->ctype==4) + { + *colr = 1; + *colg = 1; + *colb = 50; + } + else if (cpart->temp<272.15&&cpart->ctype!=1) + { + if (cpart->temp>173.25&&cpart->temp<273.15) + { + *colr = 50; + *colg = 1; + *colb = 1; + } + if (cpart->temp>73.25&&cpart->temp<=173.15) + { + *colr = 1; + *colg = 50; + *colb = 1; + } + if (cpart->temp>=0&&cpart->temp<=73.15) + { + *colr = 1; + *colg = 1; + *colb = 50; + } + } + } + return 0; +} + +//#TPT-Directive ElementHeader Element_PIPE static void pushParticle(Simulation * sim, int i, int count, int original) +void Element_PIPE::pushParticle(Simulation * sim, int i, int count, int original) +{ + int rndstore, rnd, rx, ry, r, x, y, np, q, notctype=(((sim->parts[i].ctype)%3)+2); + if ((sim->parts[i].tmp&0xFF) == 0 || count >= 2)//don't push if there is nothing there, max speed of 2 per frame + return; + x = (int)(sim->parts[i].x+0.5f); + y = (int)(sim->parts[i].y+0.5f); + if( !(sim->parts[i].tmp&0x200) ) + { + //normal random push + rndstore = rand(); + // RAND_MAX is at least 32767 on all platforms i.e. pow(8,5)-1 + // so can go 5 cycles without regenerating rndstore + for (q=0; q<3; q++)//try to push twice + { + rnd = rndstore&7; + rndstore = rndstore>>3; + rx = pos_1_rx[rnd]; + ry = pos_1_ry[rnd]; + if (x+rx>=0 && y+ry>=0 && x+rxpmap[y+ry][x+rx]; + if (!r) + continue; + else if ((r&0xFF)==PT_PIPE && sim->parts[r>>8].ctype!=notctype && (sim->parts[r>>8].tmp&0xFF)==0) + { + sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); + sim->parts[r>>8].temp = sim->parts[i].temp; + sim->parts[r>>8].tmp2 = sim->parts[i].tmp2; + sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; + sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; + if (r>>8 > original) + sim->parts[r>>8].flags |= PFLAG_NORMALSPEED;//skip particle push, normalizes speed + sim->parts[i].tmp &= ~0xFF; + count++; + pushParticle(sim, r>>8,count,original); + } + } + } + } + else //predefined 1 pixel thick pipe movement + { + int coords = 7 - ((sim->parts[i].tmp>>10)&7); + r = sim->pmap[y+ pos_1_ry[coords]][x+ pos_1_rx[coords]]; + if (!r) + { + } + else if ((r&0xFF)==PT_PIPE && sim->parts[r>>8].ctype!=notctype && (sim->parts[r>>8].tmp&0xFF)==0) + { + sim->parts[r>>8].tmp = (sim->parts[r>>8].tmp&~0xFF) | (sim->parts[i].tmp&0xFF); + sim->parts[r>>8].temp = sim->parts[i].temp; + sim->parts[r>>8].tmp2 = sim->parts[i].tmp2; + sim->parts[r>>8].pavg[0] = sim->parts[i].pavg[0]; + sim->parts[r>>8].pavg[1] = sim->parts[i].pavg[1]; + if (r>>8 > original) + sim->parts[r>>8].flags |= PFLAG_NORMALSPEED;//skip particle push, normalizes speed + sim->parts[i].tmp &= ~0xFF; + count++; + pushParticle(sim, r>>8,count,original); + } + + + } + return; +} + + +Element_PIPE::~Element_PIPE() {} \ No newline at end of file diff --git a/src/simulation/elements/PLEX.cpp b/src/simulation/elements/PLEX.cpp new file mode 100644 index 0000000..ec5ad17 --- /dev/null +++ b/src/simulation/elements/PLEX.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PLEX PT_PLEX 11 +Element_PLEX::Element_PLEX() +{ + Identifier = "DEFAULT_PT_PLEX"; + Name = "C-4"; + Colour = PIXPACK(0xD080E0); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 1000; + Explosive = 2; + Meltable = 50; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 88; + Description = "Solid. Pressure sensitive explosive."; + + State = ST_SOLID; + Properties = TYPE_SOLID | PROP_NEUTPENETRATE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 673.0f; + HighTemperatureTransition = PT_FIRE; + + Update = NULL; + Graphics = NULL; +} + +Element_PLEX::~Element_PLEX() {} \ No newline at end of file diff --git a/src/simulation/elements/PLNT.cpp b/src/simulation/elements/PLNT.cpp new file mode 100644 index 0000000..17feda7 --- /dev/null +++ b/src/simulation/elements/PLNT.cpp @@ -0,0 +1,106 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PLNT PT_PLNT 20 +Element_PLNT::Element_PLNT() +{ + Identifier = "DEFAULT_PT_PLNT"; + Name = "PLNT"; + Colour = PIXPACK(0x0CAC00); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.95f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 20; + Explosive = 0; + Meltable = 0; + Hardness = 10; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 65; + Description = "Plant, drinks water and grows."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_NEUTPENETRATE|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 573.0f; + HighTemperatureTransition = PT_FIRE; + + Update = &Element_PLNT::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_PLNT static int update(UPDATE_FUNC_ARGS) +int Element_PLNT::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, np; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) + { + np = sim->create_part(r>>8,x+rx,y+ry,PT_PLNT); + if (np<0) continue; + parts[np].life = 0; + } + else if ((r&0xFF)==PT_LAVA && 1>(rand()%250)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + else if (((r&0xFF)==PT_SMKE || (r&0xFF)==PT_CO2) && (1>rand()%250)) + { + sim->kill_part(r>>8); + parts[i].life = rand()%60 + 60; + } + else if ((r&0xFF)==PT_WOOD && (1>rand()%20) && abs(rx+ry)<=2 && sim->VINE_MODE) + { + int nnx = rand()%3 -1; + int nny = rand()%3 -1; + if (x+rx+nnx>=0 && y+ry+nny>0 && x+rx+nnxcreate_part(-1,x+rx+nnx,y+ry+nny,PT_VINE); + if (np<0) continue; + parts[np].temp = parts[i].temp; + } + } + } + if (parts[i].life==2) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_O2); + } + parts[i].life = 0; + } + return 0; +} + + +Element_PLNT::~Element_PLNT() {} \ No newline at end of file diff --git a/src/simulation/elements/PLSM.cpp b/src/simulation/elements/PLSM.cpp new file mode 100644 index 0000000..4812b84 --- /dev/null +++ b/src/simulation/elements/PLSM.cpp @@ -0,0 +1,70 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PLSM PT_PLSM 49 +Element_PLSM::Element_PLSM() +{ + Identifier = "DEFAULT_PT_PLSM"; + Name = "PLSM"; + Colour = PIXPACK(0xBB99FF); + MenuVisible = 1; + MenuSection = SC_GAS; + Enabled = 1; + + Advection = 0.9f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.97f; + Loss = 0.20f; + Collision = 0.0f; + Gravity = -0.1f; + Diffusion = 0.30f; + HotAir = 0.001f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 1; + + Temperature = 10000.0f +273.15f; + HeatConduct = 5; + Description = "Plasma, extremely hot."; + + State = ST_NONE; + Properties = TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_FIRE::update; + Graphics = &Element_PLSM::graphics; +} + +//#TPT-Directive ElementHeader Element_PLSM static int graphics(GRAPHICS_FUNC_ARGS) +int Element_PLSM::graphics(GRAPHICS_FUNC_ARGS) + +{ + int caddress = restrict_flt(restrict_flt((float)cpart->life, 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); + *colr = (unsigned char)ren->plasma_data[caddress]; + *colg = (unsigned char)ren->plasma_data[caddress+1]; + *colb = (unsigned char)ren->plasma_data[caddress+2]; + + *firea = 255; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + + *pixel_mode = PMODE_GLOW | PMODE_ADD; //Clear default, don't draw pixel + *pixel_mode |= FIRE_ADD; + //Returning 0 means dynamic, do not cache + return 0; +} + + +Element_PLSM::~Element_PLSM() {} \ No newline at end of file diff --git a/src/simulation/elements/PLUT.cpp b/src/simulation/elements/PLUT.cpp new file mode 100644 index 0000000..688ea35 --- /dev/null +++ b/src/simulation/elements/PLUT.cpp @@ -0,0 +1,60 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PLUT PT_PLUT 19 +Element_PLUT::Element_PLUT() +{ + Identifier = "DEFAULT_PT_PLUT"; + Name = "PLUT"; + Colour = PIXPACK(0x407020); + MenuVisible = 1; + MenuSection = SC_NUCLEAR; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.99f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.4f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 90; + + Temperature = R_TEMP+4.0f +273.15f; + HeatConduct = 251; + Description = "Heavy particles. Fissile. Generates neutrons under pressure."; + + State = ST_SOLID; + Properties = TYPE_PART|PROP_NEUTPENETRATE|PROP_RADIOACTIVE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_PLUT::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_PLUT static int update(UPDATE_FUNC_ARGS) +int Element_PLUT::update(UPDATE_FUNC_ARGS) + { + if (1>rand()%100 && ((int)(5.0f*sim->pv[y/CELL][x/CELL]))>(rand()%1000)) + { + sim->create_part(i, x, y, PT_NEUT); + } + return 0; +} + + +Element_PLUT::~Element_PLUT() {} \ No newline at end of file diff --git a/src/simulation/elements/PQRT.cpp b/src/simulation/elements/PQRT.cpp new file mode 100644 index 0000000..8c51947 --- /dev/null +++ b/src/simulation/elements/PQRT.cpp @@ -0,0 +1,168 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PQRT PT_PQRT 133 +Element_PQRT::Element_PQRT() +{ + Identifier = "DEFAULT_PT_PQRT"; + Name = "PQRT"; + Colour = PIXPACK(0x88BBBB); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.94f; + Loss = 0.95f; + Collision = -0.1f; + Gravity = 0.27f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 90; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 3; + Description = "Broken quartz."; + + State = ST_SOLID; + Properties = TYPE_PART| PROP_HOT_GLOW; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 2573.15f; + HighTemperatureTransition = PT_LAVA; + + Update = &Element_PQRT::update; + Graphics = &Element_PQRT::graphics; +} + +//#TPT-Directive ElementHeader Element_PQRT static int update(UPDATE_FUNC_ARGS) +int Element_PQRT::update(UPDATE_FUNC_ARGS) + { + int r, tmp, trade, rx, ry, np, t; + t = parts[i].type; + if (t == PT_QRTZ) + { + parts[i].pavg[0] = parts[i].pavg[1]; + parts[i].pavg[1] = sim->pv[y/CELL][x/CELL]; + if (parts[i].pavg[1]-parts[i].pavg[0] > 0.05*(parts[i].temp/3) || parts[i].pavg[1]-parts[i].pavg[0] < -0.05*(parts[i].temp/3)) + { + sim->part_change_type(i,x,y,PT_PQRT); + } + } + // absorb SLTW + if (parts[i].ctype!=-1) + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%2500)) + { + sim->kill_part(r>>8); + parts[i].ctype ++; + } + } + // grow if absorbed SLTW + if (parts[i].ctype>0) + { + for ( trade = 0; trade<5; trade ++) + { + rx = rand()%3-1; + ry = rand()%3-1; + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_QRTZ); + if (np>-1) + { + parts[np].tmp = parts[i].tmp; + parts[i].ctype--; + if (5>rand()%10) + { + parts[np].ctype=-1;//dead qrtz + } + else if (!parts[i].ctype && 1>rand()%15) + { + parts[i].ctype=-1; + } + + break; + } + } + } + } + } + // diffuse absorbed SLTW + if (parts[i].ctype>0) + { + for ( trade = 0; trade<9; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].ctype) && parts[r>>8].ctype>=0 )//diffusion + { + tmp = parts[i].ctype - parts[r>>8].ctype; + if (tmp ==1) + { + parts[r>>8].ctype ++; + parts[i].ctype --; + break; + } + if (tmp>0) + { + parts[r>>8].ctype += tmp/2; + parts[i].ctype -= tmp/2; + break; + } + } + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_PQRT static int graphics(GRAPHICS_FUNC_ARGS) +int Element_PQRT::graphics(GRAPHICS_FUNC_ARGS) + //QRTZ and PQRT +{ + int t = cpart->type, z = cpart->tmp - 5;//speckles! + /*if (cpart->temp>(ptransitions[t].thv-800.0f))//hotglow for quartz + { + float frequency = 3.1415/(2*ptransitions[t].thv-(ptransitions[t].thv-800.0f)); + int q = (cpart->temp>ptransitions[t].thv)?ptransitions[t].thv-(ptransitions[t].thv-800.0f):cpart->temp-(ptransitions[t].thv-800.0f); + *colr += sin(frequency*q) * 226 + (z * 16); + *colg += sin(frequency*q*4.55 +3.14) * 34 + (z * 16); + *colb += sin(frequency*q*2.22 +3.14) * 64 + (z * 16); + } + else*/ + { + *colr += z * 16; + *colg += z * 16; + *colb += z * 16; + } + return 0; +} + + +Element_PQRT::~Element_PQRT() {} \ No newline at end of file diff --git a/src/simulation/elements/PRTI.cpp b/src/simulation/elements/PRTI.cpp new file mode 100644 index 0000000..4d13bd1 --- /dev/null +++ b/src/simulation/elements/PRTI.cpp @@ -0,0 +1,139 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PRTI PT_PRTI 109 +Element_PRTI::Element_PRTI() +{ + Identifier = "DEFAULT_PT_PRTI"; + Name = "PRTI"; + Colour = PIXPACK(0xEB5917); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = -0.005f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "Portal IN. Things go in here, now with channels (same as WIFI)"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_PRTI::update; + Graphics = &Element_PRTI::graphics; +} + +//#TPT-Directive ElementHeader Element_PRTI static int update(UPDATE_FUNC_ARGS) +int Element_PRTI::update(UPDATE_FUNC_ARGS) + { + int r, nnx, rx, ry, fe = 0; + int count =0; + parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); + if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; + else if (parts[i].tmp<0) parts[i].tmp = 0; + for (count=0; count<8; count++) + { + rx = sim->portal_rx[count]; + ry = sim->portal_ry[count]; + if (x+rx>=0 && y+ry>0 && x+rxelements[r&0xFF].Falldown== 0 && sim->elements[r&0xFF].State != ST_GAS && (r&0xFF)!=PT_SPRK)) + { + r = sim->photons[y+ry][x+rx]; + if (!r || (r&0xFF)==PT_PRTI || (r&0xFF)==PT_PRTO || (sim->elements[r&0xFF].Falldown== 0 && sim->elements[r&0xFF].State != ST_GAS && (r&0xFF)!=PT_SPRK)) + continue; + } + + if ((r&0xFF)==PT_STKM || (r&0xFF)==PT_STKM2 || (r&0xFF)==PT_FIGH) + continue;// Handling these is a bit more complicated, and is done in STKM_interact() + + if ((r&0xFF) == PT_SOAP) + sim->detach(r>>8); + + for ( nnx=0; nnx<80; nnx++) + if (!sim->portalp[parts[i].tmp][count][nnx].type) + { + sim->portalp[parts[i].tmp][count][nnx] = parts[r>>8]; + if ((r&0xFF)==PT_SPRK) + sim->part_change_type(r>>8,x+rx,y+ry,parts[r>>8].ctype); + else + sim->kill_part(r>>8); + fe = 1; + break; + } + } + } + + + if (fe) { + int orbd[4] = {0, 0, 0, 0}; //Orbital distances + int orbl[4] = {0, 0, 0, 0}; //Orbital locations + if (!sim->parts[i].life) parts[i].life = rand()*rand()*rand(); + if (!sim->parts[i].ctype) parts[i].ctype = rand()*rand()*rand(); + sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); + for (r = 0; r < 4; r++) { + if (orbd[r]>1) { + orbd[r] -= 12; + if (orbd[r]<1) { + orbd[r] = (rand()%128)+128; + orbl[r] = rand()%255; + } else { + orbl[r] += 2; + orbl[r] = orbl[r]%255; + } + } else { + orbd[r] = (rand()%128)+128; + orbl[r] = rand()%255; + } + } + sim->orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); + } else { + parts[i].life = 0; + parts[i].ctype = 0; + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_PRTI static int graphics(GRAPHICS_FUNC_ARGS) +int Element_PRTI::graphics(GRAPHICS_FUNC_ARGS) + +{ + *firea = 8; + *firer = 255; + *fireg = 0; + *fireb = 0; + *pixel_mode |= EFFECT_GRAVIN; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_ADD; + return 1; +} + + +Element_PRTI::~Element_PRTI() {} \ No newline at end of file diff --git a/src/simulation/elements/PRTO.cpp b/src/simulation/elements/PRTO.cpp new file mode 100644 index 0000000..788e7d1 --- /dev/null +++ b/src/simulation/elements/PRTO.cpp @@ -0,0 +1,176 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PRTO PT_PRTO 110 +Element_PRTO::Element_PRTO() +{ + Identifier = "DEFAULT_PT_PRTO"; + Name = "PRTO"; + Colour = PIXPACK(0x0020EB); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.005f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "Portal OUT. Things come out here, now with channels (same as WIFI)"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_PRTO::update; + Graphics = &Element_PRTO::graphics; +} + +//#TPT-Directive ElementHeader Element_PRTO static int update(UPDATE_FUNC_ARGS) +int Element_PRTO::update(UPDATE_FUNC_ARGS) + { + int r, nnx, rx, ry, np, fe = 0; + int count = 0; + parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); + if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; + else if (parts[i].tmp<0) parts[i].tmp = 0; + for (count=0; count<8; count++) + { + rx = sim->portal_rx[count]; + ry = sim->portal_ry[count]; + if (x+rx>=0 && y+ry>0 && x+rxportalp[parts[i].tmp][randomness][nnx].type==PT_SPRK)// TODO: make it look better, spark creation + { + sim->create_part(-1,x+1,y,PT_SPRK); + sim->create_part(-1,x+1,y+1,PT_SPRK); + sim->create_part(-1,x+1,y-1,PT_SPRK); + sim->create_part(-1,x,y-1,PT_SPRK); + sim->create_part(-1,x,y+1,PT_SPRK); + sim->create_part(-1,x-1,y+1,PT_SPRK); + sim->create_part(-1,x-1,y,PT_SPRK); + sim->create_part(-1,x-1,y-1,PT_SPRK); + sim->portalp[parts[i].tmp][randomness][nnx] = sim->emptyparticle; + break; + } + else if (sim->portalp[parts[i].tmp][randomness][nnx].type) + { + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM) + sim->player.spwn = 0; + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM2) + sim->player2.spwn = 0; + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_FIGH) + { + sim->fighcount--; + sim->fighters[(unsigned char)sim->portalp[parts[i].tmp][randomness][nnx].tmp].spwn = 0; + } + np = sim->create_part(-1, x+rx, y+ry, sim->portalp[parts[i].tmp][randomness][nnx].type); + if (np<0) + { + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM) + sim->player.spwn = 1; + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_STKM2) + sim->player2.spwn = 1; + if (sim->portalp[parts[i].tmp][randomness][nnx].type==PT_FIGH) + { + sim->fighcount++; + sim->fighters[(unsigned char)sim->portalp[parts[i].tmp][randomness][nnx].tmp].spwn = 1; + } + continue; + } + if (parts[np].type==PT_FIGH) + { + // Release the fighters[] element allocated by create_part, the one reserved when the fighter went into the portal will be used + sim->fighters[(unsigned char)parts[np].tmp].spwn = 0; + sim->fighters[(unsigned char)sim->portalp[parts[i].tmp][randomness][nnx].tmp].spwn = 1; + } + parts[np] = sim->portalp[parts[i].tmp][randomness][nnx]; + parts[np].x = x+rx; + parts[np].y = y+ry; + sim->portalp[parts[i].tmp][randomness][nnx] = sim->emptyparticle; + break; + } + } + } + } + } + if (fe) { + int orbd[4] = {0, 0, 0, 0}; //Orbital distances + int orbl[4] = {0, 0, 0, 0}; //Orbital locations + if (!sim->parts[i].life) parts[i].life = rand()*rand()*rand(); + if (!sim->parts[i].ctype) parts[i].ctype = rand()*rand()*rand(); + sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); + for (r = 0; r < 4; r++) { + if (orbd[r]<254) { + orbd[r] += 16; + if (orbd[r]>254) { + orbd[r] = 0; + orbl[r] = rand()%255; + } + else + { + orbl[r] += 1; + orbl[r] = orbl[r]%255; + } + //orbl[r] += 1; + //orbl[r] = orbl[r]%255; + } else { + orbd[r] = 0; + orbl[r] = rand()%255; + } + } + sim->orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); + } else { + parts[i].life = 0; + parts[i].ctype = 0; + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_PRTO static int graphics(GRAPHICS_FUNC_ARGS) +int Element_PRTO::graphics(GRAPHICS_FUNC_ARGS) + +{ + *firea = 8; + *firer = 0; + *fireg = 0; + *fireb = 255; + *pixel_mode |= EFFECT_GRAVOUT; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_ADD; + return 1; +} + + +Element_PRTO::~Element_PRTO() {} \ No newline at end of file diff --git a/src/simulation/elements/PSCN.cpp b/src/simulation/elements/PSCN.cpp new file mode 100644 index 0000000..54d64a1 --- /dev/null +++ b/src/simulation/elements/PSCN.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PSCN PT_PSCN 35 +Element_PSCN::Element_PSCN() +{ + Identifier = "DEFAULT_PT_PSCN"; + Name = "PSCN"; + Colour = PIXPACK(0x805050); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "P-Type Silicon, Will transfer current to any conductor."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1687.0f; + HighTemperatureTransition = PT_LAVA; + + Update = NULL; + Graphics = NULL; +} + +Element_PSCN::~Element_PSCN() {} \ No newline at end of file diff --git a/src/simulation/elements/PSTE.cpp b/src/simulation/elements/PSTE.cpp new file mode 100644 index 0000000..50ff1d2 --- /dev/null +++ b/src/simulation/elements/PSTE.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PSTE PT_PSTE 111 +Element_PSTE::Element_PSTE() +{ + Identifier = "DEFAULT_PT_PSTE"; + Name = "PSTE"; + Colour = PIXPACK(0xAA99AA); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 31; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 29; + Description = "Colloid, Hardens under pressure"; + + State = ST_LIQUID; + Properties = TYPE_LIQUID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 0.5f; + HighPressureTransition = PT_PSTS; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 747.0f; + HighTemperatureTransition = PT_BRCK; + + Update = NULL; + Graphics = NULL; +} + +Element_PSTE::~Element_PSTE() {} \ No newline at end of file diff --git a/src/simulation/elements/PSTS.cpp b/src/simulation/elements/PSTS.cpp new file mode 100644 index 0000000..cdd5cad --- /dev/null +++ b/src/simulation/elements/PSTS.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PSTS PT_PSTS 112 +Element_PSTS::Element_PSTS() +{ + Identifier = "DEFAULT_PT_PSTS"; + Name = "PSTS"; + Colour = PIXPACK(0x776677); + MenuVisible = 0; + MenuSection = SC_CRACKER; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 100; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 29; + Description = "Solid form of PSTE, temporary"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = 0.5f; + LowPressureTransition = PT_PSTE; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_PSTS::~Element_PSTS() {} \ No newline at end of file diff --git a/src/simulation/elements/PTCT.cpp b/src/simulation/elements/PTCT.cpp new file mode 100644 index 0000000..9119e1a --- /dev/null +++ b/src/simulation/elements/PTCT.cpp @@ -0,0 +1,58 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PTCT PT_PTCT 46 +Element_PTCT::Element_PTCT() +{ + Identifier = "DEFAULT_PT_PTCT"; + Name = "PTCT"; + Colour = PIXPACK(0x405050); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Semi-conductor. Only conducts electricity when cold (Less than 100C)"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1414.0f; + HighTemperatureTransition = PT_LAVA; + + Update = &Element_PTCT::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_PTCT static int update(UPDATE_FUNC_ARGS) +int Element_PTCT::update(UPDATE_FUNC_ARGS) + { + if (parts[i].temp>295.0f) + parts[i].temp -= 2.5f; + return 0; +} + + +Element_PTCT::~Element_PTCT() {} \ No newline at end of file diff --git a/src/simulation/elements/PUMP.cpp b/src/simulation/elements/PUMP.cpp new file mode 100644 index 0000000..17b4749 --- /dev/null +++ b/src/simulation/elements/PUMP.cpp @@ -0,0 +1,102 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PUMP PT_PUMP 97 +Element_PUMP::Element_PUMP() +{ + Identifier = "DEFAULT_PT_PUMP"; + Name = "PUMP"; + Colour = PIXPACK(0x0A0A3B); + MenuVisible = 1; + MenuSection = SC_POWERED; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.95f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 10; + + Weight = 100; + + Temperature = 273.15f; + HeatConduct = 0; + Description = "Changes pressure to its temp when activated. (use HEAT/COOL)."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_PUMP::update; + Graphics = &Element_PUMP::graphics; +} + +//#TPT-Directive ElementHeader Element_PUMP static int update(UPDATE_FUNC_ARGS) +int Element_PUMP::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + if (parts[i].life==10) + { + if (parts[i].temp>=256.0+273.15) + parts[i].temp=256.0+273.15; + if (parts[i].temp<= -256.0+273.15) + parts[i].temp = -256.0+273.15; + + if (sim->pv[y/CELL][x/CELL]<(parts[i].temp-273.15)) + sim->pv[y/CELL][x/CELL] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL][x/CELL]); + if (y+CELLpv[y/CELL+1][x/CELL]<(parts[i].temp-273.15)) + sim->pv[y/CELL+1][x/CELL] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL+1][x/CELL]); + if (x+CELLpv[y/CELL][x/CELL+1] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL][x/CELL+1]); + if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.1f*((parts[i].temp-273.15)-sim->pv[y/CELL+1][x/CELL+1]); + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[r>>8].life==0) + parts[r>>8].life = 10; + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_PUMP static int graphics(GRAPHICS_FUNC_ARGS) +int Element_PUMP::graphics(GRAPHICS_FUNC_ARGS) + +{ + int lifemod = ((cpart->life>10?10:cpart->life)*19); + *colb += lifemod; + return 0; +} + + +Element_PUMP::~Element_PUMP() {} \ No newline at end of file diff --git a/src/simulation/elements/PVOD.cpp b/src/simulation/elements/PVOD.cpp new file mode 100644 index 0000000..267c7bd --- /dev/null +++ b/src/simulation/elements/PVOD.cpp @@ -0,0 +1,91 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_PVOD PT_PVOD 84 +Element_PVOD::Element_PVOD() +{ + Identifier = "DEFAULT_PT_PVOD"; + Name = "PVOD"; + Colour = PIXPACK(0x792020); + MenuVisible = 1; + MenuSection = SC_POWERED; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Solid. When activated, destroys entering particles"; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_PVOD::update; + Graphics = &Element_PVOD::graphics; +} + +//#TPT-Directive ElementHeader Element_PVOD static int update(UPDATE_FUNC_ARGS) +int Element_PVOD::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life>0 && parts[r>>8].life<4) + { + if (parts[r>>8].ctype==PT_PSCN) + parts[i].life = 10; + else if (parts[r>>8].ctype==PT_NSCN) + parts[i].life = 9; + } + if ((r&0xFF)==PT_PVOD) + { + if (parts[i].life==10&&parts[r>>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[i].life==0&&parts[r>>8].life==10) + parts[i].life = 10; + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_PVOD static int graphics(GRAPHICS_FUNC_ARGS) +int Element_PVOD::graphics(GRAPHICS_FUNC_ARGS) + +{ + int lifemod = ((cpart->life>10?10:cpart->life)*16); + *colr += lifemod; + return 0; +} + + +Element_PVOD::~Element_PVOD() {} \ No newline at end of file diff --git a/src/simulation/elements/QRTZ.cpp b/src/simulation/elements/QRTZ.cpp new file mode 100644 index 0000000..20aa97d --- /dev/null +++ b/src/simulation/elements/QRTZ.cpp @@ -0,0 +1,168 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_QRTZ PT_QRTZ 132 +Element_QRTZ::Element_QRTZ() +{ + Identifier = "DEFAULT_PT_QRTZ"; + Name = "QRTZ"; + Colour = PIXPACK(0xAADDDD); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 3; + Description = "Quartz, breakable mineral. Conducts but becomes brittle at lower temperatures."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_HOT_GLOW|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 2573.15f; + HighTemperatureTransition = PT_LAVA; + + Update = &Element_QRTZ::update; + Graphics = &Element_QRTZ::graphics; +} + +//#TPT-Directive ElementHeader Element_QRTZ static int update(UPDATE_FUNC_ARGS) +int Element_QRTZ::update(UPDATE_FUNC_ARGS) + { + int r, tmp, trade, rx, ry, np, t; + t = parts[i].type; + if (t == PT_QRTZ) + { + parts[i].pavg[0] = parts[i].pavg[1]; + parts[i].pavg[1] = sim->pv[y/CELL][x/CELL]; + if (parts[i].pavg[1]-parts[i].pavg[0] > 0.05*(parts[i].temp/3) || parts[i].pavg[1]-parts[i].pavg[0] < -0.05*(parts[i].temp/3)) + { + sim->part_change_type(i,x,y,PT_PQRT); + } + } + // absorb SLTW + if (parts[i].ctype!=-1) + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%2500)) + { + sim->kill_part(r>>8); + parts[i].ctype ++; + } + } + // grow if absorbed SLTW + if (parts[i].ctype>0) + { + for ( trade = 0; trade<5; trade ++) + { + rx = rand()%3-1; + ry = rand()%3-1; + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1,x+rx,y+ry,PT_QRTZ); + if (np>-1) + { + parts[np].tmp = parts[i].tmp; + parts[i].ctype--; + if (5>rand()%10) + { + parts[np].ctype=-1;//dead qrtz + } + else if (!parts[i].ctype && 1>rand()%15) + { + parts[i].ctype=-1; + } + + break; + } + } + } + } + } + // diffuse absorbed SLTW + if (parts[i].ctype>0) + { + for ( trade = 0; trade<9; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].ctype) && parts[r>>8].ctype>=0 )//diffusion + { + tmp = parts[i].ctype - parts[r>>8].ctype; + if (tmp ==1) + { + parts[r>>8].ctype ++; + parts[i].ctype --; + break; + } + if (tmp>0) + { + parts[r>>8].ctype += tmp/2; + parts[i].ctype -= tmp/2; + break; + } + } + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_QRTZ static int graphics(GRAPHICS_FUNC_ARGS) +int Element_QRTZ::graphics(GRAPHICS_FUNC_ARGS) + //QRTZ and PQRT +{ + int t = cpart->type, z = cpart->tmp - 5;//speckles! + /*if (cpart->temp>(ptransitions[t].thv-800.0f))//hotglow for quartz + { + float frequency = 3.1415/(2*ptransitions[t].thv-(ptransitions[t].thv-800.0f)); + int q = (cpart->temp>ptransitions[t].thv)?ptransitions[t].thv-(ptransitions[t].thv-800.0f):cpart->temp-(ptransitions[t].thv-800.0f); + *colr += sin(frequency*q) * 226 + (z * 16); + *colg += sin(frequency*q*4.55 +3.14) * 34 + (z * 16); + *colb += sin(frequency*q*2.22 +3.14) * 64 + (z * 16); + } + else*/ + { + *colr += z * 16; + *colg += z * 16; + *colb += z * 16; + } + return 0; +} + + +Element_QRTZ::~Element_QRTZ() {} \ No newline at end of file diff --git a/src/simulation/elements/RBDM.cpp b/src/simulation/elements/RBDM.cpp new file mode 100644 index 0000000..1b85a15 --- /dev/null +++ b/src/simulation/elements/RBDM.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_RBDM PT_RBDM 41 +Element_RBDM::Element_RBDM() +{ + Identifier = "DEFAULT_PT_RBDM"; + Name = "RBDM"; + Colour = PIXPACK(0xCCCCCC); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 1000; + Explosive = 1; + Meltable = 50; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 240; + Description = "Rubidium, explosive, especially on contact with water, low melting point"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 312.0f; + HighTemperatureTransition = PT_LRBD; + + Update = NULL; + Graphics = NULL; +} + +Element_RBDM::~Element_RBDM() {} \ No newline at end of file diff --git a/src/simulation/elements/REPL.cpp b/src/simulation/elements/REPL.cpp new file mode 100644 index 0000000..e7eae14 --- /dev/null +++ b/src/simulation/elements/REPL.cpp @@ -0,0 +1,73 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_REPL PT_REPL 160 +Element_REPL::Element_REPL() +{ + Identifier = "DEFAULT_PT_REPL"; + Name = "RPEL"; + Colour = PIXPACK(0x99CC00); + MenuVisible = 1; + MenuSection = SC_FORCE; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = 20.0f+0.0f +273.15f; + HeatConduct = 0; + Description = "Repel or attract particles based on temp value."; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_REPL::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_REPL static int update(UPDATE_FUNC_ARGS) +int Element_REPL::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, ri; + for(ri = 0; ri <= 10; ri++) + { + rx = (rand()%20)-10; + ry = (rand()%20)-10; + if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; + + if (r && !(sim->elements[r&0xFF].Properties & TYPE_SOLID)){ + parts[r>>8].vx += isign(rx)*((parts[i].temp-273.15)/10.0f); + parts[r>>8].vy += isign(ry)*((parts[i].temp-273.15)/10.0f); + } + } + } + return 0; +} + + +Element_REPL::~Element_REPL() {} \ No newline at end of file diff --git a/src/simulation/elements/RIME.cpp b/src/simulation/elements/RIME.cpp new file mode 100644 index 0000000..e993862 --- /dev/null +++ b/src/simulation/elements/RIME.cpp @@ -0,0 +1,77 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_RIME PT_RIME 91 +Element_RIME::Element_RIME() +{ + Identifier = "DEFAULT_PT_RIME"; + Name = "RIME"; + Colour = PIXPACK(0xCCCCCC); + MenuVisible = 1; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.00f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.00f; + Loss = 1.00f; + Collision = 0.00f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 30; + + Weight = 100; + + Temperature = 243.15f; + HeatConduct = 100; + Description = "Not quite Ice"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 273.15f; + HighTemperatureTransition = PT_WATR; + + Update = &Element_RIME::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_RIME static int update(UPDATE_FUNC_ARGS) +int Element_RIME::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + parts[i].vx = 0; + parts[i].vy = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxpart_change_type(i,x,y,PT_FOG); + parts[i].life = rand()%50 + 60; + } + else if ((r&0xFF)==PT_FOG&&parts[r>>8].life>0) + { + sim->part_change_type(i,x,y,PT_FOG); + parts[i].life = parts[r>>8].life; + } + } + return 0; +} + + +Element_RIME::~Element_RIME() {} \ No newline at end of file diff --git a/src/simulation/elements/SALT.cpp b/src/simulation/elements/SALT.cpp new file mode 100644 index 0000000..5042c65 --- /dev/null +++ b/src/simulation/elements/SALT.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SALT PT_SALT 26 +Element_SALT::Element_SALT() +{ + Identifier = "DEFAULT_PT_SALT"; + Name = "SALT"; + Colour = PIXPACK(0xFFFFFF); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.94f; + Loss = 0.95f; + Collision = -0.1f; + Gravity = 0.3f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 5; + Hardness = 1; + + Weight = 75; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 110; + Description = "Salt, dissolves in water."; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1173.0f; + HighTemperatureTransition = PT_LAVA; + + Update = NULL; + Graphics = NULL; +} + +Element_SALT::~Element_SALT() {} \ No newline at end of file diff --git a/src/simulation/elements/SAND.cpp b/src/simulation/elements/SAND.cpp new file mode 100644 index 0000000..c791a0a --- /dev/null +++ b/src/simulation/elements/SAND.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SAND PT_SAND 44 +Element_SAND::Element_SAND() +{ + Identifier = "DEFAULT_PT_SAND"; + Name = "SAND"; + Colour = PIXPACK(0xFFD090); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.94f; + Loss = 0.95f; + Collision = -0.1f; + Gravity = 0.3f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 5; + Hardness = 1; + + Weight = 90; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 150; + Description = "Sand, Heavy particles. Meltable."; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 1973.0f; + HighTemperatureTransition = PT_LAVA; + + Update = NULL; + Graphics = NULL; +} + +Element_SAND::~Element_SAND() {} \ No newline at end of file diff --git a/src/simulation/elements/SHLD1.cpp b/src/simulation/elements/SHLD1.cpp new file mode 100644 index 0000000..2d48f9d --- /dev/null +++ b/src/simulation/elements/SHLD1.cpp @@ -0,0 +1,88 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SHLD1 PT_SHLD1 119 +Element_SHLD1::Element_SHLD1() +{ + Identifier = "DEFAULT_PT_SHLD1"; + Name = "SHLD"; + Colour = PIXPACK(0xAAAAAA); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "Shield, spark it to grow"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 7.0f; + HighPressureTransition = PT_NONE; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_SHLD1::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_SHLD1 static int update(UPDATE_FUNC_ARGS) +int Element_SHLD1::update(UPDATE_FUNC_ARGS) + { + int r, nnx, nny, rx, ry; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%200&&parts[i].life==0) + { + sim->part_change_type(i,x,y,PT_SHLD2); + parts[i].life = 7; + } + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + if (!pmap[y+ry+nny][x+rx+nnx]) + { + sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + //parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; + } + } + } + else if ((r&0xFF)==PT_SHLD3&&4>rand()%10) + { + sim->part_change_type(i,x,y,PT_SHLD2); + parts[i].life = 7; + } + } + return 0; +} + + + +Element_SHLD1::~Element_SHLD1() {} \ No newline at end of file diff --git a/src/simulation/elements/SHLD2.cpp b/src/simulation/elements/SHLD2.cpp new file mode 100644 index 0000000..cdb72e9 --- /dev/null +++ b/src/simulation/elements/SHLD2.cpp @@ -0,0 +1,91 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SHLD2 PT_SHLD2 120 +Element_SHLD2::Element_SHLD2() +{ + Identifier = "DEFAULT_PT_SHLD2"; + Name = "SHD2"; + Colour = PIXPACK(0x777777); + MenuVisible = 0; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "Shield lvl 2"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 15.0f; + HighPressureTransition = PT_NONE; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_SHLD2::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_SHLD2 static int update(UPDATE_FUNC_ARGS) +int Element_SHLD2::update(UPDATE_FUNC_ARGS) + { + int r, nnx, nny, rx, ry, np; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx0) + sim->create_part(-1,x+rx,y+ry,PT_SHLD1); + if (!r) + continue; + else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) + { + if (25>rand()%200&&parts[i].life==0) + { + sim->part_change_type(i,x,y,PT_SHLD3); + parts[i].life = 7; + } + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + if (!pmap[y+ry+nny][x+rx+nnx]) + { + np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + } + } + } + else if ((r&0xFF)==PT_SHLD4&&4>rand()%10) + { + sim->part_change_type(i,x,y,PT_SHLD3); + parts[i].life = 7; + } + } + return 0; +} + + + +Element_SHLD2::~Element_SHLD2() {} \ No newline at end of file diff --git a/src/simulation/elements/SHLD3.cpp b/src/simulation/elements/SHLD3.cpp new file mode 100644 index 0000000..c90a1d8 --- /dev/null +++ b/src/simulation/elements/SHLD3.cpp @@ -0,0 +1,101 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SHLD3 PT_SHLD3 121 +Element_SHLD3::Element_SHLD3() +{ + Identifier = "DEFAULT_PT_SHLD3"; + Name = "SHD3"; + Colour = PIXPACK(0x444444); + MenuVisible = 0; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "Shield lvl 3"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 25.0f; + HighPressureTransition = PT_NONE; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_SHLD3::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_SHLD3 static int update(UPDATE_FUNC_ARGS) +int Element_SHLD3::update(UPDATE_FUNC_ARGS) + { + int r, nnx, nny, rx, ry, np; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%2500) + { + np = sim->create_part(-1,x+rx,y+ry,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + sim->part_change_type(i,x,y,PT_SHLD2); + } + else + continue; + + } + if ((r&0xFF)==PT_SHLD1 && parts[i].life>3) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_SHLD2); + parts[r>>8].life=7; + } + else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) + { + if (18>rand()%3000&&parts[i].life==0) + { + sim->part_change_type(i,x,y,PT_SHLD4); + parts[i].life = 7; + } + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + + if (!pmap[y+ry+nny][x+rx+nnx]) + { + np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + } + } + } + } + return 0; +} + + + +Element_SHLD3::~Element_SHLD3() {} \ No newline at end of file diff --git a/src/simulation/elements/SHLD4.cpp b/src/simulation/elements/SHLD4.cpp new file mode 100644 index 0000000..0aa38e8 --- /dev/null +++ b/src/simulation/elements/SHLD4.cpp @@ -0,0 +1,92 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SHLD4 PT_SHLD4 122 +Element_SHLD4::Element_SHLD4() +{ + Identifier = "DEFAULT_PT_SHLD4"; + Name = "SHD4"; + Colour = PIXPACK(0x212121); + MenuVisible = 0; + MenuSection = SC_CRACKER2; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "Shield lvl 4"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 40.0f; + HighPressureTransition = PT_NONE; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_SHLD4::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_SHLD4 static int update(UPDATE_FUNC_ARGS) +int Element_SHLD4::update(UPDATE_FUNC_ARGS) + { + int r, nnx, nny, rx, ry, np; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxrand()%5500) + { + np = sim->create_part(-1,x+rx,y+ry,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + sim->part_change_type(i,x,y,PT_SHLD2); + } + else + continue; + + } + if ((r&0xFF)==PT_SHLD2 && parts[i].life>3) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_SHLD3); + parts[r>>8].life = 7; + } + else if ((r&0xFF)==PT_SPRK&&parts[i].life==0) + for ( nnx=-1; nnx<2; nnx++) + for ( nny=-1; nny<2; nny++) + { + if (!pmap[y+ry+nny][x+rx+nnx]) + { + np = sim->create_part(-1,x+rx+nnx,y+ry+nny,PT_SHLD1); + if (np<0) continue; + parts[np].life=7; + } + } + } + return 0; +} + + +Element_SHLD4::~Element_SHLD4() {} \ No newline at end of file diff --git a/src/simulation/elements/SING.cpp b/src/simulation/elements/SING.cpp new file mode 100644 index 0000000..ea0c8c7 --- /dev/null +++ b/src/simulation/elements/SING.cpp @@ -0,0 +1,155 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SING PT_SING 131 +Element_SING::Element_SING() +{ + Identifier = "DEFAULT_PT_SING"; + Name = "SING"; + Colour = PIXPACK(0x242424); + MenuVisible = 1; + MenuSection = SC_NUCLEAR; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.36f * CFDS; + AirLoss = 0.96f; + Loss = 0.80f; + Collision = 0.1f; + Gravity = 0.12f; + Diffusion = 0.00f; + HotAir = -0.001f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 86; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Singularity"; + + State = ST_SOLID; + Properties = TYPE_PART|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_SING::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_SING static int update(UPDATE_FUNC_ARGS) +int Element_SING::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, cry, crx, rad, nxi, nxj, nb, j, spawncount; + int singularity = -parts[i].life; + float angle, v; + + if (sim->pv[y/CELL][x/CELL]pv[y/CELL][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL]); + if (y+CELLpv[y/CELL+1][x/CELL]pv[y/CELL+1][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL+1][x/CELL]); + if (x+CELLpv[y/CELL][x/CELL+1] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL+1]); + if (y+CELLpv[y/CELL+1][x/CELL+1] += 0.1f*(singularity-sim->pv[y/CELL+1][x/CELL+1]); + } + if (y+CELL>0 && sim->pv[y/CELL-1][x/CELL]pv[y/CELL-1][x/CELL] += 0.1f*(singularity-sim->pv[y/CELL-1][x/CELL]); + if (x+CELL>0) + { + sim->pv[y/CELL][x/CELL-1] += 0.1f*(singularity-sim->pv[y/CELL][x/CELL-1]); + if (y+CELL>0) + sim->pv[y/CELL-1][x/CELL-1] += 0.1f*(singularity-sim->pv[y/CELL-1][x/CELL-1]); + } + if (parts[i].life<1) { + //Pop! + for (rx=-2; rx<3; rx++) { + crx = (x/CELL)+rx; + for (ry=-2; ry<3; ry++) { + cry = (y/CELL)+ry; + if (cry > 0 && crx > 0 && crx < (XRES/CELL) && cry < (YRES/CELL)) { + sim->pv[cry][crx] += (float)parts[i].tmp; + } + } + } + spawncount = (parts[i].tmp>255)?255:parts[i].tmp; + if (spawncount>=1) + spawncount = spawncount/8; + spawncount = spawncount*spawncount*M_PI; + for (j=0;jcreate_part(-3, x, y, PT_PHOT); + break; + case 1: + nb = sim->create_part(-3, x, y, PT_NEUT); + break; + case 2: + nb = sim->create_part(-3, x, y, PT_ELEC); + break; + } + if (nb!=-1) { + parts[nb].life = (rand()%300); + parts[nb].temp = MAX_TEMP/2; + angle = rand()*2.0f*M_PI/RAND_MAX; + v = (float)(rand())*5.0f/RAND_MAX; + parts[nb].vx = v*cosf(angle); + parts[nb].vy = v*sinf(angle); + } + else if (sim->pfree==-1) + break;//if we've run out of particles, stop trying to create them - saves a lot of lag on "sing bomb" saves + } + sim->kill_part(i); + return 1; + } + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=rand()/(RAND_MAX/100)+1) + { + if ((r&0xFF)==PT_SING && parts[r>>8].life >10) + { + if (parts[i].life+parts[r>>8].life > 255) + continue; + parts[i].life += parts[r>>8].life; + } + else + { + if (parts[i].life+3 > 255) + { + if (parts[r>>8].type!=PT_SING && 1>rand()%100) + { + int np; + np = sim->create_part(r>>8,x+rx,y+ry,PT_SING); + parts[np].life = rand()%50+60; + } + continue; + } + parts[i].life += 3; + parts[i].tmp++; + } + parts[i].temp = restrict_flt(parts[r>>8].temp+parts[i].temp, MIN_TEMP, MAX_TEMP); + sim->kill_part(r>>8); + } + } + return 0; +} + + +Element_SING::~Element_SING() {} \ No newline at end of file diff --git a/src/simulation/elements/SLTW.cpp b/src/simulation/elements/SLTW.cpp new file mode 100644 index 0000000..0397041 --- /dev/null +++ b/src/simulation/elements/SLTW.cpp @@ -0,0 +1,81 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SLTW PT_SLTW 27 +Element_SLTW::Element_SLTW() +{ + Identifier = "DEFAULT_PT_SLTW"; + Name = "SLTW"; + Colour = PIXPACK(0x4050F0); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 35; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 75; + Description = "Saltwater, conducts electricity, difficult to freeze."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 233.0f; + LowTemperatureTransition = PT_ICEI; + HighTemperature = 483.0f; + HighTemperatureTransition = ST; + + Update = &Element_SLTW::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_SLTW static int update(UPDATE_FUNC_ARGS) +int Element_SLTW::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%10000)) + sim->kill_part(r>>8); + if ((r&0xFF)==PT_PLNT&&5>(rand()%1000)) + sim->kill_part(r>>8); + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && !sim->legacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + } + if ((r&0xFF)==PT_FIRE){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + } + return 0; +} + + +Element_SLTW::~Element_SLTW() {} \ No newline at end of file diff --git a/src/simulation/elements/SMKE.cpp b/src/simulation/elements/SMKE.cpp new file mode 100644 index 0000000..a00eca2 --- /dev/null +++ b/src/simulation/elements/SMKE.cpp @@ -0,0 +1,68 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SMKE PT_SMKE 57 +Element_SMKE::Element_SMKE() +{ + Identifier = "DEFAULT_PT_SMKE"; + Name = "SMKE"; + Colour = PIXPACK(0x222222); + MenuVisible = 1; + MenuSection = SC_GAS; + Enabled = 1; + + Advection = 0.9f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.97f; + Loss = 0.20f; + Collision = 0.0f; + Gravity = -0.1f; + Diffusion = 0.00f; + HotAir = 0.001f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 1; + + Temperature = R_TEMP+320.0f+273.15f; + HeatConduct = 88; + Description = "Smoke"; + + State = ST_SOLID; + Properties = TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 625.0f; + HighTemperatureTransition = PT_FIRE; + + Update = NULL; + Graphics = &Element_SMKE::graphics; +} + +//#TPT-Directive ElementHeader Element_SMKE static int graphics(GRAPHICS_FUNC_ARGS) +int Element_SMKE::graphics(GRAPHICS_FUNC_ARGS) + +{ + *colr = 55; + *colg = 55; + *colb = 55; + + *firea = 75; + *firer = 55; + *fireg = 55; + *fireb = 55; + + *pixel_mode = PMODE_NONE; //Clear default, don't draw pixel + *pixel_mode |= FIRE_BLEND; + //Returning 1 means static, cache as we please + return 1; +} + +Element_SMKE::~Element_SMKE() {} \ No newline at end of file diff --git a/src/simulation/elements/SNOW.cpp b/src/simulation/elements/SNOW.cpp new file mode 100644 index 0000000..0d09611 --- /dev/null +++ b/src/simulation/elements/SNOW.cpp @@ -0,0 +1,74 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SNOW PT_SNOW 16 +Element_SNOW::Element_SNOW() +{ + Identifier = "DEFAULT_PT_SNOW"; + Name = "SNOW"; + Colour = PIXPACK(0xC0E0FF); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.96f; + Loss = 0.90f; + Collision = -0.1f; + Gravity = 0.05f; + Diffusion = 0.01f; + HotAir = -0.00005f* CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 50; + + Temperature = R_TEMP-30.0f+273.15f; + HeatConduct = 46; + Description = "Light particles."; + + State = ST_SOLID; + Properties = TYPE_PART|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 273.0f; + HighTemperatureTransition = PT_WATR; + + Update = &Element_SNOW::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_SNOW static int update(UPDATE_FUNC_ARGS) +int Element_SNOW::update(UPDATE_FUNC_ARGS) + { //currently used for snow as well + int r, rx, ry; + if (parts[i].ctype==PT_FRZW)//get colder if it is from FRZW + { + parts[i].temp = restrict_flt(parts[i].temp-1.0f, MIN_TEMP, MAX_TEMP); + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%1000)) + { + sim->part_change_type(i,x,y,PT_SLTW); + sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); + } + } + return 0; +} + + +Element_SNOW::~Element_SNOW() {} \ No newline at end of file diff --git a/src/simulation/elements/SOAP.cpp b/src/simulation/elements/SOAP.cpp new file mode 100644 index 0000000..f122c1f --- /dev/null +++ b/src/simulation/elements/SOAP.cpp @@ -0,0 +1,285 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SOAP PT_SOAP 149 +Element_SOAP::Element_SOAP() +{ + Identifier = "DEFAULT_PT_SOAP"; + Name = "SOAP"; + Colour = PIXPACK(0xF5F5DC); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 35; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 29; + Description = "Soap. Creates bubbles."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_NEUTPENETRATE|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITL; + HighTemperatureTransition = NT; + + Update = &Element_SOAP::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_SOAP static int update(UPDATE_FUNC_ARGS) +int Element_SOAP::update(UPDATE_FUNC_ARGS) + +{ + int r, rx, ry, nr, ng, nb, na; + float tr, tg, tb, ta; + float blend; + + //0x01 - bubble on/off + //0x02 - first mate yes/no + //0x04 - "back" mate yes/no + + if ((parts[i].ctype&1) == 1) + { + if (parts[i].temp>0) + { + if (parts[i].life<=0) + { + if ((parts[i].ctype&6) != 6 && parts[i].ctype>1) + { + int target; + + target = i; + + while((parts[target].ctype&6) != 6 && parts[target].ctype>1) + { + if ((parts[target].ctype&2) == 2) + { + target = parts[target].tmp; + sim->detach(target); + } + + if ((parts[target].ctype&4) == 4) + { + target = parts[target].tmp2; + sim->detach(target); + } + } + } + + if ((parts[i].ctype&6) != 6) + parts[i].ctype = 0; + + if ((parts[i].ctype&6) == 6 && (parts[parts[i].tmp].ctype&6) == 6 && parts[parts[i].tmp].tmp == i) + sim->detach(i); + } + + parts[i].vy -= 0.1f; + + parts[i].vy *= 0.5f; + parts[i].vx *= 0.5f; + } + + if((parts[i].ctype&2) != 2) + { + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type == PT_SOAP) && ((parts[r>>8].ctype&1) == 1) + && ((parts[r>>8].ctype&4) != 4)) + { + if ((parts[r>>8].ctype&2) == 2) + { + parts[i].tmp = r>>8; + parts[r>>8].tmp2 = i; + + parts[i].ctype |= 2; + parts[r>>8].ctype |= 4; + } + else + { + if ((parts[i].ctype&2) != 2) + { + parts[i].tmp = r>>8; + parts[r>>8].tmp2 = i; + + parts[i].ctype |= 2; + parts[r>>8].ctype |= 4; + } + } + } + } + } + else + { + if (parts[i].life<=0) + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxbmap[(y+ry)/CELL][(x+rx)/CELL]) + continue; + + if (parts[i].temp>0) + { + if (sim->bmap[(y+ry)/CELL][(x+rx)/CELL] + || (r && sim->elements[r&0xFF].State != ST_GAS + && (r&0xFF) != PT_SOAP && (r&0xFF) != PT_GLAS) + || (parts[r>>8].ctype == 0 && (r&0xFF) == PT_SOAP + && (abs(parts[r>>8].vx)<2 || abs(parts[r>>8].vy)<2))) + { + sim->detach(i); + continue; + } + } + + if ((r&0xFF) == PT_SOAP && parts[r>>8].ctype == 1) + { + int buf; + + buf = parts[i].tmp; + + parts[i].tmp = r>>8; + parts[buf].tmp2 = r>>8; + parts[r>>8].tmp2 = i; + parts[r>>8].tmp = buf; + parts[r>>8].ctype = 7; + } + + if ((r&0xFF) == PT_SOAP && parts[r>>8].ctype == 7 && parts[i].tmp != r>>8 && parts[i].tmp2 != r>>8) + { + int buf; + + parts[parts[i].tmp].tmp2 = parts[r>>8].tmp2; + parts[parts[r>>8].tmp2].tmp = parts[i].tmp; + parts[r>>8].tmp2 = i; + parts[i].tmp = r>>8; + } + } + } + + if((parts[i].ctype&2) == 2) + { + float d, dx, dy; + + dx = parts[i].x - parts[parts[i].tmp].x; + dy = parts[i].y - parts[parts[i].tmp].y; + + d = 9/(pow(dx, 2)+pow(dy, 2)+9)-0.5; + + parts[parts[i].tmp].vx -= dx*d; + parts[parts[i].tmp].vy -= dy*d; + + parts[i].vx += dx*d; + parts[i].vy += dy*d; + + if (((parts[parts[i].tmp].ctype&2) == 2) && ((parts[parts[i].tmp].ctype&1) == 1) + && ((parts[parts[parts[i].tmp].tmp].ctype&2) == 2) && ((parts[parts[parts[i].tmp].tmp].ctype&1) == 1)) + { + int ii; + + ii = parts[parts[parts[i].tmp].tmp].tmp; + + dx = parts[ii].x - parts[parts[i].tmp].x; + dy = parts[ii].y - parts[parts[i].tmp].y; + + d = 81/(pow(dx, 2)+pow(dy, 2)+81)-0.5; + + parts[parts[i].tmp].vx -= dx*d*0.5f; + parts[parts[i].tmp].vy -= dy*d*0.5f; + + parts[ii].vx += dx*d*0.5f; + parts[ii].vy += dy*d*0.5f; + } + } + } + else + { + if (sim->pv[y/CELL][x/CELL]>0.5f || sim->pv[y/CELL][x/CELL]<(-0.5f)) + { + parts[i].ctype = 1; + parts[i].life = 10; + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].vx)/2; + ay = (parts[i].vy + parts[r>>8].vy)/2; + + parts[i].vx = ax; + parts[i].vy = ay; + parts[r>>8].vx = ax; + parts[r>>8].vy = ay; + } + } + } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; + tg = (parts[r>>8].dcolour>>8)&0xFF; + tb = (parts[r>>8].dcolour)&0xFF; + ta = (parts[r>>8].dcolour>>24)&0xFF; + + nr = (tr*blend); + ng = (tg*blend); + nb = (tb*blend); + na = (ta*blend); + + parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; + } + } + + return 0; +} + + +Element_SOAP::~Element_SOAP() {} \ No newline at end of file diff --git a/src/simulation/elements/SPAWN.cpp b/src/simulation/elements/SPAWN.cpp new file mode 100644 index 0000000..092be1c --- /dev/null +++ b/src/simulation/elements/SPAWN.cpp @@ -0,0 +1,60 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SPAWN PT_SPAWN 118 +Element_SPAWN::Element_SPAWN() +{ + Identifier = "DEFAULT_PT_SPAWN"; + Name = "SPWN"; + Colour = PIXPACK(0xAAAAAA); + MenuVisible = 0; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "STKM spawn point"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_SPAWN::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_SPAWN static int update(UPDATE_FUNC_ARGS) +int Element_SPAWN::update(UPDATE_FUNC_ARGS) + { + if (!sim->player.spwn) + sim->create_part(-1, x, y, PT_STKM); + + return 0; +} + + + +Element_SPAWN::~Element_SPAWN() {} \ No newline at end of file diff --git a/src/simulation/elements/SPAWN2.cpp b/src/simulation/elements/SPAWN2.cpp new file mode 100644 index 0000000..be20883 --- /dev/null +++ b/src/simulation/elements/SPAWN2.cpp @@ -0,0 +1,60 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SPAWN2 PT_SPAWN2 117 +Element_SPAWN2::Element_SPAWN2() +{ + Identifier = "DEFAULT_PT_SPAWN2"; + Name = "SPWN2"; + Colour = PIXPACK(0xAAAAAA); + MenuVisible = 0; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "STK2 spawn point"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_SPAWN2::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_SPAWN2 static int update(UPDATE_FUNC_ARGS) +int Element_SPAWN2::update(UPDATE_FUNC_ARGS) + { + if (!sim->player2.spwn) + sim->create_part(-1, x, y, PT_STKM2); + + return 0; +} + + + +Element_SPAWN2::~Element_SPAWN2() {} \ No newline at end of file diff --git a/src/simulation/elements/SPNG.cpp b/src/simulation/elements/SPNG.cpp new file mode 100644 index 0000000..f522bd6 --- /dev/null +++ b/src/simulation/elements/SPNG.cpp @@ -0,0 +1,178 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SPNG PT_SPNG 90 +Element_SPNG::Element_SPNG() +{ + Identifier = "DEFAULT_PT_SPNG"; + Name = "SPNG"; + Colour = PIXPACK(0xFFBE30); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.00f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.00f; + Loss = 0.00f; + Collision = 0.00f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 20; + Explosive = 0; + Meltable = 1; + Hardness = 30; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "A sponge, absorbs water."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 2730.0f; + HighTemperatureTransition = PT_FIRE; + + Update = &Element_SPNG::update; + Graphics = &Element_SPNG::graphics; +} + +//#TPT-Directive ElementHeader Element_SPNG static int update(UPDATE_FUNC_ARGS) +int Element_SPNG::update(UPDATE_FUNC_ARGS) + { + int r, trade, rx, ry, tmp, np; + if (sim->pv[y/CELL][x/CELL]<=3 && sim->pv[y/CELL][x/CELL]>=-3&&parts[i].temp<=374.0f) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=rand()/(RAND_MAX/100)+1) + { + parts[i].life++; + sim->kill_part(r>>8); + } + } + } + else + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create water + { + np = sim->create_part(-1,x+rx,y+ry,PT_WATR); + if (np>-1) parts[i].life--; + } + } + for ( trade = 0; trade<9; trade ++) + { + rx = rand()%5-2; + ry = rand()%5-2; + if (x+rx>=0 && y+ry>0 && x+rxparts[r>>8].life)&&parts[i].life>0)//diffusion + { + tmp = parts[i].life - parts[r>>8].life; + if (tmp ==1) + { + parts[r>>8].life ++; + parts[i].life --; + trade = 9; + } + else if (tmp>0) + { + parts[r>>8].life += tmp/2; + parts[i].life -= tmp/2; + trade = 9; + } + } + } + } + tmp = 0; + if (parts[i].life>0) + { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].life>60) + parts[r>>8].life -= parts[r>>8].life/60; + else if (parts[r>>8].life>2) + parts[r>>8].life--; + } + } + } + if (tmp && parts[i].life>3) + parts[i].life -= parts[i].life/3; + if (tmp>1) + tmp = tmp/2; + if (tmp || parts[i].temp>=374) + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx=1)//if nothing then create steam + { + np = sim->create_part(-1,x+rx,y+ry,PT_WTRV); + if (np>-1) + { + parts[np].temp = parts[i].temp; + tmp--; + parts[i].life--; + parts[i].temp -= 20.0f; + } + } + } + if (tmp>0) + { + if (parts[i].life>tmp) + parts[i].life -= tmp; + else + parts[i].life = 0; + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_SPNG static int graphics(GRAPHICS_FUNC_ARGS) +int Element_SPNG::graphics(GRAPHICS_FUNC_ARGS) + +{ + *colr -= cpart->life*15; + *colg -= cpart->life*15; + *colb -= cpart->life*15; + if (*colr<=50) + *colr = 50; + if (*colg<=50) + *colg = 50; + if (*colb<=20) + *colb = 20; + return 0; +} + + +Element_SPNG::~Element_SPNG() {} \ No newline at end of file diff --git a/src/simulation/elements/SPRK.cpp b/src/simulation/elements/SPRK.cpp new file mode 100644 index 0000000..95f928b --- /dev/null +++ b/src/simulation/elements/SPRK.cpp @@ -0,0 +1,287 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SPRK PT_SPRK 15 +Element_SPRK::Element_SPRK() +{ + Identifier = "DEFAULT_PT_SPRK"; + Name = "SPRK"; + Colour = PIXPACK(0xFFFF80); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.001f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Electricity. Conducted by metal and water."; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_SPRK::update; + Graphics = &Element_SPRK::graphics; +} + +//#TPT-Directive ElementHeader Element_SPRK static int update(UPDATE_FUNC_ARGS) +int Element_SPRK::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, rt, conduct_sprk, nearp, pavg, ct = parts[i].ctype; + Element_FIRE::update(UPDATE_FUNC_SUBCALL_ARGS); + + if (parts[i].life<=0) + { + if (ct==PT_WATR||ct==PT_SLTW||ct==PT_PSCN||ct==PT_NSCN||ct==PT_ETRD||ct==PT_INWR) + parts[i].temp = R_TEMP + 273.15f; + if (ct<=0 || ct>=PT_NUM) + ct = PT_METL; + sim->part_change_type(i,x,y,ct); + parts[i].ctype = PT_NONE; + parts[i].life = 4; + if (ct == PT_WATR) + parts[i].life = 64; + if (ct == PT_SLTW) + parts[i].life = 54; + if (ct == PT_SWCH) + parts[i].life = 14; + return 0; + } + if (ct==PT_SPRK) + { + sim->kill_part(i); + return 1; + } + else if (ct==PT_NTCT || ct==PT_PTCT) + { + Element_NTCT::update(UPDATE_FUNC_SUBCALL_ARGS); + } + else if (ct==PT_ETRD&&parts[i].life==1) + { + nearp = sim->nearest_part(i, PT_ETRD, -1); + if (nearp!=-1 && sim->parts_avg(i, nearp, PT_INSL)!=PT_INSL) + { + sim->create_line(x, y, (int)(parts[nearp].x+0.5f), (int)(parts[nearp].y+0.5f), 0, 0, PT_PLSM, 0); + sim->part_change_type(i,x,y,ct); + ct = parts[i].ctype = PT_NONE; + parts[i].life = 20; + sim->part_change_type(nearp,(int)(parts[nearp].x+0.5f),(int)(parts[nearp].y+0.5f),PT_SPRK); + parts[nearp].life = 9; + parts[nearp].ctype = PT_ETRD; + } + } + else if (ct==PT_NBLE&&parts[i].life<=1&&parts[i].tmp!=1) + { + parts[i].life = rand()%150+50; + sim->part_change_type(i,x,y,PT_PLSM); + parts[i].ctype = PT_NBLE; + parts[i].temp = 3500; + sim->pv[y/CELL][x/CELL] += 1; + } + else if (ct==PT_TESC) // tesla coil code + { + if (parts[i].tmp>300) + parts[i].tmp=300; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxcreate_part(-1, x+rx*2, y+ry*2, PT_LIGH); + if (p!=-1) + { + if(parts[i].tmp<=4) //Prevent Arithmetic errors with zero values + continue; + parts[p].life=rand()%(2+parts[i].tmp/15)+parts[i].tmp/7; + if (parts[i].life>60) + parts[i].life=60; + parts[p].temp=parts[p].life*parts[i].tmp/2.5; + parts[p].tmp2=1; + parts[p].tmp=acos(1.0*rx/sqrt(rx*rx+ry*ry))/M_PI*360; + parts[i].temp-=parts[i].tmp*2+parts[i].temp/5; // slight self-cooling + if (fabs(sim->pv[y/CELL][x/CELL])!=0.0f) + { + if (fabs(sim->pv[y/CELL][x/CELL])<=0.5f) + sim->pv[y/CELL][x/CELL]=0; + else + sim->pv[y/CELL][x/CELL]-=(sim->pv[y/CELL][x/CELL]>0)?0.5:-0.5; + } + } + } + } + } + else if (ct==PT_IRON) { + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()/(RAND_MAX/1000))) || + ((r&0xFF) == PT_SLTW && 30>(rand()/(RAND_MAX/1000))) || + ((r&0xFF) == PT_WATR && 30>(rand()/(RAND_MAX/1000)))) + { + if (rand()part_change_type(r>>8,x+rx,y+ry,PT_O2); + else + sim->part_change_type(r>>8,x+rx,y+ry,PT_H2); + } + } + } + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].type; + conduct_sprk = 1; + + + pavg = sim->parts_avg(r>>8, i,PT_INSL); + if ((rt==PT_SWCH||(rt==PT_SPRK&&parts[r>>8].ctype==PT_SWCH)) && pavg!=PT_INSL && parts[i].life<4) // make sparked SWCH turn off correctly + { + if (rt==PT_SWCH&&ct==PT_PSCN&&parts[r>>8].life<10) { + parts[r>>8].life = 10; + } + if (ct==PT_NSCN) { + sim->part_change_type(r>>8,x+rx,y+ry,PT_SWCH); + parts[r>>8].ctype = PT_NONE; + parts[r>>8].life = 9; + } + } + else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_PUMP||rt==PT_GPMP||rt==PT_HSWC||rt==PT_PBCN) && parts[i].life<4) // PROP_PTOGGLE, Maybe? We seem to use 2 different methods for handling actived elements, this one seems better. Yes, use this one for new elements, PCLN is different for compatibility with existing saves + { + if (ct==PT_PSCN) parts[r>>8].life = 10; + else if (ct==PT_NSCN && parts[r>>8].life>=10) parts[r>>8].life = 9; + } + else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_LCRY&&abs(rx)<2&&abs(ry)<2) && parts[i].life<4) + { + if (ct==PT_PSCN && parts[r>>8].tmp == 0) parts[r>>8].tmp = 2; + else if (ct==PT_NSCN && parts[r>>8].tmp == 3) parts[r>>8].tmp = 1; + } + + + // ct = spark from material, rt = spark to material. Make conduct_sprk = 0 if conduction not allowed + + if (pavg == PT_INSL) conduct_sprk = 0; + if (!((sim->elements[rt].Properties&PROP_CONDUCTS)||rt==PT_INST||rt==PT_QRTZ)) conduct_sprk = 0; + if (abs(rx)+abs(ry)>=4 &&ct!=PT_SWCH&&rt!=PT_SWCH) + conduct_sprk = 0; + + + if (ct==PT_METL && (rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR||(rt==PT_SPRK&&(parts[r>>8].ctype==PT_NTCT||parts[r>>8].ctype==PT_PTCT))) && pavg!=PT_INSL && parts[i].life<4) + { + parts[r>>8].temp = 473.0f; + if (rt==PT_NTCT||rt==PT_PTCT) + conduct_sprk = 0; + } + if (ct==PT_NTCT && !(rt==PT_PSCN || rt==PT_NTCT || (rt==PT_NSCN&&parts[i].temp>373.0f))) + conduct_sprk = 0; + if (ct==PT_PTCT && !(rt==PT_PSCN || rt==PT_PTCT || (rt==PT_NSCN&&parts[i].temp<373.0f))) + conduct_sprk = 0; + if (ct==PT_INWR && !(rt==PT_NSCN || rt==PT_INWR || rt==PT_PSCN)) + conduct_sprk = 0; + if (ct==PT_NSCN && rt==PT_PSCN) + conduct_sprk = 0; + if (ct==PT_ETRD && !(rt==PT_METL||rt==PT_ETRD||rt==PT_BMTL||rt==PT_BRMT||rt==PT_LRBD||rt==PT_RBDM||rt==PT_PSCN||rt==PT_NSCN)) + conduct_sprk = 0; + if (ct==PT_INST&&rt!=PT_NSCN) conduct_sprk = 0; + if (ct==PT_SWCH && (rt==PT_PSCN||rt==PT_NSCN||rt==PT_WATR||rt==PT_SLTW||rt==PT_NTCT||rt==PT_PTCT||rt==PT_INWR)) + conduct_sprk = 0; + if (rt==PT_QRTZ && !((ct==PT_NSCN||ct==PT_METL||ct==PT_PSCN||ct==PT_QRTZ) && (parts[r>>8].temp<173.15||sim->pv[(y+ry)/CELL][(x+rx)/CELL]>8))) + conduct_sprk = 0; + if (rt==PT_NTCT && !(ct==PT_NSCN || ct==PT_NTCT || (ct==PT_PSCN&&parts[r>>8].temp>373.0f))) + conduct_sprk = 0; + if (rt==PT_PTCT && !(ct==PT_NSCN || ct==PT_PTCT || (ct==PT_PSCN&&parts[r>>8].temp<373.0f))) + conduct_sprk = 0; + if (rt==PT_INWR && !(ct==PT_NSCN || ct==PT_INWR || ct==PT_PSCN)) + conduct_sprk = 0; + if (rt==PT_INST&&ct!=PT_PSCN) + conduct_sprk = 0; + if (rt == PT_NBLE && parts[r>>8].tmp == 1) + conduct_sprk = 0; + + if (conduct_sprk) { + if (rt==PT_WATR||rt==PT_SLTW) { + if (parts[r>>8].life==0 && parts[i].life<3) + { + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + if (rt==PT_WATR) parts[r>>8].life = 6; + else parts[r>>8].life = 5; + parts[r>>8].ctype = rt; + } + } + else if (rt==PT_INST) { + if (parts[r>>8].life==0 && parts[i].life<4) + { + sim->flood_parts(x+rx,y+ry,PT_SPRK,PT_INST,-1, 0);//spark the wire + } + } + else if (parts[r>>8].life==0 && parts[i].life<4) { + parts[r>>8].life = 4; + parts[r>>8].ctype = rt; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + if (parts[r>>8].temp+10.0f<673.0f&&!sim->legacy_enable&&(rt==PT_METL||rt==PT_BMTL||rt==PT_BRMT||rt==PT_PSCN||rt==PT_NSCN||rt==PT_ETRD||rt==PT_NBLE||rt==PT_IRON)) + parts[r>>8].temp = parts[r>>8].temp+10.0f; + } + else if (ct==PT_ETRD && parts[i].life==5) + { + sim->part_change_type(i,x,y,ct); + parts[i].ctype = PT_NONE; + parts[i].life = 20; + parts[r>>8].life = 4; + parts[r>>8].ctype = rt; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + } + } + } + return 0; +} + + + +//#TPT-Directive ElementHeader Element_SPRK static int graphics(GRAPHICS_FUNC_ARGS) +int Element_SPRK::graphics(GRAPHICS_FUNC_ARGS) + +{ + *firea = 80; + + *firer = *colr = 170; + *fireg = *colg = 200; + *fireb = *colb = 220; + //*pixel_mode |= FIRE_ADD; + *pixel_mode |= FIRE_ADD; + return 1; +} + + +Element_SPRK::~Element_SPRK() {} \ No newline at end of file diff --git a/src/simulation/elements/STKM.cpp b/src/simulation/elements/STKM.cpp new file mode 100644 index 0000000..e554892 --- /dev/null +++ b/src/simulation/elements/STKM.cpp @@ -0,0 +1,543 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_STKM PT_STKM 55 +Element_STKM::Element_STKM() +{ + Identifier = "DEFAULT_PT_STKM"; + Name = "STKM"; + Colour = PIXPACK(0x000000); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.5f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.2f; + Loss = 1.0f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.0f; + HotAir = 0.00f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 50; + + Temperature = R_TEMP+14.6f+273.15f; + HeatConduct = 0; + Description = "Stickman. Don't kill him!"; + + State = ST_NONE; + Properties = 0; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 620.0f; + HighTemperatureTransition = PT_FIRE; + + Update = &Element_STKM::update; + Graphics = &Element_STKM::graphics; +} + +//#TPT-Directive ElementHeader Element_STKM static int update(UPDATE_FUNC_ARGS) +int Element_STKM::update(UPDATE_FUNC_ARGS) + +{ + run_stickman(&sim->player, UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + + + +//#TPT-Directive ElementHeader Element_STKM static int graphics(GRAPHICS_FUNC_ARGS) +int Element_STKM::graphics(GRAPHICS_FUNC_ARGS) + +{ + /**pixel_mode = PSPEC_STICKMAN; + if ((int)sim->player.elemplayer.elem].pcolors); + *colg = PIXG(elements[sim->player.elem].pcolors); + *colb = PIXB(elements[sim->player.elem].pcolors); + } + else*/ + { + *colr = *colg = *colb = 255; + } + return 1; +} + +//#TPT-Directive ElementHeader Element_STKM static int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) +int Element_STKM::run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { + int r, rx, ry; + float pp, d; + float dt = 0.9;///(FPSB*FPSB); //Delta time in square + float gvx, gvy; + float gx, gy, dl, dr; + + if ((parts[i].ctype>0 && parts[i].ctypeelements[parts[i].ctype].Falldown>0) || parts[i].ctype==SPC_AIR || parts[i].ctype == PT_NEUT || parts[i].ctype == PT_PHOT || parts[i].ctype == PT_LIGH) + playerp->elem = parts[i].ctype; + playerp->frames++; + + //Tempirature handling + if (parts[i].temp<243) + parts[i].life -= 1; + if ((parts[i].temp<309.6f) && (parts[i].temp>=243)) + parts[i].temp += 1; + + //Death + if (parts[i].life<1 || (sim->pv[y/CELL][x/CELL]>=4.5f && playerp->elem != SPC_AIR) ) //If his HP is less that 0 or there is very big wind... + { + for (r=-2; r<=1; r++) + { + sim->create_part(-1, x+r, y-2, playerp->elem); + sim->create_part(-1, x+r+1, y+2, playerp->elem); + sim->create_part(-1, x-2, y+r+1, playerp->elem); + sim->create_part(-1, x+2, y+r, playerp->elem); + } + sim->kill_part(i); //Kill him + return 1; + } + + //Follow gravity + gvx = gvy = 0.0f; + switch (sim->gravityMode) + { + default: + case 0: + gvy = 1; + break; + case 1: + gvy = gvx = 0.0f; + break; + case 2: + { + float gravd; + gravd = 0.01f - hypotf((parts[i].x - XCNTR), (parts[i].y - YCNTR)); + gvx = ((float)(parts[i].x - XCNTR) / gravd); + gvy = ((float)(parts[i].y - YCNTR) / gravd); + } + break; + } + + gvx += sim->gravx[((int)parts[i].y/CELL)*(XRES/CELL)+((int)parts[i].x/CELL)]; + gvy += sim->gravy[((int)parts[i].y/CELL)*(XRES/CELL)+((int)parts[i].x/CELL)]; + + parts[i].vx -= gvx*dt; //Head up! + parts[i].vy -= gvy*dt; + + //Verlet integration + pp = 2*playerp->legs[0]-playerp->legs[2]+playerp->accs[0]*dt*dt; + playerp->legs[2] = playerp->legs[0]; + playerp->legs[0] = pp; + pp = 2*playerp->legs[1]-playerp->legs[3]+playerp->accs[1]*dt*dt; + playerp->legs[3] = playerp->legs[1]; + playerp->legs[1] = pp; + + pp = 2*playerp->legs[4]-playerp->legs[6]+(playerp->accs[2]+gvx)*dt*dt; + playerp->legs[6] = playerp->legs[4]; + playerp->legs[4] = pp; + pp = 2*playerp->legs[5]-playerp->legs[7]+(playerp->accs[3]+gvy)*dt*dt; + playerp->legs[7] = playerp->legs[5]; + playerp->legs[5] = pp; + + pp = 2*playerp->legs[8]-playerp->legs[10]+playerp->accs[4]*dt*dt; + playerp->legs[10] = playerp->legs[8]; + playerp->legs[8] = pp; + pp = 2*playerp->legs[9]-playerp->legs[11]+playerp->accs[5]*dt*dt; + playerp->legs[11] = playerp->legs[9]; + playerp->legs[9] = pp; + + pp = 2*playerp->legs[12]-playerp->legs[14]+(playerp->accs[6]+gvx)*dt*dt; + playerp->legs[14] = playerp->legs[12]; + playerp->legs[12] = pp; + pp = 2*playerp->legs[13]-playerp->legs[15]+(playerp->accs[7]+gvy)*dt*dt; + playerp->legs[15] = playerp->legs[13]; + playerp->legs[13] = pp; + + //Setting accseleration to 0 + playerp->accs[0] = 0; + playerp->accs[1] = 0; + + playerp->accs[2] = 0; + playerp->accs[3] = 0; + + playerp->accs[4] = 0; + playerp->accs[5] = 0; + + playerp->accs[6] = 0; + playerp->accs[7] = 0; + + gx = (playerp->legs[4] + playerp->legs[12])/2 - gvy; + gy = (playerp->legs[5] + playerp->legs[13])/2 + gvx; + dl = pow(gx - playerp->legs[4], 2) + pow(gy - playerp->legs[5], 2); + dr = pow(gx - playerp->legs[12], 2) + pow(gy - playerp->legs[13], 2); + + //Go left + if (((int)(playerp->comm)&0x01) == 0x01) + { + if (dl>dr) + { + if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + playerp->accs[2] = -3*gvy-3*gvx; + playerp->accs[3] = 3*gvx-3*gvy; + playerp->accs[0] = -gvy; + playerp->accs[1] = gvx; + } + } + else + { + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + playerp->accs[6] = -3*gvy-3*gvx; + playerp->accs[7] = 3*gvx-3*gvy; + playerp->accs[0] = -gvy; + playerp->accs[1] = gvx; + } + } + } + + //Go right + if (((int)(playerp->comm)&0x02) == 0x02) + { + if (dleval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + playerp->accs[2] = 3*gvy-3*gvx; + playerp->accs[3] = -3*gvx-3*gvy; + playerp->accs[0] = gvy; + playerp->accs[1] = -gvx; + } + } + else + { + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + playerp->accs[6] = 3*gvy-3*gvx; + playerp->accs[7] = -3*gvx-3*gvy; + playerp->accs[0] = gvy; + playerp->accs[1] = -gvx; + } + } + } + + //Jump + if (((int)(playerp->comm)&0x04) == 0x04 && + (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL) || !sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL))) + { + parts[i].vy -= 4*gvy; + playerp->accs[3] -= gvy; + playerp->accs[7] -= gvy; + } + + //Charge detector wall if foot inside + if (sim->bmap[(int)(playerp->legs[5]+0.5)/CELL][(int)(playerp->legs[4]+0.5)/CELL]==WL_DETECT) + sim->set_emap((int)playerp->legs[4]/CELL, (int)playerp->legs[5]/CELL); + if (sim->bmap[(int)(playerp->legs[13]+0.5)/CELL][(int)(playerp->legs[12]+0.5)/CELL]==WL_DETECT) + sim->set_emap((int)(playerp->legs[12]+0.5)/CELL, (int)(playerp->legs[13]+0.5)/CELL); + + //Searching for particles near head + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; + + if (!r && !sim->bmap[(y+ry)/CELL][(x+rx)/CELL]) + continue; + + if (sim->elements[r&0xFF].Falldown!=0 || sim->elements[r&0xFF].State == ST_GAS || (r&0xFF) == PT_NEUT || (r&0xFF) == PT_PHOT) + { + playerp->elem = r&0xFF; //Current element + } + if ((r&0xFF)==PT_TESC || (r&0xFF)==PT_LIGH) + playerp->elem = PT_LIGH; + if ((r&0xFF) == PT_PLNT && parts[i].life<100) //Plant gives him 5 HP + { + if (parts[i].life<=95) + parts[i].life += 5; + else + parts[i].life = 100; + sim->kill_part(r>>8); + } + + if ((r&0xFF) == PT_NEUT) + { + if (parts[i].life<=100) parts[i].life -= (102-parts[i].life)/2; + else parts[i].life *= 0.9f; + sim->kill_part(r>>8); + } + if (sim->bmap[(ry+y)/CELL][(rx+x)/CELL]==WL_FAN) + playerp->elem = SPC_AIR; + if ((r&0xFF)==PT_PRTI) + Element_STKM::STKM_interact(sim, playerp, i, rx, ry); + if (!parts[i].type)//STKM_interact may kill STKM + return 1; + } + + //Head position + rx = x + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01); + ry = y - 3*(playerp->pcomm == 0); + + //Spawn + if (((int)(playerp->comm)&0x08) == 0x08) + { + ry -= 2*(rand()%2)+1; + r = pmap[ry][rx]; + if (sim->elements[r&0xFF].State == ST_SOLID) + { + sim->create_part(-1, rx, ry, PT_SPRK); + playerp->frames = 0; + } + else + { + int np = -1; + if (playerp->elem == SPC_AIR) + sim->create_parts(rx + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01), ry, 4, 4, SPC_AIR, 0); + else if (playerp->elem==PT_LIGH && playerp->frames<30)//limit lightning creation rate + np = -1; + else + np = sim->create_part(-1, rx, ry, playerp->elem); + if ( (np < NPART) && np>=0) + { + if (playerp->elem == PT_PHOT) + { + int random = abs(rand()%3-1)*3; + if (random==0) + { + sim->kill_part(np); + } + else + { + parts[np].vy = 0; + if (((int)playerp->pcomm)&(0x01|0x02)) + parts[np].vx = (((((int)playerp->pcomm)&0x02) == 0x02) - (((int)(playerp->pcomm)&0x01) == 0x01))*random; + else + parts[np].vx = random; + } + } + else if (playerp->elem == PT_LIGH) + { + float angle; + int power = 100; + if (gvx!=0 || gvy!=0) + angle = atan2(gvx, gvy)*180.0f/M_PI; + else + angle = rand()%360; + if (((int)playerp->comm)&0x01) + angle += 180; + if (angle>360) + angle-=360; + if (angle<0) + angle+=360; + parts[np].tmp = angle; + parts[np].life=rand()%(2+power/15)+power/7; + parts[np].temp=parts[np].life*power/2.5; + parts[np].tmp2=1; + } + else if (playerp->elem != SPC_AIR) + { + parts[np].vx -= -gvy*(5*((((int)playerp->pcomm)&0x02) == 0x02) - 5*(((int)(playerp->pcomm)&0x01) == 0x01)); + parts[np].vy -= gvx*(5*((((int)playerp->pcomm)&0x02) == 0x02) - 5*(((int)(playerp->pcomm)&0x01) == 0x01)); + parts[i].vx -= (sim->elements[(int)playerp->elem].Weight*parts[np].vx)/1000; + } + playerp->frames = 0; + } + + } + } + + //Simulation of joints + d = 25/(pow((playerp->legs[0]-playerp->legs[4]), 2) + pow((playerp->legs[1]-playerp->legs[5]), 2)+25) - 0.5; //Fast distance + playerp->legs[4] -= (playerp->legs[0]-playerp->legs[4])*d; + playerp->legs[5] -= (playerp->legs[1]-playerp->legs[5])*d; + playerp->legs[0] += (playerp->legs[0]-playerp->legs[4])*d; + playerp->legs[1] += (playerp->legs[1]-playerp->legs[5])*d; + + d = 25/(pow((playerp->legs[8]-playerp->legs[12]), 2) + pow((playerp->legs[9]-playerp->legs[13]), 2)+25) - 0.5; + playerp->legs[12] -= (playerp->legs[8]-playerp->legs[12])*d; + playerp->legs[13] -= (playerp->legs[9]-playerp->legs[13])*d; + playerp->legs[8] += (playerp->legs[8]-playerp->legs[12])*d; + playerp->legs[9] += (playerp->legs[9]-playerp->legs[13])*d; + + d = 36/(pow((playerp->legs[0]-parts[i].x), 2) + pow((playerp->legs[1]-parts[i].y), 2)+36) - 0.5; + parts[i].vx -= (playerp->legs[0]-parts[i].x)*d; + parts[i].vy -= (playerp->legs[1]-parts[i].y)*d; + playerp->legs[0] += (playerp->legs[0]-parts[i].x)*d; + playerp->legs[1] += (playerp->legs[1]-parts[i].y)*d; + + d = 36/(pow((playerp->legs[8]-parts[i].x), 2) + pow((playerp->legs[9]-parts[i].y), 2)+36) - 0.5; + parts[i].vx -= (playerp->legs[8]-parts[i].x)*d; + parts[i].vy -= (playerp->legs[9]-parts[i].y)*d; + playerp->legs[8] += (playerp->legs[8]-parts[i].x)*d; + playerp->legs[9] += (playerp->legs[9]-parts[i].y)*d; + + if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + playerp->legs[4] = playerp->legs[6]; + playerp->legs[5] = playerp->legs[7]; + } + + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + playerp->legs[12] = playerp->legs[14]; + playerp->legs[13] = playerp->legs[15]; + } + + //This makes stick man "pop" from obstacles + if (!sim->eval_move(PT_DUST, playerp->legs[4], playerp->legs[5], NULL)) + { + float t; + t = playerp->legs[4]; playerp->legs[4] = playerp->legs[6]; playerp->legs[6] = t; + t = playerp->legs[5]; playerp->legs[5] = playerp->legs[7]; playerp->legs[7] = t; + } + + if (!sim->eval_move(PT_DUST, playerp->legs[12], playerp->legs[13], NULL)) + { + float t; + t = playerp->legs[12]; playerp->legs[12] = playerp->legs[14]; playerp->legs[14] = t; + t = playerp->legs[13]; playerp->legs[13] = playerp->legs[15]; playerp->legs[15] = t; + } + + //Keeping legs distance + if ((pow((playerp->legs[4] - playerp->legs[12]), 2) + pow((playerp->legs[5]-playerp->legs[13]), 2))<16) + { + float tvx, tvy; + tvx = -gvy; + tvy = gvx; + + if (tvx || tvy) + { + playerp->accs[2] -= 0.2*tvx/hypot(tvx, tvy); + playerp->accs[3] -= 0.2*tvy/hypot(tvx, tvy); + + playerp->accs[6] += 0.2*tvx/hypot(tvx, tvy); + playerp->accs[7] += 0.2*tvy/hypot(tvx, tvy); + } + } + + if ((pow((playerp->legs[0] - playerp->legs[8]), 2) + pow((playerp->legs[1]-playerp->legs[9]), 2))<16) + { + float tvx, tvy; + tvx = -gvy; + tvy = gvx; + + if (tvx || tvy) + { + playerp->accs[0] -= 0.2*tvx/hypot(tvx, tvy); + playerp->accs[1] -= 0.2*tvy/hypot(tvx, tvy); + + playerp->accs[4] += 0.2*tvx/hypot(tvx, tvy); + playerp->accs[5] += 0.2*tvy/hypot(tvx, tvy); + } + } + + //If legs touch something + Element_STKM::STKM_interact(sim, playerp, i, (int)(playerp->legs[4]+0.5), (int)(playerp->legs[5]+0.5)); + Element_STKM::STKM_interact(sim, playerp, i, (int)(playerp->legs[12]+0.5), (int)(playerp->legs[13]+0.5)); + Element_STKM::STKM_interact(sim, playerp, i, (int)(playerp->legs[4]+0.5), (int)playerp->legs[5]); + Element_STKM::STKM_interact(sim, playerp, i, (int)(playerp->legs[12]+0.5), (int)playerp->legs[13]); + if (!parts[i].type) + return 1; + + parts[i].ctype = playerp->elem; + return 0; +} + +//#TPT-Directive ElementHeader Element_STKM static void STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y) +void Element_STKM::STKM_interact(Simulation * sim, playerst* playerp, int i, int x, int y) +{ + int r; + if (x<0 || y<0 || x>=XRES || y>=YRES || !sim->parts[i].type) + return; + r = sim->pmap[y][x]; + if (r) + { + if ((r&0xFF)==PT_SPRK && playerp->elem!=PT_LIGH) //If on charge + { + sim->parts[i].life -= (int)(rand()*20/RAND_MAX)+32; + } + + if (sim->elements[r&0xFF].HeatConduct && ((playerp->elem!=PT_LIGH && sim->parts[r>>8].temp>=323) || sim->parts[r>>8].temp<=243)) + { + sim->parts[i].life -= 2; + playerp->accs[3] -= 1; + } + + if (sim->elements[r&0xFF].Properties&PROP_DEADLY) + switch (r&0xFF) + { + case PT_ACID: + sim->parts[i].life -= 5; + break; + default: + sim->parts[i].life -= 1; + break; + } + + if (sim->elements[r&0xFF].Properties&PROP_RADIOACTIVE) + sim->parts[i].life -= 1; + + if ((r&0xFF)==PT_PRTI && sim->parts[i].type) + { + int nnx, count=1;//gives rx=0, ry=1 in update_PRTO + sim->parts[r>>8].tmp = (int)((sim->parts[r>>8].temp-73.15f)/100+1); + if (sim->parts[r>>8].tmp>=CHANNELS) sim->parts[r>>8].tmp = CHANNELS-1; + else if (sim->parts[r>>8].tmp<0) sim->parts[r>>8].tmp = 0; + for (nnx=0; nnx<80; nnx++) + if (!sim->portalp[sim->parts[r>>8].tmp][count][nnx].type) + { + sim->portalp[sim->parts[r>>8].tmp][count][nnx] = sim->parts[i]; + sim->kill_part(i); + //stop new STKM/fighters being created to replace the ones in the portal: + playerp->spwn = 1; + if (sim->portalp[sim->parts[r>>8].tmp][count][nnx].type==PT_FIGH) + sim->fighcount++; + break; + } + } + } +} + +//#TPT-Directive ElementHeader Element_STKM static void STKM_init_legs(Simulation * sim, playerst* playerp, int i) +void Element_STKM::STKM_init_legs(Simulation * sim, playerst* playerp, int i) +{ + int x, y; + + x = (int)(sim->parts[i].x+0.5f); + y = (int)(sim->parts[i].y+0.5f); + + playerp->legs[0] = x-1; + playerp->legs[1] = y+6; + playerp->legs[2] = x-1; + playerp->legs[3] = y+6; + + playerp->legs[4] = x-3; + playerp->legs[5] = y+12; + playerp->legs[6] = x-3; + playerp->legs[7] = y+12; + + playerp->legs[8] = x+1; + playerp->legs[9] = y+6; + playerp->legs[10] = x+1; + playerp->legs[11] = y+6; + + playerp->legs[12] = x+3; + playerp->legs[13] = y+12; + playerp->legs[14] = x+3; + playerp->legs[15] = y+12; +} + + +Element_STKM::~Element_STKM() {} \ No newline at end of file diff --git a/src/simulation/elements/STKM2.cpp b/src/simulation/elements/STKM2.cpp new file mode 100644 index 0000000..ca0d8cf --- /dev/null +++ b/src/simulation/elements/STKM2.cpp @@ -0,0 +1,77 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_STKM2 PT_STKM2 128 +Element_STKM2::Element_STKM2() +{ + Identifier = "DEFAULT_PT_STKM2"; + Name = "STK2"; + Colour = PIXPACK(0x000000); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.5f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.2f; + Loss = 1.0f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.0f; + HotAir = 0.00f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 50; + + Temperature = R_TEMP+14.6f+273.15f; + HeatConduct = 0; + Description = "Stickman. Don't kill him!"; + + State = ST_NONE; + Properties = 0; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 620.0f; + HighTemperatureTransition = PT_FIRE; + + Update = &Element_STKM2::update; + Graphics = &Element_STKM2::graphics; +} + +//#TPT-Directive ElementHeader Element_STKM2 static int update(UPDATE_FUNC_ARGS) +int Element_STKM2::update(UPDATE_FUNC_ARGS) + { + Element_STKM::run_stickman(&sim->player2, UPDATE_FUNC_SUBCALL_ARGS); + return 0; +} + + + +//#TPT-Directive ElementHeader Element_STKM2 static int graphics(GRAPHICS_FUNC_ARGS) +int Element_STKM2::graphics(GRAPHICS_FUNC_ARGS) + +{ + /**pixel_mode = PSPEC_STICKMAN; + if ((int)sim->player2.elemplayer2.elem].pcolors); + *colg = PIXG(elements[sim->player2.elem].pcolors); + *colb = PIXB(elements[sim->player2.elem].pcolors); + } + else*/ + { + *colr = *colg = *colb = 255; + } + return 1; +} + + +Element_STKM2::~Element_STKM2() {} \ No newline at end of file diff --git a/src/simulation/elements/STNE.cpp b/src/simulation/elements/STNE.cpp new file mode 100644 index 0000000..2a2a2fd --- /dev/null +++ b/src/simulation/elements/STNE.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_STNE PT_STNE 5 +Element_STNE::Element_STNE() +{ + Identifier = "DEFAULT_PT_STNE"; + Name = "STNE"; + Colour = PIXPACK(0xA0A0A0); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.94f; + Loss = 0.95f; + Collision = -0.1f; + Gravity = 0.3f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 5; + Hardness = 1; + + Weight = 90; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 150; + Description = "Heavy particles. Meltable."; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 983.0f; + HighTemperatureTransition = PT_LAVA; + + Update = NULL; + Graphics = NULL; +} + +Element_STNE::~Element_STNE() {} \ No newline at end of file diff --git a/src/simulation/elements/STOR.cpp b/src/simulation/elements/STOR.cpp new file mode 100644 index 0000000..ad119f3 --- /dev/null +++ b/src/simulation/elements/STOR.cpp @@ -0,0 +1,112 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_STOR PT_STOR 83 +Element_STOR::Element_STOR() +{ + Identifier = "DEFAULT_PT_STOR"; + Name = "STOR"; + Colour = PIXPACK(0x50DFDF); + MenuVisible = 1; + MenuSection = SC_POWERED; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Solid. Stores a single particle, releases when charged with PSCN, also passes to PIPE"; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_STOR::update; + Graphics = &Element_STOR::graphics; +} + +//#TPT-Directive ElementHeader Element_STOR static int update(UPDATE_FUNC_ARGS) +int Element_STOR::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, np, rx1, ry1; + if(parts[i].life && !parts[i].tmp) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8)>=NPART || !r) + continue; + if (!parts[i].tmp && !parts[i].life && (r&0xFF)!=PT_STOR && !(sim->elements[(r&0xFF)].Properties&TYPE_SOLID) && (!parts[i].ctype || (r&0xFF)==parts[i].ctype)) + { + parts[i].tmp = parts[r>>8].type; + parts[i].temp = parts[r>>8].temp; + parts[i].tmp2 = parts[r>>8].life; + parts[i].pavg[0] = parts[r>>8].tmp; + parts[i].pavg[1] = parts[r>>8].ctype; + sim->kill_part(r>>8); + } + if(parts[i].tmp && (r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN && parts[r>>8].life>0 && parts[r>>8].life<4) + { + for(ry1 = 1; ry1 >= -1; ry1--){ + for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ // Oscilate the X starting at 0, 1, -1, 3, -5, etc (Though stop at -1) + np = sim->create_part(-1,x+rx1,y+ry1,parts[i].tmp); + if (np!=-1) + { + parts[np].temp = parts[i].temp; + parts[np].life = parts[i].tmp2; + parts[np].tmp = parts[i].pavg[0]; + parts[np].ctype = parts[i].pavg[1]; + parts[i].tmp = 0; + parts[i].life = 10; + break; + } + } + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_STOR static int graphics(GRAPHICS_FUNC_ARGS) +int Element_STOR::graphics(GRAPHICS_FUNC_ARGS) + +{ + if(cpart->tmp){ + *pixel_mode |= PMODE_GLOW; + *colr = 0x50; + *colg = 0xDF; + *colb = 0xDF; + } else { + *colr = 0x20; + *colg = 0xAF; + *colb = 0xAF; + } + return 0; +} + + +Element_STOR::~Element_STOR() {} \ No newline at end of file diff --git a/src/simulation/elements/SWCH.cpp b/src/simulation/elements/SWCH.cpp new file mode 100644 index 0000000..fa8e49e --- /dev/null +++ b/src/simulation/elements/SWCH.cpp @@ -0,0 +1,110 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_SWCH PT_SWCH 56 +Element_SWCH::Element_SWCH() +{ + Identifier = "DEFAULT_PT_SWCH"; + Name = "SWCH"; + Colour = PIXPACK(0x103B11); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Solid. Only conducts when switched on. (PSCN switches on, NSCN switches off)"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_SWCH::update; + Graphics = &Element_SWCH::graphics; +} + +//#TPT-Directive ElementHeader Element_SWCH static int update(UPDATE_FUNC_ARGS) +int Element_SWCH::update(UPDATE_FUNC_ARGS) + { + int r, rt, rx, ry; + if (parts[i].life>0 && parts[i].life!=10) + parts[i].life--; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxparts_avg(i,r>>8,PT_INSL)!=PT_INSL) { + rt = r&0xFF; + if (rt==PT_SWCH) + { + if (parts[i].life>=10&&parts[r>>8].life<10&&parts[r>>8].life>0) + parts[i].life = 9; + else if (parts[i].life==0&&parts[r>>8].life>=10) + { + //Set to other particle's life instead of 10, otherwise spark loops form when SWCH is sparked while turning on + parts[i].life = parts[r>>8].life; + } + } + else if (rt==PT_SPRK&&parts[i].life==10&&parts[r>>8].ctype!=PT_PSCN&&parts[r>>8].ctype!=PT_NSCN) { + sim->part_change_type(i,x,y,PT_SPRK); + parts[i].ctype = PT_SWCH; + parts[i].life = 4; + } + } + } + //turn off SWCH from two red BRAYS + if (parts[i].life==10 && (!(pmap[y-1][x-1]&0xFF) && ((pmap[y-1][x]&0xFF)==PT_BRAY&&parts[pmap[y-1][x]>>8].tmp==2) && !(pmap[y-1][x+1]&0xFF) && ((pmap[y][x+1]&0xFF)==PT_BRAY&&parts[pmap[y][x+1]>>8].tmp==2))) + { + parts[i].life = 9; + } + //turn on SWCH from two red BRAYS + else if (parts[i].life<=5 && (!(pmap[y-1][x-1]&0xFF) && (((pmap[y-1][x]&0xFF)==PT_BRAY&&parts[pmap[y-1][x]>>8].tmp==2) || ((pmap[y+1][x]&0xFF)==PT_BRAY&&parts[pmap[y+1][x]>>8].tmp==2)) && !(pmap[y-1][x+1]&0xFF) && (((pmap[y][x+1]&0xFF)==PT_BRAY&&parts[pmap[y][x+1]>>8].tmp==2) || ((pmap[y][x-1]&0xFF)==PT_BRAY&&parts[pmap[y][x-1]>>8].tmp==2)))) + { + parts[i].life = 14; + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_SWCH static int graphics(GRAPHICS_FUNC_ARGS) +int Element_SWCH::graphics(GRAPHICS_FUNC_ARGS) + +{ + if(cpart->life >= 10) + { + *colr = 17; + *colg = 217; + *colb = 24; + *pixel_mode |= PMODE_GLOW; + } + return 0; +} + + +Element_SWCH::~Element_SWCH() {} \ No newline at end of file diff --git a/src/simulation/elements/TESC.cpp b/src/simulation/elements/TESC.cpp new file mode 100644 index 0000000..7c3cce6 --- /dev/null +++ b/src/simulation/elements/TESC.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_TESC PT_TESC 88 +Element_TESC::Element_TESC() +{ + Identifier = "DEFAULT_PT_TESC"; + Name = "TESC"; + Colour = PIXPACK(0x707040); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Tesla coil!"; + + State = ST_SOLID; + Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_TESC::~Element_TESC() {} \ No newline at end of file diff --git a/src/simulation/elements/THDR.cpp b/src/simulation/elements/THDR.cpp new file mode 100644 index 0000000..df38306 --- /dev/null +++ b/src/simulation/elements/THDR.cpp @@ -0,0 +1,102 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_THDR PT_THDR 48 +Element_THDR::Element_THDR() +{ + Identifier = "DEFAULT_PT_THDR"; + Name = "THDR"; + Colour = PIXPACK(0xFFFFA0); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.0f; + Loss = 0.30f; + Collision = -0.99f; + Gravity = 0.6f; + Diffusion = 0.62f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 1; + + Temperature = 9000.0f +273.15f; + HeatConduct = 1; + Description = "Lightning! Very hot, inflicts damage upon most materials, transfers current to metals."; + + State = ST_NONE; + Properties = TYPE_ENERGY; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_THDR::update; + Graphics = &Element_THDR::graphics; +} + +//#TPT-Directive ElementHeader Element_THDR static int update(UPDATE_FUNC_ARGS) +int Element_THDR::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxelements[r&0xFF].Properties&PROP_CONDUCTS) && parts[r>>8].life==0 && !((r&0xFF)==PT_WATR||(r&0xFF)==PT_SLTW) && parts[r>>8].ctype!=PT_SPRK) + { + parts[i].type = PT_NONE; + parts[r>>8].ctype = parts[r>>8].type; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + parts[r>>8].life = 4; + } + else if ((r&0xFF)!=PT_CLNE&&(r&0xFF)!=PT_THDR&&(r&0xFF)!=PT_SPRK&&(r&0xFF)!=PT_DMND&&(r&0xFF)!=PT_FIRE&&(r&0xFF)!=PT_NEUT&&(r&0xFF)!=PT_PHOT&&(r&0xFF)) + { + sim->pv[y/CELL][x/CELL] += 100.0f; + if (sim->legacy_enable&&1>(rand()%200)) + { + parts[i].life = rand()%50+120; + sim->part_change_type(i,x,y,PT_FIRE); + } + else + { + parts[i].type = PT_NONE; + } + } + } + if (parts[i].type==PT_NONE) { + sim->kill_part(i); + return 1; + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_THDR static int graphics(GRAPHICS_FUNC_ARGS) +int Element_THDR::graphics(GRAPHICS_FUNC_ARGS) + +{ + *firea = 160; + *fireg = 192; + *fireb = 255; + *firer = 144; + *pixel_mode |= FIRE_ADD; + return 1; +} + + +Element_THDR::~Element_THDR() {} \ No newline at end of file diff --git a/src/simulation/elements/THRM.cpp b/src/simulation/elements/THRM.cpp new file mode 100644 index 0000000..e87a379 --- /dev/null +++ b/src/simulation/elements/THRM.cpp @@ -0,0 +1,80 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_THRM PT_THRM 65 +Element_THRM::Element_THRM() +{ + Identifier = "DEFAULT_PT_THRM"; + Name = "THRM"; + Colour = PIXPACK(0xA08090); + MenuVisible = 1; + MenuSection = SC_EXPLOSIVE; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.04f * CFDS; + AirLoss = 0.94f; + Loss = 0.95f; + Collision = -0.1f; + Gravity = 0.3f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 2; + Hardness = 2; + + Weight = 90; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 211; + Description = "Thermite. Burns at extremely high temperature."; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_THRM::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_THRM static int update(UPDATE_FUNC_ARGS) +int Element_THRM::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%500)) { + sim->part_change_type(i,x,y,PT_LAVA); + parts[i].ctype = PT_BMTL; + parts[i].temp = 3500.0f; + sim->pv[y/CELL][x/CELL] += 50.0f; + } else { + sim->part_change_type(i,x,y,PT_LAVA); + parts[i].life = 400; + parts[i].ctype = PT_THRM; + parts[i].temp = 3500.0f; + parts[i].tmp = 20; + } + } + } + return 0; +} + + +Element_THRM::~Element_THRM() {} \ No newline at end of file diff --git a/src/simulation/elements/TRON.cpp b/src/simulation/elements/TRON.cpp new file mode 100644 index 0000000..a449bc6 --- /dev/null +++ b/src/simulation/elements/TRON.cpp @@ -0,0 +1,236 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_TRON PT_TRON 143 +Element_TRON::Element_TRON() +{ + Identifier = "DEFAULT_PT_TRON"; + Name = "TRON"; + Colour = PIXPACK(0x000000); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = 0.0f; + HeatConduct = 40; + Description = "Smart particles, Travels in straight lines and avoids obstacles. Grows with time."; + + State = ST_NONE; + Properties = TYPE_SOLID|PROP_LIFE_DEC|PROP_LIFE_KILL; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_TRON::update; + Graphics = &Element_TRON::graphics; +} + +#define TRON_HEAD 1 +#define TRON_NOGROW 2 +#define TRON_WAIT 4 //it was just created, so WAIT a frame +#define TRON_NODIE 8 +#define TRON_DEATH 16 //Crashed, now dying +int tron_rx[4] = {-1, 0, 1, 0}; +int tron_ry[4] = { 0,-1, 0, 1}; + +//#TPT-Directive ElementHeader Element_TRON static int update(UPDATE_FUNC_ARGS) +int Element_TRON::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry, np; + if(!parts[i].ctype) + { + int r, g, b; + int hue = (parts[i].tmp&0xF800)>>7; + HSV_to_RGB(hue,255,255,&r,&g,&b); + parts[i].ctype = r<<16 | g<<8 | b; + //Use photon-like wavelength? + } + if (parts[i].tmp&TRON_WAIT) + { + parts[i].tmp &= ~TRON_WAIT; + return 0; + } + if (parts[i].tmp&TRON_HEAD) + { + int firstdircheck = 0,seconddir,seconddircheck = 0,lastdir,lastdircheck = 0; + int direction = (parts[i].tmp>>5 & 0x3); + int originaldir = direction; + + //random turn + int random = rand()%340; + if (random==1 || random==3) + { + //randomly turn left(3) or right(1) + direction = (direction + random)%4; + } + + //check infront + //do sight check + firstdircheck = Element_TRON::trymovetron(sim,x,y,direction,i,parts[i].tmp2); + if (firstdircheck < parts[i].tmp2) + { + if (originaldir != direction) //if we just tried a random turn, don't pick random again + { + seconddir = originaldir; + lastdir = (direction + 2)%4; + } + else + { + seconddir = (direction + ((rand()%2)*2)+1)% 4; + lastdir = (seconddir + 2)%4; + } + seconddircheck = trymovetron(sim,x,y,seconddir,i,parts[i].tmp2); + lastdircheck = trymovetron(sim,x,y,lastdir,i,parts[i].tmp2); + } + //find the best move + if (seconddircheck > firstdircheck) + direction = seconddir; + if (lastdircheck > seconddircheck && lastdircheck > firstdircheck) + direction = lastdir; + //now try making new head, even if it fails + if (Element_TRON::new_tronhead(sim,x + tron_rx[direction],y + tron_ry[direction],i,direction) == -1) + { + //ohgod crash + parts[i].tmp |= TRON_DEATH; + //trigger tail death for TRON_NODIE, or is that mode even needed? just set a high tail length(but it still won't start dying when it crashes) + } + + //set own life and clear .tmp (it dies if it can't move anyway) + parts[i].life = parts[i].tmp2; + parts[i].tmp &= parts[i].tmp&0xF810; + } + else // fade tail deco, or prevent tail from dieing + { + if (parts[i].tmp&TRON_NODIE) + parts[i].life++; + //parts[i].dcolour = clamp_flt((float)parts[i].life/(float)parts[i].tmp2,0,1.0f) << 24 | parts[i].dcolour&0x00FFFFFF; + } + return 0; +} + + + +//#TPT-Directive ElementHeader Element_TRON static int graphics(GRAPHICS_FUNC_ARGS) +int Element_TRON::graphics(GRAPHICS_FUNC_ARGS) + { + if(cpart->tmp & TRON_HEAD) + *pixel_mode |= PMODE_GLOW; + if(cpart->ctype) + { + *colr = (cpart->ctype & 0xFF0000)>>16; + *colg = (cpart->ctype & 0x00FF00)>>8; + *colb = (cpart->ctype & 0x0000FF); + } + else + { + *colr = 255; + *colg = 255; + *colb = 255; + } + if(cpart->tmp & TRON_DEATH) + { + *pixel_mode |= FIRE_ADD | PMODE_FLARE; + *firer = *colr; + *fireg = *colg; + *fireb = *colb; + *firea = 255; + } + if(cpart->life < cpart->tmp2 && !(cpart->tmp & TRON_HEAD)) + { + *pixel_mode |= PMODE_BLEND; + *pixel_mode &= ~PMODE_FLAT; + *cola = (int)((((float)cpart->life)/((float)cpart->tmp2))*255.0f); + } + return 0; +} + +//#TPT-Directive ElementHeader Element_TRON static int new_tronhead(Simulation * sim, int x, int y, int i, int direction) +int Element_TRON::new_tronhead(Simulation * sim, int x, int y, int i, int direction) +{ + int np = sim->create_part(-1, x , y ,PT_TRON); + if (np==-1) + return -1; + if (sim->parts[i].life >= 100) // increase tail length + { + sim->parts[i].tmp2++; + sim->parts[i].life = 5; + } + //give new head our properties + sim->parts[np].tmp = 1 | direction<<5 | sim->parts[i].tmp&(TRON_NOGROW|TRON_NODIE) | (sim->parts[i].tmp&0xF800); + if (np > i) + sim->parts[np].tmp |= TRON_WAIT; + + sim->parts[np].ctype = sim->parts[i].ctype; + sim->parts[np].tmp2 = sim->parts[i].tmp2; + sim->parts[np].life = sim->parts[i].life + 2; + return 1; +} + +//#TPT-Directive ElementHeader Element_TRON static int trymovetron(Simulation * sim, int x, int y, int dir, int i, int len) +int Element_TRON::trymovetron(Simulation * sim, int x, int y, int dir, int i, int len) +{ + int k,j,r,rx,ry,tx,ty,count; + count = 0; + rx = x; + ry = y; + for (k = 1; k <= len; k ++) + { + rx += tron_rx[dir]; + ry += tron_ry[dir]; + r = sim->pmap[ry][rx]; + if (!r && !sim->bmap[(ry)/CELL][(rx)/CELL] && ry > CELL && rx > CELL && ry < YRES-CELL && rx < XRES-CELL) + { + count++; + for (tx = rx - tron_ry[dir] , ty = ry - tron_rx[dir], j=1; abs(tx-rx) < (len-k) && abs(ty-ry) < (len-k); tx-=tron_ry[dir],ty-=tron_rx[dir],j++) + { + r = sim->pmap[ty][tx]; + if (!r && !sim->bmap[(ty)/CELL][(tx)/CELL] && ty > CELL && tx > CELL && ty < YRES-CELL && tx < XRES-CELL) + { + if (j == (len-k))//there is a safe path, so we can break out + return len+1; + count++; + } + else //we hit a block so no need to check farther here + break; + } + for (tx = rx + tron_ry[dir] , ty = ry + tron_rx[dir], j=1; abs(tx-rx) < (len-k) && abs(ty-ry) < (len-k); tx+=tron_ry[dir],ty+=tron_rx[dir],j++) + { + r = sim->pmap[ty][tx]; + if (!r && !sim->bmap[(ty)/CELL][(tx)/CELL] && ty > CELL && tx > CELL && ty < YRES-CELL && tx < XRES-CELL) + { + if (j == (len-k)) + return len+1; + count++; + } + else + break; + } + } + else //a block infront, no need to continue + break; + } + return count; +} + +Element_TRON::~Element_TRON() {} \ No newline at end of file diff --git a/src/simulation/elements/URAN.cpp b/src/simulation/elements/URAN.cpp new file mode 100644 index 0000000..0a5fb79 --- /dev/null +++ b/src/simulation/elements/URAN.cpp @@ -0,0 +1,61 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_URAN PT_URAN 32 +Element_URAN::Element_URAN() +{ + Identifier = "DEFAULT_PT_URAN"; + Name = "URAN"; + Colour = PIXPACK(0x707020); + MenuVisible = 1; + MenuSection = SC_NUCLEAR; + Enabled = 1; + + Advection = 0.4f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.99f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.4f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 90; + + Temperature = R_TEMP+30.0f+273.15f; + HeatConduct = 251; + Description = "Heavy particles. Generates heat under pressure."; + + State = ST_SOLID; + Properties = TYPE_PART | PROP_RADIOACTIVE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_URAN::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_URAN static int update(UPDATE_FUNC_ARGS) +int Element_URAN::update(UPDATE_FUNC_ARGS) + { + if (!sim->legacy_enable && sim->pv[y/CELL][x/CELL]>0.0f) + { + float atemp = parts[i].temp + (-MIN_TEMP); + parts[i].temp = restrict_flt((atemp*(1+(sim->pv[y/CELL][x/CELL]/2000)))+MIN_TEMP, MIN_TEMP, MAX_TEMP); + } + return 0; +} + + +Element_URAN::~Element_URAN() {} \ No newline at end of file diff --git a/src/simulation/elements/VINE.cpp b/src/simulation/elements/VINE.cpp new file mode 100644 index 0000000..142e235 --- /dev/null +++ b/src/simulation/elements/VINE.cpp @@ -0,0 +1,70 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_VINE PT_VINE 114 +Element_VINE::Element_VINE() +{ + Identifier = "DEFAULT_PT_VINE"; + Name = "VINE"; + Colour = PIXPACK(0x079A00); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.95f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 20; + Explosive = 0; + Meltable = 0; + Hardness = 10; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 65; + Description = "Vine, grows"; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 573.0f; + HighTemperatureTransition = PT_FIRE; + + Update = &Element_VINE::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_VINE static int update(UPDATE_FUNC_ARGS) +int Element_VINE::update(UPDATE_FUNC_ARGS) + { + int r, np, rx =(rand()%3)-1, ry=(rand()%3)-1; + if (x+rx>=0 && y+ry>0 && x+rxrand()%15) + sim->part_change_type(i,x,y,PT_PLNT); + else if (!r) + { + np = sim->create_part(-1,x+rx,y+ry,PT_VINE); + if (np<0) return 0; + parts[np].temp = parts[i].temp; + sim->part_change_type(i,x,y,PT_PLNT); + } + } + return 0; +} + + +Element_VINE::~Element_VINE() {} \ No newline at end of file diff --git a/src/simulation/elements/VOID.cpp b/src/simulation/elements/VOID.cpp new file mode 100644 index 0000000..1627ad2 --- /dev/null +++ b/src/simulation/elements/VOID.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_VOID PT_VOID 22 +Element_VOID::Element_VOID() +{ + Identifier = "DEFAULT_PT_VOID"; + Name = "VOID"; + Colour = PIXPACK(0x790B0B); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 1.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = -0.0003f* CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Hole, will drain away any particles."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_VOID::~Element_VOID() {} \ No newline at end of file diff --git a/src/simulation/elements/WARP.cpp b/src/simulation/elements/WARP.cpp new file mode 100644 index 0000000..596c1d9 --- /dev/null +++ b/src/simulation/elements/WARP.cpp @@ -0,0 +1,79 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_WARP PT_WARP 96 +Element_WARP::Element_WARP() +{ + Identifier = "DEFAULT_PT_WARP"; + Name = "WARP"; + Colour = PIXPACK(0x000000); + MenuVisible = 1; + MenuSection = SC_NUCLEAR; + Enabled = 1; + + Advection = 0.8f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.9f; + Loss = 0.70f; + Collision = -0.1f; + Gravity = 0.0f; + Diffusion = 3.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 30; + + Weight = 1; + + Temperature = R_TEMP +273.15f; + HeatConduct = 100; + Description = "Displaces other elements."; + + State = ST_GAS; + Properties = TYPE_GAS|PROP_LIFE_DEC|PROP_LIFE_KILL; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_WARP::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_WARP static int update(UPDATE_FUNC_ARGS) +int Element_WARP::update(UPDATE_FUNC_ARGS) + { + int trade, r, rx, ry; + for ( trade = 0; trade<5; trade ++) + { + rx = rand()%3-1; + ry = rand()%3-1; + if (x+rx>=0 && y+ry>0 && x+rx=rand()%200)) + { + parts[i].x = parts[r>>8].x; + parts[i].y = parts[r>>8].y; + parts[r>>8].x = x; + parts[r>>8].y = y; + parts[i].life += 4; + pmap[y][x] = r; + pmap[y+ry][x+rx] = (i<<8)|parts[i].type; + trade = 5; + } + } + } + return 0; +} + + +Element_WARP::~Element_WARP() {} \ No newline at end of file diff --git a/src/simulation/elements/WATR.cpp b/src/simulation/elements/WATR.cpp new file mode 100644 index 0000000..037c8c9 --- /dev/null +++ b/src/simulation/elements/WATR.cpp @@ -0,0 +1,87 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_WATR PT_WATR 2 +Element_WATR::Element_WATR() +{ + Identifier = "DEFAULT_PT_WATR"; + Name = "WATR"; + Colour = PIXPACK(0x2030D0); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 30; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 29; + Description = "Liquid. Conducts electricity. Freezes. Extinguishes fires."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 273.15f; + LowTemperatureTransition = PT_ICEI; + HighTemperature = 373.0f; + HighTemperatureTransition = PT_WTRV; + + Update = &Element_WATR::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_WATR static int update(UPDATE_FUNC_ARGS) +int Element_WATR::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%250)) + { + sim->part_change_type(i,x,y,PT_SLTW); + sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); + } + if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (sim->legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + parts[i].ctype = PT_WATR; + } + if ((r&0xFF)==PT_FIRE && parts[r>>8].ctype!=PT_WATR){ + sim->kill_part(r>>8); + if(1>(rand()%150)){ + sim->kill_part(i); + return 1; + } + } + /*if ((r&0xFF)==PT_CNCT && 1>(rand()%500)) Concrete+Water to paste, not very popular + { + part_change_type(i,x,y,PT_PSTE); + sim.kill_part(r>>8); + }*/ + } + return 0; +} + +Element_WATR::~Element_WATR() {} \ No newline at end of file diff --git a/src/simulation/elements/WAX.cpp b/src/simulation/elements/WAX.cpp new file mode 100644 index 0000000..2ab705b --- /dev/null +++ b/src/simulation/elements/WAX.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_WAX PT_WAX 33 +Element_WAX::Element_WAX() +{ + Identifier = "DEFAULT_PT_WAX"; + Name = "WAX"; + Colour = PIXPACK(0xF0F0BB); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 10; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 44; + Description = "Wax. Melts at moderately high temperatures."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 319.0f; + HighTemperatureTransition = PT_MWAX; + + Update = NULL; + Graphics = NULL; +} + +Element_WAX::~Element_WAX() {} \ No newline at end of file diff --git a/src/simulation/elements/WHOL.cpp b/src/simulation/elements/WHOL.cpp new file mode 100644 index 0000000..572fca0 --- /dev/null +++ b/src/simulation/elements/WHOL.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_WHOL PT_WHOL 40 +Element_WHOL::Element_WHOL() +{ + Identifier = "DEFAULT_PT_WHOL"; + Name = "VENT"; + Colour = PIXPACK(0xEFEFEF); + MenuVisible = 1; + MenuSection = SC_SPECIAL; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.95f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.010f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP-16.0f+273.15f; + HeatConduct = 255; + Description = "Air vent, creates pressure and pushes other particles away."; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = NULL; + Graphics = NULL; +} + +Element_WHOL::~Element_WHOL() {} \ No newline at end of file diff --git a/src/simulation/elements/WIFI.cpp b/src/simulation/elements/WIFI.cpp new file mode 100644 index 0000000..a108c91 --- /dev/null +++ b/src/simulation/elements/WIFI.cpp @@ -0,0 +1,100 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_WIFI PT_WIFI 124 +Element_WIFI::Element_WIFI() +{ + Identifier = "DEFAULT_PT_WIFI"; + Name = "WIFI"; + Colour = PIXPACK(0x40A060); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 1; + Hardness = 2; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 0; + Description = "Wireless transmitter, color coded."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = 15.0f; + HighPressureTransition = PT_BRMT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_WIFI::update; + Graphics = &Element_WIFI::graphics; +} + +//#TPT-Directive ElementHeader Element_WIFI static int update(UPDATE_FUNC_ARGS) +int Element_WIFI::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + parts[i].tmp = (int)((parts[i].temp-73.15f)/100+1); + if (parts[i].tmp>=CHANNELS) parts[i].tmp = CHANNELS-1; + else if (parts[i].tmp<0) parts[i].tmp = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxwireless[parts[i].tmp][0]) + { + if (((r&0xFF)==PT_NSCN||(r&0xFF)==PT_PSCN||(r&0xFF)==PT_INWR)&&parts[r>>8].life==0 && sim->wireless[parts[i].tmp][0]) + { + parts[r>>8].ctype = r&0xFF; + sim->part_change_type(r>>8,x+rx,y+ry,PT_SPRK); + parts[r>>8].life = 4; + } + } + else + { + if ((r&0xFF)==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3) + { + sim->wireless[parts[i].tmp][1] = 1; + sim->ISWIRE = 2; + } + } + } + return 0; +} + + +//#TPT-Directive ElementHeader Element_WIFI static int graphics(GRAPHICS_FUNC_ARGS) +int Element_WIFI::graphics(GRAPHICS_FUNC_ARGS) + +{ + float frequency = 0.0628; + int q = cpart->tmp; + *colr = sin(frequency*q + 0) * 127 + 128; + *colg = sin(frequency*q + 2) * 127 + 128; + *colb = sin(frequency*q + 4) * 127 + 128; + return 0; +} + + +Element_WIFI::~Element_WIFI() {} \ No newline at end of file diff --git a/src/simulation/elements/WIRE.cpp b/src/simulation/elements/WIRE.cpp new file mode 100644 index 0000000..4f59060 --- /dev/null +++ b/src/simulation/elements/WIRE.cpp @@ -0,0 +1,127 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_WIRE PT_WIRE 156 +Element_WIRE::Element_WIRE() +{ + Identifier = "DEFAULT_PT_WIRE"; + Name = "WIRE"; + Colour = PIXPACK(0xFFCC00); + MenuVisible = 1; + MenuSection = SC_ELEC; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.00f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 0; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 250; + Description = "WireWorld wires."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_WIRE::update; + Graphics = &Element_WIRE::graphics; +} + +//#TPT-Directive ElementHeader Element_WIRE static int update(UPDATE_FUNC_ARGS) +int Element_WIRE::update(UPDATE_FUNC_ARGS) + { + int s,r,rx,ry,count; + /* + 0: wire + 1: spark head + 2: spark tail + + tmp is previous state, ctype is current state + */ + //parts[i].tmp=parts[i].ctype; + parts[i].ctype=0; + if(parts[i].tmp==1) + { + parts[i].ctype=2; + } + if(parts[i].tmp==2) + { + parts[i].ctype=0; + } + + count=0; + for(rx=-1; rx<2; rx++) + for(ry=-1; ry<2; ry++) + { + if(x+rx>=0 && y+ry>0 && x+rx>8].life==3 && parts[r>>8].ctype==PT_PSCN) + { + parts[i].ctype=1; + return 0; + } + else if((r&0xFF)==PT_NSCN && parts[i].tmp==1){sim->create_part(-1, x+rx, y+ry, PT_SPRK);} + else if((r&0xFF)==PT_WIRE && parts[r>>8].tmp==1 && !parts[i].tmp){count++;} + } + } + if(count==1 || count==2) + parts[i].ctype=1; + return 0; +} + + + +//#TPT-Directive ElementHeader Element_WIRE static int graphics(GRAPHICS_FUNC_ARGS) +int Element_WIRE::graphics(GRAPHICS_FUNC_ARGS) + +{ + if (cpart->ctype==0) + { + *colr = 255; + *colg = 204; + *colb = 0; + return 0; + } + if (cpart->ctype==1) + { + *colr = 50; + *colg = 100; + *colb = 255; + //*pixel_mode |= PMODE_GLOW; + return 0; + } + if (cpart->ctype==2) + { + *colr = 255; + *colg = 100; + *colb = 50; + //*pixel_mode |= PMODE_GLOW; + return 0; + } + return 0; +} + + +Element_WIRE::~Element_WIRE() {} \ No newline at end of file diff --git a/src/simulation/elements/WOOD.cpp b/src/simulation/elements/WOOD.cpp new file mode 100644 index 0000000..c53be8e --- /dev/null +++ b/src/simulation/elements/WOOD.cpp @@ -0,0 +1,49 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_WOOD PT_WOOD 17 +Element_WOOD::Element_WOOD() +{ + Identifier = "DEFAULT_PT_WOOD"; + Name = "WOOD"; + Colour = PIXPACK(0xC0A040); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 20; + Explosive = 0; + Meltable = 0; + Hardness = 15; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 164; + Description = "Solid. Flammable."; + + State = ST_SOLID; + Properties = TYPE_SOLID | PROP_NEUTPENETRATE; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 873.0f; + HighTemperatureTransition = PT_FIRE; + + Update = NULL; + Graphics = NULL; +} + +Element_WOOD::~Element_WOOD() {} \ No newline at end of file diff --git a/src/simulation/elements/WTRV.cpp b/src/simulation/elements/WTRV.cpp new file mode 100644 index 0000000..8850cff --- /dev/null +++ b/src/simulation/elements/WTRV.cpp @@ -0,0 +1,73 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_WTRV PT_WTRV 23 +Element_WTRV::Element_WTRV() +{ + Identifier = "DEFAULT_PT_WTRV"; + Name = "WTRV"; + Colour = PIXPACK(0xA0A0FF); + MenuVisible = 1; + MenuSection = SC_GAS; + Enabled = 1; + + Advection = 1.0f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.99f; + Loss = 0.30f; + Collision = -0.1f; + Gravity = -0.1f; + Diffusion = 0.75f; + HotAir = 0.0003f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 4; + + Weight = 1; + + Temperature = R_TEMP+100.0f+273.15f; + HeatConduct = 48; + Description = "Steam, heats up air, produced from hot water."; + + State = ST_GAS; + Properties = TYPE_GAS; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = 371.0f; + LowTemperatureTransition = ST; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_WTRV::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_WTRV static int update(UPDATE_FUNC_ARGS) +int Element_WTRV::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rxlegacy_enable && parts[i].temp>(273.15f+12.0f) && 1>(rand()%500)) + { + sim->part_change_type(i,x,y,PT_FIRE); + parts[i].life = 4; + parts[i].ctype = PT_WATR; + } + } + if(parts[i].temp>1273&&parts[i].ctype==PT_FIRE) + parts[i].temp-=parts[i].temp/1000; + return 0; +} + + +Element_WTRV::~Element_WTRV() {} \ No newline at end of file diff --git a/src/simulation/elements/YEST.cpp b/src/simulation/elements/YEST.cpp new file mode 100644 index 0000000..1b1b8fe --- /dev/null +++ b/src/simulation/elements/YEST.cpp @@ -0,0 +1,72 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_YEST PT_YEST 63 +Element_YEST::Element_YEST() +{ + Identifier = "DEFAULT_PT_YEST"; + Name = "YEST"; + Colour = PIXPACK(0xEEE0C0); + MenuVisible = 1; + MenuSection = SC_POWDERS; + Enabled = 1; + + Advection = 0.7f; + AirDrag = 0.02f * CFDS; + AirLoss = 0.96f; + Loss = 0.80f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 1; + + Flammable = 15; + Explosive = 0; + Meltable = 0; + Hardness = 30; + + Weight = 80; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 70; + Description = "Yeast, grows when warm (~37C)."; + + State = ST_SOLID; + Properties = TYPE_PART; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = 373.0f; + HighTemperatureTransition = PT_DYST; + + Update = &Element_YEST::update; + Graphics = NULL; +} + +//#TPT-Directive ElementHeader Element_YEST static int update(UPDATE_FUNC_ARGS) +int Element_YEST::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx(rand()%30) && !sim->legacy_enable) + { + sim->part_change_type(i,x,y,PT_DYST); + } + } + if (parts[i].temp>303&&parts[i].temp<317) { + sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, PT_YEST); + } + return 0; +} + + +Element_YEST::~Element_YEST() {} \ No newline at end of file diff --git a/src/simulation/elements/dcel.cpp b/src/simulation/elements/dcel.cpp new file mode 100644 index 0000000..07f930b --- /dev/null +++ b/src/simulation/elements/dcel.cpp @@ -0,0 +1,85 @@ +#include "simulation/Elements.h" +//#TPT-Directive ElementClass Element_DCEL PT_DCEL 138 +Element_DCEL::Element_DCEL() +{ + Identifier = "DEFAULT_PT_DCEL"; + Name = "DCEL"; + Colour = PIXPACK(0x99CC00); + MenuVisible = 1; + MenuSection = SC_FORCE; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 1; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 251; + Description = "Decelerator"; + + State = ST_NONE; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_DCEL::update; + Graphics = &Element_DCEL::graphics; +} + +//#TPT-Directive ElementHeader Element_DCEL static int update(UPDATE_FUNC_ARGS) +int Element_DCEL::update(UPDATE_FUNC_ARGS) + { + int r, rx, ry; + parts[i].tmp = 0; + for (rx=-1; rx<2; rx++) + for (ry=-1; ry<2; ry++) + if (x+rx>=0 && y+ry>0 && x+rxphotons[y+ry][x+rx]; + if ((r>>8)>=NPART || !r) + continue; + if(sim->elements[r&0xFF].Properties & (TYPE_PART | TYPE_LIQUID | TYPE_GAS | TYPE_ENERGY)) + { + parts[r>>8].vx *= 0.9f; + parts[r>>8].vy *= 0.9f; + parts[i].tmp = 1; + } + } + return 0; +} + + + +//#TPT-Directive ElementHeader Element_DCEL static int graphics(GRAPHICS_FUNC_ARGS) +int Element_DCEL::graphics(GRAPHICS_FUNC_ARGS) + +{ + if(cpart->tmp) + *pixel_mode |= PMODE_GLOW; + return 0; +} + + +Element_DCEL::~Element_DCEL() {} \ No newline at end of file diff --git a/src/stamps/StampsModel.h b/src/stamps/StampsModel.h index 0356349..48d3c38 100644 --- a/src/stamps/StampsModel.h +++ b/src/stamps/StampsModel.h @@ -10,7 +10,7 @@ #include #include -#include +#include #include "search/Save.h" class StampsView; -- cgit v0.9.2-21-gd62e From 1c993435efc7fe6702d21c892e1d4dd8347d2e7f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 7 May 2012 18:08:41 +0100 Subject: Default elements in gamemodel diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index bb69479..c3477bc 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -106,8 +106,8 @@ GameModel::GameModel(): brushList.push_back(new EllipseBrush(ui::Point(4, 4))); //Set default tools - //activeTools[0] = menuList[SC_POWDERS]->GetToolList()[0]; - //activeTools[1] = menuList[SC_SPECIAL]->GetToolList()[0]; + activeTools[0] = menuList[SC_POWDERS]->GetToolList()[0]; + activeTools[1] = menuList[SC_SPECIAL]->GetToolList()[0]; //Set default menu activeMenu = menuList[SC_POWDERS]; -- cgit v0.9.2-21-gd62e From 16d3895e9c054e908ca8b230719f4294e824a4a2 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 12 May 2012 13:21:04 +0100 Subject: Redo Wall IDs diff --git a/src/Graphics.h b/src/Graphics.h index df7342b..6312185 100644 --- a/src/Graphics.h +++ b/src/Graphics.h @@ -5,8 +5,7 @@ #include #if defined(OGLR) #ifdef MACOSX -#include -#include +#include #include #elif defined(WIN32) #include diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 167b062..92cb376 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -369,7 +369,7 @@ void Renderer::DrawWalls() for (x=0; x=UI_WALLCOUNT) continue; pc = wtypes[wt].colour; @@ -407,7 +407,7 @@ void Renderer::DrawWalls() } // special rendering for some walls - if (bmap[y][x]==WL_EWALL) + if (wt==WL_EWALL) { if (emap[y][x]) { @@ -424,7 +424,7 @@ void Renderer::DrawWalls() vid[(y*CELL+j)*(XRES+BARSIZE)+(x*CELL+i)] = pc; } } - else if (bmap[y][x]==WL_WALLELEC) + else if (wt==WL_WALLELEC) { for (j=0; j>1)&1; i #if defined(OGLR) #ifdef MACOSX -#include -#include +#include #include #elif defined(WIN32) #include diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index c3477bc..453232f 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -88,7 +88,7 @@ GameModel::GameModel(): //Build other menus from wall data for(int i = 0; i < UI_WALLCOUNT; i++) { - Tool * tempTool = new ElementTool(i+UI_WALLSTART, "", PIXR(sim->wtypes[i].colour), PIXG(sim->wtypes[i].colour), PIXB(sim->wtypes[i].colour)); + Tool * tempTool = new WallTool(i, "", PIXR(sim->wtypes[i].colour), PIXG(sim->wtypes[i].colour), PIXB(sim->wtypes[i].colour)); menuList[SC_WALL]->AddTool(tempTool); //sim->wtypes[i] } diff --git a/src/game/Tool.h b/src/game/Tool.h index 00b1184..107c8cc 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -39,21 +39,43 @@ class ElementTool: public Tool { public: ElementTool(int id, string name, int r, int g, int b): - Tool(id, name, r, g, b) + Tool(id, name, r, g, b) { } virtual ~ElementTool() {} virtual void Draw(Simulation * sim, Brush * brush, ui::Point position){ - sim->create_parts(position.X, position.Y, 1, 1, toolID, 0, brush); + sim->CreateParts(position.X, position.Y, 1, 1, toolID, 0, brush); + } + virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + sim->CreateLine(position1.X, position1.Y, position2.X, position2.Y, 1, 1, toolID, 0, brush); + } + virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + sim->CreateBox(position1.X, position1.Y, position2.X, position2.Y, toolID, 0); + } + virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { + sim->FloodParts(position.X, position.Y, toolID, -1, -1, 0); + } +}; + +class WallTool: public Tool +{ +public: + WallTool(int id, string name, int r, int g, int b): + Tool(id, name, r, g, b) + { + } + virtual ~WallTool() {} + virtual void Draw(Simulation * sim, Brush * brush, ui::Point position){ + sim->CreateWalls(position.X, position.Y, 1, 1, toolID, 0, brush); } virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { - sim->create_line(position1.X, position1.Y, position2.X, position2.Y, 1, 1, toolID, 0, brush); + sim->CreateWallLine(position1.X, position1.Y, position2.X, position2.Y, 1, 1, toolID, 0, brush); } virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { - sim->create_box(position1.X, position1.Y, position2.X, position2.Y, toolID, 0); + sim->CreateWallBox(position1.X, position1.Y, position2.X, position2.Y, toolID, 0); } virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { - sim->flood_parts(position.X, position.Y, toolID, -1, -1, 0); + sim->FloodWalls(position.X, position.Y, toolID, -1, -1, 0); } }; @@ -66,16 +88,16 @@ public: } virtual ~GolTool() {} virtual void Draw(Simulation * sim, Brush * brush, ui::Point position){ - sim->create_parts(position.X, position.Y, 1, 1, PT_LIFE|(toolID<<8), 0, brush); + sim->CreateParts(position.X, position.Y, 1, 1, PT_LIFE|(toolID<<8), 0, brush); } virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { - sim->create_line(position1.X, position1.Y, position2.X, position2.Y, 1, 1, PT_LIFE|(toolID<<8), 0, brush); + sim->CreateLine(position1.X, position1.Y, position2.X, position2.Y, 1, 1, PT_LIFE|(toolID<<8), 0, brush); } virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { - sim->create_box(position1.X, position1.Y, position2.X, position2.Y, PT_LIFE|(toolID<<8), 0); + sim->CreateBox(position1.X, position1.Y, position2.X, position2.Y, PT_LIFE|(toolID<<8), 0); } virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { - sim->flood_parts(position.X, position.Y, PT_LIFE|(toolID<<8), -1, -1, 0); + sim->FloodParts(position.X, position.Y, PT_LIFE|(toolID<<8), -1, -1, 0); } }; diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h index 2753b52..cfea1af 100644 --- a/src/simulation/Elements.h +++ b/src/simulation/Elements.h @@ -51,26 +51,6 @@ #define GRAPHICS_FUNC_ARGS Renderer * ren, Particle *cpart, int nx, int ny, int *pixel_mode, int* cola, int *colr, int *colg, int *colb, int *firea, int *firer, int *fireg, int *fireb #define GRAPHICS_FUNC_SUBCALL_ARGS ren, cpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb -#define UI_WALLSTART 222 -#define UI_ACTUALSTART 122 -#define UI_WALLCOUNT 25 - -#define WL_WALLELEC 122 -#define WL_EWALL 123 -#define WL_DETECT 124 -#define WL_STREAM 125 -#define WL_SIGN 126 -#define WL_FAN 127 -#define WL_FANHELPER 255 -#define WL_ALLOWLIQUID 128 -#define WL_DESTROYALL 129 -#define WL_ERASE 130 -#define WL_WALL 131 -#define WL_ALLOWAIR 132 -#define WL_ALLOWSOLID 133 -#define WL_ALLOWALLELEC 134 -#define WL_EHOLE 135 - #define SPC_AIR 236 #define SPC_HEAT 237 #define SPC_COOL 238 @@ -80,9 +60,6 @@ #define SPC_NGRV 244 #define SPC_PROP 246 -#define WL_ALLOWGAS 140 -#define WL_GRAV 142 -#define WL_ALLOWENERGY 145 #define NGT_GOL 0 #define NGT_HLIF 1 diff --git a/src/simulation/SaveLoader.cpp b/src/simulation/SaveLoader.cpp index 7989d38..9bfb131 100644 --- a/src/simulation/SaveLoader.cpp +++ b/src/simulation/SaveLoader.cpp @@ -194,7 +194,7 @@ int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim, { //In old saves, ignore walls created by sign tool bug //Not ignoring other invalid walls or invalid walls in new saves, so that any other bugs causing them are easier to notice, find and fix - if (ver<71 && d[p]==WL_SIGN) + if (ver<71 && d[p]==O_WL_SIGN) { p++; continue; @@ -227,6 +227,39 @@ int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim, sim->bmap[y][x]=WL_EHOLE; if (sim->bmap[y][x]==13) sim->bmap[y][x]=WL_ALLOWGAS; + + if (sim->bmap[y][x]==O_WL_WALLELEC) + sim->bmap[y][x]=WL_WALLELEC; + if (sim->bmap[y][x]==O_WL_EWALL) + sim->bmap[y][x]=WL_EWALL; + if (sim->bmap[y][x]==O_WL_DETECT) + sim->bmap[y][x]=WL_DETECT; + if (sim->bmap[y][x]==O_WL_STREAM) + sim->bmap[y][x]=WL_STREAM; + if (sim->bmap[y][x]==O_WL_FAN||sim->bmap[y][x]==O_WL_FANHELPER) + sim->bmap[y][x]=WL_FAN; + if (sim->bmap[y][x]==O_WL_ALLOWLIQUID) + sim->bmap[y][x]=WL_ALLOWLIQUID; + if (sim->bmap[y][x]==O_WL_DESTROYALL) + sim->bmap[y][x]=WL_DESTROYALL; + if (sim->bmap[y][x]==O_WL_ERASE) + sim->bmap[y][x]=WL_ERASE; + if (sim->bmap[y][x]==O_WL_WALL) + sim->bmap[y][x]=WL_WALL; + if (sim->bmap[y][x]==O_WL_ALLOWAIR) + sim->bmap[y][x]=WL_ALLOWAIR; + if (sim->bmap[y][x]==O_WL_ALLOWSOLID) + sim->bmap[y][x]=WL_ALLOWSOLID; + if (sim->bmap[y][x]==O_WL_ALLOWALLELEC) + sim->bmap[y][x]=WL_ALLOWALLELEC; + if (sim->bmap[y][x]==O_WL_EHOLE) + sim->bmap[y][x]=WL_EHOLE; + if (sim->bmap[y][x]==O_WL_ALLOWGAS) + sim->bmap[y][x]=WL_ALLOWGAS; + if (sim->bmap[y][x]==O_WL_GRAV) + sim->bmap[y][x]=WL_GRAV; + if (sim->bmap[y][x]==O_WL_ALLOWENERGY) + sim->bmap[y][x]=WL_ALLOWENERGY; } p++; diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 89295f4..354c759 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -46,7 +46,7 @@ void Simulation::clear_area(int area_x, int area_y, int area_w, int area_h) } } -void Simulation::create_box(int x1, int y1, int x2, int y2, int c, int flags) +void Simulation::CreateBox(int x1, int y1, int x2, int y2, int c, int flags) { int i, j; if (c==SPC_PROP) @@ -65,7 +65,27 @@ void Simulation::create_box(int x1, int y1, int x2, int y2, int c, int flags) } for (j=y1; j<=y2; j++) for (i=x1; i<=x2; i++) - create_parts(i, j, 0, 0, c, flags); + CreateParts(i, j, 0, 0, c, flags); +} + +void Simulation::CreateWallBox(int x1, int y1, int x2, int y2, int c, int flags) +{ + int i, j; + if (x1>x2) + { + i = x2; + x2 = x1; + x1 = i; + } + if (y1>y2) + { + j = y2; + y2 = y1; + y1 = j; + } + for (j=y1; j<=y2; j++) + for (i=x1; i<=x2; i++) + CreateWalls(i, j, 0, 0, c, flags); } int Simulation::flood_prop_2(int x, int y, size_t propoffset, void * propvalue, int proptype, int parttype, char * bitmap) @@ -133,10 +153,10 @@ Particle Simulation::Get(int x, int y) return Particle(); } -int Simulation::flood_parts(int x, int y, int fullc, int cm, int bm, int flags) +int Simulation::FloodParts(int x, int y, int fullc, int cm, int bm, int flags) { int c = fullc&0xFF; - int x1, x2, dy = (c=CELL) @@ -191,7 +211,7 @@ int Simulation::flood_parts(int x, int y, int fullc, int cm, int bm, int flags) } x2++; } - + // fill span for (x=x1; x<=x2; x++) { @@ -200,40 +220,40 @@ int Simulation::flood_parts(int x, int y, int fullc, int cm, int bm, int flags) if (create_part(-1,x, y, fullc)==-1) return 0; } - else if (!create_parts(x, y, 0, 0, fullc, flags)) + else if (!CreateParts(x, y, 0, 0, fullc, flags)) return 0; } // fill children if (cm==PT_INST&&co==PT_SPRK)//wire crossing for INST { if (y>=CELL+dy && x1==x2 && - ((pmap[y-1][x1-1]&0xFF)==PT_INST||(pmap[y-1][x1-1]&0xFF)==PT_SPRK) && ((pmap[y-1][x1]&0xFF)==PT_INST||(pmap[y-1][x1]&0xFF)==PT_SPRK) && ((pmap[y-1][x1+1]&0xFF)==PT_INST || (pmap[y-1][x1+1]&0xFF)==PT_SPRK) && - (pmap[y-2][x1-1]&0xFF)!=PT_INST && ((pmap[y-2][x1]&0xFF)==PT_INST ||(pmap[y-2][x1]&0xFF)==PT_SPRK) && (pmap[y-2][x1+1]&0xFF)!=PT_INST) - flood_parts(x1, y-2, fullc, cm, bm, flags); + ((pmap[y-1][x1-1]&0xFF)==PT_INST||(pmap[y-1][x1-1]&0xFF)==PT_SPRK) && ((pmap[y-1][x1]&0xFF)==PT_INST||(pmap[y-1][x1]&0xFF)==PT_SPRK) && ((pmap[y-1][x1+1]&0xFF)==PT_INST || (pmap[y-1][x1+1]&0xFF)==PT_SPRK) && + (pmap[y-2][x1-1]&0xFF)!=PT_INST && ((pmap[y-2][x1]&0xFF)==PT_INST ||(pmap[y-2][x1]&0xFF)==PT_SPRK) && (pmap[y-2][x1+1]&0xFF)!=PT_INST) + FloodParts(x1, y-2, fullc, cm, bm, flags); else if (y>=CELL+dy) for (x=x1; x<=x2; x++) if ((pmap[y-1][x]&0xFF)!=PT_SPRK) { if (x==x1 || x==x2 || y>=YRES-CELL-1 || - (pmap[y-1][x-1]&0xFF)==PT_INST || (pmap[y-1][x+1]&0xFF)==PT_INST || - (pmap[y+1][x-1]&0xFF)==PT_INST || ((pmap[y+1][x]&0xFF)!=PT_INST&&(pmap[y+1][x]&0xFF)!=PT_SPRK) || (pmap[y+1][x+1]&0xFF)==PT_INST) - flood_parts(x, y-dy, fullc, cm, bm, flags); - + (pmap[y-1][x-1]&0xFF)==PT_INST || (pmap[y-1][x+1]&0xFF)==PT_INST || + (pmap[y+1][x-1]&0xFF)==PT_INST || ((pmap[y+1][x]&0xFF)!=PT_INST&&(pmap[y+1][x]&0xFF)!=PT_SPRK) || (pmap[y+1][x+1]&0xFF)==PT_INST) + FloodParts(x, y-dy, fullc, cm, bm, flags); + } - + if (y=CELL+dy) for (x=x1; x<=x2; x++) if ((pmap[y-dy][x]&0xFF)==cm && bmap[(y-dy)/CELL][x/CELL]==bm) - if (!flood_parts(x, y-dy, fullc, cm, bm, flags)) + if (!FloodParts(x, y-dy, fullc, cm, bm, flags)) return 0; if (y=CELL) + { + if ((pmap[y][x1-1]&0xFF)!=cm || bmap[y/CELL][(x1-1)/CELL]!=bm) + { + break; + } + x1--; + } + while (x2=CELL+dy) + for (x=x1; x<=x2; x++) + if ((pmap[y-dy][x]&0xFF)==cm && bmap[(y-dy)/CELL][x/CELL]==bm) + if (!FloodWalls(x, y-dy, c, cm, bm, flags)) + return 0; + if (yGetRadius().X; ry = cBrush->GetRadius().Y; } - + int wall = c - 100; if (c==SPC_WIND || c==PT_FIGH) return 0; - - //if(c==SPC_PROP){ - // prop_edit_ui(vid_buf, x, y); - // return 0; - //} - for (r=UI_ACTUALSTART; r<=UI_ACTUALSTART+UI_WALLCOUNT; r++) - { - if (wall==r) - { - if (c == SPC_AIR || c == SPC_HEAT || c == SPC_COOL || c == SPC_VACUUM || c == SPC_PGRV || c == SPC_NGRV || wall == WL_SIGN) - break; - if (wall == WL_ERASE) - b = 0; - else - b = wall; - dw = 1; - } - } - if (c == WL_FANHELPER) - { - b = WL_FANHELPER; - dw = 1; - } - if (wall == WL_GRAV) - { - gravwl_timeout = 60; - } + if (c==PT_LIGH) { if (lighting_recreate>0 && rx+ry>0) @@ -573,49 +639,7 @@ int Simulation::create_parts(int x, int y, int rx, int ry, int c, int flags, Bru } else return 0; } - - if (dw==1) - { - ry = ry/CELL; - rx = rx/CELL; - x = x/CELL; - y = y/CELL; - x -= rx/2; - y -= ry/2; - for (ox=x; ox<=x+rx; ox++) - { - for (oy=y; oy<=y+rx; oy++) - { - if (ox>=0&&ox=0&&oy=0 && i+u=0 && j+vGetRadius().X; + ry = cBrush->GetRadius().Y; + } + + int wall = c; + + if (wall == WL_ERASE) + b = 0; + else + b = wall; + + ry = ry/CELL; + rx = rx/CELL; + x = x/CELL; + y = y/CELL; + x -= rx/2; + y -= ry/2; + for (ox=x; ox<=x+rx; ox++) + { + for (oy=y; oy<=y+rx; oy++) + { + if (ox>=0&&ox=0&&oy=0 && i+u=0 && j+vabs(x2-x1), x, y, dx, dy, sy; float e, de; @@ -732,20 +813,73 @@ void Simulation::create_line(int x1, int y1, int x2, int y2, int rx, int ry, int for (x=x1; x<=x2; x++) { if (cp) - create_parts(y, x, rx, ry, c, flags, cBrush); + CreateParts(y, x, rx, ry, c, flags, cBrush); else - create_parts(x, y, rx, ry, c, flags, cBrush); + CreateParts(x, y, rx, ry, c, flags, cBrush); e += de; if (e >= 0.5f) { y += sy; if ((c==WL_EHOLE+100 || c==WL_ALLOWGAS+100 || c==WL_ALLOWENERGY+100 || c==WL_ALLOWALLELEC+100 || c==WL_ALLOWSOLID+100 || c==WL_ALLOWAIR+100 || c==WL_WALL+100 || c==WL_DESTROYALL+100 || c==WL_ALLOWLIQUID+100 || c==WL_FAN+100 || c==WL_STREAM+100 || c==WL_DETECT+100 || c==WL_EWALL+100 || c==WL_WALLELEC+100 || !(rx+ry)) - && ((y1=y2))) + && ((y1=y2))) + { + if (cp) + CreateParts(y, x, rx, ry, c, flags, cBrush); + else + CreateParts(x, y, rx, ry, c, flags, cBrush); + } + e -= 1.0f; + } + } +} + +void Simulation::CreateWallLine(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags, Brush * cBrush) +{ + int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy; + float e, de; + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1= 0.5f) + { + y += sy; + if (!(rx+ry) && ((y1=y2))) { if (cp) - create_parts(y, x, rx, ry, c, flags, cBrush); + CreateWalls(y, x, rx, ry, c, flags, cBrush); else - create_parts(x, y, rx, ry, c, flags, cBrush); + CreateWalls(x, y, rx, ry, c, flags, cBrush); } e -= 1.0f; } @@ -1097,7 +1231,7 @@ void Simulation::create_arc(int sx, int sy, int dx, int dy, int midpoints, int v xmid[i+1] += (rand()%variance)-voffset; ymid[i+1] += (rand()%variance)-voffset; } - create_line(xmid[i], ymid[i], xmid[i+1], ymid[i+1], 0, 0, type, flags); + CreateLine(xmid[i], ymid[i], xmid[i+1], ymid[i+1], 0, 0, type, flags); } free(xmid); free(ymid); diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index 62427fc..9ed763a 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -244,14 +244,22 @@ public: void update_particles(); void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert); void clear_area(int area_x, int area_y, int area_w, int area_h); - void create_box(int x1, int y1, int x2, int y2, int c, int flags); - int flood_parts(int x, int y, int c, int cm, int bm, int flags); - int create_parts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush = NULL); - void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags, Brush * cBrush = NULL); + + void CreateBox(int x1, int y1, int x2, int y2, int c, int flags); + int FloodParts(int x, int y, int c, int cm, int bm, int flags); + int CreateParts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush = NULL); + void CreateLine(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags, Brush * cBrush = NULL); + + void CreateWallBox(int x1, int y1, int x2, int y2, int c, int flags); + int FloodWalls(int x, int y, int c, int cm, int bm, int flags); + int CreateWalls(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush = NULL); + void CreateWallLine(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags, Brush * cBrush = NULL); + void ApplyDecoration(int x, int y, int colR, int colG, int colB, int colA, int mode); void ApplyDecorationPoint(int x, int y, int rx, int ry, int colR, int colG, int colB, int colA, int mode, Brush * cBrush = NULL); void ApplyDecorationLine(int x1, int y1, int x2, int y2, int rx, int ry, int colR, int colG, int colB, int colA, int mode, Brush * cBrush = NULL); void ApplyDecorationBox(int x1, int y1, int x2, int y2, int colR, int colG, int colB, int colA, int mode); + void *transform_save(void *odata, int *size, matrix2d transform, vector2d translate); inline void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]); inline void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]); diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 60def19..fd0c4a5 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -132,35 +132,26 @@ wall_type * LoadWalls(int & wallCount) { wall_type wtypes[] = { + {PIXPACK(0x808080), PIXPACK(0x000000), 0, "Erases walls."}, {PIXPACK(0xC0C0C0), PIXPACK(0x101010), 0, "Wall. Indestructible. Blocks everything. Conductive."}, {PIXPACK(0x808080), PIXPACK(0x808080), 0, "E-Wall. Becomes transparent when electricity is connected."}, {PIXPACK(0xFF8080), PIXPACK(0xFF2008), 1, "Detector. Generates electricity when a particle is inside."}, {PIXPACK(0x808080), PIXPACK(0x000000), 0, "Streamline. Set start point of a streamline."}, - {PIXPACK(0x808080), PIXPACK(0x000000), 0, "Sign. Click on a sign to edit it or anywhere else to place a new one."}, {PIXPACK(0x8080FF), PIXPACK(0x000000), 1, "Fan. Accelerates air. Use line tool to set direction and strength."}, {PIXPACK(0xC0C0C0), PIXPACK(0x101010), 2, "Wall. Blocks most particles but lets liquids through. Conductive."}, {PIXPACK(0x808080), PIXPACK(0x000000), 1, "Wall. Absorbs particles but lets air currents through."}, - {PIXPACK(0x808080), PIXPACK(0x000000), 0, "Erases walls."}, {PIXPACK(0x808080), PIXPACK(0x000000), 3, "Wall. Indestructible. Blocks everything."}, {PIXPACK(0x3C3C3C), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks particles, allows air"}, {PIXPACK(0x575757), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks liquids and gasses, allows powders"}, {PIXPACK(0xFFFF22), PIXPACK(0x101010), 2, "Conductor, allows particles, conducts electricity"}, {PIXPACK(0x242424), PIXPACK(0x101010), 0, "E-Hole, absorbs particles, release them when powered"}, - {PIXPACK(0xFFFFFF), PIXPACK(0x000000), -1, "Air, creates airflow and pressure"}, - {PIXPACK(0xFFBB00), PIXPACK(0x000000), -1, "Heats the targetted element."}, - {PIXPACK(0x00BBFF), PIXPACK(0x000000), -1, "Cools the targetted element."}, - {PIXPACK(0x303030), PIXPACK(0x000000), -1, "Vacuum, reduces air pressure."}, {PIXPACK(0x579777), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks liquids and solids, allows gasses"}, - {PIXPACK(0x000000), PIXPACK(0x000000), -1, "Drag tool"}, {PIXPACK(0xFFEE00), PIXPACK(0xAA9900), 4, "Gravity wall"}, - {PIXPACK(0x0000BB), PIXPACK(0x000000), -1, "Postive gravity tool."}, - {PIXPACK(0x000099), PIXPACK(0x000000), -1, "Negative gravity tool."}, {PIXPACK(0xFFAA00), PIXPACK(0xAA5500), 4, "Energy wall, allows only energy type particles to pass"}, - {PIXPACK(0xFFAA00), PIXPACK(0xAA5500), -1, "Property edit tool"}, }; - wallCount = SC_TOTAL; - wall_type * wtypesT = (wall_type*)malloc(SC_TOTAL*sizeof(wall_type)); - memcpy(wtypesT, wtypes, SC_TOTAL*sizeof(wall_type)); + wallCount = UI_WALLCOUNT; + wall_type * wtypesT = (wall_type*)malloc(UI_WALLCOUNT*sizeof(wall_type)); + memcpy(wtypesT, wtypes, UI_WALLCOUNT*sizeof(wall_type)); return wtypesT; } diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index 0624322..5e48e94 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -27,23 +27,44 @@ #define UI_WALLSTART 222 #define UI_ACTUALSTART 122 -#define UI_WALLCOUNT 25 - -#define WL_WALLELEC 122 -#define WL_EWALL 123 -#define WL_DETECT 124 -#define WL_STREAM 125 -#define WL_SIGN 126 -#define WL_FAN 127 -#define WL_FANHELPER 255 -#define WL_ALLOWLIQUID 128 -#define WL_DESTROYALL 129 -#define WL_ERASE 130 -#define WL_WALL 131 -#define WL_ALLOWAIR 132 -#define WL_ALLOWSOLID 133 -#define WL_ALLOWALLELEC 134 -#define WL_EHOLE 135 +#define UI_WALLCOUNT 16 + +#define O_WL_WALLELEC 122 +#define O_WL_EWALL 123 +#define O_WL_DETECT 124 +#define O_WL_STREAM 125 +#define O_WL_SIGN 126 +#define O_WL_FAN 127 +#define O_WL_FANHELPER 255 +#define O_WL_ALLOWLIQUID 128 +#define O_WL_DESTROYALL 129 +#define O_WL_ERASE 130 +#define O_WL_WALL 131 +#define O_WL_ALLOWAIR 132 +#define O_WL_ALLOWSOLID 133 +#define O_WL_ALLOWALLELEC 134 +#define O_WL_EHOLE 135 +#define O_WL_ALLOWGAS 140 +#define O_WL_GRAV 142 +#define O_WL_ALLOWENERGY 145 + + +#define WL_ERASE 0 +#define WL_WALLELEC 1 +#define WL_EWALL 2 +#define WL_DETECT 3 +#define WL_STREAM 4 +#define WL_FAN 5 +#define WL_ALLOWLIQUID 6 +#define WL_DESTROYALL 7 +#define WL_WALL 8 +#define WL_ALLOWAIR 9 +#define WL_ALLOWSOLID 10 +#define WL_ALLOWALLELEC 11 +#define WL_EHOLE 12 +#define WL_ALLOWGAS 13 +#define WL_GRAV 14 +#define WL_ALLOWENERGY 15 #define SPC_AIR 236 #define SPC_HEAT 237 @@ -54,10 +75,6 @@ #define SPC_NGRV 244 #define SPC_PROP 246 -#define WL_ALLOWGAS 140 -#define WL_GRAV 142 -#define WL_ALLOWENERGY 145 - #define DECO_DRAW 0 #define DECO_ADD 1 #define DECO_SUBTRACT 2 diff --git a/src/simulation/elements/BOMB.cpp b/src/simulation/elements/BOMB.cpp index ca3be8d..b21be19 100644 --- a/src/simulation/elements/BOMB.cpp +++ b/src/simulation/elements/BOMB.cpp @@ -102,8 +102,8 @@ int Element_BOMB::update(UPDATE_FUNC_ARGS) parts[nb].temp = MAX_TEMP; } } - //create_parts(x, y, 9, 9, PT_BOMB); - //create_parts(x, y, 8, 8, PT_NONE); + //CreateParts(x, y, 9, 9, PT_BOMB); + //CreateParts(x, y, 8, 8, PT_NONE); sim->kill_part(i); return 1; } diff --git a/src/simulation/elements/SPRK.cpp b/src/simulation/elements/SPRK.cpp index 95f928b..feb825b 100644 --- a/src/simulation/elements/SPRK.cpp +++ b/src/simulation/elements/SPRK.cpp @@ -83,7 +83,7 @@ int Element_SPRK::update(UPDATE_FUNC_ARGS) nearp = sim->nearest_part(i, PT_ETRD, -1); if (nearp!=-1 && sim->parts_avg(i, nearp, PT_INSL)!=PT_INSL) { - sim->create_line(x, y, (int)(parts[nearp].x+0.5f), (int)(parts[nearp].y+0.5f), 0, 0, PT_PLSM, 0); + sim->CreateLine(x, y, (int)(parts[nearp].x+0.5f), (int)(parts[nearp].y+0.5f), 0, 0, PT_PLSM, 0); sim->part_change_type(i,x,y,ct); ct = parts[i].ctype = PT_NONE; parts[i].life = 20; @@ -243,7 +243,7 @@ int Element_SPRK::update(UPDATE_FUNC_ARGS) else if (rt==PT_INST) { if (parts[r>>8].life==0 && parts[i].life<4) { - sim->flood_parts(x+rx,y+ry,PT_SPRK,PT_INST,-1, 0);//spark the wire + sim->FloodParts(x+rx,y+ry,PT_SPRK,PT_INST,-1, 0);//spark the wire } } else if (parts[r>>8].life==0 && parts[i].life<4) { diff --git a/src/simulation/elements/STKM.cpp b/src/simulation/elements/STKM.cpp index e554892..772a3e5 100644 --- a/src/simulation/elements/STKM.cpp +++ b/src/simulation/elements/STKM.cpp @@ -304,7 +304,7 @@ int Element_STKM::run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { { int np = -1; if (playerp->elem == SPC_AIR) - sim->create_parts(rx + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01), ry, 4, 4, SPC_AIR, 0); + sim->CreateParts(rx + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01), ry, 4, 4, SPC_AIR, 0); else if (playerp->elem==PT_LIGH && playerp->frames<30)//limit lightning creation rate np = -1; else -- cgit v0.9.2-21-gd62e From c5798c745675e4866a44228ddf161258e85d39a7 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 12 May 2012 18:11:20 +0100 Subject: Tools implemented in a similar way to elements diff --git a/generator.py b/generator.py index dc97594..55737d5 100644 --- a/generator.py +++ b/generator.py @@ -4,75 +4,154 @@ if os.path.isdir("generated/"): shutil.rmtree("generated/") os.mkdir("generated") -elementClasses = dict() +def generateElements(): + elementClasses = dict() -elementHeader = """#ifndef ELEMENTCLASSES_H -#define ELEMENTCLASSES_H -#include -#include "simulation/Element.h" -#include "simulation/elements/Element.h" -""" + elementHeader = """#ifndef ELEMENTCLASSES_H + #define ELEMENTCLASSES_H + #include + #include "simulation/Element.h" + #include "simulation/elements/Element.h" + """ -directives = [] + directives = [] -elementFiles = os.listdir("src/simulation/Elements") -for elementFile in elementFiles: - f = open("src/simulation/Elements/"+elementFile, "r") - fileData = f.read() - f.close() + elementFiles = os.listdir("src/simulation/elements") + for elementFile in elementFiles: + f = open("src/simulation/elements/"+elementFile, "r") + fileData = f.read() + f.close() + + directiveMatcher = '//#TPT-Directive\s+([^\r\n]+)' + matcher = re.compile(directiveMatcher) + directiveMatches = matcher.findall(fileData) + + for match in directiveMatches: + directives.append(match.split(" ")) + + classDirectives = [] + for d in directives: + if d[0] == "ElementClass": + elementClasses[d[1]] = [] + elementHeader += "#define %s %s\n" % (d[2], d[3]) + d[3] = string.atoi(d[3]) + classDirectives.append(d) + + for d in directives: + if d[0] == "ElementHeader": + elementClasses[d[1]].append(string.join(d[2:], " ")+";") + + for className, classMembers in elementClasses.items(): + elementHeader += """class {0}: public Element + {{ + public: + {0}(); + virtual ~{0}(); + {1} + }}; + """.format(className, string.join(classMembers, "\n")) + + elementHeader += """std::vector GetElements(); + #endif + """ + + elementContent = """#include "ElementClasses.h" + std::vector GetElements() + { + std::vector elements; + """; - directiveMatcher = '//#TPT-Directive\s+([^\r\n]+)' - matcher = re.compile(directiveMatcher) - directiveMatches = matcher.findall(fileData) + elementIDs = sorted(classDirectives, key=lambda directive: directive[3]) + for d in elementIDs: + elementContent += """ elements.push_back(%s()); + """ % (d[1]) - for match in directiveMatches: - directives.append(match.split(" ")) + elementContent += """ return elements; + } + """; -classDirectives = [] -for d in directives: - if d[0] == "ElementClass": - elementClasses[d[1]] = [] - elementHeader += "#define %s %s\n" % (d[2], d[3]) - d[3] = string.atoi(d[3]) - classDirectives.append(d) + f = open("generated/ElementClasses.h", "w") + f.write(elementHeader) + f.close() + + f = open("generated/ElementClasses.cpp", "w") + f.write(elementContent) + f.close() + +def generateTools(): + toolClasses = dict() + + toolHeader = """#ifndef TOOLCLASSES_H + #define TOOLCLASSES_H + #include + #include "simulation/Tools.h" + #include "simulation/tools/SimTool.h" + """ + + directives = [] -for d in directives: - if d[0] == "ElementHeader": - elementClasses[d[1]].append(string.join(d[2:], " ")+";") - -for className, classMembers in elementClasses.items(): - elementHeader += """class {0}: public Element -{{ - public: - {0}(); - virtual ~{0}(); - {1} -}}; -""".format(className, string.join(classMembers, "\n")) - -elementHeader += """std::vector GetElements(); -#endif -""" - -elementContent = """#include "ElementClasses.h" -std::vector GetElements() -{ - std::vector elements; -"""; - -elementIDs = sorted(classDirectives, key=lambda directive: directive[3]) -for d in elementIDs: - elementContent += """ elements.push_back(%s()); -""" % (d[1]) - -elementContent += """ return elements; -} -"""; - -f = open("generated/ElementClasses.h", "w") -f.write(elementHeader) -f.close() - -f = open("generated/ElementClasses.cpp", "w") -f.write(elementContent) -f.close() \ No newline at end of file + toolFiles = os.listdir("src/simulation/tools") + for toolFile in toolFiles: + f = open("src/simulation/tools/"+toolFile, "r") + fileData = f.read() + f.close() + + directiveMatcher = '//#TPT-Directive\s+([^\r\n]+)' + matcher = re.compile(directiveMatcher) + directiveMatches = matcher.findall(fileData) + + for match in directiveMatches: + directives.append(match.split(" ")) + + classDirectives = [] + for d in directives: + if d[0] == "ToolClass": + toolClasses[d[1]] = [] + toolHeader += "#define %s %s\n" % (d[2], d[3]) + d[3] = string.atoi(d[3]) + classDirectives.append(d) + + for d in directives: + if d[0] == "ToolHeader": + toolClasses[d[1]].append(string.join(d[2:], " ")+";") + + for className, classMembers in toolClasses.items(): + toolHeader += """class {0}: public SimTool + {{ + public: + {0}(); + virtual ~{0}(); + virtual int Perform(Simulation * sim, Particle * cpart, int x, int y, float strength); + {1} + }}; + """.format(className, string.join(classMembers, "\n")) + + toolHeader += """std::vector GetTools(); + #endif + """ + + toolContent = """#include "ToolClasses.h" + std::vector GetTools() + { + std::vector tools; + """; + + toolIDs = sorted(classDirectives, key=lambda directive: directive[3]) + for d in toolIDs: + toolContent += """ tools.push_back(new %s()); + """ % (d[1]) + + toolContent += """ return tools; + } + """; + + f = open("generated/ToolClasses.h", "w") + f.write(toolHeader) + f.close() + + f = open("generated/ToolClasses.cpp", "w") + f.write(toolContent) + f.close() + +generateElements() +generateTools() \ No newline at end of file diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 453232f..c040566 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -92,6 +92,13 @@ GameModel::GameModel(): menuList[SC_WALL]->AddTool(tempTool); //sim->wtypes[i] } + + //Build menu for simtools + for(int i = 0; i < sim->tools.size(); i++) + { + Tool * tempTool = new Tool(i, sim->tools[i]->Name, PIXR(sim->tools[i]->Colour), PIXG(sim->tools[i]->Colour), PIXB(sim->tools[i]->Colour)); + menuList[SC_TOOL]->AddTool(tempTool); + } //Add decoration tools to menu menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendAdd, "ADD", 0, 0, 0)); diff --git a/src/game/Tool.h b/src/game/Tool.h index 107c8cc..9f88188 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -28,9 +28,15 @@ public: } string GetName() { return toolName; } virtual ~Tool() {} - virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) {} - virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {} - virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) {} + virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) { + sim->ToolBrush(position.X, position.Y, toolID, brush); + } + virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + sim->ToolLine(position1.X, position1.Y, position2.X, position2.Y, toolID, brush); + } + virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { + sim->ToolBox(position1.X, position1.Y, position2.X, position2.Y, toolID, brush); + } virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) {}; int colRed, colBlue, colGreen; }; diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 354c759..914df7e 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -608,6 +608,113 @@ void Simulation::ApplyDecorationLine(int x1, int y1, int x2, int y2, int rx, int } } +int Simulation::Tool(int x, int y, int tool, float strength) +{ + if(tools[tool]) + { + Particle * cpart = NULL; + int r; + if(r = pmap[y][x]) + cpart = &(parts[r>>8]); + else if(r = photons[y][x]) + cpart = &(parts[r>>8]); + return tools[tool]->Perform(this, cpart, x, y, strength); + } + return 0; +} + +int Simulation::ToolBrush(int x, int y, int tool, Brush * cBrush) +{ + int rx, ry, j, i; + if(!cBrush) + return 0; + rx = cBrush->GetRadius().X; + ry = cBrush->GetRadius().Y; + unsigned char *bitmap = cBrush->GetBitmap(); + for (j=-ry; j<=ry; j++) + for (i=-rx; i<=rx; i++) + if(bitmap[(j+ry)*((rx*2)+1)+(i+rx+1)]) + { + if ( x+i<0 || y+j<0 || x+i>=XRES || y+j>=YRES) + continue; + Tool(x+i, y+j, tool, 1.0f); + } +} + +void Simulation::ToolLine(int x1, int y1, int x2, int y2, int tool, Brush * cBrush) +{ + int cp=abs(y2-y1)>abs(x2-x1), x, y, dx, dy, sy, rx, ry; + float e, de; + rx = cBrush->GetRadius().X; + ry = cBrush->GetRadius().Y; + if (cp) + { + y = x1; + x1 = y1; + y1 = y; + y = x2; + x2 = y2; + y2 = y; + } + if (x1 > x2) + { + y = x1; + x1 = x2; + x2 = y; + y = y1; + y1 = y2; + y2 = y; + } + dx = x2 - x1; + dy = abs(y2 - y1); + e = 0.0f; + if (dx) + de = dy/(float)dx; + else + de = 0.0f; + y = y1; + sy = (y1= 0.5f) + { + y += sy; + if ((!(rx+ry)) && ((y1=y2))) + { + if (cp) + ToolBrush(y, x, tool, cBrush); + else + ToolBrush(x, y, tool, cBrush); + } + e -= 1.0f; + } + } +} +void Simulation::ToolBox(int x1, int y1, int x2, int y2, int tool, Brush * cBrush) +{ + int i, j; + if (x1>x2) + { + i = x2; + x2 = x1; + x1 = i; + } + if (y1>y2) + { + j = y2; + y2 = y1; + y1 = j; + } + for (j=y1; j<=y2; j++) + for (i=x1; i<=x2; i++) + ToolBrush(i, j, tool, cBrush); +} + //this creates particles from a brush, don't use if you want to create one particle int Simulation::CreateParts(int x, int y, int rx, int ry, int c, int flags, Brush * cBrush) { @@ -3762,6 +3869,8 @@ Simulation::Simulation(): { elements[i] = elementList[i]; } + + tools = GetTools(); int golRulesCount; int * golRulesT = LoadGOLRules(golRulesCount); diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index 9ed763a..71f233d 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -12,11 +12,11 @@ #include "Renderer.h" #include "Graphics.h" #include "Elements.h" +#include "Tools.h" #include "Misc.h" #include "game/Brush.h" #include "Gravity.h" #include "SimulationData.h" -//#include "ElementFunctions.h" #define CHANNELS ((int)(MAX_TEMP-73)/100+2) @@ -140,6 +140,7 @@ public: Air * air; Element * elements; + vector tools; unsigned int * platent; wall_type wtypes[UI_WALLCOUNT]; gol_menu gmenu[NGOL]; @@ -244,6 +245,11 @@ public: void update_particles(); void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert); void clear_area(int area_x, int area_y, int area_w, int area_h); + + int Tool(int x, int y, int tool, float strength); + int ToolBrush(int x, int y, int tool, Brush * cBrush); + void ToolLine(int x1, int y1, int x2, int y2, int tool, Brush * cBrush); + void ToolBox(int x1, int y1, int x2, int y2, int tool, Brush * cBrush); void CreateBox(int x1, int y1, int x2, int y2, int c, int flags); int FloodParts(int x, int y, int c, int cm, int bm, int flags); diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h index 5e48e94..c24ce39 100644 --- a/src/simulation/SimulationData.h +++ b/src/simulation/SimulationData.h @@ -156,7 +156,10 @@ struct menu_section; struct wall_type; +class SimTool; + class Element; + std::vector GetDefaultElements(); gol_menu * LoadGOLMenu(int & golMenuCount); diff --git a/src/simulation/Tools.h b/src/simulation/Tools.h new file mode 100644 index 0000000..525701e --- /dev/null +++ b/src/simulation/Tools.h @@ -0,0 +1,7 @@ +#ifndef TOOLS_H_ +#define TOOLS_H_ + +#include "ToolClasses.h" + + +#endif diff --git a/src/simulation/tools/Cool.cpp b/src/simulation/tools/Cool.cpp new file mode 100644 index 0000000..12a6b28 --- /dev/null +++ b/src/simulation/tools/Cool.cpp @@ -0,0 +1,19 @@ +#include "simulation/Tools.h" +//#TPT-Directive ToolClass Tool_Cool TOOL_COOL 1 +Tool_Cool::Tool_Cool() +{ + Identifier = "DEFAULT_TOOL_COOL"; + Name = "COOL"; + Colour = PIXPACK(0x00DDFF); + Description = "Cools particles"; +} + +int Tool_Cool::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength) +{ + if(!cpart) + return 0; + cpart->temp -= strength; + return 1; +} + +Tool_Cool::~Tool_Cool() {} \ No newline at end of file diff --git a/src/simulation/tools/Heat.cpp b/src/simulation/tools/Heat.cpp new file mode 100644 index 0000000..a2c500c --- /dev/null +++ b/src/simulation/tools/Heat.cpp @@ -0,0 +1,19 @@ +#include "simulation/Tools.h" +//#TPT-Directive ToolClass Tool_Heat TOOL_HEAT 0 +Tool_Heat::Tool_Heat() +{ + Identifier = "DEFAULT_TOOL_HEAT"; + Name = "HEAT"; + Colour = PIXPACK(0xFFDD00); + Description = "Heats particles"; +} + +int Tool_Heat::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength) +{ + if(!cpart) + return 0; + cpart->temp += strength; + return 1; +} + +Tool_Heat::~Tool_Heat() {} \ No newline at end of file diff --git a/src/simulation/tools/SimTool.cpp b/src/simulation/tools/SimTool.cpp new file mode 100644 index 0000000..d7015fa --- /dev/null +++ b/src/simulation/tools/SimTool.cpp @@ -0,0 +1,10 @@ +#include "simulation/Element.h" +#include "simulation/Tools.h" + +SimTool::SimTool(): +Identifier("DEFAULT_TOOL_INVALID"), +Name(""), +Colour(PIXPACK(0xFFFFFF)), +Description("NULL Tool, does NOTHING") +{ +} \ No newline at end of file diff --git a/src/simulation/tools/SimTool.h b/src/simulation/tools/SimTool.h new file mode 100644 index 0000000..0fbcba4 --- /dev/null +++ b/src/simulation/tools/SimTool.h @@ -0,0 +1,23 @@ +#ifndef SIMTOOL_H +#define SIMTOOL_H + +#include "simulation/Simulation.h" +#include "Renderer.h" +#include "simulation/Elements.h" + +class Simulation; +struct Particle; +class SimTool +{ +public: + char *Identifier; + char *Name; + pixel Colour; + char *Description; + + SimTool(); + virtual ~SimTool() {} + virtual int Perform(Simulation * sim, Particle * cpart, int x, int y, float strength) {} +}; + +#endif \ No newline at end of file -- cgit v0.9.2-21-gd62e From 7128188048395f503b2f70ace2880459acdf7515 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 12 May 2012 22:25:45 +0100 Subject: Primitive sign adding diff --git a/src/game/SignTool.cpp b/src/game/SignTool.cpp new file mode 100644 index 0000000..ce4c181 --- /dev/null +++ b/src/game/SignTool.cpp @@ -0,0 +1,9 @@ +// +// SignTool.cpp +// PowderToypp +// +// Created by Simon Robertshaw on 12/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#include -- cgit v0.9.2-21-gd62e From 724c99102e1d2ed3a2c347eedb05d9818bac7513 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 12 May 2012 22:28:45 +0100 Subject: Stupid git diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 92cb376..7f6f9cc 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -474,15 +474,17 @@ void Renderer::DrawWalls() void Renderer::get_sign_pos(int i, int *x0, int *y0, int *w, int *h) { - sign *signs = sim->signs; + std::vector signs = sim->signs; //Changing width if sign have special content - if (strcmp(signs[i].text, "{p}")==0) + if (signs[i].text == "{p}") + { *w = Graphics::textwidth("Pressure: -000.00"); - - if (strcmp(signs[i].text, "{t}")==0) + } + else if (signs[i].text == "{t}") + { *w = Graphics::textwidth("Temp: 0000.00"); - - if (sregexp(signs[i].text, "^{c:[0-9]*|.*}$")==0) + } + else if (sregexp(signs[i].text.c_str(), "^{c:[0-9]*|.*}$")==0) { int sldr, startm; char buff[256]; @@ -498,10 +500,10 @@ void Renderer::get_sign_pos(int i, int *x0, int *y0, int *w, int *h) } *w = Graphics::textwidth(buff) + 5; } - - //Ususal width - if (strcmp(signs[i].text, "{p}") && strcmp(signs[i].text, "{t}") && sregexp(signs[i].text, "^{c:[0-9]*|.*}$")) - *w = Graphics::textwidth(signs[i].text) + 5; + else + { + *w = Graphics::textwidth(signs[i].text.c_str()) + 5; + } *h = 14; *x0 = (signs[i].ju == 2) ? signs[i].x - *w : (signs[i].ju == 1) ? signs[i].x - *w/2 : signs[i].x; @@ -511,13 +513,13 @@ void Renderer::get_sign_pos(int i, int *x0, int *y0, int *w, int *h) void Renderer::DrawSigns() { int i, j, x, y, w, h, dx, dy,mx,my,b=1,bq; - sign *signs = sim->signs; + std::vector signs = sim->signs; #ifdef OGLR glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); glTranslated(0, MENUSIZE, 0); #endif - for (i=0; idrawrect(x, y, w, h, 192, 192, 192, 255); //Displaying special information - if (strcmp(signs[i].text, "{p}")==0) + if (signs[i].text == "{p}") { float pressure = 0.0f; if (signs[i].x>=0 && signs[i].x=0 && signs[i].ydrawtext(x+3, y+3, buff, 255, 255, 255, 255); } - if (strcmp(signs[i].text, "{t}")==0) + else if (signs[i].text == "{t}") { if (signs[i].x>=0 && signs[i].x=0 && signs[i].ypmap[signs[i].y][signs[i].x]) sprintf(buff, "Temp: %4.2f", sim->parts[sim->pmap[signs[i].y][signs[i].x]>>8].temp-273.15); //...temperature @@ -541,8 +543,7 @@ void Renderer::DrawSigns() sprintf(buff, "Temp: 0.00"); //...temperature g->drawtext(x+3, y+3, buff, 255, 255, 255, 255); } - - if (sregexp(signs[i].text, "^{c:[0-9]*|.*}$")==0) + else if (sregexp(signs[i].text.c_str(), "^{c:[0-9]*|.*}$")==0) { int sldr, startm; memset(buff, 0, sizeof(buff)); @@ -556,11 +557,11 @@ void Renderer::DrawSigns() } g->drawtext(x+3, y+3, buff, 0, 191, 255, 255); } - - //Usual text - if (strcmp(signs[i].text, "{p}") && strcmp(signs[i].text, "{t}") && sregexp(signs[i].text, "^{c:[0-9]*|.*}$")) + else + { g->drawtext(x+3, y+3, signs[i].text, 255, 255, 255, 255); - + } + x = signs[i].x; y = signs[i].y; dx = 1 - signs[i].ju; diff --git a/src/dialogues/TextPrompt.cpp b/src/dialogues/TextPrompt.cpp index 8627786..1f84e63 100644 --- a/src/dialogues/TextPrompt.cpp +++ b/src/dialogues/TextPrompt.cpp @@ -18,7 +18,8 @@ public: void ActionCallback(ui::Button * sender) { ui::Engine::Ref().CloseWindow(); - prompt->callback->TextCallback(result, prompt->textField->GetText()); + if(prompt->callback) + prompt->callback->TextCallback(result, prompt->textField->GetText()); prompt->SelfDestruct(); //TODO: Fix component disposal } }; diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index c040566..60e3c15 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -93,6 +93,10 @@ GameModel::GameModel(): //sim->wtypes[i] } + //Add special sign and prop tools + menuList[SC_TOOL]->AddTool(new SignTool()); + menuList[SC_TOOL]->AddTool(new PropertyTool()); + //Build menu for simtools for(int i = 0; i < sim->tools.size(); i++) { @@ -109,8 +113,8 @@ GameModel::GameModel(): menuList[SC_DECO]->AddTool(new DecorationTool(DecorationTool::BlendSet, "SET", 0, 0, 0)); //Set default brush palette - brushList.push_back(new Brush(ui::Point(4, 4))); brushList.push_back(new EllipseBrush(ui::Point(4, 4))); + brushList.push_back(new Brush(ui::Point(4, 4))); //Set default tools activeTools[0] = menuList[SC_POWDERS]->GetToolList()[0]; diff --git a/src/game/SignTool.cpp b/src/game/SignTool.cpp index ce4c181..50ddb8a 100644 --- a/src/game/SignTool.cpp +++ b/src/game/SignTool.cpp @@ -1,9 +1,81 @@ -// -// SignTool.cpp -// PowderToypp -// -// Created by Simon Robertshaw on 12/05/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - #include +#include "simulation/Simulation.h" +#include "Tool.h" +#include "interface/Window.h" +#include "interface/Button.h" +#include "interface/Label.h" +#include "interface/Textbox.h" + +class SignWindow: public ui::Window +{ +public: + ui::Textbox * textField; + SignTool * tool; + Simulation * sim; + int signID; + ui::Point signPosition; + SignWindow(SignTool * tool_, Simulation * sim_, int signID_, ui::Point position_); + virtual void OnDraw(); + virtual ~SignWindow() {} +}; + +class OkayAction: public ui::ButtonAction +{ +public: + SignWindow * prompt; + OkayAction(SignWindow * prompt_) { prompt = prompt_; } + void ActionCallback(ui::Button * sender) + { + ui::Engine::Ref().CloseWindow(); + prompt->SelfDestruct(); + + if(prompt->signID==-1 && prompt->textField->GetText().length()) + { + prompt->sim->signs.push_back(sign(prompt->textField->GetText(), prompt->signPosition.X, prompt->signPosition.Y, sign::Left)); + } + else + { + prompt->sim->signs[prompt->signID] = sign(sign(prompt->textField->GetText(), prompt->signPosition.X, prompt->signPosition.Y, sign::Left)); + } + } +}; + +SignWindow::SignWindow(SignTool * tool_, Simulation * sim_, int signID_, ui::Point position_): + ui::Window(ui::Point(-1, -1), ui::Point(200, 75)), + tool(tool_), + signID(signID_), + sim(sim_), + signPosition(position_) +{ + ui::Label * messageLabel = new ui::Label(ui::Point(4, 18), ui::Point(Size.X-8, 60), "New sign"); + messageLabel->SetAlignment(AlignLeft, AlignTop); + AddComponent(messageLabel); + + ui::Button * okayButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(Size.X, 16), "OK"); + okayButton->SetAlignment(AlignLeft, AlignBottom); + okayButton->SetBorderColour(ui::Colour(200, 200, 200)); + okayButton->SetActionCallback(new OkayAction(this)); + AddComponent(okayButton); + + textField = new ui::Textbox(ui::Point(4, 32), ui::Point(Size.X-8, 16), ""); + textField->SetAlignment(AlignLeft, AlignBottom); + AddComponent(textField); + + ui::Engine::Ref().ShowWindow(this); +} +void SignWindow::OnDraw() +{ + Graphics * g = ui::Engine::Ref().g; + + g->clearrect(Position.X-2, Position.Y-2, Size.X+4, Size.Y+4); + g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 200, 200, 200, 255); +} + +void SignTool::Draw(Simulation * sim, Brush * brush, ui::Point position) +{ + if(!opened) //Ensure the dialogue can only be shown one at a time. + { + opened = true; + new SignWindow(this, sim, -1, position); + } +} \ No newline at end of file diff --git a/src/game/Tool.h b/src/game/Tool.h index 9f88188..935e598 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -19,11 +19,11 @@ protected: string toolName; public: Tool(int id, string name, int r, int g, int b): - toolID(id), - toolName(name), - colRed(r), - colGreen(g), - colBlue(b) + toolID(id), + toolName(name), + colRed(r), + colGreen(g), + colBlue(b) { } string GetName() { return toolName; } @@ -41,6 +41,38 @@ public: int colRed, colBlue, colGreen; }; +class SignTool: public Tool +{ +public: + SignTool(): + Tool(0, "SIGN", 0, 0, 0), + opened(false) + { + } + virtual ~SignTool() {} + virtual void Draw(Simulation * sim, Brush * brush, ui::Point position); + virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { } + virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { } + virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { } + void SetClosed() { opened = false; } +protected: + bool opened; +}; + +class PropertyTool: public Tool +{ +public: + PropertyTool(): + Tool(0, "PROP", 0, 0, 0) + { + } + virtual ~PropertyTool() {} + virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) {}; + virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { } + virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { } + virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { } +}; + class ElementTool: public Tool { public: diff --git a/src/simulation/SaveLoader.cpp b/src/simulation/SaveLoader.cpp index 9bfb131..b07ba08 100644 --- a/src/simulation/SaveLoader.cpp +++ b/src/simulation/SaveLoader.cpp @@ -86,6 +86,10 @@ int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim, int nf=0, new_format = 0, ttv = 0; Particle *parts = sim->parts; int *fp = (int *)malloc(NPART*sizeof(int)); + + std::vector tempSigns; + char tempSignText[255]; + sign tempSign("", 0, 0, sign::Left); //New file header uses PSv, replacing fuC. This is to detect if the client uses a new save format for temperatures //This creates a problem for old clients, that display and "corrupt" error instead of a "newer version" error @@ -665,31 +669,32 @@ int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim, { if (p+6 > dataLength) goto corrupt; - for (k=0; ksigns[k].text[0]) - break; x = d[p++]; x |= ((unsigned)d[p++])<<8; - if (ksigns[k].x = x+x0; + tempSign.x = x+x0; x = d[p++]; x |= ((unsigned)d[p++])<<8; - if (ksigns[k].y = x+y0; + tempSign.y = x+y0; x = d[p++]; - if (ksigns[k].ju = x; + tempSign.ju = (sign::Justification)x; x = d[p++]; if (p+x > dataLength) - goto corrupt; - if (ksigns[k].text, d+p, x); - sim->signs[k].text[x] = 0; - //clean_text(signs[k].text, 158-14 /* Current max sign length */); //TODO: Text cleanup for signs - } + goto corrupt; + if(x>254) + x = 254; + memcpy(tempSignText, d+p, x); + tempSignText[x] = 0; + tempSign.text = tempSignText; + tempSigns.push_back(tempSign); p += x; } + + for (i = 0; i < tempSigns.size(); i++) + { + if(i == MAXSIGNS) + break; + sim->signs.push_back(tempSigns[i]); + } version1: if (m) free(m); @@ -868,14 +873,14 @@ unsigned char * SaveLoader::PSVBuild(int & dataLength, Simulation * sim, int ori } j = 0; - for (i=0; isigns[i].text[0] && + for (i=0; isigns.size(); i++) + if (sim->signs[i].text.length() && sim->signs[i].x>=x0 && sim->signs[i].xsigns[i].y>=y0 && sim->signs[i].ysigns[i].text[0] && + for (i=0; isigns.size(); i++) + if (sim->signs[i].text.length() && sim->signs[i].x>=x0 && sim->signs[i].xsigns[i].y>=y0 && sim->signs[i].ysigns[i].y-y0); d[p++] = (sim->signs[i].y-y0)>>8; d[p++] = sim->signs[i].ju; - x = strlen(sim->signs[i].text); + x = sim->signs[i].text.length(); d[p++] = x; - memcpy(d+p, sim->signs[i].text, x); + memcpy(d+p, sim->signs[i].text.c_str(), x); p+=x; } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 914df7e..41565a2 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1347,8 +1347,7 @@ void Simulation::create_arc(int sx, int sy, int dx, int dy, int midpoints, int v void Simulation::clear_sim(void) { int i, x, y; - if(signs) - memset(signs, 0, sizeof(sign)*MAXSIGNS); + signs.clear(); memset(bmap, 0, sizeof(bmap)); memset(emap, 0, sizeof(emap)); memset(parts, 0, sizeof(Particle)*NPART); @@ -3806,7 +3805,6 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu Simulation::~Simulation() { - free(signs); delete grav; delete air; } @@ -3844,9 +3842,6 @@ Simulation::Simulation(): pv = air->pv; hv = air->hv; - //Clear signs - signs = (sign*)calloc(MAXSIGNS, sizeof(sign)); - int menuCount; menu_section * msectionsT = LoadMenus(menuCount); memcpy(msections, msectionsT, menuCount * sizeof(menu_section)); diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index 71f233d..f4f8f5b 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -113,8 +113,17 @@ typedef struct menu_section menu_section; struct sign { - int x,y,ju; - char text[256]; +public: + enum Justification { Left = 0, Centre = 1, Right = 2 }; + sign(std::string text_, int x_, int y_, Justification justification_): + text(text_), + x(x_), + y(y_), + ju(justification_) + {} + int x, y; + Justification ju; + std::string text; }; typedef struct sign sign; @@ -139,6 +148,7 @@ public: Gravity * grav; Air * air; + vector signs; Element * elements; vector tools; unsigned int * platent; @@ -165,7 +175,6 @@ public: int NUM_PARTS; int elementCount[PT_NUM]; int ISWIRE; - sign * signs; //Gol sim int CGOL; int ISGOL; -- cgit v0.9.2-21-gd62e From 7544f46b9847bce7c091ab6b6e8f7ac08e87b844 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 12 May 2012 22:31:58 +0100 Subject: Add generate as a dep for makefile diff --git a/Makefile b/Makefile index 8c7952e..814d77e 100644 --- a/Makefile +++ b/Makefile @@ -32,12 +32,14 @@ build/powder-release: CFLAGS += -DLIN32 -O3 -ftree-vectorize -msse2 -funsafe-ma build/powder-release: LFLAGS := -lSDL -lm -lbz2 -llua -lfftw3f build/powder: CFLAGS += -DLIN32 build/powder: LFLAGS := -lSDL -lm -lbz2 -llua -lfftw3f -build/powder-x: CFLAGS += -DPIX32BGRA -DMACOSX -I/Library/Frameworks/SDL.framework/Headers -I/Library/Frameworks/Lua.framework/Headers +#build/powder-x: CFLAGS += -DMACOSX -I/Library/Frameworks/SDL.framework/Headers -I/Library/Frameworks/Lua.framework/Headers -I/Library/Frameworks/OpenGL.framework/Headers -DOGLR -DPIX32OGL -DPIXALPHA +#build/powder-x: LFLAGS := -lm -lbz2 -lfftw3f -framework SDL -framework Lua -framework Cocoa -framework OpenGL +build/powder-x: CFLAGS += -DMACOSX -I/Library/Frameworks/SDL.framework/Headers -I/Library/Frameworks/Lua.framework/Headers -DPIX32BGRA build/powder-x: LFLAGS := -lm -lbz2 -lfftw3f -framework SDL -framework Lua -framework Cocoa CFLAGS += -DGRAVFFT -DLUACONSOLE -build/powder-release.exe: $(SOURCES) build/powder-res.o +build/powder-release.exe: $(SOURCES) generate build/powder-res.o $(CPPC_WIN) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) build/powder-res.o -o $@ strip $@ build/powder-res.o: resources/powder-res.rc resources/powder.ico resources/document.ico @@ -47,7 +49,7 @@ build/powder-release: $(SOURCES) $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) -o $@ strip $@ -build/powder.exe: buildpaths-powder.exe $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) build/powder-res.o +build/powder.exe: buildpaths-powder.exe generate $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) build/powder-res.o $(CPPC_WIN) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) build/powder-res.o $(LFLAGS) -o $@ -ggdb build/obj/powder.exe/%.o: src/%.cpp $(HEADERS) $(CPPC_WIN) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb @@ -55,7 +57,7 @@ buildpaths-powder.exe: $(shell mkdir -p build/obj/powder.exe/) $(shell mkdir -p $(sort $(dir $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS))))) -build/powder: buildpaths-powder $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS)) +build/powder: buildpaths-powder generate $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS)) $(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder/%.o,$(OBJS)) $(LFLAGS) -o $@ -ggdb build/obj/powder/%.o: src/%.cpp $(HEADERS) $(CPPC) -c $(CFLAGS) $(OFLAGS) -o $@ $< -ggdb -- cgit v0.9.2-21-gd62e From a2e91c247fab4a2cee8936d83979f4a72390f7e7 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 13 May 2012 14:30:00 +0100 Subject: Remove QTCreator project files diff --git a/PowderToy++.config b/PowderToy++.config deleted file mode 100644 index 8cec188..0000000 --- a/PowderToy++.config +++ /dev/null @@ -1 +0,0 @@ -// ADD PREDEFINED MACROS HERE! diff --git a/PowderToy++.creator b/PowderToy++.creator deleted file mode 100644 index e94cbbd..0000000 --- a/PowderToy++.creator +++ /dev/null @@ -1 +0,0 @@ -[General] diff --git a/PowderToy++.files b/PowderToy++.files deleted file mode 100644 index 022927d..0000000 --- a/PowderToy++.files +++ /dev/null @@ -1,338 +0,0 @@ -C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/font.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/hmap.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/icon.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/icondoc.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/images.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/data/Shaders.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/acel.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/acid.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/amtr.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/anar.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/aray.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bang.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bcln.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bcol.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bizr.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bmtl.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/bomb.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/boyl.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/brmt.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/btry.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/c5.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/caus.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/cbnw.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/clne.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/clst.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/co2.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/coal.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/conv.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/dest.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/deut.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/dlay.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/dstw.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/elec.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/elementmisc.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/emp.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/figh.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/fire.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/firw.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/fog.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/frzw.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/frzz.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/fsep.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/fuse.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/fwrk.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/gbmb.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/glas.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/glow.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/goo.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/gpmp.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/graphics_default.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/h2.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/hswc.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/ice.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/ignt.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/iron.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/isz.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/lava.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/lcry.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/legacy.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/ligh.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/merc.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/mort.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/nbhl.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/neut.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/newgraphics.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/none.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/nptct.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/nwhl.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/O2.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pbcn.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pcln.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/phot.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pipe.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/plnt.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/plsm.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/plut.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/prti.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/prto.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pump.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pvod.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/pyro.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/qrtz.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/rime.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/shld.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/sing.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/sltw.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/smke.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/soap.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/spng.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/sprk.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/stkm.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/stkm2.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/stor.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/swch.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/thdr.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/thrm.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/uran.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/vine.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/warp.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/watr.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/wifi.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/wire.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/wtrv.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/elements/yest.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/Button.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/Component.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/Panel.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/Sandbox.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/State.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface/Window.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Air.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Config.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Element.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/ElementFunctions.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/ElementGraphics.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Elements.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Graphics.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Gravity.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Misc.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Renderer.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/Simulation.h -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Button.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Component.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Panel.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/Sandbox.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/interface/State.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Air.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Graphics.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Gravity.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Misc.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/PowderToy.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Renderer.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/src/Simulation.cpp -C:/Users/Simon/Projects/FacialTurd-PowderToypp/Changelog.txt -src/interface/ControlFactory.cpp -includes/interface/ControlFactory.h -includes/GameSession.h -src/Console.cpp -includes/Console.h -includes/interface/Engine.h -includes/interface/Platform.h -src/interface/State.cpp -src/interface/Panel.cpp -src/interface/Engine.cpp -src/interface/ControlFactory.cpp -src/interface/Component.cpp -src/interface/Button.cpp -includes/interface/Point.h -includes/Singleton.h -src/interface/Label.cpp -includes/interface/Label.h -includes/Global.h -src/Global.cpp -src/search/SearchModel.h -src/search/SearchModel.cpp -src/search/Save.h -src/search/SearchView.h -src/search/SearchView.cpp -src/search/SearchController.h -src/search/SearchController.cpp -src/game/GameController.h -src/game/GameController.cpp -src/game/GameModel.h -src/game/GameModel.cpp -src/interface/Window.h -src/interface/Window.cpp -src/game/GameView.h -src/game/GameView.cpp -src/Singleton.h -src/Simulation.h -src/Renderer.h -src/Misc.h -src/Gravity.h -src/Graphics.h -src/Global.h -src/Elements.h -src/ElementGraphics.h -src/ElementFunctions.h -src/Element.h -src/Console.h -src/Config.h -src/Air.h -src/Simulation.cpp -src/Renderer.cpp -src/PowderToy.cpp -src/Misc.cpp -src/Gravity.cpp -src/Graphics.cpp -src/Global.cpp -src/Console.cpp -src/Air.cpp -src/elements/yest.cpp -src/elements/wtrv.cpp -src/elements/wire.cpp -src/elements/wifi.cpp -src/elements/watr.cpp -src/elements/warp.cpp -src/elements/vine.cpp -src/elements/uran.cpp -src/elements/thrm.cpp -src/elements/thdr.cpp -src/elements/swch.cpp -src/elements/stor.cpp -src/elements/stkm2.cpp -src/elements/stkm.cpp -src/elements/sprk.cpp -src/elements/spng.cpp -src/elements/soap.cpp -src/elements/smke.cpp -src/elements/sltw.cpp -src/elements/sing.cpp -src/elements/shld.cpp -src/elements/rime.cpp -src/elements/qrtz.cpp -src/elements/pyro.cpp -src/elements/pvod.cpp -src/elements/pump.cpp -src/elements/prto.cpp -src/elements/prti.cpp -src/elements/plut.cpp -src/elements/plsm.cpp -src/elements/plnt.cpp -src/elements/pipe.cpp -src/elements/phot.cpp -src/elements/pcln.cpp -src/elements/pbcn.cpp -src/elements/O2.cpp -src/elements/nwhl.cpp -src/elements/nptct.cpp -src/elements/none.cpp -src/elements/newgraphics.cpp -src/elements/neut.cpp -src/elements/nbhl.cpp -src/elements/mort.cpp -src/elements/merc.cpp -src/elements/ligh.cpp -src/elements/legacy.cpp -src/elements/lcry.cpp -src/elements/lava.cpp -src/elements/isz.cpp -src/elements/iron.cpp -src/elements/ignt.cpp -src/elements/ice.cpp -src/elements/hswc.cpp -src/elements/h2.cpp -src/elements/graphics_default.cpp -src/elements/gpmp.cpp -src/elements/goo.cpp -src/elements/glow.cpp -src/elements/glas.cpp -src/elements/gbmb.cpp -src/elements/fwrk.cpp -src/elements/fuse.cpp -src/elements/fsep.cpp -src/elements/frzz.cpp -src/elements/frzw.cpp -src/elements/fog.cpp -src/elements/firw.cpp -src/elements/fire.cpp -src/elements/figh.cpp -src/elements/emp.cpp -src/elements/elementmisc.cpp -src/elements/elec.cpp -src/elements/dstw.cpp -src/elements/dlay.cpp -src/elements/deut.cpp -src/elements/dest.cpp -src/elements/conv.cpp -src/elements/coal.cpp -src/elements/co2.cpp -src/elements/clst.cpp -src/elements/clne.cpp -src/elements/cbnw.cpp -src/elements/caus.cpp -src/elements/c5.cpp -src/elements/btry.cpp -src/elements/brmt.cpp -src/elements/boyl.cpp -src/elements/bomb.cpp -src/elements/bmtl.cpp -src/elements/bizr.cpp -src/elements/bcol.cpp -src/elements/bcln.cpp -src/elements/bang.cpp -src/elements/aray.cpp -src/elements/anar.cpp -src/elements/amtr.cpp -src/elements/acid.cpp -src/elements/acel.cpp -src/interface/Window.h -src/interface/State.h -src/interface/Point.h -src/interface/Platform.h -src/interface/Panel.h -src/interface/Label.h -src/interface/Engine.h -src/interface/ControlFactory.h -src/interface/Component.h -src/interface/Button.h -src/interface/Window.cpp -src/interface/State.cpp -src/interface/Sandbox.cpp -src/interface/Panel.cpp -src/interface/Label.cpp -src/interface/Engine.cpp -src/interface/ControlFactory.cpp -src/interface/Component.cpp -src/interface/Button.cpp -src/interface/SaveButton.h -src/interface/SaveButton.cpp -src/client/Client.h -src/client/Client.cpp -src/client/HTTP.h -src/client/HTTP.c -src/client/HTTP.cpp -src/client/MD5.cpp -src/client/MD5.h -src/search/Thumbnail.h -src/simulation/Simulation.h -src/simulation/Gravity.h -src/simulation/Elements.h -src/simulation/ElementGraphics.h -src/simulation/ElementFunctions.h -src/simulation/Element.h -src/simulation/Air.h -src/simulation/Simulation.cpp -src/simulation/Gravity.cpp -src/simulation/Air.cpp -src/cajun/writer.h -src/cajun/visitor.h -src/cajun/reader.h -src/cajun/elements.h -src/cajun/writer.inl -src/cajun/reader.inl -src/cajun/elements.inl -src/interface/Textbox.h -src/interface/Textbox.cpp -src/interface/Keys.h diff --git a/PowderToy++.includes b/PowderToy++.includes deleted file mode 100644 index 5f65989..0000000 --- a/PowderToy++.includes +++ /dev/null @@ -1,3 +0,0 @@ -C:/Users/Simon/Projects/FacialTurd-PowderToypp/data -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes -C:/Users/Simon/Projects/FacialTurd-PowderToypp/includes/interface \ No newline at end of file diff --git a/SDLMain.h b/SDLMain.h new file mode 100644 index 0000000..c56d90c --- /dev/null +++ b/SDLMain.h @@ -0,0 +1,16 @@ +/* SDLMain.m - main entry point for our Cocoa-ized SDL app + Initial Version: Darrell Walisser + Non-NIB-Code & other changes: Max Horn + + Feel free to customize this file to suit your needs +*/ + +#ifndef _SDLMain_h_ +#define _SDLMain_h_ + +#import + +@interface SDLMain : NSObject +@end + +#endif /* _SDLMain_h_ */ diff --git a/SDLMain.m b/SDLMain.m new file mode 100644 index 0000000..2434f81 --- /dev/null +++ b/SDLMain.m @@ -0,0 +1,381 @@ +/* SDLMain.m - main entry point for our Cocoa-ized SDL app + Initial Version: Darrell Walisser + Non-NIB-Code & other changes: Max Horn + + Feel free to customize this file to suit your needs +*/ + +#include "SDL.h" +#include "SDLMain.h" +#include /* for MAXPATHLEN */ +#include + +/* For some reaon, Apple removed setAppleMenu from the headers in 10.4, + but the method still is there and works. To avoid warnings, we declare + it ourselves here. */ +@interface NSApplication(SDL_Missing_Methods) +- (void)setAppleMenu:(NSMenu *)menu; +@end + +/* Use this flag to determine whether we use SDLMain.nib or not */ +#define SDL_USE_NIB_FILE 0 + +/* Use this flag to determine whether we use CPS (docking) or not */ +#define SDL_USE_CPS 1 +#ifdef SDL_USE_CPS +/* Portions of CPS.h */ +typedef struct CPSProcessSerNum +{ + UInt32 lo; + UInt32 hi; +} CPSProcessSerNum; + +extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn); +extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5); +extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn); + +#endif /* SDL_USE_CPS */ + +static int gArgc; +static char **gArgv; +static BOOL gFinderLaunch; +static BOOL gCalledAppMainline = FALSE; + +static NSString *getApplicationName(void) +{ + const NSDictionary *dict; + NSString *appName = 0; + + /* Determine the application name */ + dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle()); + if (dict) + appName = [dict objectForKey: @"CFBundleName"]; + + if (![appName length]) + appName = [[NSProcessInfo processInfo] processName]; + + return appName; +} + +#if SDL_USE_NIB_FILE +/* A helper category for NSString */ +@interface NSString (ReplaceSubString) +- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString; +@end +#endif + +@interface NSApplication (SDLApplication) +@end + +@implementation NSApplication (SDLApplication) +/* Invoked from the Quit menu item */ +- (void)terminate:(id)sender +{ + /* Post a SDL_QUIT event */ + SDL_Event event; + event.type = SDL_QUIT; + SDL_PushEvent(&event); +} +@end + +/* The main class of the application, the application's delegate */ +@implementation SDLMain + +/* Set the working directory to the .app's parent directory */ +- (void) setupWorkingDirectory:(BOOL)shouldChdir +{ + if (shouldChdir) + { + char parentdir[MAXPATHLEN]; + CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); + CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url); + if (CFURLGetFileSystemRepresentation(url2, 1, (UInt8 *)parentdir, MAXPATHLEN)) { + chdir(parentdir); /* chdir to the binary app's parent */ + } + CFRelease(url); + CFRelease(url2); + } +} + +#if SDL_USE_NIB_FILE + +/* Fix menu to contain the real app name instead of "SDL App" */ +- (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName +{ + NSRange aRange; + NSEnumerator *enumerator; + NSMenuItem *menuItem; + + aRange = [[aMenu title] rangeOfString:@"SDL App"]; + if (aRange.length != 0) + [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]]; + + enumerator = [[aMenu itemArray] objectEnumerator]; + while ((menuItem = [enumerator nextObject])) + { + aRange = [[menuItem title] rangeOfString:@"SDL App"]; + if (aRange.length != 0) + [menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]]; + if ([menuItem hasSubmenu]) + [self fixMenu:[menuItem submenu] withAppName:appName]; + } +} + +#else + +static void setApplicationMenu(void) +{ + /* warning: this code is very odd */ + NSMenu *appleMenu; + NSMenuItem *menuItem; + NSString *title; + NSString *appName; + + appName = getApplicationName(); + appleMenu = [[NSMenu alloc] initWithTitle:@""]; + + /* Add menu items */ + title = [@"About " stringByAppendingString:appName]; + [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; + + [appleMenu addItem:[NSMenuItem separatorItem]]; + + title = [@"Hide " stringByAppendingString:appName]; + [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"]; + + menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"]; + [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)]; + + [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""]; + + [appleMenu addItem:[NSMenuItem separatorItem]]; + + title = [@"Quit " stringByAppendingString:appName]; + [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"]; + + + /* Put menu into the menubar */ + menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; + [menuItem setSubmenu:appleMenu]; + [[NSApp mainMenu] addItem:menuItem]; + + /* Tell the application object that this is now the application menu */ + [NSApp setAppleMenu:appleMenu]; + + /* Finally give up our references to the objects */ + [appleMenu release]; + [menuItem release]; +} + +/* Create a window menu */ +static void setupWindowMenu(void) +{ + NSMenu *windowMenu; + NSMenuItem *windowMenuItem; + NSMenuItem *menuItem; + + windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; + + /* "Minimize" item */ + menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; + [windowMenu addItem:menuItem]; + [menuItem release]; + + /* Put menu into the menubar */ + windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""]; + [windowMenuItem setSubmenu:windowMenu]; + [[NSApp mainMenu] addItem:windowMenuItem]; + + /* Tell the application object that this is now the window menu */ + [NSApp setWindowsMenu:windowMenu]; + + /* Finally give up our references to the objects */ + [windowMenu release]; + [windowMenuItem release]; +} + +/* Replacement for NSApplicationMain */ +static void CustomApplicationMain (int argc, char **argv) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + SDLMain *sdlMain; + + /* Ensure the application object is initialised */ + [NSApplication sharedApplication]; + +#ifdef SDL_USE_CPS + { + CPSProcessSerNum PSN; + /* Tell the dock about us */ + if (!CPSGetCurrentProcess(&PSN)) + if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103)) + if (!CPSSetFrontProcess(&PSN)) + [NSApplication sharedApplication]; + } +#endif /* SDL_USE_CPS */ + + /* Set up the menubar */ + [NSApp setMainMenu:[[NSMenu alloc] init]]; + setApplicationMenu(); + setupWindowMenu(); + + /* Create SDLMain and make it the app delegate */ + sdlMain = [[SDLMain alloc] init]; + [NSApp setDelegate:sdlMain]; + + /* Start the main event loop */ + [NSApp run]; + + [sdlMain release]; + [pool release]; +} + +#endif + + +/* + * Catch document open requests...this lets us notice files when the app + * was launched by double-clicking a document, or when a document was + * dragged/dropped on the app's icon. You need to have a + * CFBundleDocumentsType section in your Info.plist to get this message, + * apparently. + * + * Files are added to gArgv, so to the app, they'll look like command line + * arguments. Previously, apps launched from the finder had nothing but + * an argv[0]. + * + * This message may be received multiple times to open several docs on launch. + * + * This message is ignored once the app's mainline has been called. + */ +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename +{ + const char *temparg; + size_t arglen; + char *arg; + char **newargv; + + if (!gFinderLaunch) /* MacOS is passing command line args. */ + return FALSE; + + if (gCalledAppMainline) /* app has started, ignore this document. */ + return FALSE; + + temparg = [filename UTF8String]; + arglen = SDL_strlen(temparg) + 1; + arg = (char *) SDL_malloc(arglen); + if (arg == NULL) + return FALSE; + + newargv = (char **) realloc(gArgv, sizeof (char *) * (gArgc + 2)); + if (newargv == NULL) + { + SDL_free(arg); + return FALSE; + } + gArgv = newargv; + + SDL_strlcpy(arg, temparg, arglen); + gArgv[gArgc++] = arg; + gArgv[gArgc] = NULL; + return TRUE; +} + + +/* Called when the internal event loop has just started running */ +- (void) applicationDidFinishLaunching: (NSNotification *) note +{ + int status; + + /* Set the working directory to the .app's parent directory */ + [self setupWorkingDirectory:gFinderLaunch]; + +#if SDL_USE_NIB_FILE + /* Set the main menu to contain the real app name instead of "SDL App" */ + [self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()]; +#endif + + /* Hand off to main application code */ + gCalledAppMainline = TRUE; + status = SDL_main (gArgc, gArgv); + + /* We're done, thank you for playing */ + exit(status); +} +@end + + +@implementation NSString (ReplaceSubString) + +- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString +{ + unsigned int bufferSize; + unsigned int selfLen = [self length]; + unsigned int aStringLen = [aString length]; + unichar *buffer; + NSRange localRange; + NSString *result; + + bufferSize = selfLen + aStringLen - aRange.length; + buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar)); + + /* Get first part into buffer */ + localRange.location = 0; + localRange.length = aRange.location; + [self getCharacters:buffer range:localRange]; + + /* Get middle part into buffer */ + localRange.location = 0; + localRange.length = aStringLen; + [aString getCharacters:(buffer+aRange.location) range:localRange]; + + /* Get last part into buffer */ + localRange.location = aRange.location + aRange.length; + localRange.length = selfLen - localRange.location; + [self getCharacters:(buffer+aRange.location+aStringLen) range:localRange]; + + /* Build output string */ + result = [NSString stringWithCharacters:buffer length:bufferSize]; + + NSDeallocateMemoryPages(buffer, bufferSize); + + return result; +} + +@end + + + +#ifdef main +# undef main +#endif + + +/* Main entry point to executable - should *not* be SDL_main! */ +int main (int argc, char **argv) +{ + /* Copy the arguments into a global variable */ + /* This is passed if we are launched by double-clicking */ + if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) { + gArgv = (char **) SDL_malloc(sizeof (char *) * 2); + gArgv[0] = argv[0]; + gArgv[1] = NULL; + gArgc = 1; + gFinderLaunch = YES; + } else { + int i; + gArgc = argc; + gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1)); + for (i = 0; i <= argc; i++) + gArgv[i] = argv[i]; + gFinderLaunch = NO; + } + +#if SDL_USE_NIB_FILE + NSApplicationMain (argc, argv); +#else + CustomApplicationMain (argc, argv); +#endif + return 0; +} + diff --git a/Test.pro b/Test.pro deleted file mode 100644 index 3c9fe6b..0000000 --- a/Test.pro +++ /dev/null @@ -1,27 +0,0 @@ -QMAKE_CXXFLAGS_RELEASE += -fkeep-inline-functions -QMAKE_CXXFLAGS_DEBUG += -fkeep-inline-functions - -LIBS += -lSDL -lm -lbz2 - -INCLUDEPATH += data/ \ - src/ - -SOURCES += $$files(src/*.cpp) \ - $$files(src/client/*.cpp) \ - $$files(src/elements/*.cpp) \ - $$files(src/game/*.cpp) \ - $$files(src/interface/*.cpp) \ - $$files(src/search/*.cpp) \ - $$files(src/simulation/*.cpp) \ - $$files(src/cajun/*.cpp) - -HEADERS += src/*.h \ - src/client/*.h \ - src/elements/*.h \ - src/game/*.h \ - src/interface/*.h \ - src/search/*.h \ - src/simulation/*.h \ - src/cajun/*.h - - -- cgit v0.9.2-21-gd62e From 4032a0469b1f40f7197468f34986e365bd6e7314 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 13 May 2012 17:43:41 +0100 Subject: Click function for tools that aren't continuous. Debug helper for UI components (Ctrl+Shift D when DEBUG is defined), fix add sign window logic diff --git a/src/Graphics.cpp b/src/Graphics.cpp index 13c0457..2711237 100644 --- a/src/Graphics.cpp +++ b/src/Graphics.cpp @@ -1,5 +1,5 @@ #include -#include +#include "SDL.h" #include #include #include "Config.h" diff --git a/src/Graphics.h b/src/Graphics.h index 6312185..9b91701 100644 --- a/src/Graphics.h +++ b/src/Graphics.h @@ -1,7 +1,7 @@ #ifndef GRAPHICS_H #define GRAPHICS_H -#include +#include "SDL.h" #include #if defined(OGLR) #ifdef MACOSX diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 0e43231..7e3b534 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -1,8 +1,8 @@ #include -#include +#include "SDL.h" #ifdef WIN32 -#include +#include "SDL_syswm.h" #endif #include #include diff --git a/src/cat/CommandInterface.h b/src/cat/CommandInterface.h index ca480dd..2da30c2 100644 --- a/src/cat/CommandInterface.h +++ b/src/cat/CommandInterface.h @@ -9,7 +9,7 @@ #define KITTY_H_ #include -#include +#include "SDL.h" //#include "game/GameModel.h" class GameModel; diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 529137a..7f852a6 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -304,6 +304,16 @@ void GameController::DrawPoints(int toolSelection, queue & pointQueu } } +void GameController::ToolClick(int toolSelection, ui::Point point) +{ + Simulation * sim = gameModel->GetSimulation(); + Tool * activeTool = gameModel->GetActiveTool(toolSelection); + Brush * cBrush = gameModel->GetBrush(); + if(!activeTool || !cBrush) + return; + activeTool->Click(sim, cBrush, PointTranslate(point)); +} + void GameController::StampRegion(ui::Point point1, ui::Point point2) { int saveSize; diff --git a/src/game/GameController.h b/src/game/GameController.h index 8f49668..bb6e61a 100644 --- a/src/game/GameController.h +++ b/src/game/GameController.h @@ -63,6 +63,7 @@ public: void SetZoomPosition(ui::Point position); void AdjustBrushSize(int direction, bool logarithmic = false); void AdjustZoomSize(int direction, bool logarithmic = false); + void ToolClick(int toolSelection, ui::Point point); void DrawPoints(int toolSelection, queue & pointQueue); void DrawRect(int toolSelection, ui::Point point1, ui::Point point2); void DrawLine(int toolSelection, ui::Point point1, ui::Point point2); diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index cfc6a19..c05ca12 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -599,6 +599,7 @@ void GameView::OnMouseUp(int x, int y, unsigned button) } if(drawMode == DrawPoints) { + c->ToolClick(toolIndex, ui::Point(x, y)); pointQueue.push(new ui::Point(x, y)); } if(drawModeReset) diff --git a/src/game/SignTool.cpp b/src/game/SignTool.cpp index 50ddb8a..fa004a8 100644 --- a/src/game/SignTool.cpp +++ b/src/game/SignTool.cpp @@ -26,17 +26,16 @@ public: OkayAction(SignWindow * prompt_) { prompt = prompt_; } void ActionCallback(ui::Button * sender) { - ui::Engine::Ref().CloseWindow(); - prompt->SelfDestruct(); - + ui::Engine::Ref().CloseWindow(); if(prompt->signID==-1 && prompt->textField->GetText().length()) { prompt->sim->signs.push_back(sign(prompt->textField->GetText(), prompt->signPosition.X, prompt->signPosition.Y, sign::Left)); } - else + else if(prompt->textField->GetText().length()) { prompt->sim->signs[prompt->signID] = sign(sign(prompt->textField->GetText(), prompt->signPosition.X, prompt->signPosition.Y, sign::Left)); } + prompt->SelfDestruct(); } }; @@ -71,11 +70,7 @@ void SignWindow::OnDraw() g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 200, 200, 200, 255); } -void SignTool::Draw(Simulation * sim, Brush * brush, ui::Point position) +void SignTool::Click(Simulation * sim, Brush * brush, ui::Point position) { - if(!opened) //Ensure the dialogue can only be shown one at a time. - { - opened = true; - new SignWindow(this, sim, -1, position); - } + new SignWindow(this, sim, -1, position); } \ No newline at end of file diff --git a/src/game/Tool.h b/src/game/Tool.h index 935e598..3a66ae4 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -28,6 +28,7 @@ public: } string GetName() { return toolName; } virtual ~Tool() {} + virtual void Click(Simulation * sim, Brush * brush, ui::Point position) { } virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) { sim->ToolBrush(position.X, position.Y, toolID, brush); } @@ -45,18 +46,15 @@ class SignTool: public Tool { public: SignTool(): - Tool(0, "SIGN", 0, 0, 0), - opened(false) + Tool(0, "SIGN", 0, 0, 0) { } virtual ~SignTool() {} - virtual void Draw(Simulation * sim, Brush * brush, ui::Point position); + virtual void Click(Simulation * sim, Brush * brush, ui::Point position); + virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) { } virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { } virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { } virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { } - void SetClosed() { opened = false; } -protected: - bool opened; }; class PropertyTool: public Tool diff --git a/src/interface/Engine.h b/src/interface/Engine.h index b8f6b73..f40f45f 100644 --- a/src/interface/Engine.h +++ b/src/interface/Engine.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include "SDL.h" #include "Singleton.h" #include "Platform.h" #include "Graphics.h" diff --git a/src/interface/Window.cpp b/src/interface/Window.cpp index 4d4f9b7..2de6463 100644 --- a/src/interface/Window.cpp +++ b/src/interface/Window.cpp @@ -11,6 +11,9 @@ Window::Window(Point _position, Point _size): AllowExclusiveDrawing(true), halt(false), destruct(false) +#ifdef DEBUG + ,debugMode(false) +#endif { } @@ -125,12 +128,55 @@ void Window::DoDraw() Components[i]->Draw( Point(scrpos) ); } } +#ifdef DEBUG + if(debugMode) + { + if(focusedComponent_==Components[i]) + { + ui::Engine::Ref().g->fillrect(Components[i]->Position.X+Position.X, Components[i]->Position.Y+Position.Y, Components[i]->Size.X, Components[i]->Size.Y, 0, 255, 0, 90); + } + else + { + ui::Engine::Ref().g->fillrect(Components[i]->Position.X+Position.X, Components[i]->Position.Y+Position.Y, Components[i]->Size.X, Components[i]->Size.Y, 255, 0, 0, 90); + } + } +#endif } +#ifdef DEBUG + if(debugMode) + { + if(focusedComponent_) + { + int xPos = focusedComponent_->Position.X+focusedComponent_->Size.X+5+Position.X; + Graphics * g = ui::Engine::Ref().g; + char tempString[512]; + char tempString2[512]; + + sprintf(tempString, "Position: L %d, R %d, T: %d, B: %d", focusedComponent_->Position.X, Size.X-(focusedComponent_->Position.X+focusedComponent_->Size.X), focusedComponent_->Position.Y, Size.Y-(focusedComponent_->Position.Y+focusedComponent_->Size.Y)); + sprintf(tempString2, "Size: %d, %d", focusedComponent_->Size.X, focusedComponent_->Size.Y); + + if(Graphics::textwidth(tempString)+xPos > XRES+BARSIZE) + xPos = XRES+BARSIZE-(Graphics::textwidth(tempString)+5); + if(Graphics::textwidth(tempString2)+xPos > XRES+BARSIZE) + xPos = XRES+BARSIZE-(Graphics::textwidth(tempString2)+5); + + g->drawtext(xPos, focusedComponent_->Position.Y+Position.Y+1, tempString, 0, 0, 0, 200); + g->drawtext(xPos, focusedComponent_->Position.Y+Position.Y, tempString, 255, 255, 255, 255); + g->drawtext(xPos, focusedComponent_->Position.Y+Position.Y+13, tempString2, 0, 0, 0, 200); + g->drawtext(xPos, focusedComponent_->Position.Y+Position.Y+12, tempString2, 255, 255, 255, 255); + } + return; + } +#endif } void Window::DoTick(float dt) { +#ifdef DEBUG + if(debugMode) + return; +#endif //on mouse hover for(int i = Components.size() - 1; i >= 0 && !halt; --i) { @@ -161,6 +207,50 @@ void Window::DoTick(float dt) void Window::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { +#ifdef DEBUG + if(character = 'd' && ctrl && shift) + debugMode = !debugMode; + if(debugMode) + { + if(focusedComponent_!=NULL) + { + if(shift) + { + if(key == KEY_UP) + focusedComponent_->Size.Y--; + if(key == KEY_DOWN) + focusedComponent_->Size.Y++; + if(key == KEY_LEFT) + focusedComponent_->Size.X--; + if(key == KEY_RIGHT) + focusedComponent_->Size.X++; + } + if(ctrl) + { + if(key == KEY_UP) + focusedComponent_->Size.Y++; + if(key == KEY_DOWN) + focusedComponent_->Size.Y--; + if(key == KEY_LEFT) + focusedComponent_->Size.X++; + if(key == KEY_RIGHT) + focusedComponent_->Size.X--; + } + if(!shift) + { + if(key == KEY_UP) + focusedComponent_->Position.Y--; + if(key == KEY_DOWN) + focusedComponent_->Position.Y++; + if(key == KEY_LEFT) + focusedComponent_->Position.X--; + if(key == KEY_RIGHT) + focusedComponent_->Position.X++; + } + } + return; + } +#endif //on key press if(focusedComponent_ != NULL) { @@ -175,6 +265,10 @@ void Window::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool a void Window::DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { +#ifdef DEBUG + if(debugMode) + return; +#endif //on key unpress if(focusedComponent_ != NULL) { @@ -200,6 +294,9 @@ void Window::DoMouseDown(int x_, int y_, unsigned button) if(x >= Components[i]->Position.X && y >= Components[i]->Position.Y && x < Components[i]->Position.X + Components[i]->Size.X && y < Components[i]->Position.Y + Components[i]->Size.Y) { FocusComponent(Components[i]); +#ifdef DEBUG + if(!debugMode) +#endif Components[i]->OnMouseClick(x - Components[i]->Position.X, y - Components[i]->Position.Y, button); clickState = true; break; @@ -209,6 +306,11 @@ void Window::DoMouseDown(int x_, int y_, unsigned button) if(!clickState) FocusComponent(NULL); + +#ifdef DEBUG + if(debugMode) + return; +#endif //on mouse down for(int i = Components.size() - 1; i > -1 && !halt; --i) @@ -227,6 +329,10 @@ void Window::DoMouseMove(int x_, int y_, int dx, int dy) //on mouse move (if true, and inside) int x = x_ - Position.X; int y = y_ - Position.Y; +#ifdef DEBUG + if(debugMode) + return; +#endif for(int i = Components.size() - 1; i > -1 && !halt; --i) { if(!Components[i]->Locked && Components[i]->Visible) @@ -277,6 +383,10 @@ void Window::DoMouseUp(int x_, int y_, unsigned button) { int x = x_ - Position.X; int y = y_ - Position.Y; +#ifdef DEBUG + if(debugMode) + return; +#endif //on mouse unclick for(int i = Components.size() - 1; i >= 0 && !halt; --i) { @@ -306,6 +416,10 @@ void Window::DoMouseWheel(int x_, int y_, int d) { int x = x_ - Position.X; int y = y_ - Position.Y; +#ifdef DEBUG + if(debugMode) + return; +#endif //on mouse wheel focused for(int i = Components.size() - 1; i >= 0 && !halt; --i) { diff --git a/src/interface/Window.h b/src/interface/Window.h index 4e705f0..c077abb 100644 --- a/src/interface/Window.h +++ b/src/interface/Window.h @@ -86,6 +86,9 @@ enum ChromeStyle void finalise(); bool halt; bool destruct; +#ifdef DEBUG + bool debugMode; +#endif }; diff --git a/src/simulation/Gravity.cpp b/src/simulation/Gravity.cpp index b0372a3..356872a 100644 --- a/src/simulation/Gravity.cpp +++ b/src/simulation/Gravity.cpp @@ -388,15 +388,15 @@ void Gravity::update_grav(void) for (x = 0; x < XRES / CELL; x++) { if (x == j && y == i)//Ensure it doesn't calculate with itself continue; - distance = sqrt(pow(j - x, 2) + pow(i - y, 2)); + distance = sqrt(pow(j - x, 2.0f) + pow(i - y, 2.0f)); #ifdef GRAV_DIFF val = th_gravmap[i*(XRES/CELL)+j] - th_ogravmap[i*(XRES/CELL)+j]; #else val = th_gravmap[i*(XRES/CELL)+j]; #endif - th_gravx[y*(XRES/CELL)+x] += M_GRAV * val * (j - x) / pow(distance, 3); - th_gravy[y*(XRES/CELL)+x] += M_GRAV * val * (i - y) / pow(distance, 3); - th_gravp[y*(XRES/CELL)+x] += M_GRAV * val / pow(distance, 2); + th_gravx[y*(XRES/CELL)+x] += M_GRAV * val * (j - x) / pow(distance, 3.0f); + th_gravy[y*(XRES/CELL)+x] += M_GRAV * val * (i - y) / pow(distance, 3.0f); + th_gravp[y*(XRES/CELL)+x] += M_GRAV * val / pow(distance, 2.0f); } } } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 41565a2..a992ef8 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1138,7 +1138,7 @@ void *Simulation::transform_save(void *odata, int *size, matrix2d transform, vec return ndata; } -void Simulation::orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]) +inline void Simulation::orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]) { resblock1[0] = (block1&0x000000FF); resblock1[1] = (block1&0x0000FF00)>>8; @@ -1151,7 +1151,7 @@ void Simulation::orbitalparts_get(int block1, int block2, int resblock1[], int r resblock2[3] = (block2&0xFF000000)>>24; } -void Simulation::orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]) +inline void Simulation::orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]) { int block1tmp = 0; int block2tmp = 0; -- cgit v0.9.2-21-gd62e From 7758fe52cb9ef78b562bc2587b17b6344d8829fe Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 13 May 2012 20:00:22 +0100 Subject: DropDown UI component diff --git a/src/interface/DropDown.cpp b/src/interface/DropDown.cpp index 6944e6f..ea7d56a 100644 --- a/src/interface/DropDown.cpp +++ b/src/interface/DropDown.cpp @@ -5,26 +5,53 @@ * Author: Simon */ +#include +#include "Button.h" #include "DropDown.h" namespace ui { +class ItemSelectedAction; class DropDownWindow: public ui::Window { + friend class ItemSelectedAction; Colour background, activeBackground; Colour border, activeBorder; Colour text, activeText; + DropDown * dropDown; + std::vector