From 14b4dfef87892ad744cbb8b6fbdc0bc80044d51b Mon Sep 17 00:00:00 2001 From: Felix Wallin Date: Mon, 20 Dec 2010 14:34:55 +0100 Subject: [PATCH] nice --- Makefile | 2 +- includes/font.h | 4 +- includes/interface.h | 2 +- includes/powder.h | 90 +- src/graphics.c | 790 +++++------ src/interface.c | 638 ++++----- src/main.c | 476 +++---- src/powder.c | 3165 +++++++++++++++++++++--------------------- 8 files changed, 2580 insertions(+), 2587 deletions(-) mode change 100755 => 100644 includes/font.h diff --git a/Makefile b/Makefile index 40600fa4b..6fc106392 100755 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ SOURCES := src/*.c CFLAGS := -w -std=c99 -D_POSIX_C_SOURCE=200112L -Iincludes/ OFLAGS := -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -LFLAGS := -B static -lSDL -lm -lbz2 +LFLAGS := -lSDL -lm -lbz2 MFLAGS_SSE3 := -march=native -DX86 -DX86_SSE3 -msse3 MFLAGS_SSE2 := -march=native-DX86 -DX86_SSE2 -msse2 MFLAGS_SSE := -march=native -DX86 -DX86_SSE diff --git a/includes/font.h b/includes/font.h old mode 100755 new mode 100644 index 45aff5b16..1dbc5353d --- a/includes/font.h +++ b/includes/font.h @@ -23,10 +23,10 @@ #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, 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, 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, + 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, 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, 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, 0x0ef2, 0x0f02, 0x0f12, 0x0f22, 0x0f32, 0x0f42, 0x0f52, 0x0f62, 0x0f72, 0x0f82, 0x0f92, 0x0fa2, 0x0fb2, 0x0fc2, 0x0fd2, 0x0fe2, 0x0ff2, 0x1002, 0x1012, 0x1022, 0x1032, 0x1042, 0x1052, 0x1062, 0x1072, 0x1082, 0x1092, 0x10a2, 0x10b2, 0x10c2, 0x10d2, 0x10e2, 0x10f2, 0x1102, 0x1112, 0x1122, 0x1132, 0x1142, 0x1152, 0x1162, 0x1172, + 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, 0x0ef2, 0x0f02, 0x0f12, 0x0f22, 0x0f32, 0x0f42, 0x0f52, 0x0f62, 0x0f72, 0x0f82, 0x0f92, 0x0fa2, 0x0fb2, 0x0fc2, 0x0fd2, 0x0fe2, 0x0ff2, 0x1002, 0x1012, 0x1022, 0x1032, 0x1042, 0x1052, 0x1062, 0x1072, 0x1082, 0x1092, 0x10a2, 0x10b2, 0x10c2, 0x10d2, 0x10e2, 0x10f2, 0x1102, 0x1112, 0x1122, 0x1132, 0x1142, 0x1152, 0x1162, 0x1172, }; #endif #endif diff --git a/includes/interface.h b/includes/interface.h index dcbd99704..647e44e02 100644 --- a/includes/interface.h +++ b/includes/interface.h @@ -8,7 +8,7 @@ struct menu_section char *icon; const char *name; int itemcount; - int doshow; + int doshow; }; typedef struct menu_section menu_section; diff --git a/includes/powder.h b/includes/powder.h index 79d78aaca..fc8d7cd6d 100644 --- a/includes/powder.h +++ b/includes/powder.h @@ -240,7 +240,7 @@ struct part_type unsigned char hconduct; const char *descs; const unsigned short properties; - int (*update_func) (int); + int (*update_func) (int); }; typedef struct part_type part_type; @@ -366,7 +366,7 @@ static const part_type ptypes[PT_NUM] = {"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, 100, SC_CRACKER2, 373.0f, 40, "Love...", TYPE_SOLID, 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, 31, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 251, "Deuterium oxide. Volume changes with temp, radioactive with neutrons.", TYPE_LIQUID|PROP_NEUTPENETRATE, NULL}, {"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, SC_NUCLEAR, R_TEMP +273.15f, 100, "Displaces other elements.",TYPE_GAS, NULL}, - {"PUMP", PIXPACK(0x10103B), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 100, SC_ELEC, 273.15f, 0, "Changes pressure to its temp when activated. (use HEAT/COOL).", TYPE_SOLID, NULL}, + {"PUMP", PIXPACK(0x10103B), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 100, SC_ELEC, 273.15f, 0, "Changes pressure to its temp when activated. (use HEAT/COOL).", TYPE_SOLID, NULL}, {"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, 97, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 100, "First fireworks made, activated by heat/neutrons.", TYPE_PART, 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, 100, SC_SOLIDS, 273.15f, 0, "Moves elements around, read FAQ on website for help.", TYPE_SOLID, NULL}, {"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, 50, SC_CRACKER2, 90.0f, 46, "FREEZE", TYPE_PART, NULL}, @@ -374,15 +374,15 @@ static const part_type ptypes[PT_NUM] = {"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, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Changes colour based on velocity.", TYPE_PART, NULL}, {"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, 30, SC_LIQUID, R_TEMP+0.0f +273.15f, 29, "Bizarre... contradicts the normal state changes.", TYPE_LIQUID, NULL}, {"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, SC_CRACKER2, R_TEMP-200.0f+273.15f, 42, "Bizarre gas", TYPE_GAS, NULL}, - {"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, 100, SC_CRACKER2, R_TEMP+300.0f+273.15f, 251, "Bizarre solid", TYPE_SOLID, NULL}, + {"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, 100, SC_CRACKER2, R_TEMP+300.0f+273.15f, 251, "Bizarre solid", TYPE_SOLID, NULL}, {"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, 100, SC_CRACKER2, R_TEMP+0.0f +273.15f, 251, "Instantly conducts, like walls, is now also a battery, PSCN to charge, NSCN to take.", TYPE_SOLID|PROP_CONDUCTS, 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, 20, 1, 24, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 29, "Radioactive liquid", TYPE_LIQUID|PROP_NEUTPENETRATE, 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, 100, SC_NUCLEAR, 140.00f, 251, "Solid form of ISOZ, slowly decays.", TYPE_SOLID, 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, 20, 1, 24, SC_NUCLEAR, R_TEMP-2.0f +273.15f, 29, "Radioactive liquid", TYPE_LIQUID|PROP_NEUTPENETRATE, 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, 100, SC_NUCLEAR, 140.00f, 251, "Solid form of ISOZ, slowly decays.", TYPE_SOLID, 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, 100, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 40, "Portal IN. Things go in here", TYPE_SOLID, NULL}, {"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, 100, SC_NUCLEAR, R_TEMP+0.0f +273.15f, 40, "Portal OUT. Things come out here", TYPE_SOLID, NULL}, - {"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, 31, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Colloid, Hardens under pressure", TYPE_LIQUID, 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, 100, SC_CRACKER, R_TEMP-2.0f +273.15f, 29, "Solid form of PSTE, temporary", TYPE_SOLID, NULL}, - {"ANAR", PIXPACK(0xFFFFEE), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.1f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Behaves opposite gravity", TYPE_PART, NULL}, + {"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, 31, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Colloid, Hardens under pressure", TYPE_LIQUID, 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, 100, SC_CRACKER, R_TEMP-2.0f +273.15f, 29, "Solid form of PSTE, temporary", TYPE_SOLID, NULL}, + {"ANAR", PIXPACK(0xFFFFEE), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.1f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 85, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Very light dust. Behaves opposite gravity", TYPE_PART, 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, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 65, "Vine, grows", TYPE_SOLID, 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, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 164, "Invisible to everything while under pressure.", TYPE_SOLID | PROP_NEUTPASS, NULL}, {"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, 85, SC_CRACKER2, R_TEMP+0.0f +273.15f, 70, "Shared velocity test", TYPE_PART, NULL}, @@ -397,8 +397,8 @@ static const part_type ptypes[PT_NUM] = {"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, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Filter for photons, changes the color.", TYPE_SOLID, NULL}, {"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, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Ray Emmitter. Rays create points when they collide", TYPE_SOLID, 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, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Ray Point. Rays create points when they collide", TYPE_SOLID, NULL}, - {"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, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", 0, NULL}, - //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Weights Section H Ins Description + {"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, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Stickman. Don't kill him!", 0, NULL}, + //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Weights Section H Ins Description }; static part_state pstates[PT_NUM] = @@ -510,9 +510,9 @@ static part_state pstates[PT_NUM] = /* BIZR */ {ST_LIQUID, PT_BIZRG, 100.0f, PT_NONE, 0.0f, PT_BIZRS, 400.0f, PT_NONE, 0.0f}, /* BIZRG*/ {ST_GAS , PT_BIZRG, 100.0f, PT_BIZR , 273.0f, PT_BIZRS, 400.0f, PT_NONE, 0.0f}, /* BIZRS*/ {ST_SOLID, PT_BIZRG, 100.0f, PT_BIZR , 273.0f, PT_BIZRS, 400.0f, PT_NONE, 0.0f}, - /* INST */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, - /* ISOZ */ {ST_LIQUID, PT_ISZS, 160.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, - /* ISZS */ {ST_SOLID, PT_NONE, 0.0f, PT_ISOZ, 300.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, + /* INST */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, + /* ISOZ */ {ST_LIQUID, PT_ISZS, 160.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, + /* ISZS */ {ST_SOLID, PT_NONE, 0.0f, PT_ISOZ, 300.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* PRTI */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* PRTO */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* PSTE */ {ST_LIQUID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, @@ -535,46 +535,46 @@ static part_state pstates[PT_NUM] = /* STKM2*/ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 620.0f}, }; -static int grule[NGOL][9] = +static int grule[NGOL][9] = { // 0,1,2,3,4,5,6,7,8 live=1 spawn=2 spawn&live=3 - {0,0,0,0,0,0,0,0,0},//blank - {0,0,1,3,0,0,0,0,0},//GOL - {0,0,1,3,0,0,2,0,0},//HLIF - {0,0,0,2,3,3,1,1,0},//ASIM - {0,1,1,2,0,1,2,0,0},//2x2 - {0,0,0,3,1,0,3,3,3},//DANI - {0,1,0,3,0,3,0,2,1},//AMOE - {0,0,1,2,1,1,2,0,2},//MOVE - {0,0,1,3,0,2,0,2,1},//PGOL - {0,0,0,2,0,3,3,3,3},//DMOE - {0,0,0,3,3,0,0,0,0},//34 - {0,0,0,2,2,3,0,0,0},//LLIF - {0,0,1,3,0,1,3,3,3},//STAN + {0,0,0,0,0,0,0,0,0},//blank + {0,0,1,3,0,0,0,0,0},//GOL + {0,0,1,3,0,0,2,0,0},//HLIF + {0,0,0,2,3,3,1,1,0},//ASIM + {0,1,1,2,0,1,2,0,0},//2x2 + {0,0,0,3,1,0,3,3,3},//DANI + {0,1,0,3,0,3,0,2,1},//AMOE + {0,0,1,2,1,1,2,0,2},//MOVE + {0,0,1,3,0,2,0,2,1},//PGOL + {0,0,0,2,0,3,3,3,3},//DMOE + {0,0,0,3,3,0,0,0,0},//34 + {0,0,0,2,2,3,0,0,0},//LLIF + {0,0,1,3,0,1,3,3,3},//STAN }; static int loverule[9][9] = { - {0,0,1,1,0,0,0,0,0}, - {0,1,0,0,1,1,0,0,0}, - {1,0,0,0,0,0,1,0,0}, - {1,0,0,0,0,0,0,1,0}, - {0,1,0,0,0,0,0,0,1}, - {1,0,0,0,0,0,0,1,0}, - {1,0,0,0,0,0,1,0,0}, - {0,1,0,0,1,1,0,0,0}, - {0,0,1,1,0,0,0,0,0}, + {0,0,1,1,0,0,0,0,0}, + {0,1,0,0,1,1,0,0,0}, + {1,0,0,0,0,0,1,0,0}, + {1,0,0,0,0,0,0,1,0}, + {0,1,0,0,0,0,0,0,1}, + {1,0,0,0,0,0,0,1,0}, + {1,0,0,0,0,0,1,0,0}, + {0,1,0,0,1,1,0,0,0}, + {0,0,1,1,0,0,0,0,0}, }; static int lolzrule[9][9] = { - {0,0,0,0,0,0,0,0,0}, - {1,0,0,0,0,0,1,0,0}, - {1,0,0,0,0,0,1,0,0}, - {1,0,0,1,1,0,0,1,0}, - {1,0,1,0,0,1,0,1,0}, - {1,0,1,0,0,1,0,1,0}, - {0,1,0,1,1,0,0,1,0}, - {0,1,0,0,0,0,0,1,0}, - {0,1,0,0,0,0,0,1,0}, + {0,0,0,0,0,0,0,0,0}, + {1,0,0,0,0,0,1,0,0}, + {1,0,0,0,0,0,1,0,0}, + {1,0,0,1,1,0,0,1,0}, + {1,0,1,0,0,1,0,1,0}, + {1,0,1,0,0,1,0,1,0}, + {0,1,0,1,1,0,0,1,0}, + {0,1,0,0,0,0,0,1,0}, + {0,1,0,0,0,0,0,1,0}, }; int portal[MAX_TEMP/100][8][8]; float portaltemp[MAX_TEMP/100][8][8]; diff --git a/src/graphics.c b/src/graphics.c index 3ea4c9c67..a98b66b4b 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -745,10 +745,10 @@ 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) { - 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(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); @@ -1008,22 +1008,22 @@ int textnwidth(char *s, int n) void textnpos(char *s, int n, int w, int *cx, int *cy) { int x = 0; - int y = 0; - //TODO: Implement Textnheight for wrapped text - for(; *s; s++) + int y = 0; + //TODO: Implement Textnheight for wrapped text + for(; *s; s++) { - if(!n){ + if(!n) { break; - } + } x += font_data[font_ptrs[(int)(*(unsigned char *)s)]]; - if(x>=w) { - x = 0; - y += FONT_H+2; - } + if(x>=w) { + x = 0; + y += FONT_H+2; + } n--; } *cx = x-1; - *cy = y; + *cy = y; } int textwidthx(char *s, int w) @@ -1048,10 +1048,10 @@ int textposxy(char *s, int width, int w, int h) if(x+(cw/2) >= w && y+6 >= h) break; x += cw; - if(x>=width) { - x = 0; - y += FONT_H+2; - } + if(x>=width) { + x = 0; + y += FONT_H+2; + } n++; } return n; @@ -1124,42 +1124,42 @@ void draw_air(pixel *vid) c = PIXRGB(0, 0, clamp_flt(-pv[y][x], 0.0f, 8.0f)); } else if(cmode == CM_VEL) - { + { c = PIXRGB(clamp_flt(fabsf(vx[y][x]), 0.0f, 8.0f), clamp_flt(pv[y][x], 0.0f, 8.0f), clamp_flt(fabsf(vy[y][x]), 0.0f, 8.0f)); - } - else if(cmode == CM_CRACK) - { - int r; - int g; - int b; - 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); - 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); - if(r>255) - r=255; - if(g>255) - g=255; - if(b>255) - b=255; - c = PIXRGB(r, g, b); - } - } + } + else if(cmode == CM_CRACK) + { + int r; + int g; + int b; + 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); + 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); + if(r>255) + r=255; + if(g>255) + g=255; + if(b>255) + b=255; + c = PIXRGB(r, g, b); + } + } for(j=0; j> (x+18)) & 1; - cb += (parts[i].ctype >> x) & 1; - } - for(x=0; x<14; x++) - cg += (parts[i].ctype >> (x+9)) & 1; - x = 624/(cr+cg+cb+1); - cr *= x; - cg *= x; - cb *= x; - cr = cr>255?255:cr; - cg = cg>255?255:cg; - cb = cb>255?255:cb; - blendpixel(vid, nx, ny, cr, cg, cb, 255); - } - else - { - cr = PIXR(ptypes[t].pcolors); - cg = PIXG(ptypes[t].pcolors); - cb = PIXB(ptypes[t].pcolors); - blendpixel(vid, nx, ny, cr, cg, cb, 255); - } - } - else if(cmode==CM_GRAD)//forgot to put else, broke nothing view - { - if((t==PT_METL||t==PT_BRMT||t==PT_BMTL)&&parts[i].temp>473&&parts[i].temp<1370) - { - float frequency = 0.00146; - int q = parts[i].temp-473; - cr = sin(frequency*q) * 226 + PIXR(ptypes[t].pcolors); - cg = sin(frequency*q*4.55 +3.14) * 34 + PIXG(ptypes[t].pcolors); - cb = sin(frequency*q*2.22 +3.14) * 64 + PIXB(ptypes[t].pcolors); - if(cr>=255) - cr = 255; - if(cg>=255) - cg = 255; - if(cb>=255) - cb = 255; - if(cr<=0) - cr = 0; - if(cg<=0) - cg = 0; - if(cb<=0) - cb = 0; - blendpixel(vid, nx, ny, cr, cg, cb, 255); - } - else - { - float frequency = 0.05; - int q = parts[i].temp-40; - cr = sin(frequency*q) * 16 + PIXR(ptypes[t].pcolors); - cg = sin(frequency*q) * 16 + PIXG(ptypes[t].pcolors); - cb = sin(frequency*q) * 16 + PIXB(ptypes[t].pcolors); - if(cr>=255) - cr = 255; - if(cg>=255) - cg = 255; - if(cb>=255) - cb = 255; - if(cr<=0) - cr = 0; - if(cg<=0) - cg = 0; - if(cb<=0) - cb = 0; - blendpixel(vid, nx, ny, cr, cg, cb, 255); - } - - } + if(cmode==CM_NOTHING && t!=PT_PIPE && t!=PT_SWCH && t!=PT_LCRY && t!=PT_PUMP && t!=PT_FILT && t!=PT_HSWC && t!=PT_PCLN && t!=PT_DEUT && t!=PT_WIFI)//nothing display but show needed color changes + { + if(t==PT_PHOT) + { + cg = 0; + cb = 0; + cr = 0; + for(x=0; x<12; x++) { + cr += (parts[i].ctype >> (x+18)) & 1; + cb += (parts[i].ctype >> x) & 1; + } + for(x=0; x<14; x++) + cg += (parts[i].ctype >> (x+9)) & 1; + x = 624/(cr+cg+cb+1); + cr *= x; + cg *= x; + cb *= x; + cr = cr>255?255:cr; + cg = cg>255?255:cg; + cb = cb>255?255:cb; + blendpixel(vid, nx, ny, cr, cg, cb, 255); + } + else + { + cr = PIXR(ptypes[t].pcolors); + cg = PIXG(ptypes[t].pcolors); + cb = PIXB(ptypes[t].pcolors); + blendpixel(vid, nx, ny, cr, cg, cb, 255); + } + } + else if(cmode==CM_GRAD)//forgot to put else, broke nothing view + { + if((t==PT_METL||t==PT_BRMT||t==PT_BMTL)&&parts[i].temp>473&&parts[i].temp<1370) + { + float frequency = 0.00146; + int q = parts[i].temp-473; + cr = sin(frequency*q) * 226 + PIXR(ptypes[t].pcolors); + cg = sin(frequency*q*4.55 +3.14) * 34 + PIXG(ptypes[t].pcolors); + cb = sin(frequency*q*2.22 +3.14) * 64 + PIXB(ptypes[t].pcolors); + if(cr>=255) + cr = 255; + if(cg>=255) + cg = 255; + if(cb>=255) + cb = 255; + if(cr<=0) + cr = 0; + if(cg<=0) + cg = 0; + if(cb<=0) + cb = 0; + blendpixel(vid, nx, ny, cr, cg, cb, 255); + } + else + { + float frequency = 0.05; + int q = parts[i].temp-40; + cr = sin(frequency*q) * 16 + PIXR(ptypes[t].pcolors); + cg = sin(frequency*q) * 16 + PIXG(ptypes[t].pcolors); + cb = sin(frequency*q) * 16 + PIXB(ptypes[t].pcolors); + if(cr>=255) + cr = 255; + if(cg>=255) + cg = 255; + if(cb>=255) + cb = 255; + if(cr<=0) + cr = 0; + if(cg<=0) + cg = 0; + if(cb<=0) + cb = 0; + blendpixel(vid, nx, ny, cr, cg, cb, 255); + } + + } else if(t==PT_MWAX&&cmode == CM_FANCY) { for(x=-1; x<=1; x++) @@ -1519,30 +1519,30 @@ void draw_parts(pixel *vid) } } - else if(t==PT_SPNG) - { + else if(t==PT_SPNG) + { cr = PIXR(ptypes[t].pcolors) - parts[i].life*15; cg = PIXG(ptypes[t].pcolors) - parts[i].life*15; cb = PIXB(ptypes[t].pcolors) - parts[i].life*15; - if(cr<=50) - cr = 50; - if(cg<=50) - cg = 50; - if(cb<=20) - cb = 20; - blendpixel(vid, nx, ny, cr, cg, cb, 255); + if(cr<=50) + cr = 50; + if(cg<=50) + cg = 50; + if(cb<=20) + cb = 20; + blendpixel(vid, nx, ny, cr, cg, cb, 255); - } - else if(t==PT_DEUT) - { - - if(parts[i].life>=700&&(cmode == CM_FIRE||cmode==CM_BLOB || cmode==CM_FANCY)) - { - x = nx/CELL; + } + else if(t==PT_DEUT) + { + + if(parts[i].life>=700&&(cmode == CM_FIRE||cmode==CM_BLOB || cmode==CM_FANCY)) + { + x = nx/CELL; y = ny/CELL; - cr = 20; - cg = 20; - cb = 20; + cr = 20; + cg = 20; + cb = 20; cg += fire_g[y][x]; if(cg > 255) cg = 255; fire_g[y][x] = cg; @@ -1552,28 +1552,28 @@ void draw_parts(pixel *vid) cr += fire_r[y][x]; if(cr > 255) cr = 255; fire_r[y][x] = cr; - } - else - { - cr = PIXR(ptypes[t].pcolors) + parts[i].life*1; - cg = PIXG(ptypes[t].pcolors) + parts[i].life*2; - cb = PIXB(ptypes[t].pcolors) + parts[i].life*4; - if(cr>=255) - cr = 255; - if(cg>=255) - cg = 255; - if(cb>=255) - cb = 255; - blendpixel(vid, nx, ny, cr, cg, cb, 255); - - } + } + else + { + cr = PIXR(ptypes[t].pcolors) + parts[i].life*1; + cg = PIXG(ptypes[t].pcolors) + parts[i].life*2; + cb = PIXB(ptypes[t].pcolors) + parts[i].life*4; + if(cr>=255) + cr = 255; + if(cg>=255) + cg = 255; + if(cb>=255) + cb = 255; + blendpixel(vid, nx, ny, cr, cg, cb, 255); - } - else if(t==PT_DUST && parts[i].life >= 1) + } + + } + else if(t==PT_DUST && parts[i].life >= 1) { x = nx; y = ny; - if(cmode == CM_FIRE||cmode==CM_BLOB || cmode==CM_FANCY) + if(cmode == CM_FIRE||cmode==CM_BLOB || cmode==CM_FANCY) { vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(parts[i].tmp,parts[i].ctype,parts[i].flags); cg = parts[i].tmp/4; @@ -1591,94 +1591,94 @@ void draw_parts(pixel *vid) if(cr > 255) cr = 255; fire_r[y][x] = cr; } - else - blendpixel(vid,x,y,parts[i].tmp,parts[i].ctype,parts[i].flags,255); + else + blendpixel(vid,x,y,parts[i].tmp,parts[i].ctype,parts[i].flags,255); } - else if(t==PT_GRAV) - { - cr = 20; - cg = 20; - cb = 20; - if(parts[i].vx>0) - { - cr += (parts[i].vx)*GRAV_R; - cg += (parts[i].vx)*GRAV_G; - cb += (parts[i].vx)*GRAV_B; - } - if(parts[i].vy>0) - { - cr += (parts[i].vy)*GRAV_G; - cg += (parts[i].vy)*GRAV_B; - cb += (parts[i].vy)*GRAV_R; - - } - if(parts[i].vx<0) - { - cr -= (parts[i].vx)*GRAV_B; - cg -= (parts[i].vx)*GRAV_R; - cb -= (parts[i].vx)*GRAV_G; - - } - if(parts[i].vy<0) - { - cr -= (parts[i].vy)*GRAV_R2; - cg -= (parts[i].vy)*GRAV_G2; - cb -= (parts[i].vy)*GRAV_B2; - } - if(cr>255) - cr=255; - if(cg>255) - cg=255; - if(cb>255) - cb=255; - blendpixel(vid, nx, ny, cr, cg, cb, 255); - } - else if(t==PT_WIFI) - { - float frequency = 0.0628; - int q = parts[i].tmp; - cr = sin(frequency*q + 0) * 127 + 128; - cg = sin(frequency*q + 2) * 127 + 128; - cb = sin(frequency*q + 4) * 127 + 128; - blendpixel(vid, nx, ny, cr, cg, cb, 255); - if(mousex==(nx) && mousey==(ny)) + else if(t==PT_GRAV) + { + cr = 20; + cg = 20; + cb = 20; + if(parts[i].vx>0) { - int z; - for(z = 0; z> (x+18)) & 1; - cb += (parts[i].ctype >> x) & 1; - } - for(x=0; x<14; x++) - cg += (parts[i].ctype >> (x+9)) & 1; - x = 624/(cr+cg+cb+1); - cr *= x; - cg *= x; - cb *= x; - cr = cr>255?255:cr; - cg = cg>255?255:cg; - cb = cb>255?255:cb; - if(fabs(parts[i].vx)+fabs(parts[i].vy)>0 &&(cmode == CM_FIRE||cmode==CM_BLOB || cmode==CM_FANCY)) { - fg = 0; - fb = 0; - fr = 0; + if(parts[i].vy>0) + { + cr += (parts[i].vy)*GRAV_G; + cg += (parts[i].vy)*GRAV_B; + cb += (parts[i].vy)*GRAV_R; + + } + if(parts[i].vx<0) + { + cr -= (parts[i].vx)*GRAV_B; + cg -= (parts[i].vx)*GRAV_R; + cb -= (parts[i].vx)*GRAV_G; + + } + if(parts[i].vy<0) + { + cr -= (parts[i].vy)*GRAV_R2; + cg -= (parts[i].vy)*GRAV_G2; + cb -= (parts[i].vy)*GRAV_B2; + } + if(cr>255) + cr=255; + if(cg>255) + cg=255; + if(cb>255) + cb=255; + blendpixel(vid, nx, ny, cr, cg, cb, 255); + } + else if(t==PT_WIFI) + { + float frequency = 0.0628; + int q = parts[i].tmp; + cr = sin(frequency*q + 0) * 127 + 128; + cg = sin(frequency*q + 2) * 127 + 128; + cb = sin(frequency*q + 4) * 127 + 128; + blendpixel(vid, nx, ny, cr, cg, cb, 255); + if(mousex==(nx) && mousey==(ny)) + { + int z; + for(z = 0; z> (x+18)) & 1; + cb += (parts[i].ctype >> x) & 1; + } + for(x=0; x<14; x++) + cg += (parts[i].ctype >> (x+9)) & 1; + x = 624/(cr+cg+cb+1); + cr *= x; + cg *= x; + cb *= x; + cr = cr>255?255:cr; + cg = cg>255?255:cg; + cb = cb>255?255:cb; + if(fabs(parts[i].vx)+fabs(parts[i].vy)>0 &&(cmode == CM_FIRE||cmode==CM_BLOB || cmode==CM_FANCY)) { + fg = 0; + fb = 0; + fr = 0; fg = cg/40 * fabs(parts[i].vx)+fabs(parts[i].vy); fb = cb/40 * fabs(parts[i].vx)+fabs(parts[i].vy); fr = cr/40 * fabs(parts[i].vx)+fabs(parts[i].vy); - vid[ny*(XRES+BARSIZE)+nx] = PIXRGB((int)restrict_flt(cr, 0, 255), (int)restrict_flt(cg, 0, 255), (int)restrict_flt(cb, 0, 255)); + vid[ny*(XRES+BARSIZE)+nx] = PIXRGB((int)restrict_flt(cr, 0, 255), (int)restrict_flt(cg, 0, 255), (int)restrict_flt(cb, 0, 255)); x = nx/CELL; y = ny/CELL; fg += fire_g[y][x]; @@ -1690,70 +1690,70 @@ void draw_parts(pixel *vid) fr += fire_r[y][x]; if(fr > 255) fr = 255; fire_r[y][x] = fr; - } - else - blendpixel(vid, nx, ny, cr, cg, cb, 255); - } - else if(t==PT_PIPE) - { - if(parts[i].ctype==2) - { - cr = 50; - cg = 1; - cb = 1; - } - else if(parts[i].ctype==3) - { - cr = 1; - cg = 50; - cb = 1; - } - else if(parts[i].ctype==4) - { - cr = 1; - cg = 1; - cb = 50; - } - else if(parts[i].temp<272.15&&parts[i].ctype!=1) - { - if(parts[i].temp>173.25&&parts[i].temp<273.15) - { - cr = 50; - cg = 1; - cb = 1; - } - if(parts[i].temp>73.25&&parts[i].temp<=173.15) - { - cr = 1; - cg = 50; - cb = 1; - } - if(parts[i].temp>=0&&parts[i].temp<=73.15) - { - cr = 1; - cg = 1; - cb = 50; - } - } - else - { - cr = PIXR(ptypes[t].pcolors); - cg = PIXG(ptypes[t].pcolors); - cb = PIXB(ptypes[t].pcolors); - } - if(parts[i].tmp) - { - cr = PIXR(ptypes[parts[i].tmp].pcolors); - cg = PIXG(ptypes[parts[i].tmp].pcolors); - cb = PIXB(ptypes[parts[i].tmp].pcolors); - } - blendpixel(vid, nx, ny, cr, cg, cb, 255); - - - - } - else if(t==PT_INVIS && (pv[ny/CELL][nx/CELL]>4.0f ||pv[ny/CELL][nx/CELL]<-4.0f)) - blendpixel(vid, nx, ny, 15, 0, 150, 100); + } + else + blendpixel(vid, nx, ny, cr, cg, cb, 255); + } + else if(t==PT_PIPE) + { + if(parts[i].ctype==2) + { + cr = 50; + cg = 1; + cb = 1; + } + else if(parts[i].ctype==3) + { + cr = 1; + cg = 50; + cb = 1; + } + else if(parts[i].ctype==4) + { + cr = 1; + cg = 1; + cb = 50; + } + else if(parts[i].temp<272.15&&parts[i].ctype!=1) + { + if(parts[i].temp>173.25&&parts[i].temp<273.15) + { + cr = 50; + cg = 1; + cb = 1; + } + if(parts[i].temp>73.25&&parts[i].temp<=173.15) + { + cr = 1; + cg = 50; + cb = 1; + } + if(parts[i].temp>=0&&parts[i].temp<=73.15) + { + cr = 1; + cg = 1; + cb = 50; + } + } + else + { + cr = PIXR(ptypes[t].pcolors); + cg = PIXG(ptypes[t].pcolors); + cb = PIXB(ptypes[t].pcolors); + } + if(parts[i].tmp) + { + cr = PIXR(ptypes[parts[i].tmp].pcolors); + cg = PIXG(ptypes[parts[i].tmp].pcolors); + cb = PIXB(ptypes[parts[i].tmp].pcolors); + } + blendpixel(vid, nx, ny, cr, cg, cb, 255); + + + + } + else if(t==PT_INVIS && (pv[ny/CELL][nx/CELL]>4.0f ||pv[ny/CELL][nx/CELL]<-4.0f)) + blendpixel(vid, nx, ny, 15, 0, 150, 100); else if(t==PT_ACID) { if(parts[i].life>255) parts[i].life = 255; @@ -1888,45 +1888,45 @@ void draw_parts(pixel *vid) } } } - else if(t==PT_FILT) - { - int temp_bin = (int)((parts[i].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; - cg = 0; - cb = 0; - cr = 0; - for(x=0; x<12; x++) { - cr += (parts[i].ctype >> (x+18)) & 1; - cb += (parts[i].ctype >> x) & 1; - } - for(x=0; x<14; x++) - cg += (parts[i].ctype >> (x+9)) & 1; - x = 624/(cr+cg+cb+1); - cr *= x; - cg *= x; - cb *= x; - cr = cr>255?255:cr; - cg = cg>255?255:cg; - cb = cb>255?255:cb; - blendpixel(vid, nx, ny, cr, cg, cb, 127); - } - else if(t==PT_BRAY && parts[i].tmp==0) - { - int trans = parts[i].life * 7; - blendpixel(vid, nx, ny, PIXR(ptypes[t].pcolors), PIXG(ptypes[t].pcolors), PIXB(ptypes[t].pcolors), trans); - } - else if(t==PT_BRAY && parts[i].tmp==1) - { - int trans = parts[i].life/4; - blendpixel(vid, nx, ny, PIXR(ptypes[t].pcolors), PIXG(ptypes[t].pcolors), PIXB(ptypes[t].pcolors), trans); - } - else if(t==PT_BRAY && parts[i].tmp==2) - { - int trans = parts[i].life*100; - blendpixel(vid, nx, ny, 255, 150, 50, trans); - } + else if(t==PT_FILT) + { + int temp_bin = (int)((parts[i].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; + cg = 0; + cb = 0; + cr = 0; + for(x=0; x<12; x++) { + cr += (parts[i].ctype >> (x+18)) & 1; + cb += (parts[i].ctype >> x) & 1; + } + for(x=0; x<14; x++) + cg += (parts[i].ctype >> (x+9)) & 1; + x = 624/(cr+cg+cb+1); + cr *= x; + cg *= x; + cb *= x; + cr = cr>255?255:cr; + cg = cg>255?255:cg; + cb = cb>255?255:cb; + blendpixel(vid, nx, ny, cr, cg, cb, 127); + } + else if(t==PT_BRAY && parts[i].tmp==0) + { + int trans = parts[i].life * 7; + blendpixel(vid, nx, ny, PIXR(ptypes[t].pcolors), PIXG(ptypes[t].pcolors), PIXB(ptypes[t].pcolors), trans); + } + else if(t==PT_BRAY && parts[i].tmp==1) + { + int trans = parts[i].life/4; + blendpixel(vid, nx, ny, PIXR(ptypes[t].pcolors), PIXG(ptypes[t].pcolors), PIXB(ptypes[t].pcolors), trans); + } + else if(t==PT_BRAY && parts[i].tmp==2) + { + int trans = parts[i].life*100; + blendpixel(vid, nx, ny, 255, 150, 50, trans); + } else if(t==PT_PHOT) { if(cmode == CM_FIRE||cmode==CM_BLOB || cmode==CM_FANCY) @@ -2291,7 +2291,7 @@ void draw_parts(pixel *vid) blendpixel(vid, nx-1, ny+1, GR, 10, 10, 112); } } - else if(t==PT_PUMP) + else if(t==PT_PUMP) { uint8 GR = 0x3B+(parts[i].life*19); vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(10, 10, GR); @@ -2604,7 +2604,7 @@ void draw_parts(pixel *vid) isplayer = 1; //It's a secret. Tssss... } - else if(t==PT_STKM2) //Stick man should be visible in heat mode + else if(t==PT_STKM2) //Stick man should be visible in heat mode { char buff[10]; //Buffer for HP @@ -2723,15 +2723,15 @@ void render_signs(pixel *vid_buf) 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; - } + if(MSIGN==i) + { + bq = b; + b = SDL_GetMouseState(&mx, &my); + mx /= sdl_scale; + my /= sdl_scale; + signs[i].x = mx; + signs[i].y = my; + } } } @@ -2961,12 +2961,12 @@ pixel *prerender_save(void *save, int size, int *width, int *height) if(!(j%2) && !(i%2)) fb[(ry+j)*w+(rx+i)] = PIXPACK(0xC0C0C0); break; - case 4: - for(j=0; j>1)&1; i>1)&1; i>1)&1; irx || (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==SQUARE_BRUSH) + { + for(j=0; j<=ry; j++) + for(i=0; i<=rx; i++) + if(i*j<=ry*rx && ((i+1)>rx || (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++) diff --git a/src/interface.c b/src/interface.c index f58b2a4d2..3af4ab9b5 100644 --- a/src/interface.c +++ b/src/interface.c @@ -101,16 +101,16 @@ void add_sign_ui(pixel *vid_buf, int mx, int my) int i, w, h, x, y, nm=0, ju; int x0=(XRES-192)/2,y0=(YRES-80)/2,b=1,bq; ui_edit ed; - + // check if it is an existing sign for(i=0; i=x && mx<=x+w && my>=y && my<=y+h) break; @@ -181,8 +181,8 @@ void add_sign_ui(pixel *vid_buf, int mx, int my) drawtext(vid_buf, x0+138, y0+45, "\x85", 255, 255, 255, 255); drawtext(vid_buf, x0+152, y0+46, "Delete", 255, 255, 255, 255); drawrect(vid_buf, x0+134, y0+42, 50, 15, 255, 255, 255, 255); - drawrect(vid_buf,x0+104,y0+42,26,15,255,255,255,255); - drawtext(vid_buf, x0+110, y0+48, "Mv.", 255, 255, 255, 255); + drawrect(vid_buf,x0+104,y0+42,26,15,255,255,255,255); + drawtext(vid_buf, x0+110, y0+48, "Mv.", 255, 255, 255, 255); } drawtext(vid_buf, x0+5, y0+69, "OK", 255, 255, 255, 255); @@ -200,10 +200,10 @@ void add_sign_ui(pixel *vid_buf, int mx, int my) ju = 2; if(!nm && b && !bq && mx>=x0+104 && mx<=x0+130 && my>=y0+42 && my<=y0+59) - { - MSIGN = i; - break; - } + { + MSIGN = i; + break; + } if(b && !bq && mx>=x0+9 && mx=y0+22 && my=x0 && mx=y0+64 && my<=y0+80) @@ -246,25 +246,25 @@ void ui_edit_draw(pixel *vid_buf, ui_edit *ed) if(ed->str[0]) { - if(ed->multiline){ - drawtextwrap(vid_buf, ed->x, ed->y, ed->w-14, str, 255, 255, 255, 255); - drawtext(vid_buf, ed->x+ed->w-11, ed->y-1, "\xAA", 128, 128, 128, 255); - } else { - drawtext(vid_buf, ed->x, ed->y, str, 255, 255, 255, 255); - drawtext(vid_buf, ed->x+ed->w-11, ed->y-1, "\xAA", 128, 128, 128, 255); - } + if(ed->multiline) { + drawtextwrap(vid_buf, ed->x, ed->y, ed->w-14, str, 255, 255, 255, 255); + drawtext(vid_buf, ed->x+ed->w-11, ed->y-1, "\xAA", 128, 128, 128, 255); + } else { + drawtext(vid_buf, ed->x, ed->y, str, 255, 255, 255, 255); + drawtext(vid_buf, ed->x+ed->w-11, ed->y-1, "\xAA", 128, 128, 128, 255); + } } else if(!ed->focus) drawtext(vid_buf, ed->x, ed->y, ed->def, 128, 128, 128, 255); if(ed->focus) { - if(ed->multiline){ - textnpos(str, ed->cursor, ed->w-14, &cx, &cy); - } else { - cx = textnwidth(str, ed->cursor); - cy = 0; - } - + if(ed->multiline) { + textnpos(str, ed->cursor, ed->w-14, &cx, &cy); + } else { + cx = textnwidth(str, ed->cursor); + cy = 0; + } + for(i=-3; i<9; i++) drawpixel(vid_buf, ed->x+cx, ed->y+i+cy, 255, 255, 255, 255); } @@ -290,35 +290,35 @@ void ui_edit_process(int mx, int my, int mb, ui_edit *ed) else str = ed->str; - if(ed->multiline){ - if(mx>=ed->x+ed->w-11 && mxx+ed->w && my>=ed->y-5 && myy+11) - { - ed->focus = 1; - ed->cursor = 0; - ed->str[0] = 0; - } - else if(mx>=ed->x-ed->nx && mxx+ed->w && my>=ed->y-5 && myy+ed->h) - { - ed->focus = 1; - ed->cursor = textposxy(str, ed->w-14, mx-ed->x, my-ed->y); - } - else - ed->focus = 0; - } else { - if(mx>=ed->x+ed->w-11 && mxx+ed->w && my>=ed->y-5 && myy+11) - { - ed->focus = 1; - ed->cursor = 0; - ed->str[0] = 0; - } - else if(mx>=ed->x-ed->nx && mxx+ed->w && my>=ed->y-5 && myy+11) - { - ed->focus = 1; - ed->cursor = textwidthx(str, mx-ed->x); - } - else - ed->focus = 0; - } + if(ed->multiline) { + if(mx>=ed->x+ed->w-11 && mxx+ed->w && my>=ed->y-5 && myy+11) + { + ed->focus = 1; + ed->cursor = 0; + ed->str[0] = 0; + } + else if(mx>=ed->x-ed->nx && mxx+ed->w && my>=ed->y-5 && myy+ed->h) + { + ed->focus = 1; + ed->cursor = textposxy(str, ed->w-14, mx-ed->x, my-ed->y); + } + else + ed->focus = 0; + } else { + if(mx>=ed->x+ed->w-11 && mxx+ed->w && my>=ed->y-5 && myy+11) + { + ed->focus = 1; + ed->cursor = 0; + ed->str[0] = 0; + } + else if(mx>=ed->x-ed->nx && mxx+ed->w && my>=ed->y-5 && myy+11) + { + ed->focus = 1; + ed->cursor = textwidthx(str, mx-ed->x); + } + else + ed->focus = 0; + } } if(ed->focus && sdl_key) { @@ -551,14 +551,14 @@ void draw_svf_ui(pixel *vid_buf) break; case CM_FANCY: drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\xC4", 100, 150, 255, 255); - break; + break; case CM_NOTHING: drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\x00", 100, 150, 255, 255); - break; + break; case CM_CRACK: drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\xD4", 255, 55, 55, 255); - drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\xD5", 55, 255, 55, 255); - break; + drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\xD5", 55, 255, 55, 255); + break; case CM_GRAD: drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\xD3", 255, 50, 255, 255); break; @@ -1183,9 +1183,9 @@ int save_name_ui(pixel *vid_buf) ed.focus = 1; ed.hide = 0; ed.cursor = strlen(svf_name); - ed.multiline = 0; + ed.multiline = 0; strcpy(ed.str, svf_name); - + ed2.x = x0+13; ed2.y = y0+45; ed2.w = 166; @@ -1195,7 +1195,7 @@ int save_name_ui(pixel *vid_buf) ed2.focus = 0; ed2.hide = 0; ed2.cursor = strlen(svf_description); - ed2.multiline = 1; + ed2.multiline = 1; strcpy(ed2.str, svf_description); cb.x = x0+10; @@ -1216,7 +1216,7 @@ int save_name_ui(pixel *vid_buf) drawtext(vid_buf, x0+8, y0+8, "New simulation name:", 255, 255, 255, 255); drawtext(vid_buf, x0+10, y0+23, "\x82", 192, 192, 192, 255); drawrect(vid_buf, x0+8, y0+20, 176, 16, 192, 192, 192, 255); - + drawrect(vid_buf, x0+8, y0+40, 176, 95, 192, 192, 192, 255); ui_edit_draw(vid_buf, &ed); @@ -1230,8 +1230,8 @@ int save_name_ui(pixel *vid_buf) drawtext(vid_buf, x0+5, y0+79+YRES/4, "Save simulation", 255, 255, 255, 255); drawrect(vid_buf, x0, y0+74+YRES/4, 192, 16, 192, 192, 192, 255); - - draw_line(vid_buf, x0+192, y0, x0+192, y0+90+YRES/4, 150, 150, 150, XRES+BARSIZE); + + draw_line(vid_buf, x0+192, y0, x0+192, y0+90+YRES/4, 150, 150, 150, XRES+BARSIZE); sdl_blit(0, 0, (XRES+BARSIZE), YRES+MENUSIZE, vid_buf, (XRES+BARSIZE)); @@ -1516,12 +1516,12 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, drawrect(vid_buf, x+30, y-1, 29, 17, 255, 0, 0, 255); h = n; } - if(!bq && mx>=x+32 && mx=y && my< y+15&&(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT))) + if(!bq && mx>=x+32 && mx=y && my< y+15&&(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT))) { drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); h = n; } - else if(n==SLALT) + else if(n==SLALT) { drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); } @@ -1558,7 +1558,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); h = n; } - else if(n==SLALT) + else if(n==SLALT) { drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); } @@ -1592,7 +1592,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); h = n; } - else if(n==SLALT) + else if(n==SLALT) { drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); } @@ -1629,7 +1629,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); h = n; } - else if(n==SLALT) + else if(n==SLALT) { drawrect(vid_buf, x+30, y-1, 29, 17, 0, 255, 255, 255); } @@ -1645,12 +1645,12 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, } } if(!bq&&mx>=sdl_scale*((XRES+BARSIZE)-16) && mx= sdl_scale*((i*16)+YRES+MENUSIZE-16-(SC_TOTAL*16)) && my=0&&i=0&&i=0) - { - SLALT = -1; - SEC2 = SEC; - } + if(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT) && SEC>=0) + { + SLALT = -1; + SEC2 = SEC; + } } if(b==1&&h!=-1) { - if(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT)) - { - SLALT = h; - SEC2 = -1; - } - else{ - *sl = h; - } + if(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT)) + { + SLALT = h; + SEC2 = -1; + } + else { + *sl = h; + } } if(b==4&&h==-1) { - if(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT) && SEC>=0) - { - SLALT = -1; - SEC2 = SEC; - } + if(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT) && SEC>=0) + { + SLALT = -1; + SEC2 = SEC; + } } if(b==4&&h!=-1) { - if(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT)) - { - SLALT = h; - SEC2 = -1; - } - else{ - *sr = h; - } + if(sdl_mod & (KMOD_LALT) && sdl_mod & (KMOD_SHIFT)) + { + SLALT = h; + SEC2 = -1; + } + else { + *sr = h; + } } } @@ -1749,8 +1749,8 @@ int sdl_poll(void) { player[0] = (int)(player[0])|0x04; //Jump command } - - if(event.key.keysym.sym == SDLK_d) + + if(event.key.keysym.sym == SDLK_d) { player2[0] = (int)(player2[0])|0x02; //Go right command } @@ -1786,8 +1786,8 @@ int sdl_poll(void) { player[0] = (int)(player[0])&7; } - - if(event.key.keysym.sym == SDLK_d || event.key.keysym.sym == SDLK_a) + + if(event.key.keysym.sym == SDLK_d || event.key.keysym.sym == SDLK_a) { player2[1] = player2[0]; //Saving last movement player2[0] = (int)(player2[0])&12; //Stop command @@ -2013,7 +2013,7 @@ int search_ui(pixel *vid_buf) ed.focus = 1; ed.hide = 0; ed.cursor = strlen(search_expr); - ed.multiline = 0; + ed.multiline = 0; strcpy(ed.str, search_expr); sdl_wheel = 0; @@ -2608,10 +2608,10 @@ int report_ui(pixel* vid_buf, char *save_id) ed.def = "Report details"; ed.focus = 0; ed.hide = 0; - ed.multiline = 1; + ed.multiline = 1; ed.cursor = 0; strcpy(ed.str, ""); - + fillrect(vid_buf, -1, -1, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 192); while(!sdl_poll()) { @@ -2619,42 +2619,42 @@ int report_ui(pixel* vid_buf, char *save_id) if(!b) break; } - while(!sdl_poll()){ - fillrect(vid_buf, 200, 150, (XRES+BARSIZE-400), (YRES+MENUSIZE-300), 0,0,0, 255); + while(!sdl_poll()) { + fillrect(vid_buf, 200, 150, (XRES+BARSIZE-400), (YRES+MENUSIZE-300), 0,0,0, 255); drawrect(vid_buf, 200, 150, (XRES+BARSIZE-400), (YRES+MENUSIZE-300), 255, 255, 255, 255); - + drawrect(vid_buf, 205, 155, (XRES+BARSIZE-400)-10, (YRES+MENUSIZE-300)-28, 255, 255, 255, 170); - + bq = b; b = SDL_GetMouseState(&mx, &my); mx /= sdl_scale; my /= sdl_scale; - + drawrect(vid_buf, 200, (YRES+MENUSIZE-150)-18, 50, 18, 255, 255, 255, 255); drawtext(vid_buf, 213, (YRES+MENUSIZE-150)-13, "Cancel", 255, 255, 255, 255); - + drawrect(vid_buf, (XRES+BARSIZE-400)+150, (YRES+MENUSIZE-150)-18, 50, 18, 255, 255, 255, 255); drawtext(vid_buf, (XRES+BARSIZE-400)+163, (YRES+MENUSIZE-150)-13, "Report", 255, 255, 255, 255); - if(mx>(XRES+BARSIZE-400)+150 && my>(YRES+MENUSIZE-150)-18 && mx<(XRES+BARSIZE-400)+200 && my<(YRES+MENUSIZE-150)){ - fillrect(vid_buf, (XRES+BARSIZE-400)+150, (YRES+MENUSIZE-150)-18, 50, 18, 255, 255, 255, 40); - if(b){ - if(execute_report(vid_buf, save_id, ed.str)){ - info_ui(vid_buf, "Success", "This save has been reported"); - return 1; - } else { - return 0; - } - } + if(mx>(XRES+BARSIZE-400)+150 && my>(YRES+MENUSIZE-150)-18 && mx<(XRES+BARSIZE-400)+200 && my<(YRES+MENUSIZE-150)) { + fillrect(vid_buf, (XRES+BARSIZE-400)+150, (YRES+MENUSIZE-150)-18, 50, 18, 255, 255, 255, 40); + if(b) { + if(execute_report(vid_buf, save_id, ed.str)) { + info_ui(vid_buf, "Success", "This save has been reported"); + return 1; + } else { + return 0; + } + } } - if(mx>200 && my>(YRES+MENUSIZE-150)-18 && mx<250 && my<(YRES+MENUSIZE-150)){ - fillrect(vid_buf, 200, (YRES+MENUSIZE-150)-18, 50, 18, 255, 255, 255, 40); - if(b) - return 0; + if(mx>200 && my>(YRES+MENUSIZE-150)-18 && mx<250 && my<(YRES+MENUSIZE-150)) { + fillrect(vid_buf, 200, (YRES+MENUSIZE-150)-18, 50, 18, 255, 255, 255, 40); + if(b) + return 0; } ui_edit_draw(vid_buf, &ed); - sdl_blit(0, 0, (XRES+BARSIZE), YRES+MENUSIZE, vid_buf, (XRES+BARSIZE)); - ui_edit_process(mx, my, b, &ed); + sdl_blit(0, 0, (XRES+BARSIZE), YRES+MENUSIZE, vid_buf, (XRES+BARSIZE)); + ui_edit_process(mx, my, b, &ed); } return 0; } @@ -2663,8 +2663,8 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date) { int b=1,bq,mx,my,ca=0,thumb_w,thumb_h,active=0,active_2=0,cc=0,ccy=0,cix=0,hasdrawninfo=0,hasdrawnthumb=0,authoritah=0,myown=0,queue_open=0,data_size=0,retval=0,bc=255,openable=1; int nyd,nyu,ry,lv; - - char *uri, *uri_2, *o_uri; + + char *uri, *uri_2, *o_uri; void *data, *info_data; save_info *info = malloc(sizeof(save_info)); void *http = NULL, *http_2 = NULL; @@ -2672,7 +2672,7 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date) int status, status_2, info_ready = 0, data_ready = 0; time_t http_last_use = HTTP_TIMEOUT, http_last_use_2 = HTTP_TIMEOUT; pixel *save_pic;// = malloc((XRES/2)*(YRES/2)); - ui_edit ed; + ui_edit ed; pixel *old_vid=(pixel *)calloc((XRES+BARSIZE)*(YRES+MENUSIZE), PIXELSIZE); fillrect(vid_buf, -1, -1, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 192); @@ -2683,18 +2683,18 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date) drawrect(vid_buf, 50+(XRES/2)+1, 50, XRES+BARSIZE-100-((XRES/2)+1), YRES+MENUSIZE-100, 155, 155, 155, 255); drawtext(vid_buf, 50+(XRES/4)-textwidth("Loading...")/2, 50+(YRES/4), "Loading...", 255, 255, 255, 128); - ed.x = 57+(XRES/2)+1; - ed.y = YRES+MENUSIZE-118; - ed.w = XRES+BARSIZE-114-((XRES/2)+1); - ed.h = 48; + ed.x = 57+(XRES/2)+1; + ed.y = YRES+MENUSIZE-118; + ed.w = XRES+BARSIZE-114-((XRES/2)+1); + ed.h = 48; ed.nx = 1; ed.def = "Add comment"; ed.focus = 1; ed.hide = 0; - ed.multiline = 1; + ed.multiline = 1; ed.cursor = 0; strcpy(ed.str, ""); - + memcpy(old_vid, vid_buf, ((XRES+BARSIZE)*(YRES+MENUSIZE))*PIXELSIZE); while(!sdl_poll()) @@ -2756,14 +2756,14 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date) if(status == 200) { pixel *full_save = prerender_save(data, data_size, &imgw, &imgh); - if(full_save!=NULL){ - save_pic = rescale_img(full_save, imgw, imgh, &thumb_w, &thumb_h, 2); - data_ready = 1; - free(full_save); - } else { - error_ui(vid_buf, 0, "Save may be from a newer version"); - break; - } + if(full_save!=NULL) { + save_pic = rescale_img(full_save, imgw, imgh, &thumb_w, &thumb_h, 2); + data_ready = 1; + free(full_save); + } else { + error_ui(vid_buf, 0, "Save may be from a newer version"); + break; + } } active = 0; free(http); @@ -2786,7 +2786,7 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date) free(http_2); http_2 = NULL; } - + if(data_ready && !hasdrawnthumb) { draw_image(vid_buf, save_pic, 51, 51, thumb_w, thumb_h, 255); hasdrawnthumb = 1; @@ -2800,73 +2800,73 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date) cix = drawtext(vid_buf, cix+4, (YRES/2)+72, "Date:", 255, 255, 255, 155); cix = drawtext(vid_buf, cix+4, (YRES/2)+72, info->date, 255, 255, 255, 255); drawtextwrap(vid_buf, 62, (YRES/2)+86, (XRES/2)-24, info->description, 255, 255, 255, 200); - - //Draw the score bars - if(info->voteup>0||info->votedown>0) - { - lv = (info->voteup>info->votedown)?info->voteup:info->votedown; - lv = (lv>10)?lv:10; - - if(50>lv) - { - ry = ((float)(50)/(float)lv); - //if(lv<8) - //{ - // ry = ry/(8-lv); - //} - nyu = info->voteup*ry; - nyd = info->votedown*ry; - } - else - { - ry = ((float)lv/(float)(50)); - nyu = info->voteup/ry; - nyd = info->votedown/ry; - } - nyu = nyu>50?50:nyu; - nyd = nyd>50?50:nyd; - - fillrect(vid_buf, 48+(XRES/2)-51, (YRES/2)+53, 52, 6, 0, 107, 10, 255); - fillrect(vid_buf, 48+(XRES/2)-51, (YRES/2)+59, 52, 6, 107, 10, 0, 255); - drawrect(vid_buf, 48+(XRES/2)-51, (YRES/2)+53, 52, 6, 128, 128, 128, 255); - drawrect(vid_buf, 48+(XRES/2)-51, (YRES/2)+59, 52, 6, 128, 128, 128, 255); - fillrect(vid_buf, 48+(XRES/2)-nyu, (YRES/2)+54, nyu, 4, 57, 187, 57, 255); - fillrect(vid_buf, 48+(XRES/2)-nyd, (YRES/2)+60, nyd, 4, 187, 57, 57, 255); - } + //Draw the score bars + if(info->voteup>0||info->votedown>0) + { + lv = (info->voteup>info->votedown)?info->voteup:info->votedown; + lv = (lv>10)?lv:10; + + if(50>lv) + { + ry = ((float)(50)/(float)lv); + //if(lv<8) + //{ + // ry = ry/(8-lv); + //} + nyu = info->voteup*ry; + nyd = info->votedown*ry; + } + else + { + ry = ((float)lv/(float)(50)); + nyu = info->voteup/ry; + nyd = info->votedown/ry; + } + nyu = nyu>50?50:nyu; + nyd = nyd>50?50:nyd; + + fillrect(vid_buf, 48+(XRES/2)-51, (YRES/2)+53, 52, 6, 0, 107, 10, 255); + fillrect(vid_buf, 48+(XRES/2)-51, (YRES/2)+59, 52, 6, 107, 10, 0, 255); + drawrect(vid_buf, 48+(XRES/2)-51, (YRES/2)+53, 52, 6, 128, 128, 128, 255); + drawrect(vid_buf, 48+(XRES/2)-51, (YRES/2)+59, 52, 6, 128, 128, 128, 255); + + fillrect(vid_buf, 48+(XRES/2)-nyu, (YRES/2)+54, nyu, 4, 57, 187, 57, 255); + fillrect(vid_buf, 48+(XRES/2)-nyd, (YRES/2)+60, nyd, 4, 187, 57, 57, 255); + } ccy = 0; for(cc=0; cccomment_count; cc++) { - if((ccy + 72 + ((textwidth(info->comments[cc])/(XRES+BARSIZE-100-((XRES/2)+1)-20)))*12)<(YRES+MENUSIZE-50)){ - drawtext(vid_buf, 60+(XRES/2)+1, ccy+60, info->commentauthors[cc], 255, 255, 255, 255); - ccy += 12; - ccy += drawtextwrap(vid_buf, 60+(XRES/2)+1, ccy+60, XRES+BARSIZE-100-((XRES/2)+1)-20, info->comments[cc], 255, 255, 255, 185); - ccy += 10; - if(ccy+52comments[cc])/(XRES+BARSIZE-100-((XRES/2)+1)-20)))*12)<(YRES+MENUSIZE-50)) { + drawtext(vid_buf, 60+(XRES/2)+1, ccy+60, info->commentauthors[cc], 255, 255, 255, 255); + ccy += 12; + ccy += drawtextwrap(vid_buf, 60+(XRES/2)+1, ccy+60, XRES+BARSIZE-100-((XRES/2)+1)-20, info->comments[cc], 255, 255, 255, 185); + ccy += 10; + if(ccy+52author, svf_user); - authoritah = svf_login && (!strcmp(info->author, svf_user) || svf_admin || svf_mod); + authoritah = svf_login && (!strcmp(info->author, svf_user) || svf_admin || svf_mod); memcpy(old_vid, vid_buf, ((XRES+BARSIZE)*(YRES+MENUSIZE))*PIXELSIZE); } - if(info_ready && svf_login){ - //Render the comment box. - fillrect(vid_buf, 50+(XRES/2)+1, YRES+MENUSIZE-125, XRES+BARSIZE-100-((XRES/2)+1), 75, 0, 0, 0, 255); - drawrect(vid_buf, 50+(XRES/2)+1, YRES+MENUSIZE-125, XRES+BARSIZE-100-((XRES/2)+1), 75, 200, 200, 200, 255); - - drawrect(vid_buf, 54+(XRES/2)+1, YRES+MENUSIZE-121, XRES+BARSIZE-108-((XRES/2)+1), 48, 255, 255, 255, 200); - - ui_edit_draw(vid_buf, &ed); - - drawrect(vid_buf, XRES+BARSIZE-100, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 255); - drawtext(vid_buf, XRES+BARSIZE-90, YRES+MENUSIZE-63, "Submit", 255, 255, 255, 255); - } + if(info_ready && svf_login) { + //Render the comment box. + fillrect(vid_buf, 50+(XRES/2)+1, YRES+MENUSIZE-125, XRES+BARSIZE-100-((XRES/2)+1), 75, 0, 0, 0, 255); + drawrect(vid_buf, 50+(XRES/2)+1, YRES+MENUSIZE-125, XRES+BARSIZE-100-((XRES/2)+1), 75, 200, 200, 200, 255); + + drawrect(vid_buf, 54+(XRES/2)+1, YRES+MENUSIZE-121, XRES+BARSIZE-108-((XRES/2)+1), 48, 255, 255, 255, 200); + + ui_edit_draw(vid_buf, &ed); + + drawrect(vid_buf, XRES+BARSIZE-100, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 255); + drawtext(vid_buf, XRES+BARSIZE-90, YRES+MENUSIZE-63, "Submit", 255, 255, 255, 255); + } //Open Button - bc = openable?255:150; + bc = openable?255:150; drawrect(vid_buf, 50, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, bc); drawtext(vid_buf, 73, YRES+MENUSIZE-63, "Open", 255, 255, 255, bc); drawtext(vid_buf, 58, YRES+MENUSIZE-64, "\x81", 255, 255, 255, bc); @@ -2881,102 +2881,102 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date) drawtext(vid_buf, 168, YRES+MENUSIZE-63, "Report", 255, 255, 255, bc); drawtext(vid_buf, 158, YRES+MENUSIZE-63, "!", 255, 255, 255, bc); //Delete Button - bc = authoritah?255:150; - drawrect(vid_buf, 200, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, bc); - drawtext(vid_buf, 218, YRES+MENUSIZE-63, "Delete", 255, 255, 255, bc); - drawtext(vid_buf, 206, YRES+MENUSIZE-64, "\xAA", 255, 255, 255, bc); - //Open in browser button - bc = 255; + bc = authoritah?255:150; + drawrect(vid_buf, 200, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, bc); + drawtext(vid_buf, 218, YRES+MENUSIZE-63, "Delete", 255, 255, 255, bc); + drawtext(vid_buf, 206, YRES+MENUSIZE-64, "\xAA", 255, 255, 255, bc); + //Open in browser button + bc = 255; drawrect(vid_buf, 250, YRES+MENUSIZE-68, 107, 18, 255, 255, 255, bc); drawtext(vid_buf, 273, YRES+MENUSIZE-63, "Open in Browser", 255, 255, 255, bc); drawtext(vid_buf, 258, YRES+MENUSIZE-64, "\x81", 255, 255, 255, bc); - - //Open Button - if(sdl_key==SDLK_RETURN && openable) { + + //Open Button + if(sdl_key==SDLK_RETURN && openable) { queue_open = 1; } - if(mx > 50 && mx < 50+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && openable && !queue_open) { + if(mx > 50 && mx < 50+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && openable && !queue_open) { fillrect(vid_buf, 50, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); if(b && !bq) { - //Button Clicked + //Button Clicked queue_open = 1; } } - //Fav Button - if(mx > 100 && mx < 100+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login && !queue_open) { + //Fav Button + if(mx > 100 && mx < 100+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login && !queue_open) { fillrect(vid_buf, 100, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); - if(b && !bq) { + if(b && !bq) { //Button Clicked - fillrect(vid_buf, -1, -1, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 192); - info_box(vid_buf, "Adding to favourites..."); - execute_fav(vid_buf, save_id); - } - } - //Report Button - if(mx > 150 && mx < 150+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login && info_ready && !queue_open) { - fillrect(vid_buf, 150, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); - if(b && !bq) { - //Button Clicked - if(report_ui(vid_buf, save_id)){ - retval = 0; - break; - } + fillrect(vid_buf, -1, -1, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 192); + info_box(vid_buf, "Adding to favourites..."); + execute_fav(vid_buf, save_id); } } - //Delete Button - if(mx > 200 && mx < 200+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && (authoritah || myown) && !queue_open) { - fillrect(vid_buf, 200, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); - if(b && !bq) { - //Button Clicked - if(myown || !info->publish){ - if(confirm_ui(vid_buf, "Are you sure you wish to delete this?", "You will not be able recover it.", "Delete")){ - fillrect(vid_buf, -1, -1, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 192); - info_box(vid_buf, "Deleting..."); - if(execute_delete(vid_buf, save_id)){ - retval = 0; - break; - } - } - } else { - if(confirm_ui(vid_buf, "Are you sure?", "This save will be removed from the search index.", "Remove")){ - fillrect(vid_buf, -1, -1, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 192); - info_box(vid_buf, "Removing..."); - if(execute_delete(vid_buf, save_id)){ - retval = 0; - break; - } - } - } - } - } - //Open in browser button - if(mx > 250 && mx < 250+107 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && !queue_open) { + //Report Button + if(mx > 150 && mx < 150+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login && info_ready && !queue_open) { + fillrect(vid_buf, 150, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); + if(b && !bq) { + //Button Clicked + if(report_ui(vid_buf, save_id)) { + retval = 0; + break; + } + } + } + //Delete Button + if(mx > 200 && mx < 200+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && (authoritah || myown) && !queue_open) { + fillrect(vid_buf, 200, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); + if(b && !bq) { + //Button Clicked + if(myown || !info->publish) { + if(confirm_ui(vid_buf, "Are you sure you wish to delete this?", "You will not be able recover it.", "Delete")) { + fillrect(vid_buf, -1, -1, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 192); + info_box(vid_buf, "Deleting..."); + if(execute_delete(vid_buf, save_id)) { + retval = 0; + break; + } + } + } else { + if(confirm_ui(vid_buf, "Are you sure?", "This save will be removed from the search index.", "Remove")) { + fillrect(vid_buf, -1, -1, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 192); + info_box(vid_buf, "Removing..."); + if(execute_delete(vid_buf, save_id)) { + retval = 0; + break; + } + } + } + } + } + //Open in browser button + if(mx > 250 && mx < 250+107 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && !queue_open) { fillrect(vid_buf, 250, YRES+MENUSIZE-68, 107, 18, 255, 255, 255, 40); if(b && !bq) { - //Button Clicked - //TODO: Open link - o_uri = malloc(7+strlen(SERVER)+41+strlen(save_id)*3); - strcpy(o_uri, "http://" SERVER "/Browse/View.html?ID="); - strcaturl(o_uri, save_id); - open_link(o_uri); - free(o_uri); + //Button Clicked + //TODO: Open link + o_uri = malloc(7+strlen(SERVER)+41+strlen(save_id)*3); + strcpy(o_uri, "http://" SERVER "/Browse/View.html?ID="); + strcaturl(o_uri, save_id); + open_link(o_uri); + free(o_uri); } } - //Submit Button - if(mx > XRES+BARSIZE-100 && mx < XRES+BARSIZE-100+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login && info_ready && !queue_open) { - fillrect(vid_buf, XRES+BARSIZE-100, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); - if(b && !bq) { - //Button Clicked - fillrect(vid_buf, -1, -1, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 192); - info_box(vid_buf, "Submitting Comment..."); - execute_submit(vid_buf, save_id, ed.str); - ed.str[0] = 0; - } - } - if(!(mx>50 && my>50 && mx XRES+BARSIZE-100 && mx < XRES+BARSIZE-100+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login && info_ready && !queue_open) { + fillrect(vid_buf, XRES+BARSIZE-100, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); + if(b && !bq) { + //Button Clicked + fillrect(vid_buf, -1, -1, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 192); + info_box(vid_buf, "Submitting Comment..."); + execute_submit(vid_buf, save_id, ed.str); + ed.str[0] = 0; + } + } + if(!(mx>50 && my>50 && mx>8); d[p++] = (ttlife&0x00FF); - } + } } - for(j=0; j>8); d[p++] = (tttmp&0x00FF); - } + } } for(j=0; j=44){ - legacy_enable = c[3]&0x01; - if(!sys_pause){ - sys_pause = (c[3]>>1)&0x01; - } - } else { - if(c[3]==1||c[3]==0){ - legacy_enable = c[3]; - } else { - legacy_beta = 1; - } - } + if(ver>=44) { + legacy_enable = c[3]&0x01; + if(!sys_pause) { + sys_pause = (c[3]>>1)&0x01; + } + } else { + if(c[3]==1||c[3]==0) { + legacy_enable = c[3]; + } else { + legacy_beta = 1; + } + } } bw = c[6]; @@ -504,35 +504,35 @@ int parse_save(void *save, int size, int replace, int x0, int y0) for(x=bx0; x=44){ - if(p >= size) { - goto corrupt; - } - if(i <= NPART) { - ttv = (d[p++])<<8; - ttv |= (d[p++]); - parts[i-1].life = ttv; - } else { - p+=2; - } - } else { - if(p >= size) - goto corrupt; - if(i <= NPART) - parts[i-1].life = d[p++]*4; - else - p++; - } + if(ver>=44) { + if(p >= size) { + goto corrupt; + } + if(i <= NPART) { + ttv = (d[p++])<<8; + ttv |= (d[p++]); + parts[i-1].life = ttv; + } else { + p+=2; + } + } else { + if(p >= size) + goto corrupt; + if(i <= NPART) + parts[i-1].life = d[p++]*4; + else + p++; + } + } + } + if(ver>=44) { + for(j=0; j= size) { + goto corrupt; + } + if(i <= NPART) { + ttv = (d[p++])<<8; + ttv |= (d[p++]); + parts[i-1].tmp = ttv; + } else { + p+=2; + } + } } } - if(ver>=44){ - for(j=0; j= size) { - goto corrupt; - } - if(i <= NPART) { - ttv = (d[p++])<<8; - ttv |= (d[p++]); - parts[i-1].tmp = ttv; - } else { - p+=2; - } - } - } - } for(j=0; j1180) - bsx = 1180; - if(bsx<0) - bsx = 0; - if(bsy>1180) - bsy = 1180; - if(bsy<0) - bsy = 0; - + + //Can't be too sure... + if(bsx>1180) + bsx = 1180; + if(bsx<0) + bsx = 0; + if(bsy>1180) + bsy = 1180; + if(bsy<0) + bsy = 0; + update_particles(vid_buf); draw_parts(vid_buf); @@ -1391,22 +1391,22 @@ int main(int argc, char *argv[]) { set_cmode(CM_FANCY); } - if(sdl_key=='8') + if(sdl_key=='8') { set_cmode(CM_NOTHING); } - if(sdl_key=='9') + if(sdl_key=='9') { set_cmode(CM_GRAD); } - if(sdl_key=='0') + if(sdl_key=='0') { set_cmode(CM_CRACK); } - if(sdl_key==SDLK_TAB) - { - CURRENT_BRUSH =(CURRENT_BRUSH + 1)%BRUSH_NUM ; - } + if(sdl_key==SDLK_TAB) + { + CURRENT_BRUSH =(CURRENT_BRUSH + 1)%BRUSH_NUM ; + } if(sdl_key==SDLK_LEFTBRACKET) { if(sdl_zoom_trig==1) { @@ -1420,30 +1420,30 @@ int main(int argc, char *argv[]) else { if(sdl_mod & (KMOD_LALT|KMOD_RALT) && !(sdl_mod & (KMOD_SHIFT|KMOD_CTRL))) - { - bsx -= 1; - bsy -= 1; - } - else if(sdl_mod & (KMOD_SHIFT) && !(sdl_mod & (KMOD_CTRL))) - { - bsx -= 1; - } - else if(sdl_mod & (KMOD_CTRL) && !(sdl_mod & (KMOD_SHIFT))) - { - bsy -= 1; - } + { + bsx -= 1; + bsy -= 1; + } + else if(sdl_mod & (KMOD_SHIFT) && !(sdl_mod & (KMOD_CTRL))) + { + bsx -= 1; + } + else if(sdl_mod & (KMOD_CTRL) && !(sdl_mod & (KMOD_SHIFT))) + { + bsy -= 1; + } else - { + { bsx -= ceil((bsx/5)+0.5f); - bsy -= ceil((bsy/5)+0.5f); - } + bsy -= ceil((bsy/5)+0.5f); + } if(bsx>1180) bsx = 1180; - if(bsy>1180) + if(bsy>1180) bsy = 1180; if(bsx<0) bsx = 0; - if(bsy<0) + if(bsy<0) bsy = 0; } } @@ -1460,58 +1460,58 @@ int main(int argc, char *argv[]) else { if(sdl_mod & (KMOD_LALT|KMOD_RALT) && !(sdl_mod & (KMOD_SHIFT|KMOD_CTRL))) - { - bsx += 1; - bsy += 1; - } - else if(sdl_mod & (KMOD_SHIFT) && !(sdl_mod & (KMOD_CTRL))) - { - bsx += 1; - } - else if(sdl_mod & (KMOD_CTRL) && !(sdl_mod & (KMOD_SHIFT))) - { - bsy += 1; - } + { + bsx += 1; + bsy += 1; + } + else if(sdl_mod & (KMOD_SHIFT) && !(sdl_mod & (KMOD_CTRL))) + { + bsx += 1; + } + else if(sdl_mod & (KMOD_CTRL) && !(sdl_mod & (KMOD_SHIFT))) + { + bsy += 1; + } else - { + { bsx += ceil((bsx/5)+0.5f); - bsy += ceil((bsy/5)+0.5f); - } + bsy += ceil((bsy/5)+0.5f); + } if(bsx>1180) bsx = 1180; - if(bsy>1180) + if(bsy>1180) bsy = 1180; if(bsx<0) bsx = 0; - if(bsy<0) + if(bsy<0) bsy = 0; } } - if(sdl_key=='d'&&(sdl_mod & (KMOD_CTRL))) - DEBUG_MODE = !DEBUG_MODE; - if(sdl_key=='i') - { - int nx, ny; - for(nx = 0;nx1180) bsx = 1180; if(bsx<0) bsx = 0; - if(bsy>1180) + if(bsy>1180) bsy = 1180; if(bsy<0) bsy = 0; @@ -1670,15 +1670,15 @@ int main(int argc, char *argv[]) #ifdef BETA sprintf(heattext, "%s, Pressure: %3.2f, Temp: %4.2f C, Life: %d", ptypes[cr&0xFF].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f, parts[cr>>8].life); #else - if(DEBUG_MODE) + if(DEBUG_MODE) { int tctype = parts[cr>>8].ctype; if(tctype>=PT_NUM) tctype = 0; sprintf(heattext, "%s (%s), Pressure: %3.2f, Temp: %4.2f C, Life: %d", ptypes[cr&0xFF].name, ptypes[tctype].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f, parts[cr>>8].life); - //sprintf(heattext, "%s (%s), Pressure: %3.2f, Temp: %4.2f C, Life: %d", ptypes[cr&0xFF].name, ptypes[parts[cr>>8].ctype].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f, parts[cr>>8].life); - } else { - sprintf(heattext, "%s, Pressure: %3.2f, Temp: %4.2f C", ptypes[cr&0xFF].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f); + //sprintf(heattext, "%s (%s), Pressure: %3.2f, Temp: %4.2f C, Life: %d", ptypes[cr&0xFF].name, ptypes[parts[cr>>8].ctype].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f, parts[cr>>8].life); + } else { + sprintf(heattext, "%s, Pressure: %3.2f, Temp: %4.2f C", ptypes[cr&0xFF].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f); } #endif } @@ -1904,22 +1904,22 @@ int main(int argc, char *argv[]) copy_mode = 0; clear_area(save_x*CELL, save_y*CELL, save_w*CELL, save_h*CELL); } - else if(copy_mode==3)//rotation + else if(copy_mode==3)//rotation { - if(save_h>save_w) - save_w = save_h; - rotate_area(save_x*CELL, save_y*CELL, save_w*CELL, save_w*CELL,0);//just do squares for now - save_mode = 0; - copy_mode = 0; - } - else if(copy_mode==4)//invertion + if(save_h>save_w) + save_w = save_h; + rotate_area(save_x*CELL, save_y*CELL, save_w*CELL, save_w*CELL,0);//just do squares for now + save_mode = 0; + copy_mode = 0; + } + else if(copy_mode==4)//invertion { - if(save_h>save_w) - save_w = save_h; - rotate_area(save_x*CELL, save_y*CELL, save_w*CELL, save_w*CELL,1);//just do squares for now - save_mode = 0; - copy_mode = 0; - } + if(save_h>save_w) + save_w = save_h; + rotate_area(save_x*CELL, save_y*CELL, save_w*CELL, save_w*CELL,1);//just do squares for now + save_mode = 0; + copy_mode = 0; + } else { stamp_save(save_x*CELL, save_y*CELL, save_w*CELL, save_h*CELL); @@ -2033,11 +2033,11 @@ int main(int argc, char *argv[]) memset(fire_g, 0, sizeof(fire_g)); memset(fire_b, 0, sizeof(fire_b)); } - if(x>=19 && x<=35 && svf_last && svf_open && !bq){ - //int tpval = sys_pause; - parse_save(svf_last, svf_lsize, 1, 0, 0); - //sys_pause = tpval; - } + if(x>=19 && x<=35 && svf_last && svf_open && !bq) { + //int tpval = sys_pause; + parse_save(svf_last, svf_lsize, 1, 0, 0); + //sys_pause = tpval; + } if(x>=(XRES+BARSIZE-(510-476)) && x<=(XRES+BARSIZE-(510-491)) && !bq) { if(b & SDL_BUTTON_LMASK) @@ -2112,8 +2112,8 @@ int main(int argc, char *argv[]) } else if((sdl_mod & (KMOD_LCTRL|KMOD_RCTRL)) && (sdl_mod & (KMOD_LSHIFT|KMOD_RSHIFT)) && !(sdl_mod & (KMOD_LALT))) { - if(sdl_mod & (KMOD_CAPS)) - c = 0; + if(sdl_mod & (KMOD_CAPS)) + c = 0; if(c!=WL_STREAM&&c!=SPC_AIR&&c!=SPC_HEAT&&c!=SPC_COOL&&c!=SPC_VACUUM&&!REPLACE_MODE) flood_parts(x, y, c, -1, -1); lx = x; @@ -2200,14 +2200,14 @@ int main(int argc, char *argv[]) if(save_mode) { - if(copy_mode==3||copy_mode==4)//special drawing for rotate, can remove once it can do rectangles - { - if(save_h>save_w) - save_w = save_h; - xor_rect(vid_buf, save_x*CELL, save_y*CELL, save_w*CELL, save_w*CELL); - } - else - xor_rect(vid_buf, save_x*CELL, save_y*CELL, save_w*CELL, save_h*CELL); + if(copy_mode==3||copy_mode==4)//special drawing for rotate, can remove once it can do rectangles + { + if(save_h>save_w) + save_w = save_h; + xor_rect(vid_buf, save_x*CELL, save_y*CELL, save_w*CELL, save_w*CELL); + } + else + xor_rect(vid_buf, save_x*CELL, save_y*CELL, save_w*CELL, save_h*CELL); da = 51; db = 269; } @@ -2331,22 +2331,22 @@ int main(int argc, char *argv[]) FPS = 0; pastFPS = currentTime; } - + #ifdef BETA - sprintf(uitext, "Version %d Beta %d FPS:%d Parts:%d", SAVE_VERSION, MINOR_VERSION, FPSB, NUM_PARTS); + sprintf(uitext, "Version %d Beta %d FPS:%d Parts:%d", SAVE_VERSION, MINOR_VERSION, FPSB, NUM_PARTS); #else - if(DEBUG_MODE) - sprintf(uitext, "Version %d.%d FPS:%d Parts:%d Generation:%d", SAVE_VERSION, MINOR_VERSION, FPSB, NUM_PARTS,GENERATION); - else - sprintf(uitext, "Version %d.%d FPS:%d", SAVE_VERSION, MINOR_VERSION, FPSB); + if(DEBUG_MODE) + sprintf(uitext, "Version %d.%d FPS:%d Parts:%d Generation:%d", SAVE_VERSION, MINOR_VERSION, FPSB, NUM_PARTS,GENERATION); + else + sprintf(uitext, "Version %d.%d FPS:%d", SAVE_VERSION, MINOR_VERSION, FPSB); #endif - if(REPLACE_MODE) - strappend(uitext, " [REPLACE MODE]"); - if(sdl_mod&(KMOD_CAPS)) - strappend(uitext, " [CAP LOCKS]"); - if(GRID_MODE) - sprintf(uitext, "%s [GRID: %d]", uitext, GRID_MODE); - + if(REPLACE_MODE) + strappend(uitext, " [REPLACE MODE]"); + if(sdl_mod&(KMOD_CAPS)) + strappend(uitext, " [CAP LOCKS]"); + if(GRID_MODE) + sprintf(uitext, "%s [GRID: %d]", uitext, GRID_MODE); + if(sdl_zoom_trig||zoom_en) { if(zoom_x0 || sr == PT_NEUT || sr == PT_PHOT) player2[2] = sr; diff --git a/src/powder.c b/src/powder.c index be1c7cd49..0e8e0f86b 100644 --- a/src/powder.c +++ b/src/powder.c @@ -78,8 +78,8 @@ static int eval_move(int pt, int nx, int ny, unsigned *rr) (r&0xFF)==PT_GLOW || (r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_ISOZ || (r&0xFF)==PT_ISZS || - (r&0xFF)==PT_FILT || (r&0xFF)==PT_INVIS || - ((r&0xFF)==PT_LCRY&&parts[r>>8].life > 5))) + (r&0xFF)==PT_FILT || (r&0xFF)==PT_INVIS || + ((r&0xFF)==PT_LCRY&&parts[r>>8].life > 5))) return 2; if(pt==PT_STKM) //Stick man's head shouldn't collide @@ -87,7 +87,7 @@ static int eval_move(int pt, int nx, int ny, unsigned *rr) if(pt==PT_STKM2) //Stick man's head shouldn't collide return 2; if((pt==PT_BIZR||pt==PT_BIZRG)&&(r&0xFF)==PT_FILT) - return 2; + return 2; if(bmap[ny/CELL][nx/CELL]==WL_ALLOWGAS && ptypes[pt].falldown!=0 && pt!=PT_FIRE && pt!=PT_SMKE) return 0; if(ptypes[pt].falldown!=2 && bmap[ny/CELL][nx/CELL]==WL_ALLOWLIQUID) @@ -101,22 +101,22 @@ static int eval_move(int pt, int nx, int ny, unsigned *rr) if(ptypes[pt].falldown!=1 && bmap[ny/CELL][nx/CELL]==WL_ALLOWSOLID) return 0; - if(r && (r&0xFF) < PT_NUM){ - if(ptypes[pt].properties&TYPE_ENERGY && ptypes[(r&0xFF)].properties&TYPE_ENERGY) - return 2; - - if(pt==PT_NEUT && ptypes[(r&0xFF)].properties&PROP_NEUTPASS) - return 2; - if(pt==PT_NEUT && ptypes[(r&0xFF)].properties&PROP_NEUTPENETRATE) - return 1; - if((r&0xFF)==PT_NEUT && ptypes[pt].properties&PROP_NEUTPENETRATE) - return 0; + if(r && (r&0xFF) < PT_NUM) { + if(ptypes[pt].properties&TYPE_ENERGY && ptypes[(r&0xFF)].properties&TYPE_ENERGY) + return 2; + + if(pt==PT_NEUT && ptypes[(r&0xFF)].properties&PROP_NEUTPASS) + return 2; + if(pt==PT_NEUT && ptypes[(r&0xFF)].properties&PROP_NEUTPENETRATE) + return 1; + if((r&0xFF)==PT_NEUT && ptypes[pt].properties&PROP_NEUTPENETRATE) + return 0; } - + if (r && ((r&0xFF) >= PT_NUM || (ptypes[pt].weight <= ptypes[(r&0xFF)].weight))) return 0; - if(pt == PT_PHOT) + if(pt == PT_PHOT) return 2; return 1; @@ -133,8 +133,8 @@ int try_move(int i, int x, int y, int nx, int ny) return 1; e = eval_move(parts[i].type, nx, ny, &r); - if((pmap[ny][nx]&0xFF)==PT_INVIS && (pv[ny/CELL][nx/CELL]>4.0f ||pv[ny/CELL][nx/CELL]<-4.0f)) - return 1; + if((pmap[ny][nx]&0xFF)==PT_INVIS && (pv[ny/CELL][nx/CELL]>4.0f ||pv[ny/CELL][nx/CELL]<-4.0f)) + return 1; /* half-silvered mirror */ if(!e && parts[i].type==PT_PHOT && (((r&0xFF)==PT_BMTL && rand()>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; - parts[i].ctype = 0x1F << temp_bin; - } - 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) { - parts[i].type = 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; - } + 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; + parts[i].ctype = 0x1F << temp_bin; + } + 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) { + parts[i].type = 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; } if((r&0xFF)==PT_VOID) { - if(parts[i].type == PT_STKM) - { - death = 1; - isplayer = 0; - } - if(parts[i].type == PT_STKM2) - { - death2 = 1; - isplayer2 = 0; - } + if(parts[i].type == PT_STKM) + { + death = 1; + isplayer = 0; + } + if(parts[i].type == PT_STKM2) + { + death2 = 1; + isplayer2 = 0; + } parts[i].type=PT_NONE; return 0; } if((r&0xFF)==PT_BHOL) { - if(parts[i].type == PT_STKM) - { - death = 1; - isplayer = 0; - } - if(parts[i].type == PT_STKM2) - { - death2 = 1; - isplayer2 = 0; - } + if(parts[i].type == PT_STKM) + { + death = 1; + isplayer = 0; + } + if(parts[i].type == PT_STKM2) + { + death2 = 1; + isplayer2 = 0; + } parts[i].type=PT_NONE; if(!legacy_enable) { @@ -223,7 +223,7 @@ int try_move(int i, int x, int y, int nx, int ny) return 0; } if((pmap[ny][nx]&0xFF)==PT_CNCT) - return 0; + return 0; if(parts[i].type==PT_CNCT && y=0 && y>=0 && x=0 && y>=0 && x>8].temp>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 0.1f, 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((pmap[y][x]&0xFF)==PT_PUMP) + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 0.1f, 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) - parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 0.1f, 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((pmap[y][x]&0xFF)==PT_PUMP) + parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 0.1f, 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; } @@ -459,28 +463,27 @@ inline int create_part(int p, int x, int y, int t) } if(t==SPC_AIR) { - pv[y/CELL][x/CELL] += 0.03f; - if(y+CELL>8].life!=0) - 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; @@ -512,15 +515,15 @@ inline int create_part(int p, int x, int y, int t) return pmap[y][x]>>8; } if(t==PT_SPAWN&&ISSPAWN1) - return -1; + return -1; if(t==PT_SPAWN2&&ISSPAWN2) - return -1; + return -1; if(p==-1)//creating from anything but brush { - if(pmap[y][x]) - if((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2) - if(t!=PT_STKM&&t!=PT_STKM2) - return -1; + if(pmap[y][x]) + if((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2) + if(t!=PT_STKM&&t!=PT_STKM2) + return -1; if(pfree == -1) return -1; i = pfree; @@ -529,13 +532,13 @@ inline int create_part(int p, int x, int y, int t) else if(p==-2)//creating from brush { if(pmap[y][x]) - { - if(((pmap[y][x]&0xFF)==PT_CLNE||(pmap[y][x]&0xFF)==PT_BCLN||(pmap[y][x]&0xFF)==PT_PCLN)&&(t!=PT_CLNE&&t!=PT_PCLN&&t!=PT_BCLN)) - { - parts[pmap[y][x]>>8].ctype = t; - } + { + if(((pmap[y][x]&0xFF)==PT_CLNE||(pmap[y][x]&0xFF)==PT_BCLN||(pmap[y][x]&0xFF)==PT_PCLN)&&(t!=PT_CLNE&&t!=PT_PCLN&&t!=PT_BCLN)) + { + parts[pmap[y][x]>>8].ctype = t; + } return -1; - } + } if(pfree == -1) return -1; i = pfree; @@ -569,19 +572,19 @@ inline int create_part(int p, int x, int y, int t) parts[i].life = 150; } End Testing*/ - if(t==PT_WARP) { - parts[i].life = rand()%95+70; - } + if(t==PT_WARP) { + parts[i].life = rand()%95+70; + } if(t==PT_FUSE) { parts[i].life = 50; parts[i].tmp = 50; } if(t==PT_DEUT) - parts[i].life = 10; - if(t==PT_BRAY) - parts[i].life = 30; - if(t==PT_PUMP) - parts[i].life= 10; + parts[i].life = 10; + if(t==PT_BRAY) + parts[i].life = 30; + if(t==PT_PUMP) + parts[i].life= 10; if(t==PT_FSEP) parts[i].life = 50; if(t==PT_COAL) { @@ -589,9 +592,9 @@ inline int create_part(int p, int x, int y, int t) parts[i].tmp = 50; } if(t==PT_FRZW) - parts[i].life = 100; + parts[i].life = 100; if(t==PT_PIPE) - parts[i].life = 60; + parts[i].life = 60; if(t==PT_BCOL) parts[i].life = 110; if(t==PT_FIRE) @@ -627,34 +630,34 @@ inline int create_part(int p, int x, int y, int t) parts[i].vy = 3.0f*sinf(a); } if(t==PT_BIZR||t==PT_BIZRG) - parts[i].ctype = 0x47FFFF; + parts[i].ctype = 0x47FFFF; if(t!=PT_STKM&&t!=PT_STKM2)// && t!=PT_PHOT && t!=PT_NEUT) is this needed? it breaks floodfill pmap[y][x] = t|(i<<8); else if(t==PT_STKM) { if(isplayer==0) { - if(pmap[y][x]&0xFF==PT_SPAWN) - { - parts[pmap[y][x]>>8].type = PT_STKM; - parts[pmap[y][x]>>8].vx = 0; - parts[pmap[y][x]>>8].vy = 0; - parts[pmap[y][x]>>8].life = 100; - parts[pmap[y][x]>>8].ctype = 0; - parts[pmap[y][x]>>8].temp = ptypes[t].heat; - - } - else - { - parts[i].x = (float)x; - parts[i].y = (float)y; - parts[i].type = PT_STKM; - parts[i].vx = 0; - parts[i].vy = 0; - parts[i].life = 100; - parts[i].ctype = 0; - parts[i].temp = ptypes[t].heat; - } + if(pmap[y][x]&0xFF==PT_SPAWN) + { + parts[pmap[y][x]>>8].type = PT_STKM; + parts[pmap[y][x]>>8].vx = 0; + parts[pmap[y][x]>>8].vy = 0; + parts[pmap[y][x]>>8].life = 100; + parts[pmap[y][x]>>8].ctype = 0; + parts[pmap[y][x]>>8].temp = ptypes[t].heat; + + } + else + { + parts[i].x = (float)x; + parts[i].y = (float)y; + parts[i].type = PT_STKM; + parts[i].vx = 0; + parts[i].vy = 0; + parts[i].life = 100; + parts[i].ctype = 0; + parts[i].temp = ptypes[t].heat; + } @@ -680,35 +683,35 @@ inline int create_part(int p, int x, int y, int t) isplayer = 1; } - //kill_part(playerspawn); - create_part(-1,x,y,PT_SPAWN); - ISSPAWN1 = 1; + //kill_part(playerspawn); + create_part(-1,x,y,PT_SPAWN); + ISSPAWN1 = 1; } else if(t==PT_STKM2) { if(isplayer2==0) { - if(pmap[y][x]&0xFF==PT_SPAWN2) - { - parts[pmap[y][x]>>8].type = PT_STKM2; - parts[pmap[y][x]>>8].vx = 0; - parts[pmap[y][x]>>8].vy = 0; - parts[pmap[y][x]>>8].life = 100; - parts[pmap[y][x]>>8].ctype = 0; - parts[pmap[y][x]>>8].temp = ptypes[t].heat; - - } - else - { - parts[i].x = (float)x; - parts[i].y = (float)y; - parts[i].type = PT_STKM2; - parts[i].vx = 0; - parts[i].vy = 0; - parts[i].life = 100; - parts[i].ctype = 0; - parts[i].temp = ptypes[t].heat; - } + if(pmap[y][x]&0xFF==PT_SPAWN2) + { + parts[pmap[y][x]>>8].type = PT_STKM2; + parts[pmap[y][x]>>8].vx = 0; + parts[pmap[y][x]>>8].vy = 0; + parts[pmap[y][x]>>8].life = 100; + parts[pmap[y][x]>>8].ctype = 0; + parts[pmap[y][x]>>8].temp = ptypes[t].heat; + + } + else + { + parts[i].x = (float)x; + parts[i].y = (float)y; + parts[i].type = PT_STKM2; + parts[i].vx = 0; + parts[i].vy = 0; + parts[i].life = 100; + parts[i].ctype = 0; + parts[i].temp = ptypes[t].heat; + } @@ -734,9 +737,9 @@ inline int create_part(int p, int x, int y, int t) isplayer2 = 1; } - //kill_part(player2spawn); - create_part(-1,x,y,PT_SPAWN2); - ISSPAWN2 = 1; + //kill_part(player2spawn); + create_part(-1,x,y,PT_SPAWN2); + ISSPAWN2 = 1; } return i; @@ -844,17 +847,17 @@ inline void delete_part(int x, int y) if(!i || (i>>8)>=NPART) return; if((parts[i>>8].type==SLALT)||SLALT==0) - { - kill_part(i>>8); - pmap[y][x] = 0; - } + { + kill_part(i>>8); + pmap[y][x] = 0; + } else if(ptypes[parts[i>>8].type].menusection==SEC) - { - kill_part(i>>8); - pmap[y][x] = 0; - } - else - return; + { + kill_part(i>>8); + pmap[y][x] = 0; + } + else + return; } #if defined(WIN32) && !defined(__GNUC__) @@ -963,25 +966,25 @@ _inline int parts_avg(int ci, int ni,int t)//t is the particle you are looking f inline int parts_avg(int ci, int ni,int t) #endif { - if(t==PT_INSL)//to keep electronics working - { - int pmr = pmap[(int)((parts[ci].y + parts[ni].y)/2)][(int)((parts[ci].x + parts[ni].x)/2)]; - if((pmr>>8) < NPART && pmr) - return parts[pmr>>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>>8) < NPART && pmr2) - { - if(parts[pmr2>>8].type==t) - return t; - } - else - return PT_NONE; - } + if(t==PT_INSL)//to keep electronics working + { + int pmr = pmap[(int)((parts[ci].y + parts[ni].y)/2)][(int)((parts[ci].x + parts[ni].x)/2)]; + if((pmr>>8) < NPART && pmr) + return parts[pmr>>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>>8) < NPART && pmr2) + { + if(parts[pmr2>>8].type==t) + return t; + } + else + return PT_NONE; + } } @@ -1017,267 +1020,257 @@ void update_particles_i(pixel *vid, int start, int inc) float c_heat = 0.0f; int h_count = 0; int starti = (start*-1); - if(sys_pause&&!framerender) - return; + if(sys_pause&&!framerender) + return; if(ISGRAV==1) - { - ISGRAV = 0; - GRAV ++; - GRAV_R = 60; - GRAV_G = 0; - GRAV_B = 0; - GRAV_R2 = 30; - GRAV_G2 = 30; - GRAV_B2 = 0; - for( q = 0;q <= GRAV;q++) - { - if(GRAV_R >0 && GRAV_G==0) - { - GRAV_R--; - GRAV_B++; - } - if(GRAV_B >0 && GRAV_R==0) - { - GRAV_B--; - GRAV_G++; - } - if(GRAV_G >0 && GRAV_B==0) - { - GRAV_G--; - GRAV_R++; - } - if(GRAV_R2 >0 && GRAV_G2==0) - { - GRAV_R2--; - GRAV_B2++; - } - if(GRAV_B2 >0 && GRAV_R2==0) - { - GRAV_B2--; - GRAV_G2++; - } - if(GRAV_G2 >0 && GRAV_B2==0) - { - GRAV_G2--; - GRAV_R2++; - } - } - if(GRAV>180) GRAV = 0; - - } - if(ISLOVE==1) - { - ISLOVE = 0; - for(ny=0;ny>8)>=NPART || !r) - { - continue; - } - else if((ny<9||nx<9||ny>YRES-7||nx>XRES-10)&&parts[r>>8].type==PT_LOVE) - parts[r>>8].type = PT_NONE; - else if(parts[r>>8].type==PT_LOVE) - { - love[nx/9][ny/9] = 1; - } - - } - } - for(nx=9;nx<=XRES-18;nx++) - { - for(ny=9;ny<=YRES-7;ny++) - { - if(love[nx/9][ny/9]==1) - { - for( nnx=0;nnx<9;nnx++) - for( nny=0;nny<9;nny++) - { - if(ny+nny>0&&ny+nny=0&&nx+nnx>8)>=NPART) - { - continue; - } - if(!rt&&loverule[nnx][nny]==1) - create_part(-1,nx+nnx,ny+nny,PT_LOVE); - else if(!rt) - continue; - else if(parts[rt>>8].type==PT_LOVE&&loverule[nnx][nny]==0) - parts[rt>>8].type=PT_NONE; - - } - } - } - love[nx/9][ny/9]=0; - } - } - } - if(ISLOLZ==1) - { - ISLOLZ = 0; - for(ny=0;ny>8)>=NPART || !r) - { - continue; - } - else if((ny<9||nx<9||ny>YRES-7||nx>XRES-10)&&parts[r>>8].type==PT_LOLZ) - parts[r>>8].type = PT_NONE; - else if(parts[r>>8].type==PT_LOLZ) - { - lolz[nx/9][ny/9] = 1; - } - - } - } - for(nx=9;nx<=XRES-18;nx++) - { - for(ny=9;ny<=YRES-7;ny++) - { - if(lolz[nx/9][ny/9]==1) - { - for( nnx=0;nnx<9;nnx++) - for( nny=0;nny<9;nny++) - { - if(ny+nny>0&&ny+nny=0&&nx+nnx>8)>=NPART) - { - continue; - } - if(!rt&&lolzrule[nny][nnx]==1) - create_part(-1,nx+nnx,ny+nny,PT_LOLZ); - else if(!rt) - continue; - else if(parts[rt>>8].type==PT_LOLZ&&lolzrule[nny][nnx]==0) - parts[rt>>8].type=PT_NONE; - - } - } - } - lolz[nx/9][ny/9]=0; - } - } - } - if(ISGOL==1&&CGOL>=GSPEED)//GSPEED is frames per generation - { - int createdsomething = 0; - for(nx=4;nx>8)>=NPART || !r) - { - gol[nx][ny] = 0; - continue; - } - else - for( golnum=1;golnum>8].type==golnum+77) - { - 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 - { - if(ny+nny<4&&nx+nnx<4){//any way to make wrapping code smaller? - gol2[XRES-5][YRES-5][golnum] ++; - gol2[XRES-5][YRES-5][0] ++; - } - else if(ny+nny<4&&nx+nnx>=XRES-4){ - gol2[4][YRES-5][golnum] ++; - gol2[4][YRES-5][0] ++; - } - else if(ny+nny>=YRES-4&&nx+nnx<4){ - gol2[XRES-5][4][golnum] ++; - gol2[XRES-5][4][0] ++; - } - else if(nx+nnx<4){ - gol2[XRES-5][ny+nny][golnum] ++; - gol2[XRES-5][ny+nny][0] ++; - } - else if(ny+nny<4){ - gol2[nx+nnx][YRES-5][golnum] ++; - gol2[nx+nnx][YRES-5][0] ++; - } - else if(ny+nny>=YRES-4&&nx+nnx>=XRES-4){ - gol2[4][4][golnum] ++; - gol2[4][4][0] ++; - } - else if(ny+nny>=YRES-4){ - gol2[nx+nnx][4][golnum] ++; - gol2[nx+nnx][4][0] ++; - } - else if(nx+nnx>=XRES-4){ - gol2[4][ny+nny][golnum] ++; - gol2[4][ny+nny][0] ++; - } - else{ - gol2[nx+nnx][ny+nny][golnum] ++; - gol2[nx+nnx][ny+nny][0] ++; - } - } - } - } - for(nx=4;nx=2&&gol2[nx][ny][golnum]>=(goldelete%2)+goldelete/2) - { - if(create_part(-1,nx,ny,golnum+77)) - createdsomething = 1; - } - else if(neighbors-1==goldelete&&gol[nx][ny]==golnum&&(grule[golnum][goldelete]==0||grule[golnum][goldelete]==2))//subtract 1 because it counted itself - parts[pmap[ny][nx]>>8].type = PT_NONE; - } - gol2[nx][ny][0] = 0; - for( z = 1;z0 && GRAV_G==0) + { + GRAV_R--; + GRAV_B++; + } + if(GRAV_B >0 && GRAV_R==0) + { + GRAV_B--; + GRAV_G++; + } + if(GRAV_G >0 && GRAV_B==0) + { + GRAV_G--; + GRAV_R++; + } + if(GRAV_R2 >0 && GRAV_G2==0) + { + GRAV_R2--; + GRAV_B2++; + } + if(GRAV_B2 >0 && GRAV_R2==0) + { + GRAV_B2--; + GRAV_G2++; + } + if(GRAV_G2 >0 && GRAV_B2==0) + { + GRAV_G2--; + GRAV_R2++; + } + } + if(GRAV>180) GRAV = 0; + + } + if(ISLOVE==1) + { + ISLOVE = 0; + for(ny=0; ny>8)>=NPART || !r) + { + continue; + } + else if((ny<9||nx<9||ny>YRES-7||nx>XRES-10)&&parts[r>>8].type==PT_LOVE) + parts[r>>8].type = PT_NONE; + else if(parts[r>>8].type==PT_LOVE) + { + love[nx/9][ny/9] = 1; + } + + } + } + for(nx=9; nx<=XRES-18; nx++) + { + for(ny=9; ny<=YRES-7; ny++) + { + if(love[nx/9][ny/9]==1) + { + for( nnx=0; nnx<9; nnx++) + for( nny=0; nny<9; nny++) + { + if(ny+nny>0&&ny+nny=0&&nx+nnx>8)>=NPART) + { + continue; + } + if(!rt&&loverule[nnx][nny]==1) + create_part(-1,nx+nnx,ny+nny,PT_LOVE); + else if(!rt) + continue; + else if(parts[rt>>8].type==PT_LOVE&&loverule[nnx][nny]==0) + parts[rt>>8].type=PT_NONE; + + } + } + } + love[nx/9][ny/9]=0; + } + } + } + if(ISLOLZ==1) + { + ISLOLZ = 0; + for(ny=0; ny>8)>=NPART || !r) + continue; + else if((ny<9||nx<9||ny>YRES-7||nx>XRES-10)&&parts[r>>8].type==PT_LOLZ) + parts[r>>8].type = PT_NONE; + else if(parts[r>>8].type==PT_LOLZ) + lolz[nx/9][ny/9] = 1; + + } + for(nx=9; nx<=XRES-18; nx++) + { + for(ny=9; ny<=YRES-7; ny++) + { + if(lolz[nx/9][ny/9]==1) + { + for( nnx=0; nnx<9; nnx++) + for( nny=0; nny<9; nny++) + if(ny+nny>0&&ny+nny=0&&nx+nnx>8)>=NPART) + continue; + if(!rt&&lolzrule[nny][nnx]==1) + create_part(-1,nx+nnx,ny+nny,PT_LOLZ); + else if(!rt) + continue; + else if(parts[rt>>8].type==PT_LOLZ&&lolzrule[nny][nnx]==0) + parts[rt>>8].type=PT_NONE; + + } + } + lolz[nx/9][ny/9]=0; + } + } + } + if(ISGOL==1&&CGOL>=GSPEED)//GSPEED is frames per generation + { + int createdsomething = 0; + for(nx=4; nx>8)>=NPART || !r) + { + gol[nx][ny] = 0; + continue; + } + else + for( golnum=1; golnum>8].type==golnum+77) + { + 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 + { + if(ny+nny<4&&nx+nnx<4) { //any way to make wrapping code smaller? + gol2[XRES-5][YRES-5][golnum] ++; + gol2[XRES-5][YRES-5][0] ++; + } + else if(ny+nny<4&&nx+nnx>=XRES-4) { + gol2[4][YRES-5][golnum] ++; + gol2[4][YRES-5][0] ++; + } + else if(ny+nny>=YRES-4&&nx+nnx<4) { + gol2[XRES-5][4][golnum] ++; + gol2[XRES-5][4][0] ++; + } + else if(nx+nnx<4) { + gol2[XRES-5][ny+nny][golnum] ++; + gol2[XRES-5][ny+nny][0] ++; + } + else if(ny+nny<4) { + gol2[nx+nnx][YRES-5][golnum] ++; + gol2[nx+nnx][YRES-5][0] ++; + } + else if(ny+nny>=YRES-4&&nx+nnx>=XRES-4) { + gol2[4][4][golnum] ++; + gol2[4][4][0] ++; + } + else if(ny+nny>=YRES-4) { + gol2[nx+nnx][4][golnum] ++; + gol2[nx+nnx][4][0] ++; + } + else if(nx+nnx>=XRES-4) { + gol2[4][ny+nny][golnum] ++; + gol2[4][ny+nny][0] ++; + } + else { + gol2[nx+nnx][ny+nny][golnum] ++; + gol2[nx+nnx][ny+nny][0] ++; + } + } + } + } + for(nx=4; nx=2&&gol2[nx][ny][golnum]>=(goldelete%2)+goldelete/2) + { + if(create_part(-1,nx,ny,golnum+77)) + createdsomething = 1; + } + else if(neighbors-1==goldelete&&gol[nx][ny]==golnum&&(grule[golnum][goldelete]==0||grule[golnum][goldelete]==2))//subtract 1 because it counted itself + parts[pmap[ny][nx]>>8].type = PT_NONE; + } + gol2[nx][ny][0] = 0; + for( z = 1; z=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(pv[y/CELL][x/CELL]<(parts[i].temp-273.15)) - pv[y/CELL][x/CELL] += 0.1f*((parts[i].temp-273.15)-pv[y/CELL][x/CELL]); - if(y+CELL=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(pv[y/CELL][x/CELL]<(parts[i].temp-273.15)) + pv[y/CELL][x/CELL] += 0.1f*((parts[i].temp-273.15)-pv[y/CELL][x/CELL]); + if(y+CELL4.0f) { @@ -1425,16 +1418,16 @@ void update_particles_i(pixel *vid, int start, int inc) } else { - if(t==PT_ANAR) - { - parts[i].vx -= ptypes[t].advection*vx[y/CELL][x/CELL]; - parts[i].vy -= ptypes[t].advection*vy[y/CELL][x/CELL] + ptypes[t].gravity; - } - else{ - parts[i].vx += ptypes[t].advection*vx[y/CELL][x/CELL]; - parts[i].vy += ptypes[t].advection*vy[y/CELL][x/CELL] + ptypes[t].gravity; - - } + if(t==PT_ANAR) + { + parts[i].vx -= ptypes[t].advection*vx[y/CELL][x/CELL]; + parts[i].vy -= ptypes[t].advection*vy[y/CELL][x/CELL] + ptypes[t].gravity; + } + else { + parts[i].vx += ptypes[t].advection*vx[y/CELL][x/CELL]; + parts[i].vy += ptypes[t].advection*vy[y/CELL][x/CELL] + ptypes[t].gravity; + + } } if(ptypes[t].diffusion) @@ -1508,18 +1501,18 @@ void update_particles_i(pixel *vid, int start, int inc) if(t==PT_GAS && pv[y/CELL][x/CELL]>6.0f) t = parts[i].type = PT_OIL; if(t==PT_DESL && pv[y/CELL][x/CELL]>12.0f) - { + { t = parts[i].type = PT_FIRE; - parts[i].life = rand()%50+120; - } + parts[i].life = rand()%50+120; + } } if(t==PT_GAS && pv[y/CELL][x/CELL]<-6.0f) t = parts[i].type = PT_OIL; if(t==PT_DESL && pv[y/CELL][x/CELL]>5.0f) - { // Only way I know to make it - t = parts[i].type = PT_FIRE; // combust under pressure. - parts[i].life = rand()%50+120; - } + { // Only way I know to make it + t = parts[i].type = PT_FIRE; // combust under pressure. + parts[i].life = rand()%50+120; + } if(t==PT_GAS && pv[y/CELL][x/CELL]>6.0f) t = parts[i].type = PT_OIL; if(t==PT_BMTL && pv[y/CELL][x/CELL]>2.5f) @@ -1528,21 +1521,21 @@ void update_particles_i(pixel *vid, int start, int inc) t = parts[i].type = PT_BRMT; if(t==PT_BRCK && pv[y/CELL][x/CELL]>8.8f) t = parts[i].type = PT_STNE; - if(t==PT_PIPE && pv[y/CELL][x/CELL]>10.0f) + if(t==PT_PIPE && pv[y/CELL][x/CELL]>10.0f) t = parts[i].type = PT_BRMT; - if(t==PT_PSTE && pv[y/CELL][x/CELL]>0.5f) + if(t==PT_PSTE && pv[y/CELL][x/CELL]>0.5f) t = parts[i].type = PT_PSTS; - if(t==PT_PSTS && pv[y/CELL][x/CELL]<0.5f) + if(t==PT_PSTS && pv[y/CELL][x/CELL]<0.5f) t = parts[i].type = PT_PSTE; - if(t==PT_SHLD1 && pv[y/CELL][x/CELL]>7.0f) + if(t==PT_SHLD1 && pv[y/CELL][x/CELL]>7.0f) t = parts[i].type = PT_NONE; - if(t==PT_SHLD2 && pv[y/CELL][x/CELL]>15.0f) + if(t==PT_SHLD2 && pv[y/CELL][x/CELL]>15.0f) t = parts[i].type = PT_NONE; - if(t==PT_SHLD3 && pv[y/CELL][x/CELL]>25.0f) + if(t==PT_SHLD3 && pv[y/CELL][x/CELL]>25.0f) t = parts[i].type = PT_NONE; - if(t==PT_SHLD4 && pv[y/CELL][x/CELL]>40.0f) + if(t==PT_SHLD4 && pv[y/CELL][x/CELL]>40.0f) t = parts[i].type = PT_NONE; - if(t==PT_WIFI && pv[y/CELL][x/CELL]>15.0f) + if(t==PT_WIFI && pv[y/CELL][x/CELL]>15.0f) t = parts[i].type = PT_BRMT; //if(t==PT_GLAS && pv[y/CELL][x/CELL]>4.0f) // t = parts[i].type = PT_BGLA; @@ -1562,20 +1555,20 @@ void update_particles_i(pixel *vid, int start, int inc) t = PT_NEUT; create_part(i, x, y, t); } - if((t==PT_ISOZ||t==PT_ISZS) && 1>rand()%200 && ((int)(-4.0f*(pv[y/CELL][x/CELL])))>(rand()%1000)) + if((t==PT_ISOZ||t==PT_ISZS) && 1>rand()%200 && ((int)(-4.0f*(pv[y/CELL][x/CELL])))>(rand()%1000)) { t = PT_PHOT; - rr = (rand()%228+128)/127.0f; - rrr = (rand()%360)*3.14159f/180.0f; - parts[i].life = 680; - parts[i].ctype = 0x3FFFFFFF; - parts[i].vx = rr*cosf(rrr); - parts[i].vy = rr*sinf(rrr); + rr = (rand()%228+128)/127.0f; + rrr = (rand()%360)*3.14159f/180.0f; + parts[i].life = 680; + parts[i].ctype = 0x3FFFFFFF; + parts[i].vx = rr*cosf(rrr); + parts[i].vy = rr*sinf(rrr); create_part(i, x, y, t); } - if(t==PT_PSTE) - if(parts[i].temp>747.0f) - t = parts[i].type = PT_BRCK; + if(t==PT_PSTE) + if(parts[i].temp>747.0f) + t = parts[i].type = PT_BRCK; if(t==PT_SPRK&&parts[i].ctype==PT_ETRD&&parts[i].life==1) { nearp = nearest_part(i, PT_ETRD); @@ -1701,15 +1694,15 @@ void update_particles_i(pixel *vid, int start, int inc) } else { - if((t==PT_BIZR||t==PT_BIZRG||t==PT_BIZRS)&&pt>=pstates[t].gtemp) - { - t = parts[i].type = pstates[t].gas; - } - else{ - t = parts[i].type = pstates[t].gas; - pv[y/CELL][x/CELL] += 0.50f; - } - + if((t==PT_BIZR||t==PT_BIZRG||t==PT_BIZRS)&&pt>=pstates[t].gtemp) + { + t = parts[i].type = pstates[t].gas; + } + else { + t = parts[i].type = pstates[t].gas; + pv[y/CELL][x/CELL] += 0.50f; + } + if(t==PT_FIRE) parts[i].life = rand()%50+120; if(t==PT_HFLM) @@ -1820,13 +1813,13 @@ void update_particles_i(pixel *vid, int start, int inc) } else if(t==PT_ICEI || t==PT_SNOW) { - if(parts[i].ctype==PT_FRZW) - { - parts[i].temp -= 1.0f; - if(parts[i].temp<0) - parts[i].temp = 0; - - } + if(parts[i].ctype==PT_FRZW) + { + parts[i].temp -= 1.0f; + if(parts[i].temp<0) + parts[i].temp = 0; + + } for(nx=-2; nx<3; nx++) for(ny=-2; ny<3; ny++) if(x+nx>=0 && y+ny>0 && @@ -1978,60 +1971,60 @@ void update_particles_i(pixel *vid, int start, int inc) } } } - else if(t==PT_ARAY && parts[i].life==0){ - for(nx=-1; nx<2; nx++){ - for(ny=-1; ny<2; ny++){ - if(x+nx>=0 && y+ny>0 && x+nx=0 && y+ny>0 && x+nx>8)>=NPART || !r) continue; - if((r&0xFF)==PT_SPRK){ - int destroy = (parts[r>>8].ctype==PT_PSCN)?1:0; - for (docontinue = 1, nxx = 0, nyy = 0, nxi = nx*-1, nyi = ny*-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>>8)>=NPART)) { - if(!r){ - int nr = create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_BRAY); - if(nr!=-1&&destroy){ - parts[nr].tmp = 2; - parts[nr].life = 2; - } - } else if(!destroy) { - if(parts[r>>8].type==PT_BRAY&&parts[r>>8].tmp==0){ - if(nyy!=0 || nxx!=0){ - parts[r>>8].type = PT_BRAY; - parts[r>>8].life = 1020; - parts[r>>8].tmp = 1; - } - docontinue = 0; - } else if(parts[r>>8].type==PT_BRAY&&parts[r>>8].tmp==1){ - parts[r>>8].life = 1020; - //docontinue = 1; - } else if(parts[r>>8].type!=PT_INWR && parts[r>>8].type!=PT_ARAY) { - if(nyy!=0 || nxx!=0){ - create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK); - } - docontinue = 0; - } - } else if(destroy) { - if(parts[r>>8].type==PT_BRAY){ - parts[r>>8].life = 1; - docontinue = 1; - } else { - docontinue = 0; - } - } - } - } - } - //parts[i].life = 4; - } - } - } - } + if((r&0xFF)==PT_SPRK) { + int destroy = (parts[r>>8].ctype==PT_PSCN)?1:0; + for (docontinue = 1, nxx = 0, nyy = 0, nxi = nx*-1, nyi = ny*-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>>8)>=NPART)) { + if(!r) { + int nr = create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_BRAY); + if(nr!=-1&&destroy) { + parts[nr].tmp = 2; + parts[nr].life = 2; + } + } else if(!destroy) { + if(parts[r>>8].type==PT_BRAY&&parts[r>>8].tmp==0) { + if(nyy!=0 || nxx!=0) { + parts[r>>8].type = PT_BRAY; + parts[r>>8].life = 1020; + parts[r>>8].tmp = 1; + } + docontinue = 0; + } else if(parts[r>>8].type==PT_BRAY&&parts[r>>8].tmp==1) { + parts[r>>8].life = 1020; + //docontinue = 1; + } else if(parts[r>>8].type!=PT_INWR && parts[r>>8].type!=PT_ARAY) { + if(nyy!=0 || nxx!=0) { + create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK); + } + docontinue = 0; + } + } else if(destroy) { + if(parts[r>>8].type==PT_BRAY) { + parts[r>>8].life = 1; + docontinue = 1; + } else { + docontinue = 0; + } + } + } + } + } + //parts[i].life = 4; + } + } + } + } else if(t==PT_FUSE) { if(parts[i].life<=0) { @@ -2138,70 +2131,70 @@ void update_particles_i(pixel *vid, int start, int inc) { t = parts[i].type = PT_PLNT; parts[r>>8].type = PT_PLNT; - parts[r>>8].life = 0; + parts[r>>8].life = 0; } else if((r&0xFF)==PT_LAVA && 1>(rand()%250)) { parts[i].life = 4; t = parts[i].type = PT_FIRE; } - else if((r&0xFF)==PT_SMKE && (1>rand()%250)) - { - parts[r>>8].type = PT_NONE; - parts[i].life = rand()%60 + 60; - } - else if((r&0xFF)==PT_WOOD && (1>rand()%20) && abs(nx+ny)<=2 && VINE_MODE) - { - int nnx = rand()%3 -1; - int nny = rand()%3 -1; - if(x+nx+nnx>=0 && y+ny+nny>0 && - x+nx+nnx>8)>=NPART||pmap[y+ny+nny][x+nx+nnx]) - continue; - if(create_part(-1,x+nx+nnx,y+ny+nny,PT_VINE)) - parts[pmap[y+ny+nny][x+nx+nnx]>>8].temp = parts[i].temp; - } - } + else if((r&0xFF)==PT_SMKE && (1>rand()%250)) + { + parts[r>>8].type = PT_NONE; + parts[i].life = rand()%60 + 60; + } + else if((r&0xFF)==PT_WOOD && (1>rand()%20) && abs(nx+ny)<=2 && VINE_MODE) + { + int nnx = rand()%3 -1; + int nny = rand()%3 -1; + if(x+nx+nnx>=0 && y+ny+nny>0 && + x+nx+nnx>8)>=NPART||pmap[y+ny+nny][x+nx+nnx]) + continue; + if(create_part(-1,x+nx+nnx,y+ny+nny,PT_VINE)) + parts[pmap[y+ny+nny][x+nx+nnx]>>8].temp = parts[i].temp; + } + } //if(t==PT_SNOW && (r&0xFF)==PT_WATR && 15>(rand()%1000)) //t = parts[i].type = PT_WATR; } - if(parts[i].life==2) - { - for(nx=-1; nx<2; nx++) - for(ny=-1; ny<2; ny++) - if(x+nx>=0 && y+ny>0 && - x+nx>8)>=NPART) - continue; - if(!r) - create_part(-1,x+nx,y+ny,PT_O2); - } - parts[i].life = 0; - } + if(parts[i].life==2) + { + for(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && + x+nx>8)>=NPART) + continue; + if(!r) + create_part(-1,x+nx,y+ny,PT_O2); + } + parts[i].life = 0; + } + } + else if(t==PT_VINE) + { + nx=(rand()%3)-1; + ny=(rand()%3)-1; + if(x+nx>=0 && y+ny>0 && + x+nx>8)>=NPART) + continue; + if(1>rand()%15) + parts[i].type=PT_PLNT; + else if(!r) + { + create_part(-1,x+nx,y+ny,PT_VINE); + parts[pmap[y+ny][x+nx]>>8].temp = parts[i].temp; + parts[i].type=PT_PLNT; + } + } } - else if(t==PT_VINE) - { - nx=(rand()%3)-1; - ny=(rand()%3)-1; - if(x+nx>=0 && y+ny>0 && - x+nx>8)>=NPART) - continue; - if(1>rand()%15) - parts[i].type=PT_PLNT; - else if(!r) - { - create_part(-1,x+nx,y+ny,PT_VINE); - parts[pmap[y+ny][x+nx]>>8].temp = parts[i].temp; - parts[i].type=PT_PLNT; - } - } - } else if(t==PT_THRM) { for(nx=-2; nx<3; nx++) @@ -2262,10 +2255,10 @@ void update_particles_i(pixel *vid, int start, int inc) parts[i].life = 4; t = parts[i].type = PT_FIRE; } - if(((r&0xFF)==PT_CNCT&&t==PT_WATR) && 1>(rand()%500)) + if(((r&0xFF)==PT_CNCT&&t==PT_WATR) && 1>(rand()%500)) { t = parts[i].type = PT_PSTE; - parts[r>>8].type = PT_NONE; + parts[r>>8].type = PT_NONE; } } } @@ -2288,8 +2281,8 @@ void update_particles_i(pixel *vid, int start, int inc) { parts[r>>8].type = PT_NONE; } - if((r&0xFF)==PT_PLNT&&5>(rand()%1000)) - parts[r>>8].type = PT_NONE; + if((r&0xFF)==PT_PLNT&&5>(rand()%1000)) + parts[r>>8].type = PT_NONE; if(((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && pt>12.0f && 1>(rand()%500)) { parts[i].life = 4; @@ -2364,11 +2357,11 @@ void update_particles_i(pixel *vid, int start, int inc) } else if(((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && ptypes[parts[r>>8].type].hardness>(rand()%1000))&&parts[i].life>=50) { - if(parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS) - { - parts[i].life--; - parts[r>>8].type = PT_NONE; - } + if(parts_avg(i, r>>8,PT_GLAS)!= PT_GLAS) + { + parts[i].life--; + parts[r>>8].type = PT_NONE; + } } else if (parts[i].life==50) { @@ -2399,11 +2392,11 @@ void update_particles_i(pixel *vid, int start, int inc) if(33>rand()%100) { create_part(r>>8, x+nx, y+ny, 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; - } + 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 { @@ -2414,22 +2407,22 @@ void update_particles_i(pixel *vid, int start, int inc) pv[y/CELL][x/CELL] += 10.0f * CFDS; //Used to be 2, some people said nukes weren't powerful enough fe ++; } - if((r&0xFF)==PT_DEUT && (rt+1)>(rand()%1000)) - { - - create_part(r>>8, x+nx, y+ny, 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 += (parts[r>>8].life*17); - pv[y/CELL][x/CELL] += 6.0f * CFDS; - - } - else - parts[r>>8].type = PT_NONE; - } + if((r&0xFF)==PT_DEUT && (rt+1)>(rand()%1000)) + { + + create_part(r>>8, x+nx, y+ny, 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 += (parts[r>>8].life*17); + pv[y/CELL][x/CELL] += 6.0f * CFDS; + + } + else + parts[r>>8].type = PT_NONE; + } if((r&0xFF)==PT_GUNP && 15>(rand()%1000)) parts[r>>8].type = PT_DUST; if((r&0xFF)==PT_DYST && 15>(rand()%1000)) @@ -2453,15 +2446,15 @@ void update_particles_i(pixel *vid, int start, int inc) parts[r>>8].type = PT_GAS; if((r&0xFF)==PT_COAL && 5>(rand()%100)) parts[r>>8].type = PT_WOOD; - if((r&0xFF)==PT_DUST && 5>(rand()%100)) + if((r&0xFF)==PT_DUST && 5>(rand()%100)) parts[r>>8].type = PT_FWRK; - if((r&0xFF)==PT_FWRK && 5>(rand()%100)) + if((r&0xFF)==PT_FWRK && 5>(rand()%100)) parts[r>>8].ctype = PT_DUST; - if((r&0xFF)==PT_ACID && 5>(rand()%100)) - { + if((r&0xFF)==PT_ACID && 5>(rand()%100)) + { parts[r>>8].type = PT_ISOZ; - parts[r>>8].life = 0; - } + parts[r>>8].life = 0; + } /*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|| @@ -2487,7 +2480,7 @@ void update_particles_i(pixel *vid, int start, int inc) parts[i].vy *= 0.995; } } - for(nx=-1; nx<2; nx++) + for(nx=-1; nx<2; nx++) for(ny=-1; ny<2; ny++) if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) continue; - if((r&0xFF)==PT_ISOZ && 5>(rand()%2000)) - { - parts[i].vx *= 0.90; + if((r&0xFF)==PT_ISOZ && 5>(rand()%2000)) + { + parts[i].vx *= 0.90; parts[i].vy *= 0.90; parts[r>>8].type = PT_PHOT; - rrr = (rand()%360)*3.14159f/180.0f; - rr = (rand()%128+128)/127.0f; - parts[r>>8].life = 680; - parts[r>>8].ctype = 0x3FFFFFFF; - parts[r>>8].vx = rr*cosf(rrr); - parts[r>>8].vy = rr*sinf(rrr); - pv[y/CELL][x/CELL] -= 15.0f * CFDS; - } - if((r&0xFF)==PT_ISZS && 5>(rand()%2000)) - { - parts[i].vx *= 0.90; + rrr = (rand()%360)*3.14159f/180.0f; + rr = (rand()%128+128)/127.0f; + parts[r>>8].life = 680; + parts[r>>8].ctype = 0x3FFFFFFF; + parts[r>>8].vx = rr*cosf(rrr); + parts[r>>8].vy = rr*sinf(rrr); + 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; parts[r>>8].type = PT_PHOT; - rr = (rand()%228+128)/127.0f; - rrr = (rand()%360)*3.14159f/180.0f; - parts[r>>8].life = 680; - parts[r>>8].ctype = 0x3FFFFFFF; - parts[r>>8].vx = rr*cosf(rrr); - parts[r>>8].vy = rr*sinf(rrr); - pv[y/CELL][x/CELL] -= 15.0f * CFDS; - } - } + rr = (rand()%228+128)/127.0f; + rrr = (rand()%360)*3.14159f/180.0f; + parts[r>>8].life = 680; + parts[r>>8].ctype = 0x3FFFFFFF; + parts[r>>8].vx = rr*cosf(rrr); + parts[r>>8].vy = rr*sinf(rrr); + pv[y/CELL][x/CELL] -= 15.0f * CFDS; + } + } + } + else if(t==PT_GLOW) + { + for(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) + continue; + if(parts[r>>8].type==PT_WATR&&5>(rand()%2000)) + { + t = parts[i].type = PT_NONE; + parts[r>>8].type = PT_DEUT; + parts[r>>8].life = 10; + } + } } - else if(t==PT_GLOW) - { - for(nx=-1; nx<2; nx++) - for(ny=-1; ny<2; ny++) - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) - continue; - if(parts[r>>8].type==PT_WATR&&5>(rand()%2000)) - { - t = parts[i].type = PT_NONE; - parts[r>>8].type = PT_DEUT; - parts[r>>8].life = 10; - } - } - } else if(t==PT_MORT) { create_part(-1, x, y-1, PT_SMKE); } - else if(t>77&&t<77+NGOL) - { - if(parts[i].temp>0) - parts[i].temp -= 50.0f; - ISGOL=1; - } - else if(t==PT_LOVE) - ISLOVE=1; - else if(t==PT_LOLZ) - ISLOLZ=1; - else if(t==PT_GRAV) - ISGRAV=1; - else if(t==PT_SPNG) - { - if(pv[y/CELL][x/CELL]<=3&&pv[y/CELL][x/CELL]>=-3) - { - for(nx=-1; nx<2; nx++) - for(ny=-1; ny<2; ny++) - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r || parts[i].temp>374.0f) - continue; - if(parts[r>>8].type==PT_WATR&&33>=rand()/(RAND_MAX/100)+1) - { - parts[i].life++; - parts[r>>8].type=PT_NONE; - } - } - } - else - for(nx=-1; nx<2; nx++) - for(ny=-1; ny<2; ny++) - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART) - continue; - if((bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALLELEC||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_EWALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_DESTROYALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALL|| - bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWAIR||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWSOLID||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWGAS)) - continue; - if((!r)&&parts[i].life>=1)//if nothing then create water - { - create_part(-1,x+nx,y+ny,PT_WATR); - parts[i].life--; - } - } - for( trade = 0; trade<9;trade ++) - { - nx = rand()%5-2; - ny = rand()%5-2; - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) - continue; - if(parts[r>>8].type==t&&(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 --; - trade = 9; - } - else if(temp>0) - { - parts[r>>8].life += temp/2; - parts[i].life -= temp/2; - trade = 9; - } - } - } - } - for(nx=-1; nx<2; nx++) - for(ny=-1; ny<2; ny++) - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) - continue; - if(parts[r>>8].type==PT_FIRE&&parts[i].life>0) - { - if(parts[i].life<=2) - parts[i].life --; - parts[i].life -= parts[i].life/3; - } - } - if(parts[i].temp>=374) - for(nx=-1; nx<2; nx++) - for(ny=-1; ny<2; ny++) - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART) - continue; - if((bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALLELEC||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWLIQUID||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_DESTROYALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWSOLID)) - continue; - if((!r)&&parts[i].life>=1)//if nothing then create steam - { - create_part(-1,x+nx,y+ny,PT_WTRV); - parts[i].life--; - parts[i].temp -= 40.0f; - } - } - } - else if(t==PT_FOG) - { - if(parts[i].temp>=373.15) - t = parts[i].type = PT_WTRV; - for(nx=-1; nx<2; nx++) + else if(t>77&&t<77+NGOL) + { + if(parts[i].temp>0) + parts[i].temp -= 50.0f; + ISGOL=1; + } + else if(t==PT_LOVE) + ISLOVE=1; + else if(t==PT_LOLZ) + ISLOLZ=1; + else if(t==PT_GRAV) + ISGRAV=1; + else if(t==PT_SPNG) + { + if(pv[y/CELL][x/CELL]<=3&&pv[y/CELL][x/CELL]>=-3) + { + for(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r || parts[i].temp>374.0f) + continue; + if(parts[r>>8].type==PT_WATR&&33>=rand()/(RAND_MAX/100)+1) + { + parts[i].life++; + parts[r>>8].type=PT_NONE; + } + } + } + else + for(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART) + continue; + if((bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALLELEC||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_EWALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_DESTROYALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALL|| + bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWAIR||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWSOLID||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWGAS)) + continue; + if((!r)&&parts[i].life>=1)//if nothing then create water + { + create_part(-1,x+nx,y+ny,PT_WATR); + parts[i].life--; + } + } + for( trade = 0; trade<9; trade ++) + { + nx = rand()%5-2; + ny = rand()%5-2; + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) + continue; + if(parts[r>>8].type==t&&(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 --; + trade = 9; + } + else if(temp>0) + { + parts[r>>8].life += temp/2; + parts[i].life -= temp/2; + trade = 9; + } + } + } + } + for(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) + continue; + if(parts[r>>8].type==PT_FIRE&&parts[i].life>0) + { + if(parts[i].life<=2) + parts[i].life --; + parts[i].life -= parts[i].life/3; + } + } + if(parts[i].temp>=374) + for(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART) + continue; + if((bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALLELEC||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWLIQUID||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_DESTROYALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWSOLID)) + continue; + if((!r)&&parts[i].life>=1)//if nothing then create steam + { + create_part(-1,x+nx,y+ny,PT_WTRV); + parts[i].life--; + parts[i].temp -= 40.0f; + } + } + } + else if(t==PT_FOG) + { + if(parts[i].temp>=373.15) + t = parts[i].type = PT_WTRV; + for(nx=-1; nx<2; nx++) for(ny=-1; ny<2; ny++) if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) continue; - if(pstates[parts[r>>8].type].state==ST_SOLID&&5>=rand()%50&&parts[i].life==0&&!(parts[r>>8].type==PT_CLNE||parts[r>>8].type==PT_PCLN)) - { - t = parts[i].type = PT_RIME; - } - if(parts[r>>8].type==PT_SPRK) + if(pstates[parts[r>>8].type].state==ST_SOLID&&5>=rand()%50&&parts[i].life==0&&!(parts[r>>8].type==PT_CLNE||parts[r>>8].type==PT_PCLN)) { - parts[i].life += rand()%20; - } - } - } - else if(t==PT_RIME) - { - parts[i].vx = 0; - parts[i].vy = 0; - for(nx=-1; nx<2; nx++) + t = parts[i].type = PT_RIME; + } + if(parts[r>>8].type==PT_SPRK) + { + parts[i].life += rand()%20; + } + } + } + else if(t==PT_RIME) + { + parts[i].vx = 0; + parts[i].vy = 0; + for(nx=-1; nx<2; nx++) for(ny=-1; ny<2; ny++) if(x+nx>=0 && y+ny>0 && x+nx>8].type; if(rt==PT_SPRK) { - t = parts[i].type = PT_FOG; - parts[i].life = rand()%50 + 60; - } - else if(rt==PT_FOG&&parts[r>>8].life>0) - { - t = parts[i].type = PT_FOG; - parts[i].life = parts[r>>8].life; - } - } - } - else if(t==PT_DEUT) - { - 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(nx=-1; nx<2; nx++) - for(ny=-1; ny<2; ny++) - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r || (parts[i].life >=maxlife)) - continue; - if(parts[r>>8].type==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; - parts[r>>8].type=PT_NONE; - } - } - } - } - else - for(nx=-1; nx<2; nx++) - for(ny=-1; ny<2; ny++) - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || (parts[i].life<=maxlife)) - continue; - if((bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALLELEC||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_EWALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_DESTROYALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALL|| - bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWAIR||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWSOLID||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWGAS)) - continue; - if((!r)&&parts[i].life>=1)//if nothing then create deut - { - create_part(-1,x+nx,y+ny,PT_DEUT); - parts[i].life--; - parts[pmap[y+ny][x+nx]>>8].temp = parts[i].temp; - parts[pmap[y+ny][x+nx]>>8].life = 0; - } - } - for( trade = 0; trade<4;trade ++) - { - nx = rand()%5-2; - ny = rand()%5-2; - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) - continue; - if(parts[r>>8].type==t&&(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; - } - } - } - } - } - else if(t==PT_WARP) - { - for( trade = 0; trade<5;trade ++) - { - nx = rand()%3-1; - ny = rand()%3-1; - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) - continue; - if(parts[r>>8].type!=PT_WARP&&parts[r>>8].type!=PT_STKM&&parts[r>>8].type!=PT_DMND&&parts[r>>8].type!=PT_CLNE&&parts[r>>8].type!=PT_BCLN&&parts[r>>8].type!=PT_PCLN&&(10>=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; - trade = 5; - } - } - } - } - else if(t==PT_FWRK) - { - 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) - { - create_part(-1, x , y-1 , PT_FWRK); - r = pmap[y-1][x]; - if(parts[r>>8].type==PT_FWRK) - { - parts[r>>8].vy = rand()%8-22; - parts[r>>8].vx = rand()%20-rand()%20; - parts[r>>8].life=rand()%15+25; - t=parts[i].type=PT_NONE; - } - } - if(parts[i].life>1) - { - if(parts[i].life>=45&&parts[i].type==PT_FWRK) - 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(nx=-1; nx<2; nx++) - for(ny=-2; ny<3; ny++) - if(x+nx>=0 && y+ny>0 && - x+nx=rand()%8) - { - if(!pmap[y+ny][x+nx]) - { - create_part(-1, x+nx, y+ny , PT_DUST); - pv[y/CELL][x/CELL] += 2.00f*CFDS; - a= pmap[y+ny][x+nx]; - if(parts[a>>8].type==PT_DUST) - { - parts[a>>8].vy = -(rand()%10-1); - parts[a>>8].vx = ((rand()%2)*2-1)*rand()%(5+5)+(parts[i].vx)*2 ; - parts[a>>8].life= rand()%37+18; - parts[a>>8].tmp=q; - parts[a>>8].flags=w; - parts[a>>8].ctype=e; - parts[a>>8].temp= rand()%20+6000; - } - } - } - } - t=parts[i].type=PT_NONE; - } - } + t = parts[i].type = PT_FOG; + parts[i].life = rand()%50 + 60; + } + else if(rt==PT_FOG&&parts[r>>8].life>0) + { + t = parts[i].type = PT_FOG; + parts[i].life = parts[r>>8].life; + } + } + } + else if(t==PT_DEUT) + { + 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(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r || (parts[i].life >=maxlife)) + continue; + if(parts[r>>8].type==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; + parts[r>>8].type=PT_NONE; + } + } + } + } + else + for(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || (parts[i].life<=maxlife)) + continue; + if((bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALLELEC||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_EWALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_DESTROYALL||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_WALL|| + bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWAIR||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWSOLID||bmap[(y+ny)/CELL][(x+nx)/CELL]==WL_ALLOWGAS)) + continue; + if((!r)&&parts[i].life>=1)//if nothing then create deut + { + create_part(-1,x+nx,y+ny,PT_DEUT); + parts[i].life--; + parts[pmap[y+ny][x+nx]>>8].temp = parts[i].temp; + parts[pmap[y+ny][x+nx]>>8].life = 0; + } + } + for( trade = 0; trade<4; trade ++) + { + nx = rand()%5-2; + ny = rand()%5-2; + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) + continue; + if(parts[r>>8].type==t&&(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; + } + } + } + } + } + else if(t==PT_WARP) + { + for( trade = 0; trade<5; trade ++) + { + nx = rand()%3-1; + ny = rand()%3-1; + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) + continue; + if(parts[r>>8].type!=PT_WARP&&parts[r>>8].type!=PT_STKM&&parts[r>>8].type!=PT_DMND&&parts[r>>8].type!=PT_CLNE&&parts[r>>8].type!=PT_BCLN&&parts[r>>8].type!=PT_PCLN&&(10>=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; + trade = 5; + } + } + } + } + else if(t==PT_FWRK) + { + 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) + { + create_part(-1, x , y-1 , PT_FWRK); + r = pmap[y-1][x]; + if(parts[r>>8].type==PT_FWRK) + { + parts[r>>8].vy = rand()%8-22; + parts[r>>8].vx = rand()%20-rand()%20; + parts[r>>8].life=rand()%15+25; + t=parts[i].type=PT_NONE; + } + } + if(parts[i].life>1) + { + if(parts[i].life>=45&&parts[i].type==PT_FWRK) + 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(nx=-1; nx<2; nx++) + for(ny=-2; ny<3; ny++) + if(x+nx>=0 && y+ny>0 && + x+nx=rand()%8) + { + if(!pmap[y+ny][x+nx]) + { + create_part(-1, x+nx, y+ny , PT_DUST); + pv[y/CELL][x/CELL] += 2.00f*CFDS; + a= pmap[y+ny][x+nx]; + if(parts[a>>8].type==PT_DUST) + { + parts[a>>8].vy = -(rand()%10-1); + parts[a>>8].vx = ((rand()%2)*2-1)*rand()%(5+5)+(parts[i].vx)*2 ; + parts[a>>8].life= rand()%37+18; + parts[a>>8].tmp=q; + parts[a>>8].flags=w; + parts[a>>8].ctype=e; + parts[a>>8].temp= rand()%20+6000; + } + } + } + } + t=parts[i].type=PT_NONE; + } + } else if(t==PT_LCRY) { for(nx=-1; nx<2; nx++) @@ -2875,127 +2868,127 @@ void update_particles_i(pixel *vid, int start, int inc) } } } - else if(t==PT_PIPE) - { - if(!parts[i].ctype && parts[i].life<=10) - { - if(parts[i].temp<272.15) - { - 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 - { - for(nx=-2; nx<3; nx++) - for(ny=-2; ny<3; ny++) - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART ) - continue; - if(!r) - create_part(-1,x+nx,y+ny,PT_BRCK); - } - if(parts[i].life==1) - parts[i].ctype = 1; - } - } - if(parts[i].ctype==1) - { - for(nx=-1; nx<2; nx++) - for(ny=-1; ny<2; ny++) - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART) - continue; - if(!r&&!parts[i].life) - parts[i].life=50; - } - if(parts[i].life==2) - { - parts[i].ctype = 2; - parts[i].life = 6; - } - } - if(parts[i].ctype>1) - for( q = 0;q<3;q++) - for( ctype = 2;ctype<5;ctype++) - { - if(parts[i].ctype==ctype) - { - if(parts[i].life==3) - { - for(nx=-1; nx<2; nx++) - for(ny=-1; ny<2; ny++) - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) - continue; - if(parts[r>>8].type==PT_PIPE&&parts[r>>8].ctype==1) - { - parts[r>>8].ctype = (((ctype)%3)+2);//reverse - parts[r>>8].life = 6; - } - } - } - else - { - nx = rand()%3-1; - ny = rand()%3-1; - if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART) - continue; - else if(!r&&parts[i].tmp!=0) - { - if(create_part(-1,x+nx,y+ny,parts[i].tmp)) - { - parts[pmap[y+ny][x+nx]>>8].temp = parts[i].temp;//pipe saves temp and life now - parts[pmap[y+ny][x+nx]>>8].life = parts[i].flags; - } - parts[i].tmp = 0; - continue; - } - else if(!r) - continue; - else if(parts[i].tmp == 0 && (ptypes[parts[r>>8].type].falldown!= 0 || pstates[parts[r>>8].type].state == ST_GAS)) - { - parts[i].tmp = parts[r>>8].type; - parts[i].temp = parts[r>>8].temp; - parts[i].flags = parts[r>>8].life; - parts[r>>8].type = PT_NONE; - } - else if(parts[r>>8].type==PT_PIPE && parts[r>>8].ctype!=(((ctype)%3)+2) && parts[r>>8].tmp==0&&parts[i].tmp>0) - { - parts[r>>8].tmp = parts[i].tmp; - parts[r>>8].temp = parts[i].temp; - parts[r>>8].flags = parts[i].flags; - parts[i].tmp = 0; - } - } - } - } - } - } - else if(t==PT_FRZZ) - { - for(nx=-1; nx<2; nx++) + else if(t==PT_PIPE) + { + if(!parts[i].ctype && parts[i].life<=10) + { + if(parts[i].temp<272.15) + { + 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 + { + for(nx=-2; nx<3; nx++) + for(ny=-2; ny<3; ny++) + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART ) + continue; + if(!r) + create_part(-1,x+nx,y+ny,PT_BRCK); + } + if(parts[i].life==1) + parts[i].ctype = 1; + } + } + if(parts[i].ctype==1) + { + for(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART) + continue; + if(!r&&!parts[i].life) + parts[i].life=50; + } + if(parts[i].life==2) + { + parts[i].ctype = 2; + parts[i].life = 6; + } + } + if(parts[i].ctype>1) + for( q = 0; q<3; q++) + for( ctype = 2; ctype<5; ctype++) + { + if(parts[i].ctype==ctype) + { + if(parts[i].life==3) + { + for(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) + continue; + if(parts[r>>8].type==PT_PIPE&&parts[r>>8].ctype==1) + { + parts[r>>8].ctype = (((ctype)%3)+2);//reverse + parts[r>>8].life = 6; + } + } + } + else + { + nx = rand()%3-1; + ny = rand()%3-1; + if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART) + continue; + else if(!r&&parts[i].tmp!=0) + { + if(create_part(-1,x+nx,y+ny,parts[i].tmp)) + { + parts[pmap[y+ny][x+nx]>>8].temp = parts[i].temp;//pipe saves temp and life now + parts[pmap[y+ny][x+nx]>>8].life = parts[i].flags; + } + parts[i].tmp = 0; + continue; + } + else if(!r) + continue; + else if(parts[i].tmp == 0 && (ptypes[parts[r>>8].type].falldown!= 0 || pstates[parts[r>>8].type].state == ST_GAS)) + { + parts[i].tmp = parts[r>>8].type; + parts[i].temp = parts[r>>8].temp; + parts[i].flags = parts[r>>8].life; + parts[r>>8].type = PT_NONE; + } + else if(parts[r>>8].type==PT_PIPE && parts[r>>8].ctype!=(((ctype)%3)+2) && parts[r>>8].tmp==0&&parts[i].tmp>0) + { + parts[r>>8].tmp = parts[i].tmp; + parts[r>>8].temp = parts[i].temp; + parts[r>>8].flags = parts[i].flags; + parts[i].tmp = 0; + } + } + } + } + } + } + else if(t==PT_FRZZ) + { + for(nx=-1; nx<2; nx++) for(ny=-1; ny<2; ny++) if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) continue; - if(parts[r>>8].type==PT_WATR&&5>rand()%100) - { - parts[r>>8].type=PT_FRZW; - parts[r>>8].life = 100; - t = parts[i].type = PT_NONE; - } - - } - } - else if(t==PT_FRZW) - { - for(nx=-1; nx<2; nx++) + if(parts[r>>8].type==PT_WATR&&5>rand()%100) + { + parts[r>>8].type=PT_FRZW; + parts[r>>8].life = 100; + t = parts[i].type = PT_NONE; + } + + } + } + else if(t==PT_FRZW) + { + for(nx=-1; nx<2; nx++) for(ny=-1; ny<2; ny++) if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) continue; - if(parts[r>>8].type==PT_WATR&&5>rand()%70) - { - parts[r>>8].type=PT_FRZW; - } - } - if(parts[i].life==0&&13>rand()%2500) - { - t = parts[i].type=PT_ICEI; - parts[i].ctype=PT_FRZW; - parts[i].temp -= 200.0f; - if(parts[i].temp<0) - parts[i].temp = 0; - } - else if((100-(parts[i].life))>rand()%50000) - { - t = parts[i].type=PT_ICEI; - parts[i].ctype=PT_FRZW; - parts[i].temp -= 200.0f; - if(parts[i].temp<0) - parts[i].temp = 0; - } - } - else if(t==PT_INST) - { - for(nx=-2; nx<3; nx++) + if(parts[r>>8].type==PT_WATR&&5>rand()%70) + { + parts[r>>8].type=PT_FRZW; + } + } + if(parts[i].life==0&&13>rand()%2500) + { + t = parts[i].type=PT_ICEI; + parts[i].ctype=PT_FRZW; + parts[i].temp -= 200.0f; + if(parts[i].temp<0) + parts[i].temp = 0; + } + else if((100-(parts[i].life))>rand()%50000) + { + t = parts[i].type=PT_ICEI; + parts[i].ctype=PT_FRZW; + parts[i].temp -= 200.0f; + if(parts[i].temp<0) + parts[i].temp = 0; + } + } + else if(t==PT_INST) + { + for(nx=-2; nx<3; nx++) for(ny=-2; ny<3; ny++) if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) continue; - else if(parts[r>>8].type==PT_SPRK&&(parts[r>>8].ctype==PT_PSCN)&&(parts[r>>8].life>=3)&&parts[i].life%4==0) - { - flood_parts(x,y,PT_SPRK,PT_INST,-1);//add life - parts[r>>8].type==parts[r>>8].ctype; - } - } - } - else if(t==PT_PRTI) - { - int temprange = 100; - int count =0; - for( temp = 0; temp < MAX_TEMP; temp += temprange) - if(parts[i].temp-73.15>temp&&parts[i].temp-73.15 >8].type==PT_SPRK&&(parts[r>>8].ctype==PT_PSCN)&&(parts[r>>8].life>=3)&&parts[i].life%4==0) + { + flood_parts(x,y,PT_SPRK,PT_INST,-1);//add life + parts[r>>8].type==parts[r>>8].ctype; + } + } + } + else if(t==PT_PRTI) + { + int temprange = 100; + int count =0; + for( temp = 0; temp < MAX_TEMP; temp += temprange) + if(parts[i].temp-73.15>temp&&parts[i].temp-73.15 =0 && y+ny>0 && x+nx>8)>=NPART || !r) continue; - if(parts[r>>8].type==PT_SPRK || (parts[r>>8].type!=PT_PRTI && parts[r>>8].type!=PT_PRTO && (ptypes[parts[r>>8].type].falldown!= 0 || pstates[parts[r>>8].type].state == ST_GAS))) - for( nnx=0;nnx<8;nnx++) - if(!portal[parts[i].tmp][count-1][nnx]) - { - portal[parts[i].tmp][count-1][nnx] = parts[r>>8].type; - portaltemp[parts[i].tmp][count-1][nnx] = parts[r>>8].temp; - if(parts[r>>8].type==PT_SPRK) - parts[r>>8].type = parts[r>>8].ctype; - else - parts[r>>8].type = PT_NONE; - break; - } - } - } - else if(t==PT_PRTO) - { - int temprange = 100; - int count = 0; - for( temp = 0; temp < MAX_TEMP; temp += temprange) - if(parts[i].temp-73.15>temp&&parts[i].temp-73.15 -2; ny--) + if(parts[r>>8].type==PT_SPRK || (parts[r>>8].type!=PT_PRTI && parts[r>>8].type!=PT_PRTO && (ptypes[parts[r>>8].type].falldown!= 0 || pstates[parts[r>>8].type].state == ST_GAS))) + for( nnx=0; nnx<8; nnx++) + if(!portal[parts[i].tmp][count-1][nnx]) + { + portal[parts[i].tmp][count-1][nnx] = parts[r>>8].type; + portaltemp[parts[i].tmp][count-1][nnx] = parts[r>>8].temp; + if(parts[r>>8].type==PT_SPRK) + parts[r>>8].type = parts[r>>8].ctype; + else + parts[r>>8].type = PT_NONE; + break; + } + } + } + else if(t==PT_PRTO) + { + int temprange = 100; + int count = 0; + for( temp = 0; temp < MAX_TEMP; temp += temprange) + if(parts[i].temp-73.15>temp&&parts[i].temp-73.15 -2; ny--) for(nx=1; nx>-2; nx--) if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || r) continue; - if(!r) - { - for( nnx =0 ;nnx<8;nnx++) - { - int randomness = count + rand()%3-1; - if(randomness<1) - randomness=1; - if(randomness>8) - randomness=8; - if(portal[parts[i].tmp][randomness-1][nnx]==PT_SPRK)//todo. make it look better - { - create_part(-1,x+1,y,portal[parts[i].tmp][randomness-1][nnx]); - create_part(-1,x+1,y+1,portal[parts[i].tmp][randomness-1][nnx]); - create_part(-1,x+1,y-1,portal[parts[i].tmp][randomness-1][nnx]); - create_part(-1,x,y-1,portal[parts[i].tmp][randomness-1][nnx]); - create_part(-1,x,y+1,portal[parts[i].tmp][randomness-1][nnx]); - create_part(-1,x-1,y+1,portal[parts[i].tmp][randomness-1][nnx]); - create_part(-1,x-1,y,portal[parts[i].tmp][randomness-1][nnx]); - create_part(-1,x-1,y-1,portal[parts[i].tmp][randomness-1][nnx]); - portal[parts[i].tmp][randomness-1][nnx] = 0; - portaltemp[parts[i].tmp][randomness-1][nnx] = 0; - break; - } - else if(portal[parts[i].tmp][randomness-1][nnx]) - { - create_part(-1,x+nx,y+ny,portal[parts[i].tmp][randomness-1][nnx]); - parts[pmap[y+ny][x+nx]>>8].temp = portaltemp[parts[i].tmp][randomness-1][nnx]; - portal[parts[i].tmp][randomness-1][nnx] = 0; - portaltemp[parts[i].tmp][randomness-1][nnx] = 0; - break; - } - } - } - } - } - else if(t==PT_WIFI) - { - int temprange = 100; - for( temp = 0; temp < MAX_TEMP; temp += temprange) - if(parts[i].temp-73.15>temp&&parts[i].temp-73.15 8) + randomness=8; + if(portal[parts[i].tmp][randomness-1][nnx]==PT_SPRK)//todo. make it look better + { + create_part(-1,x+1,y,portal[parts[i].tmp][randomness-1][nnx]); + create_part(-1,x+1,y+1,portal[parts[i].tmp][randomness-1][nnx]); + create_part(-1,x+1,y-1,portal[parts[i].tmp][randomness-1][nnx]); + create_part(-1,x,y-1,portal[parts[i].tmp][randomness-1][nnx]); + create_part(-1,x,y+1,portal[parts[i].tmp][randomness-1][nnx]); + create_part(-1,x-1,y+1,portal[parts[i].tmp][randomness-1][nnx]); + create_part(-1,x-1,y,portal[parts[i].tmp][randomness-1][nnx]); + create_part(-1,x-1,y-1,portal[parts[i].tmp][randomness-1][nnx]); + portal[parts[i].tmp][randomness-1][nnx] = 0; + portaltemp[parts[i].tmp][randomness-1][nnx] = 0; + break; + } + else if(portal[parts[i].tmp][randomness-1][nnx]) + { + create_part(-1,x+nx,y+ny,portal[parts[i].tmp][randomness-1][nnx]); + parts[pmap[y+ny][x+nx]>>8].temp = portaltemp[parts[i].tmp][randomness-1][nnx]; + portal[parts[i].tmp][randomness-1][nnx] = 0; + portaltemp[parts[i].tmp][randomness-1][nnx] = 0; + break; + } + } + } + } + } + else if(t==PT_WIFI) + { + int temprange = 100; + for( temp = 0; temp < MAX_TEMP; temp += temprange) + if(parts[i].temp-73.15>temp&&parts[i].temp-73.15 =0 && y+ny>0 && x+nx>8)>=NPART || !r) continue; - if(parts[r>>8].type==PT_NSCN&&parts[r>>8].life==0 && wireless[parts[i].tmp][0]) - { - parts[r>>8].type = PT_SPRK; - parts[r>>8].ctype = PT_NSCN; - parts[r>>8].life = 4; - } - else if(parts[r>>8].type==PT_PSCN&&parts[r>>8].life==0 && wireless[parts[i].tmp][0]) - { - parts[r>>8].type = PT_SPRK; - parts[r>>8].ctype = PT_PSCN; - parts[r>>8].life = 4; - } - else if(parts[r>>8].type==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3 && !wireless[parts[i].tmp][0]) - { - //parts[r>>8].type = parts[r>>8].ctype; - wireless[parts[i].tmp][0] = 1; - wireless[parts[i].tmp][1] = 1; - ISWIRE = 1; - } - } - } + if(parts[r>>8].type==PT_NSCN&&parts[r>>8].life==0 && wireless[parts[i].tmp][0]) + { + parts[r>>8].type = PT_SPRK; + parts[r>>8].ctype = PT_NSCN; + parts[r>>8].life = 4; + } + else if(parts[r>>8].type==PT_PSCN&&parts[r>>8].life==0 && wireless[parts[i].tmp][0]) + { + parts[r>>8].type = PT_SPRK; + parts[r>>8].ctype = PT_PSCN; + parts[r>>8].life = 4; + } + else if(parts[r>>8].type==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3 && !wireless[parts[i].tmp][0]) + { + //parts[r>>8].type = parts[r>>8].ctype; + wireless[parts[i].tmp][0] = 1; + wireless[parts[i].tmp][1] = 1; + ISWIRE = 1; + } + } + } else if(t==PT_PCLN) { for(nx=-2; nx<3; nx++) @@ -3247,7 +3240,7 @@ void update_particles_i(pixel *vid, int start, int inc) } } } - else if(t==PT_PUMP) + else if(t==PT_PUMP) { for(nx=-2; nx<3; nx++) for(ny=-2; ny<3; ny++) @@ -3282,9 +3275,9 @@ void update_particles_i(pixel *vid, int start, int inc) } } } - else if(t==PT_SHLD1) - { - for(nx=-1; nx<2; nx++) + else if(t==PT_SHLD1) + { + for(nx=-1; nx<2; nx++) for(ny=-1; ny<2; ny++) if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART || !r) continue; - else if(parts[r>>8].type==PT_SPRK&&parts[i].life==0) - for( nnx=-1;nnx<2;nnx++) - for( nny=-1;nny<2;nny++) - { - if(7>rand()%200&&parts[i].life==0) - { - t = parts[i].type = PT_SHLD2; - parts[i].life = 7; - } - else if(!pmap[y+ny+nny][x+nx+nnx]) - { - create_part(-1,x+nx+nnx,y+ny+nny,PT_SHLD1); - //parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; - } - } - else if(parts[r>>8].type==PT_SHLD3&&4>rand()%10) - { - t = parts[i].type=PT_SHLD2; - parts[i].life = 7; - } - } - } - else if(t==PT_SHLD2) - { - for(nx=-1; nx<2; nx++) + else if(parts[r>>8].type==PT_SPRK&&parts[i].life==0) + for( nnx=-1; nnx<2; nnx++) + for( nny=-1; nny<2; nny++) + { + if(7>rand()%200&&parts[i].life==0) + { + t = parts[i].type = PT_SHLD2; + parts[i].life = 7; + } + else if(!pmap[y+ny+nny][x+nx+nnx]) + { + create_part(-1,x+nx+nnx,y+ny+nny,PT_SHLD1); + //parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; + } + } + else if(parts[r>>8].type==PT_SHLD3&&4>rand()%10) + { + t = parts[i].type=PT_SHLD2; + parts[i].life = 7; + } + } + } + else if(t==PT_SHLD2) + { + for(nx=-1; nx<2; nx++) for(ny=-1; ny<2; ny++) if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART) continue; - if(!r && parts[i].life>0) - create_part(-1,x+nx,y+ny,PT_SHLD1); - if(!r) - continue; - else if(parts[r>>8].type==PT_SPRK&&parts[i].life==0) - for( nnx=-1;nnx<2;nnx++) - for( nny=-1;nny<2;nny++) - { - if(3>rand()%200&&parts[i].life==0) - { - t = parts[i].type = PT_SHLD3; - parts[i].life = 7; - } - else if(!pmap[y+ny+nny][x+nx+nnx]) - { - create_part(-1,x+nx+nnx,y+ny+nny,PT_SHLD1); - parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; - } - } - else if(parts[r>>8].type==PT_SHLD4&&4>rand()%10) - { - t = parts[i].type=PT_SHLD3; - parts[i].life = 7; - } - } - } - else if(t==PT_SHLD3) - { - for(nx=-1; nx<2; nx++) + if(!r && parts[i].life>0) + create_part(-1,x+nx,y+ny,PT_SHLD1); + if(!r) + continue; + else if(parts[r>>8].type==PT_SPRK&&parts[i].life==0) + for( nnx=-1; nnx<2; nnx++) + for( nny=-1; nny<2; nny++) + { + if(3>rand()%200&&parts[i].life==0) + { + t = parts[i].type = PT_SHLD3; + parts[i].life = 7; + } + else if(!pmap[y+ny+nny][x+nx+nnx]) + { + create_part(-1,x+nx+nnx,y+ny+nny,PT_SHLD1); + parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; + } + } + else if(parts[r>>8].type==PT_SHLD4&&4>rand()%10) + { + t = parts[i].type=PT_SHLD3; + parts[i].life = 7; + } + } + } + else if(t==PT_SHLD3) + { + for(nx=-1; nx<2; nx++) for(ny=-1; ny<2; ny++) if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART) continue; - if(!r) - { - if(1>rand()%2500) - { - create_part(-1,x+nx,y+ny,PT_SHLD1); - parts[pmap[y+ny][x+nx]>>8].life=7; - t = parts[i].type = PT_SHLD2; - } - else - continue; - - } - if(parts[r>>8].type==PT_SHLD1 && parts[i].life>3) - { - parts[r>>8].type = PT_SHLD2; - parts[r>>8].life=7; - } - else if(parts[r>>8].type==PT_SPRK&&parts[i].life==0) - for( nnx=-1;nnx<2;nnx++) - for( nny=-1;nny<2;nny++) - { - if(2>rand()%3000&&parts[i].life==0) - { - t = parts[i].type = PT_SHLD4; - parts[i].life = 7; - } - else if(!pmap[y+ny+nny][x+nx+nnx]) - { - create_part(-1,x+nx+nnx,y+ny+nny,PT_SHLD1); - parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; - } - } - } - } - else if(t==PT_SHLD4) - { - for(nx=-1; nx<2; nx++) + if(!r) + { + if(1>rand()%2500) + { + create_part(-1,x+nx,y+ny,PT_SHLD1); + parts[pmap[y+ny][x+nx]>>8].life=7; + t = parts[i].type = PT_SHLD2; + } + else + continue; + + } + if(parts[r>>8].type==PT_SHLD1 && parts[i].life>3) + { + parts[r>>8].type = PT_SHLD2; + parts[r>>8].life=7; + } + else if(parts[r>>8].type==PT_SPRK&&parts[i].life==0) + for( nnx=-1; nnx<2; nnx++) + for( nny=-1; nny<2; nny++) + { + if(2>rand()%3000&&parts[i].life==0) + { + t = parts[i].type = PT_SHLD4; + parts[i].life = 7; + } + else if(!pmap[y+ny+nny][x+nx+nnx]) + { + create_part(-1,x+nx+nnx,y+ny+nny,PT_SHLD1); + parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; + } + } + } + } + else if(t==PT_SHLD4) + { + for(nx=-1; nx<2; nx++) for(ny=-1; ny<2; ny++) if(x+nx>=0 && y+ny>0 && x+nx>8)>=NPART) continue; - if(!r) - { - if(1>rand()%5500) - { - create_part(-1,x+nx,y+ny,PT_SHLD1); - parts[pmap[y+ny][x+nx]>>8].life=7; - t = parts[i].type = PT_SHLD2; - } - else - continue; - - } - if(parts[r>>8].type==PT_SHLD2 && parts[i].life>3) - { - parts[r>>8].type = PT_SHLD3; - parts[r>>8].life = 7; - } - else if(parts[r>>8].type==PT_SPRK&&parts[i].life==0) - for( nnx=-1;nnx<2;nnx++) - for( nny=-1;nny<2;nny++) - { - if(!pmap[y+ny+nny][x+nx+nnx]) - { - create_part(-1,x+nx+nnx,y+ny+nny,PT_SHLD1); - parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; - } - } - } - } + if(!r) + { + if(1>rand()%5500) + { + create_part(-1,x+nx,y+ny,PT_SHLD1); + parts[pmap[y+ny][x+nx]>>8].life=7; + t = parts[i].type = PT_SHLD2; + } + else + continue; + + } + if(parts[r>>8].type==PT_SHLD2 && parts[i].life>3) + { + parts[r>>8].type = PT_SHLD3; + parts[r>>8].life = 7; + } + else if(parts[r>>8].type==PT_SPRK&&parts[i].life==0) + for( nnx=-1; nnx<2; nnx++) + for( nny=-1; nny<2; nny++) + { + if(!pmap[y+ny+nny][x+nx+nnx]) + { + create_part(-1,x+nx+nnx,y+ny+nny,PT_SHLD1); + parts[pmap[y+ny+nny][x+nx+nnx]>>8].life=7; + } + } + } + } else if(t==PT_AMTR) { for(nx=-1; nx<2; nx++) @@ -3451,7 +3444,7 @@ void update_particles_i(pixel *vid, int start, int inc) { parts[i].type = PT_NONE; kill_part(i); - goto killed; + goto killed; } parts[r>>8].life = 0; parts[r>>8].type = PT_NONE; @@ -3517,11 +3510,11 @@ void update_particles_i(pixel *vid, int start, int inc) } pv[y/CELL][x/CELL] += 20; kill_part(i); - goto killed; + goto killed; } else if(parts[i].tmp>=3) { if(parts[i].life<=0) { kill_part(i); - goto killed; + goto killed; } } } @@ -3570,11 +3563,11 @@ void update_particles_i(pixel *vid, int start, int inc) parts[i].life = 10; } } - else if(parts[r>>8].type == PT_SPRK && parts[r>>8].ctype==PT_SWCH && parts[i].life<10&&parts_avg(i,r>>8,PT_INSL)!=PT_INSL) - { - parts[r>>8].type = parts[r>>8].ctype; - parts[r>>8].life = 9; - } + else if(parts[r>>8].type == PT_SPRK && parts[r>>8].ctype==PT_SWCH && parts[i].life<10&&parts_avg(i,r>>8,PT_INSL)!=PT_INSL) + { + parts[r>>8].type = parts[r>>8].ctype; + parts[r>>8].life = 9; + } } } if(t==PT_SWCH) @@ -4174,7 +4167,7 @@ killed: isplayer = 1; } - if(t==PT_STKM2) + if(t==PT_STKM2) { float dt = 0.9;///(FPSB*FPSB); //Delta time in square //Tempirature handling @@ -4564,24 +4557,24 @@ killed: isplayer2 = 1; } - if(t==PT_SPAWN) - { - if(death==1) - { - playerspawn = create_part(-1,x,y,PT_STKM); - isplayer = 1; - } - death = 0; - } - if(t==PT_SPAWN2) - { - if(death2==1) - { - player2spawn = create_part(-1,x,y,PT_STKM2); - isplayer2 = 1; - } - death2 = 0; - } + if(t==PT_SPAWN) + { + if(death==1) + { + playerspawn = create_part(-1,x,y,PT_STKM); + isplayer = 1; + } + death = 0; + } + if(t==PT_SPAWN2) + { + if(death2==1) + { + player2spawn = create_part(-1,x,y,PT_STKM2); + isplayer2 = 1; + } + death2 = 0; + } if(t==PT_CLNE) { if(!parts[i].ctype) @@ -4592,10 +4585,10 @@ killed: x+nx77&&parts[i].ctype<77+NGOL) { + else if(parts[i].ctype>77&&parts[i].ctype<77+NGOL) { for(nx=-1; nx<2; nx++) { for(ny=-1; ny<2; ny++) { create_part(-1, x+nx, y+ny, parts[i].ctype); } } - }else { + } else { create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); } } @@ -4899,14 +4892,14 @@ killed: continue; } } else { - if(t!=PT_NEUT) - kill_part(i); + if(t!=PT_NEUT) + kill_part(i); continue; } if(!parts[i].ctype) { - if(t!=PT_NEUT) - kill_part(i); + if(t!=PT_NEUT) + kill_part(i); continue; } } @@ -4975,7 +4968,7 @@ void update_particles(pixel *vid) if(t!=PT_NEUT || (pmap[y][x]&0xFF)!=PT_GLAS) pmap[y][x] = t|(i<<8); } - NUM_PARTS ++; + NUM_PARTS ++; } else { @@ -5486,8 +5479,8 @@ void update_particles(pixel *vid) void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert) { - //TODO: MSCC doesn't like arrays who's size is determined at runtime. - #if !(defined(WIN32) && !defined(__GNUC__)) + //TODO: MSCC doesn't like arrays who's size is determined at runtime. +#if !(defined(WIN32) && !defined(__GNUC__)) int cx = 0; int cy = 0; unsigned tpmap[area_h][area_w]; @@ -5498,57 +5491,57 @@ void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert) { for(cx=0; cx>8)<=NPART&&rtpmap[cy][cx]) - { - parts[rtpmap[(int)(cy+0.5f)][(int)(cx+0.5f)]>>8].x = area_x +cx; - parts[rtpmap[(int)(cy+0.5f)][(int)(cx+0.5f)]>>8].y = area_y +cy; - } - bmap[(area_y+cy)/CELL][(area_x+cx)/CELL] = rtbmap[cy/CELL][cx/CELL]; - } - } + if(area_x + cx>8)<=NPART&&rtpmap[cy][cx]) + { + parts[rtpmap[(int)(cy+0.5f)][(int)(cx+0.5f)]>>8].x = area_x +cx; + parts[rtpmap[(int)(cy+0.5f)][(int)(cx+0.5f)]>>8].y = area_y +cy; + } + bmap[(area_y+cy)/CELL][(area_x+cx)/CELL] = rtbmap[cy/CELL][cx/CELL]; + } + } } #endif } @@ -5592,21 +5585,21 @@ int flood_parts(int x, int y, int c, int cm, int bm) int x1, x2, dy = (c=UI_WALLSTART&&c<=UI_WALLSTART+UI_WALLCOUNT) { c = c-100; } if(cm==-1) { - if(c==0) + if(c==0) { cm = pmap[y][x]&0xFF; if(!cm) return 0; - if(REPLACE_MODE && cm!=SLALT) - return 0; + if(REPLACE_MODE && cm!=SLALT) + return 0; } else cm = 0; @@ -5633,17 +5626,17 @@ int flood_parts(int x, int y, int c, int cm, int bm) while(x1>=CELL) { if((pmap[y][x1-1]&0xFF)!=cm || bmap[y/CELL][(x1-1)/CELL]!=bm) - { - break; - } + { + 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, co, cm, bm); - 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, co, cm, bm); - - } - - 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, co, cm, bm); + 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<0 || - (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, co, cm, bm); + 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, co, cm, bm); - } + } + + 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, co, cm, bm)) - return 0; - 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, co, cm, bm)) + return 0; + if(y=0 && i+u=0 && j+v=0 && i+u=0 && j+v