diff options
| author | victorfisac <[email protected]> | 2017-05-02 14:18:11 +0200 |
|---|---|---|
| committer | victorfisac <[email protected]> | 2017-05-02 14:18:11 +0200 |
| commit | db0cfa935f52a2557e6e3dfddab341917cb1eb14 (patch) | |
| tree | 15e9782c639571d57030420f69c6b8f7c4a69f50 /games | |
| parent | 8849a4c7526ee6a321df9393dd69d0b29820311a (diff) | |
| parent | d593bd0081ea2dcafe3182ffc874882b5b7110b4 (diff) | |
| download | raylib-db0cfa935f52a2557e6e3dfddab341917cb1eb14.tar.gz raylib-db0cfa935f52a2557e6e3dfddab341917cb1eb14.zip | |
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'games')
63 files changed, 7483 insertions, 6518 deletions
diff --git a/games/arkanoid.lua b/games/arkanoid.lua deleted file mode 100644 index 2dc59247..00000000 --- a/games/arkanoid.lua +++ /dev/null @@ -1,297 +0,0 @@ ---[[ - - raylib - sample game: arkanoid - - Sample game Marc Palau and Ramon Santamaria - - This game has been created using raylib v1.3 (www.raylib.com) - raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) - - Copyright (c) 2015 Ramon Santamaria (@raysan5) - - Translated to Lua by Ghassan Al-Mashareqa ([email protected]) - ---]] - ------------------------------------------------------------------------------------- --- Some Defines ------------------------------------------------------------------------------------- -PLAYER_MAX_LIFE = 5 -LINES_OF_BRICKS = 5 -BRICKS_PER_LINE = 20 - ------------------------------------------------------------------------------------- --- Types and Structures Definition ------------------------------------------------------------------------------------- - -GameScreen = { LOGO = 0, TITLE = 1, GAMEPLAY = 2, ENDING = 3 } - -function Player() - return { position = Vector2(0,0), size = Vector2(0,0), life = 0 } -end - -function Ball() - return { position = Vector2(0,0), speed = Vector2(0,0), radius = 0, active = false } -end - -function Brick() - return { position = Vector2(0,0), active = false } -end - --------------------------------------------------------------------------------------- --- Global Variables Declaration --------------------------------------------------------------------------------------- -screenWidth = 800; -screenHeight = 450; - -framesCounter = 0; -gameOver = false; -pause = false; - -player = Player() -ball = Ball() -brick = {}--[LINES_OF_BRICKS][BRICKS_PER_LINE]; -for i = 0, LINES_OF_BRICKS-1 do - brick[i] = {} - for j = 0, BRICKS_PER_LINE-1 do - brick[i][j] = Brick() - end -end -brickSize = Vector2(0,0) - - --------------------------------------------------------------------------------------- --- Module Functions Definitions (local) --------------------------------------------------------------------------------------- - --- Initialize game variables -function InitGame() - - brickSize = Vector2(GetScreenWidth()/BRICKS_PER_LINE, 40) - - -- Initialize player - player.position = Vector2(screenWidth/2, screenHeight*7/8) - player.size = Vector2(screenWidth/10, 20) - player.life = PLAYER_MAX_LIFE; - - -- Initialize ball - ball.position = Vector2(screenWidth/2, screenHeight*7/8 - 30) - ball.speed = Vector2(0, 0) - ball.radius = 7; - ball.active = false; - - -- Initialize bricks - local initialDownPosition = 50; - - for i = 0, LINES_OF_BRICKS-1 do - for j = 0, BRICKS_PER_LINE-1 do - brick[i][j].position = Vector2(j*brickSize.x + brickSize.x/2, i*brickSize.y + initialDownPosition) - brick[i][j].active = true; - end - end -end - --- Update game (one frame) -function UpdateGame() - - if (not gameOver) then - if (IsKeyPressed(KEY.P)) then pause = not pause; end - - if (not pause) then - -- Player movement - if (IsKeyDown(KEY.LEFT)) then player.position.x = player.position.x - 5; end - if ((player.position.x - player.size.x/2) <= 0) then player.position.x = player.size.x/2; end - if (IsKeyDown(KEY.RIGHT)) then player.position.x = player.position.x + 5; end - if ((player.position.x + player.size.x/2) >= screenWidth) then player.position.x = screenWidth - player.size.x/2; end - - -- Launch ball - if (not ball.active) then - if (IsKeyPressed(KEY.SPACE)) then - ball.active = true; - ball.speed = Vector2(0, -5) - end - end - - UpdateBall(); - - -- Game over logic - if (player.life <= 0) then - gameOver = true; - else - gameOver = true; - - for i = 0, LINES_OF_BRICKS-1 do - for j = 0, BRICKS_PER_LINE-1 do - if (brick[i][j].active) then gameOver = false; end - end - end - end - end - else - if (IsKeyPressed(KEY.ENTER)) then - InitGame(); - gameOver = false; - end - end - -end - --- Draw game (one frame) -function DrawGame() - - BeginDrawing(); - - ClearBackground(RAYWHITE); - - if (not gameOver) then - -- Draw player bar - DrawRectangle(player.position.x - player.size.x/2, player.position.y - player.size.y/2, player.size.x, player.size.y, BLACK); - - -- Draw player lives - for i = 0, player.life-1 do - DrawRectangle(20 + 40*i, screenHeight - 30, 35, 10, LIGHTGRAY); - end - - -- Draw ball - DrawCircleV(ball.position, ball.radius, MAROON); - - -- Draw bricks - for i = 0, LINES_OF_BRICKS-1 do - for j = 0, BRICKS_PER_LINE-1 do - if (brick[i][j].active) then - if ((i + j) % 2 == 0) then - DrawRectangle(brick[i][j].position.x - brickSize.x/2, brick[i][j].position.y - brickSize.y/2, brickSize.x, brickSize.y, GRAY); - else - DrawRectangle(brick[i][j].position.x - brickSize.x/2, brick[i][j].position.y - brickSize.y/2, brickSize.x, brickSize.y, DARKGRAY); - end - end - end - end - - if (pause) then - DrawText("GAME PAUSED", screenWidth/2 - MeasureText("GAME PAUSED", 40)/2, screenHeight/2 - 40, 40, GRAY); - end - else - DrawText("PRESS [ENTER] TO PLAY AGAIN", GetScreenWidth()/2 - MeasureText("PRESS [ENTER] TO PLAY AGAIN", 20)/2, GetScreenHeight()/2 - 50, 20, GRAY); - end - - EndDrawing(); -end - --- Unload game variables -function UnloadGame() - -- TODO: Unload all dynamic loaded data (textures, sounds, models...) -end - --- Update and Draw (one frame) -function UpdateDrawFrame() - UpdateGame(); - DrawGame(); -end - ----------------------------------------------------------------------------------------- --- Additional module functions ----------------------------------------------------------------------------------------- -function UpdateBall() - -- Update position - if (ball.active) then - ball.position.x = ball.position.x + ball.speed.x; - ball.position.y = ball.position.y + ball.speed.y; - else - ball.position = Vector2(player.position.x, screenHeight*7/8 - 30); - end - - -- Bounce in x - if (((ball.position.x + ball.radius) >= screenWidth) or ((ball.position.x - ball.radius) <= 0)) - then - ball.speed.x = ball.speed.x * -1; - end - - -- Bounce in y - if ((ball.position.y - ball.radius) <= 0) then - ball.speed.y = ball.speed.y * -1; - end - - -- Ball reaches bottom of the screen - if ((ball.position.y + ball.radius) >= screenHeight) then - ball.speed = Vector2(0, 0); - ball.active = false; - - player.life = player.life - 1; - end - - -- Collision logic: ball vs player - if CheckCollisionCircleRec(ball.position, ball.radius, - Rectangle( - player.position.x - player.size.x/2, - player.position.y - player.size.y/2, - player.size.x, - player.size.y)) then - if (ball.speed.y > 0) then - ball.speed.y = ball.speed.y * -1; - ball.speed.x = (ball.position.x - player.position.x)/(player.size.x/2)*5; - end - end - - -- Collision logic: ball vs bricks - for i = 0,LINES_OF_BRICKS-1 do - for j = 0,BRICKS_PER_LINE-1 do - if (brick[i][j].active) then - -- Hit below - if (((ball.position.y - ball.radius) <= (brick[i][j].position.y + brickSize.y/2)) and - ((ball.position.y - ball.radius) > (brick[i][j].position.y + brickSize.y/2 + ball.speed.y)) and - ((math.abs(ball.position.x - brick[i][j].position.x)) < (brickSize.x/2 + ball.radius*2/3)) and (ball.speed.y < 0)) - then - brick[i][j].active = false; - ball.speed.y = ball.speed.y * -1; - -- Hit above - elseif (((ball.position.y + ball.radius) >= (brick[i][j].position.y - brickSize.y/2)) and - ((ball.position.y + ball.radius) < (brick[i][j].position.y - brickSize.y/2 + ball.speed.y)) and - ((math.abs(ball.position.x - brick[i][j].position.x)) < (brickSize.x/2 + ball.radius*2/3)) and (ball.speed.y > 0)) - then - brick[i][j].active = false; - ball.speed.y = ball.speed.y * -1; - -- Hit left - elseif (((ball.position.x + ball.radius) >= (brick[i][j].position.x - brickSize.x/2)) and - ((ball.position.x + ball.radius) < (brick[i][j].position.x - brickSize.x/2 + ball.speed.x)) and - ((math.abs(ball.position.y - brick[i][j].position.y)) < (brickSize.y/2 + ball.radius*2/3)) and (ball.speed.x > 0)) - then - brick[i][j].active = false; - ball.speed.x = ball.speed.x * -1; - -- Hit right - elseif (((ball.position.x - ball.radius) <= (brick[i][j].position.x + brickSize.x/2)) and - ((ball.position.x - ball.radius) > (brick[i][j].position.x + brickSize.x/2 + ball.speed.x)) and - ((math.abs(ball.position.y - brick[i][j].position.y)) < (brickSize.y/2 + ball.radius*2/3)) and (ball.speed.x < 0)) - then - brick[i][j].active = false; - ball.speed.x = ball.speed.x * -1; - end - end - end - end -end - -InitWindow(screenWidth, screenHeight, "sample game: arkanoid"); - -InitGame(); - -SetTargetFPS(60); ----------------------------------------------------------------------------------------- - --- Main game loop -while (not WindowShouldClose()) -- Detect window close button or ESC key -do - -- Update - ------------------------------------------------------------------------------------ - UpdateGame(); - ------------------------------------------------------------------------------------ - - -- Draw - ------------------------------------------------------------------------------------ - DrawGame(); - ------------------------------------------------------------------------------------ -end - -UnloadGame(); -- Unload loaded data (textures, sounds, models...) - -CloseWindow(); -- Close window and OpenGL context diff --git a/games/drturtle/makefile b/games/drturtle/makefile index ab7fd206..89821929 100644 --- a/games/drturtle/makefile +++ b/games/drturtle/makefile @@ -1,17 +1,17 @@ #************************************************************************************************** # -# raylib - makefile to compile Dr.Turtle game +# raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten) # -# Copyright (c) 2014 Ramon Santamaria (@raysan5) -# -# This software is provided "as-is", without any express or implied warranty. In no event +# Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) +# +# This software is provided "as-is", without any express or implied warranty. In no event # will the authors be held liable for any damages arising from the use of this software. # -# Permission is granted to anyone to use this software for any purpose, including commercial +# Permission is granted to anyone to use this software for any purpose, including commercial # applications, and to alter it and redistribute it freely, subject to the following restrictions: # -# 1. The origin of this software must not be misrepresented; you must not claim that you -# wrote the original software. If you use this software in a product, an acknowledgment +# 1. The origin of this software must not be misrepresented; you must not claim that you +# wrote the original software. If you use this software in a product, an acknowledgment # in the product documentation would be appreciated but is not required. # # 2. Altered source versions must be plainly marked as such, and must not be misrepresented @@ -21,10 +21,23 @@ # #************************************************************************************************** -# define raylib platform if not defined (by default, compile for RPI) -# Other possible platform: PLATFORM_DESKTOP +.PHONY: all clean + +# define raylib platform to compile for +# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB +# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop() PLATFORM ?= PLATFORM_DESKTOP +# define NO to use OpenAL Soft as static library (shared by default) +SHARED_OPENAL ?= NO + +ifeq ($(PLATFORM),PLATFORM_WEB) + SHARED_OPENAL = NO +endif + +# define raylib directory for include and library +RAYLIB_PATH ?= C:\raylib\raylib + # determine PLATFORM_OS in case PLATFORM_DESKTOP selected ifeq ($(PLATFORM),PLATFORM_DESKTOP) # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows @@ -60,48 +73,96 @@ endif endif # define compiler flags: -# -O2 defines optimization level -# -Wall turns on most, but not all, compiler warnings -# -std=c99 use standard C from 1999 revision +# -O2 defines optimization level +# -Og enable debugging +# -s strip unnecessary data from build +# -Wall turns on most, but not all, compiler warnings +# -std=c99 defines C language mode (standard C from 1999 revision) +# -std=gnu99 defines C language mode (GNU C from 1999 revision) +# -fgnu89-inline declaring inline functions support (GCC optimized) +# -Wno-missing-braces ignore invalid warning (GCC bug 53119) +# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + CFLAGS = -O2 -s -Wall -std=c99 + endif + ifeq ($(PLATFORM_OS),LINUX) + CFLAGS = -O2 -s -Wall -std=c99 -D_DEFAULT_SOURCE + endif + ifeq ($(PLATFORM_OS),OSX) + CFLAGS = -O2 -s -Wall -std=c99 + endif +endif +ifeq ($(PLATFORM),PLATFORM_WEB) + CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 -s TOTAL_MEMORY=33554432 --profiling --preload-file resources + # -O2 # if used, also set --memory-init-file 0 + # --memory-init-file 0 # to avoid an external memory initialization code file (.mem) + # -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing + # -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + # --preload-file file.res # embbed file.res resource into .data file +endif ifeq ($(PLATFORM),PLATFORM_RPI) - CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline -else - CFLAGS = -O2 -Wall -std=c99 + CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline +endif +#CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes + +# define raylib release directory for compiled library +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/win32/mingw32 + endif + ifeq ($(PLATFORM_OS),LINUX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/linux + endif + ifeq ($(PLATFORM_OS),OSX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/osx + endif endif ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 --preload-file resources -s ALLOW_MEMORY_GROWTH=1 --shell-file ../../templates/web_shell/shell.html - #-s ASSERTIONS=1 --preload-file resources - #-s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing - #-s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/html5 +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/rpi endif # define any directories containing required header files +INCLUDES = -I. -I$(RAYLIB_RELEASE) -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external + ifeq ($(PLATFORM),PLATFORM_RPI) - INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include + INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries headers + # GLFW3 + INCLUDES += -I$(RAYLIB_PATH)/src/external/glfw3/include + # OpenAL Soft + INCLUDES += -I$(RAYLIB_PATH)/src/external/openal_soft/include + endif + ifeq ($(PLATFORM_OS),LINUX) + # you may optionally create this directory and install raylib + # and related headers there. Edit ../src/Makefile appropriately. + INCLUDES += -I/usr/local/include/raylib + endif + ifeq ($(PLATFORM_OS),OSX) + # additional directories for MacOS + endif endif # define library paths containing required libs +LFLAGS = -L. -L$(RAYLIB_RELEASE) -L$(RAYLIB_PATH)/src + ifeq ($(PLATFORM),PLATFORM_RPI) - LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW - LFLAGS += -L../../external/glew/lib/$(LIBPATH) + LFLAGS += -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries to link with + # GLFW3 + LFLAGS += -L$(RAYLIB_PATH)/src/external/glfw3/lib/$(LIBPATH) + # OpenAL Soft + LFLAGS += -L$(RAYLIB_PATH)/src/external/openal_soft/lib/$(LIBPATH) endif endif @@ -111,20 +172,27 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl - # on XWindow could require also below libraries, just uncomment + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -lpthread -ldl + # on XWindow requires also below libraries LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) - # libraries for OS X 10.9 desktop compiling + # libraries for OSX 10.9 desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAL -framework Cocoa else # libraries for Windows desktop compiling # NOTE: GLFW3 and OpenAL Soft libraries should be installed - LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32 + LIBS = -lraylib -lglfw3 -lopengl32 -lgdi32 + # if static OpenAL Soft required, define the corresponding libs + ifeq ($(SHARED_OPENAL),NO) + LIBS += -lopenal32 -lwinmm + CFLAGS += -Wl,-allow-multiple-definition + else + LIBS += -lopenal32dll + endif endif endif endif @@ -134,30 +202,31 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lbcm_host -lopenal endif ifeq ($(PLATFORM),PLATFORM_WEB) - LIBS = ../../src/libraylib.bc + # NOTE: Set the correct path to libraylib.bc + LIBS = $(RAYLIB_RELEASE)/libraylib.bc endif # define additional parameters and flags for windows ifeq ($(PLATFORM_OS),WINDOWS) # resources file contains windows exe icon # -Wl,--subsystem,windows hides the console window - WINFLAGS = ../../src/resources -Wl,--subsystem,windows + WINFLAGS = $(RAYLIB_PATH)/src/resources -Wl,--subsystem,windows endif ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html + WEB_SHELL = --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html endif # define all screen object files required SCREENS = \ -# typing 'make' will invoke the first target entry in the file, -# in this case, the 'default' target entry is advance_game +# typing 'make' will invoke the default target entry default: drturtle -# compile template - advance_game +# compile program drturtle: drturtle_final_web.c $(SCREENS) - $(CC) -o $@$(EXT) $< $(SCREENS) $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $^ $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # clean everything clean: @@ -167,10 +236,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) rm -f *.o else ifeq ($(PLATFORM_OS),LINUX) - find . -type f -executable -delete - rm -f *.o + find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f else - del *.o *.exe + del *.o *.exe /s endif endif endif diff --git a/games/just_do/makefile b/games/just_do/makefile index 6bb973c0..6dc096fb 100644 --- a/games/just_do/makefile +++ b/games/just_do/makefile @@ -1,19 +1,17 @@ #************************************************************************************************** # -# raylib - Advance Game +# raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten) # -# makefile to compile advance game for desktop platforms, Raspberry Pi and HTML5 (emscripten) +# Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) # -# Copyright (c) 2014 Ramon Santamaria (@raysan5) -# -# This software is provided "as-is", without any express or implied warranty. In no event +# This software is provided "as-is", without any express or implied warranty. In no event # will the authors be held liable for any damages arising from the use of this software. # -# Permission is granted to anyone to use this software for any purpose, including commercial +# Permission is granted to anyone to use this software for any purpose, including commercial # applications, and to alter it and redistribute it freely, subject to the following restrictions: # -# 1. The origin of this software must not be misrepresented; you must not claim that you -# wrote the original software. If you use this software in a product, an acknowledgment +# 1. The origin of this software must not be misrepresented; you must not claim that you +# wrote the original software. If you use this software in a product, an acknowledgment # in the product documentation would be appreciated but is not required. # # 2. Altered source versions must be plainly marked as such, and must not be misrepresented @@ -23,11 +21,23 @@ # #************************************************************************************************** +.PHONY: all clean + # define raylib platform to compile for # possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB # WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop() PLATFORM ?= PLATFORM_DESKTOP +# define NO to use OpenAL Soft as static library (shared by default) +SHARED_OPENAL ?= NO + +ifeq ($(PLATFORM),PLATFORM_WEB) + SHARED_OPENAL = NO +endif + +# define raylib directory for include and library +RAYLIB_PATH ?= C:\raylib\raylib + # determine PLATFORM_OS in case PLATFORM_DESKTOP selected ifeq ($(PLATFORM),PLATFORM_DESKTOP) # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows @@ -63,50 +73,96 @@ endif endif # define compiler flags: -# -O2 defines optimization level -# -Wall turns on most, but not all, compiler warnings -# -std=c99 use standard C from 1999 revision -ifeq ($(PLATFORM),PLATFORM_RPI) - CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline -else - CFLAGS = -O2 -Wall -std=c99 +# -O2 defines optimization level +# -Og enable debugging +# -s strip unnecessary data from build +# -Wall turns on most, but not all, compiler warnings +# -std=c99 defines C language mode (standard C from 1999 revision) +# -std=gnu99 defines C language mode (GNU C from 1999 revision) +# -fgnu89-inline declaring inline functions support (GCC optimized) +# -Wno-missing-braces ignore invalid warning (GCC bug 53119) +# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + CFLAGS = -O2 -s -Wall -std=c99 + endif + ifeq ($(PLATFORM_OS),LINUX) + CFLAGS = -O2 -s -Wall -std=c99 -D_DEFAULT_SOURCE + endif + ifeq ($(PLATFORM_OS),OSX) + CFLAGS = -O2 -s -Wall -std=c99 + endif endif ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 --shell-file ../../templates/web_shell/shell.html - #-s ASSERTIONS=1 --preload-file resources - #-s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing - #-s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 --profiling --preload-file resources + # -O2 # if used, also set --memory-init-file 0 + # --memory-init-file 0 # to avoid an external memory initialization code file (.mem) + # -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing + # -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + # --preload-file file.res # embbed file.res resource into .data file +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline endif - #CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes +# define raylib release directory for compiled library +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/win32/mingw32 + endif + ifeq ($(PLATFORM_OS),LINUX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/linux + endif + ifeq ($(PLATFORM_OS),OSX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/osx + endif +endif +ifeq ($(PLATFORM),PLATFORM_WEB) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/html5 +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/rpi +endif + # define any directories containing required header files +INCLUDES = -I. -I$(RAYLIB_RELEASE) -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external + ifeq ($(PLATFORM),PLATFORM_RPI) - INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -I../../../src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include + INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries headers + # GLFW3 + INCLUDES += -I$(RAYLIB_PATH)/src/external/glfw3/include + # OpenAL Soft + INCLUDES += -I$(RAYLIB_PATH)/src/external/openal_soft/include + endif + ifeq ($(PLATFORM_OS),LINUX) + # you may optionally create this directory and install raylib + # and related headers there. Edit ../src/Makefile appropriately. + INCLUDES += -I/usr/local/include/raylib + endif + ifeq ($(PLATFORM_OS),OSX) + # additional directories for MacOS + endif endif # define library paths containing required libs +LFLAGS = -L. -L$(RAYLIB_RELEASE) -L$(RAYLIB_PATH)/src + ifeq ($(PLATFORM),PLATFORM_RPI) - LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -L../../../src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW - LFLAGS += -L../../external/glew/lib/$(LIBPATH) + LFLAGS += -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries to link with + # GLFW3 + LFLAGS += -L$(RAYLIB_PATH)/src/external/glfw3/lib/$(LIBPATH) + # OpenAL Soft + LFLAGS += -L$(RAYLIB_PATH)/src/external/openal_soft/lib/$(LIBPATH) endif endif @@ -116,20 +172,27 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl - # on XWindow could require also below libraries, just uncomment + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -lpthread -ldl + # on XWindow requires also below libraries LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) - # libraries for OS X 10.9 desktop compiling + # libraries for OSX 10.9 desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAL -framework Cocoa else # libraries for Windows desktop compiling # NOTE: GLFW3 and OpenAL Soft libraries should be installed - LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32 + LIBS = -lraylib -lglfw3 -lopengl32 -lgdi32 + # if static OpenAL Soft required, define the corresponding libs + ifeq ($(SHARED_OPENAL),NO) + LIBS += -lopenal32 -lwinmm + CFLAGS += -Wl,-allow-multiple-definition + else + LIBS += -lopenal32dll + endif endif endif endif @@ -139,18 +202,20 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lbcm_host -lopenal endif ifeq ($(PLATFORM),PLATFORM_WEB) - LIBS = ../../src/libraylib.bc + # NOTE: Set the correct path to libraylib.bc + LIBS = $(RAYLIB_RELEASE)/libraylib.bc endif # define additional parameters and flags for windows ifeq ($(PLATFORM_OS),WINDOWS) # resources file contains windows exe icon # -Wl,--subsystem,windows hides the console window - WINFLAGS = ../../src/resources -Wl,--subsystem,windows + WINFLAGS = $(RAYLIB_PATH)/src/resources -Wl,--subsystem,windows endif ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html + WEB_SHELL = --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html endif # define all screen object files required @@ -167,14 +232,13 @@ SCREENS = \ screens/screen_level08.o \ screens/screen_level09.o \ -# typing 'make' will invoke the first target entry in the file, -# in this case, the 'default' target entry is just_do +# typing 'make' will invoke the default target entry default: just_do -# compile just_do +# compile program just_do: just_do.c $(SCREENS) - $(CC) -o $@$(EXT) $< $(SCREENS) $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) - + $(CC) -o $@$(EXT) $^ $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) + # compile screen LOGO screens/screen_logo.o: screens/screen_logo.c $(CC) -c $< -o $@ $(CFLAGS) $(INCLUDES) -D$(PLATFORM) @@ -227,10 +291,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) rm -f *.o else ifeq ($(PLATFORM_OS),LINUX) - find . -type f -executable -delete - rm -f *.o + find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f else - del *.o *.exe + del *.o *.exe /s endif endif endif diff --git a/games/just_do/screens/screen_level02.c b/games/just_do/screens/screen_level02.c index a2d5e562..584edcef 100644 --- a/games/just_do/screens/screen_level02.c +++ b/games/just_do/screens/screen_level02.c @@ -154,17 +154,4 @@ void UnloadLevel02Screen(void) int FinishLevel02Screen(void) { return finishScreen; -} - -// Calculate distance between two points -float Vector2Distance(Vector2 v1, Vector2 v2) -{ - float result; - - float dx = v2.x - v1.x; - float dy = v2.y - v1.y; - - result = sqrt(dx*dx + dy*dy); - - return result; }
\ No newline at end of file diff --git a/games/koala_seasons/Makefile b/games/koala_seasons/Makefile new file mode 100644 index 00000000..c9eee6ff --- /dev/null +++ b/games/koala_seasons/Makefile @@ -0,0 +1,282 @@ +#************************************************************************************************** +# +# raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten) +# +# Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) +# +# This software is provided "as-is", without any express or implied warranty. In no event +# will the authors be held liable for any damages arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, including commercial +# applications, and to alter it and redistribute it freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not claim that you +# wrote the original software. If you use this software in a product, an acknowledgment +# in the product documentation would be appreciated but is not required. +# +# 2. Altered source versions must be plainly marked as such, and must not be misrepresented +# as being the original software. +# +# 3. This notice may not be removed or altered from any source distribution. +# +#************************************************************************************************** + +.PHONY: all clean + +# define raylib platform to compile for +# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB +# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop() +PLATFORM ?= PLATFORM_DESKTOP + +# define NO to use OpenAL Soft as static library (shared by default) +SHARED_OPENAL ?= NO + +ifeq ($(PLATFORM),PLATFORM_WEB) + SHARED_OPENAL = NO +endif + +# define raylib directory for include and library +RAYLIB_PATH ?= C:\raylib\raylib + +# determine PLATFORM_OS in case PLATFORM_DESKTOP selected +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows + ifeq ($(OS),Windows_NT) + PLATFORM_OS=WINDOWS + LIBPATH=win32 + else + UNAMEOS:=$(shell uname) + ifeq ($(UNAMEOS),Linux) + PLATFORM_OS=LINUX + LIBPATH=linux + else + ifeq ($(UNAMEOS),Darwin) + PLATFORM_OS=OSX + LIBPATH=osx + endif + endif + endif +endif + +# define compiler: gcc for C program, define as g++ for C++ +ifeq ($(PLATFORM),PLATFORM_WEB) + # define emscripten compiler + CC = emcc +else +ifeq ($(PLATFORM_OS),OSX) + # define llvm compiler for mac + CC = clang +else + # define default gcc compiler + CC = gcc +endif +endif + +# define compiler flags: +# -O2 defines optimization level +# -Og enable debugging +# -s strip unnecessary data from build +# -Wall turns on most, but not all, compiler warnings +# -std=c99 defines C language mode (standard C from 1999 revision) +# -std=gnu99 defines C language mode (GNU C from 1999 revision) +# -fgnu89-inline declaring inline functions support (GCC optimized) +# -Wno-missing-braces ignore invalid warning (GCC bug 53119) +# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + CFLAGS = -O2 -s -Wall -std=c99 + endif + ifeq ($(PLATFORM_OS),LINUX) + CFLAGS = -O2 -s -Wall -std=c99 -D_DEFAULT_SOURCE + endif + ifeq ($(PLATFORM_OS),OSX) + CFLAGS = -O2 -s -Wall -std=c99 + endif +endif +ifeq ($(PLATFORM),PLATFORM_WEB) + CFLAGS = -O1 -Wall -std=c99 -DPLATFORM_WEB -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 -s TOTAL_MEMORY=67108864 --profiling --preload-file resources + # -O2 # if used, also set --memory-init-file 0 + # --memory-init-file 0 # to avoid an external memory initialization code file (.mem) + # -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing + # -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + # --preload-file file.res # embbed file.res resource into .data file +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline +endif +#CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes + +# define raylib release directory for compiled library +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/win32/mingw32 + endif + ifeq ($(PLATFORM_OS),LINUX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/linux + endif + ifeq ($(PLATFORM_OS),OSX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/osx + endif +endif +ifeq ($(PLATFORM),PLATFORM_WEB) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/html5 +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/rpi +endif + +# define any directories containing required header files +INCLUDES = -I. -I$(RAYLIB_RELEASE) -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external + +ifeq ($(PLATFORM),PLATFORM_RPI) + INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries headers + # GLFW3 + INCLUDES += -I$(RAYLIB_PATH)/src/external/glfw3/include + # OpenAL Soft + INCLUDES += -I$(RAYLIB_PATH)/src/external/openal_soft/include + endif + ifeq ($(PLATFORM_OS),LINUX) + # you may optionally create this directory and install raylib + # and related headers there. Edit ../src/Makefile appropriately. + INCLUDES += -I/usr/local/include/raylib + endif + ifeq ($(PLATFORM_OS),OSX) + # additional directories for MacOS + endif +endif + +# define library paths containing required libs +LFLAGS = -L. -L$(RAYLIB_RELEASE) -L$(RAYLIB_PATH)/src + +ifeq ($(PLATFORM),PLATFORM_RPI) + LFLAGS += -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries to link with + # GLFW3 + LFLAGS += -L$(RAYLIB_PATH)/src/external/glfw3/lib/$(LIBPATH) + # OpenAL Soft + LFLAGS += -L$(RAYLIB_PATH)/src/external/openal_soft/lib/$(LIBPATH) + endif +endif + +# define any libraries to link into executable +# if you want to link libraries (libname.so or libname.a), use the -lname +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),LINUX) + # libraries for Debian GNU/Linux desktop compiling + # requires the following packages: + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -lpthread -ldl + # on XWindow requires also below libraries + LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + else + ifeq ($(PLATFORM_OS),OSX) + # libraries for OS X 10.9 desktop compiling + # requires the following packages: + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAL -framework Cocoa + else + # libraries for Windows desktop compiling + # NOTE: GLFW3 and OpenAL Soft libraries should be installed + LIBS = -lraylib -lglfw3 -lopengl32 -lgdi32 + # if static OpenAL Soft required, define the corresponding libs + ifeq ($(SHARED_OPENAL),NO) + LIBS += -lopenal32 -lwinmm + CFLAGS += -Wl,-allow-multiple-definition + else + LIBS += -lopenal32dll + endif + endif + endif +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + # libraries for Raspberry Pi compiling + # NOTE: OpenAL Soft library should be installed (libopenal1 package) + LIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lbcm_host -lopenal +endif +ifeq ($(PLATFORM),PLATFORM_WEB) + # NOTE: Set the correct path to libraylib.bc + LIBS = $(RAYLIB_RELEASE)/libraylib.bc +endif + +# define additional parameters and flags for windows +ifeq ($(PLATFORM_OS),WINDOWS) + # resources file contains windows exe icon + # -Wl,--subsystem,windows hides the console window + WINFLAGS = $(RAYLIB_PATH)/src/resources + #-Wl,--subsystem,windows +endif + +ifeq ($(PLATFORM),PLATFORM_WEB) + EXT = .html + WEB_SHELL = --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html +endif + +# define all screen object files required +SCREENS = \ + screens/screen_logo.o \ + screens/screen_title.o \ + screens/screen_gameplay.o \ + screens/screen_ending.o \ + +# typing 'make' will invoke the default target entry +default: koala_seasons + +# compile program +koala_seasons: koala_seasons.c $(SCREENS) + $(CC) -o $@$(EXT) $^ $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) + +# compile screen LOGO +screens/screen_logo.o: screens/screen_logo.c + $(CC) -c $< -o $@ $(CFLAGS) $(INCLUDES) -D$(PLATFORM) + +# compile screen TITLE +screens/screen_title.o: screens/screen_title.c + $(CC) -c $< -o $@ $(CFLAGS) $(INCLUDES) -D$(PLATFORM) + +# compile screen OPTIONS +screens/screen_options.o: screens/screen_options.c + $(CC) -c $< -o $@ $(CFLAGS) $(INCLUDES) -D$(PLATFORM) + +# compile screen GAMEPLAY +screens/screen_gameplay.o: screens/screen_gameplay.c + $(CC) -c $< -o $@ $(CFLAGS) $(INCLUDES) -D$(PLATFORM) + +# compile screen ENDING +screens/screen_ending.o: screens/screen_ending.c + $(CC) -c $< -o $@ $(CFLAGS) $(INCLUDES) -D$(PLATFORM) + +# clean everything +clean: +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),OSX) + find . -type f -perm +ugo+x -delete + rm -f *.o + else + ifeq ($(PLATFORM_OS),LINUX) + find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f + else + del *.o *.exe /s + endif + endif +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + find . -type f -executable -delete + rm -f *.o +endif +ifeq ($(PLATFORM),PLATFORM_WEB) + del *.o *.html *.js +endif + @echo Cleaning done + +# instead of defining every module one by one, we can define a pattern +# this pattern below will automatically compile every module defined on $(OBJS) +#%.exe : %.c +# $(CC) -o $@ $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) diff --git a/games/koala_seasons/koala_seasons.c b/games/koala_seasons/koala_seasons.c new file mode 100644 index 00000000..47311ca0 --- /dev/null +++ b/games/koala_seasons/koala_seasons.c @@ -0,0 +1,281 @@ +/******************************************************************************************* +* +* raylib - Koala Seasons game +* +* Koala Seasons is a runner, you must survive as long as possible jumping from tree to tree +* Ready to start the adventure? How long can you survive? +* +* This game has been created using raylib 1.5 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib.h" +#include "screens/screens.h" // NOTE: Defines currentScreen + +#if defined(PLATFORM_WEB) + #include <emscripten/emscripten.h> +#endif + +//---------------------------------------------------------------------------------- +// Global Variables Definition (local to this module) +//---------------------------------------------------------------------------------- +static float transAlpha = 0; +static bool onTransition = false; +static bool transFadeOut = false; +static int transFromScreen = -1; +static int transToScreen = -1; +static int framesCounter = 0; + +static Music music; + +//---------------------------------------------------------------------------------- +// Local Functions Declaration +//---------------------------------------------------------------------------------- +void TransitionToScreen(int screen); +void UpdateTransition(void); +void DrawTransition(void); + +void UpdateDrawFrame(void); // Update and Draw one frame + +//---------------------------------------------------------------------------------- +// Main entry point +//---------------------------------------------------------------------------------- +#if defined(PLATFORM_ANDROID) +void android_main(struct android_app *app) +#else +int main(void) +#endif +{ + // Initialization + //--------------------------------------------------------- + const int screenWidth = 1280; + const int screenHeight = 720; + const char windowTitle[30] = "KOALA SEASONS"; + + //ShowLogo(); + //SetConfigFlags(FLAG_FULLSCREEN_MODE); + +#if defined(PLATFORM_ANDROID) + InitWindow(screenWidth, screenHeight, app); +#else + InitWindow(screenWidth, screenHeight, windowTitle); +#endif + + // Load global data here (assets that must be available in all screens, i.e. fonts) + font = LoadSpriteFont("resources/graphics/mainfont.png"); + + atlas01 = LoadTexture("resources/graphics/atlas01.png"); + atlas02 = LoadTexture("resources/graphics/atlas02.png"); + +#if defined(PLATFORM_WEB) || defined(PLATFORM_RPI) || defined(PLATFORM_ANDROID) + colorBlend = LoadShader("resources/shaders/glsl100/base.vs", "resources/shaders/glsl100/blend_color.fs"); +#else + colorBlend = LoadShader("resources/shaders/glsl330/base.vs", "resources/shaders/glsl330/blend_color.fs"); +#endif + + InitAudioDevice(); + + // Load sounds data + fxJump = LoadSound("resources/audio/jump.ogg"); + fxDash = LoadSound("resources/audio/dash.ogg"); + fxEatLeaves = LoadSound("resources/audio/eat_leaves.ogg"); + fxHitResin = LoadSound("resources/audio/resin_hit.ogg"); + fxWind = LoadSound("resources/audio/wind_sound.ogg"); + fxDieSnake = LoadSound("resources/audio/snake_die.ogg"); + fxDieDingo = LoadSound("resources/audio/dingo_die.ogg"); + fxDieOwl = LoadSound("resources/audio/owl_die.ogg"); + + + music = LoadMusicStream("resources/audio/jngl.xm"); + PlayMusicStream(music); + SetMusicVolume(music, 1.0f); + + // Define and init first screen + // NOTE: currentScreen is defined in screens.h as a global variable + currentScreen = TITLE; + + InitLogoScreen(); + //InitOptionsScreen(); + InitTitleScreen(); + InitGameplayScreen(); + InitEndingScreen(); + +#if defined(PLATFORM_WEB) + emscripten_set_main_loop(UpdateDrawFrame, 0, 1); +#else + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!WindowShouldClose()) UpdateDrawFrame(); +#endif + + // De-Initialization + //-------------------------------------------------------------------------------------- + UnloadEndingScreen(); + UnloadTitleScreen(); + UnloadGameplayScreen(); + UnloadLogoScreen(); + + UnloadTexture(atlas01); + UnloadTexture(atlas02); + UnloadSpriteFont(font); + + UnloadShader(colorBlend); // Unload color overlay blending shader + + UnloadSound(fxJump); + UnloadSound(fxDash); + UnloadSound(fxEatLeaves); + UnloadSound(fxHitResin); + UnloadSound(fxWind); + UnloadSound(fxDieSnake); + UnloadSound(fxDieDingo); + UnloadSound(fxDieOwl); + + UnloadMusicStream(music); + + CloseAudioDevice(); // Close audio device + + CloseWindow(); // Close window and OpenGL context + //-------------------------------------------------------------------------------------- +#if !defined(PLATFORM_ANDROID) + return 0; +#endif +} + +void TransitionToScreen(int screen) +{ + onTransition = true; + transFromScreen = currentScreen; + transToScreen = screen; +} + +void UpdateTransition(void) +{ + if (!transFadeOut) + { + transAlpha += 0.05f; + + if (transAlpha >= 1.0) + { + transAlpha = 1.0; + currentScreen = transToScreen; + transFadeOut = true; + framesCounter = 0; + } + } + else // Transition fade out logic + { + transAlpha -= 0.05f; + + if (transAlpha <= 0) + { + transAlpha = 0; + transFadeOut = false; + onTransition = false; + transFromScreen = -1; + transToScreen = -1; + } + } +} + +void DrawTransition(void) +{ + DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(BLACK, transAlpha)); +} + +// Update and Draw one frame +void UpdateDrawFrame(void) +{ + // Update + //---------------------------------------------------------------------------------- + if (!onTransition) + { + switch (currentScreen) + { + case LOGO: + { + UpdateLogoScreen(); + + if (FinishLogoScreen()) TransitionToScreen(TITLE); + + } break; + case TITLE: + { + UpdateTitleScreen(); + + // NOTE: FinishTitleScreen() return an int defining the screen to jump to + if (FinishTitleScreen() == 1) + { + UnloadTitleScreen(); + //currentScreen = OPTIONS; + //InitOptionsScreen(); + } + else if (FinishTitleScreen() == 2) + { + UnloadTitleScreen(); + + InitGameplayScreen(); + TransitionToScreen(GAMEPLAY); + } + } break; + case GAMEPLAY: + { + UpdateGameplayScreen(); + + if (FinishGameplayScreen()) + { + UnloadGameplayScreen(); + + InitEndingScreen(); + TransitionToScreen(ENDING); + } + } break; + case ENDING: + { + UpdateEndingScreen(); + + if (FinishEndingScreen()) + { + UnloadEndingScreen(); + + InitGameplayScreen(); + TransitionToScreen(GAMEPLAY); + } + } break; + default: break; + } + } + else UpdateTransition(); + + UpdateMusicStream(music); + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + + ClearBackground(WHITE); + + switch (currentScreen) + { + case LOGO: DrawLogoScreen(); break; + case TITLE: DrawTitleScreen(); break; + case GAMEPLAY: DrawGameplayScreen(); break; + case ENDING: DrawEndingScreen(); break; + default: break; + } + + if (onTransition) DrawTransition(); + + DrawFPS(20, GetScreenHeight() - 30); + + DrawRectangle(GetScreenWidth() - 200, GetScreenHeight() - 50, 200, 40, Fade(WHITE, 0.6f)); + DrawText("ALPHA VERSION", GetScreenWidth() - 180, GetScreenHeight() - 40, 20, DARKGRAY); + + EndDrawing(); + //---------------------------------------------------------------------------------- +}
\ No newline at end of file diff --git a/games/koala_seasons/resources/audio/dash.ogg b/games/koala_seasons/resources/audio/dash.ogg Binary files differnew file mode 100644 index 00000000..ef1089bc --- /dev/null +++ b/games/koala_seasons/resources/audio/dash.ogg diff --git a/games/koala_seasons/resources/audio/dingo_die.ogg b/games/koala_seasons/resources/audio/dingo_die.ogg Binary files differnew file mode 100644 index 00000000..230bfca9 --- /dev/null +++ b/games/koala_seasons/resources/audio/dingo_die.ogg diff --git a/games/koala_seasons/resources/audio/eat_leaves.ogg b/games/koala_seasons/resources/audio/eat_leaves.ogg Binary files differnew file mode 100644 index 00000000..acdc71f2 --- /dev/null +++ b/games/koala_seasons/resources/audio/eat_leaves.ogg diff --git a/games/koala_seasons/resources/audio/jngl.xm b/games/koala_seasons/resources/audio/jngl.xm Binary files differnew file mode 100644 index 00000000..9136e750 --- /dev/null +++ b/games/koala_seasons/resources/audio/jngl.xm diff --git a/games/koala_seasons/resources/audio/jump.ogg b/games/koala_seasons/resources/audio/jump.ogg Binary files differnew file mode 100644 index 00000000..a7ccbacc --- /dev/null +++ b/games/koala_seasons/resources/audio/jump.ogg diff --git a/games/koala_seasons/resources/audio/owl_die.ogg b/games/koala_seasons/resources/audio/owl_die.ogg Binary files differnew file mode 100644 index 00000000..dc9fa3d7 --- /dev/null +++ b/games/koala_seasons/resources/audio/owl_die.ogg diff --git a/games/koala_seasons/resources/audio/resin_hit.ogg b/games/koala_seasons/resources/audio/resin_hit.ogg Binary files differnew file mode 100644 index 00000000..6dc1ba5e --- /dev/null +++ b/games/koala_seasons/resources/audio/resin_hit.ogg diff --git a/games/koala_seasons/resources/audio/snake_die.ogg b/games/koala_seasons/resources/audio/snake_die.ogg Binary files differnew file mode 100644 index 00000000..efadb1fa --- /dev/null +++ b/games/koala_seasons/resources/audio/snake_die.ogg diff --git a/games/koala_seasons/resources/audio/wind_sound.ogg b/games/koala_seasons/resources/audio/wind_sound.ogg Binary files differnew file mode 100644 index 00000000..16ec4f63 --- /dev/null +++ b/games/koala_seasons/resources/audio/wind_sound.ogg diff --git a/games/koala_seasons/resources/graphics/atlas01.png b/games/koala_seasons/resources/graphics/atlas01.png Binary files differnew file mode 100644 index 00000000..5b59446a --- /dev/null +++ b/games/koala_seasons/resources/graphics/atlas01.png diff --git a/games/koala_seasons/resources/graphics/atlas02.png b/games/koala_seasons/resources/graphics/atlas02.png Binary files differnew file mode 100644 index 00000000..c9c96d2d --- /dev/null +++ b/games/koala_seasons/resources/graphics/atlas02.png diff --git a/games/koala_seasons/resources/graphics/mainfont.png b/games/koala_seasons/resources/graphics/mainfont.png Binary files differnew file mode 100644 index 00000000..796b79be --- /dev/null +++ b/games/koala_seasons/resources/graphics/mainfont.png diff --git a/games/koala_seasons/resources/shaders/glsl100/base.vs b/games/koala_seasons/resources/shaders/glsl100/base.vs new file mode 100644 index 00000000..b05d3463 --- /dev/null +++ b/games/koala_seasons/resources/shaders/glsl100/base.vs @@ -0,0 +1,25 @@ +#version 100 + +// Input vertex attributes +attribute vec3 vertexPosition; +attribute vec2 vertexTexCoord; +attribute vec4 vertexColor; + +// Input uniform values +uniform mat4 mvpMatrix; + +// Output vertex attributes (to fragment shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// NOTE: Add here your custom variables + +void main() +{ + // Send vertex attributes to fragment shader + fragTexCoord = vertexTexCoord; + fragColor = vertexColor; + + // Calculate final vertex position + gl_Position = mvpMatrix*vec4(vertexPosition, 1.0); +}
\ No newline at end of file diff --git a/games/koala_seasons/resources/shaders/glsl100/blend_color.fs b/games/koala_seasons/resources/shaders/glsl100/blend_color.fs new file mode 100644 index 00000000..ae23f941 --- /dev/null +++ b/games/koala_seasons/resources/shaders/glsl100/blend_color.fs @@ -0,0 +1,63 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +vec3 BlendOverlay(vec3 base, vec3 blend) +{ + float red; + float green; + float blue; + + if (base.r < 0.5) red = 2.0*base.r*blend.r; + else red = 1.0 - 2.0*(1.0 - base.r)*(1.0 - blend.r); + + if (base.g < 0.5) green = 2.0*base.g*blend.g; + else green = 1.0 - 2.0 *(1.0 - base.g)*(1.0 - blend.g); + + if (base.b < 0.5) blue = 2.0*base.b*blend.b; + else blue = 1.0 - 2.0 *(1.0 - base.b)*(1.0 - blend.b); + + return vec3(red, green, blue); +} + +void main() +{ + // Blending Overlay + vec4 base = texture2D(texture0, fragTexCoord); + + // No blending shader -> 64 FPS (1280x720) + //gl_FragColor = base*fragColor; + + // Option01 -> 50 FPS (1280x720), 200 FPS (640x360) + vec3 final = BlendOverlay(base.rgb, fragColor.rgb); + gl_FragColor = vec4(final.rgb, base.a*fragColor.a); + + // Option02 (Doesn't work) -> 63 FPS (1280x720) + //float luminance = (base.r*0.2126) + (base.g*0.7152) + (base.b*0.0722); + //gl_FragColor = vec4(tint*luminance, base.a); + + // Option03 (no branches, precalculated ifs) -> 28 FPS (1280x720) + /* + vec4 blend = fragColor; + //if (base.a == 0.0) discard; // No improvement + vec3 br = clamp(sign(base.rgb - vec3(0.5)), vec3(0.0), vec3(1.0)); + vec3 multiply = 2.0 * base.rgb * blend.rgb; + vec3 screen = vec3(1.0) - 2.0 * (vec3(1.0) - base.rgb)*(vec3(1.0) - blend.rgb); + vec3 overlay = mix(multiply, screen, br); + vec3 finalColor = mix(base.rgb, overlay, blend.a); + gl_FragColor = vec4(finalColor, base.a); + */ + + // Option04 (no branches, using built-in functions) -> 38 FPS (1280x720) + //gl_FragColor = vec4(mix(1 - 2*(1 - base.rgb)*(1 - tint), 2*base.rgb*tint, step(0.5, base.rgb)), base.a); +} diff --git a/games/koala_seasons/resources/shaders/glsl330/base.vs b/games/koala_seasons/resources/shaders/glsl330/base.vs new file mode 100644 index 00000000..395cee1b --- /dev/null +++ b/games/koala_seasons/resources/shaders/glsl330/base.vs @@ -0,0 +1,25 @@ +#version 330 + +// Input vertex attributes +in vec3 vertexPosition; +in vec2 vertexTexCoord; +in vec4 vertexColor; + +// Input uniform values +uniform mat4 mvpMatrix; + +// Output vertex attributes (to fragment shader) +out vec2 fragTexCoord; +out vec4 fragColor; + +// NOTE: Add here your custom variables + +void main() +{ + // Send vertex attributes to fragment shader + fragTexCoord = vertexTexCoord; + fragColor = vertexColor; + + // Calculate final vertex position + gl_Position = mvpMatrix*vec4(vertexPosition, 1.0); +}
\ No newline at end of file diff --git a/games/koala_seasons/resources/shaders/glsl330/blend_color.fs b/games/koala_seasons/resources/shaders/glsl330/blend_color.fs new file mode 100644 index 00000000..de3fd2bc --- /dev/null +++ b/games/koala_seasons/resources/shaders/glsl330/blend_color.fs @@ -0,0 +1,64 @@ +#version 330 + +// Input vertex attributes (from vertex shader) +in vec2 fragTexCoord; +in vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// Output fragment color +out vec4 finalColor; + +// NOTE: Add here your custom variables + +vec3 BlendOverlay(vec3 base, vec3 blend) +{ + float red; + float green; + float blue; + + if (base.r < 0.5) red = 2.0*base.r*blend.r; + else red = 1.0 - 2.0*(1.0 - base.r)*(1.0 - blend.r); + + if (base.g < 0.5) green = 2.0*base.g*blend.g; + else green = 1.0 - 2.0 *(1.0 - base.g)*(1.0 - blend.g); + + if (base.b < 0.5) blue = 2.0*base.b*blend.b; + else blue = 1.0 - 2.0 *(1.0 - base.b)*(1.0 - blend.b); + + return vec3(red, green, blue); +} + +void main() +{ + // Blending Overlay + vec4 base = texture2D(texture0, fragTexCoord); + + // No blending shader -> 64 FPS (1280x720) + //gl_FragColor = base*tintColor; + + // Option01 -> 50 FPS (1280x720), 200 FPS (640x360) + vec3 final = BlendOverlay(base.rgb, fragColor.rgb); + finalColor = vec4(final.rgb, base.a*fragColor.a); + + // Option02 (Doesn't work) -> 63 FPS (1280x720) + //float luminance = (base.r*0.2126) + (base.g*0.7152) + (base.b*0.0722); + //gl_FragColor = vec4(tintColor.rgb*luminance, base.a); + + // Option03 (no branches, precalculated ifs) -> 28 FPS (1280x720) + /* + vec4 blend = tintColor; + //if (base.a == 0.0) discard; // No improvement + vec3 br = clamp(sign(base.rgb - vec3(0.5)), vec3(0.0), vec3(1.0)); + vec3 multiply = 2.0 * base.rgb * blend.rgb; + vec3 screen = vec3(1.0) - 2.0 * (vec3(1.0) - base.rgb)*(vec3(1.0) - blend.rgb); + vec3 overlay = mix(multiply, screen, br); + vec3 finalColor = mix(base.rgb, overlay, blend.a); + gl_FragColor = vec4(finalColor, base.a); + */ + + // Option04 (no branches, using built-in functions) -> 38 FPS (1280x720) + //gl_FragColor = vec4(mix(1 - 2*(1 - base.rgb)*(1 - tintColor.rgb), 2*base.rgb*tintColor.rgb, step(0.5, base.rgb)), base.a); +} diff --git a/games/koala_seasons/screens/atlas01.h b/games/koala_seasons/screens/atlas01.h new file mode 100644 index 00000000..0c963d4c --- /dev/null +++ b/games/koala_seasons/screens/atlas01.h @@ -0,0 +1,86 @@ +#define ending_button_replay (Rectangle){ 974, 1403, 123, 123 } +#define ending_button_share (Rectangle){ 954, 1528, 123, 123 } +#define ending_button_shop (Rectangle){ 958, 1653, 123, 123 } +#define ending_button_trophy (Rectangle){ 1479, 386, 123, 123 } +#define ending_goals_board (Rectangle){ 2, 254, 761, 422 } +#define ending_goals_check_plate (Rectangle){ 316, 2006, 36, 34 } +#define ending_goals_check_v (Rectangle){ 1727, 239, 50, 42 } +#define ending_goals_check_x (Rectangle){ 354, 1885, 42, 51 } +#define ending_goals_icon_death (Rectangle){ 1382, 516, 60, 60 } +#define ending_goals_icon_leaves (Rectangle){ 1444, 516, 60, 60 } +#define ending_goals_icon_special (Rectangle){ 1506, 511, 60, 60 } +#define ending_goals_icon_time (Rectangle){ 1568, 511, 60, 60 } +#define ending_paint_back (Rectangle){ 765, 254, 258, 305 } +#define ending_paint_frame (Rectangle){ 103, 1028, 334, 393 } +#define ending_paint_koalabee (Rectangle){ 439, 1060, 219, 216 } +#define ending_paint_koaladingo (Rectangle){ 439, 1278, 219, 216 } +#define ending_paint_koalaeagle (Rectangle){ 405, 1496, 219, 216 } +#define ending_paint_koalafire (Rectangle){ 771, 643, 219, 216 } +#define ending_paint_koalageneric (Rectangle){ 516, 678, 253, 250 } +#define ending_paint_koalaowl (Rectangle){ 661, 1790, 100, 81 } +#define ending_paint_koalasnake (Rectangle){ 774, 861, 219, 216 } +#define ending_plate_frame (Rectangle){ 2, 2, 1052, 250 } +#define ending_plate_headbee (Rectangle){ 1318, 516, 62, 60 } +#define ending_plate_headdingo (Rectangle){ 1481, 182, 56, 70 } +#define ending_plate_headeagle (Rectangle){ 1974, 116, 39, 48 } +#define ending_plate_headowl (Rectangle){ 226, 1885, 68, 52 } +#define ending_plate_headsnake (Rectangle){ 65, 1968, 46, 67 } +#define ending_score_enemyicon (Rectangle){ 661, 1697, 113, 91 } +#define ending_score_frame (Rectangle){ 419, 1714, 119, 123 } +#define ending_score_frameback (Rectangle){ 540, 1714, 119, 123 } +#define ending_score_leavesicon (Rectangle){ 1387, 254, 135, 130 } +#define ending_score_planklarge (Rectangle){ 1056, 132, 525, 48 } +#define ending_score_planksmall (Rectangle){ 1583, 116, 389, 48 } +#define ending_score_seasonicon (Rectangle){ 925, 1265, 135, 136 } +#define ending_score_seasonneedle (Rectangle){ 2032, 2, 12, 45 } +#define gameplay_countdown_1 (Rectangle){ 660, 1302, 110, 216 } +#define gameplay_countdown_2 (Rectangle){ 2, 1750, 110, 216 } +#define gameplay_countdown_3 (Rectangle){ 114, 1728, 110, 216 } +#define gameplay_enemy_bee (Rectangle){ 1025, 486, 250, 60 } +#define gameplay_enemy_dingo (Rectangle){ 755, 1079, 240, 150 } +#define gameplay_enemy_eagle (Rectangle){ 1570, 2, 460, 80 } +#define gameplay_enemy_eagle_death (Rectangle){ 1327, 386, 150, 128 } +#define gameplay_enemy_owl (Rectangle){ 765, 561, 240, 80 } +#define gameplay_enemy_snake (Rectangle){ 1025, 254, 360, 128 } +#define gameplay_fx_eaglealert (Rectangle){ 660, 1060, 93, 240 } +#define gameplay_fx_lightraymid (Rectangle){ 2, 1028, 54, 710 } +#define gameplay_gui_leafcounter_base (Rectangle){ 626, 1520, 178, 175 } +#define gameplay_gui_leafcounter_cell (Rectangle){ 972, 1231, 32, 32 } +#define gameplay_gui_leafcounter_glow (Rectangle){ 806, 1519, 146, 146 } +#define gameplay_gui_leafcounter_pulsel (Rectangle){ 226, 1728, 157, 155 } +#define gameplay_gui_seasonsclock_base (Rectangle){ 772, 1265, 151, 150 } +#define gameplay_gui_seasonsclock_disc (Rectangle){ 103, 1423, 300, 303 } +#define gameplay_koala_dash (Rectangle){ 1079, 1528, 100, 100 } +#define gameplay_koala_die (Rectangle){ 1083, 1630, 100, 100 } +#define gameplay_koala_fly (Rectangle){ 114, 1946, 200, 100 } +#define gameplay_koala_idle (Rectangle){ 1025, 384, 300, 100 } +#define gameplay_koala_jump (Rectangle){ 1083, 1732, 100, 100 } +#define gameplay_koala_menu (Rectangle){ 806, 1667, 150, 100 } +#define gameplay_koala_transform (Rectangle){ 772, 1417, 200, 100 } +#define gameplay_props_burnttree (Rectangle){ 58, 1028, 43, 720 } +#define gameplay_props_fire_spritesheet (Rectangle){ 516, 930, 256, 128 } +#define gameplay_props_ice_sprite (Rectangle){ 385, 1728, 32, 128 } +#define gameplay_props_leaf_big (Rectangle){ 1857, 166, 64, 64 } +#define gameplay_props_leaf_lil (Rectangle){ 1923, 166, 64, 64 } +#define gameplay_props_leaf_mid (Rectangle){ 316, 1940, 64, 64 } +#define gameplay_props_resin_sprite (Rectangle){ 405, 1423, 32, 64 } +#define gameplay_props_whirlwind_spritesheet (Rectangle){ 1056, 2, 512, 128 } +#define particle_dandelion (Rectangle){ 354, 2006, 32, 32 } +#define particle_ecualyptusflower (Rectangle){ 1989, 166, 32, 32 } +#define particle_ecualyptusleaf (Rectangle){ 1989, 200, 32, 32 } +#define particle_hit (Rectangle){ 296, 1885, 56, 53 } +#define particle_icecrystal (Rectangle){ 419, 1839, 32, 32 } +#define particle_planetreeleaf (Rectangle){ 453, 1839, 32, 32 } +#define particle_waterdrop (Rectangle){ 487, 1839, 32, 32 } +#define title_facebook (Rectangle){ 1539, 182, 92, 92 } +#define title_googleplay (Rectangle){ 1524, 276, 92, 92 } +#define title_music_off (Rectangle){ 1790, 166, 65, 66 } +#define title_music_on (Rectangle){ 1277, 486, 39, 66 } +#define title_speaker_off (Rectangle){ 2, 1968, 61, 71 } +#define title_speaker_on (Rectangle){ 1727, 166, 61, 71 } +#define title_textsnow01 (Rectangle){ 1570, 84, 439, 30 } +#define title_textsnow02 (Rectangle){ 1056, 182, 423, 48 } +#define title_textsnow03 (Rectangle){ 755, 1231, 215, 32 } +#define title_textsnow04 (Rectangle){ 1056, 232, 414, 20 } +#define title_titletext (Rectangle){ 2, 678, 512, 348 } +#define title_twitter (Rectangle){ 1633, 166, 92, 92 } diff --git a/games/koala_seasons/screens/atlas02.h b/games/koala_seasons/screens/atlas02.h new file mode 100644 index 00000000..dfae117a --- /dev/null +++ b/games/koala_seasons/screens/atlas02.h @@ -0,0 +1,40 @@ +#define background_fog02 (Rectangle){ 644, 2, 500, 311 } +#define background_transformation (Rectangle){ 2, 364, 500, 400 } +#define ending_background (Rectangle){ 2, 766, 256, 256 } +#define gameplay_back_fx_lightraymid (Rectangle){ 260, 766, 14, 216 } +#define gameplay_back_ground00 (Rectangle){ 1146, 2, 640, 77 } +#define gameplay_back_ground01 (Rectangle){ 1146, 81, 640, 77 } +#define gameplay_back_ground02 (Rectangle){ 1146, 160, 640, 77 } +#define gameplay_back_ground03 (Rectangle){ 1146, 239, 640, 77 } +#define gameplay_back_tree01_layer01 (Rectangle){ 1833, 353, 28, 335 } +#define gameplay_back_tree01_layer02 (Rectangle){ 1998, 338, 28, 335 } +#define gameplay_back_tree01_layer03 (Rectangle){ 660, 315, 28, 335 } +#define gameplay_back_tree02_layer01 (Rectangle){ 690, 315, 26, 332 } +#define gameplay_back_tree02_layer02 (Rectangle){ 718, 315, 26, 332 } +#define gameplay_back_tree02_layer03 (Rectangle){ 746, 315, 26, 332 } +#define gameplay_back_tree03_layer01 (Rectangle){ 2028, 338, 15, 329 } +#define gameplay_back_tree03_layer02 (Rectangle){ 774, 315, 15, 329 } +#define gameplay_back_tree03_layer03 (Rectangle){ 791, 315, 15, 329 } +#define gameplay_back_tree04_layer01 (Rectangle){ 1860, 2, 38, 334 } +#define gameplay_back_tree04_layer02 (Rectangle){ 1900, 2, 38, 334 } +#define gameplay_back_tree04_layer03 (Rectangle){ 1940, 2, 38, 334 } +#define gameplay_back_tree05_layer01 (Rectangle){ 504, 364, 32, 349 } +#define gameplay_back_tree05_layer02 (Rectangle){ 538, 364, 32, 349 } +#define gameplay_back_tree05_layer03 (Rectangle){ 572, 364, 32, 349 } +#define gameplay_back_tree06_layer01 (Rectangle){ 1980, 2, 31, 334 } +#define gameplay_back_tree06_layer02 (Rectangle){ 2013, 2, 31, 334 } +#define gameplay_back_tree06_layer03 (Rectangle){ 1863, 338, 31, 334 } +#define gameplay_back_tree07_layer01 (Rectangle){ 606, 364, 25, 349 } +#define gameplay_back_tree07_layer02 (Rectangle){ 633, 364, 25, 349 } +#define gameplay_back_tree07_layer03 (Rectangle){ 1833, 2, 25, 349 } +#define gameplay_back_tree08_layer01 (Rectangle){ 1896, 338, 32, 331 } +#define gameplay_back_tree08_layer02 (Rectangle){ 1930, 338, 32, 331 } +#define gameplay_back_tree08_layer03 (Rectangle){ 1964, 338, 32, 331 } +#define gameplay_background (Rectangle){ 2, 2, 640, 360 } +#define gameplay_props_owl_branch (Rectangle){ 808, 349, 36, 24 } +#define gameplay_props_tree (Rectangle){ 1788, 2, 43, 720 } +#define particle_dandelion_bw (Rectangle){ 504, 715, 32, 32 } +#define particle_ecualyptusflower_bw (Rectangle){ 808, 315, 32, 32 } +#define particle_icecrystal_bw (Rectangle){ 276, 766, 32, 32 } +#define particle_planetreeleaf_bw (Rectangle){ 538, 715, 32, 32 } +#define particle_waterdrop_bw (Rectangle){ 842, 315, 32, 32 } diff --git a/games/koala_seasons/screens/screen_ending.c b/games/koala_seasons/screens/screen_ending.c new file mode 100644 index 00000000..b345a3b2 --- /dev/null +++ b/games/koala_seasons/screens/screen_ending.c @@ -0,0 +1,530 @@ +/********************************************************************************************** +* +* raylib - Koala Seasons game +* +* Ending Screen Functions Definitions (Init, Update, Draw, Unload) +* +* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5) +* +* This software is provided "as-is", without any express or implied warranty. In no event +* will the authors be held liable for any damages arising from the use of this software. +* +* Permission is granted to anyone to use this software for any purpose, including commercial +* applications, and to alter it and redistribute it freely, subject to the following restrictions: +* +* 1. The origin of this software must not be misrepresented; you must not claim that you +* wrote the original software. If you use this software in a product, an acknowledgment +* in the product documentation would be appreciated but is not required. +* +* 2. Altered source versions must be plainly marked as such, and must not be misrepresented +* as being the original software. +* +* 3. This notice may not be removed or altered from any source distribution. +* +**********************************************************************************************/ + +#include "raylib.h" +#include "screens.h" + +#include <stdio.h> + +#include "atlas01.h" +#include "atlas02.h" + +typedef enum { DELAY, SEASONS, LEAVES, KILLS, REPLAY } EndingCounter; + +typedef struct { + Vector2 position; + Vector2 speed; + float rotation; + float size; + Color color; + float alpha; + bool active; +} Particle; + +//---------------------------------------------------------------------------------- +// Global Variables Definition (local to this module) +//---------------------------------------------------------------------------------- + +// Ending screen global variables +static EndingCounter endingCounter; + +static int framesCounter; +static int finishScreen; +static int framesKillsCounter; + +static Rectangle playButton; +static Rectangle shopButton; +static Rectangle trophyButton; +static Rectangle shareButton; + +static Color buttonPlayColor; +static Color buttonShopColor; +static Color buttonTrophyColor; +static Color buttonShareColor; +static Color backgroundColor; + +static int currentScore; +static int seasonsCounter; +static int currentLeavesEnding; +static int finalYears; +static int replayTimer; +static int yearsElapsed; +static int initRotation; + +static float clockRotation; +static float finalRotation; + +static bool replaying; +static bool active[MAX_KILLS]; + +static char initMonthText[32]; +static char finalMonthText[32]; + +static Particle leafParticles[20]; + +static int drawTimer; + +// Death texts +const char textOwl01[32] = "Turned into a pretty"; +const char textOwl02[32] = "owl pellet"; +const char textDingo01[32] = "A dingo took your life"; +const char textFire01[32] = "Kissed by fire"; +const char textSnake01[32] = "Digested alive by a"; +const char textSnake02[32] = "big snake"; +const char textNaturalDeath01[32] = "LIFE KILLED YOU"; +const char textBee01[32] = "You turn out to be"; +const char textBee02[32] = "allergic to bee sting"; +const char textEagle[32] = "KOALA IS DEAD :("; + +static float LinearEaseIn(float t, float b, float c, float d) { return c*t/d + b; } + +//---------------------------------------------------------------------------------- +// Ending Screen Functions Definition +//---------------------------------------------------------------------------------- + +// Ending Screen Initialization logic +void InitEndingScreen(void) +{ + framesCounter = -10; + finishScreen = 0; + drawTimer = 15; + replayTimer = 0; + replaying = false; + finalYears = initYears + (seasons/4); + yearsElapsed = seasons/4; + + playButton = (Rectangle){ GetScreenWidth()*0.871, GetScreenHeight()*0.096, 123, 123}; + shopButton = (Rectangle){ GetScreenWidth()*0.871, GetScreenHeight()*0.303, 123, 123}; + trophyButton = (Rectangle){ GetScreenWidth()*0.871, GetScreenHeight()*0.513, 123, 123}; + shareButton = (Rectangle){ GetScreenWidth()*0.871, GetScreenHeight()*0.719, 123, 123}; + + buttonPlayColor = WHITE; + buttonShopColor = WHITE; + buttonTrophyColor = WHITE; + buttonShareColor = WHITE; + + currentScore = 0; + seasonsCounter = 0; + currentLeavesEnding = 0; + + endingCounter = DELAY; + + backgroundColor = (Color){ 176, 167, 151, 255}; + + for (int j = 0; j < 20; j++) + { + leafParticles[j].active = false; + leafParticles[j].position = (Vector2){ GetRandomValue(-20, 20), GetRandomValue(-20, 20) }; + leafParticles[j].speed = (Vector2){ (float)GetRandomValue(-500, 500)/100, (float)GetRandomValue(-500, 500)/100 }; + leafParticles[j].size = (float)GetRandomValue(3, 10)/5; + leafParticles[j].rotation = GetRandomValue(0, 360); + leafParticles[j].color = WHITE; + leafParticles[j].alpha = 1; + } + + // Seasons death texts + if (initSeason == 0) + { + sprintf(initMonthText, "SUMMER"); + clockRotation = 225; + initRotation = 225; + } + else if (initSeason == 1) + { + sprintf(initMonthText, "AUTUMN"); + clockRotation = 135; + initRotation = 135; + } + else if (initSeason == 2) + { + sprintf(initMonthText, "WINTER"); + clockRotation = 45; + initRotation = 45; + } + else if (initSeason == 3) + { + sprintf(initMonthText, "SPRING"); + clockRotation = 315; + initRotation = 315; + } + + if (currentSeason == 0) + { + sprintf(finalMonthText, "SUMMER"); + finalRotation = 225 + 360*yearsElapsed; + } + else if (currentSeason == 1) + { + sprintf(finalMonthText, "AUTUMN"); + finalRotation = 135 + 360*yearsElapsed; + } + else if (currentSeason == 2) + { + sprintf(finalMonthText, "WINTER"); + finalRotation = 45 + 360*yearsElapsed; + } + else if (currentSeason == 3) + { + sprintf(finalMonthText, "SPRING"); + finalRotation = 315 + 360*yearsElapsed; + } + + for (int i = 0; i < MAX_KILLS; i++) active[i] = false; +} + +// Ending Screen Update logic +void UpdateEndingScreen(void) +{ + framesCounter += 1*TIME_FACTOR; + + switch (endingCounter) + { + case DELAY: + { + if(framesCounter >= 10) + { + endingCounter = SEASONS; + framesCounter = 0; + } + + } break; + case SEASONS: + { + if (seasons > 0) + { + seasonsCounter = (int)LinearEaseIn((float)framesCounter, 0.0f, (float)(seasons), 90.0f); + clockRotation = LinearEaseIn((float)framesCounter, (float)initRotation, (float)-(finalRotation - initRotation), 90.0f); + + if (framesCounter >= 90) + { + endingCounter = LEAVES; + framesCounter = 0; + } + } + else endingCounter = LEAVES; + +#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)) + if (IsGestureDetected(GESTURE_TAP)) + { + seasonsCounter = seasons; + clockRotation = finalRotation; + framesCounter = 0; + endingCounter = LEAVES; + } +#elif (defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)) + if (IsKeyPressed(KEY_ENTER)) + { + seasonsCounter = seasons; + clockRotation = finalRotation; + framesCounter = 0; + endingCounter = LEAVES; + } +#endif + } break; + case LEAVES: + { + if (currentLeaves > 0) + { + if (currentLeavesEnding == currentLeaves) + { + endingCounter = KILLS; + framesCounter = 0; + } + else if (currentLeavesEnding < currentLeaves) + { + if (framesCounter >= 4) + { + currentLeavesEnding += 1; + framesCounter = 0; + } + + for (int i = 0; i < 20; i++) + { + if (!leafParticles[i].active) + { + leafParticles[i].position = (Vector2){ GetScreenWidth()*0.46, GetScreenHeight()*0.32}; + leafParticles[i].alpha = 1.0f; + leafParticles[i].active = true; + } + } + } + } + else endingCounter = KILLS; + +#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)) + if (IsGestureDetected(GESTURE_TAP)) + { + currentLeavesEnding = currentLeaves; + framesCounter = 0; + endingCounter = KILLS; + } +#elif (defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)) + if (IsKeyPressed(KEY_ENTER)) + { + currentLeavesEnding = currentLeaves; + framesCounter = 0; + endingCounter = KILLS; + } +#endif + } break; + case KILLS: + { + if (score > 0) + { + if (framesCounter <= 90 && !replaying) + { + currentScore = (int)LinearEaseIn((float)framesCounter, 0.0f, (float)(score), 90.0f); + } + + framesKillsCounter += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_KILLS; i++) + { + if (framesKillsCounter >= drawTimer && active[i] == false) + { + active[i] = true; + framesKillsCounter = 0; + } + } + + if (framesCounter >= 90) + { + endingCounter = REPLAY; + framesCounter = 0; + } + } + else endingCounter = REPLAY; + +#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)) + if (IsGestureDetected(GESTURE_TAP)) + { + currentScore = score; + framesCounter = 0; + for (int i = 0; i < MAX_KILLS; i++) active[i] = true; + endingCounter = REPLAY; + } +#elif (defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)) + if (IsKeyPressed(KEY_ENTER)) + { + currentScore = score; + framesCounter = 0; + for (int i = 0; i < MAX_KILLS; i++) active[i] = true; + endingCounter = REPLAY; + } +#endif + } break; + case REPLAY: + { +#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)) + if (IsGestureDetected(GESTURE_TAP)) replaying = true; +#elif (defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)) + if (IsKeyPressed(KEY_ENTER)) replaying = true; +#endif + if (replaying) + { + replayTimer += 1*TIME_FACTOR; + + if (replayTimer >= 30) + { + finishScreen = 1; + initSeason = GetRandomValue(0, 3); + } + + buttonPlayColor = GOLD; + } + } break; + } + + for (int i = 0; i < 20; i++) + { + if (leafParticles[i].active == true) + { + leafParticles[i].position.x += leafParticles[i].speed.x; + leafParticles[i].position.y += leafParticles[i].speed.y; + leafParticles[i].rotation += 6; + leafParticles[i].alpha -= 0.03f; + leafParticles[i].size -= 0.004; + + if (leafParticles[i].size <= 0) leafParticles[i].size = 0.0f; + + if (leafParticles[i].alpha <= 0) + { + leafParticles[i].alpha = 0.0f; + leafParticles[i].active = false; + } + } + } + + // Buttons logic +#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)) + if ((IsGestureDetected(GESTURE_TAP)) && CheckCollisionPointRec(GetTouchPosition(0), playButton)) + { + endingCounter = REPLAY; + replaying = true; + } + +#elif (defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)) + if (CheckCollisionPointRec(GetMousePosition(), playButton)) + { + buttonPlayColor = GOLD; + if (IsMouseButtonPressed(0)) + { + endingCounter = REPLAY; + replaying = true; + } + } + else buttonPlayColor = WHITE; + + if (CheckCollisionPointRec(GetMousePosition(), shopButton)) buttonShopColor = GOLD; + else buttonShopColor = WHITE; + + if (CheckCollisionPointRec(GetMousePosition(), trophyButton)) buttonTrophyColor = GOLD; + else buttonTrophyColor = WHITE; + + if (CheckCollisionPointRec(GetMousePosition(), shareButton)) buttonShareColor = GOLD; + else buttonShareColor = WHITE; +#endif +} + +// Ending Screen Draw logic +void DrawEndingScreen(void) +{ + for (int x = 0; x < 15; x++) + { + DrawTextureRec(atlas02, ending_background, (Vector2){ending_background.width*(x%5), ending_background.height*(x/5)}, backgroundColor); + } + + // Frames and backgrounds + DrawTexturePro(atlas01, ending_plate_frame, (Rectangle){GetScreenWidth()*0.042, GetScreenHeight()*0.606, ending_plate_frame.width, ending_plate_frame.height}, (Vector2){ 0, 0}, 0, WHITE); + DrawTexturePro(atlas01, ending_paint_back, (Rectangle){GetScreenWidth()*0.133, GetScreenHeight()*0.097, ending_paint_back.width, ending_paint_back.height}, (Vector2){ 0, 0}, 0, WHITE); + + if (killer == 0) DrawTexturePro(atlas01, ending_paint_koalafire, (Rectangle){GetScreenWidth()*0.145, GetScreenHeight()*0.171, ending_paint_koalafire.width, ending_paint_koalafire.height}, (Vector2){ 0, 0}, 0, WHITE); + else if (killer == 1) DrawTexturePro(atlas01, ending_paint_koalasnake, (Rectangle){GetScreenWidth()*0.145, GetScreenHeight()*0.171, ending_paint_koalasnake.width, ending_paint_koalasnake.height}, (Vector2){ 0, 0}, 0, WHITE); + else if (killer == 2) DrawTexturePro(atlas01, ending_paint_koaladingo, (Rectangle){GetScreenWidth()*0.145, GetScreenHeight()*0.171, ending_paint_koaladingo.width, ending_paint_koaladingo.height}, (Vector2){ 0, 0}, 0, WHITE); + else if (killer == 3) DrawTexturePro(atlas01, ending_paint_koalaowl, (Rectangle){GetScreenWidth()*0.2, GetScreenHeight()*0.3, ending_paint_koalaowl.width, ending_paint_koalaowl.height}, (Vector2){ 0, 0}, 0, WHITE); + else if (killer == 4) DrawTexturePro(atlas01, ending_paint_koalageneric, (Rectangle){GetScreenWidth()*0.133, GetScreenHeight()*0.171, ending_paint_koalageneric.width, ending_paint_koalageneric.height}, (Vector2){ 0, 0}, 0, WHITE); + else if (killer == 5) DrawTexturePro(atlas01, ending_paint_koalabee, (Rectangle){GetScreenWidth()*0.145, GetScreenHeight()*0.171, ending_paint_koalabee.width, ending_paint_koalabee.height}, (Vector2){ 0, 0}, 0, WHITE); + else if (killer == 6) DrawTexturePro(atlas01, ending_paint_koalaeagle, (Rectangle){GetScreenWidth()*0.145, GetScreenHeight()*0.171, ending_paint_koalaeagle.width, ending_paint_koalaeagle.height}, (Vector2){ 0, 0}, 0, WHITE); + + DrawTexturePro(atlas01, ending_paint_frame, (Rectangle){GetScreenWidth()*0.102, GetScreenHeight()*0.035, ending_paint_frame.width, ending_paint_frame.height}, (Vector2){ 0, 0}, 0, WHITE); + + // UI Score planks + DrawTexturePro(atlas01, ending_score_planksmall, (Rectangle){GetScreenWidth()*0.521, GetScreenHeight()*0.163, ending_score_planksmall.width, ending_score_planksmall.height}, (Vector2){ 0, 0}, 0, WHITE); + DrawTexturePro(atlas01, ending_score_planklarge, (Rectangle){GetScreenWidth()*0.415, GetScreenHeight()*0.303, ending_score_planklarge.width, ending_score_planklarge.height}, (Vector2){ 0, 0}, 0, WHITE); + DrawTexturePro(atlas01, ending_score_planksmall, (Rectangle){GetScreenWidth()*0.521, GetScreenHeight()*0.440, ending_score_planksmall.width, ending_score_planksmall.height}, (Vector2){ 0, 0}, 0, WHITE); + + // UI Score icons and frames + DrawTexturePro(atlas01, ending_score_seasonicon, (Rectangle){GetScreenWidth()*0.529, GetScreenHeight()*0.096, ending_score_seasonicon.width, ending_score_seasonicon.height}, (Vector2){ 0, 0}, 0, WHITE); + DrawTexturePro(atlas01, ending_score_seasonneedle, (Rectangle){GetScreenWidth()*0.579, GetScreenHeight()*0.189, ending_score_seasonneedle.width, ending_score_seasonneedle.height}, (Vector2){ending_score_seasonneedle.width/2, ending_score_seasonneedle.height*0.9}, clockRotation, WHITE); + DrawTexturePro(atlas01, ending_score_frame, (Rectangle){GetScreenWidth()*0.535, GetScreenHeight()*0.11, ending_score_frame.width, ending_score_frame.height}, (Vector2){ 0, 0}, 0, WHITE); + + DrawTexturePro(atlas01, ending_score_frameback, (Rectangle){GetScreenWidth()*0.430, GetScreenHeight()*0.246, ending_score_frameback.width, ending_score_frameback.height}, (Vector2){ 0, 0}, 0, WHITE); + DrawTexturePro(atlas01, ending_score_frame, (Rectangle){GetScreenWidth()*0.429, GetScreenHeight()*0.244, ending_score_frame.width, ending_score_frame.height}, (Vector2){ 0, 0}, 0, WHITE); + + for (int i = 0; i < 20; i++) + { + if (leafParticles[i].active) + { + DrawTexturePro(atlas01, particle_ecualyptusleaf, + (Rectangle){ leafParticles[i].position.x, leafParticles[i].position.y, particle_ecualyptusleaf.width*leafParticles[i].size, particle_ecualyptusleaf.height*leafParticles[i].size }, + (Vector2){ particle_ecualyptusleaf.width/2*leafParticles[i].size, particle_ecualyptusleaf.height/2*leafParticles[i].size }, leafParticles[i].rotation, Fade(WHITE,leafParticles[i].alpha)); + } + } + + DrawTexturePro(atlas01, ending_score_leavesicon, (Rectangle){GetScreenWidth()*0.421, GetScreenHeight()*0.228, ending_score_leavesicon.width, ending_score_leavesicon.height}, (Vector2){ 0, 0}, 0, WHITE); + + DrawTexturePro(atlas01, ending_score_frameback, (Rectangle){GetScreenWidth()*0.536, GetScreenHeight()*0.383, ending_score_frameback.width, ending_score_frameback.height}, (Vector2){ 0, 0}, 0, WHITE); + DrawTexturePro(atlas01, ending_score_frame, (Rectangle){GetScreenWidth()*0.535, GetScreenHeight()*0.383, ending_score_frame.width, ending_score_frame.height}, (Vector2){ 0, 0}, 0, WHITE); + DrawTexturePro(atlas01, ending_score_enemyicon, (Rectangle){GetScreenWidth()*0.538, GetScreenHeight()*0.414, ending_score_enemyicon.width, ending_score_enemyicon.height}, (Vector2){ 0, 0}, 0, WHITE); + + // UI Buttons + DrawTexturePro(atlas01, ending_button_replay, (Rectangle){GetScreenWidth()*0.871, GetScreenHeight()*0.096, ending_button_replay.width, ending_button_replay.height}, (Vector2){ 0, 0}, 0, buttonPlayColor); + DrawTexturePro(atlas01, ending_button_shop, (Rectangle){GetScreenWidth()*0.871, GetScreenHeight()*0.303, ending_button_shop.width, ending_button_shop.height}, (Vector2){ 0, 0}, 0, buttonShopColor); + DrawTexturePro(atlas01, ending_button_trophy, (Rectangle){GetScreenWidth()*0.871, GetScreenHeight()*0.513, ending_button_trophy.width, ending_button_trophy.height}, (Vector2){ 0, 0}, 0, buttonTrophyColor); + DrawTexturePro(atlas01, ending_button_share, (Rectangle){GetScreenWidth()*0.871, GetScreenHeight()*0.719, ending_button_share.width, ending_button_share.height}, (Vector2){ 0, 0}, 0, buttonShareColor); + + DrawTextEx(font, FormatText("%03i", seasonsCounter), (Vector2){ GetScreenWidth()*0.73f, GetScreenHeight()*0.14f }, font.baseSize, 1, WHITE); + DrawTextEx(font, FormatText("%03i", currentLeavesEnding), (Vector2){ GetScreenWidth()*0.73f, GetScreenHeight()*0.29f }, font.baseSize, 1, WHITE); + DrawTextEx(font, FormatText("%04i", currentScore), (Vector2){ GetScreenWidth()*0.715f, GetScreenHeight()*0.426f }, font.baseSize, 1, WHITE); + + DrawTextEx(font, FormatText("%s %i - %s %i", initMonthText, initYears, finalMonthText, finalYears), (Vector2){ GetScreenWidth()*0.1f, GetScreenHeight()*0.7f }, font.baseSize/2.0f, 1, WHITE); + + for (int i = 0; i < MAX_KILLS; i++) + { + if (active[i]) + { + switch (killHistory[i]) + { + case 1: DrawTextureRec(atlas01, ending_plate_headsnake, (Vector2){GetScreenWidth()*0.448 + ending_plate_headsnake.width*(i%10), GetScreenHeight()*0.682 + (GetScreenHeight()*0.055)*(i/10)}, WHITE); break; + case 2: DrawTextureRec(atlas01, ending_plate_headdingo, (Vector2){GetScreenWidth()*0.448 + ending_plate_headdingo.width*(i%10), GetScreenHeight()*0.682 + (GetScreenHeight()*0.055)*(i/10)}, WHITE); break; + case 3: DrawTextureRec(atlas01, ending_plate_headowl, (Vector2){GetScreenWidth()*0.448 + ending_plate_headowl.width*(i%10), GetScreenHeight()*0.682 + (GetScreenHeight()*0.055)*(i/10)}, WHITE); break; + case 4: DrawTextureRec(atlas01, ending_plate_headbee, (Vector2){GetScreenWidth()*0.448 + ending_plate_headbee.width*(i%10), GetScreenHeight()*0.682 + (GetScreenHeight()*0.055)*(i/10)}, WHITE); break; + case 5: DrawTextureRec(atlas01, ending_plate_headeagle, (Vector2){GetScreenWidth()*0.448 + ending_plate_headeagle.width*(i%10), GetScreenHeight()*0.682 + (GetScreenHeight()*0.055)*(i/10)}, WHITE); break; + default: break; + } + } + } + +/* + DrawText(FormatText("KOALA IS DEAD :("), GetScreenWidth()/2 - MeasureText("YOU'RE DEAD ", 60)/2, GetScreenHeight()/3, 60, RED); + DrawText(FormatText("Score: %02i - HiScore: %02i", score, hiscore),GetScreenWidth()/2 - MeasureText("Score: 00 - HiScore: 00", 60)/2, GetScreenHeight()/3 +100, 60, RED); + DrawText(FormatText("You lived: %02i years", years),GetScreenWidth()/2 - MeasureText("You lived: 00", 60)/2 + 60, GetScreenHeight()/3 +200, 30, RED); + DrawText(FormatText("%02s killed you", killer),GetScreenWidth()/2 - MeasureText("killer killed you", 60)/2 + 90, GetScreenHeight()/3 +270, 30, RED); + //DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(BLACK, 0.5)); +*/ + + //DrawTextEx(font, FormatText("%02s", killer), (Vector2){ GetScreenWidth()*0.08, GetScreenHeight()*0.78 }, font.baseSize/2, 1, WHITE); + if (killer == 0) DrawTextEx(font, textFire01, (Vector2){ GetScreenWidth()*0.13f, GetScreenHeight()*0.78f }, font.baseSize/2.0f, 1, WHITE); + else if (killer == 2) DrawTextEx(font, textDingo01, (Vector2){ GetScreenWidth()*0.13f, GetScreenHeight()*0.78f }, font.baseSize/2.0f, 1, WHITE); + else if (killer == 1) + { + DrawTextEx(font, textSnake01, (Vector2){ GetScreenWidth()*0.13f, GetScreenHeight()*0.78f }, font.baseSize/2.0f, 1, WHITE); + DrawTextEx(font, textSnake02, (Vector2){ GetScreenWidth()*0.13f, GetScreenHeight()*0.83f }, font.baseSize/2.0f, 1, WHITE); + } + else if (killer == 3) + { + DrawTextEx(font, textOwl01, (Vector2){ GetScreenWidth()*0.13f, GetScreenHeight()*0.78f }, font.baseSize/2.0f, 1, WHITE); + DrawTextEx(font, textOwl02, (Vector2){ GetScreenWidth()*0.13f, GetScreenHeight()*0.83f }, font.baseSize/2.0f, 1, WHITE); + } + else if (killer == 4) DrawTextEx(font, textNaturalDeath01, (Vector2){ GetScreenWidth()*0.13f, GetScreenHeight()*0.78f }, font.baseSize/2.0f, 1, WHITE); + else if (killer == 5) + { + DrawTextEx(font, textBee01, (Vector2){ GetScreenWidth()*0.13f, GetScreenHeight()*0.78f }, font.baseSize/2.0f, 1, WHITE); + DrawTextEx(font, textBee02, (Vector2){ GetScreenWidth()*0.13f, GetScreenHeight()*0.83f }, font.baseSize/2.0f, 1, WHITE); + } + else if (killer == 6) DrawTextEx(font, textEagle, (Vector2){ GetScreenWidth()*0.13f, GetScreenHeight()*0.78f }, font.baseSize/2.0f, 1, WHITE); +} + +// Ending Screen Unload logic +void UnloadEndingScreen(void) +{ + // ... +} + +// Ending Screen should finish? +int FinishEndingScreen(void) +{ + return finishScreen; +}
\ No newline at end of file diff --git a/games/koala_seasons/screens/screen_gameplay.c b/games/koala_seasons/screens/screen_gameplay.c new file mode 100644 index 00000000..6bbcfaaf --- /dev/null +++ b/games/koala_seasons/screens/screen_gameplay.c @@ -0,0 +1,3937 @@ +/********************************************************************************************** +* +* raylib - Koala Seasons game +* +* Gameplay Screen Functions Definitions (Init, Update, Draw, Unload) +* +* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5) +* +* This software is provided "as-is", without any express or implied warranty. In no event +* will the authors be held liable for any damages arising from the use of this software. +* +* Permission is granted to anyone to use this software for any purpose, including commercial +* applications, and to alter it and redistribute it freely, subject to the following restrictions: +* +* 1. The origin of this software must not be misrepresented; you must not claim that you +* wrote the original software. If you use this software in a product, an acknowledgment +* in the product documentation would be appreciated but is not required. +* +* 2. Altered source versions must be plainly marked as such, and must not be misrepresented +* as being the original software. +* +* 3. This notice may not be removed or altered from any source distribution. +* +**********************************************************************************************/ + +//---------------------------------------------------------------------------------- +// Defines and Macros +//---------------------------------------------------------------------------------- +#include "raylib.h" +#include "screens.h" + +#include <time.h> +#include <stdio.h> +#include <math.h> + +#include "atlas01.h" +#include "atlas02.h" + +//#define DEBUG + +// DONE: Review MAX_* limits, don't waste memory!!! +#define MAX_ENEMIES 16 +#define MAX_BAMBOO 16 +#define MAX_LEAVES 14 +#define MAX_FIRE 10 +#define MAX_FIRE_FLAMES 20 +#define MAX_ICE 10 +#define MAX_RESIN 10 +#define MAX_WIND 10 +#define MAX_PARTICLES 128 +#define MAX_PARTICLES_RAY 8 +#define MAX_PARTICLES_SPEED 64 +#define MAX_PARTICLES_STORM 512 + +#define SPEED 3*TIME_FACTOR // Speed of koala, trees, enemies, ... +#define JUMP 15*TIME_FACTOR // Jump speed +#define FLYINGMOV 10*TIME_FACTOR // Up and Down speed when final form +#define GRAVITY 1*TIME_FACTOR // Gravity when grabbed to tree +#define ICEGRAVITY 4*TIME_FACTOR // Gravity when grabbed to an icy tree +#define KICKSPEED 3*TIME_FACTOR // Gravity when kicking +#define SEASONCHANGE 1200 // Frames duration per season +#define SEASONTRANSITION SEASONCHANGE/6 // Season transition time + +//SPAWNCHANCE - Chance of spawning things everytime a tree spawns +#define ICESPAWNCHANCE 30 // Chance of spawning ice everytime a tree spawns +#define RESINSPAWNCHANCE 30 // Chance of spawning resin everytime a tree spawns +#define FIRESPAWNCHANCE 30 // Chance of spawning fire everytime a tree spawns +#define WINDSPAWNCHANCE 30 // Chance of spawning wind everytime a tree spawns + +//ENEMYSPAWNCHANCE - Chance of spawning enemies everytime a tree spawns +#define DINGOSPAWNCHANCE 30 // Chance of spawning dingos everytime a tree spawns +#define OWLSPAWNCHANCE 30 // Chance of spawning owls everytime a tree spawns +#define SNAKESPAWNCHANCE 30 // Chance of spawning snakes everytime a tree spawns +#define BEE_SPAWNCHANCE 10 // Chance of spawning bees everytime a tree spawns +#define EAGLE_SPAWNCHANCE 5 // Chance of spawning eagles everytime a tree spawns + +#define EAGLE_TIME_DELAY 600 + +//SCORE - Score increase everytime an enemy is killed +#define DINGOSCORE 100 // Score increase everytime a dingo is killed +#define OWLSCORE 100 // Score increase everytime an owl is killed +#define SNAKESCORE 100 // Score increase everytime a snake is killed +#define BEESCORE 300 // Score increase everytime a bee is killed +#define EAGLESCORE 300 // Score increase everytime an eagle is killed + +#define LEAVESTOTRANSFORM 100 // Number of leaves recquired for the transformation +#define MAXTIMESPAWN 85 // Maximum time for tree spawn +#define MINTIMESPAWN 35 // Minimum time for tree spawn +#define STARTINGMONTH 0 // Starting month (0 = January (summer)) + +#define PROGRESION_START 3600 // Time to start the progresion +#define PROGRESION_DURATION 12000 // Maximum time +#define PROGRESOIN_MAX_SPAWNCHANCE 30 // Maximum spawn chance increase +#define PROGRESION_MAX_SPEED 0.5 // Maximum speed modification by progresion + +//---------------------------------------------------------------------------------- +// Types and Structures Definition +//---------------------------------------------------------------------------------- +typedef enum { WINTER, SPRING, SUMMER, FALL, TRANSITION} SeasonState; +typedef enum { JUMPING, KICK, FINALFORM, GRABED, ONWIND } KoalaState; + +typedef struct { + Vector2 position; + Vector2 speed; + float rotation; + float size; + Color color; + float alpha; + float rotPhy; + bool active; +} Particle; + +typedef struct { + Vector2 position; + Vector2 speed; + float rotation; + Vector2 size; + Color color; + float alpha; + bool active; +} ParticleSpeed; + +typedef struct { + Vector2 position; + Color color; + float alpha; + float size; + float rotation; + bool active; // NOTE: Use it to activate/deactive particles + bool fading; + float delayCounter; +} ParticleRay; + +typedef struct { + Vector2 position; + bool active; + int spawnTime; + int maxTime; + Particle particles[MAX_PARTICLES]; +} ParticleSystem; + +// DONE: Rename for coherence: ParticleSystemStorm +typedef struct { + Vector2 position; + bool active; + int spawnTime; + int maxTime; + Particle particles[MAX_PARTICLES_STORM]; +} ParticleSystemStorm; + +typedef struct { + Vector2 position; + bool active; + float alpha; + float scale; + int score; +} PopUpScore; + +typedef struct { + Vector2 position; + bool active; + int spawnTime; + int maxTime; + ParticleSpeed particle[MAX_PARTICLES_SPEED]; +} ParticleSystemSpeed; + +typedef struct { + Vector2 position; + bool active; + int spawnTime; + int maxTime; + ParticleRay particles[MAX_PARTICLES_RAY]; +} ParticleSystemRay; + +//---------------------------------------------------------------------------------- +// Global Variables Definition (local to this module) +//---------------------------------------------------------------------------------- +static float gravity; +static SeasonState season; +static KoalaState state; + +// Gameplay screen global variables +static int framesCounter; +static int finishScreen; +static int grabCounter; +static int velocity; +static int speed; +static int bambooTimer; +static int bambooSpawnTime; +static int colorTimer; +static int jumpSpeed; +static int power; +static int maxPower; +static int transCount; +static int posArray[2]; +static int posArrayDingo[2]; +static int enemyVel[MAX_ENEMIES]; +static int beeVelocity; +static int fireSpeed; +static int windCounter; +static int seasonTimer; +static int seasonChange; +static int resinCountjump; +static int resinCountdrag; +static int resinCount; +static int currentMonth; +static int monthTimer; +static int monthChange; +static int initMonth; +static int fireCounter[MAX_FIRE]; +static int fireOffset; +static int beeMov; +static int killCounter; +static int leafType[MAX_LEAVES]; +static int posArrayLeaf[3]; +static int transAniCounter; +static int globalFrameCounter; +static int startCounter; +static int animCounter; +static int startNum = 3; +static int finalFormEnd; +static int randomMessage; +static int parallaxBackOffset; +static int parallaxFrontOffset; + +// Animation Variables +static int thisFrame = 1; +static int currentFrame = 0; +static int thisFrameWind = 1; +static int currentFrameWind = 0; +static int thisFrameBee = 1; +static int thisFrameSnake = 1; +static int thisFrameDingo = 1; +static int thisFrameOwl = 1; +static int thisFrameEagle = 1; +static int curFrameEagle; +static int curFrameBee = 0; +static int curFrameSnake = 0; +static int curFrameDingo = 0; +static int curFrameOwl = 0; +static int curFrame; +static int curFrame1; +static int curFrame2; +static int curFrame3; +static int transitionFramesCounter; +static int thisFrameKoala; +static int curFrameKoala; +static int fogSpeed; +static int fogPosition; +static int progresionDelay; +static int progresionFramesCounter; +static int initLeaves; +static int eagleDelay; + +// Stage data variables +static int jumpCounter; +static int resinCounter; +static int tornadoCounter; +static int dashCounter; +static int superKoalaCounter; + +// Global data variables +static int snakeKillCounter; +static int dingoKillCounter; +static int owlKillCounter; +static int beeKillCounter; +static int eagleKillCounter; +static int globalKillCounter; +static int deathsCounter; + +static float scrollFront; +static float scrollMiddle; +static float scrollBack; +static float scrollSpeed; +static float rightAlpha = 0.5; +static float leftAlpha = 0.5; +static float speedMod; +static float groundPos; +static float transRotation; +static float clockRotation; +static float clockSpeedRotation; +static float numberAlpha; +static float numberScale; +static float fogAlpha; +static float speedIncrease; +static float speedProgresion; +static float progresionSpawnChance; +static float UIfade; +static float filterAlpha; +static float leafGUIglowFade; +static float leafGUIpulseFade; +static float leafGUIpulseScale; +static float clockInitRotation; +static float clockFinalRotation; + +// Game text strings +const char textFinalForm[32] = "THIS ISN'T EVEN MY FINAL FORM!"; +const char textSpring1[32] = "FLOWER POWER!"; +const char textSummer1[32] = "PREPARE FOR THE SUMMER!"; +const char textFall1[32] = "HERE COMES THE FALL!"; +const char textWinter1[32] = "WINTER IS COMING!"; +const char textSpring2[32] = "POLLEN IS IN THE AIR"; +const char textSummer2[32] = "HAPPY NEW YEAR!"; +const char textFall2[32] = "IT'S RAINING RAIN"; +const char textWinter2[32] = "LET IT SNOW!"; + +static bool snakeActive[MAX_ENEMIES]; +static bool dingoActive[MAX_ENEMIES]; +static bool owlActive[MAX_ENEMIES]; +static bool branchActive[MAX_ENEMIES]; +static bool bambooActive[MAX_BAMBOO]; +static bool leafActive[MAX_LEAVES]; +static bool fireActive[MAX_FIRE]; +static bool iceActive[MAX_ICE]; +static bool windActive[MAX_WIND]; +static bool resinActive[MAX_RESIN]; +static bool isHitSnake[MAX_ENEMIES]; +static bool isHitDingo[MAX_ENEMIES]; +static bool isHitOwl[MAX_ENEMIES]; +static bool isHitBee; +static bool isHitEagle; +static bool onFire[MAX_FIRE]; +static bool onIce; +static bool onResin; +static bool playerActive; +static bool play; +static bool transforming; +static bool onWind; +static bool glowing; +static bool beeActive; +static bool eagleActive; +static bool eagleAlert; +static bool alertActive; +static bool alertBeeActive; +static bool coolDown; +static bool leafSide[MAX_LEAVES]; +static bool transBackAnim; +static bool fog; +static bool leafGUIglow; + +static Rectangle player = {0, 0, 0, 0}; +static Rectangle leftButton = {0, 0, 0, 0}; +static Rectangle rightButton = {0, 0, 0, 0}; +static Rectangle powerButton = {0, 0, 0, 0}; +static Rectangle fire[MAX_FIRE]; +//static Rectangle flames[MAX_FLAMES]; +static Rectangle ice[MAX_ICE]; +static Rectangle resin[MAX_RESIN]; +static Rectangle wind[MAX_WIND]; +static Rectangle bamboo[MAX_BAMBOO]; +static Rectangle snake[MAX_ENEMIES]; +static Rectangle dingo[MAX_ENEMIES]; +static Rectangle owl[MAX_ENEMIES]; +static Rectangle leaf[MAX_LEAVES]; // DONE: Review name! +static Rectangle powerBar; +static Rectangle backBar; +static Rectangle fireAnimation; +static Rectangle windAnimation; +static Rectangle beeAnimation; +static Rectangle snakeAnimation; +static Rectangle dingoAnimation; +static Rectangle owlAnimation; +static Rectangle bee; +static Rectangle eagle; +static Rectangle eagleAnimation; +static Rectangle koalaAnimationIddle; +static Rectangle koalaAnimationJump; +static Rectangle koalaAnimationFly; +static Rectangle koalaAnimationTransform; +static Rectangle alertRectangle; +static Rectangle beeAlertRectangle; + +static time_t rawtime; +static struct tm *ptm; + +static Color finalColor; +static Color finalColor2; +static Color flyColor; +static Color counterColor; +static Color color00, color01, color02, color03; +static Color initcolor00, initcolor01, initcolor02, initcolor03; +static Color finalcolor00, finalcolor01, finalcolor02, finalcolor03; +static Vector2 zero; +static Vector2 firePos; +static Vector2 branchPos[MAX_ENEMIES]; +static Vector2 textSize; +static Vector2 clockPosition; + +static Particle enemyHit[MAX_ENEMIES]; +static ParticleSystem leafParticles[MAX_LEAVES]; // DONE: Review!!! Creating 40 ParticleSystem!!! -> 40*128 = 5120 Particles! Maybe better create a struct Leaf? +static ParticleSystem snowParticle; +static ParticleSystem backSnowParticle; +static ParticleSystem dandelionParticle; +static ParticleSystem dandelionBackParticle; +static ParticleSystem planetreeParticle; +static ParticleSystem backPlanetreeParticle; +static ParticleSystem flowerParticle; +static ParticleSystem backFlowerParticle; +static ParticleSystem rainParticle; +static ParticleSystem backRainParticle; +static ParticleSystemStorm rainStormParticle; +static ParticleSystemStorm snowStormParticle; +static ParticleSystemRay rayParticles; +static ParticleSystemRay backRayParticles; +static ParticleSystemSpeed speedFX; +static PopUpScore popupScore[MAX_ENEMIES]; +static PopUpScore popupLeaves[MAX_LEAVES]; +static PopUpScore popupBee; +static PopUpScore popupEagle; + +//---------------------------------------------------------------------------------- +// Module specific Functions Declaration +//---------------------------------------------------------------------------------- +static void BambooSpawn(void); +static void SnakeSpawn(int chance); +static void DingoSpawn(int chance); +static void OwlSpawn(int chance); +static void BeeSpawn(int chance); +static void EagleSpawn(int chance); +static void FireSpawn(int chance); +static void IceSpawn(int chance); +static void ResinSpawn(int chance); +static void WindSpawn(int chance); +static void LeafSpawn(void); + +static void DrawParallaxFront(void); +static void DrawParallaxMiddle(void); +static void DrawParallaxBack(void); +static float LinearEaseIn(float t, float b, float c, float d); + +static Color ColorTransition(Color initialColor, Color finalColor, int framesCounter); +static bool CheckArrayValue(int *array, int arrayLength, int value); + +static void Reset(void); + +//---------------------------------------------------------------------------------- +// Gameplay Screen Functions Definition +//---------------------------------------------------------------------------------- + +// Gameplay Screen Initialization logic +void InitGameplayScreen(void) +{ + // Get current time at the moment of running game + time(&rawtime); + ptm = gmtime(&rawtime); + + currentMonth = ptm->tm_mon; + initMonth = ptm->tm_mon; + years = 1900 + ptm->tm_year; + + Reset(); +} + +// Gameplay Screen Update logic +void UpdateGameplayScreen(void) +{ + //if ((IsKeyPressed(KEY_SPACE) || IsMouseButtonPressed(0)) && playerActive) play = true; + + if (play == false && playerActive) + { + startCounter+= 1*TIME_FACTOR; + + if (startCounter > 20 && startCounter < 110) + { + animCounter+=1*TIME_FACTOR; + numberAlpha -= 0.033f*TIME_FACTOR; + numberScale -= 0.0825f*TIME_FACTOR; + + if (animCounter <= 30) startNum = 3; + else if (animCounter > 30 && animCounter <= 60) startNum = 2; + else startNum = 1; + } + else if (startCounter >= 110) play = true; + + if (numberAlpha <= 0) numberAlpha = 1; + if (numberScale <= 0) numberScale = 2.5f; + + textSize = MeasureTextEx(font, FormatText("%01i", startNum), font.baseSize*numberScale, 2); + } + + if (playerActive) finishScreen = 0; + + if (play && playerActive) + { + seasonTimer += speedMod*TIME_FACTOR; + monthTimer += speedMod*TIME_FACTOR; + eagleDelay += speedMod*TIME_FACTOR; + + globalFrameCounter++; + + if (monthTimer >= monthChange) + { + if (currentMonth == 10) + { + clockInitRotation = 225; + clockFinalRotation = clockInitRotation + 90; + rainChance = GetRandomValue(0, 100); + clockSpeedRotation = 0; + seasons++; + } + else if (currentMonth == 1) + { + clockInitRotation = 315; + clockFinalRotation = clockInitRotation + 90; + rainChance = GetRandomValue(0, 100); + clockSpeedRotation = 0; + seasons++; + } + else if (currentMonth == 4) + { + clockInitRotation = 45; + clockFinalRotation = clockInitRotation + 90; + rainChance = GetRandomValue(0, 100); + clockSpeedRotation = 0; + seasons++; + } + else if (currentMonth == 7) + { + clockInitRotation = 135; + clockFinalRotation = clockInitRotation + 90; + rainChance = GetRandomValue(0, 100); + clockSpeedRotation = 0; + seasons++; + } + + currentMonth++; + monthTimer = 0; + + //EagleSpawn(); + } + + if (currentMonth > 11) + { + currentMonth = 0; + years++; + } + + if ((currentMonth == 11) || (currentMonth == 0) || ((currentMonth == 1) && (monthTimer <= SEASONTRANSITION))) + { + dandelionParticle.active = true; + dandelionBackParticle.active = true; + rayParticles.active = true; + backRayParticles.active = true; + + transitionFramesCounter = 0; + randomMessage = GetRandomValue(0, 10); + + fog = false; + + initcolor00 = color00; // Summer Color + initcolor01 = color01; + initcolor02 = color02; + initcolor03 = color03; + finalcolor00 = (Color){242, 113, 62, 255}; // Fall Autum + finalcolor01 = (Color){190, 135, 114, 255}; + finalcolor02 = (Color){144, 130, 101, 255}; + finalcolor03 = (Color){214, 133, 58, 255}; + season = SUMMER; + currentSeason = 0; + } + else if ((currentMonth == 2) || (currentMonth == 3) || ((currentMonth == 4) && (monthTimer <= SEASONTRANSITION))) + { + if ((rainChance <= 40) && (rainChance > 24)) + { + //rainParticle.active = true; + rainStormParticle.active = true; + backRainParticle.active = false; + fog = true; + } + else if (rainChance <= 24) + { + //rainParticle.active = true; + rainStormParticle.active = true; + backRainParticle.active = false; + fog = true; + } + else + { + planetreeParticle.active = true; + backPlanetreeParticle.active = true; + fog = false; + } + + transitionFramesCounter = 0; + randomMessage = GetRandomValue(0, 10); + + initcolor00 = color00; // Fall Color + initcolor01 = color01; + initcolor02 = color02; + initcolor03 = color03; + finalcolor00 = (Color){130, 130, 181, 255}; // Winter Autum + finalcolor01 = (Color){145, 145, 166, 255}; + finalcolor02 = (Color){104, 142, 144, 255}; + finalcolor03 = (Color){57, 140, 173, 255}; + + season = FALL; + currentSeason = 1; + } + else if ((currentMonth == 5) || (currentMonth == 6) || ((currentMonth == 7) && (monthTimer <= SEASONTRANSITION))) + { + if (rainChance <= 40) + { + //rainParticle.active = true; + snowStormParticle.active = true; + backSnowParticle.active = true; + fog = true; + } + else + { + snowParticle.active = true; + backSnowParticle.active = true; + fog = false; + } + + transitionFramesCounter = 0; + randomMessage = GetRandomValue(0, 10); + + initcolor00 = color00; // Winter Color + initcolor01 = color01; + initcolor02 = color02; + initcolor03 = color03; + finalcolor00 = (Color){196, 176, 49, 255}; // Spring Autum + finalcolor01 = (Color){178, 163, 67, 255}; + finalcolor02 = (Color){133, 143, 90, 255}; + finalcolor03 = (Color){133, 156, 42, 255}; + + season = WINTER; + currentSeason = 2; + } + else if ((currentMonth == 8) || (currentMonth == 9) || ((currentMonth == 10) && (monthTimer <= SEASONTRANSITION))) + { + flowerParticle.active = true; + backFlowerParticle.active = true; + + transitionFramesCounter = 0; + randomMessage = GetRandomValue(0, 9); + + fog = false; + + initcolor00 = color00; // Spring Color + initcolor01 = color01; + initcolor02 = color02; + initcolor03 = color03; + finalcolor00 = (Color){129, 172, 86, 255}; // Summer Autum + finalcolor01 = (Color){145, 165, 125, 255}; + finalcolor02 = (Color){161, 130, 73, 255}; + finalcolor03 = (Color){198, 103, 51, 255}; + + season = SPRING; + currentSeason = 3; + } + else + { + flowerParticle.active = false; + backFlowerParticle.active = false; + snowParticle.active = false; + backSnowParticle.active = false; + planetreeParticle.active = false; + backPlanetreeParticle.active = false; + dandelionParticle.active = false; + dandelionBackParticle.active = false; + rainParticle.active = false; + rainStormParticle.active = false; + backRainParticle.active = false; + rayParticles.active = false; + backRayParticles.active = false; + snowStormParticle.active = false; + + fog = false; + + transitionFramesCounter += speedMod*TIME_FACTOR; + + if(transitionFramesCounter <= SEASONTRANSITION) + { + color00 = ColorTransition(initcolor00, finalcolor00, transitionFramesCounter); + color01 = ColorTransition(initcolor01, finalcolor01, transitionFramesCounter); + color02 = ColorTransition(initcolor02, finalcolor02, transitionFramesCounter); + color03 = ColorTransition(initcolor03, finalcolor03, transitionFramesCounter); + } + + season = TRANSITION; + } + + // Update scrolling values + if (!transforming) + { + scrollFront -= scrollSpeed; + scrollMiddle -= (scrollSpeed*0.75f); + scrollBack -= scrollSpeed/2; + + fogPosition -= fogSpeed; + + groundPos -= speed; + clockRotation += clockSpeedRotation; + } + + player.y += gravity; + bambooTimer += (speedMod*TIME_FACTOR); + speed = SPEED*speedMod; + + if (player.x >= GetScreenWidth()*0.6 && state != FINALFORM) + { + speedIncrease = (player.x - GetScreenWidth()*0.6f)/GetScreenWidth(); + } + else if (player.x < GetScreenWidth()*0.6 && state != FINALFORM) + { + speedIncrease = 0; + } + + if (state != FINALFORM) speedMod = 1.2 + speedIncrease + speedProgresion; + + progresionDelay++; + + if (progresionDelay >= PROGRESION_START) + { + progresionFramesCounter++; + + if (progresionFramesCounter < PROGRESION_DURATION) + { + speedProgresion = LinearEaseIn((float)progresionFramesCounter, 0.0f, (float)PROGRESION_MAX_SPEED, (float)PROGRESION_DURATION); + progresionSpawnChance = LinearEaseIn((float)progresionFramesCounter, 0.0f, (float)PROGRESOIN_MAX_SPAWNCHANCE, (float)PROGRESION_DURATION); + } + } + + if (scrollFront <= -GetScreenWidth()) scrollFront = 0; + if (scrollMiddle <= -GetScreenWidth()) scrollMiddle = 0; + if (scrollBack <= -GetScreenWidth()) scrollBack = 0; + if (groundPos <= -GetScreenWidth()) groundPos = 0; + if (fogPosition <= -GetScreenWidth()) fogPosition = 0; + + if (fogAlpha > 0 && !fog) fogAlpha -= 0.03f*speedMod; + else if (fog && fogAlpha < 1) fogAlpha += 0.03f*speedMod; + + if (filterAlpha > 0 && !fog) filterAlpha -= 0.02f*speedMod; + else if (fog && filterAlpha < 0.15f) filterAlpha += 0.02f*speedMod; + + //if (state != FINALFORM) clockSpeedRotation = (float)((90/(float)seasonChange)*speedMod)*1.75; + clockSpeedRotation += speedMod*TIME_FACTOR; + + if (clockSpeedRotation <= (SEASONCHANGE)) clockRotation = (float)LinearEaseIn((float)clockSpeedRotation, clockInitRotation, 90.0f, (float)(SEASONCHANGE)); + else clockRotation = clockFinalRotation; + + if (CheckCollisionCircleRec(clockPosition, gameplay_gui_seasonsclock_disc.width, player)) + { + if (UIfade > 0.4f) UIfade -= 0.01f*TIME_FACTOR; + } + else + { + if (UIfade < 1) UIfade += 0.01f*TIME_FACTOR; + } + + //---------------------------------------------------------------------------------- + // Animations + //---------------------------------------------------------------------------------- + + // Wind Animation + thisFrameWind += 1*TIME_FACTOR; + + if (thisFrameWind >= 12) + { + currentFrameWind++; + thisFrameWind = 0; + } + + if (currentFrameWind > 3) currentFrameWind = 0; + + windAnimation.x = gameplay_props_whirlwind_spritesheet.x + windAnimation.width*currentFrameWind; + + // Fire Animation + thisFrame += 1*TIME_FACTOR; + + if (thisFrame >= 8) + { + curFrame++; + curFrame1++; + curFrame2++; + curFrame3++; + + thisFrame = 0; + } + + if (curFrame > 3) curFrame = 0; + if (curFrame1 > 3) curFrame1 = 0; + if (curFrame2 > 3) curFrame2 = 0; + if (curFrame3 > 3) curFrame3 = 0; + + if (!transforming) + { + // Eagle Animation + curFrameEagle += 1*TIME_FACTOR; + + if (curFrameEagle >= 6*TIME_FACTOR) + { + thisFrameEagle ++; + curFrameEagle = 0; + } + + if (thisFrameEagle > 1) thisFrameEagle = 0; + + eagleAnimation.x = gameplay_enemy_eagle.x + eagleAnimation.width*thisFrameEagle; + + // Bee Animation + curFrameBee += 1*TIME_FACTOR; + + if (curFrameBee >= 3*TIME_FACTOR) + { + thisFrameBee ++; + curFrameBee = 0; + } + + if (thisFrameBee > 3) thisFrameBee = 0; + + beeAnimation.x = gameplay_enemy_bee.x + beeAnimation.width*thisFrameBee; + + // Snake Animation + thisFrameSnake += 1*TIME_FACTOR; + + if (thisFrameSnake >= 24*TIME_FACTOR) + { + curFrameSnake ++; + thisFrameSnake = 0; + } + + if (curFrameSnake > 1) curFrameSnake = 0; + + snakeAnimation.x = gameplay_enemy_snake.x + snakeAnimation.width*curFrameSnake; + + // Dingo Animation + curFrameDingo += 1*TIME_FACTOR; + + if (curFrameDingo >= 24*TIME_FACTOR) + { + thisFrameDingo ++; + curFrameDingo = 0; + } + + if (thisFrameDingo > 1) thisFrameDingo = 0; + + dingoAnimation.x = gameplay_enemy_dingo.x + dingoAnimation.width*thisFrameDingo; + + // Owl Animation + curFrameOwl += 1*TIME_FACTOR; + + if (curFrameOwl >= 24*TIME_FACTOR) + { + thisFrameOwl ++; + curFrameOwl = 0; + } + + if (thisFrameOwl > 1) thisFrameOwl = 0; + + owlAnimation.x = gameplay_enemy_owl.x + owlAnimation.width*thisFrameOwl; + + // Alert Animation + if (alertActive) + { + if (eagleAlert) + { + alertRectangle.x -= 100*TIME_FACTOR; + alertRectangle.width += 100*TIME_FACTOR; + alertRectangle.height += 5*TIME_FACTOR; + alertRectangle.y -= 5*TIME_FACTOR; + + if (alertRectangle.height >= 100) eagleAlert = false; + } + else + { + alertRectangle.height -= 1*TIME_FACTOR; + alertRectangle.y += 1*TIME_FACTOR; + + if (alertRectangle.height <= 0) + { + eagleAlert = true; + eagleActive = true; + alertActive = false; + } + } + } + + // Eagle Logic + if (eagleActive == true && !isHitEagle) + { + eagle.x -= 10*speed*TIME_FACTOR; + + if (CheckCollisionRecs(eagle, player) && (state != FINALFORM) && (state != KICK)) + { + velocity = 8; + jumpSpeed = 2; + play = false; + playerActive = false; + killer = 6; + } + else if (CheckCollisionRecs(eagle, player) && (state == FINALFORM) && (state != KICK)) + { + isHitEagle = true; + beeVelocity = 8; + killHistory[killCounter] = 5; + killCounter++; + + score += EAGLESCORE; + eagleKillCounter++; + globalKillCounter++; + + popupEagle.position = (Vector2){ eagle.x, eagle.y }; + popupEagle.scale = 1.0f; + popupEagle.alpha = 1.0f; + popupEagle.score = EAGLESCORE; + popupEagle.active = true; + } + } + else if (isHitEagle) + { + if ((eagle.y + eagle.height) > GetScreenHeight()) + { + eagleActive = false; + isHitEagle = false; + } + + eagle.x += 2*TIME_FACTOR; + beeVelocity -= 1*TIME_FACTOR*TIME_FACTOR; + eagle.y -= beeVelocity*TIME_FACTOR; + } + + if (eagle.x + eagle.width <= 0) eagleActive = false; + + // Bee Alert Animation + if (alertBeeActive) + { + + beeAlertRectangle.x -= 100*TIME_FACTOR; + beeAlertRectangle.width += 100*TIME_FACTOR; + beeAlertRectangle.height += 2.5*TIME_FACTOR; + beeAlertRectangle.y += 1.25*TIME_FACTOR; + + if (beeAlertRectangle.height >= 100) + { + beeActive = true; + alertBeeActive = false; + } + } + + // Bee Logic + if (beeActive == true && !isHitBee) + { + bee.x -= 3*speed; + beeMov = sin(2*PI/400*bee.x) * 5; + bee.y += beeMov*TIME_FACTOR; + + if (CheckCollisionRecs(bee, player) && (state != FINALFORM) && (state != KICK)) + { + velocity = 8; + jumpSpeed = 2; + play = false; + playerActive = false; + killer = 5; + } + else if (CheckCollisionRecs(bee, player) && (state == FINALFORM) && (state != KICK)) + { + isHitBee = true; + beeVelocity = 8; + killHistory[killCounter] = 4; + killCounter++; + + score += BEESCORE; + beeKillCounter++; + globalKillCounter++; + + popupBee.position = (Vector2){ bee.x, bee.y }; + popupBee.scale = 1.0f; + popupBee.alpha = 1.0f; + popupBee.score = BEESCORE; + popupBee.active = true; + } + } + else if (isHitBee) + { + if ((bee.y + bee.height) > GetScreenHeight()) + { + beeActive = false; + isHitBee = false; + } + + bee.x += 2*TIME_FACTOR; + beeVelocity -= 1*TIME_FACTOR*TIME_FACTOR; + bee.y -= beeVelocity*TIME_FACTOR; + } + + if (bee.x + bee.width <= 0) beeActive = false; + } + + // Power bar logic + powerBar.width = power; + + if (power >= maxPower) power = maxPower; + + if (currentLeaves >= LEAVESTOTRANSFORM && !coolDown) + { + flyColor = ORANGE; + + if (leafGUIglow) + { + leafGUIglowFade += 0.01f*TIME_FACTOR; + if (leafGUIglowFade >= 1) leafGUIglow = false; + } + else + { + leafGUIglowFade -= 0.01f*TIME_FACTOR; + if (leafGUIglowFade <= 0) leafGUIglow = true; + } + + leafGUIpulseFade -= 0.01f*TIME_FACTOR; + leafGUIpulseScale += 0.005F*TIME_FACTOR; + + if (leafGUIpulseFade <= 0) + { + leafGUIpulseFade = 1; + leafGUIpulseScale = 1; + } + +#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)) + if ((IsGestureDetected(GESTURE_TAP) && CheckCollisionPointRec(GetTouchPosition(0), powerButton)) && (state != FINALFORM)) + { + state = FINALFORM; + transforming = true; + //currentLeaves -= LEAVESTOTRANSFORM; + initLeaves = currentLeaves; + curFrameKoala = 0; + thisFrameKoala = 0; + superKoalaCounter++; + } +#elif (defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)) + + if ((IsKeyPressed(KEY_ENTER) || (CheckCollisionPointRec(GetMousePosition(), powerButton) && IsMouseButtonPressed(0))) && (state != FINALFORM)) + { + state = FINALFORM; + transforming = true; + //currentLeaves -= LEAVESTOTRANSFORM; + initLeaves = currentLeaves; + curFrameKoala = 0; + thisFrameKoala = 0; + superKoalaCounter++; + } +#endif + } +#if defined(DEBUG) + if (currentLeaves < LEAVESTOTRANSFORM && (IsKeyPressed(KEY_ENTER))) + { + currentLeaves += LEAVESTOTRANSFORM; + } +#endif + + if (coolDown) + { + power += 20; + + if (power >= maxPower) coolDown = false; + } + + colorTimer += 1*TIME_FACTOR; + + if (colorTimer > 10) + { + finalColor.r = GetRandomValue(0, 255); + finalColor.g = GetRandomValue(0, 255); + finalColor.b = GetRandomValue(0, 255); + colorTimer = 0; + } + + // Ice logic + for (int i = 0; i < MAX_ICE; i++) + { + if (!iceActive[i]) ice[i].x = -100; + + if (ice[i].x <= - ice[i].width) iceActive[i] = false; + + if (CheckCollisionRecs(ice[i], player) && (state == GRABED)) onIce = true; + } + + // Resin logic + for (int i = 0; i < MAX_RESIN; i++) + { + if (!resinActive[i]) resin[i].x = -100; + + if (resin[i].x <= -resin[i].width) resinActive[i] = false; + + if (CheckCollisionRecs(resin[i], player) && resinCount >= 30*TIME_FACTOR && state != FINALFORM) + { + if (!onResin) + { + PlaySound(fxHitResin); + resinCounter++; + } + + onResin = true; + grabCounter = 10; + + //gravity = 0; + state = GRABED; + } + } + + // Wind logic + for (int i = 0; i < MAX_WIND; i++) + { + if (!windActive[i]) wind[i].x = -500; + + else wind[i].x -= 9*speedMod*TIME_FACTOR; + + if (wind[i].x <= - wind[i].width) windActive[i] = false; + + if (CheckCollisionRecs(wind[i], player) && state != ONWIND && (windCounter >= 35) && state != FINALFORM) + { + state = ONWIND; + windCounter = 0; + velocity = JUMP; + grabCounter = 0; + jumpSpeed = 10; + rightAlpha = 1; + onIce = false; + onResin = false; + resinCountjump = 0; + resinCountdrag = 0; + tornadoCounter++; + } + } + + // Fire logic + for (int i = 0; i < MAX_FIRE; i++) + { + //fire[i].x -= speed; + + if (fireActive[i] == false) fire[i].x = -200; + + if (fire[i].x <= (player.x + player.width) && !onFire[i]) + { + onFire[i] = true; + } + + if (onFire[i] && fire[i].y > -50 && !transforming) + { + fireCounter[i]++; + fire[i].y -= fireSpeed*TIME_FACTOR; + fireCounter[i] = 0; + //fire[i].height += fireSpeed; + } + + if (fire[i].x <= -fire[i].width) + { + fireActive[i] = false; + onFire[i] = false; + } + + if (CheckCollisionRecs(player, fire[i])) + { + if (state != FINALFORM) + { + velocity = 8; + jumpSpeed = 2; + play = false; + playerActive = false; + killer = 0; + } + } + + for (int k = 0; k < MAX_ENEMIES; k++) + { + if (CheckCollisionRecs(fire[i], snake[k]) && !isHitSnake[k]) + { + isHitSnake[k] = true; + enemyVel[k] = 8; + } + } + } + + // Bamboo logic + for (int i = 0; i < MAX_BAMBOO; i++) + { + if (bambooActive[i]) + { + bamboo[i].x -= speed; + + if ((CheckCollisionRecs(player, bamboo[i])) && (state != FINALFORM)) + { + if (grabCounter >= 10) + { + player.x = bamboo[i].x - 25; + state = GRABED; + } + } + + if ((CheckCollisionRecs(player, bamboo[i])) && (state == FINALFORM)) + { + if (power <= 1) + { + state = JUMPING; + velocity = JUMP; + jumpSpeed = 6; + scrollSpeed = 1.6f; + speedMod = 1.2f; + coolDown = true; + flyColor = GRAY; + speedFX.active = false; + } + } + + for (int k = 0; k < MAX_ENEMIES; k++) + { + if ((CheckCollisionRecs(snake[k], bamboo[i])) && snakeActive[k] && !isHitSnake[k]) snake[k].x = bamboo[i].x - 15; + if ((CheckCollisionRecs(dingo[k], bamboo[i])) && dingoActive[k] && !isHitDingo[k]) dingo[k].x = bamboo[i].x - 15; + if ((CheckCollisionRecs(owl[k], bamboo[i])) && owlActive[k] && !isHitOwl[k]) owl[k].x = bamboo[i].x - 22; + if ((CheckCollisionRecs((Rectangle){branchPos[k].x, branchPos[k].y, gameplay_props_owl_branch.width, gameplay_props_owl_branch.height}, bamboo[i])) && branchActive[k]) branchPos[k].x = bamboo[i].x -24; + } + + for (int j = 0; j < MAX_LEAVES; j++) + { + if ((CheckCollisionRecs(leaf[j], bamboo[i])) && leafActive[j]) + { + if (leafSide[j])leaf[j].x = bamboo[i].x + 18; + else leaf[j].x = bamboo[i].x - 18; + } + + //else leaf[j].x -= speed; + } + + for (int z = 0; z < MAX_FIRE; z++) + { + if ((CheckCollisionRecs(fire[z], bamboo[i])) && fireActive[z]) fire[z].x = bamboo[i].x - 5; + //else fire[z].x -= speed; + } + + for (int n = 0; n < MAX_ICE; n++) + { + if ((CheckCollisionRecs(ice[n], bamboo[i])) && iceActive[n]) ice[n].x = bamboo[i].x; + } + + for (int m = 0; m < MAX_RESIN; m++) + { + if ((CheckCollisionRecs(resin[m], bamboo[i])) && resinActive[m]) resin[m].x = bamboo[i].x; + } + + if (bamboo[i].x <= -(bamboo[i].width + 30)) + { + bambooActive[i] = false; + } + } + } + + // Enemy logic + for (int k = 0; k < MAX_ENEMIES; k++) + { + //if (snakeActive[k] && !isHitSnake[k])snake[k].x -= speed; + + if (snake[k].x <= -snake[k].width) snakeActive[k] = false; + if (dingo[k].x <= -dingo[k].width) dingoActive[k] = false; + if (owl[k].x <= -owl[k].width) owlActive[k] = false; + if (branchPos[k].x <= -owl[k].width) branchActive[k] = false; + + if (!snakeActive[k]) snake[k].x = -500; + if (!dingoActive[k]) dingo[k].x = -500; + if (!owlActive[k]) owl[k].x = -500; + + if (CheckCollisionRecs(player, snake[k]) && (state != KICK) && !isHitSnake[k]) + { + if (state != FINALFORM) + { + velocity = 8; + jumpSpeed = 2; + enemyVel[k] = 8; + play = false; + playerActive = false; + killer = 1; + } + else if (state == FINALFORM) + { + isHitSnake[k] = true; + enemyVel[k] = 8; + killHistory[killCounter] = 1; + killCounter++; + + snakeKillCounter++; + globalKillCounter++; + score += SNAKESCORE; + + PlaySound(fxDieSnake); + + enemyHit[k].position = (Vector2){ snake[k].x, snake[k].y }; + enemyHit[k].speed = (Vector2){ 0, 0 }; + enemyHit[k].size = (float)GetRandomValue(0, 10)/30; + enemyHit[k].rotation = 0.0f; + //enemyHit[i].color = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 }; + enemyHit[k].alpha = 1.0f; + enemyHit[k].active = true; + + popupScore[k].position = (Vector2){ snake[k].x,snake[k].y }; + popupScore[k].scale = 1.0f; + popupScore[k].alpha = 1.0f; + popupScore[k].score = SNAKESCORE; + popupScore[k].active = true; + } + } + + if (CheckCollisionRecs(player, dingo[k]) && (state != KICK) && !isHitDingo[k]) + { + if (state != FINALFORM) + { + velocity = 8; + jumpSpeed = 2; + play = false; + enemyVel[k] = 8; + playerActive = false; + killer = 2; + } + else if (state == FINALFORM) + { + isHitDingo[k] = true; + enemyVel[k] = 8; + killHistory[killCounter] = 2; + killCounter++; + + score += DINGOSCORE; + dingoKillCounter++; + globalKillCounter++; + + enemyHit[k].position = (Vector2){ dingo[k].x,dingo[k].y }; + enemyHit[k].speed = (Vector2){ 0, 0 }; + enemyHit[k].size = (float)GetRandomValue(5, 10)/30; + enemyHit[k].rotation = 0.0f; + //enemyHit[i].color = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 }; + enemyHit[k].alpha = 1.0f; + enemyHit[k].active = true; + + popupScore[k].position = (Vector2){ dingo[k].x,dingo[k].y }; + popupScore[k].scale = 1.0f; + popupScore[k].alpha = 1.0f; + popupScore[k].score = DINGOSCORE; + popupScore[k].active = true; + } + } + + if (CheckCollisionRecs(player, owl[k]) && (state != KICK) && !isHitOwl[k]) + { + if (state != FINALFORM) + { + velocity = 8; + enemyVel[k] = 8; + jumpSpeed = 2; + play = false; + playerActive = false; + killer = 3; + } + else if (state == FINALFORM) + { + isHitOwl[k] = true; + enemyVel[k] = 8; + killHistory[killCounter] = 3; + killCounter++; + + score += OWLSCORE; + owlKillCounter++; + globalKillCounter++; + + enemyHit[k].position = (Vector2){ owl[k].x, owl[k].y }; + enemyHit[k].speed = (Vector2){ owl[k].x, owl[k].y }; + enemyHit[k].size = (float)GetRandomValue(5, 10)/30; + enemyHit[k].rotation = 0.0f; + //enemyHit[i].color = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 }; + enemyHit[k].alpha = 1.0f; + enemyHit[k].active = true; + + popupScore[k].position = (Vector2){ owl[k].x,owl[k].y }; + popupScore[k].scale = 1.0f; + popupScore[k].alpha = 1.0f; + popupScore[k].score = OWLSCORE; + popupScore[k].active = true; + } + } + + if (isHitSnake[k]) + { + if ((snake[k].y + snake[k].height) > GetScreenHeight()) + { + snakeActive[k] = false; + isHitSnake[k] = false; + } + + snake[k].x += 2*TIME_FACTOR; + enemyVel[k] -= 1*TIME_FACTOR*TIME_FACTOR; + snake[k].y -= enemyVel[k]*TIME_FACTOR; + } + + if (isHitDingo[k]) + { + if ((dingo[k].y) > GetScreenHeight()) + { + dingoActive[k] = false; + isHitDingo[k] = false; + } + + dingo[k].x += 2*TIME_FACTOR; + enemyVel[k] -= 1*TIME_FACTOR*TIME_FACTOR; + dingo[k].y -= enemyVel[k]*TIME_FACTOR; + } + + if (isHitOwl[k]) + { + if ((owl[k].y) > GetScreenHeight()) + { + owlActive[k] = false; + isHitOwl[k] = false; + } + + owl[k].x += 2*TIME_FACTOR; + enemyVel[k] -= 1*TIME_FACTOR*TIME_FACTOR; + owl[k].y -= enemyVel[k]; + } + } + + // Leaves logic + for (int j = 0; j < MAX_LEAVES; j++) + { + //leaf[j].x -= speed; + + leafParticles[j].position = (Vector2){ leaf[j].x, leaf[j].y}; + + + if (leaf[j].x <= -leaf[j].width) leafActive[j] = false; + + if (CheckCollisionRecs(player, leaf[j]) && leafActive[j]) + { + //power += 20; + //printf("coin %c", coinType[j]); + + // DONE: Review + popupLeaves[j].position = (Vector2){ leaf[j].x, leaf[j].y }; + popupLeaves[j].scale = 1.0f; + popupLeaves[j].alpha = 1.0f; + popupLeaves[j].active = true; + + PlaySound(fxEatLeaves); + + if(leafType[j] == 0) + { + currentLeaves++; + popupLeaves[j].score = 1; + } + + else if(leafType[j] == 1) + { + currentLeaves += 2; + popupLeaves[j].score = 2; + } + + else if(leafType[j] == 2) + { + currentLeaves += 3; + popupLeaves[j].score = 3; + } + + else if(leafType[j] == 3) + { + currentLeaves += 4; + popupLeaves[j].score = 4; + } + + leafActive[j] = false; + leafParticles[j].active = true; + + for (int h = 0; h < 32; h++) + { + leafParticles[j].particles[h].active = true; + leafParticles[j].particles[h].position = (Vector2){ leafParticles[j].position.x, leafParticles[j].position.y}; + leafParticles[j].particles[h].speed = (Vector2){ (float)GetRandomValue(-400, 400)/100, (float)GetRandomValue(-400, 400)/100 }; + leafParticles[j].particles[h].size = (float)GetRandomValue(4, 8)/10; + leafParticles[j].particles[h].rotation = GetRandomValue(-180, 180); + //enemyHit[i].color = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 }; + leafParticles[j].particles[h].alpha = 1.0f; + } + } + } + + //---------------------------------------------------------------------------------- + // Particles Logic + //---------------------------------------------------------------------------------- + + // Leaf particles logic + for (int i = 0; i < MAX_LEAVES; i++) + { + + if (leafParticles[i].active == true) + { + + for (int j = 0; j < 32; j++) + { + //enemyHit[i].speed.y -= 1; + + leafParticles[i].particles[j].position.x += leafParticles[i].particles[j].speed.x*TIME_FACTOR; + leafParticles[i].particles[j].position.y += leafParticles[i].particles[j].speed.y; + + //if (((enemyHitPosition.x + enemyHit[i].position.x + enemyHit[i].size) >= screenWidth) || ((enemyHitPosition.x + enemyHit[i].position.x - enemyHit[i].size) <= 0)) enemyHit[i].speed.x *= -1; + //if (((enemyHitPosition.y + enemyHit[i].position.y + enemyHit[i].size) >= screenHeight) || ((enemyHitPosition.y + enemyHit[i].position.y - enemyHit[i].size) <= 0)) enemyHit[i].speed.y *= -1; + + leafParticles[i].particles[j].rotation += 6*TIME_FACTOR; + leafParticles[i].particles[j].alpha -= 0.03f*TIME_FACTOR; + leafParticles[i].particles[j].size -= 0.004*TIME_FACTOR; + + if (leafParticles[i].particles[j].size <= 0) leafParticles[i].particles[j].size = 0.0f; + + if (leafParticles[i].particles[j].alpha <= 0) + { + leafParticles[i].particles[j].alpha = 0.0f; + leafParticles[i].particles[j].active = false; + leafParticles[i].active = false; + } + } + } + + if (popupLeaves[i].active) + { + //mouseTail[i].position.y += gravity; + popupLeaves[i].alpha -= 0.02f; + popupLeaves[i].scale += 0.1f; + popupLeaves[i].position.y -= 3.0f; + popupLeaves[i].position.x -= speed; + + if (popupLeaves[i].alpha <= 0.0f) popupLeaves[i].active = false; + } + } + + // Enemy Particles + for (int i = 0; i < MAX_ENEMIES; i++) + { + if (enemyHit[i].active) + { + //mouseTail[i].position.y += gravity; + enemyHit[i].alpha -= 0.1f*TIME_FACTOR; + enemyHit[i].size += 0.1f*TIME_FACTOR; + + if (enemyHit[i].alpha <= 0.0f) enemyHit[i].active = false; + } + + if (popupScore[i].active) + { + //mouseTail[i].position.y += gravity; + popupScore[i].alpha -= 0.02f; + popupScore[i].scale += 0.2f; + popupScore[i].position.y -= 4.0f; + popupScore[i].position.x -= speed; + + if (popupScore[i].alpha <= 0.0f) popupScore[i].active = false; + } + } + + if (popupBee.active) + { + //mouseTail[i].position.y += gravity; + popupBee.alpha -= 0.02f; + popupBee.scale += 0.2f; + popupBee.position.y -= 4.0f; + popupBee.position.x -= speed; + + if (popupBee.alpha <= 0.0f) popupBee.active = false; + } + + if (popupEagle.active) + { + //mouseTail[i].position.y += gravity; + popupEagle.alpha -= 0.02f; + popupEagle.scale += 0.2f; + popupEagle.position.y -= 4.0f; + popupEagle.position.x -= speed; + + if (popupEagle.alpha <= 0.0f) popupEagle.active = false; + } + + if (state != FINALFORM) + { + // Snow Particle + if (snowParticle.active) + { + snowParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_PARTICLES; i++) + { + if (!snowParticle.particles[i].active && (snowParticle.spawnTime >= snowParticle.maxTime)) + { + snowParticle.particles[i].active = true; + snowParticle.particles[i].position = (Vector2){ GetRandomValue(0, GetScreenWidth() + 200), -10 }; + snowParticle.spawnTime = 0; + snowParticle.maxTime = GetRandomValue(5, 20); + } + } + } + + if (backSnowParticle.active) + { + snowParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_PARTICLES; i++) + { + if (!backSnowParticle.particles[i].active && (backSnowParticle.spawnTime >= backSnowParticle.maxTime)) + { + backSnowParticle.particles[i].active = true; + backSnowParticle.particles[i].position = (Vector2){ GetRandomValue(0, GetScreenWidth() + 200), -10 }; + backSnowParticle.spawnTime = 0; + backSnowParticle.maxTime = GetRandomValue(3, 10); + } + } + } + + // Autumn leaves particles + if (planetreeParticle.active) + { + planetreeParticle.spawnTime += 1*TIME_FACTOR; + backPlanetreeParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_PARTICLES; i++) + { + if (!planetreeParticle.particles[i].active && (planetreeParticle.spawnTime >= planetreeParticle.maxTime)) + { + planetreeParticle.particles[i].active = true; + planetreeParticle.particles[i].position = (Vector2){ GetRandomValue(0, GetScreenWidth() + 200), -10 }; + planetreeParticle.spawnTime = 0; + planetreeParticle.maxTime = GetRandomValue(5, 20); + } + + if (!backPlanetreeParticle.particles[i].active && (backPlanetreeParticle.spawnTime >= backPlanetreeParticle.maxTime)) + { + backPlanetreeParticle.particles[i].active = true; + backPlanetreeParticle.particles[i].position = (Vector2){ GetRandomValue(0, GetScreenWidth() + 200), -10 }; + backPlanetreeParticle.spawnTime = 0; + backPlanetreeParticle.maxTime = GetRandomValue(3, 10); + } + } + } + + // Dandelion particle + if (dandelionParticle.active) + { + dandelionParticle.spawnTime += 1*TIME_FACTOR; + dandelionBackParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_PARTICLES; i++) + { + if (!dandelionParticle.particles[i].active && (dandelionParticle.spawnTime >= dandelionParticle.maxTime)) + { + dandelionParticle.particles[i].active = true; + dandelionParticle.particles[i].position = (Vector2){ GetRandomValue(0, GetScreenWidth() + 200), -10 }; + dandelionParticle.spawnTime = 0; + dandelionParticle.maxTime = GetRandomValue(5, 20); + } + + if (!dandelionBackParticle.particles[i].active && (dandelionBackParticle.spawnTime >= dandelionBackParticle.maxTime)) + { + dandelionBackParticle.particles[i].active = true; + dandelionBackParticle.particles[i].position = (Vector2){ GetRandomValue(0, GetScreenWidth() + 200), -10 }; + dandelionBackParticle.spawnTime = 0; + dandelionBackParticle.maxTime = GetRandomValue(3, 10); + } + } + } + + // Flower Particle + if (flowerParticle.active) + { + + flowerParticle.spawnTime += 1*TIME_FACTOR; + backFlowerParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_PARTICLES; i++) + { + if (!flowerParticle.particles[i].active && (flowerParticle.spawnTime >= flowerParticle.maxTime)) + { + flowerParticle.particles[i].active = true; + flowerParticle.particles[i].position = (Vector2){ GetRandomValue(0, GetScreenWidth() + 200), -10 }; + flowerParticle.spawnTime = 0; + flowerParticle.maxTime = GetRandomValue(5, 20); + } + + if (!backFlowerParticle.particles[i].active && (backFlowerParticle.spawnTime >= backFlowerParticle.maxTime)) + { + backFlowerParticle.particles[i].active = true; + backFlowerParticle.particles[i].position = (Vector2){ GetRandomValue(0, GetScreenWidth() + 200), -10 }; + backFlowerParticle.spawnTime = 0; + backFlowerParticle.maxTime = GetRandomValue(3, 10); + } + } + } + + // Rain Particle + if (rainParticle.active) + { + rainParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_PARTICLES; i++) + { + if (!rainParticle.particles[i].active && (rainParticle.spawnTime >= rainParticle.maxTime)) + { + rainParticle.particles[i].active = true; + rainParticle.particles[i].position = (Vector2){ GetRandomValue(0, GetScreenWidth() + 200), -10 }; + rainParticle.spawnTime = 0; + rainParticle.maxTime = GetRandomValue(1, 8); + } + } + } + + // BackRain Particles + if (backRainParticle.active) + { + backRainParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_PARTICLES; i++) + { + if (!backRainParticle.particles[i].active && (backRainParticle.spawnTime >= backRainParticle.maxTime)) + { + backRainParticle.particles[i].active = true; + backRainParticle.particles[i].position = (Vector2){ GetRandomValue(0, GetScreenWidth() + 200), -10 }; + backRainParticle.spawnTime = 0; + backRainParticle.maxTime = GetRandomValue(1, 8); + } + } + } + + // Storm Particles + if (rainStormParticle.active) + { + rainStormParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_PARTICLES_STORM; i++) + { + if (!rainStormParticle.particles[i].active && (rainStormParticle.spawnTime >= rainStormParticle.maxTime)) + { + for (int j = 0; j < 16; j++) + { + rainStormParticle.particles[i+j].active = true; + rainStormParticle.particles[i+j].position = (Vector2){ GetRandomValue(100, GetScreenWidth() + 1000), GetRandomValue(-10,-20) }; + } + + rainStormParticle.spawnTime = 0; + rainStormParticle.maxTime = 4; + } + } + } + + // Snow Storm Particles + if (snowStormParticle.active) + { + snowStormParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_PARTICLES_STORM; i++) + { + if (!snowStormParticle.particles[i].active && (snowStormParticle.spawnTime >= snowStormParticle.maxTime)) + { + snowStormParticle.particles[i].active = true; + snowStormParticle.particles[i].position = (Vector2){ GetRandomValue(100, GetScreenWidth() + 800), -10 }; + snowStormParticle.spawnTime = 0; + snowStormParticle.maxTime = GetRandomValue(1, 2); + } + } + } + + } + + // Speed Particles + if (speedFX.active) + { + speedFX.spawnTime++; + + for (int i = 0; i < MAX_PARTICLES_SPEED; i++) + { + if (!speedFX.particle[i].active && (speedFX.spawnTime >= speedFX.maxTime)) + { + speedFX.particle[i].active = true; + speedFX.particle[i].alpha = 0.7f; + speedFX.particle[i].size = (Vector2){ GetScreenWidth(), GetRandomValue(5, 30) }; + speedFX.particle[i].position = (Vector2){ GetScreenWidth(), GetRandomValue(0, GetScreenHeight() - 10) }; + speedFX.spawnTime = 0; + speedFX.maxTime = GetRandomValue(1, 10); + //i = MAX_PARTICLES; + } + } + } + + for (int i = 0; i < MAX_PARTICLES_SPEED; i++) + { + if (speedFX.particle[i].active) + { + speedFX.particle[i].position.x -= 40; + speedFX.particle[i].alpha -= 0.015f; + speedFX.particle[i].size.y -= 0.1f; + + if (speedFX.particle[i].size.y <= 0) speedFX.particle[i].active = false; + } + } + + // Ray Particles + if (rayParticles.active) + { + rayParticles.spawnTime += 1*TIME_FACTOR; + backRayParticles.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_PARTICLES_RAY; i++) + { + if (!rayParticles.particles[i].active && (rayParticles.spawnTime >= rayParticles.maxTime)) + { + //printf("PARTICLEEES"); + rayParticles.particles[i].active = true; + rayParticles.particles[i].alpha = 0.0f; + rayParticles.particles[i].size = (float)(GetRandomValue(10, 20)/10); + rayParticles.particles[i].position = (Vector2){ GetRandomValue(300, GetScreenWidth() + 200), 0 }; + rayParticles.particles[i].rotation = -35; + rayParticles.spawnTime = 0; + rayParticles.particles[i].delayCounter = 0; + rayParticles.maxTime = GetRandomValue(20, 50); + } + + if (!backRayParticles.particles[i].active && (backRayParticles.spawnTime >= backRayParticles.maxTime)) + { + backRayParticles.particles[i].active = true; + backRayParticles.particles[i].alpha = 0.0f; + backRayParticles.particles[i].size = (float)(GetRandomValue(5, 15)/10); + backRayParticles.particles[i].position = (Vector2){ GetRandomValue(300, GetScreenWidth() + 200), 0 }; + backRayParticles.particles[i].rotation = -35; + backRayParticles.spawnTime = 0; + backRayParticles.particles[i].delayCounter = 0; + backRayParticles.maxTime = GetRandomValue(20, 50); + } + } + } + + // Particles Logic + for (int i = 0; i < MAX_PARTICLES; i++) + { + if (snowParticle.particles[i].active) + { + snowParticle.particles[i].position.y += 2*speedMod*TIME_FACTOR; + snowParticle.particles[i].position.x -= 4*speedMod*TIME_FACTOR; + snowParticle.particles[i].rotation += 0.5*TIME_FACTOR; + + if (snowParticle.particles[i].position.y >= GetScreenHeight()) snowParticle.particles[i].active = false; + } + + if (backSnowParticle.particles[i].active) + { + backSnowParticle.particles[i].position.y += (int)1.5f*speedMod*TIME_FACTOR; + backSnowParticle.particles[i].position.x -= 5*speedMod*TIME_FACTOR; + backSnowParticle.particles[i].rotation += 0.5*TIME_FACTOR; + + if (backSnowParticle.particles[i].position.y >= GetScreenHeight()) backSnowParticle.particles[i].active = false; + } + + if (planetreeParticle.particles[i].active) + { + planetreeParticle.particles[i].position.y += 4*speedMod*TIME_FACTOR; + planetreeParticle.particles[i].position.x -= 5*speedMod*TIME_FACTOR; + planetreeParticle.particles[i].rotation += 0.5*TIME_FACTOR; + + if (planetreeParticle.particles[i].position.y >= GetScreenHeight()) planetreeParticle.particles[i].active = false; + } + + if (backPlanetreeParticle.particles[i].active) + { + backPlanetreeParticle.particles[i].position.y += 3*speedMod*TIME_FACTOR; + backPlanetreeParticle.particles[i].position.x -= 5*speedMod*TIME_FACTOR; + backPlanetreeParticle.particles[i].rotation += 0.5*TIME_FACTOR; + + if (backPlanetreeParticle.particles[i].position.y >= GetScreenHeight()) backPlanetreeParticle.particles[i].active = false; + } + + if (dandelionParticle.particles[i].active) + { + dandelionParticle.particles[i].position.y += 3*speedMod*TIME_FACTOR; + dandelionParticle.particles[i].position.x -= 5*speedMod*TIME_FACTOR; + dandelionParticle.particles[i].rotation = -(30*sin(2*PI/120*globalFrameCounter + dandelionParticle.particles[i].rotPhy) + 30); + + if (dandelionParticle.particles[i].position.y >= GetScreenHeight()) dandelionParticle.particles[i].active = false; + } + + if (dandelionBackParticle.particles[i].active) + { + dandelionBackParticle.particles[i].position.y += (int)1.5f*speedMod*TIME_FACTOR; + dandelionBackParticle.particles[i].position.x -= 5*speedMod*TIME_FACTOR; + dandelionBackParticle.particles[i].rotation = 30*sin(2*PI/120*globalFrameCounter + dandelionParticle.particles[i].rotPhy) + 30; + + if (dandelionBackParticle.particles[i].position.y >= GetScreenHeight()) dandelionBackParticle.particles[i].active = false; + } + + if (flowerParticle.particles[i].active) + { + flowerParticle.particles[i].position.y += 2.5f*speedMod*TIME_FACTOR; + flowerParticle.particles[i].position.x -= 4*speedMod*TIME_FACTOR; + flowerParticle.particles[i].rotation += 0.5*TIME_FACTOR; + + if (flowerParticle.particles[i].position.y >= GetScreenHeight()) flowerParticle.particles[i].active = false; + } + + if (backFlowerParticle.particles[i].active) + { + backFlowerParticle.particles[i].position.y += 2.5f*speedMod*TIME_FACTOR; + backFlowerParticle.particles[i].position.x -= 5*speedMod*TIME_FACTOR; + backFlowerParticle.particles[i].rotation += 0.5*TIME_FACTOR; + + if (backFlowerParticle.particles[i].position.y >= GetScreenHeight()) backFlowerParticle.particles[i].active = false; + } + + if (rainParticle.particles[i].active) + { + rainParticle.particles[i].position.y += 8*speedMod*TIME_FACTOR; + rainParticle.particles[i].position.x -= 10*speedMod*TIME_FACTOR; + //rainParticle.particles[i].rotation += 0.5; + + if (rainParticle.particles[i].position.y >= GetScreenHeight()) rainParticle.particles[i].active = false; + } + + if (backRainParticle.particles[i].active) + { + backRainParticle.particles[i].position.y += 6*speedMod*TIME_FACTOR; + backRainParticle.particles[i].position.x -= 6*speedMod*TIME_FACTOR; + //rainParticle.particles[i].rotation += 0.5; + + if (backRainParticle.particles[i].position.y >= GetScreenHeight()) backRainParticle.particles[i].active = false; + } + } + + for (int i = 0; i < MAX_PARTICLES_STORM; i++) + { + if (rainStormParticle.particles[i].active) + { + rainStormParticle.particles[i].position.y += 12*speedMod*TIME_FACTOR; + rainStormParticle.particles[i].position.x -= 15*speedMod*TIME_FACTOR; + //rainParticle.particles[i].rotation += 0.5; + + if (rainStormParticle.particles[i].position.y >= GetScreenHeight()) rainStormParticle.particles[i].active = false; + if (rainStormParticle.active == false)rainStormParticle.particles[i].alpha -= 0.01; + } + } + + for (int i = 0; i < MAX_PARTICLES_STORM; i++) + { + if (snowStormParticle.particles[i].active) + { + snowStormParticle.particles[i].position.y += 12*speedMod*TIME_FACTOR; + snowStormParticle.particles[i].position.x -= 15*speedMod*TIME_FACTOR; + snowStormParticle.particles[i].rotation += 0.5*TIME_FACTOR; + if (snowStormParticle.particles[i].position.y >= GetScreenHeight()) snowStormParticle.particles[i].active = false; + } + } + + for (int i = 0; i < MAX_PARTICLES_RAY; i++) + { + if (rayParticles.particles[i].active) + { + rayParticles.particles[i].position.x -= 0.5*speedMod*TIME_FACTOR; + //printf("RAY X: %i", rayParticles.particles[i].position.x); + + if (rayParticles.particles[i].fading) + { + rayParticles.particles[i].alpha -= 0.01f; + + if (rayParticles.particles[i].alpha <= 0) + { + rayParticles.particles[i].alpha = 0; + rayParticles.particles[i].delayCounter += 1; + if (rayParticles.particles[i].delayCounter >= 30) + { + rayParticles.particles[i].active = false; + rayParticles.particles[i].delayCounter = 0; + rayParticles.particles[i].fading = false; + } + } + } + else + { + rayParticles.particles[i].alpha += 0.01f; + + if (rayParticles.particles[i].alpha >= 0.5f) + { + rayParticles.particles[i].alpha = 0.5f; + rayParticles.particles[i].delayCounter += 1*TIME_FACTOR; + if (rayParticles.particles[i].delayCounter >= 30) + { + rayParticles.particles[i].delayCounter = 0; + rayParticles.particles[i].fading = true; + } + } + } + } + + if (backRayParticles.particles[i].active) + { + backRayParticles.particles[i].position.x -= 0.5*speedMod*TIME_FACTOR; + + if (backRayParticles.particles[i].fading) + { + backRayParticles.particles[i].alpha -= 0.01f; + + if (backRayParticles.particles[i].alpha <= 0) + { + backRayParticles.particles[i].alpha = 0; + backRayParticles.particles[i].delayCounter += 1; + + if (backRayParticles.particles[i].delayCounter >= 30) + { + backRayParticles.particles[i].active = false; + backRayParticles.particles[i].delayCounter = 0; + backRayParticles.particles[i].fading = false; + } + } + } + else + { + backRayParticles.particles[i].alpha += 0.01f; + + if (backRayParticles.particles[i].alpha >= 0.5f) + { + backRayParticles.particles[i].alpha = 0.5f; + backRayParticles.particles[i].delayCounter +=1; + + if (backRayParticles.particles[i].delayCounter >= 30) + { + backRayParticles.particles[i].delayCounter = 0; + backRayParticles.particles[i].fading = true; + } + } + } + } + } + + // Player States + switch (state) + { + case GRABED: + { + onWind = false; + windCounter += 1*TIME_FACTOR; + resinCount += 1*TIME_FACTOR; + //speedMod = 1; + + thisFrameKoala += 1*TIME_FACTOR; + + if (thisFrameKoala >= 24) + { + curFrameKoala += 1; + thisFrameKoala = 0; + } + + if (curFrameKoala > 2) curFrameKoala = 0; + + koalaAnimationIddle.x = gameplay_koala_idle.x + koalaAnimationIddle.width*curFrameKoala; + + if (!onResin) + { +#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)) + if (((IsGestureDetected(GESTURE_TAP) || (GetGestureDetected() == GESTURE_DOUBLETAP)) && CheckCollisionPointRec(GetTouchPosition(0), rightButton))) + { + state = JUMPING; + velocity = JUMP; + grabCounter = 0; + jumpSpeed = 6; + rightAlpha = 1; + onIce = false; + onResin = false; + thisFrameKoala = 0; + PlaySound(fxJump); + + jumpCounter++; + } + + if (((IsGestureDetected(GESTURE_TAP) || (GetGestureDetected() == GESTURE_DOUBLETAP)) && CheckCollisionPointRec(GetTouchPosition(0), leftButton))) + { + if(!onIce)gravity = KICKSPEED; + else gravity = ICEGRAVITY; + PlaySound(fxDash); + + state = KICK; + grabCounter = 0; + leftAlpha = 1; + onResin = false; + dashCounter++; + //thisFrameKoala = 0; + } + else + { + if(!onIce)gravity = GRAVITY; + else gravity = ICEGRAVITY; + //thisFrameKoala = 0; + } +#elif (defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)) + + if (IsKeyPressed(KEY_SPACE) || (CheckCollisionPointRec(GetMousePosition(), rightButton) && IsMouseButtonPressed(0))) + { + state = JUMPING; + velocity = JUMP; + grabCounter = 0; + jumpSpeed = 6; + rightAlpha = 1; + onIce = false; + onResin = false; + thisFrameKoala = 0; + PlaySound(fxJump); + jumpCounter++; + } + + if (IsKeyPressed(KEY_DOWN) || (CheckCollisionPointRec(GetMousePosition(), leftButton) && IsMouseButtonPressed(0))) + { + if(!onIce)gravity = KICKSPEED; + else gravity = ICEGRAVITY; + PlaySound(fxDash); + + state = KICK; + grabCounter = 0; + leftAlpha = 1; + onResin = false; + dashCounter++; + //thisFrameKoala = 0; + } + else + { + if(!onIce)gravity = GRAVITY; + else gravity = ICEGRAVITY; + //thisFrameKoala = 0; + } +#endif + } + else + { +#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)) + if (((IsGestureDetected(GESTURE_TAP) || (GetGestureDetected() == GESTURE_DOUBLETAP)) && CheckCollisionPointRec(GetTouchPosition(0), rightButton))) + { + resinCountjump++; + + if (resinCountjump >= 2) + { + //thisFrameKoala = 0; + + state = JUMPING; + velocity = JUMP; + grabCounter = 0; + jumpSpeed = 6; + rightAlpha = 1; + onIce = false; + onResin = false; + resinCountjump = 0; + resinCountdrag = 0; + resinCount = 0; + jumpCounter++; + } + } + + if (((IsGestureDetected(GESTURE_TAP) || (GetGestureDetected() == GESTURE_DOUBLETAP)) && CheckCollisionPointRec(GetTouchPosition(0), leftButton))) + { + resinCountdrag ++; + + if (resinCountdrag >= 2) + { + //thisFrameKoala = 0; + gravity = KICKSPEED; + state = KICK; + grabCounter = 0; + leftAlpha = 1; + onResin = false; + resinCountjump = 0; + resinCountdrag = 0; + resinCount = 0; + dashCounter++; + } + } + else + { + gravity = 0; + } +#elif (defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)) + if (IsKeyPressed(KEY_SPACE) || (CheckCollisionPointRec(GetMousePosition(), rightButton) && IsMouseButtonPressed(0))) + { + resinCountjump++; + + if (resinCountjump >= 2) + { + //thisFrameKoala = 0; + + state = JUMPING; + velocity = JUMP; + grabCounter = 0; + jumpSpeed = 6; + rightAlpha = 1; + onIce = false; + onResin = false; + resinCountjump = 0; + resinCountdrag = 0; + resinCount = 0; + jumpCounter++; + } + } + + if (IsKeyPressed(KEY_DOWN) || (CheckCollisionPointRec(GetMousePosition(), leftButton) && IsMouseButtonPressed(0))) + { + resinCountdrag ++; + + if (resinCountdrag >= 2) + { + //thisFrameKoala = 0; + gravity = KICKSPEED; + state = KICK; + grabCounter = 0; + leftAlpha = 1; + onResin = false; + resinCountjump = 0; + resinCountdrag = 0; + resinCount = 0; + dashCounter++; + } + } + else + { + gravity = 0; + } +#endif + } + } break; + case JUMPING: + { + player.x += jumpSpeed*TIME_FACTOR; + velocity -= 1*TIME_FACTOR*TIME_FACTOR; + player.y -= velocity; + framesCounter += 1*TIME_FACTOR; + grabCounter+= 1*TIME_FACTOR; + + } break; + case KICK: + { + gravity += 1*TIME_FACTOR*TIME_FACTOR; + player.y += gravity; + player.x -= speed; + grabCounter += 1*TIME_FACTOR; + + // DONE: Review, before checking collision with ALL enemies, check if they are active! + for (int i = 0; i < MAX_ENEMIES; i++) + { + if (CheckCollisionRecs(player, snake[i]) && !isHitSnake[i] && snakeActive[i]) + { + state = JUMPING; + velocity = JUMP; + enemyVel[i] = 8; + grabCounter = 3; + gravity = KICKSPEED; + isHitSnake[i] = true; + jumpSpeed = -3; + score += SNAKESCORE; + killHistory[killCounter] = 1; + killCounter++; + PlaySound(fxDieSnake); + snakeKillCounter++; + globalKillCounter++; + + enemyHit[i].position = (Vector2){ snake[i].x, snake[i].y }; + enemyHit[i].speed = (Vector2){ snake[i].x, snake[i].y }; + enemyHit[i].size = (float)GetRandomValue(5, 10)/30; + enemyHit[i].rotation = 0.0f; + //enemyHit[i].color = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 }; + enemyHit[i].alpha = 1.0f; + enemyHit[i].active = true; + + popupScore[i].position = (Vector2){ snake[i].x,snake[i].y }; + popupScore[i].scale = 1.0f; + popupScore[i].alpha = 1.0f; + popupScore[i].score = SNAKESCORE; + popupScore[i].active = true; + } + + if (CheckCollisionRecs(player, dingo[i]) && !isHitDingo[i] && dingoActive[i]) + { + state = JUMPING; + velocity = JUMP; + enemyVel[i] = 8*TIME_FACTOR; + grabCounter = 3*TIME_FACTOR; + gravity = KICKSPEED; + isHitDingo[i] = true; + jumpSpeed = -3; + score += DINGOSCORE; + killHistory[killCounter] = 2; + killCounter++; + PlaySound(fxDieDingo); + dingoKillCounter++; + globalKillCounter++; + + enemyHit[i].position = (Vector2){ dingo[i].x, dingo[i].y }; + enemyHit[i].speed = (Vector2){ dingo[i].x, dingo[i].y }; + enemyHit[i].size = (float)GetRandomValue(5, 10)/30; + enemyHit[i].rotation = 0.0f; + //enemyHit[i].color = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 }; + enemyHit[i].alpha = 1.0f; + enemyHit[i].active = true; + + popupScore[i].position = (Vector2){ dingo[i].x,dingo[i].y }; + popupScore[i].scale = 1.0f; + popupScore[i].alpha = 1.0f; + popupScore[i].score = DINGOSCORE; + popupScore[i].active = true; + } + + if (CheckCollisionRecs(player, owl[i]) && !isHitOwl[i] && owlActive[i]) + { + state = JUMPING; + velocity = JUMP; + enemyVel[i] = 8; + grabCounter = 3; + gravity = KICKSPEED; + isHitOwl[i] = true; + jumpSpeed = -3; + score += OWLSCORE; + killHistory[killCounter] = 3; + killCounter++; + PlaySound(fxDieOwl); + owlKillCounter++; + globalKillCounter++; + + enemyHit[i].position = (Vector2){ owl[i].x, owl[i].y }; + enemyHit[i].speed = (Vector2){ owl[i].x, owl[i].y }; + enemyHit[i].size = (float)GetRandomValue(5, 10)/30; + enemyHit[i].rotation = 0.0f; + //enemyHit[i].color = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 }; + enemyHit[i].alpha = 1.0f; + enemyHit[i].active = true; + + popupScore[i].position = (Vector2){ owl[i].x,owl[i].y }; + popupScore[i].scale = 1.0f; + popupScore[i].alpha = 1.0f; + popupScore[i].score = OWLSCORE; + popupScore[i].active = true; + } + } + + if (CheckCollisionRecs(player, bee) && !isHitBee && beeActive) + { + state = JUMPING; + velocity = JUMP; + beeVelocity = 8; + grabCounter = 3; + gravity = KICKSPEED; + isHitBee = true; + jumpSpeed = -3; + score += BEESCORE; + killHistory[killCounter] = 4; + killCounter++; + beeKillCounter++; + globalKillCounter++; + + popupBee.position = (Vector2){ bee.x, bee.y }; + popupBee.scale = 1.0f; + popupBee.alpha = 1.0f; + popupBee.score = BEESCORE; + popupBee.active = true; + } + + if (CheckCollisionRecs(player, eagle) && !isHitEagle && eagleActive) + { + state = JUMPING; + velocity = JUMP; + beeVelocity = 8; + grabCounter = 3; + gravity = KICKSPEED; + isHitEagle = true; + jumpSpeed = -3; + score += EAGLESCORE; + killHistory[killCounter] = 5; + killCounter++; + eagleKillCounter++; + globalKillCounter++; + + popupEagle.position = (Vector2){ eagle.x, eagle.y }; + popupEagle.scale = 1.0f; + popupEagle.alpha = 1.0f; + popupEagle.score = EAGLESCORE; + popupEagle.active = true; + } + } break; + case FINALFORM: + { + if (transforming) + { + speedMod = 0; + transCount += 1*TIME_FACTOR; + transRotation += 1*TIME_FACTOR; + transAniCounter += 1*TIME_FACTOR; + + thisFrameKoala += 1*TIME_FACTOR; + + currentLeaves = LinearEaseIn((float)transCount, (float)initLeaves, (float)-LEAVESTOTRANSFORM, 120.0f); + + if (thisFrameKoala >= 24) + { + curFrameKoala += 1; + thisFrameKoala = 0; + } + + //if (curFrameKoala > 1) curFrameKoala = ; + + if(curFrameKoala <= 1 )koalaAnimationTransform.x = gameplay_koala_transform.x + koalaAnimationTransform.width*curFrameKoala; + + if (transAniCounter >= 5) + { + transBackAnim = !transBackAnim; + transAniCounter = 0; + } + + if (transBackAnim) + { + finalColor = RED; + finalColor2 = WHITE; + } + + if (!transBackAnim) + { + finalColor = WHITE; + finalColor2 = RED; + } + + if (transCount >= 120) + { + transforming = false; + thisFrameKoala = 0; + curFrameKoala = 0; + speedFX.active = true; + //speedMod = 2; + transCount = 0; + //printf ("THIS ISN'T EVEN MY FINAL FORM"); + bambooTimer += 15*TIME_FACTOR; + } + } + else if (!transforming) + { + speedMod = 5; + scrollSpeed = 3.2f*TIME_FACTOR; + power -= 1*TIME_FACTOR; + + thisFrameKoala += 1*TIME_FACTOR; + + if (thisFrameKoala >= 12) + { + curFrameKoala ++; + thisFrameKoala = 0; + } + + if (curFrameKoala > 1) curFrameKoala = 0; + if (curFrameKoala <= 1) koalaAnimationFly.x = gameplay_koala_fly.x + koalaAnimationFly.width*curFrameKoala; + if (player.x > GetScreenWidth()/3) player.x -= 2; + if (player.x < GetScreenWidth()/3) player.x++; + + if (power <= maxPower/5) + { + finalFormEnd += 1*TIME_FACTOR; + if (finalFormEnd >= 5) + { + transBackAnim = !transBackAnim; + finalFormEnd = 0; + } + + if (transBackAnim) + { + finalColor = RED; + } + + if (!transBackAnim) + { + finalColor = WHITE; + } + } + else finalColor = WHITE; + +#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)) + if ((IsGestureDetected(GESTURE_HOLD) || (GetGestureDetected() == GESTURE_DRAG)) && CheckCollisionPointRec(GetTouchPosition(0), leftButton)) player.y += FLYINGMOV; + if ((IsGestureDetected(GESTURE_HOLD) || (GetGestureDetected() == GESTURE_DRAG)) && CheckCollisionPointRec(GetTouchPosition(0), rightButton)) player.y -= FLYINGMOV; +#elif (defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)) + if (IsKeyDown(KEY_DOWN) || (CheckCollisionPointRec(GetMousePosition(), leftButton) && IsMouseButtonDown(0))) player.y += FLYINGMOV; + if (IsKeyDown(KEY_UP) || (CheckCollisionPointRec(GetMousePosition(), rightButton) && IsMouseButtonDown(0))) player.y -= FLYINGMOV; +#endif + } + + gravity = 0; + grabCounter ++; + + } break; + case ONWIND: + { + player.x -= jumpSpeed*TIME_FACTOR; + velocity -= 2*TIME_FACTOR; + player.y -= velocity; + framesCounter += 1*TIME_FACTOR; + grabCounter += 1*TIME_FACTOR; + + } break; + default: break; + } + + if (player.x <= (-player.width)) + { + play = false; + playerActive = false; + killer = 4; + } + + if ((player.y + player.height) >= GetScreenHeight()) + { + if (state == FINALFORM) player.y = GetScreenHeight() - player.height; + else + { + play = false; + playerActive = false; + killer = 4; + } + } + + if ((player.y) <= 0 && state == FINALFORM) player.y = 0; + if (player.x >= (GetScreenWidth() - player.width)) player.x = (GetScreenWidth() - player.width); + if (player.y <= -32) player.y = -32; + + if (bambooTimer > bambooSpawnTime) + { + if (!transforming) + { + BambooSpawn(); + + if (state != FINALFORM && eagleDelay >= EAGLE_TIME_DELAY)EagleSpawn(EAGLE_SPAWNCHANCE); + + switch (season) + { + case WINTER: + IceSpawn(ICESPAWNCHANCE); + OwlSpawn(OWLSPAWNCHANCE + (int)progresionSpawnChance); + break; + case SPRING: + ResinSpawn(RESINSPAWNCHANCE); + if (state != FINALFORM)BeeSpawn(BEE_SPAWNCHANCE); + DingoSpawn(DINGOSPAWNCHANCE + (int)progresionSpawnChance); + break; + case SUMMER: + FireSpawn(FIRESPAWNCHANCE); + SnakeSpawn(SNAKESPAWNCHANCE + (int)progresionSpawnChance); + break; + case FALL: + WindSpawn(WINDSPAWNCHANCE); + SnakeSpawn(SNAKESPAWNCHANCE + (int)progresionSpawnChance); + break; + default: break; + } + + LeafSpawn(); + } + + bambooTimer = 0; + bambooSpawnTime = GetRandomValue(MINTIMESPAWN, MAXTIMESPAWN); + } + } + else if (!play && !playerActive) + { + if (score > hiscore) hiscore = score; + + player.x -= jumpSpeed; + velocity -= 1*TIME_FACTOR; + player.y -= velocity; + + if(player.y >= GetScreenHeight()) + { + deathsCounter++; + finishScreen = 1; + } + } +} + +// Gameplay Screen Draw logic +void DrawGameplayScreen(void) +{ + BeginShaderMode(colorBlend); + + DrawTexturePro(atlas02, gameplay_background, (Rectangle){0, 0, gameplay_background.width*2, gameplay_background.height*2}, (Vector2){0, 0}, 0, color02); + + // Draw parallax + DrawParallaxBack(); + DrawParallaxMiddle(); + + // Draw particles (only if active) + for (int i = 0; i < MAX_PARTICLES; i++) + { + if (backSnowParticle.particles[i].active) DrawTexturePro(atlas02, particle_icecrystal_bw, + (Rectangle){ backSnowParticle.particles[i].position.x, backSnowParticle.particles[i].position.y, particle_icecrystal_bw.width*backSnowParticle.particles[i].size, particle_icecrystal_bw.height*backSnowParticle.particles[i].size }, + (Vector2){ particle_icecrystal_bw.width*backSnowParticle.particles[i].size/2, particle_icecrystal_bw.height*backSnowParticle.particles[i].size/2 }, backSnowParticle.particles[i].rotation, + Fade((Color){144, 214, 255, 255}, backSnowParticle.particles[i].alpha)); + + if (backPlanetreeParticle.particles[i].active) DrawTexturePro(atlas02, particle_planetreeleaf_bw, + (Rectangle){ backPlanetreeParticle.particles[i].position.x, backPlanetreeParticle.particles[i].position.y, particle_planetreeleaf_bw.width*backPlanetreeParticle.particles[i].size, particle_planetreeleaf_bw.height*backPlanetreeParticle.particles[i].size }, + (Vector2){ particle_planetreeleaf_bw.width*backPlanetreeParticle.particles[i].size/2, particle_planetreeleaf_bw.height*backPlanetreeParticle.particles[i].size/2 }, backPlanetreeParticle.particles[i].rotation, + Fade((Color){179, 86, 6, 255}, backPlanetreeParticle.particles[i].alpha)); + + if (dandelionBackParticle.particles[i].active) DrawTexturePro(atlas02, particle_dandelion_bw, + (Rectangle){ dandelionBackParticle.particles[i].position.x, dandelionBackParticle.particles[i].position.y, particle_dandelion_bw.width*dandelionBackParticle.particles[i].size, particle_dandelion_bw.height*dandelionBackParticle.particles[i].size }, + (Vector2){ particle_dandelion_bw.width*dandelionBackParticle.particles[i].size/2, particle_dandelion_bw.height*dandelionBackParticle.particles[i].size/2 }, dandelionBackParticle.particles[i].rotation, + Fade((Color){202, 167, 126, 255}, dandelionBackParticle.particles[i].alpha)); + + if (backFlowerParticle.particles[i].active) DrawTexturePro(atlas02, particle_ecualyptusflower_bw, + (Rectangle){ backFlowerParticle.particles[i].position.x, backFlowerParticle.particles[i].position.y, particle_ecualyptusflower_bw.width*backFlowerParticle.particles[i].size, particle_ecualyptusflower_bw.height*backFlowerParticle.particles[i].size }, + (Vector2){ particle_ecualyptusflower_bw.width*backFlowerParticle.particles[i].size/2, particle_ecualyptusflower_bw.height*backFlowerParticle.particles[i].size/2 }, backFlowerParticle.particles[i].rotation, + Fade((Color){218, 84, 108, 255}, backFlowerParticle.particles[i].alpha)); + + if (backRainParticle.particles[i].active) DrawTexturePro(atlas02, particle_waterdrop_bw, + (Rectangle){ backRainParticle.particles[i].position.x, backRainParticle.particles[i].position.y, particle_waterdrop_bw.width*backRainParticle.particles[i].size, particle_waterdrop_bw.height*backRainParticle.particles[i].size }, + (Vector2){ particle_waterdrop_bw.width*backRainParticle.particles[i].size/2, particle_waterdrop_bw.height*backRainParticle.particles[i].size/2 }, backRainParticle.particles[i].rotation, + Fade((Color){144, 183, 187, 255}, backRainParticle.particles[i].alpha)); + } + + for (int i = 0; i < MAX_PARTICLES_RAY; i++) + { + if (backRayParticles.particles[i].active) DrawTexturePro(atlas02, gameplay_back_fx_lightraymid, + (Rectangle){ backRayParticles.particles[i].position.x, backRayParticles.particles[i].position.y, gameplay_back_fx_lightraymid.width*backRayParticles.particles[i].size, gameplay_back_fx_lightraymid.height*backRayParticles.particles[i].size }, + (Vector2){ gameplay_back_fx_lightraymid.width*backRayParticles.particles[i].size/2, gameplay_back_fx_lightraymid.height*backRayParticles.particles[i].size/2 }, backRayParticles.particles[i].rotation, + Fade(backRayParticles.particles[i].color, backRayParticles.particles[i].alpha)); + } + + DrawParallaxFront(); + + for (int i = 0; i < MAX_BAMBOO; i++) + { + if (bambooActive[i]) + { + DrawTexturePro(atlas02, gameplay_props_tree, (Rectangle){bamboo[i].x, bamboo[i].y, 43, 720}, (Vector2){0, 0}, 0, color03); + } + } + + for (int i = 0; i < MAX_ENEMIES; i++) + { + if (branchActive[i]) + { + DrawTexturePro(atlas02, gameplay_props_owl_branch, (Rectangle){branchPos[i].x, branchPos[i].y, 36, 20}, (Vector2){0, 0}, 0, color03); + } + } + + EndShaderMode(); + + for (int i = 0; i < MAX_FIRE; i++) + { + DrawTexturePro(atlas01, (Rectangle){gameplay_props_burnttree.x, gameplay_props_burnttree.y + fire[i].y + gameplay_props_burnttree.height/14, gameplay_props_burnttree.width, gameplay_props_burnttree.height}, + (Rectangle){fire[i].x + 5, fire[i].y + gameplay_props_burnttree.height/14, gameplay_props_burnttree.width, gameplay_props_burnttree.height}, (Vector2){0, 0}, 0, WHITE); + DrawTextureRec(atlas01, fireAnimation, (Vector2){fire[i].x, GetScreenHeight() - gameplay_props_burnttree.height/7}, WHITE); + + for(int j = MAX_FIRE_FLAMES; j > -2; j--) + { + if ((fire[i].y - 25 <= (j*43)) && fireActive[i]) + { + if (j%2 > 0) + { + DrawTextureRec(atlas01, fireAnimation, (Vector2){fire[i].x + fireOffset - 10, 40*j}, WHITE); + fireAnimation.x = gameplay_props_fire_spritesheet.x + fireAnimation.width*curFrame1; + } + else if (j%2 + 1 == 1) + { + DrawTextureRec(atlas01, fireAnimation, (Vector2){fire[i].x - fireOffset , 40*j}, WHITE); + fireAnimation.x = gameplay_props_fire_spritesheet.x + fireAnimation.width*curFrame2; + } + else + { + DrawTextureRec(atlas01, fireAnimation, (Vector2){fire[i].x - fireOffset , 40*j}, WHITE); + fireAnimation.x = gameplay_props_fire_spritesheet.x + fireAnimation.width*curFrame3; + } + } + } + } + + for (int i = 0; i < MAX_ICE; i++) + { + if (iceActive[i]) for (int k = 0; k < GetScreenHeight(); k += (GetScreenHeight()/6)) DrawTexturePro(atlas01, gameplay_props_ice_sprite, (Rectangle){ice[i].x - 5, ice[i].y+k, gameplay_props_ice_sprite.width, gameplay_props_ice_sprite.height}, (Vector2){0,0}, 0, WHITE); + } + + BeginShaderMode(colorBlend); + + DrawTexturePro(atlas02, gameplay_back_ground00, (Rectangle){(int)groundPos + GetScreenWidth(), 637, gameplay_back_ground00.width*2, gameplay_back_ground00.height*2}, (Vector2){0,0}, 0, color00); + DrawTexturePro(atlas02, gameplay_back_ground00, (Rectangle){(int)groundPos, 637, gameplay_back_ground00.width*2, gameplay_back_ground00.height*2}, (Vector2){0,0}, 0, color00); + + EndShaderMode(); + + for (int i = 0; i < MAX_RESIN; i++) + { + if (resinActive[i]) DrawTextureRec(atlas01, gameplay_props_resin_sprite,(Vector2){ resin[i].x - resin[i].width/3, resin[i].y - resin[i].height/5}, WHITE); + } + + for (int i = 0; i < MAX_ENEMIES; i++) + { + if (snakeActive[i]) + { + if (!isHitSnake[i])DrawTextureRec(atlas01, snakeAnimation, (Vector2){snake[i].x - snake[i].width, snake[i].y - snake[i].height/2}, WHITE); + else DrawTextureRec(atlas01, (Rectangle){gameplay_enemy_snake.x + snakeAnimation.width*2, gameplay_enemy_snake.y, snakeAnimation.width, snakeAnimation.height}, (Vector2){snake[i].x - snake[i].width/2, snake[i].y - snake[i].height/2}, WHITE); + } + + if (dingoActive[i]) + { + if (!isHitDingo[i]) DrawTextureRec(atlas01, dingoAnimation, (Vector2){dingo[i].x - dingo[i].width/2, dingo[i].y - dingo[i].height/4}, WHITE); + else DrawTextureRec(atlas01, (Rectangle){gameplay_enemy_dingo.x + dingoAnimation.width*2, gameplay_enemy_dingo.y, dingoAnimation.width, dingoAnimation.height}, (Vector2){dingo[i].x - dingo[i].width/2, dingo[i].y - dingo[i].height/4}, WHITE); + } + + if (owlActive[i]) + { + if (!isHitOwl[i])DrawTextureRec(atlas01, owlAnimation, (Vector2){owl[i].x - owl[i].width*0.7, owl[i].y - owl[i].height*0.1}, WHITE); + else DrawTextureRec(atlas01, (Rectangle){gameplay_enemy_owl.x + owlAnimation.width*2, gameplay_enemy_owl.y, owlAnimation.width, owlAnimation.height}, (Vector2){owl[i].x - owl[i].width/2, owl[i].y - owl[i].height/6}, WHITE); + } + + if (enemyHit[i].active) + { + DrawTexturePro(atlas01, particle_hit, + (Rectangle){ enemyHit[i].position.x, enemyHit[i].position.y, particle_hit.width*enemyHit[i].size, particle_hit.height*enemyHit[i].size }, + (Vector2){ particle_hit.width*enemyHit[i].size/2, particle_hit.height*enemyHit[i].size/2 }, enemyHit[i].rotation, + Fade(enemyHit[i].color, enemyHit[i].alpha)); + } + } + + // Only one bee / eagle / alert at the same time + + for (int i = 0; i < MAX_LEAVES; i++) + { + if (leafActive[i]) + { + if (leafSide[i]) + { + if (leafType[i] == 0) DrawTextureRec(atlas01, (Rectangle){ gameplay_props_leaf_lil.x, gameplay_props_leaf_lil.y, -gameplay_props_leaf_lil.width, gameplay_props_leaf_lil.height }, (Vector2){ leaf[i].x, leaf[i].y - 15 }, WHITE); + else if (leafType[i] == 1) DrawTextureRec(atlas01, (Rectangle){ gameplay_props_leaf_lil.x, gameplay_props_leaf_lil.y, -gameplay_props_leaf_lil.width, gameplay_props_leaf_lil.height }, (Vector2){leaf[i].x, leaf[i].y + 10 }, WHITE); + else if (leafType[i] == 2) DrawTextureRec(atlas01, (Rectangle){ gameplay_props_leaf_mid.x, gameplay_props_leaf_mid.y, -gameplay_props_leaf_mid.width, gameplay_props_leaf_mid.height }, (Vector2){leaf[i].x, leaf[i].y - 15 }, WHITE); + else if (leafType[i] == 3) DrawTextureRec(atlas01, (Rectangle){ gameplay_props_leaf_big.x, gameplay_props_leaf_big.y, -gameplay_props_leaf_big.width, gameplay_props_leaf_big.height }, (Vector2){leaf[i].x, leaf[i].y - 15 }, WHITE); + } + else + { + if (leafType[i] == 0) DrawTextureRec(atlas01, gameplay_props_leaf_lil, (Vector2){ leaf[i].x - 25, leaf[i].y - 15 }, WHITE); + else if (leafType[i] == 1) DrawTextureRec(atlas01, gameplay_props_leaf_lil, (Vector2){leaf[i].x - 25, leaf[i].y + 10 }, WHITE); + else if (leafType[i] == 2) DrawTextureRec(atlas01, gameplay_props_leaf_mid, (Vector2){leaf[i].x - 25, leaf[i].y - 15 }, WHITE); + else if (leafType[i] == 3) DrawTextureRec(atlas01, gameplay_props_leaf_big, (Vector2){leaf[i].x - 25, leaf[i].y - 15 }, WHITE); + } +#if defined(DEBUG) + DrawRectangle(leaf[i].x, leaf[i].y, 64, 64, Fade(GREEN, 0.5f)); +#endif + } + + if (leafParticles[i].active) + { + for (int j = 0; j < 32; j++) + { + DrawTexturePro(atlas01, particle_ecualyptusleaf, + (Rectangle){ leafParticles[i].particles[j].position.x, leafParticles[i].particles[j].position.y, particle_ecualyptusleaf.width*leafParticles[i].particles[j].size, particle_ecualyptusleaf.height*leafParticles[i].particles[j].size }, + (Vector2){ particle_ecualyptusleaf.width/2*leafParticles[i].particles[j].size, particle_ecualyptusleaf.height/2*leafParticles[i].particles[j].size }, leafParticles[i].particles[j].rotation, Fade(WHITE,leafParticles[i].particles[j].alpha)); + } + } + } + + if (beeActive && !isHitBee) DrawTextureRec(atlas01, beeAnimation, (Vector2){bee.x, bee.y - gameplay_enemy_bee.height/2}, WHITE); + else if (beeActive && isHitBee) DrawTexturePro(atlas01, (Rectangle){gameplay_enemy_bee.x + beeAnimation.width*4, gameplay_enemy_bee.y, beeAnimation.width, gameplay_enemy_bee.height}, + (Rectangle){bee.x, bee.y, beeAnimation.width, gameplay_enemy_bee.height}, (Vector2){0, 0}, 0, WHITE); + + if (eagleActive && !isHitEagle) DrawTextureRec(atlas01, eagleAnimation, (Vector2){eagle.x, eagle.y}, WHITE); + else if (eagleActive && isHitEagle) DrawTextureRec(atlas01, gameplay_enemy_eagle_death, (Vector2){eagle.x, eagle.y}, WHITE); + + if (alertActive) DrawTexturePro(atlas01, gameplay_fx_eaglealert, alertRectangle, (Vector2){0, 0}, 0, Fade(RED, 0.7f)); + if (alertBeeActive) DrawTexturePro(atlas01, gameplay_fx_eaglealert, beeAlertRectangle, (Vector2){0, 0}, 0, Fade(ORANGE, 0.7f)); + + if (transforming) + { + for (int i = 0; i < 8; i++) + { + DrawTexturePro(atlas02, background_transformation, + (Rectangle){player.x + player.width/2 , player.y + player.height/2, background_transformation.width*4, background_transformation.height*4}, + (Vector2){0, background_transformation.height*2}, 45*i, Fade(finalColor, 0.7f)); + } + + for (int i = 0; i < 8; i++) + { + DrawTexturePro(atlas02, background_transformation, + (Rectangle){player.x + player.width/2 , player.y + player.height/2, background_transformation.width*4, background_transformation.height}, + (Vector2){0, background_transformation.height/2}, 22.5 + 45*i, Fade(finalColor2, 0.7f)); + } + } + + if (playerActive && play) + { + switch(state) + { + case GRABED: DrawTextureRec(atlas01, koalaAnimationIddle, (Vector2){player.x - player.width, player.y - gameplay_koala_idle.height/4}, WHITE); break; + case JUMPING: DrawTexturePro(atlas01, gameplay_koala_jump, (Rectangle){player.x - player.width, player.y - gameplay_koala_jump.height/4, gameplay_koala_jump.width, gameplay_koala_jump.height}, (Vector2){0, 0}, 0, WHITE); break; + case KICK:DrawTexturePro(atlas01, gameplay_koala_dash, (Rectangle){player.x - player.width, player.y - gameplay_koala_jump.height/4, gameplay_koala_dash.width, gameplay_koala_dash.height}, (Vector2){0, 0}, 0, WHITE); break; + case FINALFORM: + { + if(transforming)DrawTexturePro(atlas01, koalaAnimationTransform, (Rectangle){player.x - player.width, player.y - gameplay_koala_transform.height/4, gameplay_koala_transform.width/2, gameplay_koala_transform.height}, (Vector2){0, 0}, 0, finalColor); + else DrawTexturePro(atlas01, koalaAnimationFly, (Rectangle){player.x - gameplay_koala_fly.width/3, player.y - gameplay_koala_fly.height/4, gameplay_koala_fly.width/2, gameplay_koala_fly.height}, (Vector2){0, 0}, 0, finalColor);//DrawTextureRec((koalaFly), (Rectangle){0, 0, 128, 128}, (Vector2){player.x - 50, player.y - 40}, WHITE); + + } break; + case ONWIND: DrawTexturePro(atlas01, gameplay_koala_jump, (Rectangle){player.x - player.width, player.y - gameplay_koala_jump.height/4, gameplay_koala_jump.width, gameplay_koala_jump.height}, (Vector2) { 0, 0}, 0, WHITE); break; + default: break; + } + } + else if (play == false && playerActive) DrawTextureRec(atlas01, (Rectangle){gameplay_koala_idle.x, gameplay_koala_idle.y, gameplay_koala_idle.width/3, gameplay_koala_idle.height}, (Vector2){player.x - player.width, player.y - gameplay_koala_idle.height/4}, WHITE); + else DrawTexturePro(atlas01, gameplay_koala_die, (Rectangle){player.x - player.width, player.y - gameplay_koala_die.height/4, gameplay_koala_die.width, gameplay_koala_die.height}, (Vector2) { 0, 0}, 0, WHITE); + + for (int i = 0; i < MAX_WIND; i++) + { + if (windActive[i]) DrawTextureRec(atlas01, windAnimation, (Vector2){wind[i].x - 14, wind[i].y - 14}, WHITE); + } + + if (playerActive && !play) + { + if (initSeason == 0) DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade((Color){216, 200, 39, 255}, 0.4)); + else if (initSeason == 1) DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade((Color){155, 70, 22, 255}, 0.4)); + else if (initSeason == 2) DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade((Color){17, 129, 162, 255}, 0.4)); + else DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade((Color){82, 174, 7, 255}, 0.4)); + } + + for (int i = 0; i < MAX_PARTICLES; i++) + { + if (snowParticle.particles[i].active) DrawTexturePro(atlas01, particle_icecrystal, + (Rectangle){ snowParticle.particles[i].position.x, snowParticle.particles[i].position.y, particle_icecrystal.width*snowParticle.particles[i].size, particle_icecrystal.height*snowParticle.particles[i].size }, + (Vector2){ particle_icecrystal.width*snowParticle.particles[i].size/2, particle_icecrystal.height*snowParticle.particles[i].size/2 }, snowParticle.particles[i].rotation, + Fade(snowParticle.particles[i].color, snowParticle.particles[i].alpha)); + + if (planetreeParticle.particles[i].active) DrawTexturePro(atlas01, particle_planetreeleaf, + (Rectangle){ planetreeParticle.particles[i].position.x, planetreeParticle.particles[i].position.y, particle_planetreeleaf.width*planetreeParticle.particles[i].size, particle_planetreeleaf.height*planetreeParticle.particles[i].size }, + (Vector2){ particle_planetreeleaf.width*planetreeParticle.particles[i].size/2, particle_planetreeleaf.height*planetreeParticle.particles[i].size/2 }, planetreeParticle.particles[i].rotation, + Fade(planetreeParticle.particles[i].color, planetreeParticle.particles[i].alpha)); + + if (dandelionParticle.particles[i].active) DrawTexturePro(atlas01, particle_dandelion, + (Rectangle){ dandelionParticle.particles[i].position.x, dandelionParticle.particles[i].position.y, particle_dandelion.width*dandelionParticle.particles[i].size, particle_dandelion.height*dandelionParticle.particles[i].size }, + (Vector2){ particle_dandelion.width*dandelionParticle.particles[i].size/2, particle_dandelion.height*dandelionParticle.particles[i].size/2 }, dandelionParticle.particles[i].rotation, + Fade(dandelionParticle.particles[i].color, dandelionParticle.particles[i].alpha)); + + if (flowerParticle.particles[i].active) DrawTexturePro(atlas01, particle_ecualyptusflower, + (Rectangle){ flowerParticle.particles[i].position.x, flowerParticle.particles[i].position.y, particle_ecualyptusflower.width*flowerParticle.particles[i].size, particle_ecualyptusflower.height*flowerParticle.particles[i].size }, + (Vector2){ particle_ecualyptusflower.width*flowerParticle.particles[i].size/2, particle_ecualyptusflower.height*flowerParticle.particles[i].size/2 }, flowerParticle.particles[i].rotation, + Fade(flowerParticle.particles[i].color, flowerParticle.particles[i].alpha)); + + if (rainParticle.particles[i].active) DrawTexturePro(atlas01, particle_waterdrop, + (Rectangle){ rainParticle.particles[i].position.x, rainParticle.particles[i].position.y, particle_waterdrop.width*rainParticle.particles[i].size, particle_waterdrop.height*rainParticle.particles[i].size }, + (Vector2){ particle_waterdrop.width*rainParticle.particles[i].size/2, particle_waterdrop.height*rainParticle.particles[i].size/2 }, rainParticle.particles[i].rotation, + Fade(rainParticle.particles[i].color, rainParticle.particles[i].alpha)); + } + + // Draw Speed Particles + for (int i = 0; i < MAX_PARTICLES_SPEED; i++) + { + if (speedFX.particle[i].active) DrawRectangle(speedFX.particle[i].position.x, speedFX.particle[i].position.y, speedFX.particle[i].size.x, speedFX.particle[i].size.y , Fade(WHITE, speedFX.particle[i].alpha)); + } + + for (int i = 0; i < MAX_PARTICLES_STORM; i++) + { + if (rainStormParticle.particles[i].active) DrawTexturePro(atlas01, particle_waterdrop, + (Rectangle){ rainStormParticle.particles[i].position.x, rainStormParticle.particles[i].position.y, particle_waterdrop.width*rainStormParticle.particles[i].size, particle_waterdrop.height*rainStormParticle.particles[i].size }, + (Vector2){ particle_waterdrop.width*rainStormParticle.particles[i].size/2, particle_waterdrop.height*rainStormParticle.particles[i].size/2 }, rainStormParticle.particles[i].rotation, + Fade(rainStormParticle.particles[i].color, rainStormParticle.particles[i].alpha)); + } + + for (int i = 0; i < MAX_PARTICLES_STORM; i++) + { + if (snowStormParticle.particles[i].active) DrawTexturePro(atlas01, particle_icecrystal, + (Rectangle){ snowStormParticle.particles[i].position.x, snowStormParticle.particles[i].position.y, particle_icecrystal.width*snowStormParticle.particles[i].size, particle_icecrystal.height*snowStormParticle.particles[i].size }, + (Vector2){ particle_icecrystal.width*snowStormParticle.particles[i].size/2, particle_icecrystal.height*snowStormParticle.particles[i].size/2 }, snowStormParticle.particles[i].rotation, + Fade(snowStormParticle.particles[i].color, snowStormParticle.particles[i].alpha)); + } + + for (int i = 0; i < MAX_PARTICLES_RAY; i++) + { + if (rayParticles.particles[i].active) DrawTexturePro(atlas01, gameplay_fx_lightraymid, + (Rectangle){ rayParticles.particles[i].position.x, rayParticles.particles[i].position.y, gameplay_fx_lightraymid.width*rayParticles.particles[i].size, gameplay_fx_lightraymid.height*rayParticles.particles[i].size }, + (Vector2){ gameplay_fx_lightraymid.width*rayParticles.particles[i].size/2, gameplay_fx_lightraymid.height*rayParticles.particles[i].size/2 }, rayParticles.particles[i].rotation, + Fade(rayParticles.particles[i].color, rayParticles.particles[i].alpha)); + } + + if (fogAlpha != 0) + { + DrawTexturePro(atlas02, background_fog02, (Rectangle){ fogPosition, GetScreenHeight()*0.6, GetScreenWidth(), background_fog02.height}, (Vector2){ 0 , 0 }, 0, Fade(WHITE, fogAlpha)); + DrawTexturePro(atlas02, background_fog02, (Rectangle){ fogPosition+GetScreenWidth(), GetScreenHeight()*0.6, GetScreenWidth(), background_fog02.height}, (Vector2){ 0 , 0 }, 0, Fade(WHITE, fogAlpha)); + } + + if (filterAlpha != 0 && state != FINALFORM) DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(SKYBLUE, filterAlpha)); + + DrawTexturePro(atlas01, gameplay_gui_leafcounter_base, (Rectangle){ 0, 0, gameplay_gui_leafcounter_base.width, gameplay_gui_leafcounter_base.height}, (Vector2){ 0 , 0 }, 0, WHITE); + + DrawTexturePro(atlas01, gameplay_gui_seasonsclock_disc, (Rectangle) {GetScreenWidth(), 0, gameplay_gui_seasonsclock_disc.width, gameplay_gui_seasonsclock_disc.height}, (Vector2) {gameplay_gui_seasonsclock_disc.width/2, gameplay_gui_seasonsclock_disc.height/2}, // Draw a part of a texture defined by a rectangle with 'pro' parameters + clockRotation, Fade(WHITE, UIfade)); + + DrawTexturePro(atlas01, gameplay_gui_seasonsclock_base, (Rectangle){ (GetScreenWidth() - gameplay_gui_seasonsclock_base.width ), 0, gameplay_gui_seasonsclock_base.width, gameplay_gui_seasonsclock_base.height}, (Vector2){ 0 , 0 }, 0, Fade(WHITE, UIfade)); + + for (int i = 0; i < 20; i++) + { + if (((currentLeaves/5) > i) && (state != FINALFORM)) DrawTexturePro(atlas01, gameplay_gui_leafcounter_cell, (Rectangle) {87, 83, gameplay_gui_leafcounter_cell.width, gameplay_gui_leafcounter_cell.height}, (Vector2) {gameplay_gui_leafcounter_cell.width/4, 69}, i*(-18), WHITE); + else if ((power/18 >= i) && (state == FINALFORM)) DrawTexturePro(atlas01, gameplay_gui_leafcounter_cell, (Rectangle) {87, 83, gameplay_gui_leafcounter_cell.width, gameplay_gui_leafcounter_cell.height}, (Vector2) {gameplay_gui_leafcounter_cell.width/4, 69}, i*(-18), WHITE); + } + + if ((currentLeaves >= LEAVESTOTRANSFORM) && (state != FINALFORM)) + { + DrawTexturePro(atlas01, gameplay_gui_leafcounter_pulsel, + (Rectangle){ 85, 84, gameplay_gui_leafcounter_pulsel.width*leafGUIpulseScale, gameplay_gui_leafcounter_pulsel.height*leafGUIpulseScale}, + (Vector2){ gameplay_gui_leafcounter_pulsel.width*leafGUIpulseScale/2 , gameplay_gui_leafcounter_pulsel.height*leafGUIpulseScale/2 }, 0, Fade((Color){126, 248, 25, 255}, leafGUIpulseFade)); + + DrawTexturePro(atlas01, gameplay_gui_leafcounter_glow, + (Rectangle){ 84, 83, gameplay_gui_leafcounter_glow.width, gameplay_gui_leafcounter_glow.height}, + (Vector2){ gameplay_gui_leafcounter_glow.width/2 , gameplay_gui_leafcounter_glow.height/2 }, 0, Fade(WHITE, leafGUIglowFade)); + } + + if ((play == false) && playerActive) + { + if (startNum == 3) DrawTexturePro(atlas01, gameplay_countdown_3, + (Rectangle){ GetScreenWidth()/2, GetScreenHeight()/2, gameplay_countdown_3.width*numberScale, gameplay_countdown_3.height*numberScale}, + (Vector2){ gameplay_countdown_3.width*numberScale/2 , gameplay_countdown_3.height*numberScale/2 }, 0, Fade(RED, numberAlpha)); + else if (startNum == 2) DrawTexturePro(atlas01, gameplay_countdown_2, + (Rectangle){ GetScreenWidth()/2, GetScreenHeight()/2, gameplay_countdown_2.width*numberScale, gameplay_countdown_2.height*numberScale}, + (Vector2){ gameplay_countdown_2.width*numberScale/2 , gameplay_countdown_2.height*numberScale/2 }, 0, Fade(RED, leafGUIpulseFade)); + else if (startNum == 1) DrawTexturePro(atlas01, gameplay_countdown_1, + (Rectangle){ GetScreenWidth()/2, GetScreenHeight()/2, gameplay_countdown_1.width*numberScale, gameplay_countdown_1.height*numberScale}, + (Vector2){ gameplay_countdown_1.width*numberScale/2 , gameplay_countdown_1.height*numberScale/2 }, 0, Fade(RED, leafGUIpulseFade)); + } + + // Draw text elements + //-------------------------- + for (int i = 0; i < MAX_ENEMIES; i++) + { + if (popupScore[i].active) + { + DrawTextEx(font, FormatText("%i", popupScore[i].score), popupScore[i].position, font.baseSize/4*popupScore[i].scale, -5, Fade((Color){255, 73, 73, 255}, popupScore[i].alpha)); + } + } + + if (popupBee.active) DrawTextEx(font, FormatText("%i", popupBee.score), popupBee.position, font.baseSize/4*popupBee.scale, -5, Fade((Color){255, 73, 73, 255}, popupBee.alpha)); + if (popupEagle.active) DrawTextEx(font, FormatText("%i", popupEagle.score), popupEagle.position, font.baseSize/4*popupEagle.scale, -5, Fade((Color){255, 73, 73, 255}, popupEagle.alpha)); + + for (int i = 0; i < MAX_LEAVES; i++) + { + if (popupLeaves[i].active) DrawTextEx(font, FormatText("+ %i", popupLeaves[i].score), popupLeaves[i].position, font.baseSize/4*popupLeaves[i].scale, -5, Fade((Color){139, 179, 0, 255}, popupLeaves[i].alpha)); + } + + + DrawTextEx(font, FormatText("%03i", currentLeaves), (Vector2){ 47, 50 }, font.baseSize, -8, counterColor); + + if (transforming) DrawTextEx(font, textFinalForm, (Vector2){ GetScreenWidth()/2 - MeasureText(textFinalForm, 40)/2, GetScreenHeight()/4}, font.baseSize, -5, (Color){246, 133, 133, 255}); + + if ((currentMonth == 7) && (transitionFramesCounter >= SEASONTRANSITION/2)) + { + if (randomMessage <= 4) DrawTextEx(font, textSpring1, (Vector2){GetScreenWidth()/2 - MeasureText(textSpring1, 40)/2, GetScreenHeight()/3}, font.baseSize, -5, (Color){185, 222, 105, 255}); + else DrawTextEx(font, textSpring2, (Vector2){GetScreenWidth()/2 - MeasureText(textSpring2, 40)/2, GetScreenHeight()/3}, font.baseSize, -5, (Color){185, 222, 105, 255}); + } + else if ((currentMonth == 10) && (transitionFramesCounter >= SEASONTRANSITION/2)) + { + if (randomMessage <= 4) DrawTextEx(font, textSummer1, (Vector2){GetScreenWidth()/2 - MeasureText(textSummer1, 40)/2, GetScreenHeight()/3}, font.baseSize, -5, (Color){253, 200, 108, 255}); + else DrawTextEx(font, textSummer2, (Vector2){GetScreenWidth()/2 - MeasureText(textSummer2, 40)/2, GetScreenHeight()/3}, font.baseSize, -5, (Color){253, 200, 108, 255}); + } + else if ((currentMonth == 1) && (transitionFramesCounter >= SEASONTRANSITION/2)) + { + if (randomMessage <= 4) DrawTextEx(font, textFall1, (Vector2){GetScreenWidth()/2 - MeasureText(textFall1, 40)/2, GetScreenHeight()/3}, font.baseSize, -5, (Color){255, 149, 107, 255}); + else DrawTextEx(font, textFall2, (Vector2){GetScreenWidth()/2 - MeasureText(textFall2, 40)/2, GetScreenHeight()/3}, font.baseSize, -5, (Color){255, 149, 107, 255}); + } + else if (currentMonth == 4 && transitionFramesCounter >= SEASONTRANSITION/2) + { + if (randomMessage <= 4) DrawTextEx(font, textWinter1, (Vector2){GetScreenWidth()/2 - MeasureText(textWinter1, 40)/2, GetScreenHeight()/3}, font.baseSize, -5, (Color){133, 249, 253, 255}); + else DrawTextEx(font, textWinter2, (Vector2){GetScreenWidth()/2 - MeasureText(textWinter2, 40)/2, GetScreenHeight()/3}, font.baseSize, -5, (Color){133, 249, 253, 255}); + } + +#if defined(DEBUG) + DrawRectangle(player.x, player.y, player.width, player.height, Fade(WHITE, 0.5)); + + for (int i = 0; i < MAX_WIND; i++) + { + if (windActive[i]) DrawRectangleRec(wind[i], Fade (GRAY, 0.4)); + } + + for (int i = 0; i < MAX_ENEMIES; i++) + { + if (owlActive[i]) DrawRectangleRec(owl[i], Fade(BLACK, 0.5f)); + if (dingoActive[i]) DrawRectangleRec(dingo[i], Fade(BLACK, 0.5f)); + if (snakeActive[i]) DrawRectangleRec(snake[i], BLACK); + } + + if (beeActive) DrawRectangleRec(bee, Fade(BLACK, 0.5f)); + if (eagleActive) DrawRectangleRec(eagle, Fade(BLACK, 0.5f)); + + switch (season) + { + case WINTER: + { + if (currentMonth == 5) DrawText("June", GetScreenWidth() - 140, GetScreenHeight() - 20, 20, RED); + if (currentMonth == 6) DrawText("July", GetScreenWidth() - 140, GetScreenHeight() - 20, 20, RED); + + } break; + case SPRING: + { + if (currentMonth == 8) DrawText("September", GetScreenWidth() - 140, GetScreenHeight() - 20, 20, RED); + if (currentMonth == 9) DrawText("October", GetScreenWidth() - 140, GetScreenHeight() - 20, 20, RED); + + } break; + case SUMMER: + { + if (currentMonth == 11) DrawText("December", GetScreenWidth() - 140, GetScreenHeight() - 20, 20, RED); + if (currentMonth == 0) DrawText("January", GetScreenWidth() - 140, GetScreenHeight() - 20, 20, RED); + + } break; + case FALL: + { + if (currentMonth == 2) DrawText("March", GetScreenWidth() - 140, GetScreenHeight() - 20, 20, RED); + if (currentMonth == 3) DrawText("April", GetScreenWidth() - 140, GetScreenHeight() - 20, 20, RED); + + } break; + case TRANSITION: + { + if (currentMonth == 4) DrawText("May", GetScreenWidth() - 140, GetScreenHeight() - 20, 20, RED); + + } break; + default: break; + } + + DrawText(FormatText("Score: %02i", score), 140, GetScreenHeight() - 20, 20, RED); + DrawText(FormatText("HighScore: %02i", hiscore), 600, GetScreenHeight() - 20, 20, RED); + DrawText(FormatText("SeasonChange: %03i", seasonTimer), 300, GetScreenHeight() - 20, 20, RED); +#endif +} + +// Gameplay Screen Unload logic +void UnloadGameplayScreen(void) +{ + // ... +} + +// Gameplay Screen should finish? +int FinishGameplayScreen(void) +{ + return finishScreen; +} + +// Tree Spawn +static void BambooSpawn(void) +{ + int counter = 0; + + for (int k = 0; k < MAX_ENEMIES; k++) + { + if ((!bambooActive[k]) && (counter < 1)) + { + bamboo[k].y = 0; + bamboo[k].x = GetScreenWidth(); + bambooActive[k] = true; + counter++; + } + } +} + +//Snake Spawn +static void SnakeSpawn(int chance) +{ + int position; + int counter = 0; + + for (int z = 0; z < 2; z++) posArray[z] = -1; + + if (GetRandomValue(0, 100) <= chance) + { + for (int k = 0; k < MAX_ENEMIES; k++) + { + if ((!snakeActive[k]) && (counter < 1)) + { + position = GetRandomValue(0, 4); + + if (counter == 0) posArray[counter] = position; + + snake[k].x = GetScreenWidth() - 15; + snake[k].y = 25 + GetScreenHeight()/5*position; + snakeActive[k] = true; + isHitSnake[k] = false; + counter++; + } + } + } +} + +// Dingo Spawn +static void DingoSpawn(int chance) +{ + int position; + int counter = 0; + + for (int z = 0; z < 2; z++) posArrayDingo[z] = -1; + + if (GetRandomValue(0, 100) <= chance) + { + for(int k = 0; k < MAX_ENEMIES; k++) + { + if ((!dingoActive[k]) && (counter < 1)) + { + position = GetRandomValue(1, 3); + + if (counter == 0) posArray[counter] = position; + + dingo[k].x = GetScreenWidth() - 15; + dingo[k].y = 25 + GetScreenHeight()/5*position; + dingoActive[k] = true; + isHitDingo[k] = false; + counter++; + } + } + } +} + +// Owl Spawn +static void OwlSpawn(int chance) +{ + int position; + int counter = 0; + + for (int z = 0; z < 2; z++) posArray[z] = -1; + + if (GetRandomValue(0, 100) <= chance) + { + for (int k = 0; k < MAX_ENEMIES; k++) + { + if ((!owlActive[k]) && (!branchActive[k]) && (counter < 1)) + { + position = GetRandomValue(1, 3); + + if (counter == 0) posArray[counter] = position; + + owl[k].x = GetScreenWidth() - 15; + owl[k].y = 25 + GetScreenHeight()/5*position; + owlActive[k] = true; + branchPos[k].x = owl[k].x; + branchPos[k].y = owl[k].y + 64; + branchActive[k] = true; + counter++; + } + } + } +} + +// Leaf spawn function +static void LeafSpawn(void) +{ + int counter = 0; + int maxLeavesCounter = GetRandomValue(0, 2); + + for (int z = 0; z < 2; z++) posArrayLeaf[z] = -1; + + for (int k = 0; k < MAX_LEAVES; k++) + { + if ((!leafActive[k]) && (counter <= maxLeavesCounter)) + { + int leafPosition = GetRandomValue(0, 4); + int leafTypeSelection = GetRandomValue(0,99); + int leafSideSelection = GetRandomValue(0,1); + leafSide[k] = leafSideSelection; + + if (counter == 0) + { + while (CheckArrayValue(posArray, 2, leafPosition)) leafPosition = GetRandomValue(0, 4); + posArrayLeaf[counter] = leafPosition; + } + else if (counter == 1) + { + while(leafPosition == posArrayLeaf[counter - 1] || CheckArrayValue(posArray, 2, leafPosition)) leafPosition = GetRandomValue(0, 4); + posArrayLeaf[counter] = leafPosition; + } + else if (counter == 2) + { + while((leafPosition == posArrayLeaf[counter - 1] || (leafPosition == posArrayLeaf[counter - 2])) || CheckArrayValue(posArray, 2, leafPosition)) leafPosition = GetRandomValue(0, 4); + posArrayLeaf[counter] = leafPosition; + } + + leaf[k].y = 30 + GetScreenHeight()/5*leafPosition; + leaf[k].x = GetScreenWidth() - 18; + leafActive[k] = true; + + if (leafTypeSelection <= 24) leafType[k] = 0; + else if ((leafTypeSelection > 24) && leafTypeSelection <= 50) leafType[k] = 1; + else if ((leafTypeSelection > 50) && leafTypeSelection <= 75) leafType[k] = 2; + else leafType[k] = 3; + + counter++; + } + } +} + +static void FireSpawn(int chance) +{ + int counter = 0; + + if (GetRandomValue(0, 100) <= chance) + { + for (int k = 0; k < MAX_FIRE; k++) + { + if ((!fireActive[k]) && (counter < 1)) + { + fire[k].y = GetScreenHeight() - 30; + fire[k].x = GetScreenWidth() - 5; + //fire[k].height = 30; + fireActive[k] = true; + onFire[k] = false; + counter++; + } + } + } +} + +static void IceSpawn(int chance) +{ + int counter = 0; + + if (GetRandomValue(0, 100) <= chance) + { + for (int k = 0; k < MAX_ICE; k++) + { + if ((!iceActive[k]) && (counter < 1)) + { + ice[k].y = 0; + ice[k].x = GetScreenWidth() + 5; + iceActive[k] = true; + counter++; + } + } + } +} + +static void ResinSpawn(int chance) +{ + int counter = 0; + + if (GetRandomValue(0, 100) <= chance) + { + for (int k = 0; k < MAX_RESIN; k++) + { + if ((!resinActive[k]) && (counter < 1)) + { + int resPosition = GetRandomValue(0, 4); + + while (CheckArrayValue(posArray, 2, resPosition)) resPosition = GetRandomValue(0, 4); + + resin[k].y = 25 + GetScreenHeight()/5*resPosition; + resin[k].x = GetScreenWidth() + 5; + resinActive[k] = true; + counter++; + } + } + } +} + +static void WindSpawn(int chance) +{ + int counter = 0; + + if (GetRandomValue(0, 100) <= chance) + { + for (int k = 0; k < MAX_WIND ; k++) + { + if ((!windActive[k]) && (counter < 1)) + { + int resPosition = GetRandomValue(0, 4); + + while (CheckArrayValue(posArray, 2, resPosition)) resPosition = GetRandomValue(0, 4); + + wind[k].y = 25 + GetScreenHeight()/5*resPosition; + wind[k].x = GetScreenWidth() + 5; + windActive[k] = true; + counter++; + } + } + } +} + +// Spawn bee enemy +static void BeeSpawn(int chance) +{ + if ((GetRandomValue(0, 100) <= chance) && !beeActive && !alertBeeActive) + { + bee.x = GetScreenWidth(); + bee.y = GetRandomValue(40, GetScreenHeight() - bee.height - 40); + beeAlertRectangle = (Rectangle){GetScreenWidth(), bee.y + gameplay_enemy_bee.height/2, 0, 0}; + beeActive = false; + alertBeeActive = true; + } +} + +// Spawn eagle enemy +static void EagleSpawn(int chance) +{ + if ((GetRandomValue(0, 100) <= chance) && !eagleActive && !alertActive) + { + eagleDelay = 0; + eagle.x = GetScreenWidth(); + eagle.y = player.y; + alertRectangle = (Rectangle){GetScreenWidth(), eagle.y + gameplay_enemy_eagle.height/2, 0, 0}; + eagleActive = false; + eagleAlert = true; + alertActive = true; + } +} + +// Check if the array contains a value +static bool CheckArrayValue(int *array, int arrayLength, int value) +{ + for (int n = 0; n < arrayLength; n++) + { + if (array[n] == value) return 1; + } + + return 0; +} + +// Scroll functions +// Front parallax drawing +static void DrawParallaxFront(void) +{ + Rectangle ground01 = gameplay_back_ground01; + + DrawTexturePro(atlas02, gameplay_back_tree01_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset, 60, gameplay_back_tree01_layer01.width*2, gameplay_back_tree01_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree02_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + 140, 60, gameplay_back_tree02_layer01.width*2, gameplay_back_tree02_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree03_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + 140*2, 55, gameplay_back_tree02_layer01.width*2, gameplay_back_tree02_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree04_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + 140*3, 60, gameplay_back_tree04_layer01.width*2, gameplay_back_tree04_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree05_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + 140*4, 60, gameplay_back_tree05_layer01.width*2, gameplay_back_tree05_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree06_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + 140*5, 55, gameplay_back_tree06_layer01.width*2, gameplay_back_tree06_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree07_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + 140*6, 60, gameplay_back_tree07_layer01.width*2, gameplay_back_tree07_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree08_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + 140*7, 60, gameplay_back_tree08_layer01.width*2, gameplay_back_tree08_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_ground01, (Rectangle){(int)scrollFront, 559, ground01.width*2, ground01.height*2}, (Vector2){0,0}, 0, color01); + DrawTexturePro(atlas02, (Rectangle){ground01.x, ground01.y + ground01.height, ground01.width, -ground01.height}, (Rectangle){(int)scrollFront, -33, ground01.width*2, ground01.height*2}, (Vector2){0,0}, 0, color01); + + DrawTexturePro(atlas02, gameplay_back_tree01_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + GetScreenWidth(), 60, gameplay_back_tree01_layer01.width*2, gameplay_back_tree01_layer01.height*2},(Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree02_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + GetScreenWidth() + 140, 60, gameplay_back_tree02_layer01.width*2, gameplay_back_tree02_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree03_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + GetScreenWidth() + 140*2, 55, gameplay_back_tree03_layer01.width*2, gameplay_back_tree03_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree04_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + GetScreenWidth() + 140*3, 60, gameplay_back_tree04_layer01.width*2, gameplay_back_tree04_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree05_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + GetScreenWidth() + 140*4, 60, gameplay_back_tree05_layer01.width*2, gameplay_back_tree05_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree06_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + GetScreenWidth() + 140*5, 55, gameplay_back_tree06_layer01.width*2, gameplay_back_tree06_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree07_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset + GetScreenWidth() + 140*6, 60, gameplay_back_tree07_layer01.width*2, gameplay_back_tree07_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree08_layer01, (Rectangle){(int)scrollFront + parallaxFrontOffset+ GetScreenWidth() + 140*7, 60, gameplay_back_tree08_layer01.width*2, gameplay_back_tree08_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_ground01, (Rectangle){(int)scrollFront + GetScreenWidth(), 559, ground01.width*2, ground01.height*2}, (Vector2){0,0}, 0, color01); + DrawTexturePro(atlas02, (Rectangle){ground01.x, ground01.y + ground01.height, ground01.width, -ground01.height}, (Rectangle){(int)scrollFront+ GetScreenWidth(), -33, ground01.width*2, ground01.height*2}, (Vector2){0,0}, 0, color01); +} + +// Middle parallax drawing +static void DrawParallaxMiddle(void) +{ + Rectangle ground02 = gameplay_back_ground02; + + DrawTexturePro(atlas02, gameplay_back_tree01_layer02, (Rectangle){(int)scrollMiddle, 67, gameplay_back_tree01_layer02.width*2, gameplay_back_tree01_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree02_layer02, (Rectangle){(int)scrollMiddle + 140, 67, gameplay_back_tree02_layer02.width*2, gameplay_back_tree02_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree03_layer02, (Rectangle){(int)scrollMiddle + 140*2, 67, gameplay_back_tree03_layer02.width*2, gameplay_back_tree03_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree04_layer02, (Rectangle){(int)scrollMiddle + 140*3, 67, gameplay_back_tree04_layer02.width*2, gameplay_back_tree04_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree05_layer02, (Rectangle){(int)scrollMiddle + 140*4, 67, gameplay_back_tree05_layer02.width*2, gameplay_back_tree05_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree06_layer02, (Rectangle){(int)scrollMiddle + 140*5, 67, gameplay_back_tree06_layer02.width*2, gameplay_back_tree06_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree07_layer02, (Rectangle){(int)scrollMiddle + 140*6, 67, gameplay_back_tree07_layer02.width*2, gameplay_back_tree07_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree08_layer02, (Rectangle){(int)scrollMiddle + 140*7, 67, gameplay_back_tree08_layer02.width*2, gameplay_back_tree08_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_ground02, (Rectangle){(int)scrollMiddle, 509, ground02.width*2, ground02.height*2}, (Vector2){0,0}, 0, color01); + DrawTexturePro(atlas02, (Rectangle){ground02.x, ground02.y + ground02.height, ground02.width, -ground02.height}, (Rectangle){(int)scrollMiddle, 19, ground02.width*2, ground02.height*2}, (Vector2){0,0}, 0, color01); + + DrawTexturePro(atlas02, gameplay_back_tree02_layer02, (Rectangle){(int)scrollMiddle + GetScreenWidth() + 140, 67, gameplay_back_tree02_layer02.width*2, gameplay_back_tree02_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree03_layer02, (Rectangle){(int)scrollMiddle + GetScreenWidth() + 140*2, 67, gameplay_back_tree03_layer02.width*2, gameplay_back_tree03_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree04_layer02, (Rectangle){(int)scrollMiddle + GetScreenWidth() + 140*3, 67, gameplay_back_tree04_layer02.width*2, gameplay_back_tree04_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree05_layer02, (Rectangle){(int)scrollMiddle + GetScreenWidth() + 140*4, 67, gameplay_back_tree05_layer02.width*2, gameplay_back_tree05_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree06_layer02, (Rectangle){(int)scrollMiddle + GetScreenWidth() + 140*5, 67, gameplay_back_tree06_layer02.width*2, gameplay_back_tree06_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree07_layer02, (Rectangle){(int)scrollMiddle + GetScreenWidth() + 140*6, 67, gameplay_back_tree07_layer02.width*2, gameplay_back_tree07_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree08_layer02, (Rectangle){(int)scrollMiddle + GetScreenWidth() + 140*7, 67, gameplay_back_tree08_layer02.width*2, gameplay_back_tree08_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree01_layer02, (Rectangle){(int)scrollMiddle+ GetScreenWidth(), 67, gameplay_back_tree01_layer02.width*2, gameplay_back_tree01_layer02.height*2},(Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_ground02, (Rectangle){(int)scrollMiddle + GetScreenWidth(), 509, ground02.width*2, ground02.height*2},(Vector2){0,0}, 0, color01); + DrawTexturePro(atlas02, (Rectangle){ground02.x, ground02.y + ground02.height, ground02.width, -ground02.height}, (Rectangle){(int)scrollMiddle+ GetScreenWidth(), 19, ground02.width*2, ground02.height*2}, (Vector2){0,0}, 0, color01); +} + +// Back parallax drawing +static void DrawParallaxBack(void) +{ + Rectangle ground03 = gameplay_back_ground03; + + DrawTexturePro(atlas02, gameplay_back_tree01_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset, 67, gameplay_back_tree01_layer03.width*2, gameplay_back_tree01_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree02_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + 140, 67, gameplay_back_tree02_layer03.width*2, gameplay_back_tree02_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree03_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + 140*2, 67, gameplay_back_tree03_layer03.width*2, gameplay_back_tree03_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree04_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + 140*3, 67, gameplay_back_tree04_layer03.width*2, gameplay_back_tree04_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree05_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + 140*4, 67, gameplay_back_tree05_layer03.width*2, gameplay_back_tree05_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree06_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + 140*5, 67, gameplay_back_tree06_layer03.width*2, gameplay_back_tree06_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree07_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + 140*6, 67, gameplay_back_tree07_layer03.width*2, gameplay_back_tree07_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree08_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + 140*7, 67, gameplay_back_tree08_layer03.width*2, gameplay_back_tree08_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_ground03, (Rectangle){(int)scrollBack, 469, ground03.width*2, ground03.height*2}, (Vector2){0,0}, 0, color01); + DrawTexturePro(atlas02, (Rectangle){ground03.x, ground03.y + ground03.height, ground03.width, -ground03.height}, (Rectangle){(int)scrollBack, 67, ground03.width*2, ground03.height*2}, (Vector2){0,0}, 0, color01); + + DrawTexturePro(atlas02, gameplay_back_tree01_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset+ GetScreenWidth(), 67, gameplay_back_tree01_layer03.width*2, gameplay_back_tree01_layer03.height*2},(Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree02_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + GetScreenWidth() + 140, 67, gameplay_back_tree02_layer03.width*2, gameplay_back_tree02_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree03_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + GetScreenWidth() + 140*2, 67, gameplay_back_tree03_layer03.width*2, gameplay_back_tree03_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree04_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + GetScreenWidth() + 140*3, 67, gameplay_back_tree04_layer03.width*2, gameplay_back_tree04_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree05_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + GetScreenWidth() + 140*4, 67, gameplay_back_tree05_layer03.width*2, gameplay_back_tree05_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree06_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + GetScreenWidth() + 140*5, 67, gameplay_back_tree06_layer03.width*2, gameplay_back_tree06_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree07_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + GetScreenWidth() + 140*6, 67, gameplay_back_tree07_layer03.width*2, gameplay_back_tree07_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree08_layer03, (Rectangle){(int)scrollBack + parallaxBackOffset + GetScreenWidth() + 140*7, 67, gameplay_back_tree08_layer03.width*2, gameplay_back_tree08_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_ground03, (Rectangle){(int)scrollBack + GetScreenWidth(), 469, ground03.width*2, ground03.height*2}, (Vector2){0,0}, 0, color01); + DrawTexturePro(atlas02, (Rectangle){ground03.x, ground03.y + ground03.height, ground03.width, -ground03.height}, (Rectangle){(int)scrollBack+ GetScreenWidth(), 67, ground03.width*2, ground03.height*2}, (Vector2){0,0}, 0, color01); +} + +// Linear easing animation +static float LinearEaseIn(float t, float b, float c, float d) { return c*t/d + b; } + +// Transition from one color to another +static Color ColorTransition(Color initialColor, Color finalColor, int framesCounter) +{ + Color currentColor; + + currentColor.r = (unsigned char)LinearEaseIn((float)framesCounter, (float)initialColor.r, (float)(finalColor.r - initialColor.r), (float)(SEASONTRANSITION)); + currentColor.g = (unsigned char)LinearEaseIn((float)framesCounter, (float)initialColor.g, (float)(finalColor.g - initialColor.g), (float)(SEASONTRANSITION)); + currentColor.b = (unsigned char)LinearEaseIn((float)framesCounter, (float)initialColor.b, (float)(finalColor.b - initialColor.b), (float)(SEASONTRANSITION)); + currentColor.a = 255; + + return currentColor; +} + +static void Reset(void) +{ + framesCounter = 0; + finishScreen = 0; + grabCounter = 10; + bambooTimer = 0; + bambooSpawnTime = 0; + gravity = 5; + speed = 3; + score = 0; + hiscore = 0; + power = 360; + resinCount = 0; + rightAlpha = 0.5; + leftAlpha = 0.5; + speedMod = 1.2f; + transCount = 0; + windCounter = 0; + maxPower = 360; + playerActive = true; + scrollFront = 0; + scrollMiddle = 0; + scrollBack = 0; + scrollSpeed = 1.6f*TIME_FACTOR; + groundPos = 0; + resinCountjump = 0; + resinCountdrag = 0; + colorTimer = 0; + play = false; + onIce = false; + onResin = false; + jumpSpeed = 6; + transforming = false; + eagleAlert = false; + alertActive = false; + fireSpeed = 4; + seasonTimer = 0; + seasonChange = SEASONCHANGE; + monthChange = seasonChange/3; + glowing = true; + currentFrame = 0; + curFrame = 0; + curFrame1 = 1; + curFrame2 = 2; + curFrame3 = 3; + curFrameBee = 0; + fireOffset = 20; + beeMov = 0; + killCounter = 0; + currentLeaves = 0; + clockRotation = 0; + flyColor = GRAY; + globalFrameCounter = 0; + startCounter = 0; + numberAlpha = 1; + numberScale = 2.5f; + startNum = 3; + animCounter = 0; + finalFormEnd = 0; + randomMessage = 0; + years = 0; + UIfade = 1; + fogAlpha = 0; + seasons = 0; + fog = false; + clockSpeedRotation = 0; + eagleDelay = 0; + + parallaxBackOffset = GetRandomValue (10, 100); + parallaxFrontOffset = GetRandomValue (100, 200); + + progresionDelay = 0; + progresionFramesCounter = 0; + speedProgresion = 0; + + jumpCounter = 0; + resinCounter = 0; + tornadoCounter = 0; + dashCounter = 0; + superKoalaCounter = 0; + + fogSpeed = 2; + + leafGUIglow = true; + leafGUIglowFade = 0; + leafGUIpulseFade = 1; + leafGUIpulseScale = 1; + + //initMonth = ptm->tm_mon; + initYears = 1900 + ptm->tm_year; + + //initMonth = STARTINGMONTH; + + if (initSeason == 0) + { + initMonth = 11; + clockRotation = 225; + clockInitRotation = 225; + clockFinalRotation = clockInitRotation + 90; + color00 = (Color){129, 172, 86, 255}; // Summer Color + color01 = (Color){145, 165, 125, 255}; + color02 = (Color){161, 130, 73, 255}; + color03 = (Color){198, 103, 51, 255}; + } + else if (initSeason == 1) + { + initMonth = 2; + clockRotation = 315; + clockInitRotation = 315; + clockFinalRotation = clockInitRotation + 90; + color00 = (Color){242, 113, 62, 255}; // Fall Color + color01 = (Color){190, 135, 114, 255}; + color02 = (Color){144, 130, 101, 255}; + color03 = (Color){214, 133, 58, 255}; + } + else if (initSeason == 2) + { + initMonth = 5; + clockRotation = 45; + clockInitRotation = 45; + clockFinalRotation = clockInitRotation + 90; + color00 = (Color){130, 130, 181, 255}; // Winter Color + color01 = (Color){145, 145, 166, 255}; + color02 = (Color){104, 142, 144, 255}; + color03 = (Color){57, 140, 173, 255}; + } + else if (initSeason == 3) + { + initMonth = 8; + clockRotation = 135; + clockInitRotation = 135; + clockFinalRotation = clockInitRotation + 90; + color00 = (Color){196, 176, 49, 255}; // Spring Color + color01 = (Color){178, 163, 67, 255}; + color02 = (Color){133, 143, 90, 255}; + color03 = (Color){133, 156, 42, 255}; + } + + currentMonth = initMonth; + + leftButton.x = 0; + leftButton.y = 200; + leftButton.width = GetScreenWidth()/2; + leftButton.height = GetScreenHeight(); + + rightButton.x = GetScreenWidth()/2; + rightButton.y = 200; + rightButton.width = GetScreenWidth()/2; + rightButton.height = GetScreenHeight(); + + powerButton.x = 0; + powerButton.y = 0; + powerButton.width = GetScreenWidth()/2; + powerButton.height = 200; + + finalColor.r = GetRandomValue(0, 255); + finalColor.g = GetRandomValue(0, 255); + finalColor.b = GetRandomValue(0, 255); + finalColor.a = 255; + + backBar.x = 20; + backBar.y = 22; + backBar.width = maxPower + 4; + backBar.height = 24; + powerBar.x = 22; + powerBar.y = 23; + powerBar.width = power; + powerBar.height = 22; + + fireAnimation.x = gameplay_props_fire_spritesheet.x; + fireAnimation.y = gameplay_props_fire_spritesheet.y; + fireAnimation.width = gameplay_props_fire_spritesheet.width/4; + fireAnimation.height = gameplay_props_fire_spritesheet.height; + + windAnimation.x = gameplay_props_whirlwind_spritesheet.x; + windAnimation.y = gameplay_props_whirlwind_spritesheet.y; + windAnimation.width = gameplay_props_whirlwind_spritesheet.width/4; + windAnimation.height = gameplay_props_whirlwind_spritesheet.height; + + beeAnimation.x = gameplay_enemy_bee.x; + beeAnimation.y = gameplay_enemy_bee.y; + beeAnimation.width = gameplay_enemy_bee.width/5; + beeAnimation.height = gameplay_enemy_bee.height; + + eagleAnimation.x = gameplay_enemy_eagle.x; + eagleAnimation.y = gameplay_enemy_eagle.y; + eagleAnimation.width = gameplay_enemy_eagle.width/2; + eagleAnimation.height = gameplay_enemy_eagle.height; + + snakeAnimation.x = gameplay_enemy_snake.x; + snakeAnimation.y = gameplay_enemy_snake.y; + snakeAnimation.width = gameplay_enemy_snake.width/3; + snakeAnimation.height = gameplay_enemy_snake.height; + + dingoAnimation.x = gameplay_enemy_dingo.x; + dingoAnimation.y = gameplay_enemy_dingo.y; + dingoAnimation.width = gameplay_enemy_dingo.width/3; + dingoAnimation.height = gameplay_enemy_dingo.height; + + owlAnimation.x = gameplay_enemy_owl.x; + owlAnimation.y = gameplay_enemy_owl.y; + owlAnimation.width = gameplay_enemy_owl.width/3; + owlAnimation.height = gameplay_enemy_owl.height; + + koalaAnimationIddle = gameplay_koala_idle; + koalaAnimationIddle.width = gameplay_koala_idle.width/3; + koalaAnimationJump = gameplay_koala_jump; + koalaAnimationFly = gameplay_koala_fly; + koalaAnimationFly.width = gameplay_koala_fly.width/2; + koalaAnimationTransform = gameplay_koala_transform; + koalaAnimationTransform.width = gameplay_koala_transform.width/2; + + snowParticle.position = (Vector2){ 0, 0 }; + snowParticle.active = false; + snowStormParticle.position = (Vector2){ 0, 0 }; + snowStormParticle.active = false; + backSnowParticle.position = (Vector2){ 0, 0 }; + backSnowParticle.active = false; + planetreeParticle.position = (Vector2){ 0, 0 }; + planetreeParticle.active = false; + backPlanetreeParticle.position = (Vector2){ 0, 0 }; + backPlanetreeParticle.active = false; + dandelionParticle.active = false; + dandelionBackParticle.position = (Vector2){ 0, 0}; + flowerParticle.position = (Vector2){ 0, 0 }; + flowerParticle.active = false; + backFlowerParticle.position = (Vector2){ 0, 0 }; + backFlowerParticle.active = false; + rainParticle.position = (Vector2){ 0, 0 }; + rainParticle.active = false; + rainStormParticle.position = (Vector2){ 0, 0 }; + rainStormParticle.active = false; + backRainParticle.position = (Vector2){ 0, 0 }; + backRainParticle.active = false; + rayParticles.position = (Vector2){ 0, 0 }; + rayParticles.active = false; + backRayParticles.position = (Vector2){ 0, 0 }; + backRayParticles.active = false; + speedFX.active = false; + + clockPosition = (Vector2){GetScreenWidth(), 0}; + + for (int j = 0; j < MAX_PARTICLES; j++) + { + snowParticle.particles[j].active = false; + snowParticle.particles[j].position = (Vector2){ 0, 0 }; + snowParticle.particles[j].size = (float)GetRandomValue(3, 9)/10; + snowParticle.particles[j].rotation = GetRandomValue(0, 360); + snowParticle.particles[j].color = WHITE; + snowParticle.particles[j].alpha = 1.0f; + + backSnowParticle.particles[j].active = false; + backSnowParticle.particles[j].position = (Vector2){ 0, 0 }; + backSnowParticle.particles[j].size = (float)GetRandomValue(2, 8)/10; + backSnowParticle.particles[j].rotation = GetRandomValue(0, 360); + backSnowParticle.particles[j].color = WHITE; + backSnowParticle.particles[j].alpha = 0.7f; + + planetreeParticle.particles[j].active = false; + planetreeParticle.particles[j].position = (Vector2){ 0, 0 }; + planetreeParticle.particles[j].size = (float)GetRandomValue(3, 9)/10; + planetreeParticle.particles[j].rotation = GetRandomValue(0, 360); + planetreeParticle.particles[j].color = WHITE; + planetreeParticle.particles[j].alpha = 1.0f; + + backPlanetreeParticle.particles[j].active = false; + backPlanetreeParticle.particles[j].position = (Vector2){ 0, 0 }; + backPlanetreeParticle.particles[j].size = (float)GetRandomValue(2, 8)/10; + backPlanetreeParticle.particles[j].rotation = GetRandomValue(0, 360); + backPlanetreeParticle.particles[j].color = WHITE; + backPlanetreeParticle.particles[j].alpha = 0.7f; + + dandelionParticle.particles[j].active = false; + dandelionParticle.particles[j].position = (Vector2){ 0, 0 }; + dandelionParticle.particles[j].size = (float)GetRandomValue(3, 9)/10; + dandelionParticle.particles[j].rotation = 0; + dandelionParticle.particles[j].color = WHITE; + dandelionParticle.particles[j].alpha = 1; + dandelionParticle.particles[j].rotPhy = GetRandomValue(0 , 180); + + dandelionBackParticle.particles[j].active = false; + dandelionBackParticle.particles[j].position = (Vector2){ 0, 0 }; + dandelionBackParticle.particles[j].size = (float)GetRandomValue(2, 8)/10; + dandelionBackParticle.particles[j].rotation = 0; + dandelionBackParticle.particles[j].color = WHITE; + dandelionBackParticle.particles[j].alpha = 0.7f; + dandelionBackParticle.particles[j].rotPhy = GetRandomValue(0 , 180); + + flowerParticle.particles[j].active = false; + flowerParticle.particles[j].position = (Vector2){ 0, 0 }; + flowerParticle.particles[j].size = (float)GetRandomValue(3, 9)/10; + flowerParticle.particles[j].rotation = GetRandomValue(0, 360); + flowerParticle.particles[j].color = WHITE; + flowerParticle.particles[j].alpha = 1.0f; + + backFlowerParticle.particles[j].active = false; + backFlowerParticle.particles[j].position = (Vector2){ 0, 0 }; + backFlowerParticle.particles[j].size = (float)GetRandomValue(2, 8)/10; + backFlowerParticle.particles[j].rotation = GetRandomValue(0, 360); + backFlowerParticle.particles[j].color = WHITE; + backFlowerParticle.particles[j].alpha = 0.7f; + + rainParticle.particles[j].active = false; + rainParticle.particles[j].position = (Vector2){ 0, 0 }; + rainParticle.particles[j].size = (float)GetRandomValue(3, 9)/10; + rainParticle.particles[j].rotation = -20; + rainParticle.particles[j].color = WHITE; + rainParticle.particles[j].alpha = 1.0f; + + backRainParticle.particles[j].active = false; + backRainParticle.particles[j].position = (Vector2){ 0, 0 }; + backRainParticle.particles[j].size = (float)GetRandomValue(2, 8)/10; + backRainParticle.particles[j].rotation = -20; + backRainParticle.particles[j].color = WHITE; + backRainParticle.particles[j].alpha = 0.7f; + + } + + for (int j = 0; j < MAX_PARTICLES_SPEED; j++) + { + speedFX.particle[j].position = (Vector2){ 0, 0 }; + speedFX.particle[j].color = WHITE; + speedFX.particle[j].alpha = 1.0f; + speedFX.particle[j].size = (Vector2){GetScreenWidth(), GetRandomValue(10, 50)/10}; + speedFX.particle[j].rotation = 0.0f; + speedFX.particle[j].active = false; + } + + for (int j = 0; j < MAX_PARTICLES_STORM; j++) + { + rainStormParticle.particles[j].active = false; + rainStormParticle.particles[j].position = (Vector2){ 0, 0 }; + rainStormParticle.particles[j].size = (float)GetRandomValue(3, 9)/10; + rainStormParticle.particles[j].rotation = -40; + rainStormParticle.particles[j].color = WHITE; + rainStormParticle.particles[j].alpha = 1.0f; + } + + for (int j = 0; j < MAX_PARTICLES_STORM; j++) + { + snowStormParticle.particles[j].active = false; + snowStormParticle.particles[j].position = (Vector2){ 0, 0 }; + snowStormParticle.particles[j].size = (float)GetRandomValue(2, 8)/10; + snowStormParticle.particles[j].rotation = 40; + snowStormParticle.particles[j].color = WHITE; + snowStormParticle.particles[j].alpha = 1.0f; + } + + for (int i = 0; i < MAX_PARTICLES_RAY; i++) + { + rayParticles.particles[i].position = (Vector2){ 0, 0 }; + rayParticles.particles[i].color.r = 255; + rayParticles.particles[i].color.g = 255; + rayParticles.particles[i].color.b = 182; + rayParticles.particles[i].color.a = 255; + rayParticles.particles[i].alpha = 0.0f; + rayParticles.particles[i].size = (float)(GetRandomValue(30, 70)/10); + rayParticles.particles[i].rotation = 0.0f; + rayParticles.particles[i].active = false; + rayParticles.particles[i].fading = false; + rayParticles.particles[i].delayCounter = 0; + + backRayParticles.particles[i].position = (Vector2){ 0, 0 }; + backRayParticles.particles[i].color.r = 255; + backRayParticles.particles[i].color.g = 255; + backRayParticles.particles[i].color.b = 182; + backRayParticles.particles[i].color.a = 255; + backRayParticles.particles[i].alpha = 0.0f; + backRayParticles.particles[i].size = (float)(GetRandomValue(10, 20)/10); + backRayParticles.particles[i].rotation = 0.0f; + backRayParticles.particles[i].active = false; + backRayParticles.particles[i].fading = false; + backRayParticles.particles[i].delayCounter = 0; + } + + for (int i = 0; i < MAX_KILLS; i++) killHistory[i] = 0; + + for (int i = 0; i < MAX_BAMBOO; i++) + { + bamboo[i].x = 150 + 200*i; + bamboo[i].y = 0; + bamboo[i].width = 50; + bamboo[i].height = GetScreenHeight(); + if(i > 5) bambooActive[i] = false; + else bambooActive[i] = true; + } + + for (int i = 0; i < MAX_FIRE; i++) + { + fire[i].x = -200; + fire[i].y = GetScreenHeight() - 30; + fire[i].width = 30; + fire[i].height = 720; + fireActive[i] = false; + onFire[i] = false; + fireCounter[i] = 0; + } + + for (int i = 0; i < MAX_ICE; i++) + { + ice[i].x = -100; + ice[i].y = 0; + ice[i].width = 10; + ice[i].height = GetScreenHeight(); + iceActive[i] = false; + } + + for (int i = 0; i < MAX_RESIN; i++) + { + resin[i].x = -100; + resin[i].y = 0; + resin[i].width = 32; + resin[i].height = 50; + resinActive[i] = false; + } + + for (int i = 0; i < MAX_WIND; i++) + { + wind[i].x = -100; + wind[i].y = 0; + wind[i].width = 70; + wind[i].height = 100; + windActive[i] = false; + } + + for (int i = 0; i < MAX_ENEMIES; i++) + { + snake[i].x = 0; + snake[i].y = 0; + snake[i].width = 50; + snake[i].height = 60; + snakeActive[i] = false; + isHitSnake[i] = false; + + dingo[i].x = -100; + dingo[i].y = 0; + dingo[i].width = 64; + dingo[i].height = 90; + dingoActive[i] = false; + isHitDingo[i] = false; + + owl[i].x = -100; + owl[i].y = 0; + owl[i].width = 40; + owl[i].height = 60; + owlActive[i] = false; + branchActive[i] = false; + isHitOwl[i] = false; + + branchPos[i].x = owl[i].x; + branchPos[i].y = owl[i].y; + + enemyHit[i].position = (Vector2){ GetRandomValue(-20, 20), GetRandomValue(-20, 20) }; + enemyHit[i].speed = (Vector2){ (float)GetRandomValue(-500, 500)/100, (float)GetRandomValue(-500, 500)/100 }; + enemyHit[i].size = (float)GetRandomValue(1, 45)/30; + enemyHit[i].rotation = GetRandomValue(0, 360); + enemyHit[i].color = RED; + enemyHit[i].alpha = 1.0f; + enemyHit[i].active = false; + + popupScore[i].position = (Vector2){ GetRandomValue(-20, 20), GetRandomValue(-20, 20) }; + popupScore[i].scale = (float)GetRandomValue(1, 45)/30; + popupScore[i].alpha = 1.0f; + popupScore[i].active = false; + } + + for (int i = 0; i < MAX_LEAVES; i++) + { + leaf[i].x = 0; + leaf[i].y = 0; + leaf[i].width = 30; + leaf[i].height = 30; + leafActive[i] = false; + leafType[i] = -1; + + leafParticles[i].position = (Vector2){ 0, 0 }; + leafParticles[i].active = false; + + popupLeaves[i].position = (Vector2){ GetRandomValue(-20, 20), GetRandomValue(-20, 20) }; + popupLeaves[i].scale = (float)GetRandomValue(1, 45)/30; + popupLeaves[i].alpha = 1.0f; + popupLeaves[i].score = 0; + popupLeaves[i].active = false; + + for (int j = 0; j < 32; j++) + { + + leafParticles[i].particles[j].active = false; + leafParticles[i].particles[j].position = (Vector2){ GetRandomValue(-20, 20), GetRandomValue(-20, 20) }; + leafParticles[i].particles[j].speed = (Vector2){ (float)GetRandomValue(-500, 500)/100, (float)GetRandomValue(-500, 500)/100 }; + leafParticles[i].particles[j].size = (float)GetRandomValue(3, 10)/5; + leafParticles[i].particles[j].rotation = GetRandomValue(0, 360); + leafParticles[i].particles[j].color = WHITE; + leafParticles[i].particles[j].alpha = 1.0f; + } + } + + player.x = GetScreenWidth()*0.26f; + player.y = 100; + player.width = 35; + player.height = 60; + + bee.x = -200; + bee.y = 0; + bee.width = 50; + bee.height = 32; + beeActive = false; + + popupBee.position = (Vector2){ GetRandomValue(-20, 20), GetRandomValue(-20, 20) }; + popupBee.scale = (float)GetRandomValue(1, 45)/30; + popupBee.alpha = 1.0f; + popupBee.active = false; + + eagle.x = -128; + eagle.y = 0; + eagle.width = 200; + eagle.height = 80; + eagleActive = false; + + popupEagle.position = (Vector2){ GetRandomValue(-20, 20), GetRandomValue(-20, 20) }; + popupEagle.scale = (float)GetRandomValue(1, 45)/30; + popupEagle.alpha = 1.0f; + popupEagle.active = false; + + counterColor.r = 255; + counterColor.g = 224; + counterColor.b = 185; + counterColor.a = 255; + + zero.x = 0; + zero.y = 0; + + firePos.x = -200; + firePos.y = 0; + + textSize = MeasureTextEx(font, "3", font.baseSize*5, 2); +} diff --git a/games/koala_seasons/screens/screen_logo.c b/games/koala_seasons/screens/screen_logo.c new file mode 100644 index 00000000..a3035b30 --- /dev/null +++ b/games/koala_seasons/screens/screen_logo.c @@ -0,0 +1,227 @@ +/********************************************************************************************** +* +* raylib - Standard Game template +* +* Logo Screen Functions Definitions (Init, Update, Draw, Unload) +* +* Copyright (c) 2014 Ramon Santamaria (Ray San - [email protected]) +* +* This software is provided "as-is", without any express or implied warranty. In no event +* will the authors be held liable for any damages arising from the use of this software. +* +* Permission is granted to anyone to use this software for any purpose, including commercial +* applications, and to alter it and redistribute it freely, subject to the following restrictions: +* +* 1. The origin of this software must not be misrepresented; you must not claim that you +* wrote the original software. If you use this software in a product, an acknowledgment +* in the product documentation would be appreciated but is not required. +* +* 2. Altered source versions must be plainly marked as such, and must not be misrepresented +* as being the original software. +* +* 3. This notice may not be removed or altered from any source distribution. +* +**********************************************************************************************/ + +#include "raylib.h" +#include "screens.h" + +#include <string.h> + +//---------------------------------------------------------------------------------- +// Global Variables Definition (local to this module) +//---------------------------------------------------------------------------------- + +// Logo screen global variables +static int framesCounter; +static int finishScreen; + +const char msgLogoA[64] = "A simple and easy-to-use library"; +const char msgLogoB[64] = "to learn videogames programming"; + +int logoPositionX; +int logoPositionY; + +int raylibLettersCount = 0; + +int topSideRecWidth = 16; +int leftSideRecHeight = 16; + +int bottomSideRecWidth = 16; +int rightSideRecHeight = 16; + +char raylib[8] = " \0"; // raylib text array, max 8 letters + +int logoScreenState = 0; // Tracking animation states (State Machine) +bool msgLogoADone = false; +bool msgLogoBDone = false; + +int lettersCounter = 0; +char msgBuffer[128] = { ' ' }; + +//---------------------------------------------------------------------------------- +// Logo Screen Functions Definition +//---------------------------------------------------------------------------------- + +// Logo Screen Initialization logic +void InitLogoScreen(void) +{ + // Initialize LOGO screen variables here! + framesCounter = 0; + finishScreen = 0; + + logoPositionX = GetScreenWidth()/2 - 128; + logoPositionY = GetScreenHeight()/2 - 128; +} + +// Logo Screen Update logic +void UpdateLogoScreen(void) +{ + // Update LOGO screen + framesCounter++; // Count frames + + // Update LOGO screen variables + if (logoScreenState == 0) // State 0: Small box blinking + { + framesCounter++; + + if (framesCounter == 120) + { + logoScreenState = 1; + framesCounter = 0; // Reset counter... will be used later... + } + } + else if (logoScreenState == 1) // State 1: Top and left bars growing + { + topSideRecWidth += 4; + leftSideRecHeight += 4; + + if (topSideRecWidth == 256) logoScreenState = 2; + } + else if (logoScreenState == 2) // State 2: Bottom and right bars growing + { + bottomSideRecWidth += 4; + rightSideRecHeight += 4; + + if (bottomSideRecWidth == 256) + { + lettersCounter = 0; + for (int i = 0; i < (int)strlen(msgBuffer); i++) msgBuffer[i] = ' '; + + logoScreenState = 3; + } + } + else if (logoScreenState == 3) // State 3: Letters appearing (one by one) + { + framesCounter++; + + // Every 12 frames, one more letter! + if ((framesCounter%12) == 0) raylibLettersCount++; + + switch (raylibLettersCount) + { + case 1: raylib[0] = 'r'; break; + case 2: raylib[1] = 'a'; break; + case 3: raylib[2] = 'y'; break; + case 4: raylib[3] = 'l'; break; + case 5: raylib[4] = 'i'; break; + case 6: raylib[5] = 'b'; break; + default: break; + } + + if (raylibLettersCount >= 10) + { + // Write raylib description messages + if ((framesCounter%2) == 0) lettersCounter++; + + if (!msgLogoADone) + { + if (lettersCounter <= (int)strlen(msgLogoA)) strncpy(msgBuffer, msgLogoA, lettersCounter); + else + { + for (int i = 0; i < (int)strlen(msgBuffer); i++) msgBuffer[i] = ' '; + + lettersCounter = 0; + msgLogoADone = true; + } + } + else if (!msgLogoBDone) + { + if (lettersCounter <= (int)strlen(msgLogoB)) strncpy(msgBuffer, msgLogoB, lettersCounter); + else + { + msgLogoBDone = true; + framesCounter = 0; + //PlaySound(levelWin); + } + } + } + } + + // Wait for 2 seconds (60 frames) before jumping to TITLE screen + if (msgLogoBDone) + { + framesCounter++; + + if (framesCounter > 150) finishScreen = true; + } +} + +// Logo Screen Draw logic +void DrawLogoScreen(void) +{ + // Draw LOGO screen + if (logoScreenState == 0) + { + if ((framesCounter/15)%2) DrawRectangle(logoPositionX, logoPositionY - 60, 16, 16, BLACK); + } + else if (logoScreenState == 1) + { + DrawRectangle(logoPositionX, logoPositionY - 60, topSideRecWidth, 16, BLACK); + DrawRectangle(logoPositionX, logoPositionY - 60, 16, leftSideRecHeight, BLACK); + } + else if (logoScreenState == 2) + { + DrawRectangle(logoPositionX, logoPositionY - 60, topSideRecWidth, 16, BLACK); + DrawRectangle(logoPositionX, logoPositionY - 60, 16, leftSideRecHeight, BLACK); + + DrawRectangle(logoPositionX + 240, logoPositionY - 60, 16, rightSideRecHeight, BLACK); + DrawRectangle(logoPositionX, logoPositionY + 240 - 60, bottomSideRecWidth, 16, BLACK); + } + else if (logoScreenState == 3) + { + DrawRectangle(logoPositionX, logoPositionY - 60, topSideRecWidth, 16, BLACK); + DrawRectangle(logoPositionX, logoPositionY + 16 - 60, 16, leftSideRecHeight - 32, BLACK); + + DrawRectangle(logoPositionX + 240, logoPositionY + 16 - 60, 16, rightSideRecHeight - 32, BLACK); + DrawRectangle(logoPositionX, logoPositionY + 240 - 60, bottomSideRecWidth, 16, BLACK); + + DrawRectangle(GetScreenWidth()/2 - 112, GetScreenHeight()/2 - 112 - 60, 224, 224, RAYWHITE); + + DrawText(raylib, GetScreenWidth()/2 - 44, GetScreenHeight()/2 + 48 - 60, 50, BLACK); + + if (!msgLogoADone) DrawText(msgBuffer, GetScreenWidth()/2 - MeasureText(msgLogoA, 30)/2, logoPositionY + 230, 30, GRAY); + else + { + DrawText(msgLogoA, GetScreenWidth()/2 - MeasureText(msgLogoA, 30)/2, logoPositionY + 230, 30, GRAY); + + if (!msgLogoBDone) DrawText(msgBuffer, GetScreenWidth()/2 - MeasureText(msgLogoB, 30)/2, logoPositionY + 280, 30, GRAY); + else + { + DrawText(msgLogoB, GetScreenWidth()/2 - MeasureText(msgLogoA, 30)/2, logoPositionY + 280, 30, GRAY); + } + } + } +} + +// Logo Screen Unload logic +void UnloadLogoScreen(void) +{ + // TODO: Unload LOGO screen variables here! +} + +// Logo Screen should finish? +int FinishLogoScreen(void) +{ + return finishScreen; +}
\ No newline at end of file diff --git a/games/koala_seasons/screens/screen_title.c b/games/koala_seasons/screens/screen_title.c new file mode 100644 index 00000000..ee99da03 --- /dev/null +++ b/games/koala_seasons/screens/screen_title.c @@ -0,0 +1,1069 @@ +/********************************************************************************************** +* +* raylib - Koala Seasons game +* +* Title Screen Functions Definitions (Init, Update, Draw, Unload) +* +* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5) +* +* This software is provided "as-is", without any express or implied warranty. In no event +* will the authors be held liable for any damages arising from the use of this software. +* +* Permission is granted to anyone to use this software for any purpose, including commercial +* applications, and to alter it and redistribute it freely, subject to the following restrictions: +* +* 1. The origin of this software must not be misrepresented; you must not claim that you +* wrote the original software. If you use this software in a product, an acknowledgment +* in the product documentation would be appreciated but is not required. +* +* 2. Altered source versions must be plainly marked as such, and must not be misrepresented +* as being the original software. +* +* 3. This notice may not be removed or altered from any source distribution. +* +**********************************************************************************************/ + +#include "raylib.h" +#include "screens.h" + +#include <math.h> + +#include "atlas01.h" +#include "atlas02.h" + +#define MAX_DURATION 120 +#define MAX_particle 128 + +//---------------------------------------------------------------------------------- +// Global Variables Definition (local to this module) +//---------------------------------------------------------------------------------- + +typedef struct { + Vector2 position; + Vector2 speed; + float rotation; + float size; + Color color; + float alpha; + float rotPhy; + bool active; +} Particle; + +typedef struct { + Vector2 position; + Color color; + float alpha; + float size; + float rotation; + bool active; // NOTE: Use it to activate/deactive particle + bool fading; + float delayCounter; +} RayParticleTitle; + +typedef struct { + Vector2 position; + bool active; + int spawnTime; + int maxTime; + Particle particle[1024]; +} Stormparticleystem; + +typedef struct { + Vector2 position; + bool active; + int spawnTime; + int maxTime; + Particle particle[MAX_particle]; +} particleystemTitle; + +typedef struct { + Vector2 position; + bool active; + int spawnTime; + int maxTime; + RayParticleTitle particle[20]; +} RayparticleystemTitle; + +// Title screen global variables +static int framesCounter; +static int finishScreen; +static int globalFrameCounter; +static int currentFrame; +static int thisFrame; +static int parallaxBackOffset; +static int parallaxFrontOffset; + +static float currentValue1; +static float currentValue2; +static float initValue1; +static float initValue2; +static float finishValue1; +static float finishValue2; +static float duration; + +static Vector2 fontSize; + +static bool soundActive; +static bool musicActive; + +static Rectangle koalaMenu; + +static Rectangle bamboo[5]; +static Rectangle player = {0, 0, 0, 0}; +static Rectangle soundButton; +static Rectangle speakerButton; + +static Color color00, color01, color02, color03; + +static particleystemTitle snowParticle; +static particleystemTitle backSnowParticle; +static particleystemTitle dandelionParticle; +static particleystemTitle dandelionBackParticle; +static particleystemTitle planetreeParticle; +static particleystemTitle backPlanetreeParticle; +static particleystemTitle flowerParticle; +static particleystemTitle backFlowerParticle; +static particleystemTitle rainParticle; +static particleystemTitle backRainParticle; +static RayparticleystemTitle rayparticle; +static RayparticleystemTitle backRayparticle; +static Stormparticleystem rainStormParticle; +static Stormparticleystem snowStormParticle; + +const char pressToPlay[16] = "Press to play"; + +//---------------------------------------------------------------------------------- +// Title Screen Functions Definition +//---------------------------------------------------------------------------------- +static void DrawParallaxFront(void); +static void DrawParallaxMiddle(void); +static void DrawParallaxBack(void); + +static float BounceEaseOut(float t,float b , float c, float d); + +// Title Screen Initialization logic +void InitTitleScreen(void) +{ + framesCounter = 0; + finishScreen = 0; + initValue1 = -100; + finishValue1 = 100; + initValue2 = 700; + finishValue2 = finishValue1 + 220; + duration = MAX_DURATION; + initSeason = GetRandomValue(0, 3); + soundActive = true; + musicActive = true; + + parallaxBackOffset = GetRandomValue(10, 100); + parallaxFrontOffset = GetRandomValue(100, 200); + + rainChance = GetRandomValue(0, 100); + + snowParticle.position = (Vector2){ 0, 0 }; + snowParticle.active = false; + backSnowParticle.position = (Vector2){ 0, 0 }; + backSnowParticle.active = false; + planetreeParticle.position = (Vector2){ 0, 0 }; + planetreeParticle.active = false; + backPlanetreeParticle.position = (Vector2){ 0, 0 }; + backPlanetreeParticle.active = false; + dandelionParticle.active = false; + dandelionBackParticle.position = (Vector2){ 0, 0}; + flowerParticle.position = (Vector2){ 0, 0 }; + flowerParticle.active = false; + backFlowerParticle.position = (Vector2){ 0, 0 }; + backFlowerParticle.active = false; + rayparticle.position = (Vector2){ 0, 0 }; + rayparticle.active = false; + backRayparticle.position = (Vector2){ 0, 0 }; + backRayparticle.active = false; + rainStormParticle.position = (Vector2){ 0, 0 }; + rainStormParticle.active = false; + snowStormParticle.position = (Vector2){ 0, 0 }; + snowStormParticle.active = false; + + soundButton = (Rectangle){ GetScreenWidth()*0.85, GetScreenHeight()*0.7, title_music_on.width, title_music_on.height }; + speakerButton = (Rectangle){ GetScreenWidth()*0.85, GetScreenHeight()*0.85, title_speaker_on.width, title_speaker_on.height }; + + for (int j = 0; j < MAX_particle; j++) + { + snowParticle.particle[j].active = false; + snowParticle.particle[j].position = (Vector2){ 0, 0 }; + snowParticle.particle[j].size = (float)GetRandomValue(3, 9)/10; + snowParticle.particle[j].rotation = GetRandomValue(0, 360); + snowParticle.particle[j].color = WHITE; + snowParticle.particle[j].alpha = 1.0f; + + backSnowParticle.particle[j].active = false; + backSnowParticle.particle[j].position = (Vector2){ 0, 0 }; + backSnowParticle.particle[j].size = (float)GetRandomValue(2, 8)/10; + backSnowParticle.particle[j].rotation = GetRandomValue(0, 360); + backSnowParticle.particle[j].color = WHITE; + backSnowParticle.particle[j].alpha = 0.7f; + + planetreeParticle.particle[j].active = false; + planetreeParticle.particle[j].position = (Vector2){ 0, 0 }; + planetreeParticle.particle[j].size = (float)GetRandomValue(3, 9)/10; + planetreeParticle.particle[j].rotation = GetRandomValue(0, 360); + planetreeParticle.particle[j].color = WHITE; + planetreeParticle.particle[j].alpha = 1.0f; + + backPlanetreeParticle.particle[j].active = false; + backPlanetreeParticle.particle[j].position = (Vector2){ 0, 0 }; + backPlanetreeParticle.particle[j].size = (float)GetRandomValue(2, 8)/10; + backPlanetreeParticle.particle[j].rotation = GetRandomValue(0, 360); + backPlanetreeParticle.particle[j].color = WHITE; + backPlanetreeParticle.particle[j].alpha = 0.7f; + + dandelionParticle.particle[j].active = false; + dandelionParticle.particle[j].position = (Vector2){ 0, 0 }; + dandelionParticle.particle[j].size = (float)GetRandomValue(3, 9)/10; + dandelionParticle.particle[j].rotation = 0; + dandelionParticle.particle[j].color = WHITE; + dandelionParticle.particle[j].alpha = 1; + dandelionParticle.particle[j].rotPhy = GetRandomValue(0 , 180); + + dandelionBackParticle.particle[j].active = false; + dandelionBackParticle.particle[j].position = (Vector2){ 0, 0 }; + dandelionBackParticle.particle[j].size = (float)GetRandomValue(2, 8)/10; + dandelionBackParticle.particle[j].rotation = 0; + dandelionBackParticle.particle[j].color = WHITE; + dandelionBackParticle.particle[j].alpha = 0.7f; + dandelionBackParticle.particle[j].rotPhy = GetRandomValue(0 , 180); + + flowerParticle.particle[j].active = false; + flowerParticle.particle[j].position = (Vector2){ 0, 0 }; + flowerParticle.particle[j].size = (float)GetRandomValue(3, 9)/10; + flowerParticle.particle[j].rotation = GetRandomValue(0, 360); + flowerParticle.particle[j].color = WHITE; + flowerParticle.particle[j].alpha = 1.0f; + + backFlowerParticle.particle[j].active = false; + backFlowerParticle.particle[j].position = (Vector2){ 0, 0 }; + backFlowerParticle.particle[j].size = (float)GetRandomValue(2, 8)/10; + backFlowerParticle.particle[j].rotation = GetRandomValue(0, 360); + backFlowerParticle.particle[j].color = WHITE; + backFlowerParticle.particle[j].alpha = 0.7f; + + rainParticle.particle[j].active = false; + rainParticle.particle[j].position = (Vector2){ 0, 0 }; + rainParticle.particle[j].size = (float)GetRandomValue(3, 9)/10; + rainParticle.particle[j].rotation = -20; + rainParticle.particle[j].color = WHITE; + rainParticle.particle[j].alpha = 1.0f; + + backRainParticle.particle[j].active = false; + backRainParticle.particle[j].position = (Vector2){ 0, 0 }; + backRainParticle.particle[j].size = (float)GetRandomValue(2, 8)/10; + backRainParticle.particle[j].rotation = -20; + backRainParticle.particle[j].color = WHITE; + backRainParticle.particle[j].alpha = 0.7f; + } + + for (int j = 0; j < 1024; j++) + { + rainStormParticle.particle[j].active = false; + rainStormParticle.particle[j].position = (Vector2){ 0, 0 }; + rainStormParticle.particle[j].size = (float)GetRandomValue(3, 9)/10; + rainStormParticle.particle[j].rotation = -40; + rainStormParticle.particle[j].color = WHITE; + rainStormParticle.particle[j].alpha = 1.0f; + } + + for (int j = 0; j < 256; j++) + { + snowStormParticle.particle[j].active = false; + snowStormParticle.particle[j].position = (Vector2){ 0, 0 }; + snowStormParticle.particle[j].size = (float)GetRandomValue(4, 8)/10; + snowStormParticle.particle[j].rotation = 40; + snowStormParticle.particle[j].color = WHITE; + snowStormParticle.particle[j].alpha = 1.0f; + } + + for (int i = 0; i < 20; i++) + { + rayparticle.particle[i].position = (Vector2){ 0, 0 }; + rayparticle.particle[i].color.r = 255; + rayparticle.particle[i].color.g = 255; + rayparticle.particle[i].color.b = 182; + rayparticle.particle[i].color.a = 255; + rayparticle.particle[i].alpha = 0.0f; + rayparticle.particle[i].size = (float)GetRandomValue(15, 20)/10; + rayparticle.particle[i].rotation = 0.0f; + rayparticle.particle[i].active = false; + rayparticle.particle[i].fading = false; + rayparticle.particle[i].delayCounter = 0; + + backRayparticle.particle[i].position = (Vector2){ 0, 0 }; + backRayparticle.particle[i].color.r = 255; + backRayparticle.particle[i].color.g = 255; + backRayparticle.particle[i].color.b = 182; + backRayparticle.particle[i].color.a = 255; + backRayparticle.particle[i].alpha = 0.0f; + backRayparticle.particle[i].size = (float)GetRandomValue(5, 10)/10; + backRayparticle.particle[i].rotation = 0.0f; + backRayparticle.particle[i].active = false; + backRayparticle.particle[i].fading = false; + backRayparticle.particle[i].delayCounter = 0; + } + + for (int i = 0; i < 5; i++) + { + bamboo[i].x = 150 + 200*i; + bamboo[i].y = 0; + bamboo[i].width = 30; + bamboo[i].height = GetScreenHeight(); + } + + player.x = 350; + player.y = 100; + player.width = 35; + player.height = 60; + + koalaMenu.x = gameplay_koala_menu.x; + koalaMenu.y = gameplay_koala_menu.y; + koalaMenu.width = gameplay_koala_menu.width/2; + koalaMenu.height = gameplay_koala_menu.height; + + fontSize = MeasureTextEx(font, "PRESS TO PLAY", font.baseSize, 2); +} + +// Title Screen Update logic +void UpdateTitleScreen(void) +{ + framesCounter += 1*TIME_FACTOR; + globalFrameCounter += 1*TIME_FACTOR; + + if (framesCounter < duration) + { + currentValue1 = BounceEaseOut((float) framesCounter, initValue1, (finishValue1 - initValue1), duration); + currentValue2 = BounceEaseOut((float) framesCounter, initValue2, (finishValue2 - initValue2), duration); + } + + thisFrame += 1*TIME_FACTOR; + + if (thisFrame >= 40) + { + currentFrame++; + thisFrame = 0; + } + + if (currentFrame > 1) currentFrame = 0; + + koalaMenu.x = gameplay_koala_menu.x + koalaMenu.width*currentFrame; + + if (initSeason == 0) + { + dandelionParticle.active = true; + dandelionBackParticle.active = true; + rayparticle.active = true; + backRayparticle.active = true; + + rainParticle.active = false; + rainStormParticle.active = false; + backRainParticle.active = false; + + color00 = (Color){129, 172, 86, 255}; // Summer Color + color01 = (Color){145, 165, 125, 255}; + color02 = (Color){161, 130, 73, 255}; + color03 = (Color){198, 103, 51, 255}; + } + else if (initSeason == 1) + { + if (rainChance > 40) + { + planetreeParticle.active = true; + backPlanetreeParticle.active = true; + rainParticle.active = false; + backRainParticle.active = false; + } + else if (rainChance <= 40 && rainChance > 15) + { + rainStormParticle.active = true; + backRainParticle.active = false; + } + else if (rainChance <= 15) + { + rainStormParticle.active = true; + backRainParticle.active = false; + } + + color00 = (Color){242, 113, 62, 255}; // Fall Color + color01 = (Color){190, 135, 114, 255}; + color02 = (Color){144, 130, 101, 255}; + color03 = (Color){214, 133, 58, 255}; + + } + else if (initSeason == 2) + { + + if (rainChance > 40) + { + snowParticle.active = true; + backSnowParticle.active = true; + } + else + { + snowStormParticle.active = true; + backSnowParticle.active = true; + } + + rainParticle.active = false; + rainStormParticle.active = false; + backRainParticle.active = false; + + color00 = (Color){130, 130, 181, 255}; // Winter Color + color01 = (Color){145, 145, 166, 255}; + color02 = (Color){104, 142, 144, 255}; + color03 = (Color){57, 140, 173, 255}; + } + else if (initSeason == 3) + { + flowerParticle.active = true; + backFlowerParticle.active = true; + + rainParticle.active = false; + rainStormParticle.active = false; + backRainParticle.active = false; + + color00 = (Color){196, 176, 49, 255}; // Spring Color + color01 = (Color){178, 163, 67, 255}; + color02 = (Color){133, 143, 90, 255}; + color03 = (Color){133, 156, 42, 255}; + } + + // Snow Particle + if (snowParticle.active) + { + snowParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_particle; i++) + { + if (!snowParticle.particle[i].active && snowParticle.spawnTime >= snowParticle.maxTime) + { + snowParticle.particle[i].active = true; + snowParticle.particle[i].position = (Vector2){GetRandomValue(0, GetScreenWidth() + 200), -10}; + snowParticle.spawnTime = 0; + snowParticle.maxTime = GetRandomValue (5, 20); + } + } + } + + if (backSnowParticle.active) + { + backSnowParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_particle; i++) + { + if (!backSnowParticle.particle[i].active && backSnowParticle.spawnTime >= backSnowParticle.maxTime) + { + backSnowParticle.particle[i].active = true; + backSnowParticle.particle[i].position = (Vector2){GetRandomValue(0, GetScreenWidth() + 200), -10}; + backSnowParticle.spawnTime = 0; + backSnowParticle.maxTime = GetRandomValue (3, 10); + } + } + } + + // Autumn leaves particle + if (planetreeParticle.active) + { + planetreeParticle.spawnTime += 1*TIME_FACTOR; + backPlanetreeParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_particle; i++) + { + if (!planetreeParticle.particle[i].active && planetreeParticle.spawnTime >= planetreeParticle.maxTime) + { + planetreeParticle.particle[i].active = true; + planetreeParticle.particle[i].position = (Vector2){GetRandomValue(0, GetScreenWidth() + 200), -10}; + planetreeParticle.spawnTime = 0; + planetreeParticle.maxTime = GetRandomValue (5, 20); + } + + if (!backPlanetreeParticle.particle[i].active && backPlanetreeParticle.spawnTime >= backPlanetreeParticle.maxTime) + { + backPlanetreeParticle.particle[i].active = true; + backPlanetreeParticle.particle[i].position = (Vector2){GetRandomValue(0, GetScreenWidth() + 200), -10}; + backPlanetreeParticle.spawnTime = 0; + backPlanetreeParticle.maxTime = GetRandomValue (3, 10); + } + } + } + + // Dandelion particle + if (dandelionParticle.active) + { + dandelionParticle.spawnTime += 1*TIME_FACTOR; + dandelionBackParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_particle; i++) + { + if (!dandelionParticle.particle[i].active && dandelionParticle.spawnTime >= dandelionParticle.maxTime) + { + dandelionParticle.particle[i].active = true; + dandelionParticle.particle[i].position = (Vector2){GetRandomValue(0, GetScreenWidth() + 200), -10}; + dandelionParticle.spawnTime = 0; + dandelionParticle.maxTime = GetRandomValue (5, 20); + } + + if (!dandelionBackParticle.particle[i].active && dandelionBackParticle.spawnTime >= dandelionBackParticle.maxTime) + { + dandelionBackParticle.particle[i].active = true; + dandelionBackParticle.particle[i].position = (Vector2){GetRandomValue(0, GetScreenWidth() + 200), -10}; + dandelionBackParticle.spawnTime = 0; + dandelionBackParticle.maxTime = GetRandomValue (3, 10); + } + } + } + + // Flower Particle + if (flowerParticle.active) + { + + flowerParticle.spawnTime += 1*TIME_FACTOR; + backFlowerParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_particle; i++) + { + if (!flowerParticle.particle[i].active && flowerParticle.spawnTime >= flowerParticle.maxTime) + { + flowerParticle.particle[i].active = true; + flowerParticle.particle[i].position = (Vector2){GetRandomValue(0, GetScreenWidth() + 200), -10}; + flowerParticle.spawnTime = 0; + flowerParticle.maxTime = GetRandomValue (5, 20); + } + + if (!backFlowerParticle.particle[i].active && backFlowerParticle.spawnTime >= backFlowerParticle.maxTime) + { + backFlowerParticle.particle[i].active = true; + backFlowerParticle.particle[i].position = (Vector2){GetRandomValue(0, GetScreenWidth() + 200), -10}; + backFlowerParticle.spawnTime = 0; + backFlowerParticle.maxTime = GetRandomValue (3, 10); + } + } + } + + // Storm particle + if (rainStormParticle.active) + { + + rainStormParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < 1024; i++) + { + if (!rainStormParticle.particle[i].active && rainStormParticle.spawnTime >= rainStormParticle.maxTime) + { + for (int j = 0; j < 16; j++) + { + rainStormParticle.particle[i+j].active = true; + rainStormParticle.particle[i+j].position = (Vector2){GetRandomValue(100, GetScreenWidth() + 1000), GetRandomValue(-10,-20)}; + } + + rainStormParticle.spawnTime = 0; + rainStormParticle.maxTime = 4; + } + } + } + + // Snow Storm particle + if (snowStormParticle.active) + { + snowStormParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < 256; i++) + { + if (!snowStormParticle.particle[i].active && snowStormParticle.spawnTime >= snowStormParticle.maxTime) + { + snowStormParticle.particle[i].active = true; + snowStormParticle.particle[i].position = (Vector2){GetRandomValue(100, GetScreenWidth() + 800), -10}; + snowStormParticle.spawnTime = 0; + snowStormParticle.maxTime = GetRandomValue (1, 2); + } + } + } + + if (rayparticle.active) + { + rayparticle.spawnTime += 1*TIME_FACTOR; + backRayparticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < 20; i++) + { + if (!rayparticle.particle[i].active && rayparticle.spawnTime >= rayparticle.maxTime) + { + //printf("PARTICLEEES"); + rayparticle.particle[i].active = true; + rayparticle.particle[i].alpha = 0.0f; + rayparticle.particle[i].size = (float)(GetRandomValue(10, 20)/10); + rayparticle.particle[i].position = (Vector2){GetRandomValue(300, GetScreenWidth() + 200), 0}; + rayparticle.particle[i].rotation = -35; + rayparticle.spawnTime = 0; + rayparticle.particle[i].delayCounter = 0; + rayparticle.maxTime = GetRandomValue (20, 50); + } + + if (!backRayparticle.particle[i].active && backRayparticle.spawnTime >= backRayparticle.maxTime) + { + backRayparticle.particle[i].active = true; + backRayparticle.particle[i].alpha = 0.0f; + backRayparticle.particle[i].size = (float)(GetRandomValue(5, 15)/10); + backRayparticle.particle[i].position = (Vector2){GetRandomValue(300, GetScreenWidth() + 200), 0}; + backRayparticle.particle[i].rotation = -35; + backRayparticle.spawnTime = 0; + backRayparticle.particle[i].delayCounter = 0; + backRayparticle.maxTime = GetRandomValue (20, 50); + } + } + } + + if (rainParticle.active) + { + rainParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_particle; i++) + { + if (!rainParticle.particle[i].active && rainParticle.spawnTime >= rainParticle.maxTime) + { + rainParticle.particle[i].active = true; + rainParticle.particle[i].position = (Vector2){GetRandomValue(0, GetScreenWidth() + 200), -10}; + rainParticle.spawnTime = 0; + rainParticle.maxTime = GetRandomValue (1, 8); + } + } + } + + if (backRainParticle.active) + { + backRainParticle.spawnTime += 1*TIME_FACTOR; + + for (int i = 0; i < MAX_particle; i++) + { + + if (!backRainParticle.particle[i].active && backRainParticle.spawnTime >= backRainParticle.maxTime) + { + backRainParticle.particle[i].active = true; + backRainParticle.particle[i].position = (Vector2){GetRandomValue(0, GetScreenWidth() + 200), -10}; + backRainParticle.spawnTime = 0; + backRainParticle.maxTime = GetRandomValue (3, 10); + } + } + } + + // particle Logic + for (int i = 0; i < MAX_particle; i++) + { + if (snowParticle.particle[i].active) + { + snowParticle.particle[i].position.y += 2*TIME_FACTOR; + snowParticle.particle[i].position.x -= 2*TIME_FACTOR; + snowParticle.particle[i].rotation += 0.5*TIME_FACTOR; + if (snowParticle.particle[i].position.y >= GetScreenHeight()) snowParticle.particle[i].active = false; + } + + if (backSnowParticle.particle[i].active) + { + backSnowParticle.particle[i].position.y += 4*TIME_FACTOR; + backSnowParticle.particle[i].position.x -= 3*TIME_FACTOR; + backSnowParticle.particle[i].rotation += 0.5*TIME_FACTOR; + if (backSnowParticle.particle[i].position.y >= GetScreenHeight()) backSnowParticle.particle[i].active = false; + } + + if (planetreeParticle.particle[i].active) + { + planetreeParticle.particle[i].position.y += 4*TIME_FACTOR; + planetreeParticle.particle[i].position.x -= 2*TIME_FACTOR; + planetreeParticle.particle[i].rotation += 0.5*TIME_FACTOR; + if (planetreeParticle.particle[i].position.y >= GetScreenHeight()) planetreeParticle.particle[i].active = false; + } + + if (backPlanetreeParticle.particle[i].active) + { + backPlanetreeParticle.particle[i].position.y += 4*TIME_FACTOR; + backPlanetreeParticle.particle[i].position.x -= 3*TIME_FACTOR; + backPlanetreeParticle.particle[i].rotation += 0.5*TIME_FACTOR; + if (backPlanetreeParticle.particle[i].position.y >= GetScreenHeight()) backPlanetreeParticle.particle[i].active = false; + } + + if (dandelionParticle.particle[i].active) + { + dandelionParticle.particle[i].position.y += 2.5*TIME_FACTOR; + dandelionParticle.particle[i].position.x -= 2*TIME_FACTOR; + dandelionParticle.particle[i].rotation = -(30*sin(2*PI/120*globalFrameCounter + dandelionParticle.particle[i].rotPhy) + 30); + if (dandelionParticle.particle[i].position.y >= GetScreenHeight()) dandelionParticle.particle[i].active = false; + } + + if (dandelionBackParticle.particle[i].active) + { + dandelionBackParticle.particle[i].position.y += 2*TIME_FACTOR; + dandelionBackParticle.particle[i].position.x -= 3*TIME_FACTOR; + dandelionBackParticle.particle[i].rotation = -(30*sin(2*PI/120*globalFrameCounter + dandelionParticle.particle[i].rotPhy) + 30); + if (dandelionBackParticle.particle[i].position.y >= GetScreenHeight()) dandelionBackParticle.particle[i].active = false; + } + + if (flowerParticle.particle[i].active) + { + flowerParticle.particle[i].position.y += 2.5*TIME_FACTOR; + flowerParticle.particle[i].position.x -= 2*TIME_FACTOR; + flowerParticle.particle[i].rotation += 0.5*TIME_FACTOR; + if (flowerParticle.particle[i].position.y >= GetScreenHeight()) flowerParticle.particle[i].active = false; + } + + if (backFlowerParticle.particle[i].active) + { + backFlowerParticle.particle[i].position.y += 2*TIME_FACTOR; + backFlowerParticle.particle[i].position.x -= 3*TIME_FACTOR; + backFlowerParticle.particle[i].rotation += 0.5*TIME_FACTOR; + if (backFlowerParticle.particle[i].position.y >= GetScreenHeight()) backFlowerParticle.particle[i].active = false; + } + + if (rainParticle.particle[i].active) + { + rainParticle.particle[i].position.y += 4*TIME_FACTOR; + rainParticle.particle[i].position.x -= 5*TIME_FACTOR; + //rainParticle.particle[i].rotation += 0.5; + if (rainParticle.particle[i].position.y >= GetScreenHeight()) rainParticle.particle[i].active = false; + } + + if (backRainParticle.particle[i].active) + { + backRainParticle.particle[i].position.y += 3*TIME_FACTOR; + backRainParticle.particle[i].position.x -= 3*TIME_FACTOR; + //rainParticle.particle[i].rotation += 0.5; + if (backRainParticle.particle[i].position.y >= GetScreenHeight()) backRainParticle.particle[i].active = false; + } + } + + for (int i = 0; i < 1024; i++) + { + if (rainStormParticle.particle[i].active) + { + rainStormParticle.particle[i].position.y += 12*TIME_FACTOR; + rainStormParticle.particle[i].position.x -= 15*TIME_FACTOR; + //rainParticle.particle[i].rotation += 0.5; + if (rainStormParticle.particle[i].position.y >= GetScreenHeight()) rainStormParticle.particle[i].active = false; + if (rainStormParticle.active == false)rainStormParticle.particle[i].alpha -= 0.01; + } + } + + for (int i = 0; i < 256; i++) + { + if (snowStormParticle.particle[i].active) + { + snowStormParticle.particle[i].position.y += 12; + snowStormParticle.particle[i].position.x -= 15; + snowStormParticle.particle[i].rotation += 0.5; + if (snowStormParticle.particle[i].position.y >= GetScreenHeight()) snowStormParticle.particle[i].active = false; + } + } + + for (int i = 0; i < 20; i++) + { + if (rayparticle.particle[i].active) + { + rayparticle.particle[i].position.x -= 0.5*TIME_FACTOR; + + if (rayparticle.particle[i].fading) + { + rayparticle.particle[i].alpha -= 0.01f; + + if (rayparticle.particle[i].alpha <= 0) + { + rayparticle.particle[i].alpha = 0; + rayparticle.particle[i].delayCounter++; + if (rayparticle.particle[i].delayCounter >= 30) + { + rayparticle.particle[i].active = false; + rayparticle.particle[i].delayCounter = 0; + rayparticle.particle[i].fading = false; + } + } + } + else + { + rayparticle.particle[i].alpha += 0.01f; + + if (rayparticle.particle[i].alpha >= 0.5f) + { + rayparticle.particle[i].alpha = 0.5f; + rayparticle.particle[i].delayCounter++; + + if (rayparticle.particle[i].delayCounter >= 30) + { + rayparticle.particle[i].delayCounter = 0; + rayparticle.particle[i].fading = true; + } + } + } + } + + if (backRayparticle.particle[i].active) + { + backRayparticle.particle[i].position.x -= 0.5; + + if (backRayparticle.particle[i].fading) + { + backRayparticle.particle[i].alpha -= 0.01f; + if (backRayparticle.particle[i].alpha <= 0) + { + backRayparticle.particle[i].alpha = 0; + backRayparticle.particle[i].delayCounter++; + if (backRayparticle.particle[i].delayCounter >= 30) + { + backRayparticle.particle[i].active = false; + backRayparticle.particle[i].delayCounter = 0; + backRayparticle.particle[i].fading = false; + } + } + } + else + { + backRayparticle.particle[i].alpha += 0.01f; + if (backRayparticle.particle[i].alpha >= 0.5f) + { + backRayparticle.particle[i].alpha = 0.5f; + backRayparticle.particle[i].delayCounter++; + if (backRayparticle.particle[i].delayCounter >= 30) + { + backRayparticle.particle[i].delayCounter = 0; + backRayparticle.particle[i].fading = true; + } + } + } + } + } + + // Press enter to change to GAMEPLAY screen +#if (defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)) + if (((IsGestureDetected(GESTURE_TAP) || (GetGestureDetected() == GESTURE_DOUBLETAP)) && framesCounter >= duration)) + { + //finishScreen = 1; // OPTIONS + finishScreen = 2; // GAMEPLAY + } +#elif (defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)) + if ((IsKeyPressed(KEY_ENTER) && framesCounter >= duration)) + { + //finishScreen = 1; // OPTIONS + finishScreen = 2; // GAMEPLAY + } +#endif +} + +// Title Screen Draw logic +void DrawTitleScreen(void) +{ + BeginShaderMode(colorBlend); + + DrawTexturePro(atlas02,gameplay_background, (Rectangle){0, 0, gameplay_background.width*2, gameplay_background.height*2}, (Vector2){0, 0}, 0, color02); + + // Draw parallax + DrawParallaxBack(); + DrawParallaxMiddle(); + + for (int i = 0; i < MAX_particle; i++) + { + if (backSnowParticle.particle[i].active) DrawTexturePro(atlas02, particle_icecrystal_bw, + (Rectangle){ backSnowParticle.particle[i].position.x, backSnowParticle.particle[i].position.y, particle_icecrystal_bw.width*backSnowParticle.particle[i].size, particle_icecrystal_bw.height*backSnowParticle.particle[i].size }, + (Vector2){ particle_icecrystal_bw.width*backSnowParticle.particle[i].size/2, particle_icecrystal_bw.height*backSnowParticle.particle[i].size/2 }, backSnowParticle.particle[i].rotation, + Fade((Color){144, 214, 255, 255}, backSnowParticle.particle[i].alpha)); + + if (backPlanetreeParticle.particle[i].active) DrawTexturePro(atlas02, particle_planetreeleaf_bw, + (Rectangle){ backPlanetreeParticle.particle[i].position.x, backPlanetreeParticle.particle[i].position.y, particle_planetreeleaf_bw.width*backPlanetreeParticle.particle[i].size, particle_planetreeleaf_bw.height*backPlanetreeParticle.particle[i].size }, + (Vector2){ particle_planetreeleaf_bw.width*backPlanetreeParticle.particle[i].size/2, particle_planetreeleaf_bw.height*backPlanetreeParticle.particle[i].size/2 }, backPlanetreeParticle.particle[i].rotation, + Fade((Color){179, 86, 6, 255}, backPlanetreeParticle.particle[i].alpha)); + + if (dandelionBackParticle.particle[i].active) DrawTexturePro(atlas02, particle_dandelion_bw, + (Rectangle){ dandelionBackParticle.particle[i].position.x, dandelionBackParticle.particle[i].position.y, particle_dandelion_bw.width*dandelionBackParticle.particle[i].size, particle_dandelion_bw.height*dandelionBackParticle.particle[i].size }, + (Vector2){ particle_dandelion_bw.width*dandelionBackParticle.particle[i].size/2, particle_dandelion_bw.height*dandelionBackParticle.particle[i].size/2 }, dandelionBackParticle.particle[i].rotation, + Fade((Color){202, 167, 126, 255}, dandelionBackParticle.particle[i].alpha)); + + if (backFlowerParticle.particle[i].active) DrawTexturePro(atlas02, particle_ecualyptusflower_bw, + (Rectangle){ backFlowerParticle.particle[i].position.x, backFlowerParticle.particle[i].position.y, particle_ecualyptusflower_bw.width*backFlowerParticle.particle[i].size, particle_ecualyptusflower_bw.height*backFlowerParticle.particle[i].size }, + (Vector2){ particle_ecualyptusflower_bw.width*backFlowerParticle.particle[i].size/2, particle_ecualyptusflower_bw.height*backFlowerParticle.particle[i].size/2 }, backFlowerParticle.particle[i].rotation, + Fade((Color){218, 84, 108, 255}, backFlowerParticle.particle[i].alpha)); + + if (backRainParticle.particle[i].active) DrawTexturePro(atlas02, particle_waterdrop_bw, + (Rectangle){ backRainParticle.particle[i].position.x, backRainParticle.particle[i].position.y, particle_waterdrop_bw.width*backRainParticle.particle[i].size, particle_waterdrop_bw.height*backRainParticle.particle[i].size }, + (Vector2){ particle_waterdrop_bw.width*backRainParticle.particle[i].size/2, particle_waterdrop_bw.height*backRainParticle.particle[i].size/2 }, backRainParticle.particle[i].rotation, + Fade((Color){144, 183, 187, 255}, backRainParticle.particle[i].alpha)); + } + + for (int i = 0; i < 20; i++) + { + if (backRayparticle.particle[i].active) DrawTexturePro(atlas02, gameplay_back_fx_lightraymid, + (Rectangle){ backRayparticle.particle[i].position.x, backRayparticle.particle[i].position.y, gameplay_back_fx_lightraymid.width*backRayparticle.particle[i].size, gameplay_back_fx_lightraymid.height*backRayparticle.particle[i].size }, + (Vector2){ gameplay_back_fx_lightraymid.width*backRayparticle.particle[i].size/2, gameplay_back_fx_lightraymid.height*backRayparticle.particle[i].size/2 }, backRayparticle.particle[i].rotation, + Fade(GOLD, backRayparticle.particle[i].alpha)); + } + + DrawParallaxFront(); + + for (int i = 0; i < 5; i++) + { + DrawTexturePro(atlas02, gameplay_props_tree, (Rectangle){bamboo[i].x, bamboo[i].y, 43, 720}, (Vector2){0, 0}, 0, color03); + //DrawRectangleRec(bamboo[i], Fade(LIME, 0.5)); + } + + EndShaderMode(); + + DrawTextureRec(atlas01, koalaMenu, (Vector2){player.x - player.width, player.y - 40}, WHITE); + + BeginShaderMode(colorBlend); + + DrawTexturePro(atlas02, gameplay_back_ground00, (Rectangle){0, 637, gameplay_back_ground00.width*2, gameplay_back_ground00.height*2}, (Vector2){0,0}, 0, color00); + + EndShaderMode(); + + DrawTexturePro(atlas01, (Rectangle){title_titletext.x, title_titletext.y, title_titletext.width, 230}, (Rectangle){GetScreenWidth()*0.49F - title_titletext.width/2, currentValue1, title_titletext.width, 235}, (Vector2){0, 0}, 0, WHITE); + DrawTexturePro(atlas01, (Rectangle){title_titletext.x, title_titletext.y + 232, title_titletext.width, 116}, (Rectangle){GetScreenWidth()*0.49F - title_titletext.width/2, currentValue2, title_titletext.width, 116}, (Vector2){0, 0}, 0, WHITE); + + if ((framesCounter/60)%2 && framesCounter >= duration) DrawTextEx(font, pressToPlay, (Vector2){ GetScreenWidth()/2 - fontSize.x/2, GetScreenHeight()/2 + fontSize.y*2 }, font.baseSize, 2, (Color){247, 239, 209, 255}); + + for (int i = 0; i < MAX_particle; i++) + { + if (snowParticle.particle[i].active) DrawTexturePro(atlas01, particle_icecrystal, + (Rectangle){ snowParticle.particle[i].position.x, snowParticle.particle[i].position.y, particle_icecrystal.width*snowParticle.particle[i].size, particle_icecrystal.height*snowParticle.particle[i].size }, + (Vector2){ particle_icecrystal.width*snowParticle.particle[i].size/2, particle_icecrystal.height*snowParticle.particle[i].size/2 }, snowParticle.particle[i].rotation, + Fade(snowParticle.particle[i].color, snowParticle.particle[i].alpha)); + + if (planetreeParticle.particle[i].active) DrawTexturePro(atlas01, particle_planetreeleaf, + (Rectangle){ planetreeParticle.particle[i].position.x, planetreeParticle.particle[i].position.y, particle_planetreeleaf.width*planetreeParticle.particle[i].size, particle_planetreeleaf.height*planetreeParticle.particle[i].size }, + (Vector2){ particle_planetreeleaf.width*planetreeParticle.particle[i].size/2, particle_planetreeleaf.height*planetreeParticle.particle[i].size/2 }, planetreeParticle.particle[i].rotation, + Fade(planetreeParticle.particle[i].color, planetreeParticle.particle[i].alpha)); + + if (dandelionParticle.particle[i].active) DrawTexturePro(atlas01, particle_dandelion, + (Rectangle){ dandelionParticle.particle[i].position.x, dandelionParticle.particle[i].position.y, particle_dandelion.width*dandelionParticle.particle[i].size, particle_dandelion.height*dandelionParticle.particle[i].size }, + (Vector2){ particle_dandelion.width*dandelionParticle.particle[i].size/2, particle_dandelion.height*dandelionParticle.particle[i].size/2 }, dandelionParticle.particle[i].rotation, + Fade(dandelionParticle.particle[i].color, dandelionParticle.particle[i].alpha)); + + if (flowerParticle.particle[i].active) DrawTexturePro(atlas01, particle_ecualyptusflower, + (Rectangle){ flowerParticle.particle[i].position.x, flowerParticle.particle[i].position.y, particle_ecualyptusflower.width*flowerParticle.particle[i].size, particle_ecualyptusflower.height*flowerParticle.particle[i].size }, + (Vector2){ particle_ecualyptusflower.width*flowerParticle.particle[i].size/2, particle_ecualyptusflower.height*flowerParticle.particle[i].size/2 }, flowerParticle.particle[i].rotation, + Fade(flowerParticle.particle[i].color, flowerParticle.particle[i].alpha)); + + if (rainParticle.particle[i].active) DrawTexturePro(atlas01, particle_waterdrop, + (Rectangle){ rainParticle.particle[i].position.x, rainParticle.particle[i].position.y, particle_waterdrop.width*rainParticle.particle[i].size, particle_waterdrop.height*rainParticle.particle[i].size }, + (Vector2){ particle_waterdrop.width*rainParticle.particle[i].size/2, particle_waterdrop.height*rainParticle.particle[i].size/2 }, rainParticle.particle[i].rotation, + Fade(rainParticle.particle[i].color, rainParticle.particle[i].alpha)); + + } + + for (int i = 0; i < 1024; i++) + { + if (rainStormParticle.particle[i].active) DrawTexturePro(atlas01, particle_waterdrop, + (Rectangle){ rainStormParticle.particle[i].position.x, rainStormParticle.particle[i].position.y, particle_waterdrop.width*rainStormParticle.particle[i].size, particle_waterdrop.height*rainStormParticle.particle[i].size }, + (Vector2){ particle_waterdrop.width*rainStormParticle.particle[i].size/2, particle_waterdrop.height*rainStormParticle.particle[i].size/2 }, rainStormParticle.particle[i].rotation, + Fade(rainStormParticle.particle[i].color, rainStormParticle.particle[i].alpha)); + } + + for (int i = 0; i < 256; i++) + { + + if (snowStormParticle.particle[i].active) DrawTexturePro(atlas01, particle_icecrystal, + (Rectangle){ snowStormParticle.particle[i].position.x, snowStormParticle.particle[i].position.y, particle_icecrystal.width*snowStormParticle.particle[i].size, particle_icecrystal.height*snowStormParticle.particle[i].size }, + (Vector2){ particle_icecrystal.width*snowStormParticle.particle[i].size/2, particle_icecrystal.height*snowStormParticle.particle[i].size/2 }, snowStormParticle.particle[i].rotation, + Fade(snowStormParticle.particle[i].color, snowStormParticle.particle[i].alpha)); + } + + + for (int i = 0; i < 20; i++) + { + + if (rayparticle.particle[i].active) DrawTexturePro(atlas01, gameplay_fx_lightraymid, + (Rectangle){ rayparticle.particle[i].position.x, rayparticle.particle[i].position.y, gameplay_fx_lightraymid.width*rayparticle.particle[i].size, gameplay_fx_lightraymid.height*rayparticle.particle[i].size }, + (Vector2){ gameplay_fx_lightraymid.width*rayparticle.particle[i].size/2, gameplay_fx_lightraymid.height*rayparticle.particle[i].size/2 }, rayparticle.particle[i].rotation, + Fade(rayparticle.particle[i].color, rayparticle.particle[i].alpha)); + } + + /* + DrawTexturePro(atlas01, title_twitter, (Rectangle){ GetScreenWidth()*0.85, GetScreenHeight()*0.1, title_twitter.width, title_twitter.height}, (Vector2){0,0}, 0, WHITE); + DrawTexturePro(atlas01, title_facebook, (Rectangle){ GetScreenWidth()*0.85, GetScreenHeight()*0.3, title_facebook.width, title_facebook.height}, (Vector2){0,0}, 0, WHITE); + DrawTexturePro(atlas01, title_googleplay, (Rectangle){ GetScreenWidth()*0.85, GetScreenHeight()*0.5, title_googleplay.width, title_googleplay.height}, (Vector2){0,0}, 0, WHITE); + + if (soundActive)DrawTexturePro(atlas01, title_music_on, (Rectangle){soundButton.x, soundButton.y, title_music_on.width, title_music_on.height}, (Vector2){0,0}, 0, WHITE); + else DrawTexturePro(atlas01, title_music_off, (Rectangle){soundButton.x, soundButton.y, title_music_off.width, title_music_off.height}, (Vector2){0,0}, 0, WHITE); + + if (musicActive)DrawTexturePro(atlas01, title_speaker_on, (Rectangle){speakerButton.x, speakerButton.y, title_speaker_on.width, title_speaker_on.height}, (Vector2){0,0}, 0, WHITE); + else DrawTexturePro(atlas01, title_speaker_off, (Rectangle){speakerButton.x, speakerButton.y, title_speaker_off.width, title_speaker_off.height}, (Vector2){0,0}, 0, WHITE); + */ +} + +// Title Screen Unload logic +void UnloadTitleScreen(void) +{ + // ... +} + +// Title Screen should finish? +int FinishTitleScreen(void) +{ + return finishScreen; +} + +static void DrawParallaxFront(void) +{ + Rectangle ground01 = gameplay_back_ground01; + + //DrawTexturePro(atlas02, gameplay_back_tree01_layer03, (Rectangle){0, 21, gameplay_back_tree01_layer03.width*2, gameplay_back_tree01_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree01_layer01, (Rectangle){(int)parallaxFrontOffset, 60, gameplay_back_tree01_layer01.width*2, gameplay_back_tree01_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree02_layer01, (Rectangle){(int)parallaxFrontOffset + 140, 60, gameplay_back_tree02_layer01.width*2, gameplay_back_tree02_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree03_layer01, (Rectangle){(int)parallaxFrontOffset + 140*2, 55, gameplay_back_tree02_layer01.width*2, gameplay_back_tree02_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree04_layer01, (Rectangle){(int)parallaxFrontOffset + 140*3, 60, gameplay_back_tree04_layer01.width*2, gameplay_back_tree04_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree05_layer01, (Rectangle){(int)parallaxFrontOffset + 140*4, 60, gameplay_back_tree05_layer01.width*2, gameplay_back_tree05_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree06_layer01, (Rectangle){(int)parallaxFrontOffset + 140*5, 55, gameplay_back_tree06_layer01.width*2, gameplay_back_tree06_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree07_layer01, (Rectangle){(int)parallaxFrontOffset + 140*6, 60, gameplay_back_tree07_layer01.width*2, gameplay_back_tree07_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree08_layer01, (Rectangle){(int)parallaxFrontOffset + 140*7, 60, gameplay_back_tree08_layer01.width*2, gameplay_back_tree08_layer01.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_ground01, (Rectangle){0, 559, ground01.width*2, ground01.height*2}, (Vector2){0,0}, 0, color01); + DrawTexturePro(atlas02, (Rectangle){ground01.x, ground01.y + ground01.height, ground01.width, -ground01.height}, (Rectangle){0, -33, ground01.width*2, ground01.height*2}, (Vector2){0,0}, 0, color01); + } + +static void DrawParallaxMiddle(void) +{ + Rectangle ground02 = gameplay_back_ground02; + + //DrawTexturePro(atlas02, gameplay_back_tree02_layer03, (Rectangle){0, 67, gameplay_back_tree02_layer03.width*2, gameplay_back_tree02_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree01_layer02, (Rectangle){(int)0, 67, gameplay_back_tree01_layer02.width*2, gameplay_back_tree01_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree02_layer02, (Rectangle){(int)140, 67, gameplay_back_tree02_layer02.width*2, gameplay_back_tree02_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree03_layer02, (Rectangle){(int)140*2, 67, gameplay_back_tree03_layer02.width*2, gameplay_back_tree03_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree04_layer02, (Rectangle){(int)140*3, 67, gameplay_back_tree04_layer02.width*2, gameplay_back_tree04_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree05_layer02, (Rectangle){(int)140*4, 67, gameplay_back_tree05_layer02.width*2, gameplay_back_tree05_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree06_layer02, (Rectangle){(int)140*5, 67, gameplay_back_tree06_layer02.width*2, gameplay_back_tree06_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree07_layer02, (Rectangle){(int)140*6, 67, gameplay_back_tree07_layer02.width*2, gameplay_back_tree07_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree08_layer02, (Rectangle){(int)140*7, 67, gameplay_back_tree08_layer02.width*2, gameplay_back_tree08_layer02.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_ground02, (Rectangle){0, 509, ground02.width*2, ground02.height*2}, (Vector2){0,0}, 0, color01); + DrawTexturePro(atlas02, (Rectangle){ground02.x, ground02.y + ground02.height, ground02.width, -ground02.height}, (Rectangle){0, 19, ground02.width*2, ground02.height*2}, (Vector2){0,0}, 0, color01); +} + +static void DrawParallaxBack(void) +{ + Rectangle ground03 = gameplay_back_ground03; + + //DrawTexturePro(atlas02, gameplay_back_tree02_layer03, (Rectangle){0, 67, gameplay_back_tree02_layer03.width*2, gameplay_back_tree02_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree01_layer03, (Rectangle){(int)parallaxBackOffset, 67, gameplay_back_tree01_layer03.width*2, gameplay_back_tree01_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree02_layer03, (Rectangle){(int)parallaxBackOffset + 140, 67, gameplay_back_tree02_layer03.width*2, gameplay_back_tree02_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree03_layer03, (Rectangle){(int)parallaxBackOffset + 140*2, 67, gameplay_back_tree03_layer03.width*2, gameplay_back_tree03_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree04_layer03, (Rectangle){(int)parallaxBackOffset + 140*3, 67, gameplay_back_tree04_layer03.width*2, gameplay_back_tree04_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree05_layer03, (Rectangle){(int)parallaxBackOffset + 140*4, 67, gameplay_back_tree05_layer03.width*2, gameplay_back_tree05_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree06_layer03, (Rectangle){(int)parallaxBackOffset + 140*5, 67, gameplay_back_tree06_layer03.width*2, gameplay_back_tree06_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree07_layer03, (Rectangle){(int)parallaxBackOffset + 140*6, 67, gameplay_back_tree07_layer03.width*2, gameplay_back_tree07_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_tree08_layer03, (Rectangle){(int)parallaxBackOffset + 140*7, 67, gameplay_back_tree08_layer03.width*2, gameplay_back_tree08_layer03.height*2}, (Vector2){0,0}, 0, color02); + DrawTexturePro(atlas02, gameplay_back_ground03, (Rectangle){0, 469, ground03.width*2, ground03.height*2}, (Vector2){0,0}, 0, color01); + DrawTexturePro(atlas02, (Rectangle){ground03.x, ground03.y + ground03.height, ground03.width, -ground03.height}, (Rectangle){0, 67, ground03.width*2, ground03.height*2}, (Vector2){0,0}, 0, color01); +} + +static float BounceEaseOut(float t,float b , float c, float d) +{ + if ((t/=d) < (1/2.75f)) { + return c*(7.5625f*t*t) + b; + } else if (t < (2/2.75f)) { + float postFix = t-=(1.5f/2.75f); + return c*(7.5625f*(postFix)*t + .75f) + b; + } else if (t < (2.5/2.75)) { + float postFix = t-=(2.25f/2.75f); + return c*(7.5625f*(postFix)*t + .9375f) + b; + } else { + float postFix = t-=(2.625f/2.75f); + return c*(7.5625f*(postFix)*t + .984375f) + b; + } +}
\ No newline at end of file diff --git a/games/koala_seasons/screens/screens.h b/games/koala_seasons/screens/screens.h new file mode 100644 index 00000000..ba62aa27 --- /dev/null +++ b/games/koala_seasons/screens/screens.h @@ -0,0 +1,125 @@ +/********************************************************************************************** +* +* raylib - Koala Seasons game +* +* Screens Functions Declarations (Init, Update, Draw, Unload) +* +* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5) +* +* This software is provided "as-is", without any express or implied warranty. In no event +* will the authors be held liable for any damages arising from the use of this software. +* +* Permission is granted to anyone to use this software for any purpose, including commercial +* applications, and to alter it and redistribute it freely, subject to the following restrictions: +* +* 1. The origin of this software must not be misrepresented; you must not claim that you +* wrote the original software. If you use this software in a product, an acknowledgment +* in the product documentation would be appreciated but is not required. +* +* 2. Altered source versions must be plainly marked as such, and must not be misrepresented +* as being the original software. +* +* 3. This notice may not be removed or altered from any source distribution. +* +**********************************************************************************************/ + +#ifndef SCREENS_H +#define SCREENS_H + +#define GAME_FPS 60.0 +#define TIME_FACTOR 60.0/GAME_FPS + +#define MAX_KILLS 128 + +//---------------------------------------------------------------------------------- +// Types and Structures Definition +//---------------------------------------------------------------------------------- +typedef enum GameScreen { LOGO, TITLE, OPTIONS, GAMEPLAY, ENDING } GameScreen; + +//---------------------------------------------------------------------------------- +// Global Variables Definition +//---------------------------------------------------------------------------------- +GameScreen currentScreen; + +// NOTE: This is all the data used in the game +SpriteFont font; +Shader colorBlend; +Texture2D atlas01; +Texture2D atlas02; + +Sound fxJump; +Sound fxDash; +Sound fxEatLeaves; +Sound fxDieSnake; +Sound fxDieDingo; +Sound fxDieOwl; +Sound fxHitResin; +Sound fxWind; + +// Global Variables (required by ending screen and gameplay screen) +int score; +int hiscore; +int killHistory[MAX_KILLS]; +int killer; +int seasons; +int years; +int currentLeaves; +int currentSeason; +int initSeason; +int initYears; +int rainChance; + +#ifdef __cplusplus +extern "C" { // Prevents name mangling of functions +#endif + +//---------------------------------------------------------------------------------- +// Logo Screen Functions Declaration +//---------------------------------------------------------------------------------- +void InitLogoScreen(void); +void UpdateLogoScreen(void); +void DrawLogoScreen(void); +void UnloadLogoScreen(void); +int FinishLogoScreen(void); + +//---------------------------------------------------------------------------------- +// Title Screen Functions Declaration +//---------------------------------------------------------------------------------- +void InitTitleScreen(void); +void UpdateTitleScreen(void); +void DrawTitleScreen(void); +void UnloadTitleScreen(void); +int FinishTitleScreen(void); + +//---------------------------------------------------------------------------------- +// Options Screen Functions Declaration +//---------------------------------------------------------------------------------- +void InitOptionsScreen(void); +void UpdateOptionsScreen(void); +void DrawOptionsScreen(void); +void UnloadOptionsScreen(void); +int FinishOptionsScreen(void); + +//---------------------------------------------------------------------------------- +// Gameplay Screen Functions Declaration +//---------------------------------------------------------------------------------- +void InitGameplayScreen(void); +void UpdateGameplayScreen(void); +void DrawGameplayScreen(void); +void UnloadGameplayScreen(void); +int FinishGameplayScreen(void); + +//---------------------------------------------------------------------------------- +// Ending Screen Functions Declaration +//---------------------------------------------------------------------------------- +void InitEndingScreen(void); +void UpdateEndingScreen(void); +void DrawEndingScreen(void); +void UnloadEndingScreen(void); +int FinishEndingScreen(void); + +#ifdef __cplusplus +} +#endif + +#endif // SCREENS_H
\ No newline at end of file diff --git a/games/light_my_ritual/makefile b/games/light_my_ritual/makefile index 5cd4ee6b..287538c5 100644 --- a/games/light_my_ritual/makefile +++ b/games/light_my_ritual/makefile @@ -1,19 +1,17 @@ #************************************************************************************************** # -# raylib - Advance Game +# raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten) # -# makefile to compile advance game for desktop platforms, Raspberry Pi and HTML5 (emscripten) +# Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) # -# Copyright (c) 2014 Ramon Santamaria (@raysan5) -# -# This software is provided "as-is", without any express or implied warranty. In no event +# This software is provided "as-is", without any express or implied warranty. In no event # will the authors be held liable for any damages arising from the use of this software. # -# Permission is granted to anyone to use this software for any purpose, including commercial +# Permission is granted to anyone to use this software for any purpose, including commercial # applications, and to alter it and redistribute it freely, subject to the following restrictions: # -# 1. The origin of this software must not be misrepresented; you must not claim that you -# wrote the original software. If you use this software in a product, an acknowledgment +# 1. The origin of this software must not be misrepresented; you must not claim that you +# wrote the original software. If you use this software in a product, an acknowledgment # in the product documentation would be appreciated but is not required. # # 2. Altered source versions must be plainly marked as such, and must not be misrepresented @@ -23,10 +21,23 @@ # #************************************************************************************************** -# define raylib platform if not defined (by default, compile for RPI) -# Other possible platform: PLATFORM_DESKTOP +.PHONY: all clean + +# define raylib platform to compile for +# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB +# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop() PLATFORM ?= PLATFORM_DESKTOP +# define NO to use OpenAL Soft as static library (shared by default) +SHARED_OPENAL ?= NO + +ifeq ($(PLATFORM),PLATFORM_WEB) + SHARED_OPENAL = NO +endif + +# define raylib directory for include and library +RAYLIB_PATH ?= C:\raylib\raylib + # determine PLATFORM_OS in case PLATFORM_DESKTOP selected ifeq ($(PLATFORM),PLATFORM_DESKTOP) # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows @@ -62,48 +73,96 @@ endif endif # define compiler flags: -# -O2 defines optimization level -# -Wall turns on most, but not all, compiler warnings -# -std=c99 use standard C from 1999 revision +# -O2 defines optimization level +# -Og enable debugging +# -s strip unnecessary data from build +# -Wall turns on most, but not all, compiler warnings +# -std=c99 defines C language mode (standard C from 1999 revision) +# -std=gnu99 defines C language mode (GNU C from 1999 revision) +# -fgnu89-inline declaring inline functions support (GCC optimized) +# -Wno-missing-braces ignore invalid warning (GCC bug 53119) +# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + CFLAGS = -O2 -s -Wall -std=c99 + endif + ifeq ($(PLATFORM_OS),LINUX) + CFLAGS = -O2 -s -Wall -std=c99 -D_DEFAULT_SOURCE + endif + ifeq ($(PLATFORM_OS),OSX) + CFLAGS = -O2 -s -Wall -std=c99 + endif +endif +ifeq ($(PLATFORM),PLATFORM_WEB) + CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 --profiling --preload-file resources -s ALLOW_MEMORY_GROWTH=1 + # -O2 # if used, also set --memory-init-file 0 + # --memory-init-file 0 # to avoid an external memory initialization code file (.mem) + # -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing + # -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + # --preload-file file.res # embbed file.res resource into .data file +endif ifeq ($(PLATFORM),PLATFORM_RPI) - CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline -else - CFLAGS = -O2 -Wall -std=c99 + CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline +endif +#CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes + +# define raylib release directory for compiled library +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/win32/mingw32 + endif + ifeq ($(PLATFORM_OS),LINUX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/linux + endif + ifeq ($(PLATFORM_OS),OSX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/osx + endif endif ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 --preload-file resources -s ALLOW_MEMORY_GROWTH=1 --shell-file ../../templates/web_shell/shell.html - #-s ASSERTIONS=1 --preload-file resources - #-s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing - #-s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/html5 +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/rpi endif # define any directories containing required header files +INCLUDES = -I. -I$(RAYLIB_RELEASE) -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external + ifeq ($(PLATFORM),PLATFORM_RPI) - INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include + INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries headers + # GLFW3 + INCLUDES += -I$(RAYLIB_PATH)/src/external/glfw3/include + # OpenAL Soft + INCLUDES += -I$(RAYLIB_PATH)/src/external/openal_soft/include + endif + ifeq ($(PLATFORM_OS),LINUX) + # you may optionally create this directory and install raylib + # and related headers there. Edit ../src/Makefile appropriately. + INCLUDES += -I/usr/local/include/raylib + endif + ifeq ($(PLATFORM_OS),OSX) + # additional directories for MacOS + endif endif # define library paths containing required libs +LFLAGS = -L. -L$(RAYLIB_RELEASE) -L$(RAYLIB_PATH)/src + ifeq ($(PLATFORM),PLATFORM_RPI) - LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW - LFLAGS += -L../../external/glew/lib/$(LIBPATH) + LFLAGS += -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries to link with + # GLFW3 + LFLAGS += -L$(RAYLIB_PATH)/src/external/glfw3/lib/$(LIBPATH) + # OpenAL Soft + LFLAGS += -L$(RAYLIB_PATH)/src/external/openal_soft/lib/$(LIBPATH) endif endif @@ -113,21 +172,28 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -lpthread -ldl - # on XWindow could require also below libraries, just uncomment + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -lpthread -ldl + # on XWindow requires also below libraries LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor - endif + else ifeq ($(PLATFORM_OS),OSX) - # libraries for OS X 10.9 desktop compiling + # libraries for OSX 10.9 desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa - endif - ifeq ($(PLATFORM_OS),WINDOWS) + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAL -framework Cocoa + else # libraries for Windows desktop compiling # NOTE: GLFW3 and OpenAL Soft libraries should be installed - LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32 + LIBS = -lraylib -lglfw3 -lopengl32 -lgdi32 + # if static OpenAL Soft required, define the corresponding libs + ifeq ($(SHARED_OPENAL),NO) + LIBS += -lopenal32 -lwinmm + CFLAGS += -Wl,-allow-multiple-definition + else + LIBS += -lopenal32dll + endif + endif endif endif ifeq ($(PLATFORM),PLATFORM_RPI) @@ -136,18 +202,20 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lbcm_host -lopenal endif ifeq ($(PLATFORM),PLATFORM_WEB) - LIBS = ../../src/libraylib.bc + # NOTE: Set the correct path to libraylib.bc + LIBS = $(RAYLIB_RELEASE)/libraylib.bc endif # define additional parameters and flags for windows ifeq ($(PLATFORM_OS),WINDOWS) # resources file contains windows exe icon # -Wl,--subsystem,windows hides the console window - WINFLAGS = ../../src/resources -Wl,--subsystem,windows + WINFLAGS = $(RAYLIB_PATH)/src/resources -Wl,--subsystem,windows endif ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html + WEB_SHELL = --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html endif # define all screen object files required @@ -156,13 +224,12 @@ SCREENS = \ screens/screen_title.o \ screens/screen_gameplay.o \ -# typing 'make' will invoke the first target entry in the file, -# in this case, the 'default' target entry is advance_game +# typing 'make' will invoke the default target entry default: light_my_ritual -# compile template - advance_game +# compile program light_my_ritual: light_my_ritual.c $(SCREENS) - $(CC) -o $@$(EXT) $< $(SCREENS) $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $^ $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile screen LOGO raylib screens/screen_logo_raylib.o: screens/screen_logo_raylib.c @@ -184,10 +251,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) rm -f *.o else ifeq ($(PLATFORM_OS),LINUX) - find . -type f -executable -delete - rm -f *.o + find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f else - del *.o *.exe + del *.o *.exe /s endif endif endif diff --git a/games/makefile b/games/makefile index c48e4d68..60f38bff 100644 --- a/games/makefile +++ b/games/makefile @@ -2,16 +2,16 @@ # # raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten) # -# Copyright (c) 2015 Ramon Santamaria (@raysan5) -# -# This software is provided "as-is", without any express or implied warranty. In no event +# Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) +# +# This software is provided "as-is", without any express or implied warranty. In no event # will the authors be held liable for any damages arising from the use of this software. # -# Permission is granted to anyone to use this software for any purpose, including commercial +# Permission is granted to anyone to use this software for any purpose, including commercial # applications, and to alter it and redistribute it freely, subject to the following restrictions: # -# 1. The origin of this software must not be misrepresented; you must not claim that you -# wrote the original software. If you use this software in a product, an acknowledgment +# 1. The origin of this software must not be misrepresented; you must not claim that you +# wrote the original software. If you use this software in a product, an acknowledgment # in the product documentation would be appreciated but is not required. # # 2. Altered source versions must be plainly marked as such, and must not be misrepresented @@ -21,11 +21,23 @@ # #************************************************************************************************** +.PHONY: all clean + # define raylib platform to compile for # possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB # WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop() PLATFORM ?= PLATFORM_DESKTOP +# define NO to use OpenAL Soft as static library (shared by default) +SHARED_OPENAL ?= NO + +ifeq ($(PLATFORM),PLATFORM_WEB) + SHARED_OPENAL = NO +endif + +# define raylib directory for include and library +RAYLIB_PATH ?= C:\raylib\raylib + # determine PLATFORM_OS in case PLATFORM_DESKTOP selected ifeq ($(PLATFORM),PLATFORM_DESKTOP) # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows @@ -61,46 +73,96 @@ endif endif # define compiler flags: -# -O2 defines optimization level -# -Wall turns on most, but not all, compiler warnings -# -std=c99 use standard C from 1999 revision -ifeq ($(PLATFORM),PLATFORM_RPI) - CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline -else - CFLAGS = -O2 -Wall -std=c99 +# -O2 defines optimization level +# -Og enable debugging +# -s strip unnecessary data from build +# -Wall turns on most, but not all, compiler warnings +# -std=c99 defines C language mode (standard C from 1999 revision) +# -std=gnu99 defines C language mode (GNU C from 1999 revision) +# -fgnu89-inline declaring inline functions support (GCC optimized) +# -Wno-missing-braces ignore invalid warning (GCC bug 53119) +# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + CFLAGS = -O2 -s -Wall -std=c99 + endif + ifeq ($(PLATFORM_OS),LINUX) + CFLAGS = -O2 -s -Wall -std=c99 -D_DEFAULT_SOURCE + endif + ifeq ($(PLATFORM_OS),OSX) + CFLAGS = -O2 -s -Wall -std=c99 + endif endif ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 --shell-file ../../templates/web_shell/shell.html - #-s ASSERTIONS=1 # to check for memory allocation errors (-O1 disables it) - #-s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing - #-s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 -s --profiling + # -O2 # if used, also set --memory-init-file 0 + # --memory-init-file 0 # to avoid an external memory initialization code file (.mem) + # -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing + # -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + # --preload-file file.res # embbed file.res resource into .data file +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline endif - #CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes +# define raylib release directory for compiled library +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/win32/mingw32 + endif + ifeq ($(PLATFORM_OS),LINUX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/linux + endif + ifeq ($(PLATFORM_OS),OSX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/osx + endif +endif +ifeq ($(PLATFORM),PLATFORM_WEB) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/html5 +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/rpi +endif + # define any directories containing required header files +INCLUDES = -I. -I$(RAYLIB_RELEASE) -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external + ifeq ($(PLATFORM),PLATFORM_RPI) - INCLUDES = -I. -I../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../src -# external libraries headers -# GLFW3 - INCLUDES += -I../external/glfw3/include -# OpenAL Soft - INCLUDES += -I../external/openal_soft/include + INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries headers + # GLFW3 + INCLUDES += -I$(RAYLIB_PATH)/src/external/glfw3/include + # OpenAL Soft + INCLUDES += -I$(RAYLIB_PATH)/src/external/openal_soft/include + endif + ifeq ($(PLATFORM_OS),LINUX) + # you may optionally create this directory and install raylib + # and related headers there. Edit ../src/Makefile appropriately. + INCLUDES += -I/usr/local/include/raylib + endif + ifeq ($(PLATFORM_OS),OSX) + # additional directories for MacOS + endif endif # define library paths containing required libs +LFLAGS = -L. -L$(RAYLIB_RELEASE) -L$(RAYLIB_PATH)/src + ifeq ($(PLATFORM),PLATFORM_RPI) - LFLAGS = -L. -L../src -L/opt/vc/lib -else - LFLAGS = -L. -L../src -# external libraries to link with - # GLFW3 - LFLAGS += -L../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../external/openal_soft/lib/$(LIBPATH) + LFLAGS += -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries to link with + # GLFW3 + LFLAGS += -L$(RAYLIB_PATH)/src/external/glfw3/lib/$(LIBPATH) + # OpenAL Soft + LFLAGS += -L$(RAYLIB_PATH)/src/external/openal_soft/lib/$(LIBPATH) endif endif @@ -110,20 +172,27 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -lpthread -ldl - # on XWindow could require also below libraries: + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -lpthread -ldl + # on XWindow requires also below libraries LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) - # libraries for OS X 10.9 desktop compiling + # libraries for OSX 10.9 desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAL -framework Cocoa else # libraries for Windows desktop compiling # NOTE: GLFW3 and OpenAL Soft libraries should be installed - LIBS = -lraylib -lglfw3 -lopengl32 -lopenal32 -lgdi32 + LIBS = -lraylib -lglfw3 -lopengl32 -lgdi32 + # if static OpenAL Soft required, define the corresponding libs + ifeq ($(SHARED_OPENAL),NO) + LIBS += -lopenal32 -lwinmm + CFLAGS += -Wl,-allow-multiple-definition + else + LIBS += -lopenal32dll + endif endif endif endif @@ -134,18 +203,19 @@ ifeq ($(PLATFORM),PLATFORM_RPI) endif ifeq ($(PLATFORM),PLATFORM_WEB) # NOTE: Set the correct path to libraylib.bc - LIBS = ../src/libraylib.bc + LIBS = $(RAYLIB_RELEASE)/libraylib.bc endif # define additional parameters and flags for windows ifeq ($(PLATFORM_OS),WINDOWS) # resources file contains windows exe icon # -Wl,--subsystem,windows hides the console window - WINFLAGS = ../src/resources -Wl,--subsystem,windows + WINFLAGS = $(RAYLIB_PATH)/src/resources -Wl,--subsystem,windows endif ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html + WEB_SHELL = --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html endif # define all object files required @@ -164,8 +234,7 @@ SAMPLES = \ fix_dylib \ -# typing 'make' will invoke the first target entry in the file, -# in this case, the 'default' target entry is raylib +# typing 'make' will invoke the default target entry default: samples # compile all game samples @@ -173,47 +242,47 @@ samples: $(SAMPLES) # compile game sample - arkanoid arkanoid: arkanoid.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile game sample - steroids asteroids: asteroids.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile game sample - asteroids_survival asteroids_survival: asteroids_survival.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile game sample - floppy floppy: floppy.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile game sample - gold_fever gold_fever: gold_fever.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile game sample - gorilas gorilas: gorilas.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile game sample - missile_commander missile_commander: missile_commander.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile game sample - pang pang: pang.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile game sample - snake snake: snake.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile game sample - space_invaders space_invaders: space_invaders.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile game sample - tetris tetris: tetris.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # fix dylib install path name for each executable (MAC) fix_dylib: @@ -231,7 +300,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f else - del *.o *.exe + del *.o *.exe /s endif endif endif diff --git a/games/raylib_demo/makefile b/games/raylib_demo/makefile deleted file mode 100644 index 4e8a9b1c..00000000 --- a/games/raylib_demo/makefile +++ /dev/null @@ -1,191 +0,0 @@ -#************************************************************************************************** -# -# raylib - Basic Game -# -# makefile to compile advance game for desktop platforms, Raspberry Pi and HTML5 (emscripten) -# -# Copyright (c) 2014 Ramon Santamaria (@raysan5) -# -# This software is provided "as-is", without any express or implied warranty. In no event -# will the authors be held liable for any damages arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, including commercial -# applications, and to alter it and redistribute it freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not claim that you -# wrote the original software. If you use this software in a product, an acknowledgment -# in the product documentation would be appreciated but is not required. -# -# 2. Altered source versions must be plainly marked as such, and must not be misrepresented -# as being the original software. -# -# 3. This notice may not be removed or altered from any source distribution. -# -#************************************************************************************************** - -# define raylib platform to compile for -# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB -# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop() -PLATFORM ?= PLATFORM_DESKTOP - -# determine PLATFORM_OS in case PLATFORM_DESKTOP selected -ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows - ifeq ($(OS),Windows_NT) - PLATFORM_OS=WINDOWS - LIBPATH=win32 - else - UNAMEOS:=$(shell uname) - ifeq ($(UNAMEOS),Linux) - PLATFORM_OS=LINUX - LIBPATH=linux - else - ifeq ($(UNAMEOS),Darwin) - PLATFORM_OS=OSX - LIBPATH=osx - endif - endif - endif -endif - -# define compiler: gcc for C program, define as g++ for C++ -ifeq ($(PLATFORM),PLATFORM_WEB) - # define emscripten compiler - CC = emcc -else -ifeq ($(PLATFORM_OS),OSX) - # define llvm compiler for mac - CC = clang -else - # define default gcc compiler - CC = gcc -endif -endif - -# define compiler flags: -# -O2 defines optimization level -# -Wall turns on most, but not all, compiler warnings -# -std=c99 use standard C from 1999 revision -ifeq ($(PLATFORM),PLATFORM_RPI) - CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline -else - CFLAGS = -O2 -Wall -std=c99 -endif -ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 --preload-file resources --shell-file ../../templates/web_shell/shell.html - #-s ASSERTIONS=1 # to check for memory allocation errors (-O1 disables it) - #-s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing - #-s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) -endif - -#CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes - -# define any directories containing required header files -ifeq ($(PLATFORM),PLATFORM_RPI) - INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - Not required any more, replaced by GLAD - #INCLUDES += -I../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include -endif - -# define library paths containing required libs -ifeq ($(PLATFORM),PLATFORM_RPI) - LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -LC:/raylib/raylib/src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW: Not used, replaced by GLAD - #LFLAGS += -L../../external/glew/lib/$(LIBPATH) - endif -endif - -# define any libraries to link into executable -# if you want to link libraries (libname.so or libname.a), use the -lname -ifeq ($(PLATFORM),PLATFORM_DESKTOP) - ifeq ($(PLATFORM_OS),LINUX) - # libraries for Debian GNU/Linux desktop compiling - # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl - # on XWindow could require also below libraries, just uncomment - LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor - else - ifeq ($(PLATFORM_OS),OSX) - # libraries for OS X 10.9 desktop compiling - # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa - else - # libraries for Windows desktop compiling - # NOTE: GLFW3 and OpenAL Soft libraries should be installed - LIBS = -lraylib -lglfw3 -lopengl32 -lopenal32 -lgdi32 - endif - endif -endif -ifeq ($(PLATFORM),PLATFORM_RPI) - # libraries for Raspberry Pi compiling - # NOTE: OpenAL Soft library should be installed (libopenal1 package) - LIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lbcm_host -lopenal -endif -ifeq ($(PLATFORM),PLATFORM_WEB) - # NOTE: Set the correct path to libraylib.bc - LIBS = ../../src/libraylib.bc -endif - -# define additional parameters and flags for windows -ifeq ($(PLATFORM_OS),WINDOWS) - # resources file contains windows exe icon - # -Wl,--subsystem,windows hides the console window - WINFLAGS = ../../src/resources -Wl,--subsystem,windows -endif - -ifeq ($(PLATFORM),PLATFORM_WEB) - EXT = .html -endif - -# typing 'make' will invoke the first target entry in the file, -# in this case, the 'default' target entry is qidv_raylib -default: raylib_demo - -# compile raylib demo -raylib_demo: raylib_demo.c - $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) - -# clean everything -clean: -ifeq ($(PLATFORM),PLATFORM_DESKTOP) - ifeq ($(PLATFORM_OS),OSX) - find . -type f -perm +ugo+x -delete - rm -f *.o - else - ifeq ($(PLATFORM_OS),LINUX) - find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f - else - del *.o *.exe - endif - endif -endif -ifeq ($(PLATFORM),PLATFORM_RPI) - find . -type f -executable -delete - rm -f *.o -endif -ifeq ($(PLATFORM),PLATFORM_WEB) - del *.o *.html *.js -endif - @echo Cleaning done - -# instead of defining every module one by one, we can define a pattern -# this pattern below will automatically compile every module defined on $(OBJS) -#%.exe : %.c -# $(CC) -o $@ $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) diff --git a/games/raylib_demo/raylib_demo.c b/games/raylib_demo/raylib_demo.c deleted file mode 100644 index 62f26c3f..00000000 --- a/games/raylib_demo/raylib_demo.c +++ /dev/null @@ -1,932 +0,0 @@ -/******************************************************************************************* -* -* raylib - Features demo 01 (Learn Videogames Programming) -* -* This show has been created using raylib v1.4 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2014 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib.h" - -#if defined(PLATFORM_WEB) - #include <emscripten/emscripten.h> -#endif - -#include <string.h> -#include <math.h> - -#define MAX_BALLS 16 - -//---------------------------------------------------------------------------------- -// Types and Structures Definition -//---------------------------------------------------------------------------------- -typedef enum TalkScreen { LOADING, LOGO, MODULES, ENDING, PONG } TalkScreen; -typedef enum Modules { CORE = 0, SHAPES, TEXTURES, TEXT, MODELS, AUDIO } Modules; - -//---------------------------------------------------------------------------------- -// Global Variables Definition (local to this module) -//---------------------------------------------------------------------------------- -int screenWidth = 1280; -int screenHeight = 720; - -const char msgLoading[30] = "LOADING..."; -const char msgPressEnter[30] = "Press ENTER to START"; - -const char msgCredits[40] = "by RAMON SANTAMARIA [@raysan5]"; -const char msgWeb[30] = "www.raylib.com"; - -const char msgLogoA[40] = "A simple and easy-to-use library"; -const char msgLogoB[40] = "to learn videogames programming"; - -const char msg1[50] = "THIS is a CUSTOM FONT..."; -const char msg2[50] = "...and ANOTHER CUSTOM ONE..."; -const char msg3[50] = "...AND ONE MORE! :)"; - -bool closeWindow = false; - -int totalTime = 60*60*60; // fps*sec*min -int timeCounter = 0; - -TalkScreen currentScreen = LOADING; - -// LOADING screen variables -int loadBarWidth = 0; -int loadBarMaxWidth = 600; - -// TITLE screen variables -SpriteFont fontAlagard; -SpriteFont fontPixelplay; -SpriteFont fontMecha; -SpriteFont fontSetback; -SpriteFont fontRomulus; - -Vector2 pongBallPosition; -Vector2 pongBallSpeed; -Rectangle pongPlayerRec; -Rectangle pongEnemyRec; -int pongScorePlayer = 0; -int pongScoreEnemy = 0; -bool pongAutoMode = true; -int pongAutoCounter = 0; -bool pongPaused = true; - -int lettersCounter = 0; -char msgBuffer[120] = { ' ' }; - -// LOGO screen variables -int logoPositionX; -int logoPositionY; - -int raylibLettersCount = 0; - -int topSideRecWidth = 16; -int leftSideRecHeight = 16; - -int bottomSideRecWidth = 16; -int rightSideRecHeight = 16; - -char raylib[8] = " \0"; // raylib text array, max 8 letters - -int logoScreenState = 0; // Tracking animation states (State Machine) -bool msgLogoADone = false; -bool msgLogoBDone = false; - -// MODULES screen variables -Modules selectedModule = CORE; - -Texture2D raylibWindow; -Texture2D raylibWindow01; -Texture2D raylibWindow02; -Texture2D raylibWindow03; -Texture2D platforms; -Texture2D raylibLogoB; -Texture2D lena; -Texture2D mandrill; -Texture2D texAlagard; -SpriteFont fontMechaC; -SpriteFont fontAlagardC; -SpriteFont fontJupiterC; - -int coreWindow = 1; - -int windowOffset = 0; -Vector2 ballPosition; - -Camera camera; - -Texture2D catTexture; -Model cat; - -Sound fxWav; -Sound fxOgg; - -Music music; - -Vector2 soundBallsPosition[MAX_BALLS]; -Color soundBallsColor[MAX_BALLS]; -bool soundBallsActive[MAX_BALLS]; -float soundBallsAlpha[MAX_BALLS]; -int soundBallsRadius[MAX_BALLS]; - -float scaleFactor = 0.0f; -float timePlayed = 0; - -// ENDING screen variables -Texture2D raylibLogoA; - -// Required variables to manage screen transitions (fade-in, fade-out) -float transAlpha = 0; -bool onTransition = false; -bool transFadeOut = false; -int transFromScreen = -1; -int transToScreen = -1; - -int framesCounter = 0; - -//---------------------------------------------------------------------------------- -// Local Functions Declaration -//---------------------------------------------------------------------------------- -void TransitionToScreen(int screen); -void UpdateTransition(void); -void DrawTransition(void); - -void UpdateDrawOneFrame(void); - -//---------------------------------------------------------------------------------- -// Main entry point -//---------------------------------------------------------------------------------- -int main() -{ - // Initialization - //-------------------------------------------------------------------------------------- - const char windowTitle[30] = "raylib functionality demo"; - - //SetupFlags(FLAG_FULLSCREEN_MODE); - InitWindow(screenWidth, screenHeight, windowTitle); - - InitAudioDevice(); // Initialize audio device - - // TITLE screen variables Initialization - fontAlagard = LoadSpriteFont("resources/fonts/alagard.rbmf"); // rBMF font loading - fontPixelplay = LoadSpriteFont("resources/fonts/pixelplay.rbmf"); // rBMF font loading - fontMecha = LoadSpriteFont("resources/fonts/mecha.rbmf"); // rBMF font loading - fontSetback = LoadSpriteFont("resources/fonts/setback.rbmf"); // rBMF font loading - fontRomulus = LoadSpriteFont("resources/fonts/romulus.rbmf"); // rBMF font loading - - pongBallPosition = (Vector2){ screenWidth/2, screenHeight/2 + 20 }; - pongBallSpeed = (Vector2){ 6, 6 }; - pongPlayerRec = (Rectangle){ 20, screenHeight/2 - 50 + 40, 20, 100 }; - pongEnemyRec = (Rectangle){ screenWidth - 40, screenHeight/2 - 60, 20, 120 }; - - // LOGO screen variables Initialization - logoPositionX = screenWidth/2 - 128; - logoPositionY = screenHeight/2 - 128; - - // MODULES screen variables Initialization - raylibWindow = LoadTexture("resources/raylib_window.png"); - raylibWindow01 = LoadTexture("resources/raylib_window_01.png"); - raylibWindow02 = LoadTexture("resources/raylib_window_02.png"); - raylibWindow03 = LoadTexture("resources/raylib_window_03.png"); - platforms = LoadTexture("resources/platforms.png"); - raylibLogoB = LoadTexture("resources/raylib_logo128x128.png"); - lena = LoadTexture("resources/lena.png"); - mandrill = LoadTexture("resources/mandrill.png"); - texAlagard = LoadTexture("resources/fonts/custom_alagard.png"); - fontMechaC = LoadSpriteFont("resources/fonts/custom_mecha.png"); - fontAlagardC = LoadSpriteFont("resources/fonts/custom_alagard.png"); - fontJupiterC = LoadSpriteFont("resources/fonts/custom_jupiter_crash.png"); - - ballPosition = (Vector2){ 520 + 656/2, 220 + 399/2 }; - - camera = (Camera){{ 0.0, 12.0, 15.0 }, { 0.0, 3.0, 0.0 }, { 0.0, 1.0, 0.0 }}; - - catTexture = LoadTexture("resources/catsham.png"); // Load model texture - cat = LoadModel("resources/cat.obj"); // Load OBJ model - cat.material.texDiffuse = catTexture; // Set cat model diffuse texture - - fxWav = LoadSound("resources/audio/weird.wav"); // Load WAV audio file - fxOgg = LoadSound("resources/audio/tanatana.ogg"); // Load OGG audio file - - music = LoadMusicStream("resources/audio/guitar_noodling.ogg"); // Load music - - for (int i = 0; i < MAX_BALLS; i++) - { - soundBallsPosition[i] = (Vector2){ 650 + 560/2 + GetRandomValue(-280, 280), 220 + 200 + GetRandomValue(-200, 200) }; - soundBallsColor[i] = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 }; - soundBallsRadius[i] = GetRandomValue(2, 50); - soundBallsAlpha[i] = 1.0f; - - soundBallsActive[i] = false; - } - - // ENDING screen variables Initialization - raylibLogoA = LoadTexture("resources/raylib_logo.png"); - -#ifndef PLATFORM_WEB - SetTargetFPS(60); -#endif - -#if defined(PLATFORM_WEB) - emscripten_set_main_loop(UpdateDrawOneFrame, 0, 1); -#else - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!WindowShouldClose() && !closeWindow) // Detect window close button or ESC key - { - UpdateDrawOneFrame(); - } -#endif - - // De-Initialization - //-------------------------------------------------------------------------------------- - - // Unload all loaded data (textures, fonts, audio) - UnloadSpriteFont(fontAlagard); // SpriteFont unloading - UnloadSpriteFont(fontPixelplay); // SpriteFont unloading - UnloadSpriteFont(fontMecha); // SpriteFont unloading - UnloadSpriteFont(fontSetback); // SpriteFont unloading - UnloadSpriteFont(fontRomulus); // SpriteFont unloading - - UnloadTexture(raylibWindow); - UnloadTexture(raylibWindow01); - UnloadTexture(raylibWindow02); - UnloadTexture(raylibWindow03); - UnloadTexture(platforms); - UnloadTexture(raylibLogoA); - UnloadTexture(raylibLogoB); - UnloadTexture(lena); - UnloadTexture(mandrill); - UnloadTexture(texAlagard); - - UnloadSpriteFont(fontMechaC); - UnloadSpriteFont(fontAlagardC); - UnloadSpriteFont(fontJupiterC); - - UnloadTexture(catTexture); - UnloadModel(cat); - - UnloadSound(fxWav); - UnloadSound(fxOgg); - - UnloadMusicStream(music); - - CloseAudioDevice(); - - CloseWindow(); // Close window and OpenGL context - //-------------------------------------------------------------------------------------- - - return 0; -} - -void TransitionToScreen(int screen) -{ - onTransition = true; - transFromScreen = currentScreen; - transToScreen = screen; -} - -void UpdateTransition(void) -{ - if (!transFadeOut) - { - transAlpha += 0.02f; - - if (transAlpha >= 1.0) - { - transAlpha = 1.0; - currentScreen = transToScreen; - transFadeOut = true; - framesCounter = 0; - } - } - else // Transition fade out logic - { - transAlpha -= 0.02f; - - if (transAlpha <= 0) - { - transAlpha = 0; - transFadeOut = false; - onTransition = false; - transFromScreen = -1; - transToScreen = -1; - } - } -} - -void DrawTransition(void) -{ - DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RAYWHITE, transAlpha)); -} - -void UpdateDrawOneFrame(void) -{ - // Update - //---------------------------------------------------------------------------------- - if (!onTransition) - { - switch(currentScreen) - { - case LOADING: - { - // Update LOADING screen variables - framesCounter++; // Count frames - - if ((loadBarWidth < loadBarMaxWidth) && ((framesCounter%30) == 0)) loadBarWidth++; - - if (IsKeyDown(KEY_SPACE) && (loadBarWidth < loadBarMaxWidth)) loadBarWidth += 4; - - if (IsKeyPressed(KEY_ENTER) && (loadBarWidth >= loadBarMaxWidth)) TransitionToScreen(LOGO); - - } break; - case LOGO: - { - // Update LOGO screen variables - if (logoScreenState == 0) // State 0: Small box blinking - { - framesCounter++; - - if (framesCounter == 120) - { - logoScreenState = 1; - framesCounter = 0; // Reset counter... will be used later... - } - } - else if (logoScreenState == 1) // State 1: Top and left bars growing - { - topSideRecWidth += 4; - leftSideRecHeight += 4; - - if (topSideRecWidth == 256) logoScreenState = 2; - } - else if (logoScreenState == 2) // State 2: Bottom and right bars growing - { - bottomSideRecWidth += 4; - rightSideRecHeight += 4; - - if (bottomSideRecWidth == 256) - { - lettersCounter = 0; - for (int i = 0; i < strlen(msgBuffer); i++) msgBuffer[i] = ' '; - - logoScreenState = 3; - } - } - else if (logoScreenState == 3) // State 3: Letters appearing (one by one) - { - framesCounter++; - - // Every 12 frames, one more letter! - if ((framesCounter%12) == 0) raylibLettersCount++; - - switch (raylibLettersCount) - { - case 1: raylib[0] = 'r'; break; - case 2: raylib[1] = 'a'; break; - case 3: raylib[2] = 'y'; break; - case 4: raylib[3] = 'l'; break; - case 5: raylib[4] = 'i'; break; - case 6: raylib[5] = 'b'; break; - default: break; - } - - if (raylibLettersCount >= 10) - { - // Write raylib description messages - if ((framesCounter%2) == 0) lettersCounter++; - - if (!msgLogoADone) - { - if (lettersCounter <= strlen(msgLogoA)) strncpy(msgBuffer, msgLogoA, lettersCounter); - else - { - for (int i = 0; i < strlen(msgBuffer); i++) msgBuffer[i] = ' '; - - lettersCounter = 0; - msgLogoADone = true; - } - } - else if (!msgLogoBDone) - { - if (lettersCounter <= strlen(msgLogoB)) strncpy(msgBuffer, msgLogoB, lettersCounter); - else - { - msgLogoBDone = true; - framesCounter = 0; - } - } - } - } - - // Press enter to change to MODULES screen - if (IsKeyPressed(KEY_ENTER) && msgLogoBDone) TransitionToScreen(MODULES); - else if (IsKeyPressed(KEY_BACKSPACE)) TransitionToScreen(LOGO); - - } break; - case MODULES: - { - // Update MODULES screen variables here! - framesCounter++; - - if (IsKeyPressed(KEY_RIGHT) && (selectedModule < 5)) - { - selectedModule++; - framesCounter = 0; - } - else if (IsKeyPressed(KEY_LEFT) && (selectedModule > 0)) - { - selectedModule--; - framesCounter = 0; - } - - if (selectedModule == CORE) - { - if ((framesCounter > 60) && (windowOffset < 40)) - { - windowOffset++; - ballPosition.x++; - ballPosition.y++; - } - - if (framesCounter > 140) - { - if (IsKeyDown('A')) ballPosition.x -= 5; - if (IsKeyDown('D')) ballPosition.x += 5; - if (IsKeyDown('W')) ballPosition.y -= 5; - if (IsKeyDown('S')) ballPosition.y += 5; - - if (IsKeyPressed('1')) coreWindow = 1; - if (IsKeyPressed('2')) coreWindow = 2; - if (IsKeyPressed('3')) coreWindow = 3; - if (IsKeyPressed('4')) coreWindow = 4; - } - } - - if (selectedModule == TEXTURES) scaleFactor = (sinf(2*PI/240*framesCounter) + 1.0f)/2; - - if (selectedModule == AUDIO) - { - if (IsKeyPressed(KEY_SPACE) && !IsMusicPlaying(music)) PlayMusicStream(music); // Play music stream - - if (IsKeyPressed('S')) - { - StopMusicStream(music); - timePlayed = 0.0f; - - for (int i = 0; i < MAX_BALLS; i++) - { - soundBallsPosition[i] = (Vector2){ 650 + 560/2 + GetRandomValue(-280, 280), 220 + 200 + GetRandomValue(-200, 200) }; - soundBallsColor[i] = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 }; - soundBallsRadius[i] = GetRandomValue(2, 50); - soundBallsAlpha[i] = 1.0f; - - soundBallsActive[i] = false; - } - } - - if (IsMusicPlaying(music)) - { - UpdateMusicStream(music); - - timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*100*4; - - if ((framesCounter%10) == 0) - { - for (int i = 0; i < MAX_BALLS; i++) - { - if (!soundBallsActive[i]) - { - soundBallsActive[i] = true; - break; - } - } - } - - for (int i = 0; i < MAX_BALLS; i++) - { - if (soundBallsActive[i]) soundBallsAlpha[i] -= 0.005f; - - if (soundBallsAlpha[i] <= 0) - { - soundBallsActive[i] = false; - - // Reset ball random - soundBallsPosition[i] = (Vector2){ 650 + 560/2 + GetRandomValue(-280, 280), 220 + 200 + GetRandomValue(-200, 200) }; - soundBallsColor[i] = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 }; - soundBallsRadius[i] = GetRandomValue(2, 60); - soundBallsAlpha[i] = 1.0f; - } - } - } - - if (IsKeyPressed('N')) PlaySound(fxWav); - //if (IsKeyPressed('M')) PlaySound(fxOgg); - } - - // Press enter to change to ENDING screen - if (IsKeyPressed(KEY_ENTER)) TransitionToScreen(ENDING); - else if (IsKeyPressed(KEY_BACKSPACE)) TransitionToScreen(LOGO); - - } break; - case PONG: - { - // Update SECRET screen variables here! - framesCounter++; - - if (IsKeyPressed('P')) pongPaused = !pongPaused; - - if (!pongPaused) - { - pongBallPosition.x += pongBallSpeed.x; - pongBallPosition.y += pongBallSpeed.y; - - if ((pongBallPosition.x >= screenWidth - 5) || (pongBallPosition.x <= 5)) pongBallSpeed.x *= -1; - if ((pongBallPosition.y >= screenHeight - 5) || (pongBallPosition.y <= 5)) pongBallSpeed.y *= -1; - - if (IsKeyDown(KEY_UP) || IsKeyDown('W')) - { - pongPlayerRec.y -= 5; - pongAutoMode = false; - pongAutoCounter = 180; - } - else if (IsKeyDown(KEY_DOWN) || IsKeyDown('S')) - { - pongPlayerRec.y += 5; - pongAutoMode = false; - pongAutoCounter = 180; - } - else if (pongAutoCounter > 0) - { - pongAutoCounter--; - - if (pongAutoCounter == 0) pongAutoMode = true; - } - - if ((pongBallPosition.x < 600) && pongAutoMode) - { - if (pongBallPosition.y > (pongPlayerRec.y + pongPlayerRec.height/2)) pongPlayerRec.y += 5; - else if (pongBallPosition.y < (pongPlayerRec.y + pongPlayerRec.height/2)) pongPlayerRec.y -= 5; - } - - if (pongPlayerRec.y <= 0) pongPlayerRec.y = 0; - else if ((pongPlayerRec.y + pongPlayerRec.height) >= screenHeight) pongPlayerRec.y = screenHeight - pongPlayerRec.height; - - if (pongBallPosition.x > screenWidth - 600) - { - if (pongBallPosition.y > (pongEnemyRec.y + pongEnemyRec.height/2)) pongEnemyRec.y += 5; - else if (pongBallPosition.y < (pongEnemyRec.y + pongEnemyRec.height/2)) pongEnemyRec.y -= 5; - - if (pongEnemyRec.y <= 0) pongEnemyRec.y = 0; - else if ((pongEnemyRec.y + pongEnemyRec.height) >= screenHeight) pongEnemyRec.y = screenHeight - pongEnemyRec.height; - } - - if ((CheckCollisionCircleRec(pongBallPosition, 10, pongPlayerRec)) || (CheckCollisionCircleRec(pongBallPosition, 10, pongEnemyRec))) pongBallSpeed.x *= -1; - - if (pongBallPosition.x >= screenWidth - 5) pongScorePlayer++; - else if (pongBallPosition.x <= 5) pongScoreEnemy++; - } - - // Press enter to move back to MODULES screen - if (IsKeyPressed(KEY_ENTER)) TransitionToScreen(ENDING); - if (IsKeyPressed(KEY_BACKSPACE)) TransitionToScreen(ENDING); - } break; - case ENDING: - { - // Update ENDING screen - framesCounter++; - - // Press enter to move back to MODULES screen - if (IsKeyPressed(KEY_ENTER)) TransitionToScreen(PONG); - if (IsKeyPressed(KEY_BACKSPACE)) TransitionToScreen(MODULES); - - } break; - default: break; - } - - if ((currentScreen != LOADING) && (timeCounter < totalTime)) timeCounter++; - } - else UpdateTransition(); // Update transition (fade-in, fade-out) - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - BeginDrawing(); - - ClearBackground(RAYWHITE); - - switch(currentScreen) - { - case LOADING: - { - // Draw LOADING screen - if ((loadBarWidth < loadBarMaxWidth) && ((framesCounter/40)%2)) DrawText(msgLoading, 360, 240, 40, DARKGRAY); - - DrawRectangle(360 - 4, 300 - 4, loadBarMaxWidth + 8, 60 + 8, LIGHTGRAY); - DrawRectangle(360, 300, loadBarWidth - 1, 60, DARKGRAY); - DrawRectangleLines(360 - 4, 300 - 5, loadBarMaxWidth + 8, 60 + 8, DARKGRAY); - - if (loadBarWidth >= loadBarMaxWidth) - { - //DrawText(msgLoading, 360, 240, 40, DARKGRAY); - if ((framesCounter/30)%2) DrawText(msgPressEnter, screenWidth/2 - MeasureText(msgPressEnter, 40)/2 + 20, 400, 40, DARKGRAY); - } - else DrawText("PRESS SPACE to ACCELERATE LOADING! ;)", screenWidth/2 - 200, 400, 20, LIGHTGRAY); - - } break; - case LOGO: - { - // Draw LOGO screen - if (logoScreenState == 0) - { - if ((framesCounter/15)%2) DrawRectangle(logoPositionX, logoPositionY - 60, 16, 16, BLACK); - } - else if (logoScreenState == 1) - { - DrawRectangle(logoPositionX, logoPositionY - 60, topSideRecWidth, 16, BLACK); - DrawRectangle(logoPositionX, logoPositionY - 60, 16, leftSideRecHeight, BLACK); - } - else if (logoScreenState == 2) - { - DrawRectangle(logoPositionX, logoPositionY - 60, topSideRecWidth, 16, BLACK); - DrawRectangle(logoPositionX, logoPositionY - 60, 16, leftSideRecHeight, BLACK); - - DrawRectangle(logoPositionX + 240, logoPositionY - 60, 16, rightSideRecHeight, BLACK); - DrawRectangle(logoPositionX, logoPositionY + 240 - 60, bottomSideRecWidth, 16, BLACK); - } - else if (logoScreenState == 3) - { - DrawRectangle(logoPositionX, logoPositionY - 60, topSideRecWidth, 16, BLACK); - DrawRectangle(logoPositionX, logoPositionY + 16 - 60, 16, leftSideRecHeight - 32, BLACK); - - DrawRectangle(logoPositionX + 240, logoPositionY + 16 - 60, 16, rightSideRecHeight - 32, BLACK); - DrawRectangle(logoPositionX, logoPositionY + 240 - 60, bottomSideRecWidth, 16, BLACK); - - DrawRectangle(screenWidth/2 - 112, screenHeight/2 - 112 - 60, 224, 224, RAYWHITE); - - DrawText(raylib, screenWidth/2 - 44, screenHeight/2 + 48 - 60, 50, BLACK); - - if (!msgLogoADone) DrawText(msgBuffer, screenWidth/2 - MeasureText(msgLogoA, 30)/2, 460, 30, GRAY); - else - { - DrawText(msgLogoA, screenWidth/2 - MeasureText(msgLogoA, 30)/2, 460, 30, GRAY); - - if (!msgLogoBDone) DrawText(msgBuffer, screenWidth/2 - MeasureText(msgLogoB, 30)/2, 510, 30, GRAY); - else - { - DrawText(msgLogoB, screenWidth/2 - MeasureText(msgLogoA, 30)/2, 510, 30, GRAY); - - if ((framesCounter > 90) && ((framesCounter/30)%2)) DrawText("PRESS ENTER to CONTINUE", 930, 650, 20, GRAY); - } - } - } - } break; - case MODULES: - { - // Draw MODULES screen - DrawTexture(raylibLogoB, 40, 40, WHITE); - DrawText("raylib is composed of 6 main modules:", 128 + 40 + 30, 50, 20, GRAY); - - if (framesCounter < 120) - { - if (((framesCounter/30)%2) == 0) DrawRectangle(128 + 40 + 30 - 4 + 175*selectedModule, 128 + 40 - 70 - 8 - 4, 158, 78, RED); - } - else DrawRectangle(128 + 40 + 30 - 4 + 175*selectedModule, 128 + 40 - 70 - 8 - 4, 158, 78, RED); - - if (selectedModule != AUDIO) - { - DrawTriangle((Vector2){950 - 40, 685 - 10}, (Vector2){950 - 60, 685}, (Vector2){950 - 40, 685 + 10}, GRAY); - DrawTriangle((Vector2){950 - 30, 685 - 10}, (Vector2){950 - 30, 685 + 10}, (Vector2){950 - 10, 685}, GRAY); - DrawText("PRESS RIGHT or LEFT to EXPLORE MODULES", 960, 680, 10, GRAY); - } - - switch (selectedModule) - { - case CORE: - { - DrawText("This module give you functions to:", 48, 200, 10, GetColor(0x5c5a5aff)); - - DrawTextEx(fontRomulus, "Open-Close Window", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0x5c5a5aff)); - DrawTextEx(fontRomulus, "Manage Drawing Area", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0x5c5a5aff)); - DrawTextEx(fontRomulus, "Manage Inputs", (Vector2){ 48, 290 }, fontRomulus.baseSize*2, 4, GetColor(0x5c5a5aff)); - DrawTextEx(fontRomulus, "Manage Timming", (Vector2){ 48, 320 }, fontRomulus.baseSize*2, 4, GetColor(0x5c5a5aff)); - DrawTextEx(fontRomulus, "Auxiliar Functions", (Vector2){ 48, 350 }, fontRomulus.baseSize*2, 4, GetColor(0x5c5a5aff)); - - switch (coreWindow) - { - case 1: DrawTexture(raylibWindow, 520, 220, WHITE); break; - case 2: DrawTextureEx(raylibWindow01, (Vector2){ 450, 220 - 45 }, 0.0f, 4.0f, WHITE); break; - case 3: DrawTextureEx(raylibWindow02, (Vector2){ 430, 220 - 40 }, 0.0f, 4.0f, WHITE); break; - case 4: DrawTextureEx(raylibWindow03, (Vector2){ 470, 220 - 65 }, 0.0f, 4.0f, WHITE); break; - default: DrawTexture(raylibWindow, 520, 220, WHITE); break; - } - - if (framesCounter > 140) DrawText("Check the possible windows raylib can run on. PRESS KEY: 1, 2, 3 or 4", 520 + 8 + windowOffset + 160, 220 + windowOffset + 10, 10, LIGHTGRAY); - - DrawText("Compile raylib C code for the folowing platforms:", 48, 400, 10, MAROON); - - DrawTextureRec(platforms, (Rectangle){ 0, 0, platforms.width, platforms.height}, (Vector2){ 75, 420 }, WHITE); - - DrawRectangle(520 + 8 + windowOffset, 220 + 31 + windowOffset, 640, 360, RAYWHITE); - DrawRectangleLines(520 + 8 + windowOffset - 1, 220 + 31 + windowOffset - 2, 640 + 2, 360 + 2, GRAY); - DrawFPS(520 + 8 + windowOffset + 10, 220 + 31 + windowOffset + 10); - - DrawRectangle(ballPosition.x - 50, ballPosition.y - 50, 100, 100, Fade(MAROON, 0.5f)); - DrawRectangleRec(GetCollisionRec((Rectangle){ 520 + 8 + windowOffset - 1, 220 + 31 + windowOffset - 1, 640 + 2, 360 + 2 }, (Rectangle){ (int)ballPosition.x - 50, (int)ballPosition.y - 50, 100, 100 }), MAROON); - - if (framesCounter > 140) - { - DrawTextEx(fontMecha, "MOVE ME", (Vector2){ ballPosition.x - 26, ballPosition.y - 20 }, fontMecha.baseSize, 2, BLACK); - DrawTextEx(fontMecha, "[ W A S D ]", (Vector2){ ballPosition.x - 36, ballPosition.y }, fontMecha.baseSize, 2, BLACK); - } - } break; - case SHAPES: - { - DrawText("This module give you functions to:", 48, 200, 10, GetColor(0xcd5757ff)); - - DrawTextEx(fontRomulus, "Draw Basic Shapes", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0xcd5757ff)); - DrawTextEx(fontRomulus, "Basic Collision Detection", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0xcd5757ff)); - - DrawCircle(screenWidth/4, 120 + 240, 35, DARKBLUE); - DrawCircleGradient(screenWidth/4, 220 + 240, 60, GREEN, SKYBLUE); - DrawCircleLines(screenWidth/4, 340 + 240, 80, DARKBLUE); - - DrawRectangle(screenWidth/4*2 - 110, 100 + 180, 220, 100, LIME); - DrawRectangleGradient(screenWidth/4*2 - 90, 170 + 240, 180, 130, MAROON, GOLD); - DrawRectangleLines(screenWidth/4*2 - 80, 320 + 240, 160, 80, ORANGE); - - DrawTriangle((Vector2){screenWidth/4*3, 60 + 220}, (Vector2){screenWidth/4*3 - 60, 160 + 220}, (Vector2){screenWidth/4*3 + 60, 160 + 220}, VIOLET); - - DrawTriangleLines((Vector2){screenWidth/4*3, 140 + 220}, (Vector2){screenWidth/4*3 - 60, 210 + 260}, (Vector2){screenWidth/4*3 + 60, 210 + 260}, SKYBLUE); - - DrawPoly((Vector2){screenWidth/4*3, 320 + 240}, 6, 80, 0, BROWN); - - } break; - case TEXTURES: - { - DrawText("This module give you functions to:", 48, 200, 10, GetColor(0x60815aff)); - - DrawTextEx(fontRomulus, "Load Images and Textures", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0x60815aff)); - DrawTextEx(fontRomulus, "Draw Textures", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0x60815aff)); - - DrawRectangle(138, 348, 260, 260, GRAY); - DrawTexturePro(lena, (Rectangle){ 0, 0, lena.width, lena.height }, (Rectangle){ 140 + 128, 350 + 128, lena.width/2*scaleFactor, lena.height/2*scaleFactor }, (Vector2){ lena.width/4*scaleFactor, lena.height/4*scaleFactor }, 0.0f, WHITE); - - DrawTexture(lena, 600, 180, Fade(WHITE, 0.3f)); - DrawTextureRec(lena, (Rectangle){ 225, 240, 155, 50 }, (Vector2){ 600 + 256 - 82 + 50, 180 + 241 }, PINK); - - DrawTexturePro(mandrill, (Rectangle){ 0, 0, mandrill.width, mandrill.height }, (Rectangle){ screenWidth/2 - 40, 350 + 128, mandrill.width/2, mandrill.height/2 }, - (Vector2){ mandrill.width/4, mandrill.height/4 }, framesCounter, GOLD); - - } break; - case TEXT: - { - DrawText("This module give you functions to:", 48, 200, 10, GetColor(0x377764ff)); - - DrawTextEx(fontRomulus, "Load SpriteFonts", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0x377764ff)); - DrawTextEx(fontRomulus, "Draw Text", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0x377764ff)); - DrawTextEx(fontRomulus, "Text Formatting", (Vector2){ 48, 290 }, fontRomulus.baseSize*2, 4, GetColor(0x377764ff)); - - DrawTexture(texAlagard, 60, 360, WHITE); - - DrawTextEx(fontMechaC, msg1, (Vector2){ 540 + 168, 210 }, fontMechaC.baseSize, -3, WHITE); - DrawTextEx(fontAlagardC, msg2, (Vector2){ 460 + 140, 260 }, fontAlagardC.baseSize, -2, WHITE); - DrawTextEx(fontJupiterC, msg3, (Vector2){ 640 + 70, 300 }, fontJupiterC.baseSize, 2, WHITE); - - DrawTextEx(fontAlagard, "It also includes some...", (Vector2){ 650 + 70, 400 }, fontAlagard.baseSize*2, 2, MAROON); - DrawTextEx(fontPixelplay, "...free fonts in rBMF format...", (Vector2){ 705 - 26, 450 }, fontPixelplay.baseSize*2, 4, ORANGE); - DrawTextEx(fontMecha, "...to be used even in...", (Vector2){ 700 + 40, 500 }, fontMecha.baseSize*2, 4, DARKGREEN); - DrawTextEx(fontSetback, "...commercial projects...", (Vector2){ 710, 550 }, fontSetback.baseSize*2, 4, DARKBLUE); - DrawTextEx(fontRomulus, "...completely for free!", (Vector2){ 710 + 17, 600 }, fontRomulus.baseSize*2, 3, DARKPURPLE); - - DrawText("This is a custom font spritesheet, raylib can load it automatically!", 228, 360 + 295, 10, GRAY); - - } break; - case MODELS: - { - DrawText("This module give you functions to:", 48, 200, 10, GetColor(0x417794ff)); - - DrawTextEx(fontRomulus, "Draw Geometric Models", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0x417794ff)); - DrawTextEx(fontRomulus, "Load 3D Models", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0x417794ff)); - DrawTextEx(fontRomulus, "Draw 3D Models", (Vector2){ 48, 290 }, fontRomulus.baseSize*2, 4, GetColor(0x417794ff)); - - Begin3dMode(camera); - - DrawCube((Vector3){-4, 0, 2}, 2, 5, 2, RED); - DrawCubeWires((Vector3){-4, 0, 2}, 2, 5, 2, GOLD); - DrawCubeWires((Vector3){-4, 0, -2}, 3, 6, 2, MAROON); - - DrawSphere((Vector3){-1, 0, -2}, 1, GREEN); - DrawSphereWires((Vector3){1, 0, 2}, 2, 16, 16, LIME); - - DrawCylinder((Vector3){4, 0, -2}, 1, 2, 3, 4, SKYBLUE); - DrawCylinderWires((Vector3){4, 0, -2}, 1, 2, 3, 4, DARKBLUE); - DrawCylinderWires((Vector3){4.5, -1, 2}, 1, 1, 2, 6, BROWN); - - DrawCylinder((Vector3){1, 0, -4}, 0, 1.5, 3, 8, GOLD); - DrawCylinderWires((Vector3){1, 0, -4}, 0, 1.5, 3, 8, PINK); - - DrawModelEx(cat, (Vector3){ 8.0f, 0.0f, 2.0f }, (Vector3){ 0.0f, 1.0f, 0.0f }, 0.5f*framesCounter, (Vector3){ 0.1f, 0.1f, 0.1f }, WHITE); - DrawGizmo((Vector3){ 8.0f, 0.0f, 2.0f }); - - DrawGrid(10.0, 1.0); // Draw a grid - - End3dMode(); - - DrawFPS(900, 220); - - } break; - case AUDIO: - { - DrawText("This module give you functions to:", 48, 200, 10, GetColor(0x8c7539ff)); - - DrawTextEx(fontRomulus, "Load and Play Sounds", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0x8c7539ff)); - DrawTextEx(fontRomulus, "Play Music (streaming)", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0x8c7539ff)); - - DrawText("PRESS SPACE to START PLAYING MUSIC", 135, 350, 20, GRAY); - DrawRectangle(150, 390, 400, 12, LIGHTGRAY); - DrawRectangle(150, 390, (int)timePlayed, 12, MAROON); - - if (IsMusicPlaying(music)) - { - DrawText("PRESS 'S' to STOP PLAYING MUSIC", 165, 425, 20, GRAY); - - for (int i = 0; i < MAX_BALLS; i++) - { - if (soundBallsActive[i]) DrawPoly(soundBallsPosition[i], 18, soundBallsRadius[i], 0.0f, Fade(soundBallsColor[i], soundBallsAlpha[i])); - } - } - - DrawText("PRESS 'N' to PLAY a SOUND", 200, 540, 20, VIOLET); - - if ((framesCounter/30)%2) DrawText("PRESS ENTER to CONTINUE", 930, 650, 20, GRAY); - - } break; - default: break; - } - - // Draw modules menu - DrawRectangle(128 + 40 + 30, 128 + 40 - 70 - 8, 150, 70, GetColor(0x898888ff)); - DrawRectangle(128 + 40 + 30 + 8, 128 + 40 - 70, 150 - 16, 70 - 16, GetColor(0xe1e1e1ff)); - DrawText("CORE", 128 + 40 + 30 + 8 + 38, 128 + 40 - 50, 20, GetColor(0x5c5a5aff)); - - DrawRectangle(128 + 40 + 30 + 175, 128 + 40 - 70 - 8, 150, 70, GetColor(0xe66666ff)); - DrawRectangle(128 + 40 + 30 + 8 + 175, 128 + 40 - 70, 150 - 16, 70 - 16, GetColor(0xf0d6d6ff)); - DrawText("SHAPES", 128 + 40 + 30 + 8 + 175 + 28, 128 + 40 - 50, 20, GetColor(0xcd5757ff)); - - DrawRectangle(128 + 40 + 30 + 175*2, 128 + 40 - 70 - 8, 150, 70, GetColor(0x75a06dff)); - DrawRectangle(128 + 40 + 30 + 8 + 175*2, 128 + 40 - 70, 150 - 16, 70 - 16, GetColor(0xc8eabfff)); - DrawText("TEXTURES", 128 + 40 + 30 + 175*2 + 8 + 9, 128 + 40 - 50, 20, GetColor(0x60815aff)); - - DrawRectangle(128 + 40 + 30 + 175*3, 128 + 40 - 70 - 8, 150, 70, GetColor(0x52b296ff)); - DrawRectangle(128 + 40 + 30 + 8 + 175*3, 128 + 40 - 70, 150 - 16, 70 - 16, GetColor(0xbef0ddff)); - DrawText("TEXT", 128 + 40 + 30 + 8 + 175*3 + 38, 128 + 40 - 50, 20, GetColor(0x377764ff)); - - DrawRectangle(128 + 40 + 30 + 175*4, 128 + 40 - 70 - 8, 150, 70, GetColor(0x5d9cbdff)); - DrawRectangle(128 + 40 + 30 + 8 + 175*4, 128 + 40 - 70, 150 - 16, 70 - 16, GetColor(0xbedce8ff)); - DrawText("MODELS", 128 + 40 + 30 + 8 + 175*4 + 28, 128 + 40 - 50, 20, GetColor(0x417794ff)); - - DrawRectangle(128 + 40 + 30 + 175*5, 128 + 40 - 70 - 8, 150, 70, GetColor(0xd3b157ff)); - DrawRectangle(128 + 40 + 30 + 8 + 175*5, 128 + 40 - 70, 150 - 16, 70 - 16, GetColor(0xebddaeff)); - DrawText("AUDIO", 128 + 40 + 30 + 8 + 175*5 + 36, 128 + 40 - 50, 20, GetColor(0x8c7539ff)); - - } break; - case ENDING: - { - // Draw ENDING screen - DrawTextEx(fontAlagard, "LEARN VIDEOGAMES PROGRAMMING", (Vector2){ screenWidth/2 - MeasureTextEx(fontAlagard, "LEARN VIDEOGAMES PROGRAMMING", fontAlagard.baseSize*4, 4).x/2, 80 }, fontAlagard.baseSize*4, 4, MAROON); - - DrawTexture(raylibLogoA, logoPositionX, logoPositionY - 40, WHITE); - - DrawText(msgWeb, screenWidth/2 - MeasureText(msgWeb, 40)/2, 470, 40, DARKGRAY); - - if (framesCounter > 60) DrawText(msgCredits, screenWidth/2 - MeasureText(msgCredits, 30)/2, 550, 30, GRAY); - - if (framesCounter > 120) if ((framesCounter/30)%2) DrawText("PRESS ENTER to CONTINUE", screenWidth/2 - MeasureText("PRESS ENTER to CONTINUE", 20)/2, 640, 20, LIGHTGRAY); - - } break; - case PONG: - { - // Pong - DrawCircleV(pongBallPosition, 10, LIGHTGRAY); - DrawRectangleRec(pongPlayerRec, GRAY); - DrawRectangleRec(pongEnemyRec, GRAY); - - DrawText(FormatText("%02i", pongScorePlayer), 150, 10, 80, LIGHTGRAY); - DrawText(FormatText("%02i", pongScoreEnemy), screenWidth - MeasureText("00", 80) - 150, 10, 80, LIGHTGRAY); - - if (pongPaused) if ((framesCounter/30)%2) DrawText("GAME PAUSED [P]", screenWidth/2 - 100, 40, 20, MAROON); - } break; - default: break; - } - - if (currentScreen != LOADING) DrawRectangle(0, screenHeight - 10, ((float)timeCounter/(float)totalTime)*screenWidth, 10, LIGHTGRAY); - - if (onTransition) DrawTransition(); - - EndDrawing(); - //---------------------------------------------------------------------------------- -} diff --git a/games/raylib_demo/resources/audio/coin.wav b/games/raylib_demo/resources/audio/coin.wav Binary files differdeleted file mode 100644 index 6007509b..00000000 --- a/games/raylib_demo/resources/audio/coin.wav +++ /dev/null diff --git a/games/raylib_demo/resources/audio/guitar_noodling.ogg b/games/raylib_demo/resources/audio/guitar_noodling.ogg Binary files differdeleted file mode 100644 index f5022040..00000000 --- a/games/raylib_demo/resources/audio/guitar_noodling.ogg +++ /dev/null diff --git a/games/raylib_demo/resources/audio/spring.wav b/games/raylib_demo/resources/audio/spring.wav Binary files differdeleted file mode 100644 index c7fbf1b9..00000000 --- a/games/raylib_demo/resources/audio/spring.wav +++ /dev/null diff --git a/games/raylib_demo/resources/audio/tanatana.ogg b/games/raylib_demo/resources/audio/tanatana.ogg Binary files differdeleted file mode 100644 index 90b1795a..00000000 --- a/games/raylib_demo/resources/audio/tanatana.ogg +++ /dev/null diff --git a/games/raylib_demo/resources/audio/weird.wav b/games/raylib_demo/resources/audio/weird.wav Binary files differdeleted file mode 100644 index 101029c5..00000000 --- a/games/raylib_demo/resources/audio/weird.wav +++ /dev/null diff --git a/games/raylib_demo/resources/cat.obj b/games/raylib_demo/resources/cat.obj deleted file mode 100644 index 1faa9846..00000000 --- a/games/raylib_demo/resources/cat.obj +++ /dev/null @@ -1,4731 +0,0 @@ -# -# object Cat -# - -v -0.00 30.40 -1.43 -v -0.00 30.01 1.57 -v 3.07 28.57 1.88 -v 3.23 28.74 -1.28 -v 2.93 30.52 -14.47 -v 0.00 31.65 -14.07 -v 0.00 32.03 -11.02 -v 3.49 30.39 -11.43 -v -0.00 22.66 -19.14 -v 1.98 22.94 -18.73 -v 2.33 19.32 -17.01 -v -0.00 18.98 -17.55 -v 6.09 25.02 -0.72 -v 6.05 25.40 2.15 -v 6.20 18.84 -0.16 -v 5.74 18.56 2.35 -v 6.32 19.78 -7.20 -v 4.52 16.56 -7.33 -v 4.70 16.75 -9.21 -v 6.65 19.94 -8.17 -v -0.00 30.43 5.21 -v 3.15 29.21 6.20 -v 3.46 15.19 3.29 -v 4.18 15.67 0.04 -v 2.28 13.77 0.12 -v 2.04 14.08 2.60 -v 2.38 14.74 -7.70 -v 2.27 15.37 -10.06 -v 5.58 26.84 7.17 -v 2.87 30.20 8.03 -v 4.93 27.37 9.73 -v 5.61 2.21 8.37 -v 6.14 3.22 9.74 -v 6.68 1.73 10.18 -v 5.68 -0.03 9.83 -v 4.08 -0.03 9.37 -v 4.02 1.99 7.98 -v 2.54 -0.03 10.04 -v 2.39 2.21 8.56 -v 1.77 1.73 10.48 -v 2.34 3.22 10.01 -v 2.52 3.27 11.56 -v 2.80 3.64 11.26 -v 3.32 3.62 11.86 -v 5.34 3.62 11.75 -v 5.75 3.64 11.07 -v 4.32 3.96 11.73 -v 4.34 3.73 12.02 -v 6.03 3.27 11.36 -v 7.00 1.16 12.70 -v 7.05 1.09 14.30 -v 6.62 -0.01 14.46 -v 6.67 -0.01 12.74 -v 5.94 -0.01 14.95 -v 5.34 -0.01 14.87 -v 4.29 -0.01 12.84 -v 4.47 -0.01 15.37 -v 3.58 -0.01 14.94 -v 1.67 1.17 12.96 -v 1.91 -0.01 12.93 -v 2.27 -0.01 14.65 -v 1.87 1.10 14.53 -v 2.04 2.51 14.08 -v 2.41 2.98 12.86 -v 3.07 3.33 12.99 -v 2.87 2.89 14.41 -v 4.95 3.61 13.06 -v 4.38 3.90 13.27 -v 4.41 3.41 14.79 -v 5.47 2.54 14.56 -v 6.74 2.51 13.88 -v 6.27 3.03 12.63 -v 5.58 1.24 15.03 -v 4.51 1.34 15.66 -v 3.48 1.25 15.07 -v 2.66 1.19 15.14 -v 3.54 2.56 14.63 -v 2.19 14.25 6.54 -v 1.39 14.12 6.98 -v 2.42 14.98 8.43 -v 1.36 14.78 9.20 -v 2.01 16.83 -13.60 -v -0.00 16.45 -13.91 -v 6.29 19.22 -3.91 -v 5.78 25.21 -4.36 -v 3.33 29.17 -4.90 -v 0.00 31.15 -4.95 -v -0.00 26.87 -17.74 -v 2.39 27.13 -17.55 -v -0.00 14.93 -10.66 -v -0.00 31.09 -16.51 -v 2.17 29.72 -16.78 -v 1.49 36.84 -24.79 -v 1.27 41.55 -26.64 -v 0.00 42.08 -25.44 -v -0.00 37.36 -23.33 -v 1.10 48.04 -27.60 -v 0.00 41.08 -28.03 -v 0.00 47.89 -28.89 -v -0.00 36.18 -26.27 -v -0.02 31.50 -23.55 -v 1.65 32.74 -22.14 -v 1.80 30.64 -19.84 -v -0.00 29.11 -21.24 -v -0.02 33.60 -20.56 -v -0.01 31.57 -18.45 -v 0.00 48.20 -26.51 -v 0.64 48.90 -27.72 -v -0.00 48.99 -27.04 -v 0.00 48.81 -28.52 -v 2.01 29.52 -17.72 -v -0.00 19.75 14.29 -v -0.00 17.45 12.46 -v 1.88 17.93 12.35 -v 1.57 20.12 14.04 -v 2.56 30.98 9.13 -v 4.46 28.79 10.92 -v -0.00 31.95 8.21 -v -0.00 31.29 7.02 -v 5.94 25.26 11.51 -v 4.93 26.82 12.64 -v -0.00 32.95 8.95 -v 2.56 32.43 9.79 -v 1.36 23.45 15.57 -v -0.00 23.15 15.81 -v 3.19 24.31 14.77 -v 3.17 20.72 13.42 -v 5.00 22.20 12.86 -v 4.13 24.96 14.05 -v 4.39 31.01 11.80 -v 4.76 29.65 13.36 -v 4.26 28.06 14.68 -v 3.28 27.06 15.56 -v -0.00 25.73 16.48 -v 1.41 26.15 16.41 -v 2.33 34.56 22.15 -v 2.25 34.47 22.31 -v 3.19 34.48 22.08 -v 3.11 34.55 21.97 -v 1.82 34.76 22.51 -v 1.98 34.86 22.25 -v 4.11 41.24 16.12 -v 4.12 40.53 17.30 -v 5.12 39.89 15.46 -v 5.50 40.64 14.98 -v 3.81 42.25 16.18 -v 5.77 38.26 15.33 -v 5.91 39.09 13.80 -v 7.55 38.39 15.53 -v 6.54 36.03 14.95 -v 5.79 37.39 13.19 -v 1.95 41.74 16.78 -v 1.50 41.82 17.78 -v 1.91 41.74 17.62 -v 4.44 44.21 17.57 -v 3.38 43.19 17.82 -v 4.27 42.62 18.08 -v 4.86 43.93 17.63 -v 6.27 42.25 15.15 -v 4.55 43.61 16.50 -v 8.27 41.13 15.27 -v 7.96 39.76 15.42 -v 6.37 40.27 13.65 -v 8.04 39.75 15.23 -v 7.03 42.62 14.09 -v 4.88 41.33 13.82 -v 5.86 43.29 14.36 -v 5.09 43.90 15.39 -v 3.78 42.25 15.07 -v 5.51 45.24 17.16 -v 5.70 45.19 17.08 -v 7.48 46.20 17.08 -v 7.08 44.48 15.93 -v 7.79 45.24 16.33 -v 8.24 43.92 15.60 -v 8.30 43.97 15.38 -v 7.56 44.53 15.35 -v 7.82 45.29 16.17 -v 6.80 44.94 15.49 -v 6.20 45.28 16.21 -v 7.45 46.19 16.92 -v 5.18 43.72 17.22 -v 8.33 42.51 15.28 -v 8.40 42.58 15.07 -v 5.09 41.88 17.65 -v 3.26 19.02 11.83 -v 4.39 16.04 -3.75 -v 2.33 13.93 -3.88 -v 0.00 13.05 0.04 -v 0.00 13.35 2.73 -v 0.00 14.05 -7.91 -v 0.00 13.86 7.43 -v 0.00 14.78 9.65 -v 2.74 18.21 -13.21 -v 0.00 13.25 -4.01 -v 5.80 25.70 -8.38 -v 3.34 30.05 -8.19 -v 0.00 31.71 -7.95 -v 2.16 35.87 22.31 -v 2.57 36.23 22.18 -v 2.55 36.31 22.34 -v 2.13 35.91 22.52 -v 1.80 35.20 22.55 -v 1.94 35.25 22.33 -v 4.17 35.18 21.38 -v 4.25 35.81 21.29 -v 4.16 35.76 21.28 -v 4.10 35.18 21.41 -v 3.86 34.75 21.73 -v 3.78 34.80 21.68 -v 3.07 36.36 21.96 -v 3.13 36.47 22.14 -v 3.78 3.59 13.14 -v 5.65 3.37 12.82 -v 6.11 2.84 14.28 -v 6.30 1.18 14.99 -v 2.96 -0.01 15.07 -v 6.25 36.31 15.33 -v 7.47 38.42 15.69 -v 3.13 41.25 17.80 -v 2.03 41.16 19.56 -v 2.31 41.56 17.79 -v 7.09 2.43 -19.06 -v 7.57 3.28 -17.72 -v 7.74 1.96 -17.50 -v 7.12 0.00 -18.53 -v 5.75 0.00 -19.00 -v 5.72 2.06 -19.83 -v 4.44 0.00 -18.31 -v 4.40 2.43 -18.89 -v 3.76 1.96 -17.22 -v 3.89 3.29 -17.47 -v 4.49 3.30 -16.19 -v 4.57 3.62 -16.49 -v 5.21 3.62 -15.90 -v 5.96 3.97 -15.94 -v 5.96 3.72 -15.75 -v 6.70 3.61 -16.01 -v 7.24 3.61 -16.67 -v 7.39 3.30 -16.39 -v 8.75 1.24 -15.02 -v 8.64 1.16 -12.80 -v 8.22 0.00 -12.58 -v 8.27 0.00 -14.95 -v 7.55 0.00 -11.91 -v 6.95 0.00 -12.02 -v 5.92 0.00 -14.81 -v 6.10 0.00 -11.32 -v 5.22 0.00 -11.92 -v 3.53 1.16 -12.48 -v 3.19 1.24 -14.66 -v 3.57 0.00 -14.69 -v 3.93 0.00 -12.32 -v 3.70 3.02 -13.10 -v 4.06 3.53 -14.81 -v 4.51 3.43 -12.65 -v 4.71 3.91 -14.62 -v 6.01 4.53 -14.23 -v 6.04 4.00 -12.13 -v 7.09 3.06 -12.44 -v 6.57 4.22 -14.52 -v 8.34 3.02 -13.38 -v 7.88 3.59 -15.12 -v 7.20 1.32 -11.80 -v 6.14 1.42 -10.92 -v 5.12 1.33 -11.73 -v 4.30 1.26 -11.65 -v 5.18 3.08 -12.34 -v 5.42 4.19 -14.41 -v 7.26 3.95 -14.86 -v 7.72 3.38 -12.82 -v 7.91 1.26 -11.85 -v 4.60 0.00 -11.75 -v 8.34 41.12 15.05 -v 1.05 31.27 23.35 -v 1.91 30.72 22.80 -v -0.00 30.42 21.70 -v 0.99 31.21 23.60 -v 0.44 31.50 23.77 -v -0.00 31.85 23.98 -v -0.00 31.64 23.83 -v 0.19 31.62 23.81 -v 0.77 31.44 23.53 -v 4.07 40.21 13.27 -v 2.70 41.60 14.81 -v 9.35 21.36 -11.82 -v 7.34 20.08 -8.75 -v 7.54 15.35 -9.52 -v 9.91 16.45 -13.25 -v 6.26 25.80 -8.91 -v 7.71 25.97 -11.69 -v 7.69 23.23 -16.57 -v 6.48 26.48 -15.68 -v 4.67 24.17 -19.26 -v 4.29 27.08 -17.03 -v 5.40 13.46 -20.28 -v 5.10 15.57 -19.07 -v 8.29 14.42 -17.91 -v 8.49 11.41 -19.26 -v 8.44 18.60 -17.05 -v 4.95 19.86 -19.38 -v 4.86 29.06 -14.93 -v 5.76 28.94 -11.95 -v 8.39 10.36 -17.19 -v 8.26 8.96 -17.63 -v 8.15 9.26 -19.80 -v 5.37 9.04 -22.20 -v 5.39 12.45 -21.46 -v 7.56 6.58 -19.65 -v 7.75 6.67 -17.92 -v 5.46 6.28 -20.78 -v 9.55 12.52 -15.65 -v 3.21 10.61 -16.85 -v 2.99 11.59 -19.22 -v 3.15 9.53 -19.54 -v 3.35 9.18 -17.26 -v 3.93 6.80 -17.69 -v 5.84 6.61 -16.48 -v 6.07 8.72 -15.66 -v 3.87 6.53 -19.23 -v 6.24 9.51 -15.18 -v 6.94 10.91 -13.09 -v 3.41 12.28 -13.94 -v 3.04 13.84 -15.32 -v 3.10 15.11 -17.16 -v 6.80 11.45 5.31 -v 5.08 11.25 4.62 -v 5.44 13.30 3.26 -v 7.01 13.17 4.27 -v 3.68 11.50 5.38 -v 3.96 13.36 4.06 -v 2.61 12.50 6.46 -v 3.54 12.74 10.35 -v 5.44 11.32 10.79 -v 5.71 12.69 10.92 -v 7.21 12.61 9.49 -v 6.74 10.48 9.44 -v 5.54 15.60 2.65 -v 7.56 15.57 3.60 -v 3.35 15.84 10.75 -v 5.70 16.02 11.41 -v 7.55 16.03 10.25 -v 7.92 12.48 7.83 -v 8.73 15.76 7.82 -v 7.08 21.62 3.10 -v 7.64 18.57 3.15 -v 6.65 24.62 10.50 -v 7.22 23.54 7.84 -v 7.48 10.15 8.22 -v 6.52 9.31 6.17 -v 6.51 9.30 6.16 -v 4.96 9.40 5.37 -v 2.67 3.40 8.13 -v 4.14 3.11 7.38 -v 2.39 4.06 8.96 -v 2.88 4.43 10.82 -v 8.62 19.59 7.86 -v 5.89 19.71 11.97 -v 7.55 19.76 10.61 -v 4.84 8.62 10.62 -v 4.95 9.57 10.50 -v 3.02 9.48 10.01 -v 2.97 8.56 10.21 -v 6.17 8.46 9.79 -v 6.32 9.42 9.66 -v 6.98 9.13 8.55 -v 6.79 8.23 8.68 -v 4.50 8.16 6.43 -v 6.08 8.40 7.10 -v 5.96 7.46 7.26 -v 4.41 7.23 6.64 -v 6.51 7.32 8.81 -v 3.52 10.12 5.88 -v 2.46 8.83 7.68 -v 2.69 6.46 7.45 -v 4.31 6.29 6.86 -v 2.48 7.01 8.20 -v 3.10 7.52 10.42 -v 4.48 4.59 11.31 -v 5.68 4.40 10.51 -v 6.11 4.22 9.23 -v 5.55 3.27 7.82 -v 2.19 28.58 17.74 -v -0.00 28.19 17.89 -v 0.00 27.08 17.06 -v 1.97 27.54 16.97 -v 4.13 28.54 16.42 -v 4.34 29.37 17.58 -v 5.44 30.14 15.70 -v 6.10 31.05 16.90 -v 5.84 30.72 18.56 -v 0.00 34.44 9.58 -v 3.01 33.84 10.45 -v 5.46 32.87 12.29 -v 5.78 31.44 14.37 -v 5.89 35.55 12.68 -v 3.31 36.61 10.82 -v -0.00 37.13 9.86 -v 0.92 34.95 23.68 -v -0.00 35.17 23.93 -v -0.00 34.52 24.34 -v 1.00 34.24 24.10 -v 1.13 33.50 24.60 -v -0.00 33.71 24.97 -v -0.00 32.81 24.82 -v 1.16 33.35 24.54 -v 0.17 32.79 24.76 -v 1.88 32.27 24.20 -v 1.06 32.47 24.68 -v 0.92 32.04 24.48 -v 1.63 31.75 24.03 -v 0.74 31.73 24.22 -v 1.35 31.33 23.89 -v 1.29 34.04 23.96 -v 3.21 30.53 21.75 -v 3.96 31.60 22.04 -v 2.75 31.57 23.20 -v 0.00 41.90 18.20 -v -0.00 41.15 20.18 -v 4.22 29.82 19.06 -v 6.42 33.99 19.85 -v 6.16 32.01 19.66 -v 6.88 32.41 18.06 -v 7.09 34.21 18.13 -v -0.00 36.61 23.40 -v -0.00 35.79 23.62 -v 0.93 35.61 23.37 -v 1.12 36.42 23.17 -v -0.00 31.48 23.97 -v 0.40 31.42 23.92 -v 4.14 32.81 22.39 -v 3.02 32.48 23.28 -v 1.78 36.12 22.84 -v 1.42 35.35 23.08 -v 2.07 40.06 21.08 -v -0.00 40.08 21.59 -v 3.19 36.68 22.18 -v 3.82 36.35 21.67 -v 4.00 36.52 21.64 -v 3.51 37.03 22.04 -v 3.07 40.70 12.84 -v -0.00 41.05 12.30 -v 0.00 41.95 14.79 -v 1.34 29.48 22.43 -v 1.78 29.30 21.35 -v 2.55 29.83 21.48 -v 1.89 29.97 22.46 -v 5.17 30.55 19.50 -v 4.32 30.50 20.82 -v 3.37 29.88 20.50 -v 2.28 29.22 19.09 -v 2.10 29.36 20.32 -v -0.00 33.98 24.85 -v 4.63 37.76 21.16 -v 3.35 38.38 21.86 -v 2.79 37.40 22.61 -v 3.80 39.63 20.44 -v 4.97 38.68 19.91 -v 1.86 38.83 22.55 -v 1.56 37.79 23.12 -v 5.08 36.64 20.39 -v 5.59 37.08 19.06 -v 4.94 39.75 16.71 -v 4.92 39.26 18.02 -v 5.85 37.70 17.08 -v 5.89 38.20 15.93 -v 0.84 29.87 23.02 -v -0.00 29.64 23.08 -v 0.00 29.17 22.48 -v -0.00 28.93 21.37 -v -0.00 29.08 20.37 -v -0.00 28.97 19.19 -v 5.06 31.74 21.03 -v 3.76 40.47 18.68 -v -0.00 38.87 22.78 -v 1.33 34.72 23.44 -v 5.28 36.00 20.21 -v 4.40 36.18 21.25 -v 4.48 35.84 21.14 -v -0.00 37.84 23.28 -v 2.39 33.29 23.39 -v 1.36 33.84 23.79 -v 1.63 32.77 24.35 -v 2.56 36.62 22.56 -v 4.19 36.02 21.35 -v 3.56 33.77 22.69 -v 3.37 39.54 11.68 -v -0.00 39.65 10.81 -v 6.54 34.68 14.01 -v 1.15 31.06 23.46 -v 1.39 30.16 23.06 -v 0.18 32.36 24.61 -v 0.15 32.09 24.44 -v -0.00 32.76 24.73 -v -0.00 32.34 24.55 -v -0.00 32.10 24.37 -v 0.81 31.29 23.67 -v 4.73 34.55 21.49 -v 5.24 33.33 21.28 -v 6.91 32.96 15.56 -v 7.07 34.54 16.53 -v 6.04 36.45 16.75 -v 5.76 36.16 18.45 -v -0.00 30.54 23.72 -v 0.85 30.42 23.55 -v 3.73 36.27 21.50 -v 4.11 35.97 21.31 -v 2.30 35.42 22.46 -v 2.29 35.79 22.39 -v 2.37 35.17 22.43 -v 2.58 34.97 22.35 -v 3.08 34.88 22.13 -v 3.42 35.10 21.98 -v 3.55 35.34 21.89 -v 3.46 35.98 21.87 -v 3.56 35.68 21.85 -v 3.04 36.19 22.04 -v 2.61 36.15 22.23 -v 2.97 35.56 22.36 -v 4.73 7.67 10.74 -v 5.94 7.50 9.91 -v 5.76 6.50 7.43 -v 2.55 7.46 7.26 -v 2.39 7.97 7.91 -v 2.76 8.38 7.02 -v 0.00 49.12 -27.78 -v -3.23 28.74 -1.28 -v -3.07 28.57 1.88 -v -2.93 30.52 -14.47 -v -3.49 30.39 -11.43 -v -2.33 19.32 -17.01 -v -1.98 22.94 -18.73 -v -6.09 25.02 -0.72 -v -6.05 25.40 2.15 -v -6.20 18.84 -0.16 -v -5.74 18.55 2.35 -v -6.32 19.78 -7.20 -v -6.65 19.94 -8.17 -v -4.70 16.75 -9.21 -v -4.52 16.56 -7.33 -v -3.15 29.21 6.20 -v -3.46 15.18 3.30 -v -4.18 15.67 0.04 -v -2.28 13.77 0.12 -v -2.04 14.08 2.60 -v -2.38 14.74 -7.70 -v -2.27 15.37 -10.06 -v -5.58 26.84 7.17 -v -4.93 27.37 9.73 -v -2.87 30.20 8.03 -v -5.61 2.21 8.37 -v -5.68 -0.03 9.83 -v -6.68 1.73 10.18 -v -6.14 3.22 9.74 -v -4.02 1.99 7.98 -v -4.08 -0.03 9.37 -v -2.39 2.21 8.56 -v -2.54 -0.03 10.04 -v -1.77 1.73 10.48 -v -2.34 3.22 10.01 -v -2.52 3.27 11.56 -v -2.80 3.64 11.26 -v -3.32 3.62 11.86 -v -4.32 3.96 11.73 -v -5.75 3.64 11.07 -v -5.34 3.62 11.75 -v -4.34 3.73 12.02 -v -6.03 3.27 11.36 -v -7.00 1.16 12.70 -v -6.67 -0.01 12.74 -v -6.62 -0.01 14.46 -v -7.05 1.09 14.30 -v -5.94 -0.01 14.95 -v -4.29 -0.01 12.84 -v -5.34 -0.01 14.87 -v -4.47 -0.01 15.37 -v -3.58 -0.01 14.94 -v -1.67 1.17 12.96 -v -1.87 1.10 14.53 -v -2.27 -0.01 14.65 -v -1.91 -0.01 12.93 -v -2.04 2.51 14.08 -v -2.41 2.98 12.86 -v -3.07 3.33 12.99 -v -2.87 2.89 14.41 -v -4.95 3.61 13.06 -v -5.47 2.54 14.56 -v -4.41 3.41 14.79 -v -4.38 3.90 13.27 -v -6.74 2.51 13.88 -v -6.27 3.03 12.63 -v -5.58 1.24 15.03 -v -4.51 1.34 15.66 -v -3.48 1.25 15.07 -v -2.66 1.19 15.14 -v -3.54 2.56 14.63 -v -2.19 14.25 6.54 -v -1.39 14.12 6.98 -v -2.42 14.98 8.43 -v -1.36 14.78 9.20 -v -2.01 16.83 -13.60 -v -6.29 19.22 -3.91 -v -5.78 25.21 -4.36 -v -3.33 29.17 -4.90 -v -2.39 27.13 -17.55 -v -2.17 29.71 -16.77 -v -1.49 36.84 -24.79 -v -1.27 41.55 -26.64 -v -1.10 48.04 -27.60 -v -1.80 30.62 -19.83 -v -1.73 32.71 -22.16 -v -0.64 48.90 -27.72 -v -2.01 29.49 -17.69 -v -1.57 20.12 14.04 -v -1.88 17.93 12.35 -v -2.56 30.98 9.13 -v -4.46 28.79 10.92 -v -5.94 25.30 11.45 -v -4.93 26.82 12.64 -v -2.56 32.43 9.79 -v -1.36 23.45 15.57 -v -3.19 24.31 14.77 -v -4.13 24.96 14.05 -v -5.00 22.20 12.86 -v -3.17 20.72 13.42 -v -4.39 31.01 11.80 -v -4.26 28.06 14.68 -v -4.76 29.65 13.36 -v -3.28 27.06 15.56 -v -1.41 26.15 16.41 -v -2.36 34.54 22.12 -v -3.17 34.53 21.93 -v -3.24 34.45 22.04 -v -2.28 34.44 22.27 -v -1.85 34.74 22.48 -v -2.01 34.84 22.21 -v -4.11 41.25 16.12 -v -5.14 39.91 15.45 -v -4.10 40.52 17.32 -v -5.51 40.65 14.97 -v -3.82 42.26 16.17 -v -5.78 38.23 15.31 -v -5.93 39.07 13.75 -v -5.77 37.37 13.20 -v -6.53 36.04 14.96 -v -7.55 38.38 15.52 -v -1.95 41.75 16.78 -v -1.91 41.74 17.62 -v -1.50 41.83 17.78 -v -4.44 44.22 17.56 -v -4.87 43.94 17.63 -v -4.27 42.64 18.07 -v -3.39 43.20 17.82 -v -4.55 43.63 16.49 -v -6.28 42.27 15.14 -v -8.27 41.15 15.26 -v -7.97 39.78 15.41 -v -6.38 40.27 13.63 -v -8.05 39.76 15.23 -v -7.04 42.64 14.09 -v -5.86 43.30 14.35 -v -4.81 41.35 13.62 -v -3.78 42.26 15.07 -v -5.09 43.91 15.39 -v -5.51 45.25 17.16 -v -7.48 46.22 17.08 -v -5.70 45.21 17.08 -v -7.08 44.49 15.93 -v -7.79 45.26 16.33 -v -8.24 43.93 15.60 -v -8.30 43.98 15.38 -v -7.82 45.31 16.17 -v -7.57 44.55 15.34 -v -6.80 44.96 15.49 -v -7.45 46.20 16.92 -v -6.20 45.30 16.21 -v -5.19 43.74 17.22 -v -8.33 42.53 15.28 -v -8.40 42.59 15.07 -v -5.08 41.92 17.73 -v -3.26 19.02 11.83 -v -4.39 16.04 -3.75 -v -2.33 13.93 -3.88 -v -2.74 18.21 -13.21 -v -5.80 25.70 -8.38 -v -3.34 30.05 -8.19 -v -2.22 35.87 22.27 -v -2.18 35.91 22.49 -v -2.62 36.32 22.31 -v -2.64 36.24 22.14 -v -1.99 35.24 22.30 -v -1.84 35.19 22.52 -v -4.24 35.17 21.32 -v -4.17 35.17 21.36 -v -4.22 35.77 21.22 -v -4.32 35.81 21.24 -v -3.84 34.78 21.64 -v -3.92 34.73 21.68 -v -3.20 36.48 22.11 -v -3.14 36.37 21.92 -v -3.78 3.59 13.14 -v -6.11 2.84 14.28 -v -5.65 3.37 12.82 -v -6.30 1.18 14.99 -v -2.96 -0.01 15.07 -v -7.48 38.41 15.68 -v -6.27 36.31 15.32 -v -3.13 41.25 17.80 -v -2.31 41.56 17.79 -v -2.03 41.16 19.56 -v -7.09 2.43 -19.06 -v -7.12 0.00 -18.53 -v -7.74 1.96 -17.50 -v -7.57 3.28 -17.72 -v -5.72 2.06 -19.83 -v -5.75 0.00 -19.00 -v -4.40 2.43 -18.89 -v -4.44 0.00 -18.31 -v -3.76 1.96 -17.22 -v -3.89 3.29 -17.47 -v -4.57 3.62 -16.49 -v -4.49 3.30 -16.19 -v -5.96 3.97 -15.94 -v -5.21 3.62 -15.90 -v -5.96 3.72 -15.75 -v -6.70 3.61 -16.01 -v -7.39 3.30 -16.39 -v -7.24 3.61 -16.67 -v -8.75 1.24 -15.02 -v -8.27 0.00 -14.95 -v -8.22 0.00 -12.58 -v -8.64 1.16 -12.80 -v -7.55 0.00 -11.91 -v -5.92 0.00 -14.81 -v -6.95 0.00 -12.02 -v -6.10 0.00 -11.32 -v -5.22 0.00 -11.92 -v -3.53 1.16 -12.48 -v -3.93 0.00 -12.32 -v -3.57 0.00 -14.69 -v -3.19 1.24 -14.66 -v -3.70 3.02 -13.10 -v -4.06 3.53 -14.81 -v -4.71 3.91 -14.62 -v -4.51 3.43 -12.65 -v -6.01 4.53 -14.23 -v -6.57 4.22 -14.52 -v -7.09 3.06 -12.44 -v -6.04 4.00 -12.13 -v -8.34 3.02 -13.38 -v -7.88 3.59 -15.12 -v -7.20 1.32 -11.80 -v -6.14 1.42 -10.92 -v -5.12 1.33 -11.73 -v -4.30 1.26 -11.65 -v -5.18 3.08 -12.34 -v -5.42 4.19 -14.41 -v -7.26 3.95 -14.86 -v -7.72 3.38 -12.82 -v -7.91 1.26 -11.85 -v -4.60 0.00 -11.75 -v -8.35 41.13 15.05 -v -1.05 31.27 23.35 -v -1.91 30.72 22.80 -v -0.44 31.50 23.77 -v -0.99 31.21 23.60 -v -0.18 31.62 23.81 -v -0.76 31.44 23.53 -v -3.97 40.15 13.10 -v -2.70 41.61 14.81 -v -9.35 21.36 -11.82 -v -9.91 16.45 -13.25 -v -7.54 15.35 -9.52 -v -7.34 20.08 -8.75 -v -6.26 25.80 -8.91 -v -7.71 25.97 -11.69 -v -6.48 26.48 -15.68 -v -7.69 23.23 -16.57 -v -4.67 24.17 -19.26 -v -4.29 27.08 -17.03 -v -5.40 13.46 -20.27 -v -8.49 11.41 -19.26 -v -8.29 14.42 -17.91 -v -5.10 15.57 -19.07 -v -4.95 19.86 -19.38 -v -8.44 18.60 -17.05 -v -5.76 28.94 -11.95 -v -4.86 29.06 -14.93 -v -8.39 10.36 -17.19 -v -8.15 9.26 -19.79 -v -8.25 8.95 -17.63 -v -5.39 12.45 -21.46 -v -5.37 9.04 -22.20 -v -7.55 6.57 -19.63 -v -7.74 6.66 -17.92 -v -5.46 6.28 -20.75 -v -9.55 12.52 -15.65 -v -3.21 10.61 -16.85 -v -3.35 9.18 -17.26 -v -3.15 9.53 -19.54 -v -2.99 11.59 -19.22 -v -3.95 6.80 -17.69 -v -6.07 8.71 -15.66 -v -5.84 6.61 -16.49 -v -3.89 6.53 -19.21 -v -6.24 9.51 -15.18 -v -3.41 12.28 -13.94 -v -6.94 10.91 -13.09 -v -3.04 13.84 -15.32 -v -3.10 15.11 -17.16 -v -6.80 11.45 5.31 -v -7.01 13.17 4.27 -v -5.44 13.30 3.26 -v -5.08 11.25 4.62 -v -3.96 13.36 4.06 -v -3.68 11.50 5.38 -v -2.61 12.50 6.46 -v -3.54 12.74 10.35 -v -5.71 12.69 10.92 -v -5.44 11.32 10.79 -v -7.21 12.61 9.49 -v -6.74 10.48 9.44 -v -7.56 15.56 3.62 -v -5.54 15.58 2.66 -v -3.35 15.84 10.75 -v -5.70 16.04 11.42 -v -7.55 16.04 10.26 -v -7.92 12.48 7.83 -v -8.73 15.76 7.84 -v -7.64 18.53 3.16 -v -7.08 21.58 3.09 -v -6.65 24.64 10.45 -v -7.22 23.54 7.80 -v -7.48 10.15 8.22 -v -6.51 9.30 6.16 -v -4.96 9.40 5.37 -v -6.52 9.31 6.17 -v -4.14 3.11 7.38 -v -2.67 3.40 8.13 -v -2.39 4.06 8.96 -v -2.88 4.43 10.82 -v -8.62 19.59 7.86 -v -5.89 19.76 11.97 -v -7.55 19.80 10.61 -v -4.84 8.62 10.62 -v -2.97 8.56 10.21 -v -3.02 9.48 10.01 -v -4.95 9.57 10.50 -v -6.17 8.46 9.79 -v -6.32 9.42 9.66 -v -6.98 9.13 8.55 -v -6.79 8.23 8.68 -v -4.50 8.16 6.43 -v -4.41 7.23 6.64 -v -5.96 7.46 7.26 -v -6.08 8.40 7.10 -v -6.51 7.32 8.81 -v -3.52 10.12 5.88 -v -2.46 8.83 7.68 -v -4.31 6.29 6.86 -v -2.69 6.46 7.45 -v -2.48 7.01 8.20 -v -3.10 7.52 10.42 -v -4.48 4.59 11.31 -v -5.68 4.40 10.51 -v -6.11 4.22 9.23 -v -5.55 3.27 7.82 -v -2.19 28.58 17.74 -v -1.97 27.54 16.97 -v -4.34 29.37 17.58 -v -4.13 28.54 16.42 -v -5.84 30.72 18.56 -v -6.10 31.05 16.90 -v -5.44 30.14 15.70 -v -3.01 33.84 10.45 -v -5.78 31.44 14.37 -v -5.46 32.87 12.29 -v -5.71 35.59 12.81 -v -3.31 36.61 10.82 -v -0.93 34.94 23.68 -v -1.00 34.24 24.10 -v -1.16 33.35 24.54 -v -0.17 32.79 24.76 -v -1.13 33.50 24.60 -v -1.88 32.27 24.20 -v -1.63 31.75 24.03 -v -0.92 32.04 24.48 -v -1.06 32.47 24.68 -v -1.35 31.33 23.89 -v -0.74 31.73 24.22 -v -1.30 34.03 23.96 -v -3.21 30.53 21.75 -v -2.75 31.57 23.20 -v -3.96 31.60 22.04 -v -4.22 29.82 19.06 -v -6.42 33.99 19.85 -v -7.09 34.21 18.13 -v -6.88 32.41 18.06 -v -6.16 32.01 19.66 -v -1.13 36.42 23.17 -v -0.94 35.60 23.36 -v -0.40 31.42 23.92 -v -3.03 32.48 23.28 -v -4.15 32.81 22.39 -v -1.82 36.12 22.82 -v -1.44 35.34 23.07 -v -2.07 40.06 21.08 -v -4.07 36.54 21.59 -v -3.89 36.36 21.63 -v -3.25 36.70 22.15 -v -3.56 37.05 22.01 -v -2.94 40.68 12.68 -v -1.34 29.48 22.43 -v -1.89 29.97 22.46 -v -2.55 29.83 21.48 -v -1.78 29.30 21.35 -v -5.17 30.55 19.50 -v -3.37 29.88 20.50 -v -4.32 30.50 20.82 -v -2.28 29.22 19.09 -v -2.10 29.36 20.32 -v -2.83 37.42 22.60 -v -3.36 38.39 21.85 -v -4.65 37.77 21.15 -v -3.79 39.63 20.44 -v -4.96 38.68 19.91 -v -1.86 38.83 22.55 -v -1.57 37.79 23.12 -v -5.57 37.08 19.06 -v -5.09 36.65 20.37 -v -4.94 39.76 16.71 -v -5.87 38.17 15.92 -v -5.83 37.68 17.08 -v -4.92 39.25 18.02 -v -0.84 29.87 23.02 -v -5.06 31.74 21.03 -v -3.72 40.46 18.75 -v -1.34 34.71 23.44 -v -5.29 36.00 20.18 -v -4.55 35.85 21.09 -v -4.47 36.19 21.20 -v -2.41 33.28 23.39 -v -1.63 32.77 24.35 -v -1.37 33.83 23.79 -v -2.62 36.63 22.54 -v -4.26 36.03 21.29 -v -3.60 33.75 22.67 -v -3.34 39.51 11.62 -v -6.49 34.69 14.03 -v -1.15 31.06 23.46 -v -1.39 30.16 23.06 -v -0.18 32.36 24.61 -v -0.15 32.09 24.44 -v -0.81 31.29 23.67 -v -4.78 34.53 21.45 -v -5.25 33.32 21.27 -v -6.91 32.96 15.56 -v -7.07 34.54 16.53 -v -6.06 36.46 16.74 -v -5.78 36.16 18.45 -v -0.85 30.42 23.55 -v -3.80 36.28 21.45 -v -4.18 35.98 21.26 -v -2.36 35.40 22.43 -v -2.35 35.78 22.36 -v -2.43 35.15 22.39 -v -2.64 34.95 22.32 -v -3.14 34.86 22.10 -v -3.48 35.09 21.94 -v -3.62 35.34 21.85 -v -3.62 35.68 21.80 -v -3.53 35.99 21.82 -v -3.11 36.20 22.00 -v -2.68 36.15 22.20 -v -3.03 35.56 22.32 -v -4.73 7.67 10.74 -v -5.94 7.50 9.91 -v -5.76 6.50 7.43 -v -2.55 7.46 7.26 -v -2.39 7.97 7.91 -v -2.76 8.38 7.02 -v 6.85 37.87 15.86 -v 7.57 39.02 15.60 -v 6.61 39.54 15.81 -v 6.25 40.55 15.97 -v 5.65 41.65 16.34 -v 5.11 42.24 16.66 -v 8.70 40.27 15.35 -v 7.52 41.07 15.29 -v 8.25 42.23 15.29 -v 6.63 42.67 15.79 -v 6.24 43.68 16.20 -v 4.53 42.44 16.97 -v 3.63 40.71 17.31 -v 4.99 43.52 16.35 -v 8.25 38.26 15.78 -v 6.14 36.94 15.33 -v -6.26 40.55 15.97 -v -6.62 39.52 15.80 -v -7.58 39.01 15.59 -v -6.85 37.85 15.85 -v -5.11 42.25 16.66 -v -5.66 41.66 16.34 -v -8.70 40.28 15.34 -v -7.53 41.09 15.28 -v -6.63 42.68 15.79 -v -8.25 42.24 15.29 -v -6.24 43.69 16.20 -v -3.61 40.71 17.32 -v -4.53 42.45 16.97 -v -5.00 43.53 16.35 -v -8.25 38.27 15.78 -v -6.16 36.93 15.32 -# 1013 vertices - -vn -0.00 0.99 0.14 -vn -0.00 1.00 0.00 -vn 0.61 0.79 -0.04 -vn 0.65 0.76 0.07 -vn 0.49 0.82 -0.29 -vn 0.00 0.99 -0.17 -vn 0.00 1.00 0.02 -vn 0.56 0.82 0.10 -vn -0.00 -0.08 -1.00 -vn -0.08 -0.02 -1.00 -vn -0.34 -0.51 -0.79 -vn -0.00 -0.63 -0.78 -vn 0.94 0.33 -0.02 -vn 0.90 0.42 -0.11 -vn 0.96 -0.27 0.06 -vn 0.80 -0.25 -0.55 -vn 0.97 -0.22 0.10 -vn 0.77 -0.64 -0.03 -vn 0.31 -0.83 0.46 -vn 0.77 -0.12 0.62 -vn -0.00 0.97 -0.26 -vn 0.60 0.77 -0.22 -vn 0.28 -0.83 -0.48 -vn 0.78 -0.62 0.03 -vn 0.50 -0.86 0.04 -vn 0.45 -0.89 0.10 -vn 0.47 -0.86 -0.18 -vn 0.41 -0.85 -0.32 -vn 0.82 0.57 -0.03 -vn 0.65 0.71 -0.27 -vn 0.86 0.51 -0.01 -vn 0.65 -0.32 -0.69 -vn 0.98 0.17 -0.11 -vn 0.95 -0.02 -0.30 -vn 0.44 -0.79 -0.42 -vn -0.04 -0.84 -0.53 -vn -0.08 -0.49 -0.87 -vn -0.52 -0.78 -0.35 -vn -0.76 -0.19 -0.62 -vn -0.99 0.03 -0.16 -vn -0.95 0.30 0.02 -vn -0.75 0.64 0.15 -vn -0.67 0.63 0.40 -vn -0.33 0.91 0.24 -vn 0.36 0.91 0.18 -vn 0.70 0.63 0.35 -vn 0.04 0.73 0.69 -vn 0.02 0.96 0.30 -vn 0.77 0.63 0.07 -vn 1.00 -0.00 -0.09 -vn 0.93 -0.01 0.37 -vn 0.60 -0.72 0.35 -vn 0.63 -0.78 -0.06 -vn 0.14 -0.67 0.73 -vn 0.14 -0.82 0.55 -vn 0.00 -1.00 0.00 -vn 0.01 -0.69 0.72 -vn -0.08 -0.82 0.57 -vn -1.00 0.03 0.03 -vn -0.66 -0.75 0.02 -vn -0.56 -0.71 0.42 -vn -0.87 -0.01 0.49 -vn -0.78 0.53 0.34 -vn -0.73 0.68 0.07 -vn -0.43 0.89 0.17 -vn -0.25 0.73 0.63 -vn 0.39 0.91 0.14 -vn 0.00 0.99 0.12 -vn -0.02 0.76 0.65 -vn 0.35 0.54 0.77 -vn 0.82 0.52 0.25 -vn 0.74 0.68 0.01 -vn 0.30 0.11 0.95 -vn 0.02 0.09 1.00 -vn -0.21 0.11 0.97 -vn -0.31 0.12 0.94 -vn -0.29 0.53 0.80 -vn -0.41 -0.91 0.06 -vn 0.27 -0.94 0.19 -vn 0.15 -0.89 0.43 -vn 0.33 -0.81 0.49 -vn 0.54 -0.71 -0.46 -vn 0.00 -0.87 -0.50 -vn 0.97 -0.24 -0.02 -vn 0.94 0.33 0.01 -vn 0.70 0.70 0.14 -vn -0.00 0.98 0.21 -vn -0.00 -0.07 -1.00 -vn 0.22 0.35 -0.91 -vn 0.00 -0.93 -0.36 -vn -0.00 0.99 -0.12 -vn 0.77 0.53 -0.35 -vn 1.00 0.02 -0.04 -vn 1.00 0.03 -0.03 -vn 0.00 0.28 0.96 -vn 0.00 0.51 0.86 -vn 0.97 0.23 0.00 -vn 0.00 -0.23 -0.97 -vn -0.00 0.11 -0.99 -vn 0.00 -0.42 -0.91 -vn 0.00 -0.61 -0.79 -vn 1.00 0.00 -0.05 -vn 1.00 0.03 -0.05 -vn 0.00 -0.77 -0.64 -vn -0.00 0.68 0.74 -vn -0.01 0.90 0.43 -vn 0.00 0.36 0.93 -vn 0.73 0.68 -0.05 -vn -0.00 0.77 0.64 -vn -0.00 0.61 -0.80 -vn 0.92 0.22 -0.32 -vn -0.00 -0.51 0.86 -vn -0.00 -0.68 0.73 -vn 0.44 -0.60 0.67 -vn 0.37 -0.47 0.80 -vn 0.67 0.52 -0.52 -vn 0.92 0.31 -0.22 -vn -0.00 0.75 -0.66 -vn -0.00 0.89 -0.46 -vn 0.86 0.28 0.42 -vn 0.94 0.13 0.31 -vn -0.00 0.46 -0.89 -vn 0.54 0.26 -0.80 -vn 0.35 -0.31 0.88 -vn 0.00 -0.34 0.94 -vn 0.57 -0.23 0.79 -vn 0.43 -0.43 0.80 -vn 0.65 -0.10 0.75 -vn 0.76 -0.09 0.65 -vn 0.85 -0.06 -0.53 -vn 0.97 -0.18 -0.15 -vn 0.90 -0.33 0.29 -vn 0.65 -0.42 0.63 -vn 0.33 -0.37 0.87 -vn 0.34 0.72 0.61 -vn 0.48 0.61 0.63 -vn 0.03 0.84 0.55 -vn 0.04 0.85 0.53 -vn 0.79 0.23 0.57 -vn 0.76 0.30 0.58 -vn 0.84 0.28 0.46 -vn 0.97 0.12 -0.19 -vn 0.68 0.22 0.70 -vn 0.29 0.04 0.96 -vn 0.93 -0.27 0.23 -vn -0.13 0.06 0.99 -vn 0.55 -0.05 -0.83 -vn 0.92 -0.39 -0.07 -vn 0.99 0.12 -0.04 -vn 0.81 0.20 -0.56 -vn -0.21 0.97 -0.11 -vn 0.17 0.97 0.15 -vn -0.07 0.95 0.31 -vn -0.50 0.70 0.50 -vn -0.56 0.64 0.53 -vn 0.18 0.03 0.98 -vn 0.43 0.09 0.90 -vn 0.15 -0.24 0.96 -vn 0.84 -0.52 0.16 -vn -0.10 0.04 0.99 -vn -0.11 0.19 0.98 -vn 0.38 -0.08 -0.92 -vn 0.93 -0.31 -0.20 -vn 0.30 0.25 -0.92 -vn -0.16 0.43 -0.89 -vn -0.21 0.50 -0.84 -vn -0.56 0.64 -0.52 -vn -0.49 0.67 -0.55 -vn -0.32 0.78 0.54 -vn 0.36 -0.26 0.89 -vn 0.12 0.99 -0.05 -vn 0.28 -0.58 0.77 -vn 0.47 -0.61 0.64 -vn 0.20 -0.48 0.85 -vn 0.12 -0.55 0.83 -vn 0.03 -0.35 0.94 -vn 0.88 0.32 -0.35 -vn 0.30 0.56 -0.77 -vn 0.78 0.54 -0.31 -vn -0.07 0.68 -0.73 -vn -0.42 0.77 -0.47 -vn 0.19 0.93 -0.32 -vn 0.71 -0.10 0.70 -vn -0.05 -0.13 0.99 -vn 0.95 0.06 -0.32 -vn 0.70 -0.26 -0.66 -vn 0.75 -0.25 -0.61 -vn 0.24 -0.51 0.82 -vn 0.78 -0.62 -0.05 -vn 0.51 -0.85 -0.10 -vn 0.00 -1.00 0.04 -vn 0.00 -1.00 0.09 -vn 0.00 -0.97 -0.25 -vn 0.00 -0.97 0.23 -vn -0.00 -0.82 0.57 -vn -0.11 -0.94 -0.33 -vn 0.00 -0.99 -0.12 -vn 0.85 0.39 0.35 -vn 0.68 0.72 0.14 -vn 0.83 -0.50 0.25 -vn 0.52 -0.75 0.41 -vn 0.56 -0.73 0.40 -vn 0.83 -0.49 0.26 -vn 0.84 -0.16 0.51 -vn 0.85 -0.22 0.48 -vn 0.43 0.22 0.88 -vn -0.12 -0.11 0.99 -vn -0.16 -0.00 0.99 -vn 0.44 0.29 0.85 -vn 0.04 0.65 0.76 -vn 0.02 0.67 0.75 -vn 0.26 -0.87 0.42 -vn 0.28 -0.86 0.43 -vn -0.38 0.91 0.18 -vn 0.43 0.89 0.13 -vn 0.35 0.71 0.61 -vn 0.39 0.12 0.91 -vn -0.10 -0.68 0.73 -vn -0.20 -0.05 0.98 -vn -0.17 0.11 0.98 -vn 0.34 -0.17 0.93 -vn 0.37 0.39 0.84 -vn 0.72 0.46 0.52 -vn 0.29 0.86 0.42 -vn 0.08 0.66 0.74 -vn 0.76 -0.13 -0.64 -vn 0.95 0.07 -0.32 -vn 0.54 -0.69 -0.48 -vn -0.05 -0.76 -0.64 -vn -0.05 -0.25 -0.97 -vn -0.57 -0.71 -0.41 -vn -0.80 -0.15 -0.58 -vn -0.98 0.05 -0.21 -vn -0.99 0.05 0.11 -vn -0.70 0.71 0.07 -vn -0.68 0.41 0.62 -vn -0.33 0.94 0.08 -vn 0.07 0.47 0.88 -vn 0.00 0.99 0.16 -vn 0.34 0.94 0.02 -vn 0.79 0.41 0.45 -vn 0.74 0.67 -0.09 -vn 0.99 -0.03 -0.16 -vn 0.94 -0.02 0.33 -vn 0.61 -0.73 0.30 -vn 0.60 -0.80 -0.09 -vn 0.17 -0.66 0.73 -vn 0.16 -0.85 0.49 -vn -0.09 -0.85 0.51 -vn -0.90 -0.02 0.43 -vn -1.00 -0.01 -0.05 -vn -0.64 -0.77 -0.03 -vn -0.59 -0.73 0.36 -vn -0.80 0.51 0.31 -vn -0.70 0.70 -0.12 -vn -0.28 0.76 0.59 -vn -0.41 0.91 -0.09 -vn -0.01 1.00 0.01 -vn -0.03 0.81 0.59 -vn 0.46 0.58 0.68 -vn 0.39 0.92 -0.06 -vn 0.84 0.50 0.22 -vn 0.69 0.70 -0.20 -vn 0.39 0.09 0.92 -vn 0.02 0.07 1.00 -vn -0.27 0.10 0.96 -vn -0.37 0.11 0.92 -vn -0.37 0.57 0.74 -vn -0.37 0.93 -0.04 -vn 0.37 0.92 -0.09 -vn 0.32 0.78 0.54 -vn 0.47 0.11 0.88 -vn -0.13 -0.67 0.73 -vn 0.95 -0.12 -0.30 -vn 0.96 0.14 0.25 -vn 0.81 -0.37 0.46 -vn 0.92 0.15 0.37 -vn 0.89 -0.20 0.42 -vn 0.96 0.09 0.27 -vn 0.94 -0.03 0.34 -vn 0.94 -0.11 0.33 -vn 0.17 0.83 -0.53 -vn 0.40 -0.78 -0.48 -vn 0.00 -0.41 -0.91 -vn -0.21 -0.86 0.46 -vn -0.35 -0.80 0.49 -vn 0.00 -0.85 0.53 -vn -0.00 0.87 -0.50 -vn 0.07 0.87 -0.49 -vn 0.08 0.86 -0.51 -vn 0.39 0.56 -0.73 -vn -0.06 0.92 -0.38 -vn 0.97 0.17 0.19 -vn 0.74 0.03 0.67 -vn 0.42 -0.42 0.81 -vn 0.99 -0.05 0.13 -vn 0.71 0.41 0.58 -vn 0.89 0.44 0.14 -vn 0.83 0.28 -0.49 -vn 0.75 0.50 -0.43 -vn 0.25 0.29 -0.92 -vn 0.38 0.60 -0.70 -vn -0.04 0.60 -0.80 -vn -0.21 0.19 -0.96 -vn 0.76 0.15 -0.64 -vn 0.90 0.14 -0.42 -vn 0.81 0.16 -0.56 -vn 0.02 -0.04 -1.00 -vn 0.58 0.69 -0.44 -vn 0.70 0.69 0.16 -vn 0.93 -0.31 0.18 -vn 0.92 -0.22 0.32 -vn 0.88 -0.10 -0.47 -vn -0.09 -0.11 -0.99 -vn -0.05 0.50 -0.86 -vn 0.83 -0.21 -0.52 -vn 0.93 -0.12 0.34 -vn -0.14 -0.34 -0.93 -vn 0.95 -0.30 -0.03 -vn -0.90 -0.29 0.33 -vn -0.92 0.13 -0.37 -vn -0.94 -0.13 -0.33 -vn -0.85 -0.25 0.47 -vn -0.87 -0.12 0.48 -vn 0.02 -0.06 1.00 -vn 0.06 -0.42 0.91 -vn -0.92 -0.19 -0.35 -vn 0.08 -0.74 0.67 -vn 0.21 -0.74 0.64 -vn -0.77 -0.45 0.45 -vn -0.99 -0.09 0.06 -vn -0.92 0.02 -0.39 -vn 0.71 -0.39 -0.58 -vn -0.07 -0.47 -0.88 -vn 0.00 -0.40 -0.92 -vn 0.72 -0.38 -0.58 -vn -0.65 -0.28 -0.70 -vn -0.61 -0.37 -0.70 -vn -0.97 -0.13 -0.22 -vn -0.70 -0.06 0.71 -vn 0.22 -0.17 0.96 -vn 0.25 -0.16 0.95 -vn 0.80 -0.18 0.57 -vn 0.73 -0.19 0.66 -vn 0.06 -0.20 -0.98 -vn 0.76 -0.20 -0.62 -vn -0.66 -0.23 0.72 -vn 0.17 -0.18 0.97 -vn 0.75 -0.13 0.65 -vn 0.98 -0.21 0.04 -vn 0.99 -0.13 0.09 -vn 0.84 0.13 -0.53 -vn 0.76 0.01 -0.65 -vn 0.89 0.36 0.26 -vn 0.93 0.36 -0.03 -vn 0.95 -0.29 0.11 -vn 0.67 -0.51 -0.54 -vn 0.39 -0.61 -0.69 -vn -0.04 -0.50 -0.87 -vn -0.77 -0.14 -0.62 -vn -0.08 -0.32 -0.94 -vn -1.00 0.00 -0.05 -vn -0.76 0.28 0.59 -vn 0.99 0.15 0.06 -vn 0.45 -0.15 0.88 -vn 0.81 0.05 0.58 -vn 0.17 0.11 0.98 -vn 0.15 -0.03 0.99 -vn -0.75 0.11 0.66 -vn -0.71 0.12 0.69 -vn 0.71 -0.05 0.70 -vn 0.69 -0.07 0.72 -vn 0.94 -0.31 0.16 -vn 0.97 -0.23 0.06 -vn -0.03 -0.42 -0.91 -vn 0.69 -0.48 -0.54 -vn 0.70 -0.25 -0.67 -vn 0.03 -0.23 -0.97 -vn 0.98 -0.21 0.06 -vn -0.58 -0.25 -0.77 -vn -1.00 0.03 -0.08 -vn -0.75 -0.15 -0.65 -vn 0.01 -0.19 -0.98 -vn -1.00 -0.03 0.04 -vn -0.67 0.12 0.73 -vn 0.18 0.34 0.92 -vn 0.80 0.23 0.55 -vn 1.00 -0.03 -0.04 -vn 0.68 -0.23 -0.70 -vn 0.28 -0.77 0.57 -vn 0.00 -0.74 0.68 -vn 0.00 -0.49 0.87 -vn 0.35 -0.56 0.75 -vn 0.66 -0.65 0.39 -vn 0.54 -0.79 0.29 -vn 0.85 -0.52 -0.02 -vn 0.83 -0.56 -0.05 -vn 0.74 -0.65 0.19 -vn 0.00 0.23 -0.97 -vn 0.48 0.15 -0.86 -vn 0.80 -0.15 -0.58 -vn 0.89 -0.36 -0.28 -vn 0.79 0.09 -0.60 -vn 0.47 0.16 -0.87 -vn 0.00 0.22 -0.98 -vn 0.48 0.43 0.77 -vn -0.00 0.48 0.88 -vn 0.00 0.61 0.79 -vn 0.50 0.52 0.69 -vn 0.65 0.14 0.75 -vn 0.00 0.15 0.99 -vn -0.00 -0.52 0.85 -vn 0.59 0.10 0.80 -vn 0.12 -0.29 0.95 -vn 0.58 -0.20 0.79 -vn 0.25 -0.18 0.95 -vn 0.41 -0.51 0.76 -vn -0.10 -0.71 0.69 -vn 0.18 -0.70 0.69 -vn 0.84 0.30 0.46 -vn 0.52 -0.61 0.60 -vn 0.63 -0.44 0.64 -vn 0.53 -0.47 0.71 -vn 0.47 -0.51 0.72 -vn 0.00 0.98 0.20 -vn 0.00 0.87 0.50 -vn 0.42 -0.86 0.28 -vn 0.86 0.11 0.50 -vn 0.83 -0.34 0.45 -vn 0.95 -0.30 0.13 -vn -0.00 0.16 0.99 -vn -0.00 0.35 0.94 -vn 0.42 0.25 0.87 -vn 0.32 0.05 0.95 -vn -0.00 0.25 0.97 -vn 0.38 0.31 0.87 -vn 0.27 0.68 0.68 -vn -0.00 0.66 0.75 -vn 0.67 -0.07 0.74 -vn 0.60 -0.04 0.80 -vn 0.51 -0.10 0.85 -vn 0.70 0.08 0.71 -vn 0.30 0.74 0.61 -vn 0.00 0.76 0.65 -vn 0.50 -0.23 0.84 -vn 0.49 -0.32 0.81 -vn 0.57 -0.18 0.80 -vn 0.58 -0.01 0.81 -vn -0.26 -0.76 0.59 -vn -0.16 -0.83 0.54 -vn 0.36 0.80 -0.48 -vn 0.01 0.84 -0.54 -vn 0.00 0.98 -0.18 -vn 0.36 -0.80 0.48 -vn 0.33 -0.93 0.17 -vn 0.51 -0.75 0.42 -vn 0.57 -0.53 0.62 -vn 0.62 -0.70 0.36 -vn 0.57 -0.66 0.48 -vn 0.41 -0.87 0.26 -vn 0.23 -0.93 0.28 -vn 0.25 -0.96 0.08 -vn 0.00 0.55 0.83 -vn 0.75 0.21 0.63 -vn 0.54 0.43 0.73 -vn 0.52 0.06 0.85 -vn 0.55 0.66 0.51 -vn 0.84 0.44 0.32 -vn 0.31 0.56 0.77 -vn 0.26 0.19 0.95 -vn 0.86 0.07 0.50 -vn 0.95 0.16 0.25 -vn 0.82 0.55 0.19 -vn 0.84 0.50 0.19 -vn 0.95 0.26 0.17 -vn 0.95 0.31 0.03 -vn 0.23 -0.68 0.70 -vn -0.00 -0.70 0.71 -vn -0.00 -0.90 0.44 -vn -0.00 -1.00 0.04 -vn -0.00 -1.00 -0.01 -vn 0.00 -0.96 0.30 -vn 0.72 -0.37 0.59 -vn 0.63 0.73 0.28 -vn 0.86 0.49 0.13 -vn 0.94 0.31 -0.16 -vn 0.00 0.57 0.82 -vn 0.77 0.29 0.57 -vn 0.83 0.23 0.51 -vn 0.67 -0.10 0.74 -vn 0.64 0.08 0.76 -vn 0.50 0.45 0.74 -vn 0.79 0.39 0.48 -vn 0.61 0.14 0.78 -vn 0.77 0.33 0.55 -vn 0.50 -0.31 0.81 -vn 0.54 -0.04 0.84 -vn 0.51 -0.15 0.85 -vn 0.59 -0.46 0.67 -vn 0.43 -0.27 0.86 -vn 0.42 0.43 0.80 -vn 0.14 0.69 0.72 -vn 0.42 0.64 0.64 -vn 0.47 0.49 -0.74 -vn 0.01 0.54 -0.84 -vn 0.95 -0.01 -0.32 -vn 0.62 0.13 0.77 -vn 0.56 -0.40 0.72 -vn -0.15 -0.42 0.90 -vn -0.23 -0.66 0.72 -vn -0.30 -0.78 0.55 -vn -0.04 -0.71 0.70 -vn -0.25 -0.45 0.86 -vn -0.32 -0.71 0.62 -vn 0.60 0.31 0.74 -vn 0.56 0.64 0.53 -vn 0.79 -0.15 0.60 -vn 0.62 -0.28 0.74 -vn 0.29 0.58 0.76 -vn 0.58 0.32 0.75 -vn 0.74 -0.00 0.67 -vn 0.24 0.32 0.92 -vn 0.95 -0.23 -0.23 -vn 0.98 0.19 -0.04 -vn 0.95 0.30 0.14 -vn 0.92 0.30 0.23 -vn -0.00 -0.44 0.90 -vn 0.36 -0.41 0.84 -vn 0.67 0.57 0.48 -vn -0.14 -0.87 0.47 -vn -0.04 -0.88 0.47 -vn -0.05 -0.48 0.87 -vn -0.14 -0.48 0.87 -vn -0.12 0.02 0.99 -vn -0.18 0.29 0.94 -vn -0.34 0.36 0.87 -vn -0.29 -0.10 0.95 -vn -0.15 -0.33 0.93 -vn -0.02 -0.23 0.97 -vn 0.17 -0.36 0.92 -vn 0.07 -0.45 0.89 -vn 0.41 -0.33 0.85 -vn 0.37 -0.37 0.85 -vn 0.55 -0.16 0.82 -vn 0.59 -0.11 0.80 -vn 0.67 0.06 0.74 -vn 0.64 0.03 0.77 -vn 0.63 0.12 0.76 -vn 0.41 -0.07 0.91 -vn 0.62 0.26 0.74 -vn 0.59 0.30 0.75 -vn 0.66 0.14 0.74 -vn 0.45 0.33 0.83 -vn 0.50 0.27 0.82 -vn 0.14 0.44 0.89 -vn 0.06 0.54 0.84 -vn 0.19 0.14 0.97 -vn 0.74 -0.02 0.67 -vn 0.70 -0.21 -0.69 -vn -0.78 -0.13 -0.62 -vn -1.00 0.02 -0.03 -vn -0.70 -0.14 -0.70 -vn -0.65 0.76 0.07 -vn -0.61 0.79 -0.04 -vn -0.49 0.82 -0.29 -vn -0.56 0.82 0.10 -vn 0.34 -0.51 -0.79 -vn 0.08 -0.02 -1.00 -vn -0.94 0.33 -0.02 -vn -0.90 0.42 -0.11 -vn -0.96 -0.27 0.06 -vn -0.80 -0.26 -0.55 -vn -0.97 -0.22 0.10 -vn -0.77 -0.12 0.62 -vn -0.31 -0.83 0.46 -vn -0.77 -0.64 -0.03 -vn -0.60 0.77 -0.22 -vn -0.28 -0.83 -0.48 -vn -0.78 -0.62 0.03 -vn -0.50 -0.86 0.04 -vn -0.45 -0.89 0.10 -vn -0.47 -0.86 -0.18 -vn -0.41 -0.85 -0.32 -vn -0.82 0.57 -0.03 -vn -0.86 0.51 -0.01 -vn -0.65 0.71 -0.27 -vn -0.65 -0.32 -0.69 -vn -0.44 -0.79 -0.42 -vn -0.95 -0.02 -0.30 -vn -0.98 0.17 -0.11 -vn 0.08 -0.49 -0.87 -vn 0.04 -0.84 -0.53 -vn 0.76 -0.19 -0.62 -vn 0.52 -0.78 -0.35 -vn 0.99 0.03 -0.16 -vn 0.95 0.30 0.02 -vn 0.75 0.64 0.15 -vn 0.67 0.63 0.40 -vn 0.33 0.91 0.24 -vn -0.04 0.73 0.69 -vn -0.70 0.63 0.35 -vn -0.36 0.91 0.18 -vn -0.02 0.96 0.30 -vn -0.77 0.63 0.07 -vn -1.00 -0.00 -0.09 -vn -0.63 -0.78 -0.06 -vn -0.60 -0.72 0.35 -vn -0.93 -0.01 0.37 -vn -0.14 -0.67 0.73 -vn -0.00 -1.00 0.00 -vn -0.14 -0.82 0.55 -vn -0.01 -0.69 0.72 -vn 0.08 -0.82 0.57 -vn 1.00 0.03 0.03 -vn 0.87 -0.01 0.49 -vn 0.56 -0.71 0.42 -vn 0.66 -0.75 0.02 -vn 0.78 0.53 0.34 -vn 0.73 0.68 0.07 -vn 0.43 0.89 0.17 -vn 0.25 0.73 0.63 -vn -0.39 0.91 0.14 -vn -0.35 0.54 0.77 -vn 0.02 0.76 0.65 -vn -0.00 0.99 0.12 -vn -0.82 0.52 0.25 -vn -0.74 0.68 0.01 -vn -0.30 0.11 0.95 -vn -0.02 0.09 1.00 -vn 0.21 0.11 0.97 -vn 0.31 0.12 0.94 -vn 0.29 0.53 0.80 -vn 0.41 -0.91 0.06 -vn -0.27 -0.94 0.19 -vn -0.15 -0.89 0.43 -vn -0.33 -0.81 0.49 -vn -0.54 -0.71 -0.46 -vn -0.97 -0.24 -0.02 -vn -0.94 0.33 0.01 -vn -0.70 0.70 0.14 -vn -0.21 0.35 -0.91 -vn -0.76 0.53 -0.36 -vn -1.00 0.02 -0.05 -vn -1.00 0.03 -0.03 -vn -0.97 0.23 0.00 -vn -1.00 -0.01 -0.06 -vn -0.73 0.68 -0.05 -vn -0.92 0.22 -0.33 -vn -0.37 -0.47 0.80 -vn -0.44 -0.60 0.67 -vn -0.67 0.52 -0.52 -vn -0.92 0.31 -0.22 -vn -0.87 0.28 0.41 -vn -0.94 0.13 0.31 -vn -0.54 0.26 -0.80 -vn -0.35 -0.31 0.88 -vn -0.57 -0.23 0.79 -vn -0.76 -0.09 0.65 -vn -0.66 -0.10 0.75 -vn -0.43 -0.43 0.79 -vn -0.85 -0.06 -0.53 -vn -0.90 -0.33 0.29 -vn -0.97 -0.18 -0.15 -vn -0.65 -0.42 0.63 -vn -0.33 -0.37 0.87 -vn -0.33 0.72 0.61 -vn -0.04 0.85 0.53 -vn -0.03 0.84 0.55 -vn -0.48 0.61 0.63 -vn -0.79 0.22 0.58 -vn -0.84 0.28 0.46 -vn -0.69 0.22 0.69 -vn -0.98 0.12 -0.16 -vn -0.29 0.04 0.96 -vn -0.93 -0.27 0.24 -vn 0.14 0.05 0.99 -vn -0.57 -0.07 -0.82 -vn -0.79 0.15 -0.60 -vn -0.99 0.10 -0.07 -vn -0.92 -0.38 -0.07 -vn 0.22 0.97 -0.11 -vn 0.07 0.95 0.31 -vn -0.17 0.97 0.15 -vn 0.51 0.70 0.50 -vn -0.43 0.09 0.90 -vn -0.16 0.05 0.99 -vn -0.83 -0.53 0.17 -vn -0.15 -0.24 0.96 -vn 0.10 0.04 0.99 -vn 0.11 0.18 0.98 -vn -0.41 -0.08 -0.91 -vn -0.93 -0.30 -0.20 -vn -0.32 0.26 -0.91 -vn 0.20 0.53 -0.82 -vn 0.17 0.43 -0.88 -vn 0.51 0.68 -0.53 -vn 0.56 0.64 -0.52 -vn -0.12 0.99 -0.05 -vn -0.36 -0.26 0.89 -vn -0.20 -0.48 0.85 -vn -0.47 -0.61 0.64 -vn -0.28 -0.58 0.77 -vn -0.12 -0.55 0.83 -vn -0.03 -0.35 0.94 -vn -0.88 0.32 -0.35 -vn -0.78 0.54 -0.31 -vn -0.30 0.56 -0.77 -vn 0.07 0.68 -0.73 -vn -0.19 0.93 -0.32 -vn 0.42 0.77 -0.47 -vn -0.71 -0.09 0.70 -vn 0.05 -0.13 0.99 -vn -0.95 0.06 -0.32 -vn -0.72 -0.27 -0.64 -vn -0.74 -0.27 -0.61 -vn -0.25 -0.51 0.83 -vn -0.78 -0.62 -0.05 -vn -0.51 -0.85 -0.10 -vn 0.11 -0.94 -0.33 -vn -0.85 0.39 0.35 -vn -0.68 0.72 0.14 -vn -0.82 -0.51 0.25 -vn -0.83 -0.49 0.27 -vn -0.56 -0.73 0.40 -vn -0.53 -0.74 0.42 -vn -0.84 -0.24 0.49 -vn -0.84 -0.18 0.52 -vn -0.43 0.22 0.87 -vn -0.45 0.29 0.85 -vn 0.16 -0.00 0.99 -vn 0.12 -0.11 0.99 -vn -0.02 0.67 0.75 -vn -0.04 0.65 0.76 -vn -0.29 -0.85 0.43 -vn -0.27 -0.86 0.42 -vn 0.38 0.91 0.18 -vn -0.35 0.71 0.61 -vn -0.43 0.89 0.13 -vn -0.39 0.12 0.91 -vn 0.10 -0.68 0.73 -vn 0.17 0.10 0.98 -vn 0.21 -0.05 0.98 -vn -0.31 -0.14 0.94 -vn -0.71 0.47 0.52 -vn -0.36 0.38 0.85 -vn -0.08 0.66 0.74 -vn -0.29 0.86 0.42 -vn -0.76 -0.13 -0.64 -vn -0.54 -0.69 -0.48 -vn -0.95 0.07 -0.32 -vn -1.00 0.03 -0.04 -vn 0.05 -0.25 -0.97 -vn 0.05 -0.76 -0.64 -vn 0.80 -0.14 -0.58 -vn 0.57 -0.71 -0.41 -vn 0.98 0.05 -0.21 -vn 0.99 0.05 0.11 -vn 0.68 0.41 0.62 -vn 0.70 0.71 0.07 -vn -0.07 0.47 0.88 -vn 0.33 0.94 0.08 -vn -0.00 0.99 0.16 -vn -0.34 0.94 0.02 -vn -0.74 0.67 -0.09 -vn -0.79 0.41 0.45 -vn -0.99 -0.03 -0.16 -vn -0.60 -0.80 -0.09 -vn -0.61 -0.73 0.30 -vn -0.94 -0.02 0.33 -vn -0.17 -0.66 0.73 -vn -0.16 -0.85 0.49 -vn 0.09 -0.85 0.51 -vn 0.90 -0.02 0.43 -vn 0.59 -0.73 0.36 -vn 0.64 -0.77 -0.03 -vn 1.00 -0.01 -0.05 -vn 0.80 0.51 0.31 -vn 0.70 0.70 -0.12 -vn 0.41 0.91 -0.09 -vn 0.28 0.76 0.59 -vn 0.01 1.00 0.01 -vn -0.39 0.92 -0.06 -vn -0.46 0.58 0.68 -vn 0.03 0.81 0.59 -vn -0.84 0.50 0.22 -vn -0.69 0.70 -0.20 -vn -0.39 0.09 0.92 -vn -0.02 0.07 1.00 -vn 0.27 0.10 0.96 -vn 0.37 0.11 0.92 -vn 0.37 0.57 0.74 -vn 0.37 0.93 -0.04 -vn -0.37 0.92 -0.09 -vn -0.47 0.11 0.88 -vn 0.13 -0.67 0.73 -vn -0.95 -0.12 -0.30 -vn -0.96 0.14 0.25 -vn -0.92 0.14 0.36 -vn -0.81 -0.37 0.46 -vn -0.89 -0.19 0.41 -vn -0.96 0.09 0.27 -vn -0.94 -0.11 0.33 -vn -0.94 -0.03 0.34 -vn -0.17 0.83 -0.53 -vn -0.40 -0.79 -0.47 -vn 0.35 -0.80 0.49 -vn 0.21 -0.86 0.46 -vn -0.07 0.87 -0.49 -vn -0.08 0.86 -0.51 -vn -0.40 0.56 -0.72 -vn 0.07 0.92 -0.38 -vn -0.97 0.17 0.19 -vn -0.99 -0.05 0.13 -vn -0.42 -0.42 0.81 -vn -0.74 0.03 0.67 -vn -0.71 0.41 0.58 -vn -0.89 0.44 0.14 -vn -0.75 0.50 -0.43 -vn -0.83 0.28 -0.49 -vn -0.25 0.29 -0.92 -vn -0.38 0.60 -0.70 -vn 0.04 0.60 -0.80 -vn -0.90 0.14 -0.42 -vn -0.76 0.15 -0.64 -vn 0.21 0.19 -0.96 -vn -0.02 -0.04 -1.00 -vn -0.81 0.16 -0.56 -vn -0.70 0.69 0.16 -vn -0.58 0.69 -0.44 -vn -0.93 -0.31 0.18 -vn -0.88 -0.11 -0.47 -vn -0.92 -0.22 0.32 -vn 0.05 0.50 -0.86 -vn 0.09 -0.12 -0.99 -vn -0.83 -0.21 -0.52 -vn -0.93 -0.12 0.34 -vn 0.14 -0.34 -0.93 -vn -0.95 -0.30 -0.03 -vn 0.90 -0.29 0.33 -vn 0.85 -0.25 0.47 -vn 0.94 -0.13 -0.33 -vn 0.92 0.13 -0.37 -vn 0.87 -0.12 0.48 -vn -0.06 -0.42 0.91 -vn -0.02 -0.06 1.00 -vn 0.92 -0.19 -0.35 -vn -0.08 -0.74 0.67 -vn 0.77 -0.45 0.45 -vn -0.21 -0.74 0.64 -vn 0.99 -0.09 0.06 -vn 0.92 0.02 -0.39 -vn -0.71 -0.39 -0.58 -vn -0.72 -0.38 -0.58 -vn -0.00 -0.40 -0.92 -vn 0.07 -0.47 -0.88 -vn 0.61 -0.37 -0.70 -vn 0.65 -0.28 -0.70 -vn 0.97 -0.13 -0.22 -vn 0.70 -0.06 0.71 -vn -0.25 -0.17 0.95 -vn -0.22 -0.17 0.96 -vn -0.80 -0.18 0.57 -vn -0.73 -0.19 0.66 -vn -0.76 -0.21 -0.62 -vn -0.06 -0.20 -0.98 -vn 0.66 -0.23 0.72 -vn -0.17 -0.18 0.97 -vn -0.75 -0.13 0.65 -vn -0.98 -0.21 0.04 -vn -0.99 -0.13 0.09 -vn -0.76 0.00 -0.65 -vn -0.83 0.12 -0.54 -vn -0.89 0.36 0.26 -vn -0.93 0.36 -0.03 -vn -0.95 -0.29 0.11 -vn -0.39 -0.61 -0.69 -vn 0.04 -0.50 -0.87 -vn -0.67 -0.51 -0.54 -vn 0.08 -0.32 -0.94 -vn 0.77 -0.14 -0.62 -vn 0.76 0.28 0.59 -vn -0.99 0.15 0.06 -vn -0.46 -0.15 0.88 -vn -0.81 0.05 0.58 -vn 0.71 0.12 0.69 -vn 0.75 0.11 0.66 -vn -0.15 -0.03 0.99 -vn -0.71 -0.05 0.70 -vn -0.69 -0.07 0.72 -vn -0.94 -0.31 0.16 -vn -0.97 -0.23 0.06 -vn 0.03 -0.42 -0.91 -vn -0.03 -0.23 -0.97 -vn -0.70 -0.25 -0.67 -vn -0.69 -0.48 -0.54 -vn -0.98 -0.21 0.06 -vn 0.58 -0.25 -0.77 -vn 1.00 0.03 -0.08 -vn -0.01 -0.19 -0.98 -vn 0.75 -0.15 -0.65 -vn 1.00 -0.03 0.04 -vn 0.67 0.12 0.73 -vn -0.18 0.34 0.92 -vn -0.80 0.23 0.55 -vn -1.00 -0.03 -0.04 -vn -0.68 -0.23 -0.70 -vn -0.28 -0.77 0.57 -vn -0.35 -0.56 0.75 -vn -0.54 -0.79 0.29 -vn -0.66 -0.65 0.39 -vn -0.74 -0.65 0.19 -vn -0.83 -0.56 -0.05 -vn -0.85 -0.52 -0.02 -vn -0.49 0.15 -0.86 -vn -0.89 -0.36 -0.28 -vn -0.80 -0.12 -0.58 -vn -0.76 0.08 -0.64 -vn -0.48 0.43 0.77 -vn -0.50 0.52 0.69 -vn -0.58 0.10 0.80 -vn -0.28 -0.34 0.90 -vn -0.65 0.14 0.75 -vn -0.58 -0.21 0.79 -vn -0.41 -0.51 0.76 -vn -0.25 -0.18 0.95 -vn -0.18 -0.70 0.69 -vn 0.10 -0.71 0.69 -vn -0.84 0.30 0.46 -vn -0.52 -0.61 0.60 -vn -0.47 -0.51 0.72 -vn -0.53 -0.47 0.71 -vn -0.63 -0.44 0.64 -vn -0.42 -0.86 0.28 -vn -0.86 0.11 0.50 -vn -0.95 -0.30 0.13 -vn -0.83 -0.34 0.45 -vn -0.32 0.05 0.95 -vn -0.43 0.25 0.87 -vn -0.27 0.68 0.68 -vn -0.38 0.31 0.87 -vn -0.60 -0.04 0.80 -vn -0.67 -0.07 0.74 -vn -0.51 -0.10 0.86 -vn -0.70 0.07 0.71 -vn -0.30 0.74 0.61 -vn -0.58 -0.18 0.79 -vn -0.49 -0.32 0.81 -vn -0.51 -0.22 0.83 -vn -0.59 -0.01 0.81 -vn 0.16 -0.83 0.54 -vn 0.26 -0.76 0.59 -vn -0.35 0.80 -0.49 -vn -0.36 -0.80 0.48 -vn -0.57 -0.53 0.62 -vn -0.51 -0.75 0.42 -vn -0.33 -0.93 0.17 -vn -0.62 -0.70 0.36 -vn -0.41 -0.87 0.26 -vn -0.57 -0.66 0.48 -vn -0.23 -0.93 0.28 -vn -0.25 -0.96 0.08 -vn -0.52 0.07 0.85 -vn -0.54 0.43 0.73 -vn -0.75 0.21 0.62 -vn -0.55 0.66 0.50 -vn -0.84 0.44 0.32 -vn -0.31 0.56 0.77 -vn -0.26 0.19 0.95 -vn -0.95 0.18 0.25 -vn -0.87 0.07 0.48 -vn -0.82 0.54 0.20 -vn -0.95 0.31 0.06 -vn -0.95 0.27 0.17 -vn -0.84 0.50 0.19 -vn -0.23 -0.68 0.70 -vn -0.72 -0.37 0.59 -vn -0.63 0.73 0.29 -vn -0.87 0.48 0.15 -vn -0.95 0.31 -0.10 -vn -0.77 0.29 0.57 -vn -0.84 0.24 0.50 -vn -0.65 0.08 0.76 -vn -0.68 -0.09 0.73 -vn -0.50 0.45 0.74 -vn -0.60 0.14 0.79 -vn -0.79 0.39 0.48 -vn -0.77 0.33 0.55 -vn -0.51 -0.30 0.81 -vn -0.55 -0.04 0.84 -vn -0.51 -0.15 0.85 -vn -0.44 -0.27 0.86 -vn -0.59 -0.46 0.67 -vn -0.42 0.43 0.80 -vn -0.42 0.66 0.63 -vn -0.13 0.70 0.71 -vn -0.48 0.47 -0.74 -vn -0.93 0.00 -0.36 -vn -0.62 0.13 0.77 -vn -0.56 -0.40 0.72 -vn 0.15 -0.42 0.90 -vn 0.04 -0.24 0.97 -vn 0.24 -0.66 0.72 -vn 0.30 -0.78 0.55 -vn 0.26 -0.45 0.86 -vn 0.10 -0.39 0.92 -vn 0.33 -0.71 0.62 -vn -0.60 0.31 0.74 -vn -0.61 -0.29 0.74 -vn -0.78 -0.17 0.61 -vn -0.28 0.58 0.76 -vn -0.58 0.32 0.75 -vn -0.75 -0.01 0.67 -vn -0.23 0.32 0.92 -vn -0.94 -0.23 -0.24 -vn -0.98 0.19 -0.04 -vn -0.94 0.31 0.14 -vn -0.92 0.32 0.24 -vn -0.36 -0.40 0.84 -vn -0.67 0.57 0.48 -vn 0.03 -0.88 0.47 -vn 0.14 -0.87 0.47 -vn 0.14 -0.48 0.87 -vn 0.05 -0.49 0.87 -vn 0.12 0.03 0.99 -vn 0.29 -0.10 0.95 -vn 0.34 0.37 0.87 -vn 0.18 0.30 0.94 -vn 0.15 -0.33 0.93 -vn 0.02 -0.23 0.97 -vn -0.17 -0.37 0.91 -vn -0.06 -0.45 0.89 -vn -0.41 -0.34 0.85 -vn -0.37 -0.37 0.85 -vn -0.56 -0.16 0.81 -vn -0.59 -0.12 0.80 -vn -0.65 0.02 0.76 -vn -0.68 0.05 0.73 -vn -0.63 0.26 0.73 -vn -0.42 -0.06 0.91 -vn -0.64 0.12 0.76 -vn -0.66 0.13 0.74 -vn -0.60 0.29 0.75 -vn -0.45 0.33 0.83 -vn -0.50 0.27 0.82 -vn -0.14 0.44 0.89 -vn -0.06 0.54 0.84 -vn -0.19 0.14 0.97 -vn -0.74 -0.02 0.67 -vn -0.70 -0.21 -0.69 -vn 0.78 -0.13 -0.62 -vn 1.00 0.02 -0.03 -vn 0.70 -0.14 -0.70 -vn 0.04 -0.08 1.00 -vn 0.16 0.09 0.98 -vn 0.31 -0.03 0.95 -vn 0.16 -0.17 0.97 -vn 0.42 0.01 0.91 -vn 0.51 -0.06 0.86 -vn 0.51 -0.03 0.86 -vn 0.44 0.07 0.90 -vn 0.34 0.14 0.93 -vn 0.25 0.15 0.96 -vn 0.47 0.02 0.88 -vn 0.39 -0.09 0.92 -vn 0.46 -0.04 0.89 -vn 0.37 0.04 0.93 -vn 0.49 0.07 0.87 -vn 0.20 0.22 0.96 -vn 0.20 0.25 0.95 -vn -0.01 0.23 0.97 -vn -0.09 -0.44 0.89 -vn -0.51 -0.06 0.86 -vn -0.42 0.01 0.91 -vn -0.31 -0.03 0.95 -vn -0.16 -0.18 0.97 -vn -0.16 0.09 0.98 -vn -0.04 -0.09 1.00 -vn -0.34 0.15 0.93 -vn -0.44 0.07 0.90 -vn -0.51 -0.03 0.86 -vn -0.25 0.15 0.96 -vn -0.47 0.02 0.88 -vn -0.46 -0.04 0.89 -vn -0.39 -0.09 0.92 -vn -0.37 0.04 0.93 -vn -0.19 0.23 0.95 -vn -0.49 0.07 0.87 -vn -0.20 0.25 0.95 -vn 0.02 0.23 0.97 -vn 0.08 -0.45 0.89 -# 1090 vertex normals - -vt 0.95 0.25 0.00 -vt 0.94 0.29 0.00 -vt 0.90 0.30 0.00 -vt 0.90 0.26 0.00 -vt 0.91 0.09 0.00 -vt 0.95 0.09 0.00 -vt 0.96 0.13 0.00 -vt 0.91 0.13 0.00 -vt 0.80 0.03 0.00 -vt 0.81 0.06 0.00 -vt 0.76 0.07 0.00 -vt 0.75 0.05 0.00 -vt 0.84 0.27 0.00 -vt 0.85 0.30 0.00 -vt 0.76 0.28 0.00 -vt 0.76 0.31 0.00 -vt 0.77 0.19 0.00 -vt 0.72 0.19 0.00 -vt 0.73 0.17 0.00 -vt 0.77 0.18 0.00 -vt 0.95 0.34 0.00 -vt 0.90 0.35 0.00 -vt 0.70 0.32 0.00 -vt 0.71 0.28 0.00 -vt 0.67 0.28 0.00 -vt 0.68 0.31 0.00 -vt 0.69 0.18 0.00 -vt 0.70 0.15 0.00 -vt 0.86 0.37 0.00 -vt 0.91 0.38 0.00 -vt 0.87 0.40 0.00 -vt 0.62 0.88 0.00 -vt 0.63 0.85 0.00 -vt 0.66 0.87 0.00 -vt 0.67 0.92 0.00 -vt 0.60 0.94 0.00 -vt 0.60 0.89 0.00 -vt 0.52 0.92 0.00 -vt 0.57 0.88 0.00 -vt 0.53 0.87 0.00 -vt 0.55 0.86 0.00 -vt 0.55 0.83 0.00 -vt 0.55 0.84 0.00 -vt 0.56 0.83 0.00 -vt 0.61 0.83 0.00 -vt 0.63 0.84 0.00 -vt 0.59 0.84 0.00 -vt 0.59 0.83 0.00 -vt 0.63 0.83 0.00 -vt 0.68 0.80 0.00 -vt 0.67 0.76 0.00 -vt 0.69 0.74 0.00 -vt 0.70 0.80 0.00 -vt 0.39 0.37 0.00 -vt 0.38 0.37 0.00 -vt 0.35 0.31 0.00 -vt 0.42 0.31 0.00 -vt 0.41 0.36 0.00 -vt 0.35 0.38 0.00 -vt 0.33 0.37 0.00 -vt 0.50 0.81 0.00 -vt 0.48 0.81 0.00 -vt 0.49 0.75 0.00 -vt 0.51 0.76 0.00 -vt 0.53 0.78 0.00 -vt 0.55 0.80 0.00 -vt 0.56 0.80 0.00 -vt 0.55 0.77 0.00 -vt 0.60 0.80 0.00 -vt 0.59 0.80 0.00 -vt 0.59 0.76 0.00 -vt 0.62 0.75 0.00 -vt 0.64 0.77 0.00 -vt 0.63 0.80 0.00 -vt 0.63 0.72 0.00 -vt 0.59 0.71 0.00 -vt 0.59 0.68 0.00 -vt 0.63 0.69 0.00 -vt 0.55 0.72 0.00 -vt 0.54 0.69 0.00 -vt 0.53 0.73 0.00 -vt 0.56 0.75 0.00 -vt 0.68 0.36 0.00 -vt 0.67 0.37 0.00 -vt 0.69 0.38 0.00 -vt 0.68 0.40 0.00 -vt 0.72 0.10 0.00 -vt 0.70 0.09 0.00 -vt 0.77 0.23 0.00 -vt 0.85 0.23 0.00 -vt 0.90 0.21 0.00 -vt 0.95 0.21 0.00 -vt 0.87 0.03 0.00 -vt 0.87 0.06 0.00 -vt 0.67 0.13 0.00 -vt 0.94 0.06 0.00 -vt 0.90 0.06 0.00 -vt 0.55 0.41 0.00 -vt 0.56 0.28 0.00 -vt 0.60 0.28 0.00 -vt 0.60 0.41 0.00 -vt 0.57 0.17 0.00 -vt 0.51 0.28 0.00 -vt 0.52 0.17 0.00 -vt 0.51 0.42 0.00 -vt 0.52 0.52 0.00 -vt 0.56 0.51 0.00 -vt 0.57 0.58 0.00 -vt 0.53 0.58 0.00 -vt 0.60 0.50 0.00 -vt 0.61 0.57 0.00 -vt 0.61 0.17 0.00 -vt 0.57 0.15 0.00 -vt 0.60 0.15 0.00 -vt 0.55 0.15 0.00 -vt 0.58 0.62 0.00 -vt 0.54 0.64 0.00 -vt 0.62 0.62 0.00 -vt 0.73 0.48 0.00 -vt 0.70 0.45 0.00 -vt 0.72 0.44 0.00 -vt 0.74 0.46 0.00 -vt 0.92 0.39 0.00 -vt 0.88 0.42 0.00 -vt 0.96 0.38 0.00 -vt 0.96 0.36 0.00 -vt 0.84 0.41 0.00 -vt 0.85 0.44 0.00 -vt 0.90 0.05 0.00 -vt 0.97 0.39 0.00 -vt 0.94 0.41 0.00 -vt 0.78 0.49 0.00 -vt 0.77 0.51 0.00 -vt 0.81 0.47 0.00 -vt 0.76 0.45 0.00 -vt 0.79 0.43 0.00 -vt 0.82 0.46 0.00 -vt 0.91 0.44 0.00 -vt 0.88 0.45 0.00 -vt 0.86 0.47 0.00 -vt 0.84 0.48 0.00 -vt 0.81 0.52 0.00 -vt 0.82 0.51 0.00 -vt 0.83 0.38 0.00 -vt 0.83 0.39 0.00 -vt 0.80 0.41 0.00 -vt 0.81 0.40 0.00 -vt 0.84 0.36 0.00 -vt 0.83 0.36 0.00 -vt 0.11 0.49 0.00 -vt 0.13 0.50 0.00 -vt 0.09 0.51 0.00 -vt 0.08 0.50 0.00 -vt 0.12 0.47 0.00 -vt 0.06 0.54 0.00 -vt 0.06 0.93 0.00 -vt 0.09 0.98 0.00 -vt 0.05 0.99 0.00 -vt 0.04 0.94 0.00 -vt 0.07 0.79 0.00 -vt 0.07 0.77 0.00 -vt 0.08 0.76 0.00 -vt 0.14 0.78 0.00 -vt 0.11 0.77 0.00 -vt 0.12 0.75 0.00 -vt 0.15 0.77 0.00 -vt 0.07 0.46 0.00 -vt 0.13 0.44 0.00 -vt 0.02 0.46 0.00 -vt 0.02 0.49 0.00 -vt 0.09 0.91 0.00 -vt 0.11 0.96 0.00 -vt 0.13 0.89 0.00 -vt 0.08 0.87 0.00 -vt 0.13 0.86 0.00 -vt 0.13 0.83 0.00 -vt 0.09 0.83 0.00 -vt 0.17 0.80 0.00 -vt 0.18 0.79 0.00 -vt 0.22 0.82 0.00 -vt 0.09 0.36 0.00 -vt 0.12 0.39 0.00 -vt 0.08 0.40 0.00 -vt 0.07 0.38 0.00 -vt 0.05 0.40 0.00 -vt 0.19 0.89 0.00 -vt 0.18 0.87 0.00 -vt 0.20 0.85 0.00 -vt 0.18 0.85 0.00 -vt 0.18 0.82 0.00 -vt 0.22 0.83 0.00 -vt 0.16 0.76 0.00 -vt 0.03 0.43 0.00 -vt 0.16 0.91 0.00 -vt 0.16 0.48 0.00 -vt 0.14 0.43 0.00 -vt 0.74 0.42 0.00 -vt 0.71 0.23 0.00 -vt 0.68 0.23 0.00 -vt 0.64 0.28 0.00 -vt 0.65 0.31 0.00 -vt 0.66 0.17 0.00 -vt 0.66 0.38 0.00 -vt 0.67 0.41 0.00 -vt 0.74 0.11 0.00 -vt 0.64 0.22 0.00 -vt 0.85 0.18 0.00 -vt 0.91 0.17 0.00 -vt 0.96 0.17 0.00 -vt 0.80 0.33 0.00 -vt 0.78 0.32 0.00 -vt 0.80 0.32 0.00 -vt 0.83 0.34 0.00 -vt 0.75 0.40 0.00 -vt 0.74 0.39 0.00 -vt 0.74 0.38 0.00 -vt 0.76 0.40 0.00 -vt 0.77 0.41 0.00 -vt 0.78 0.41 0.00 -vt 0.77 0.33 0.00 -vt 0.76 0.32 0.00 -vt 0.58 0.80 0.00 -vt 0.61 0.80 0.00 -vt 0.63 0.76 0.00 -vt 0.65 0.73 0.00 -vt 0.66 0.71 0.00 -vt 0.51 0.71 0.00 -vt 0.31 0.23 0.00 -vt 0.35 0.22 0.00 -vt 0.39 0.23 0.00 -vt 0.29 0.31 0.00 -vt 0.31 0.37 0.00 -vt 0.29 0.36 0.00 -vt 0.03 0.57 0.00 -vt 0.02 0.53 0.00 -vt 0.13 0.73 0.00 -vt 0.09 0.73 0.00 -vt 0.11 0.71 0.00 -vt 0.24 0.37 0.00 -vt 0.21 0.35 0.00 -vt 0.24 0.36 0.00 -vt 0.66 0.86 0.00 -vt 0.67 0.91 0.00 -vt 0.56 0.84 0.00 -vt 0.58 0.84 0.00 -vt 0.61 0.84 0.00 -vt 0.62 0.76 0.00 -vt 0.35 0.21 0.00 -vt 0.39 0.22 0.00 -vt 0.28 0.31 0.00 -vt 0.14 0.94 0.00 -vt 0.07 0.37 0.00 -vt 0.01 0.53 0.00 -vt 0.02 0.57 0.00 -vt 0.01 0.49 0.00 -vt 0.04 0.40 0.00 -vt 0.68 0.51 0.00 -vt 0.72 0.54 0.00 -vt 0.65 0.56 0.00 -vt 0.70 0.59 0.00 -vt 0.69 0.60 0.00 -vt 0.68 0.62 0.00 -vt 0.66 0.49 0.00 -vt 0.06 0.88 0.00 -vt 0.06 0.83 0.00 -vt 0.28 0.69 0.00 -vt 0.22 0.68 0.00 -vt 0.23 0.61 0.00 -vt 0.29 0.61 0.00 -vt 0.24 0.77 0.00 -vt 0.23 0.78 0.00 -vt 0.20 0.68 0.00 -vt 0.28 0.76 0.00 -vt 0.35 0.71 0.00 -vt 0.35 0.77 0.00 -vt 0.40 0.73 0.00 -vt 0.38 0.79 0.00 -vt 0.41 0.55 0.00 -vt 0.42 0.59 0.00 -vt 0.36 0.57 0.00 -vt 0.36 0.53 0.00 -vt 0.36 0.64 0.00 -vt 0.41 0.66 0.00 -vt 0.35 0.82 0.00 -vt 0.30 0.81 0.00 -vt 0.36 0.85 0.00 -vt 0.30 0.85 0.00 -vt 0.33 0.51 0.00 -vt 0.33 0.49 0.00 -vt 0.36 0.50 0.00 -vt 0.41 0.49 0.00 -vt 0.41 0.54 0.00 -vt 0.37 0.46 0.00 -vt 0.34 0.45 0.00 -vt 0.41 0.45 0.00 -vt 0.31 0.55 0.00 -vt 0.50 0.53 0.00 -vt 0.46 0.54 0.00 -vt 0.46 0.50 0.00 -vt 0.50 0.50 0.00 -vt 0.26 0.43 0.00 -vt 0.29 0.44 0.00 -vt 0.28 0.48 0.00 -vt 0.24 0.46 0.00 -vt 0.46 0.46 0.00 -vt 0.48 0.46 0.00 -vt 0.28 0.50 0.00 -vt 0.23 0.46 0.00 -vt 0.26 0.53 0.00 -vt 0.21 0.51 0.00 -vt 0.50 0.59 0.00 -vt 0.46 0.60 0.00 -vt 0.18 0.50 0.00 -vt 0.18 0.61 0.00 -vt 0.41 0.80 0.00 -vt 0.44 0.72 0.00 -vt 0.46 0.66 0.00 -vt 0.33 0.40 0.00 -vt 0.35 0.40 0.00 -vt 0.38 0.39 0.00 -vt 0.41 0.39 0.00 -vt 0.27 0.38 0.00 -vt 0.29 0.39 0.00 -vt 0.31 0.40 0.00 -vt 0.47 0.40 0.00 -vt 0.44 0.39 0.00 -vt 0.89 0.71 0.00 -vt 0.92 0.71 0.00 -vt 0.92 0.74 0.00 -vt 0.90 0.74 0.00 -vt 0.94 0.70 0.00 -vt 0.94 0.73 0.00 -vt 0.97 0.70 0.00 -vt 0.76 0.70 0.00 -vt 0.80 0.69 0.00 -vt 0.79 0.71 0.00 -vt 0.82 0.72 0.00 -vt 0.83 0.68 0.00 -vt 0.93 0.77 0.00 -vt 0.90 0.77 0.00 -vt 0.96 0.76 0.00 -vt 0.99 0.72 0.00 -vt 0.75 0.74 0.00 -vt 0.71 0.69 0.00 -vt 0.72 0.68 0.00 -vt 0.78 0.76 0.00 -vt 0.81 0.76 0.00 -vt 0.85 0.72 0.00 -vt 0.84 0.77 0.00 -vt 0.90 0.85 0.00 -vt 0.90 0.81 0.00 -vt 0.93 0.81 0.00 -vt 0.91 0.91 0.00 -vt 0.79 0.88 0.00 -vt 0.80 0.92 0.00 -vt 0.78 0.88 0.00 -vt 0.83 0.87 0.00 -vt 0.84 0.92 0.00 -vt 0.85 0.68 0.00 -vt 0.89 0.68 0.00 -vt 0.92 0.68 0.00 -vt 0.90 0.57 0.00 -vt 0.93 0.56 0.00 -vt 0.93 0.58 0.00 -vt 0.90 0.58 0.00 -vt 0.95 0.57 0.00 -vt 0.94 0.58 0.00 -vt 0.77 0.57 0.00 -vt 0.78 0.56 0.00 -vt 0.80 0.57 0.00 -vt 0.80 0.58 0.00 -vt 0.83 0.82 0.00 -vt 0.75 0.84 0.00 -vt 0.77 0.81 0.00 -vt 0.72 0.81 0.00 -vt 0.74 0.78 0.00 -vt 0.80 0.81 0.00 -vt 0.72 0.72 0.00 -vt 0.81 0.65 0.00 -vt 0.80 0.66 0.00 -vt 0.78 0.65 0.00 -vt 0.79 0.64 0.00 -vt 0.83 0.65 0.00 -vt 0.83 0.66 0.00 -vt 0.85 0.66 0.00 -vt 0.85 0.65 0.00 -vt 0.91 0.65 0.00 -vt 0.88 0.65 0.00 -vt 0.88 0.64 0.00 -vt 0.91 0.64 0.00 -vt 0.85 0.64 0.00 -vt 0.94 0.68 0.00 -vt 0.75 0.63 0.00 -vt 0.94 0.62 0.00 -vt 0.91 0.62 0.00 -vt 0.95 0.62 0.00 -vt 0.76 0.61 0.00 -vt 0.79 0.62 0.00 -vt 0.82 0.58 0.00 -vt 0.82 0.59 0.00 -vt 0.84 0.59 0.00 -vt 0.84 0.58 0.00 -vt 0.86 0.60 0.00 -vt 0.86 0.58 0.00 -vt 0.88 0.59 0.00 -vt 0.88 0.57 0.00 -vt 0.10 0.09 0.00 -vt 0.06 0.07 0.00 -vt 0.06 0.05 0.00 -vt 0.10 0.07 0.00 -vt 0.14 0.03 0.00 -vt 0.14 0.08 0.00 -vt 0.14 0.11 0.00 -vt 0.18 0.10 0.00 -vt 0.18 0.13 0.00 -vt 0.15 0.15 0.00 -vt 0.32 0.03 0.00 -vt 0.38 0.01 0.00 -vt 0.40 0.05 0.00 -vt 0.33 0.08 0.00 -vt 0.07 0.01 0.00 -vt 0.10 0.02 0.00 -vt 0.22 0.04 0.00 -vt 0.26 0.04 0.00 -vt 0.27 0.10 0.00 -vt 0.22 0.11 0.00 -vt 0.17 0.04 0.00 -vt 0.30 0.15 0.00 -vt 0.36 0.13 0.00 -vt 0.43 0.10 0.00 -vt 0.08 0.28 0.00 -vt 0.07 0.29 0.00 -vt 0.06 0.29 0.00 -vt 0.07 0.27 0.00 -vt 0.06 0.26 0.00 -vt 0.04 0.27 0.00 -vt 0.04 0.25 0.00 -vt 0.06 0.25 0.00 -vt 0.07 0.23 0.00 -vt 0.05 0.24 0.00 -vt 0.05 0.23 0.00 -vt 0.06 0.22 0.00 -vt 0.04 0.23 0.00 -vt 0.05 0.22 0.00 -vt 0.07 0.26 0.00 -vt 0.09 0.18 0.00 -vt 0.10 0.20 0.00 -vt 0.09 0.20 0.00 -vt 0.07 0.19 0.00 -vt 0.23 0.40 0.00 -vt 0.18 0.39 0.00 -vt 0.12 0.13 0.00 -vt 0.17 0.21 0.00 -vt 0.15 0.18 0.00 -vt 0.18 0.17 0.00 -vt 0.19 0.19 0.00 -vt 0.09 0.32 0.00 -vt 0.08 0.30 0.00 -vt 0.09 0.29 0.00 -vt 0.10 0.30 0.00 -vt 0.02 0.21 0.00 -vt 0.03 0.21 0.00 -vt 0.02 0.22 0.00 -vt 0.11 0.21 0.00 -vt 0.09 0.22 0.00 -vt 0.11 0.29 0.00 -vt 0.10 0.28 0.00 -vt 0.18 0.34 0.00 -vt 0.15 0.37 0.00 -vt 0.14 0.28 0.00 -vt 0.15 0.26 0.00 -vt 0.16 0.26 0.00 -vt 0.15 0.28 0.00 -vt 0.03 0.22 0.00 -vt 0.04 0.21 0.00 -vt 0.42 0.25 0.00 -vt 0.40 0.21 0.00 -vt 0.46 0.20 0.00 -vt 0.47 0.25 0.00 -vt 0.04 0.16 0.00 -vt 0.06 0.15 0.00 -vt 0.08 0.16 0.00 -vt 0.06 0.17 0.00 -vt 0.13 0.16 0.00 -vt 0.11 0.17 0.00 -vt 0.10 0.15 0.00 -vt 0.09 0.11 0.00 -vt 0.08 0.13 0.00 -vt 0.05 0.28 0.00 -vt 0.17 0.27 0.00 -vt 0.16 0.30 0.00 -vt 0.14 0.29 0.00 -vt 0.19 0.31 0.00 -vt 0.20 0.28 0.00 -vt 0.14 0.32 0.00 -vt 0.12 0.31 0.00 -vt 0.18 0.25 0.00 -vt 0.20 0.25 0.00 -vt 0.26 0.28 0.00 -vt 0.23 0.28 0.00 -vt 0.23 0.24 0.00 -vt 0.26 0.24 0.00 -vt 0.03 0.17 0.00 -vt 0.02 0.17 0.00 -vt 0.02 0.15 0.00 -vt 0.03 0.13 0.00 -vt 0.04 0.11 0.00 -vt 0.05 0.09 0.00 -vt 0.12 0.19 0.00 -vt 0.47 0.32 0.00 -vt 0.45 0.31 0.00 -vt 0.44 0.29 0.00 -vt 0.22 0.31 0.00 -vt 0.28 0.27 0.00 -vt 0.27 0.23 0.00 -vt 0.12 0.35 0.00 -vt 0.09 0.27 0.00 -vt 0.18 0.24 0.00 -vt 0.16 0.25 0.00 -vt 0.10 0.33 0.00 -vt 0.09 0.24 0.00 -vt 0.08 0.26 0.00 -vt 0.06 0.24 0.00 -vt 0.10 0.26 0.00 -vt 0.13 0.29 0.00 -vt 0.13 0.28 0.00 -vt 0.14 0.27 0.00 -vt 0.11 0.23 0.00 -vt 0.12 0.24 0.00 -vt 0.11 0.25 0.00 -vt 0.39 0.18 0.00 -vt 0.45 0.16 0.00 -vt 0.26 0.16 0.00 -vt 0.31 0.18 0.00 -vt 0.26 0.18 0.00 -vt 0.04 0.20 0.00 -vt 0.04 0.18 0.00 -vt 0.04 0.24 0.00 -vt 0.03 0.24 0.00 -vt 0.03 0.23 0.00 -vt 0.03 0.20 0.00 -vt 0.11 0.27 0.00 -vt 0.12 0.28 0.00 -vt 0.14 0.24 0.00 -vt 0.14 0.23 0.00 -vt 0.14 0.21 0.00 -vt 0.15 0.24 0.00 -vt 0.22 0.15 0.00 -vt 0.22 0.18 0.00 -vt 0.26 0.19 0.00 -vt 0.23 0.21 0.00 -vt 0.20 0.22 0.00 -vt 0.01 0.19 0.00 -vt 0.03 0.18 0.00 -vt 0.25 0.30 0.00 -vt 0.24 0.34 0.00 -vt 0.38 0.21 0.00 -vt 0.75 0.35 0.00 -vt 0.74 0.35 0.00 -vt 0.73 0.37 0.00 -vt 0.74 0.37 0.00 -vt 0.80 0.12 0.00 -vt 0.80 0.13 0.00 -vt 0.80 0.14 0.00 -vt 0.79 0.12 0.00 -vt 0.79 0.10 0.00 -vt 0.80 0.11 0.00 -vt 0.81 0.11 0.00 -vt 0.80 0.09 0.00 -vt 0.82 0.10 0.00 -vt 0.83 0.10 0.00 -vt 0.84 0.11 0.00 -vt 0.85 0.10 0.00 -vt 0.86 0.12 0.00 -vt 0.84 0.12 0.00 -vt 0.86 0.13 0.00 -vt 0.86 0.14 0.00 -vt 0.85 0.15 0.00 -vt 0.84 0.14 0.00 -vt 0.84 0.13 0.00 -vt 0.83 0.15 0.00 -vt 0.81 0.14 0.00 -vt 0.81 0.15 0.00 -vt 0.82 0.13 0.00 -vt 0.13 0.56 0.00 -vt 0.52 0.66 0.00 -vt 0.81 0.63 0.00 -vt 0.83 0.64 0.00 -vt 0.88 0.63 0.00 -vt 0.94 0.63 0.00 -vt 0.95 0.63 0.00 -vt 0.75 0.62 0.00 -vt 0.94 0.64 0.00 -vt 0.95 0.65 0.00 -vt 0.08 0.75 0.00 -vt 0.58 0.13 0.00 -vt 0.46 0.85 0.00 -vt 0.44 0.89 0.00 -vt 0.40 0.88 0.00 -vt 0.41 0.83 0.00 -vt 0.37 0.90 0.00 -vt 0.36 0.86 0.00 -vt 0.32 0.92 0.00 -vt 0.29 0.92 0.00 -vt 0.32 0.87 0.00 -vt 0.44 0.95 0.00 -vt 0.39 0.95 0.00 -vt 0.37 0.99 0.00 -vt 0.32 0.97 0.00 -vt 0.28 0.98 0.00 -vt 0.28 0.91 0.00 -vt 0.31 0.86 0.00 -vt 0.26 0.94 0.00 -vt 0.48 0.89 0.00 -vt 0.46 0.82 0.00 -# 615 texture coords - -g CatBombay -f 1/1/1 2/2/2 3/3/3 -f 3/3/3 4/4/4 1/1/1 -f 5/5/5 6/6/6 7/7/7 -f 7/7/7 8/8/8 5/5/5 -f 9/9/9 10/10/10 11/11/11 -f 11/11/11 12/12/12 9/9/9 -f 13/13/13 4/4/4 3/3/3 -f 3/3/3 14/14/14 13/13/13 -f 15/15/15 13/13/13 14/14/14 -f 14/14/14 16/16/16 15/15/15 -f 17/17/17 18/18/18 19/19/19 -f 19/19/19 20/20/20 17/17/17 -f 2/2/2 21/21/21 22/22/22 -f 22/22/22 3/3/3 2/2/2 -f 23/23/23 24/24/24 15/15/15 -f 15/15/15 16/16/16 23/23/23 -f 25/25/25 24/24/24 23/23/23 -f 23/23/23 26/26/26 25/25/25 -f 27/27/27 28/28/28 19/19/19 -f 19/19/19 18/18/18 27/27/27 -f 29/29/29 22/22/22 30/30/30 -f 30/30/30 31/31/31 29/29/29 -f 32/32/32 33/33/33 34/34/34 -f 34/34/34 35/35/35 32/32/32 -f 35/35/35 36/36/36 37/37/37 -f 37/37/37 32/32/32 35/35/35 -f 36/36/36 38/38/38 39/39/39 -f 39/39/39 37/37/37 36/36/36 -f 40/40/40 41/41/41 39/39/39 -f 39/39/39 38/38/38 40/40/40 -f 42/42/42 43/43/43 41/41/41 -f 41/41/41 40/40/40 42/42/42 -f 42/42/42 44/44/44 43/43/43 -f 45/45/45 46/46/46 47/47/47 -f 47/47/47 48/48/48 45/45/45 -f 33/33/33 46/46/46 49/49/49 -f 49/49/49 34/34/34 33/33/33 -f 50/50/50 51/51/51 52/52/52 -f 52/52/52 53/53/53 50/50/50 -f 54/54/54 55/55/55 56/56/56 -f 56/56/56 53/57/53 54/54/54 -f 53/57/53 52/58/52 54/54/54 -f 56/56/56 55/55/55 57/59/57 -f 57/59/57 58/60/58 56/56/56 -f 59/61/59 60/62/60 61/63/61 -f 61/63/61 62/64/62 59/61/59 -f 63/65/63 64/66/64 59/61/59 -f 59/61/59 62/64/62 63/65/63 -f 65/67/65 64/66/64 63/65/63 -f 63/65/63 66/68/66 65/67/65 -f 67/69/67 68/70/68 69/71/69 -f 69/71/69 70/72/70 67/69/67 -f 71/73/71 51/51/51 50/50/50 -f 50/50/50 72/74/72 71/73/71 -f 73/75/73 74/76/74 57/77/57 -f 57/77/57 55/78/55 73/75/73 -f 75/79/75 58/80/58 57/77/57 -f 57/77/57 74/76/74 75/79/75 -f 76/81/76 77/82/77 66/68/66 -f 66/68/66 63/65/63 76/81/76 -f 63/65/63 62/64/62 76/81/76 -f 70/72/70 69/71/69 74/76/74 -f 74/76/74 73/75/73 70/72/70 -f 78/83/78 79/84/79 26/26/26 -f 26/26/26 23/23/23 78/83/78 -f 80/85/80 81/86/81 79/84/79 -f 79/84/79 78/83/78 80/85/80 -f 82/87/82 83/88/83 12/12/12 -f 12/12/12 11/11/11 82/87/82 -f 22/22/22 29/29/29 14/14/14 -f 14/14/14 3/3/3 22/22/22 -f 84/89/84 85/90/85 13/13/13 -f 13/13/13 15/15/15 84/89/84 -f 85/90/85 86/91/86 4/4/4 -f 4/4/4 13/13/13 85/90/85 -f 86/91/86 87/92/87 1/1/1 -f 1/1/1 4/4/4 86/91/86 -f 88/93/88 89/94/89 10/10/10 -f 10/10/10 9/9/9 88/93/88 -f 82/87/82 28/28/28 90/95/90 -f 90/95/90 83/88/83 82/87/82 -f 91/96/91 6/6/6 5/5/5 -f 5/5/5 92/97/92 91/96/91 -f 93/98/93 94/99/94 95/100/95 -f 95/100/95 96/101/96 93/98/93 -f 97/102/97 94/99/94 98/103/98 -f 98/103/98 99/104/99 97/102/97 -f 98/103/98 94/99/94 93/98/93 -f 93/98/93 100/105/100 98/103/98 -f 101/106/101 102/107/102 103/108/103 -f 103/108/103 104/109/104 101/106/101 -f 103/108/103 102/107/102 105/110/105 -f 105/110/105 106/111/106 103/108/103 -f 93/98/93 96/101/96 105/110/105 -f 105/110/105 102/107/102 93/98/93 -f 94/99/94 97/102/97 107/112/107 -f 107/112/107 95/100/95 94/99/94 -f 107/112/107 97/102/97 108/113/108 -f 108/113/108 109/114/109 107/112/107 -f 99/104/99 110/115/110 108/113/108 -f 108/113/108 97/102/97 99/104/99 -f 101/106/101 100/105/100 93/98/93 -f 93/98/93 102/107/102 101/106/101 -f 104/109/104 103/108/103 111/116/111 -f 111/116/111 88/117/88 104/109/104 -f 103/108/103 106/111/106 91/118/91 -f 91/118/91 111/116/111 103/108/103 -f 112/119/112 113/120/113 114/121/114 -f 114/121/114 115/122/115 112/119/112 -f 116/123/116 117/124/117 31/31/31 -f 31/31/31 30/30/30 116/123/116 -f 118/125/118 116/123/116 30/30/30 -f 30/30/30 119/126/119 118/125/118 -f 120/127/120 31/31/31 117/124/117 -f 117/124/117 121/128/121 120/127/120 -f 91/96/91 92/97/92 111/129/111 -f 89/94/89 88/93/88 111/129/111 -f 89/94/89 111/129/111 92/97/92 -f 92/97/92 5/5/5 89/94/89 -f 21/21/21 119/126/119 30/30/30 -f 30/30/30 22/22/22 21/21/21 -f 116/123/116 118/125/118 122/130/122 -f 122/130/122 123/131/123 116/123/116 -f 115/122/115 124/132/124 125/133/125 -f 125/133/125 112/119/112 115/122/115 -f 126/134/126 127/135/127 128/136/128 -f 128/136/128 129/137/129 126/134/126 -f 120/127/120 121/128/121 129/137/129 -f 129/137/129 128/136/128 120/127/120 -f 116/123/116 123/131/123 130/138/130 -f 130/138/130 117/124/117 116/123/116 -f 117/124/117 130/138/130 131/139/131 -f 131/139/131 132/140/132 121/128/121 -f 121/128/121 117/124/117 131/139/131 -f 132/140/132 129/137/129 121/128/121 -f 132/140/132 133/141/133 126/134/126 -f 126/134/126 129/137/129 132/140/132 -f 134/142/125 125/133/125 124/132/124 -f 124/132/124 135/143/134 134/142/125 -f 136/144/135 137/145/136 138/146/137 -f 138/146/137 139/147/138 136/144/135 -f 140/148/139 137/145/136 136/144/135 -f 136/144/135 141/149/140 140/148/139 -f 142/150/141 143/151/142 144/152/143 -f 145/153/144 146/154/145 142/150/141 -f 142/150/141 144/152/143 145/153/144 -f 144/152/143 147/155/146 145/153/144 -f 148/156/147 149/157/148 150/158/149 -f 150/158/149 151/159/150 148/156/147 -f 152/160/151 153/161/152 154/162/153 -f 155/163/154 156/164/155 157/165/156 -f 157/165/156 158/166/157 155/163/154 -f 146/154/145 145/153/144 159/167/158 -f 159/167/158 160/168/159 146/154/145 -f 161/169/160 159/167/158 145/153/144 -f 145/153/144 162/170/161 161/169/160 -f 163/171/162 164/172/163 149/157/148 -f 149/157/148 148/156/147 163/171/162 -f 165/173/164 163/171/162 166/174/165 -f 166/174/165 167/175/166 165/173/164 -f 155/163/154 168/176/167 169/177/168 -f 169/177/168 156/164/155 155/163/154 -f 170/178/169 171/179/170 172/180/171 -f 172/181/172 171/182/173 173/183/174 -f 173/183/174 174/184/175 172/181/172 -f 173/183/174 175/185/176 174/184/175 -f 176/186/177 177/187/178 178/188/179 -f 179/189/180 180/190/181 181/191/182 -f 181/191/182 178/188/179 179/189/180 -f 178/188/179 177/187/178 179/189/180 -f 181/191/182 180/190/181 170/178/169 -f 170/178/169 172/180/171 181/191/182 -f 170/178/169 155/163/154 158/166/157 -f 158/166/157 182/192/183 171/179/170 -f 171/179/170 170/178/169 158/166/157 -f 173/183/174 171/182/173 160/168/159 -f 160/168/159 159/167/158 173/183/174 -f 159/167/158 183/193/184 175/185/176 -f 175/185/176 173/183/174 159/167/158 -f 165/173/164 167/175/166 177/187/178 -f 177/187/178 176/186/177 165/173/164 -f 176/186/177 184/194/185 165/173/164 -f 167/175/166 179/189/180 177/187/178 -f 170/178/169 180/190/181 168/176/167 -f 168/176/167 155/163/154 170/178/169 -f 143/151/142 142/150/141 146/154/145 -f 146/154/145 185/195/186 143/151/142 -f 160/168/159 182/196/187 185/195/186 -f 185/195/186 146/154/145 160/168/159 -f 160/168/159 171/182/173 182/196/187 -f 114/121/114 81/86/81 80/85/80 -f 80/85/80 186/197/188 114/121/114 -f 18/18/18 17/17/17 84/89/84 -f 84/89/84 187/198/189 18/18/18 -f 27/27/27 18/18/18 187/198/189 -f 187/198/189 188/199/190 27/27/27 -f 189/200/191 25/25/25 26/26/26 -f 26/26/26 190/201/192 189/200/191 -f 28/28/28 27/27/27 191/202/193 -f 191/202/193 90/95/90 28/28/28 -f 190/201/192 26/26/26 79/84/79 -f 79/84/79 192/203/194 190/201/192 -f 192/203/194 79/84/79 81/86/81 -f 81/86/81 193/204/195 192/203/194 -f 19/19/19 28/28/28 82/87/82 -f 82/87/82 194/205/196 19/19/19 -f 115/122/115 114/121/114 186/197/188 -f 186/197/188 127/135/127 115/122/115 -f 124/132/124 115/122/115 127/135/127 -f 127/135/127 126/134/126 124/132/124 -f 113/120/113 193/204/195 81/86/81 -f 81/86/81 114/121/114 113/120/113 -f 195/206/197 188/199/190 25/25/25 -f 25/25/25 189/200/191 195/206/197 -f 133/141/133 135/143/134 124/132/124 -f 124/132/124 126/134/126 133/141/133 -f 17/17/17 20/20/20 196/207/198 -f 196/207/198 8/8/8 197/208/199 -f 7/7/7 198/209/1 197/208/199 -f 197/208/199 8/8/8 7/7/7 -f 199/210/200 200/211/201 201/211/202 -f 201/211/202 202/212/203 199/210/200 -f 202/212/203 203/213/204 204/213/205 -f 204/213/205 199/210/200 202/212/203 -f 205/214/206 206/215/207 207/216/208 -f 207/216/208 208/217/209 205/214/206 -f 138/146/137 209/218/210 210/219/211 -f 210/219/211 139/147/138 138/146/137 -f 200/211/201 211/220/212 212/221/213 -f 212/221/213 201/211/202 200/211/201 -f 203/213/204 140/148/139 141/149/140 -f 141/149/140 204/213/205 203/213/204 -f 69/71/69 68/70/68 213/222/214 -f 213/222/214 77/82/77 69/71/69 -f 72/74/72 214/223/215 215/224/216 -f 215/224/216 71/73/71 72/74/72 -f 216/225/217 54/226/54 52/52/52 -f 52/52/52 51/51/51 216/225/217 -f 61/63/61 217/227/218 76/81/76 -f 76/81/76 62/64/62 61/63/61 -f 77/82/77 75/79/75 74/76/74 -f 74/76/74 69/71/69 77/82/77 -f 216/225/217 51/51/51 71/73/71 -f 71/73/71 215/224/216 216/225/217 -f 34/34/34 50/50/50 53/53/53 -f 53/53/53 35/35/35 34/34/34 -f 56/56/56 38/228/38 36/229/36 -f 36/229/36 35/230/35 56/56/56 -f 35/230/35 53/57/53 56/56/56 -f 56/56/56 60/231/60 38/228/38 -f 60/62/60 59/61/59 40/40/40 -f 40/40/40 38/38/38 60/62/60 -f 40/40/40 59/61/59 64/66/64 -f 64/66/64 42/42/42 40/40/40 -f 64/66/64 65/67/65 44/44/44 -f 44/44/44 42/42/42 64/66/64 -f 67/69/67 214/223/215 45/45/45 -f 45/45/45 48/48/48 67/69/67 -f 48/48/48 68/70/68 67/69/67 -f 34/34/34 49/49/49 72/74/72 -f 72/74/72 50/50/50 34/34/34 -f 44/44/44 65/67/65 213/222/214 -f 213/222/214 48/48/48 44/44/44 -f 213/222/214 68/70/68 48/48/48 -f 45/45/45 214/223/215 72/74/72 -f 72/74/72 49/49/49 45/45/45 -f 213/222/214 65/67/65 66/68/66 -f 66/68/66 77/82/77 213/222/214 -f 215/224/216 214/223/215 67/69/67 -f 67/69/67 70/72/70 215/224/216 -f 216/225/217 73/75/73 55/78/55 -f 55/78/55 54/226/54 216/225/217 -f 217/227/218 58/80/58 75/79/75 -f 75/79/75 76/81/76 217/227/218 -f 76/81/76 75/79/75 77/82/77 -f 215/224/216 70/72/70 73/75/73 -f 73/75/73 216/225/217 215/224/216 -f 217/232/218 60/231/60 56/56/56 -f 56/56/56 58/60/58 217/232/218 -f 217/232/218 61/233/61 60/231/60 -f 45/45/45 49/49/49 46/46/46 -f 47/47/47 43/43/43 44/44/44 -f 44/44/44 48/48/48 47/47/47 -f 147/155/146 218/234/219 219/235/220 -f 219/235/220 162/170/161 145/153/144 -f 145/153/144 147/155/146 219/235/220 -f 185/236/221 157/165/156 220/237/222 -f 220/237/222 143/238/223 185/236/221 -f 182/192/183 158/166/157 157/165/156 -f 157/165/156 185/236/221 182/192/183 -f 153/239/152 221/240/224 222/241/225 -f 222/241/225 154/239/153 153/239/152 -f 223/32/226 224/33/93 225/242/227 -f 225/242/227 226/243/228 223/32/226 -f 226/243/228 227/36/229 228/37/230 -f 228/37/230 223/32/226 226/243/228 -f 228/37/230 227/36/229 229/38/231 -f 229/38/231 230/39/232 228/37/230 -f 231/40/233 232/41/234 230/39/232 -f 230/39/232 229/38/231 231/40/233 -f 232/41/234 231/40/233 233/244/235 -f 233/244/235 234/244/236 232/41/234 -f 235/245/237 236/47/238 234/244/236 -f 234/244/236 233/244/235 235/245/237 -f 237/47/239 238/246/240 236/47/238 -f 224/33/93 239/46/241 240/49/242 -f 240/49/242 225/242/227 224/33/93 -f 241/50/243 242/51/244 243/52/245 -f 243/52/245 244/53/246 241/50/243 -f 245/54/247 246/55/248 247/56/56 -f 247/56/56 244/57/246 245/54/247 -f 244/57/246 243/58/245 245/54/247 -f 247/56/56 246/55/248 248/59/57 -f 248/59/57 249/60/249 247/56/56 -f 250/64/250 251/61/251 252/62/252 -f 252/62/252 253/63/253 250/64/250 -f 254/65/254 255/66/255 251/61/251 -f 251/61/251 250/64/250 254/65/254 -f 254/65/254 256/68/256 257/67/257 -f 257/67/257 255/66/255 254/65/254 -f 258/70/258 259/71/259 260/72/260 -f 260/72/260 261/69/261 258/70/258 -f 262/73/262 242/51/244 241/50/243 -f 241/50/243 263/74/263 262/73/262 -f 264/75/264 265/76/265 248/77/57 -f 248/77/57 246/78/248 264/75/264 -f 266/79/266 249/80/249 248/77/57 -f 248/77/57 265/76/265 266/79/266 -f 267/81/267 268/82/268 256/68/256 -f 256/68/256 254/65/254 267/81/267 -f 254/65/254 250/64/250 267/81/267 -f 260/72/260 259/71/259 265/76/265 -f 265/76/265 264/75/264 260/72/260 -f 258/70/258 269/222/269 268/82/268 -f 268/82/268 259/71/259 258/70/258 -f 270/223/270 271/247/271 262/73/262 -f 262/73/262 263/74/263 270/223/270 -f 272/225/272 245/226/247 243/52/245 -f 243/52/245 242/51/244 272/225/272 -f 253/63/253 273/227/273 267/81/267 -f 267/81/267 250/64/250 253/63/253 -f 268/82/268 266/79/266 265/76/265 -f 265/76/265 259/71/259 268/82/268 -f 262/73/262 271/247/271 272/225/272 -f 272/225/272 242/51/244 262/73/262 -f 226/243/228 225/242/227 241/50/243 -f 241/50/243 244/53/246 226/243/228 -f 247/56/56 229/228/231 227/248/229 -f 227/248/229 226/249/228 247/56/56 -f 226/249/228 244/57/246 247/56/56 -f 247/56/56 252/250/252 229/228/231 -f 229/38/231 252/62/252 251/61/251 -f 251/61/251 231/40/233 229/38/231 -f 231/40/233 251/61/251 255/66/255 -f 255/66/255 233/244/235 231/40/233 -f 255/66/255 257/67/257 235/245/237 -f 235/245/237 233/244/235 255/66/255 -f 261/69/261 270/223/270 238/246/240 -f 238/246/240 237/47/239 261/69/261 -f 237/47/239 269/222/269 258/70/258 -f 258/70/258 261/69/261 237/47/239 -f 225/242/227 240/49/242 263/74/263 -f 263/74/263 241/50/243 225/242/227 -f 235/245/237 257/67/257 269/222/269 -f 269/222/269 237/47/239 235/245/237 -f 238/246/240 270/223/270 263/74/263 -f 263/74/263 240/49/242 238/246/240 -f 269/222/269 257/67/257 256/68/256 -f 256/68/256 268/82/268 269/222/269 -f 270/223/270 261/69/261 260/72/260 -f 260/72/260 271/247/271 270/223/270 -f 272/225/272 264/75/264 246/78/248 -f 246/78/248 245/226/247 272/225/272 -f 273/227/273 249/80/249 266/79/266 -f 266/79/266 267/81/267 273/227/273 -f 267/81/267 266/79/266 268/82/268 -f 271/247/271 260/72/260 264/75/264 -f 264/75/264 272/225/272 271/247/271 -f 273/232/273 252/250/252 247/56/56 -f 247/56/56 249/60/249 273/232/273 -f 273/232/273 253/233/253 252/250/252 -f 239/46/241 236/47/238 238/246/240 -f 238/246/240 240/49/242 239/46/241 -f 235/245/237 237/47/239 236/47/238 -f 159/167/158 161/169/160 183/193/184 -f 184/194/185 274/251/274 165/173/164 -f 274/251/274 164/172/163 163/171/162 -f 163/171/162 165/173/164 274/251/274 -f 178/252/179 181/181/182 172/181/171 -f 172/181/171 174/184/275 178/252/179 -f 149/253/148 219/235/276 218/234/277 -f 218/234/277 150/254/149 149/253/148 -f 164/255/163 162/170/278 219/235/276 -f 219/235/276 149/253/148 164/255/163 -f 178/252/179 174/184/275 175/185/279 -f 175/185/279 176/256/177 178/252/179 -f 184/193/185 183/193/280 161/169/281 -f 161/169/281 274/169/274 184/193/185 -f 176/256/177 175/185/279 183/193/280 -f 183/193/280 184/193/185 176/256/177 -f 274/169/274 161/169/281 162/170/278 -f 162/170/278 164/255/163 274/169/274 -f 275/257/282 276/258/283 277/259/284 -f 277/259/284 278/260/285 279/261/286 -f 279/261/286 280/262/287 277/259/284 -f 276/258/283 278/260/285 277/259/284 -f 277/259/284 281/263/288 282/263/289 -f 282/263/289 283/257/290 277/259/284 -f 283/257/290 275/257/282 277/259/284 -f 151/159/150 284/264/291 148/156/147 -f 163/171/162 148/156/147 284/264/291 -f 284/264/291 166/174/165 163/171/162 -f 169/177/168 166/174/165 284/264/291 -f 284/264/291 285/265/292 169/177/168 -f 167/175/166 166/174/165 169/177/168 -f 169/177/168 168/176/167 167/175/166 -f 168/176/167 180/190/181 179/189/180 -f 179/189/180 167/175/166 168/176/167 -f 286/266/293 287/267/294 288/268/295 -f 288/268/295 289/269/296 286/266/293 -f 287/267/294 290/270/297 196/271/198 -f 196/271/198 20/272/20 287/267/294 -f 291/273/298 286/266/293 292/274/299 -f 292/274/299 293/275/300 291/273/298 -f 294/276/301 295/277/302 293/275/300 -f 293/275/300 292/274/299 294/276/301 -f 296/278/303 297/279/304 298/280/305 -f 298/280/305 299/281/306 296/278/303 -f 292/274/299 300/282/307 301/283/308 -f 301/283/308 294/276/301 292/274/299 -f 293/275/300 302/284/309 303/285/310 -f 303/285/310 291/273/298 293/275/300 -f 303/285/310 302/284/309 5/286/5 -f 5/286/5 8/287/8 303/285/310 -f 286/266/293 289/269/296 300/282/307 -f 300/282/307 292/274/299 286/266/293 -f 304/288/311 305/289/312 306/290/313 -f 306/290/313 299/281/306 304/288/311 -f 307/291/314 308/292/315 299/281/306 -f 299/281/306 306/290/313 307/291/314 -f 309/293/316 306/290/313 305/289/312 -f 305/289/312 310/294/317 309/293/316 -f 309/293/316 311/295/318 307/291/314 -f 307/291/314 306/290/313 309/293/316 -f 196/271/198 290/270/297 303/285/310 -f 303/285/310 8/287/8 196/271/198 -f 304/288/311 299/281/306 298/280/305 -f 298/280/305 312/296/319 304/288/311 -f 313/297/320 314/298/321 315/299/322 -f 315/299/322 316/300/323 313/297/320 -f 307/291/314 315/299/322 314/298/321 -f 314/298/321 308/292/315 307/291/314 -f 317/301/324 318/302/325 319/303/326 -f 319/303/326 316/304/323 317/301/324 -f 316/300/323 315/299/322 320/305/327 -f 320/305/327 317/306/324 316/300/323 -f 320/305/327 315/299/322 307/291/314 -f 307/291/314 311/295/318 320/305/327 -f 319/303/326 321/307/328 313/308/320 -f 313/308/320 316/304/323 319/303/326 -f 321/307/328 322/309/329 323/310/330 -f 323/310/330 313/308/320 321/307/328 -f 293/275/300 295/277/302 302/284/309 -f 324/311/331 325/312/332 314/298/321 -f 314/298/321 313/297/320 324/311/331 -f 313/308/320 323/310/330 324/313/331 -f 19/314/19 323/310/330 322/309/329 -f 322/309/329 288/268/295 19/314/19 -f 288/268/295 322/309/329 312/296/319 -f 312/296/319 289/269/296 288/268/295 -f 312/296/319 298/280/305 300/282/307 -f 300/282/307 289/269/296 312/296/319 -f 298/280/305 297/279/304 301/283/308 -f 301/283/308 300/282/307 298/280/305 -f 89/315/89 295/277/302 294/276/301 -f 294/276/301 10/316/10 89/315/89 -f 5/286/5 302/284/309 295/277/302 -f 295/277/302 89/315/89 5/286/5 -f 299/281/306 308/292/315 296/278/303 -f 296/278/303 308/292/315 314/298/321 -f 314/298/321 325/312/332 297/279/304 -f 297/279/304 296/278/303 314/298/321 -f 325/312/332 11/317/11 301/283/308 -f 301/283/308 297/279/304 325/312/332 -f 301/283/308 11/317/11 10/316/10 -f 10/316/10 294/276/301 301/283/308 -f 239/318/241 224/319/93 310/294/317 -f 224/319/93 223/320/226 309/293/316 -f 309/293/316 310/294/317 224/319/93 -f 311/295/318 309/293/316 223/320/226 -f 223/320/226 228/321/230 311/295/318 -f 317/301/324 232/322/234 234/323/236 -f 234/323/236 318/302/325 317/301/324 -f 234/323/236 236/324/238 318/302/325 -f 320/305/327 232/325/234 317/306/324 -f 230/326/232 320/305/327 311/295/318 -f 311/295/318 228/321/230 230/326/232 -f 288/268/295 287/267/294 20/272/20 -f 20/272/20 19/314/19 288/268/295 -f 326/327/333 327/328/334 328/329/335 -f 328/329/335 329/330/336 326/327/333 -f 327/328/334 330/331/337 331/332/338 -f 331/332/338 328/329/335 327/328/334 -f 332/333/339 331/332/338 330/331/337 -f 333/334/340 334/335/341 335/336/342 -f 336/337/343 335/336/342 334/335/341 -f 334/335/341 337/338/344 336/337/343 -f 328/329/335 338/339/345 339/340/346 -f 339/340/346 329/330/336 328/329/335 -f 331/332/338 23/341/23 338/339/345 -f 338/339/345 328/329/335 331/332/338 -f 78/342/78 23/341/23 331/332/338 -f 331/332/338 332/333/339 78/342/78 -f 340/343/347 78/344/78 332/345/339 -f 332/345/339 333/334/340 340/343/347 -f 341/346/348 340/343/347 333/334/340 -f 333/334/340 335/336/342 341/346/348 -f 342/347/349 341/346/348 335/336/342 -f 335/336/342 336/337/343 342/347/349 -f 343/348/350 344/349/351 342/347/349 -f 342/347/349 336/337/343 343/348/350 -f 345/350/352 346/351/353 16/352/16 -f 16/352/16 14/353/14 345/350/352 -f 347/354/354 31/355/31 120/356/120 -f 347/354/354 348/357/355 29/358/29 -f 29/358/29 31/355/31 347/354/354 -f 349/359/356 343/348/350 336/337/343 -f 336/337/343 337/338/344 349/359/356 -f 326/327/333 350/360/357 351/360/358 -f 351/360/358 352/361/359 327/328/334 -f 327/328/334 326/327/333 351/360/358 -f 37/362/37 39/363/39 353/364/360 -f 353/364/360 354/365/361 37/362/37 -f 353/364/360 39/363/39 41/366/41 -f 41/366/41 355/367/362 353/364/360 -f 355/368/362 41/369/41 43/370/43 -f 43/370/43 356/371/363 355/368/362 -f 349/359/356 350/360/357 326/327/333 -f 326/327/333 343/348/350 349/359/356 -f 326/327/333 329/330/336 343/348/350 -f 346/351/353 357/372/364 344/349/351 -f 344/349/351 339/340/346 346/351/353 -f 14/353/14 29/358/29 348/357/355 -f 348/357/355 345/350/352 14/353/14 -f 128/373/128 358/374/365 120/356/120 -f 358/374/365 128/373/128 127/375/127 -f 127/375/127 186/376/188 358/374/365 -f 120/356/120 358/374/365 359/377/366 -f 359/377/366 347/354/354 120/356/120 -f 357/372/364 348/357/355 347/354/354 -f 347/354/354 359/377/366 357/372/364 -f 357/372/364 346/351/353 345/350/352 -f 345/350/352 348/357/355 357/372/364 -f 339/340/346 338/339/345 16/352/16 -f 16/352/16 346/351/353 339/340/346 -f 23/341/23 16/352/16 338/339/345 -f 340/343/347 80/378/80 78/344/78 -f 186/376/188 340/343/347 341/346/348 -f 341/346/348 358/374/365 186/376/188 -f 358/374/365 341/346/348 342/347/349 -f 342/347/349 359/377/366 358/374/365 -f 359/377/366 342/347/349 344/349/351 -f 344/349/351 357/372/364 359/377/366 -f 329/330/336 339/340/346 344/349/351 -f 344/349/351 343/348/350 329/330/336 -f 340/343/347 186/376/188 80/378/80 -f 360/379/367 361/380/368 362/381/369 -f 362/381/369 363/382/370 360/379/367 -f 364/383/371 365/384/372 361/380/368 -f 361/380/368 360/379/367 364/383/371 -f 366/385/373 365/384/372 364/383/371 -f 364/383/371 367/386/374 366/385/373 -f 368/387/375 369/388/376 370/389/377 -f 370/389/377 371/390/378 368/387/375 -f 367/386/374 372/391/379 370/389/377 -f 370/389/377 369/388/376 367/386/374 -f 369/388/376 366/385/373 367/386/374 -f 352/361/359 373/392/380 330/331/337 -f 330/331/337 327/328/334 352/361/359 -f 332/333/339 330/331/337 373/392/380 -f 332/345/339 374/393/381 362/381/369 -f 362/381/369 333/334/340 332/345/339 -f 354/365/361 353/364/360 375/394/382 -f 375/394/382 376/395/383 354/365/361 -f 375/394/382 353/364/360 355/367/362 -f 355/367/362 377/396/384 375/394/382 -f 377/397/384 355/368/362 356/371/363 -f 356/371/363 378/398/385 377/397/384 -f 47/399/47 379/400/386 356/371/363 -f 356/371/363 43/370/43 47/399/47 -f 380/401/387 379/400/386 47/399/47 -f 47/399/47 46/402/46 380/401/387 -f 381/403/388 380/401/387 46/402/46 -f 46/402/46 33/404/33 381/403/388 -f 354/365/361 382/405/389 32/406/32 -f 32/406/32 37/362/37 354/365/361 -f 382/405/389 381/403/388 33/404/33 -f 33/404/33 32/406/32 382/405/389 -f 383/407/390 384/408/391 385/409/392 -f 385/409/392 386/410/393 383/407/390 -f 386/410/393 133/411/133 387/412/394 -f 387/412/394 383/407/390 386/410/393 -f 387/412/394 388/413/395 383/407/390 -f 388/413/395 387/412/394 389/414/396 -f 390/415/397 391/416/398 388/413/395 -f 388/413/395 389/414/396 390/415/397 -f 123/417/123 122/418/122 392/419/399 -f 392/419/399 393/420/400 123/417/123 -f 134/421/125 135/422/134 386/410/393 -f 386/410/393 385/409/392 134/421/125 -f 131/423/131 130/424/130 394/425/401 -f 394/425/401 395/426/402 131/423/131 -f 133/411/133 132/427/132 389/414/396 -f 389/414/396 387/412/394 133/411/133 -f 394/425/401 130/424/130 123/417/123 -f 123/417/123 393/420/400 394/425/401 -f 132/427/132 131/423/131 395/426/402 -f 395/426/402 389/414/396 132/427/132 -f 396/428/403 394/425/401 393/420/400 -f 393/420/400 397/429/404 396/428/403 -f 392/419/399 398/430/405 397/429/404 -f 397/429/404 393/420/400 392/419/399 -f 399/431/406 400/432/407 401/433/408 -f 401/433/408 402/434/409 399/431/406 -f 403/435/410 404/436/411 405/437/412 -f 405/437/412 406/438/413 403/435/410 -f 405/437/412 407/437/414 406/438/413 -f 408/439/415 409/440/416 410/441/175 -f 410/441/175 411/442/417 408/439/415 -f 411/442/417 410/441/175 412/443/418 -f 412/443/418 413/444/419 411/442/417 -f 403/435/410 406/438/413 414/445/420 -f 414/445/420 402/434/409 403/435/410 -f 415/446/421 416/447/422 417/448/423 -f 417/448/423 276/449/424 415/446/421 -f 221/240/224 153/239/152 418/450/425 -f 418/450/425 419/451/426 221/240/224 -f 391/416/398 420/452/427 388/413/395 -f 421/453/428 422/454/429 423/455/430 -f 423/455/430 424/456/293 421/453/428 -f 425/457/431 426/458/432 427/459/433 -f 427/459/433 428/460/434 425/457/431 -f 429/461/435 430/462/436 282/461/437 -f 282/461/437 281/463/438 429/461/435 -f 416/447/422 431/464/439 432/465/440 -f 432/465/440 417/448/423 416/447/422 -f 433/466/441 428/460/434 427/459/433 -f 427/459/433 434/467/442 433/466/441 -f 435/468/443 221/240/224 419/451/426 -f 419/451/426 436/469/444 435/468/443 -f 437/470/445 438/471/446 439/472/447 -f 439/472/447 440/473/448 437/470/445 -f 411/442/417 413/444/419 276/449/424 -f 276/449/424 417/448/423 411/442/417 -f 432/465/440 408/439/415 411/442/417 -f 411/442/417 417/448/423 432/465/440 -f 413/444/419 412/443/418 279/474/449 -f 279/474/449 278/475/450 413/444/419 -f 285/476/292 441/477/451 442/478/452 -f 442/478/452 443/479/453 285/476/292 -f 444/480/454 445/481/455 446/482/456 -f 446/482/456 447/483/457 444/480/454 -f 448/484/458 449/485/459 450/486/460 -f 450/486/460 420/452/427 448/484/458 -f 388/413/395 420/452/427 451/487/461 -f 451/487/461 383/407/390 388/413/395 -f 447/483/457 446/482/456 415/446/421 -f 415/446/421 276/449/424 447/483/457 -f 450/486/460 452/488/462 451/487/461 -f 451/487/461 420/452/427 450/486/460 -f 453/489/463 403/435/410 402/434/409 -f 402/434/409 401/433/408 453/489/463 -f 440/473/448 439/472/447 454/490/464 -f 454/490/464 455/491/465 440/473/448 -f 455/491/465 456/492/466 440/473/448 -f 457/493/467 455/491/465 454/490/464 -f 454/490/464 458/494/468 457/493/467 -f 459/495/469 460/496/470 456/492/466 -f 456/492/466 455/491/465 459/495/469 -f 454/490/464 461/497/471 462/498/472 -f 462/498/472 458/494/468 454/490/464 -f 463/499/473 464/500/474 465/501/475 -f 465/501/475 466/502/476 463/499/473 -f 467/503/477 468/504/478 469/505/479 -f 469/505/479 444/480/454 467/503/477 -f 445/481/455 444/480/454 469/505/479 -f 469/505/479 470/506/480 445/481/455 -f 445/481/455 470/506/480 471/507/481 -f 471/507/481 452/488/462 445/481/455 -f 383/407/390 451/487/461 472/508/482 -f 472/508/482 384/408/391 383/407/390 -f 473/509/483 449/485/459 448/484/458 -f 448/484/458 422/454/429 473/509/483 -f 443/479/453 418/510/425 153/511/152 -f 153/511/152 152/512/151 443/479/453 -f 221/240/224 435/468/443 457/493/467 -f 457/493/467 474/513/484 221/240/224 -f 144/514/485 463/499/473 466/502/476 -f 466/502/476 147/515/486 144/514/485 -f 435/468/443 459/495/469 455/491/465 -f 455/491/465 457/493/467 435/468/443 -f 436/469/444 475/516/487 459/495/469 -f 459/495/469 435/468/443 436/469/444 -f 476/517/488 399/431/406 402/434/409 -f 402/434/409 414/445/420 476/517/488 -f 477/518/489 461/497/471 478/519/490 -f 478/519/490 479/519/491 477/518/489 -f 459/495/469 475/516/487 480/520/435 -f 480/520/435 460/496/470 459/495/469 -f 481/521/492 482/522/493 406/438/413 -f 406/438/413 483/523/494 481/521/492 -f 482/522/493 140/524/495 476/517/488 -f 476/517/488 414/445/420 482/522/493 -f 440/473/448 456/492/466 484/525/496 -f 484/525/496 437/470/445 440/473/448 -f 460/496/470 428/460/434 433/466/441 -f 433/466/441 456/492/466 460/496/470 -f 433/466/441 484/525/496 456/492/466 -f 206/519/497 479/519/491 478/519/490 -f 478/519/490 485/519/498 206/519/497 -f 437/470/445 484/525/496 201/526/499 -f 201/526/499 212/527/500 437/470/445 -f 486/528/501 138/529/502 137/530/503 -f 137/530/503 481/521/492 486/528/501 -f 422/454/429 448/484/458 391/416/398 -f 391/416/398 390/415/397 423/455/430 -f 423/455/430 422/454/429 391/416/398 -f 487/531/504 397/429/404 398/430/405 -f 398/430/405 488/532/505 487/531/504 -f 489/533/506 396/428/403 151/534/150 -f 151/534/150 150/535/149 489/533/506 -f 396/428/403 397/429/404 487/531/504 -f 487/531/504 151/534/150 396/428/403 -f 386/410/393 135/422/134 133/411/133 -f 490/536/507 491/537/508 447/483/457 -f 447/483/457 276/449/424 490/536/507 -f 453/489/463 404/436/411 403/435/410 -f 409/440/416 406/438/413 407/437/414 -f 409/440/416 407/437/414 492/538/509 -f 492/538/509 410/441/175 409/440/416 -f 410/441/175 492/538/509 493/539/510 -f 493/539/510 412/443/418 410/441/175 -f 280/540/511 279/474/449 412/443/418 -f 412/443/418 493/539/510 280/540/511 -f 407/437/414 405/437/412 494/437/512 -f 495/539/513 492/538/509 407/437/414 -f 407/437/414 494/437/512 495/539/513 -f 493/539/510 492/538/509 495/539/513 -f 495/539/513 496/539/514 493/539/510 -f 282/461/437 430/462/436 497/541/515 -f 497/541/515 283/475/516 282/461/437 -f 434/467/442 203/542/517 202/543/518 -f 202/543/518 433/466/441 434/467/442 -f 209/544/519 138/529/502 486/528/501 -f 486/528/501 498/545/520 209/544/519 -f 140/524/495 203/542/517 434/467/442 -f 434/467/442 476/517/488 140/524/495 -f 399/431/406 476/517/488 434/467/442 -f 434/467/442 427/459/433 399/431/406 -f 400/432/407 399/431/406 427/459/433 -f 427/459/433 426/458/432 400/432/407 -f 432/465/440 431/464/439 486/528/501 -f 486/528/501 481/521/492 432/465/440 -f 408/439/415 432/465/440 481/521/492 -f 481/521/492 483/523/494 408/439/415 -f 422/454/429 421/453/428 499/546/521 -f 499/546/521 473/509/483 422/454/429 -f 205/547/522 498/545/520 479/519/491 -f 479/519/491 206/519/497 205/547/522 -f 421/453/428 477/518/489 479/519/491 -f 479/519/491 498/545/520 421/453/428 -f 500/548/523 489/533/506 150/535/149 -f 150/535/149 501/549/524 500/548/523 -f 218/550/277 147/515/486 466/502/476 -f 466/502/476 502/551/525 218/550/277 -f 466/502/476 465/501/475 502/551/525 -f 395/426/402 500/548/523 390/415/397 -f 390/415/397 389/414/396 395/426/402 -f 489/533/506 500/548/523 395/426/402 -f 395/426/402 394/425/401 489/533/506 -f 202/543/518 201/526/499 484/525/496 -f 484/525/496 433/466/441 202/543/518 -f 480/520/435 425/457/431 428/460/434 -f 428/460/434 460/496/470 480/520/435 -f 477/518/489 421/453/428 424/456/293 -f 424/456/293 503/552/526 477/518/489 -f 477/518/489 503/552/526 462/498/472 -f 462/498/472 461/497/471 477/518/489 -f 431/464/439 499/546/521 498/545/520 -f 498/545/520 486/528/501 431/464/439 -f 431/464/439 416/447/422 473/509/483 -f 473/509/483 499/546/521 431/464/439 -f 415/446/421 449/485/459 473/509/483 -f 473/509/483 416/447/422 415/446/421 -f 446/482/456 450/486/460 449/485/459 -f 449/485/459 415/446/421 446/482/456 -f 452/488/462 471/507/481 472/508/482 -f 472/508/482 451/487/461 452/488/462 -f 445/481/455 452/488/462 450/486/460 -f 450/486/460 446/482/456 445/481/455 -f 458/494/468 464/500/474 474/513/484 -f 474/513/484 457/493/467 458/494/468 -f 462/498/472 465/501/475 464/500/474 -f 464/500/474 458/494/468 462/498/472 -f 465/501/475 462/498/472 503/552/526 -f 503/552/526 502/551/525 465/501/475 -f 424/456/293 501/549/524 502/551/525 -f 502/551/525 503/552/526 424/456/293 -f 501/549/524 150/535/149 218/550/277 -f 218/550/277 502/551/525 501/549/524 -f 430/462/436 429/461/435 504/553/527 -f 505/554/528 497/541/515 430/462/436 -f 430/462/436 504/553/527 505/554/528 -f 467/503/477 505/554/528 504/553/527 -f 504/553/527 468/504/478 467/503/477 -f 497/541/515 490/536/507 275/536/529 -f 275/536/529 283/475/516 497/541/515 -f 491/537/508 490/536/507 497/541/515 -f 497/541/515 505/554/528 491/537/508 -f 491/537/508 505/554/528 467/503/477 -f 444/480/454 447/483/457 491/537/508 -f 491/537/508 467/503/477 444/480/454 -f 488/532/505 442/478/452 441/477/451 -f 441/477/451 487/531/504 488/532/505 -f 489/533/506 394/425/401 396/428/403 -f 275/536/529 490/536/507 276/449/424 -f 278/475/450 276/449/424 413/444/419 -f 474/513/484 464/500/474 463/499/473 -f 463/499/473 143/555/223 474/513/484 -f 409/440/416 483/523/494 406/438/413 -f 140/524/495 482/522/493 481/521/492 -f 481/521/492 137/530/503 140/524/495 -f 205/547/522 209/544/519 498/545/520 -f 391/416/398 448/484/458 420/452/427 -f 493/539/510 496/539/514 280/540/511 -f 482/522/493 414/445/420 406/438/413 -f 408/439/415 483/523/494 409/440/416 -f 474/513/484 143/555/223 220/556/222 -f 220/556/222 222/241/225 221/240/224 -f 221/240/224 474/513/484 220/556/222 -f 143/555/223 463/499/473 144/514/485 -f 498/545/520 499/546/521 421/453/428 -f 501/549/524 424/456/293 423/455/430 -f 423/455/430 500/548/523 501/549/524 -f 284/557/291 487/531/504 441/477/451 -f 285/476/292 284/557/291 441/477/451 -f 151/534/150 487/531/504 284/557/291 -f 423/455/430 390/415/397 500/548/523 -f 437/470/445 212/527/500 438/471/446 -f 478/519/490 439/472/447 438/471/446 -f 438/471/446 485/519/498 478/519/490 -f 454/490/464 439/472/447 478/519/490 -f 478/519/490 461/497/471 454/490/464 -f 304/288/311 321/307/328 319/303/326 -f 319/303/326 305/289/312 304/288/311 -f 310/294/317 305/289/312 319/303/326 -f 319/303/326 318/302/325 310/294/317 -f 318/302/325 236/324/238 239/318/241 -f 239/318/241 310/294/317 318/302/325 -f 211/220/212 506/558/530 438/559/531 -f 438/559/531 212/221/213 211/220/212 -f 209/218/210 205/214/206 208/217/209 -f 208/217/209 210/219/211 209/218/210 -f 207/216/208 206/215/207 485/560/532 -f 485/560/532 507/561/533 207/216/208 -f 438/559/531 506/559/530 507/561/533 -f 507/561/533 485/560/532 438/559/531 -f 508/562/534 509/563/535 199/564/536 -f 199/564/536 204/565/537 508/562/534 -f 141/566/538 510/567/539 508/562/534 -f 508/562/534 204/565/537 141/566/538 -f 511/568/540 510/567/539 141/566/538 -f 141/566/538 136/569/541 511/568/540 -f 512/570/542 511/568/540 136/569/541 -f 136/569/541 139/571/543 512/570/542 -f 513/572/544 512/570/542 139/571/543 -f 139/571/543 210/573/545 513/572/544 -f 210/573/545 208/574/546 514/575/547 -f 514/575/547 513/572/544 210/573/545 -f 207/576/548 507/577/549 506/578/550 -f 515/579/551 516/580/552 207/576/548 -f 207/576/548 506/578/550 515/579/551 -f 517/581/553 515/579/551 506/578/550 -f 506/578/550 211/581/554 517/581/553 -f 518/582/555 517/581/553 211/581/554 -f 211/581/554 200/583/556 518/582/555 -f 208/574/546 207/576/548 516/580/552 -f 516/580/552 514/575/547 208/574/546 -f 200/583/556 199/564/536 509/563/535 -f 509/563/535 518/582/555 200/583/556 -f 519/584/264 518/582/555 509/563/535 -f 509/563/535 508/562/534 519/584/264 -f 518/582/555 519/584/264 517/581/553 -f 519/584/264 516/580/552 515/579/551 -f 515/579/551 517/581/553 519/584/264 -f 516/580/552 519/584/264 514/575/547 -f 514/575/547 519/584/264 513/572/544 -f 513/572/544 519/584/264 512/570/542 -f 512/570/542 519/584/264 511/568/540 -f 519/584/264 508/562/534 510/567/539 -f 510/567/539 511/568/540 519/584/264 -f 11/11/11 194/205/196 82/87/82 -f 85/90/85 84/89/84 17/17/17 -f 17/17/17 196/207/198 85/90/85 -f 86/91/86 85/90/85 196/207/198 -f 196/207/198 197/208/199 86/91/86 -f 87/92/87 86/91/86 197/208/199 -f 197/208/199 198/209/1 87/92/87 -f 187/198/189 84/89/84 15/15/15 -f 15/15/15 24/24/24 187/198/189 -f 188/199/190 187/198/189 24/24/24 -f 24/24/24 25/25/25 188/199/190 -f 27/27/27 188/199/190 195/206/197 -f 195/206/197 191/202/193 27/27/27 -f 323/310/330 19/314/19 194/585/196 -f 194/585/196 324/313/331 323/310/330 -f 11/317/11 325/312/332 324/311/331 -f 324/311/331 194/586/196 11/317/11 -f 320/305/327 230/326/232 232/325/234 -f 290/270/297 287/267/294 286/266/293 -f 286/266/293 291/273/298 290/270/297 -f 290/270/297 291/273/298 303/285/310 -f 379/400/386 520/587/557 378/398/385 -f 378/398/385 356/371/363 379/400/386 -f 380/401/387 521/588/558 520/587/557 -f 520/587/557 379/400/386 380/401/387 -f 381/403/388 372/391/379 521/588/558 -f 521/588/558 380/401/387 381/403/388 -f 376/395/383 522/589/559 382/405/389 -f 382/405/389 354/365/361 376/395/383 -f 522/589/559 372/391/379 381/403/388 -f 381/403/388 382/405/389 522/589/559 -f 376/395/383 375/394/382 523/590/560 -f 523/590/560 371/390/378 376/395/383 -f 523/590/560 375/394/382 377/396/384 -f 377/396/384 524/591/561 523/590/560 -f 524/592/561 377/397/384 378/398/385 -f 378/398/385 363/382/370 524/592/561 -f 520/587/557 360/379/367 363/382/370 -f 363/382/370 378/398/385 520/587/557 -f 521/588/558 364/383/371 360/379/367 -f 360/379/367 520/587/557 521/588/558 -f 367/386/374 364/383/371 521/588/558 -f 521/588/558 372/391/379 367/386/374 -f 371/390/378 370/389/377 522/589/559 -f 522/589/559 376/395/383 371/390/378 -f 372/391/379 522/589/559 370/389/377 -f 371/390/378 523/590/560 525/593/562 -f 525/593/562 368/387/375 371/390/378 -f 525/593/562 523/590/560 524/591/561 -f 524/591/561 374/594/381 525/593/562 -f 374/393/381 524/592/561 363/382/370 -f 363/382/370 362/381/369 374/393/381 -f 361/380/368 334/335/341 333/334/340 -f 333/334/340 362/381/369 361/380/368 -f 337/338/344 334/335/341 361/380/368 -f 361/380/368 365/384/372 337/338/344 -f 349/359/356 337/338/344 365/384/372 -f 365/384/372 366/385/373 349/359/356 -f 350/360/357 349/359/356 366/385/373 -f 366/385/373 369/388/376 350/360/357 -f 368/387/375 351/360/358 350/360/357 -f 350/360/357 369/388/376 368/387/375 -f 351/360/358 368/387/375 352/361/359 -f 373/392/380 352/361/359 368/387/375 -f 368/387/375 525/593/562 373/392/380 -f 525/593/562 374/594/381 332/333/339 -f 332/333/339 373/392/380 525/593/562 -f 304/288/311 312/296/319 322/309/329 -f 322/309/329 321/307/328 304/288/311 -f 154/162/153 222/595/225 156/164/155 -f 169/177/168 285/265/292 152/160/151 -f 156/164/155 169/177/168 152/160/151 -f 154/162/153 156/164/155 152/160/151 -f 157/165/156 156/164/155 222/595/225 -f 222/595/225 220/237/222 157/165/156 -f 152/512/151 285/476/292 443/479/453 -f 108/113/108 110/115/110 526/596/91 -f 526/596/91 109/114/109 108/113/108 -f 1/1/1 527/4/563 528/3/564 -f 528/3/564 2/2/2 1/1/1 -f 529/5/565 530/8/566 7/7/7 -f 7/7/7 6/6/6 529/5/565 -f 9/9/9 12/12/12 531/11/567 -f 531/11/567 532/10/568 9/9/9 -f 533/13/569 534/14/570 528/3/564 -f 528/3/564 527/4/563 533/13/569 -f 535/15/571 536/16/572 534/14/570 -f 534/14/570 533/13/569 535/15/571 -f 537/17/573 538/20/574 539/19/575 -f 539/19/575 540/18/576 537/17/573 -f 2/2/2 528/3/564 541/22/577 -f 541/22/577 21/21/21 2/2/2 -f 542/23/578 536/16/572 535/15/571 -f 535/15/571 543/24/579 542/23/578 -f 544/25/580 545/26/581 542/23/578 -f 542/23/578 543/24/579 544/25/580 -f 546/27/582 540/18/576 539/19/575 -f 539/19/575 547/28/583 546/27/582 -f 548/29/584 549/31/585 550/30/586 -f 550/30/586 541/22/577 548/29/584 -f 551/32/587 552/35/588 553/34/589 -f 553/34/589 554/33/590 551/32/587 -f 552/35/588 551/32/587 555/37/591 -f 555/37/591 556/36/592 552/35/588 -f 556/36/592 555/37/591 557/39/593 -f 557/39/593 558/38/594 556/36/592 -f 559/40/595 558/38/594 557/39/593 -f 557/39/593 560/41/596 559/40/595 -f 561/42/597 559/40/595 560/41/596 -f 560/41/596 562/43/598 561/42/597 -f 561/42/597 562/43/598 563/44/599 -f 564/47/600 565/46/601 566/45/602 -f 566/45/602 567/48/603 564/47/600 -f 554/33/590 553/34/589 568/49/604 -f 568/49/604 565/46/601 554/33/590 -f 569/50/605 570/53/606 571/52/607 -f 571/52/607 572/51/608 569/50/605 -f 573/54/609 571/58/607 570/57/606 -f 574/56/610 575/55/611 573/54/609 -f 573/54/609 570/57/606 574/56/610 -f 576/59/612 575/55/611 574/56/610 -f 574/56/610 577/60/613 576/59/612 -f 578/61/614 579/64/615 580/63/616 -f 580/63/616 581/62/617 578/61/614 -f 582/65/618 579/64/615 578/61/614 -f 578/61/614 583/66/619 582/65/618 -f 584/67/620 585/68/621 582/65/618 -f 582/65/618 583/66/619 584/67/620 -f 586/69/622 587/72/623 588/71/624 -f 588/71/624 589/70/625 586/69/622 -f 590/73/626 591/74/627 569/50/605 -f 569/50/605 572/51/608 590/73/626 -f 592/75/628 575/78/611 576/77/612 -f 576/77/612 593/76/629 592/75/628 -f 594/79/630 593/76/629 576/77/612 -f 576/77/612 577/80/613 594/79/630 -f 595/81/631 579/64/615 582/65/618 -f 585/68/621 596/82/632 595/81/631 -f 595/81/631 582/65/618 585/68/621 -f 587/72/623 592/75/628 593/76/629 -f 593/76/629 588/71/624 587/72/623 -f 597/83/633 542/23/578 545/26/581 -f 545/26/581 598/84/634 597/83/633 -f 599/85/635 597/83/633 598/84/634 -f 598/84/634 600/86/636 599/85/635 -f 601/87/637 531/11/567 12/12/12 -f 12/12/12 83/88/83 601/87/637 -f 541/22/577 528/3/564 534/14/570 -f 534/14/570 548/29/584 541/22/577 -f 602/89/638 535/15/571 533/13/569 -f 533/13/569 603/90/639 602/89/638 -f 603/90/639 533/13/569 527/4/563 -f 527/4/563 604/91/640 603/90/639 -f 604/91/640 527/4/563 1/1/1 -f 1/1/1 87/92/87 604/91/640 -f 88/93/88 9/9/9 532/10/568 -f 532/10/568 605/94/641 88/93/88 -f 601/87/637 83/88/83 90/95/90 -f 90/95/90 547/28/583 601/87/637 -f 529/5/565 6/6/6 91/96/91 -f 91/96/91 606/97/642 529/5/565 -f 607/98/643 96/101/96 95/100/95 -f 95/100/95 608/99/644 607/98/643 -f 609/102/645 99/104/99 98/103/98 -f 98/103/98 608/99/644 609/102/645 -f 98/103/98 100/105/100 607/98/643 -f 607/98/643 608/99/644 98/103/98 -f 101/106/101 104/109/104 610/108/643 -f 610/108/643 611/107/646 101/106/101 -f 610/108/643 106/111/106 105/110/105 -f 105/110/105 611/107/646 610/108/643 -f 607/98/643 611/107/646 105/110/105 -f 105/110/105 96/101/96 607/98/643 -f 608/99/644 95/100/95 107/112/107 -f 107/112/107 609/102/645 608/99/644 -f 107/112/107 109/114/109 612/113/647 -f 612/113/647 609/102/645 107/112/107 -f 99/104/99 609/102/645 612/113/647 -f 612/113/647 110/115/110 99/104/99 -f 101/106/101 611/107/646 607/98/643 -f 607/98/643 100/105/100 101/106/101 -f 104/109/104 88/117/88 613/116/648 -f 613/116/648 610/108/643 104/109/104 -f 610/108/643 613/116/648 91/118/91 -f 91/118/91 106/111/106 610/108/643 -f 112/119/112 614/122/649 615/121/650 -f 615/121/650 113/120/113 112/119/112 -f 616/123/651 550/30/586 549/31/585 -f 549/31/585 617/124/652 616/123/651 -f 118/125/118 119/126/119 550/30/586 -f 550/30/586 616/123/651 118/125/118 -f 618/127/653 619/128/654 617/124/652 -f 617/124/652 549/31/585 618/127/653 -f 91/96/91 613/129/648 606/97/642 -f 605/94/641 613/129/648 88/93/88 -f 606/97/642 613/129/648 605/94/641 -f 605/94/641 529/5/565 606/97/642 -f 21/21/21 541/22/577 550/30/586 -f 550/30/586 119/126/119 21/21/21 -f 616/123/651 620/131/655 122/130/122 -f 122/130/122 118/125/118 616/123/651 -f 614/122/649 112/119/112 125/133/125 -f 125/133/125 621/132/656 614/122/649 -f 622/134/657 623/137/658 624/136/659 -f 624/136/659 625/135/660 622/134/657 -f 618/127/653 624/136/659 623/137/658 -f 623/137/658 619/128/654 618/127/653 -f 616/123/651 617/124/652 626/138/661 -f 626/138/661 620/131/655 616/123/651 -f 619/128/654 627/140/662 628/139/663 -f 628/139/663 617/124/652 619/128/654 -f 628/139/663 626/138/661 617/124/652 -f 619/128/654 623/137/658 627/140/662 -f 627/140/662 623/137/658 622/134/657 -f 622/134/657 629/141/664 627/140/662 -f 134/142/125 630/143/665 621/132/656 -f 621/132/656 125/133/125 134/142/125 -f 631/144/666 632/147/667 633/146/668 -f 633/146/668 634/145/669 631/144/666 -f 635/148/670 636/149/363 631/144/666 -f 631/144/666 634/145/669 635/148/670 -f 637/150/671 638/152/672 639/151/673 -f 640/153/674 638/152/672 637/150/671 -f 637/150/671 641/154/675 640/153/674 -f 638/152/672 640/153/674 642/155/676 -f 643/156/677 644/159/678 645/158/679 -f 645/158/679 646/157/680 643/156/677 -f 647/160/681 648/162/682 649/161/683 -f 650/163/684 651/166/685 652/165/686 -f 652/165/686 653/164/516 650/163/684 -f 641/154/675 654/168/687 655/167/688 -f 655/167/688 640/153/674 641/154/675 -f 656/169/689 657/170/690 640/153/674 -f 640/153/674 655/167/688 656/169/689 -f 658/171/691 643/156/677 646/157/680 -f 646/157/680 659/172/692 658/171/691 -f 660/173/693 661/175/694 662/174/695 -f 662/174/695 658/171/691 660/173/693 -f 650/163/684 653/164/516 663/177/696 -f 663/177/696 664/176/697 650/163/684 -f 665/178/271 666/180/698 667/179/699 -f 668/183/700 667/182/701 666/181/702 -f 666/181/702 669/184/703 668/183/700 -f 668/183/700 669/184/703 670/185/704 -f 671/186/705 672/188/706 673/187/707 -f 674/189/708 673/187/707 672/188/706 -f 675/191/709 676/190/710 674/189/708 -f 674/189/708 672/188/706 675/191/709 -f 675/191/709 666/180/698 665/178/271 -f 665/178/271 676/190/710 675/191/709 -f 667/179/699 677/192/711 651/166/685 -f 651/166/685 665/178/271 667/179/699 -f 651/166/685 650/163/684 665/178/271 -f 668/183/700 655/167/688 654/168/687 -f 654/168/687 667/182/701 668/183/700 -f 655/167/688 668/183/700 670/185/704 -f 670/185/704 678/193/712 655/167/688 -f 660/173/693 679/194/713 671/186/705 -f 673/187/707 661/175/694 660/173/693 -f 660/173/693 671/186/705 673/187/707 -f 673/187/707 674/189/708 661/175/694 -f 665/178/271 650/163/684 664/176/697 -f 664/176/697 676/190/710 665/178/271 -f 639/151/673 680/195/714 641/154/675 -f 641/154/675 637/150/671 639/151/673 -f 654/168/687 641/154/675 680/195/714 -f 680/195/714 677/196/715 654/168/687 -f 654/168/687 677/196/715 667/182/701 -f 615/121/650 681/197/716 599/85/635 -f 599/85/635 600/86/636 615/121/650 -f 540/18/576 682/198/717 602/89/638 -f 602/89/638 537/17/573 540/18/576 -f 546/27/582 683/199/718 682/198/717 -f 682/198/717 540/18/576 546/27/582 -f 189/200/191 190/201/192 545/26/581 -f 545/26/581 544/25/580 189/200/191 -f 547/28/583 90/95/90 191/202/193 -f 191/202/193 546/27/582 547/28/583 -f 190/201/192 192/203/194 598/84/634 -f 598/84/634 545/26/581 190/201/192 -f 192/203/194 193/204/195 600/86/636 -f 600/86/636 598/84/634 192/203/194 -f 539/19/575 684/205/719 601/87/637 -f 601/87/637 547/28/583 539/19/575 -f 614/122/649 625/135/660 681/197/716 -f 681/197/716 615/121/650 614/122/649 -f 621/132/656 622/134/657 625/135/660 -f 625/135/660 614/122/649 621/132/656 -f 113/120/113 615/121/650 600/86/636 -f 600/86/636 193/204/195 113/120/113 -f 195/206/197 189/200/191 544/25/580 -f 544/25/580 683/199/718 195/206/197 -f 629/141/664 622/134/657 621/132/656 -f 621/132/656 630/143/665 629/141/664 -f 537/17/573 685/207/720 538/20/574 -f 685/207/720 686/208/721 530/8/566 -f 7/7/7 530/8/566 686/208/721 -f 686/208/721 198/209/1 7/7/7 -f 687/210/722 688/212/723 689/211/724 -f 689/211/724 690/211/725 687/210/722 -f 688/212/723 687/210/722 691/213/726 -f 691/213/726 692/213/727 688/212/723 -f 693/214/728 694/217/729 695/216/730 -f 695/216/730 696/215/731 693/214/728 -f 633/146/668 632/147/667 697/219/732 -f 697/219/732 698/218/733 633/146/668 -f 690/211/725 689/211/724 699/221/734 -f 699/221/734 700/220/735 690/211/725 -f 692/213/727 691/213/726 636/149/363 -f 636/149/363 635/148/670 692/213/727 -f 588/71/624 596/82/632 701/222/736 -f 701/222/736 589/70/625 588/71/624 -f 591/74/627 590/73/626 702/224/737 -f 702/224/737 703/223/738 591/74/627 -f 704/225/739 572/51/608 571/52/607 -f 571/52/607 573/226/609 704/225/739 -f 580/63/616 579/64/615 595/81/631 -f 595/81/631 705/227/740 580/63/616 -f 596/82/632 588/71/624 593/76/629 -f 593/76/629 594/79/630 596/82/632 -f 704/225/739 702/224/737 590/73/626 -f 590/73/626 572/51/608 704/225/739 -f 553/34/589 552/35/588 570/53/606 -f 570/53/606 569/50/605 553/34/589 -f 574/56/610 570/57/606 552/230/588 -f 556/229/592 558/228/594 574/56/610 -f 574/56/610 552/230/588 556/229/592 -f 558/228/594 581/231/617 574/56/610 -f 581/62/617 558/38/594 559/40/595 -f 559/40/595 578/61/614 581/62/617 -f 559/40/595 561/42/597 583/66/619 -f 583/66/619 578/61/614 559/40/595 -f 583/66/619 561/42/597 563/44/599 -f 563/44/599 584/67/620 583/66/619 -f 586/69/622 589/70/625 567/48/603 -f 566/45/602 703/223/738 586/69/622 -f 586/69/622 567/48/603 566/45/602 -f 553/34/589 569/50/605 591/74/627 -f 591/74/627 568/49/604 553/34/589 -f 567/48/603 589/70/625 701/222/736 -f 701/222/736 584/67/620 563/44/599 -f 563/44/599 567/48/603 701/222/736 -f 566/45/602 568/49/604 591/74/627 -f 591/74/627 703/223/738 566/45/602 -f 701/222/736 596/82/632 585/68/621 -f 585/68/621 584/67/620 701/222/736 -f 702/224/737 587/72/623 586/69/622 -f 586/69/622 703/223/738 702/224/737 -f 704/225/739 573/226/609 575/78/611 -f 575/78/611 592/75/628 704/225/739 -f 705/227/740 595/81/631 594/79/630 -f 594/79/630 577/80/613 705/227/740 -f 596/82/632 594/79/630 595/81/631 -f 702/224/737 704/225/739 592/75/628 -f 592/75/628 587/72/623 702/224/737 -f 574/56/610 581/231/617 705/232/740 -f 705/232/740 577/60/613 574/56/610 -f 581/231/617 580/233/616 705/232/740 -f 566/45/602 565/46/601 568/49/604 -f 563/44/599 562/43/598 564/47/600 -f 564/47/600 567/48/603 563/44/599 -f 640/153/674 657/170/690 706/235/741 -f 706/235/741 642/155/676 640/153/674 -f 706/235/741 707/234/742 642/155/676 -f 680/236/743 639/238/744 708/237/745 -f 708/237/745 652/165/686 680/236/743 -f 677/192/711 680/236/743 652/165/686 -f 652/165/686 651/166/685 677/192/711 -f 649/239/683 648/239/682 709/241/746 -f 709/241/746 710/240/747 649/239/683 -f 711/32/748 712/243/749 713/242/750 -f 713/242/750 714/33/751 711/32/748 -f 712/243/749 711/32/748 715/37/752 -f 715/37/752 716/36/753 712/243/749 -f 715/37/752 717/39/754 718/38/755 -f 718/38/755 716/36/753 715/37/752 -f 719/40/756 718/38/755 717/39/754 -f 717/39/754 720/41/757 719/40/756 -f 720/41/757 721/244/758 722/244/759 -f 722/244/759 719/40/756 720/41/757 -f 721/244/758 723/47/760 724/245/761 -f 724/245/761 722/244/759 721/244/758 -f 725/47/762 723/47/760 726/246/763 -f 714/33/751 713/242/750 727/49/764 -f 727/49/764 728/46/765 714/33/751 -f 729/50/766 730/53/767 731/52/768 -f 731/52/768 732/51/769 729/50/766 -f 733/54/770 731/58/768 730/57/767 -f 734/56/610 735/55/771 733/54/770 -f 733/54/770 730/57/767 734/56/610 -f 736/59/612 735/55/771 734/56/610 -f 734/56/610 737/60/772 736/59/612 -f 738/64/773 739/63/774 740/62/775 -f 740/62/775 741/61/776 738/64/773 -f 742/65/777 738/64/773 741/61/776 -f 741/61/776 743/66/778 742/65/777 -f 742/65/777 743/66/778 744/67/779 -f 744/67/779 745/68/780 742/65/777 -f 746/70/781 747/69/782 748/72/783 -f 748/72/783 749/71/784 746/70/781 -f 750/73/785 751/74/786 729/50/766 -f 729/50/766 732/51/769 750/73/785 -f 752/75/787 735/78/771 736/77/612 -f 736/77/612 753/76/788 752/75/787 -f 754/79/789 753/76/788 736/77/612 -f 736/77/612 737/80/772 754/79/789 -f 755/81/790 738/64/773 742/65/777 -f 745/68/780 756/82/791 755/81/790 -f 755/81/790 742/65/777 745/68/780 -f 748/72/783 752/75/787 753/76/788 -f 753/76/788 749/71/784 748/72/783 -f 746/70/781 749/71/784 756/82/791 -f 756/82/791 757/222/792 746/70/781 -f 758/223/793 751/74/786 750/73/785 -f 750/73/785 759/247/169 758/223/793 -f 760/225/794 732/51/769 731/52/768 -f 731/52/768 733/226/770 760/225/794 -f 739/63/774 738/64/773 755/81/790 -f 755/81/790 761/227/795 739/63/774 -f 756/82/791 749/71/784 753/76/788 -f 753/76/788 754/79/789 756/82/791 -f 750/73/785 732/51/769 760/225/794 -f 760/225/794 759/247/169 750/73/785 -f 712/243/749 730/53/767 729/50/766 -f 729/50/766 713/242/750 712/243/749 -f 734/56/610 730/57/767 712/249/749 -f 716/248/753 718/228/755 734/56/610 -f 734/56/610 712/249/749 716/248/753 -f 718/228/755 740/250/775 734/56/610 -f 718/38/755 719/40/756 741/61/776 -f 741/61/776 740/62/775 718/38/755 -f 719/40/756 722/244/759 743/66/778 -f 743/66/778 741/61/776 719/40/756 -f 743/66/778 722/244/759 724/245/761 -f 724/245/761 744/67/779 743/66/778 -f 746/70/781 757/222/792 725/47/762 -f 725/47/762 747/69/782 746/70/781 -f 726/246/763 758/223/793 747/69/782 -f 747/69/782 725/47/762 726/246/763 -f 713/242/750 729/50/766 751/74/786 -f 751/74/786 727/49/764 713/242/750 -f 757/222/792 744/67/779 724/245/761 -f 724/245/761 725/47/762 757/222/792 -f 726/246/763 727/49/764 751/74/786 -f 751/74/786 758/223/793 726/246/763 -f 757/222/792 756/82/791 745/68/780 -f 745/68/780 744/67/779 757/222/792 -f 758/223/793 759/247/169 748/72/783 -f 748/72/783 747/69/782 758/223/793 -f 760/225/794 733/226/770 735/78/771 -f 735/78/771 752/75/787 760/225/794 -f 761/227/795 755/81/790 754/79/789 -f 754/79/789 737/80/772 761/227/795 -f 756/82/791 754/79/789 755/81/790 -f 759/247/169 760/225/794 752/75/787 -f 752/75/787 748/72/783 759/247/169 -f 734/56/610 740/250/775 761/232/795 -f 761/232/795 737/60/772 734/56/610 -f 740/250/775 739/233/774 761/232/795 -f 726/246/763 723/47/760 728/46/765 -f 728/46/765 727/49/764 726/246/763 -f 724/245/761 723/47/760 725/47/762 -f 655/167/688 678/193/712 656/169/689 -f 679/194/713 660/173/693 762/251/796 -f 762/251/796 660/173/693 658/171/691 -f 658/171/691 659/172/692 762/251/796 -f 672/252/706 669/184/797 666/181/698 -f 666/181/698 675/181/709 672/252/706 -f 646/253/680 645/254/679 707/234/798 -f 707/234/798 706/235/799 646/253/680 -f 659/255/692 646/253/680 706/235/799 -f 706/235/799 657/170/800 659/255/692 -f 672/252/706 671/256/705 670/185/801 -f 670/185/801 669/184/797 672/252/706 -f 679/193/713 762/169/796 656/169/802 -f 656/169/802 678/193/803 679/193/713 -f 671/256/705 679/193/713 678/193/803 -f 678/193/803 670/185/801 671/256/705 -f 762/169/796 659/255/692 657/170/800 -f 657/170/800 656/169/802 762/169/796 -f 763/257/804 277/259/284 764/258/805 -f 765/261/806 766/260/807 277/259/284 -f 277/259/284 280/262/287 765/261/806 -f 764/258/805 277/259/284 766/260/807 -f 767/263/808 281/263/288 277/259/284 -f 277/259/284 768/257/809 767/263/808 -f 768/257/809 277/259/284 763/257/804 -f 644/159/678 643/156/677 769/264/810 -f 658/171/691 662/174/695 769/264/810 -f 769/264/810 643/156/677 658/171/691 -f 663/177/696 770/265/811 769/264/810 -f 769/264/810 662/174/695 663/177/696 -f 661/175/694 664/176/697 663/177/696 -f 663/177/696 662/174/695 661/175/694 -f 664/176/697 661/175/694 674/189/708 -f 674/189/708 676/190/710 664/176/697 -f 771/266/812 772/269/813 773/268/814 -f 773/268/814 774/267/815 771/266/812 -f 774/267/815 538/272/574 685/271/720 -f 685/271/720 775/270/816 774/267/815 -f 776/273/817 777/275/818 778/274/819 -f 778/274/819 771/266/812 776/273/817 -f 779/276/820 778/274/819 777/275/818 -f 777/275/818 780/277/821 779/276/820 -f 781/278/822 782/281/823 783/280/824 -f 783/280/824 784/279/825 781/278/822 -f 778/274/819 779/276/820 785/283/826 -f 785/283/826 786/282/827 778/274/819 -f 777/275/818 776/273/817 787/285/828 -f 787/285/828 788/284/829 777/275/818 -f 787/285/828 530/287/566 529/286/565 -f 529/286/565 788/284/829 787/285/828 -f 771/266/812 778/274/819 786/282/827 -f 786/282/827 772/269/813 771/266/812 -f 789/288/830 782/281/823 790/290/831 -f 790/290/831 791/289/832 789/288/830 -f 782/281/823 792/292/833 793/291/834 -f 793/291/834 790/290/831 782/281/823 -f 794/293/835 795/294/836 791/289/832 -f 791/289/832 790/290/831 794/293/835 -f 794/293/835 790/290/831 793/291/834 -f 793/291/834 796/295/837 794/293/835 -f 685/271/720 530/287/566 787/285/828 -f 787/285/828 775/270/816 685/271/720 -f 789/288/830 797/296/838 783/280/824 -f 783/280/824 782/281/823 789/288/830 -f 798/297/839 799/300/840 800/299/841 -f 800/299/841 801/298/842 798/297/839 -f 801/298/842 800/299/841 793/291/834 -f 793/291/834 792/292/833 801/298/842 -f 802/301/843 799/304/840 803/303/844 -f 803/303/844 804/302/845 802/301/843 -f 799/300/840 802/306/843 805/305/846 -f 805/305/846 800/299/841 799/300/840 -f 805/305/846 796/295/837 793/291/834 -f 793/291/834 800/299/841 805/305/846 -f 803/303/844 799/304/840 798/308/839 -f 798/308/839 806/307/847 803/303/844 -f 806/307/847 798/308/839 807/310/848 -f 807/310/848 808/309/849 806/307/847 -f 777/275/818 788/284/829 780/277/821 -f 809/311/850 798/297/839 801/298/842 -f 801/298/842 810/312/851 809/311/850 -f 798/308/839 809/313/850 807/310/848 -f 539/314/575 773/268/814 808/309/849 -f 808/309/849 807/310/848 539/314/575 -f 773/268/814 772/269/813 797/296/838 -f 797/296/838 808/309/849 773/268/814 -f 797/296/838 772/269/813 786/282/827 -f 786/282/827 783/280/824 797/296/838 -f 783/280/824 786/282/827 785/283/826 -f 785/283/826 784/279/825 783/280/824 -f 605/315/641 532/316/568 779/276/820 -f 779/276/820 780/277/821 605/315/641 -f 529/286/565 605/315/641 780/277/821 -f 780/277/821 788/284/829 529/286/565 -f 782/281/823 781/278/822 792/292/833 -f 781/278/822 801/298/842 792/292/833 -f 801/298/842 781/278/822 784/279/825 -f 784/279/825 810/312/851 801/298/842 -f 810/312/851 784/279/825 785/283/826 -f 785/283/826 531/317/567 810/312/851 -f 532/316/568 531/317/567 785/283/826 -f 785/283/826 779/276/820 532/316/568 -f 728/318/765 795/294/836 714/319/751 -f 794/293/835 711/320/748 714/319/751 -f 714/319/751 795/294/836 794/293/835 -f 796/295/837 715/321/752 711/320/748 -f 711/320/748 794/293/835 796/295/837 -f 804/302/845 723/324/760 721/323/758 -f 721/323/758 720/322/757 802/301/843 -f 802/301/843 804/302/845 721/323/758 -f 805/305/846 802/306/843 720/325/757 -f 717/326/754 715/321/752 796/295/837 -f 796/295/837 805/305/846 717/326/754 -f 773/268/814 539/314/575 538/272/574 -f 538/272/574 774/267/815 773/268/814 -f 811/327/852 812/330/853 813/329/854 -f 813/329/854 814/328/855 811/327/852 -f 814/328/855 813/329/854 815/332/856 -f 815/332/856 816/331/857 814/328/855 -f 817/333/858 816/331/857 815/332/856 -f 818/334/859 819/336/860 820/335/861 -f 821/337/862 822/338/863 820/335/861 -f 820/335/861 819/336/860 821/337/862 -f 813/329/854 812/330/853 823/340/864 -f 823/340/864 824/339/865 813/329/854 -f 815/332/856 813/329/854 824/339/865 -f 824/339/865 542/341/578 815/332/856 -f 597/342/633 817/333/858 815/332/856 -f 815/332/856 542/341/578 597/342/633 -f 825/343/866 818/334/859 817/345/858 -f 817/345/858 597/344/633 825/343/866 -f 826/346/867 819/336/860 818/334/859 -f 818/334/859 825/343/866 826/346/867 -f 827/347/868 821/337/862 819/336/860 -f 819/336/860 826/346/867 827/347/868 -f 828/348/869 821/337/862 827/347/868 -f 827/347/868 829/349/870 828/348/869 -f 536/352/572 830/351/871 831/350/872 -f 831/350/872 534/353/570 536/352/572 -f 832/354/873 618/356/653 549/355/585 -f 832/354/873 549/355/585 548/358/584 -f 548/358/584 833/357/874 832/354/873 -f 834/359/875 822/338/863 821/337/862 -f 821/337/862 828/348/869 834/359/875 -f 835/360/876 811/327/852 814/328/855 -f 814/328/855 836/361/877 835/360/876 -f 835/360/876 837/360/878 811/327/852 -f 555/362/591 838/365/879 839/364/880 -f 839/364/880 557/363/593 555/362/591 -f 839/364/880 840/367/102 560/366/596 -f 560/366/596 557/363/593 839/364/880 -f 840/368/102 841/371/881 562/370/598 -f 562/370/598 560/369/596 840/368/102 -f 834/359/875 828/348/869 811/327/852 -f 811/327/852 837/360/878 834/359/875 -f 811/327/852 828/348/869 812/330/853 -f 830/351/871 823/340/864 829/349/870 -f 829/349/870 842/372/882 830/351/871 -f 534/353/570 831/350/872 833/357/874 -f 833/357/874 548/358/584 534/353/570 -f 624/373/659 618/356/653 843/374/883 -f 843/374/883 681/376/716 625/375/660 -f 625/375/660 624/373/659 843/374/883 -f 618/356/653 832/354/873 844/377/884 -f 844/377/884 843/374/883 618/356/653 -f 842/372/882 844/377/884 832/354/873 -f 832/354/873 833/357/874 842/372/882 -f 842/372/882 833/357/874 831/350/872 -f 831/350/872 830/351/871 842/372/882 -f 823/340/864 830/351/871 536/352/572 -f 536/352/572 824/339/865 823/340/864 -f 542/341/578 824/339/865 536/352/572 -f 825/343/866 597/344/633 599/378/635 -f 681/376/716 843/374/883 826/346/867 -f 826/346/867 825/343/866 681/376/716 -f 843/374/883 844/377/884 827/347/868 -f 827/347/868 826/346/867 843/374/883 -f 844/377/884 842/372/882 829/349/870 -f 829/349/870 827/347/868 844/377/884 -f 812/330/853 828/348/869 829/349/870 -f 829/349/870 823/340/864 812/330/853 -f 825/343/866 599/378/635 681/376/716 -f 845/379/220 846/382/885 847/381/886 -f 847/381/886 848/380/887 845/379/220 -f 849/383/888 845/379/220 848/380/887 -f 848/380/887 850/384/889 849/383/888 -f 851/385/890 852/386/891 849/383/888 -f 849/383/888 850/384/889 851/385/890 -f 853/387/892 854/390/893 855/389/894 -f 855/389/894 856/388/895 853/387/892 -f 852/386/891 851/385/890 856/388/895 -f 855/389/894 857/391/896 852/386/891 -f 852/386/891 856/388/895 855/389/894 -f 836/361/877 814/328/855 816/331/857 -f 816/331/857 858/392/897 836/361/877 -f 817/333/858 858/392/897 816/331/857 -f 817/345/858 818/334/859 847/381/886 -f 847/381/886 859/393/898 817/345/858 -f 838/365/879 860/395/899 861/394/900 -f 861/394/900 839/364/880 838/365/879 -f 861/394/900 862/396/901 840/367/102 -f 840/367/102 839/364/880 861/394/900 -f 862/397/901 863/398/902 841/371/881 -f 841/371/881 840/368/102 862/397/901 -f 564/399/600 562/370/598 841/371/881 -f 841/371/881 864/400/903 564/399/600 -f 865/401/904 565/402/601 564/399/600 -f 564/399/600 864/400/903 865/401/904 -f 866/403/905 554/404/590 565/402/601 -f 565/402/601 865/401/904 866/403/905 -f 838/365/879 555/362/591 551/406/587 -f 551/406/587 867/405/906 838/365/879 -f 867/405/906 551/406/587 554/404/590 -f 554/404/590 866/403/905 867/405/906 -f 868/407/907 869/410/908 385/409/392 -f 385/409/392 384/408/391 868/407/907 -f 868/407/907 870/413/909 871/412/910 -f 871/412/910 629/411/664 869/410/908 -f 869/410/908 868/407/907 871/412/910 -f 870/413/909 872/416/911 873/415/912 -f 873/415/912 874/414/913 870/413/909 -f 874/414/913 871/412/910 870/413/909 -f 620/417/655 875/420/914 392/419/399 -f 392/419/399 122/418/122 620/417/655 -f 134/421/125 385/409/392 869/410/908 -f 869/410/908 630/422/665 134/421/125 -f 628/423/663 876/426/915 877/425/916 -f 877/425/916 626/424/661 628/423/663 -f 629/411/664 871/412/910 874/414/913 -f 874/414/913 627/427/662 629/411/664 -f 877/425/916 875/420/914 620/417/655 -f 620/417/655 626/424/661 877/425/916 -f 627/427/662 874/414/913 876/426/915 -f 876/426/915 628/423/663 627/427/662 -f 878/428/917 879/429/914 875/420/914 -f 875/420/914 877/425/916 878/428/917 -f 392/419/399 875/420/914 879/429/914 -f 879/429/914 398/430/405 392/419/399 -f 880/431/918 881/434/919 401/433/408 -f 401/433/408 400/432/407 880/431/918 -f 882/438/920 883/437/921 405/437/412 -f 405/437/412 404/436/411 884/435/922 -f 884/435/922 882/438/920 405/437/412 -f 885/439/923 886/442/924 887/441/703 -f 887/441/703 888/440/925 885/439/923 -f 886/442/924 889/444/926 890/443/927 -f 890/443/927 887/441/703 886/442/924 -f 884/435/922 881/434/919 891/445/928 -f 891/445/928 882/438/920 884/435/922 -f 892/446/929 764/449/930 893/448/931 -f 893/448/931 894/447/932 892/446/929 -f 710/240/747 419/451/426 418/450/425 -f 418/450/425 649/239/683 710/240/747 -f 870/413/909 895/452/933 872/416/911 -f 896/453/934 897/456/812 898/455/935 -f 898/455/935 899/454/936 896/453/934 -f 425/457/431 900/460/937 901/459/938 -f 901/459/938 426/458/432 425/457/431 -f 429/461/435 281/463/438 767/461/939 -f 767/461/939 902/462/940 429/461/435 -f 894/447/932 893/448/931 903/465/941 -f 903/465/941 904/464/942 894/447/932 -f 905/466/943 906/467/944 901/459/938 -f 901/459/938 900/460/937 905/466/943 -f 907/468/945 436/469/444 419/451/426 -f 419/451/426 710/240/747 907/468/945 -f 908/472/946 909/471/947 910/470/948 -f 910/470/948 911/473/949 908/472/946 -f 886/442/924 893/448/931 764/449/930 -f 764/449/930 889/444/926 886/442/924 -f 903/465/941 893/448/931 886/442/924 -f 886/442/924 885/439/923 903/465/941 -f 889/444/926 766/475/950 765/474/951 -f 765/474/951 890/443/927 889/444/926 -f 770/476/811 443/479/453 442/478/452 -f 442/478/452 912/477/952 770/476/811 -f 913/480/953 914/483/954 915/482/955 -f 915/482/955 916/481/956 913/480/953 -f 917/484/957 895/452/933 918/486/958 -f 918/486/958 919/485/959 917/484/957 -f 870/413/909 868/407/907 920/487/960 -f 920/487/960 895/452/933 870/413/909 -f 914/483/954 764/449/930 892/446/929 -f 892/446/929 915/482/955 914/483/954 -f 918/486/958 895/452/933 920/487/960 -f 920/487/960 921/488/961 918/486/958 -f 453/489/463 401/433/408 881/434/919 -f 881/434/919 884/435/922 453/489/463 -f 911/473/949 922/492/962 923/491/963 -f 923/491/963 924/490/964 911/473/949 -f 925/493/965 926/494/966 924/490/964 -f 924/490/964 923/491/963 925/493/965 -f 927/495/967 923/491/963 922/492/962 -f 922/492/962 928/496/968 927/495/967 -f 924/490/964 926/494/966 929/498/969 -f 929/498/969 930/497/970 924/490/964 -f 931/499/971 932/502/972 933/501/973 -f 933/501/973 934/500/974 931/499/971 -f 935/503/975 913/480/953 469/505/479 -f 469/505/479 468/504/478 935/503/975 -f 916/481/956 470/506/480 469/505/479 -f 469/505/479 913/480/953 916/481/956 -f 916/481/956 921/488/961 471/507/481 -f 471/507/481 470/506/480 916/481/956 -f 868/407/907 384/408/391 472/508/482 -f 472/508/482 920/487/960 868/407/907 -f 936/509/976 899/454/936 917/484/957 -f 917/484/957 919/485/959 936/509/976 -f 443/479/453 647/512/681 649/511/683 -f 649/511/683 418/510/425 443/479/453 -f 710/240/747 937/513/977 925/493/965 -f 925/493/965 907/468/945 710/240/747 -f 638/514/978 642/515/979 932/502/972 -f 932/502/972 931/499/971 638/514/978 -f 907/468/945 925/493/965 923/491/963 -f 923/491/963 927/495/967 907/468/945 -f 436/469/444 907/468/945 927/495/967 -f 927/495/967 475/516/487 436/469/444 -f 938/517/980 891/445/928 881/434/919 -f 881/434/919 880/431/918 938/517/980 -f 924/490/964 908/472/946 911/473/949 -f 939/518/981 940/519/982 941/519/983 -f 941/519/983 930/497/970 939/518/981 -f 927/495/967 928/496/968 480/520/435 -f 480/520/435 475/516/487 927/495/967 -f 942/521/984 943/523/985 882/438/920 -f 882/438/920 944/522/986 942/521/984 -f 944/522/986 891/445/928 938/517/980 -f 938/517/980 635/524/987 944/522/986 -f 911/473/949 910/470/948 945/525/988 -f 945/525/988 922/492/962 911/473/949 -f 922/492/962 945/525/988 905/466/943 -f 905/466/943 900/460/937 928/496/968 -f 928/496/968 922/492/962 905/466/943 -f 696/519/989 946/519/990 941/519/983 -f 941/519/983 940/519/982 696/519/989 -f 910/470/948 699/527/991 689/526/992 -f 689/526/992 945/525/988 910/470/948 -f 947/528/993 942/521/984 634/530/994 -f 634/530/994 633/529/995 947/528/993 -f 898/455/935 873/415/912 872/416/911 -f 872/416/911 899/454/936 898/455/935 -f 872/416/911 917/484/957 899/454/936 -f 948/531/996 488/532/505 398/430/405 -f 398/430/405 879/429/914 948/531/996 -f 949/533/997 645/535/679 644/534/678 -f 644/534/678 878/428/917 949/533/997 -f 878/428/917 644/534/678 948/531/996 -f 948/531/996 879/429/914 878/428/917 -f 629/411/664 630/422/665 869/410/908 -f 950/536/998 764/449/930 914/483/954 -f 914/483/954 951/537/999 950/536/998 -f 453/489/463 884/435/922 404/436/411 -f 888/440/925 952/538/1000 883/437/1001 -f 883/437/1001 882/438/920 888/440/925 -f 888/440/925 887/441/703 952/538/1000 -f 887/441/703 890/443/927 953/539/1002 -f 953/539/1002 952/538/1000 887/441/703 -f 280/540/1003 953/539/1002 890/443/927 -f 890/443/927 765/474/951 280/540/1003 -f 883/437/921 494/437/512 405/437/412 -f 495/539/1004 494/437/1005 883/437/1001 -f 883/437/1001 952/538/1000 495/539/1004 -f 953/539/1002 496/539/1006 495/539/1004 -f 495/539/1004 952/538/1000 953/539/1002 -f 767/461/939 768/475/155 954/541/1007 -f 954/541/1007 902/462/940 767/461/939 -f 906/467/944 905/466/943 688/543/1008 -f 688/543/1008 692/542/1009 906/467/944 -f 698/544/1010 955/545/1011 947/528/993 -f 947/528/993 633/529/995 698/544/1010 -f 635/524/987 938/517/980 906/467/944 -f 906/467/944 692/542/1009 635/524/987 -f 880/431/918 901/459/938 906/467/944 -f 906/467/944 938/517/980 880/431/918 -f 400/432/407 426/458/432 901/459/938 -f 901/459/938 880/431/918 400/432/407 -f 903/465/941 942/521/984 947/528/993 -f 947/528/993 904/464/942 903/465/941 -f 885/439/923 943/523/985 942/521/984 -f 942/521/984 903/465/941 885/439/923 -f 899/454/936 936/509/976 956/546/1012 -f 956/546/1012 896/453/934 899/454/936 -f 693/547/1013 696/519/989 940/519/982 -f 940/519/982 955/545/1011 693/547/1013 -f 896/453/934 955/545/1011 940/519/982 -f 940/519/982 939/518/981 896/453/934 -f 957/548/1014 958/549/1015 645/535/679 -f 645/535/679 949/533/997 957/548/1014 -f 959/551/1016 933/501/973 932/502/972 -f 932/502/972 642/515/979 707/550/798 -f 707/550/798 959/551/1016 932/502/972 -f 876/426/915 874/414/913 873/415/912 -f 873/415/912 957/548/1014 876/426/915 -f 949/533/997 877/425/916 876/426/915 -f 876/426/915 957/548/1014 949/533/997 -f 688/543/1008 905/466/943 945/525/988 -f 945/525/988 689/526/992 688/543/1008 -f 480/520/435 928/496/968 900/460/937 -f 900/460/937 425/457/431 480/520/435 -f 939/518/981 960/552/1017 897/456/812 -f 897/456/812 896/453/934 939/518/981 -f 939/518/981 930/497/970 929/498/969 -f 929/498/969 960/552/1017 939/518/981 -f 904/464/942 947/528/993 955/545/1011 -f 955/545/1011 956/546/1012 904/464/942 -f 904/464/942 956/546/1012 936/509/976 -f 936/509/976 894/447/932 904/464/942 -f 892/446/929 894/447/932 936/509/976 -f 936/509/976 919/485/959 892/446/929 -f 915/482/955 892/446/929 919/485/959 -f 919/485/959 918/486/958 915/482/955 -f 921/488/961 920/487/960 472/508/482 -f 472/508/482 471/507/481 921/488/961 -f 916/481/956 915/482/955 918/486/958 -f 918/486/958 921/488/961 916/481/956 -f 926/494/966 925/493/965 937/513/977 -f 937/513/977 934/500/974 926/494/966 -f 929/498/969 926/494/966 934/500/974 -f 934/500/974 933/501/973 929/498/969 -f 933/501/973 959/551/1016 960/552/1017 -f 960/552/1017 929/498/969 933/501/973 -f 897/456/812 960/552/1017 959/551/1016 -f 959/551/1016 958/549/1015 897/456/812 -f 958/549/1015 959/551/1016 707/550/798 -f 707/550/798 645/535/679 958/549/1015 -f 902/462/940 954/541/1007 961/554/1018 -f 961/554/1018 504/553/527 902/462/940 -f 504/553/527 429/461/435 902/462/940 -f 935/503/975 468/504/478 504/553/527 -f 504/553/527 961/554/1018 935/503/975 -f 954/541/1007 768/475/155 763/536/1019 -f 763/536/1019 950/536/998 954/541/1007 -f 951/537/999 961/554/1018 954/541/1007 -f 954/541/1007 950/536/998 951/537/999 -f 951/537/999 914/483/954 913/480/953 -f 913/480/953 935/503/975 951/537/999 -f 935/503/975 961/554/1018 951/537/999 -f 488/532/505 948/531/996 912/477/952 -f 912/477/952 442/478/452 488/532/505 -f 949/533/997 878/428/917 877/425/916 -f 763/536/1019 764/449/930 950/536/998 -f 766/475/950 889/444/926 764/449/930 -f 931/499/971 934/500/974 937/513/977 -f 937/513/977 639/555/744 931/499/971 -f 888/440/925 882/438/920 943/523/985 -f 635/524/987 634/530/994 942/521/984 -f 942/521/984 944/522/986 635/524/987 -f 693/547/1013 955/545/1011 698/544/1010 -f 872/416/911 895/452/933 917/484/957 -f 953/539/1002 280/540/1003 496/539/1006 -f 944/522/986 882/438/920 891/445/928 -f 885/439/923 888/440/925 943/523/985 -f 710/240/747 709/241/746 708/556/745 -f 708/556/745 937/513/977 710/240/747 -f 708/556/745 639/555/744 937/513/977 -f 639/555/744 638/514/978 931/499/971 -f 955/545/1011 896/453/934 956/546/1012 -f 898/455/935 897/456/812 958/549/1015 -f 958/549/1015 957/548/1014 898/455/935 -f 769/557/810 912/477/952 948/531/996 -f 770/476/811 912/477/952 769/557/810 -f 644/534/678 769/557/810 948/531/996 -f 898/455/935 957/548/1014 873/415/912 -f 909/471/947 699/527/991 910/470/948 -f 941/519/983 946/519/990 909/471/947 -f 909/471/947 908/472/946 941/519/983 -f 924/490/964 930/497/970 941/519/983 -f 941/519/983 908/472/946 924/490/964 -f 789/288/830 791/289/832 803/303/844 -f 803/303/844 806/307/847 789/288/830 -f 795/294/836 804/302/845 803/303/844 -f 803/303/844 791/289/832 795/294/836 -f 804/302/845 795/294/836 728/318/765 -f 728/318/765 723/324/760 804/302/845 -f 700/220/735 699/221/734 909/559/1020 -f 909/559/1020 962/558/1021 700/220/735 -f 698/218/733 697/219/732 694/217/729 -f 694/217/729 693/214/728 698/218/733 -f 695/216/730 963/561/1022 946/560/1023 -f 946/560/1023 696/215/731 695/216/730 -f 909/559/1020 946/560/1023 963/561/1022 -f 963/561/1022 962/559/1021 909/559/1020 -f 964/562/1024 691/565/1025 687/564/1026 -f 687/564/1026 965/563/1027 964/562/1024 -f 636/566/1028 691/565/1025 964/562/1024 -f 964/562/1024 966/567/1029 636/566/1028 -f 967/568/1030 631/569/1031 636/566/1028 -f 636/566/1028 966/567/1029 967/568/1030 -f 968/571/1032 632/571/1033 631/569/1031 -f 631/569/1031 967/568/1030 968/571/1032 -f 969/572/1034 697/573/1035 632/571/1033 -f 632/571/1033 968/571/1032 969/572/1034 -f 697/573/1035 969/572/1034 970/575/1036 -f 970/575/1036 694/574/1037 697/573/1035 -f 962/578/1038 963/577/1039 695/576/1040 -f 695/576/1040 971/580/1041 972/579/1042 -f 972/579/1042 962/578/1038 695/576/1040 -f 973/581/1043 700/581/1044 962/578/1038 -f 962/578/1038 972/579/1042 973/581/1043 -f 974/582/1045 690/583/1046 700/581/1044 -f 700/581/1044 973/581/1043 974/582/1045 -f 694/574/1037 970/575/1036 971/580/1041 -f 971/580/1041 695/576/1040 694/574/1037 -f 690/583/1046 974/582/1045 965/563/1027 -f 965/563/1027 687/564/1026 690/583/1046 -f 965/563/1027 974/582/1045 975/584/787 -f 975/584/787 964/562/1024 965/563/1027 -f 974/582/1045 973/581/1043 975/584/787 -f 972/579/1042 971/580/1041 975/584/787 -f 975/584/787 973/581/1043 972/579/1042 -f 971/580/1041 970/575/1036 975/584/787 -f 970/575/1036 969/572/1034 975/584/787 -f 969/572/1034 968/571/1032 975/584/787 -f 968/571/1032 967/568/1030 975/584/787 -f 966/567/1029 964/562/1024 975/584/787 -f 975/584/787 967/568/1030 966/567/1029 -f 531/11/567 601/87/637 684/205/719 -f 603/90/639 685/207/720 537/17/573 -f 537/17/573 602/89/638 603/90/639 -f 604/91/640 686/208/721 685/207/720 -f 685/207/720 603/90/639 604/91/640 -f 87/92/87 198/209/1 686/208/721 -f 686/208/721 604/91/640 87/92/87 -f 682/198/717 543/24/579 535/15/571 -f 535/15/571 602/89/638 682/198/717 -f 683/199/718 544/25/580 543/24/579 -f 543/24/579 682/198/717 683/199/718 -f 546/27/582 191/202/193 195/206/197 -f 195/206/197 683/199/718 546/27/582 -f 807/310/848 809/313/850 684/585/719 -f 684/585/719 539/314/575 807/310/848 -f 531/317/567 684/586/719 809/311/850 -f 809/311/850 810/312/851 531/317/567 -f 805/305/846 720/325/757 717/326/754 -f 775/270/816 776/273/817 771/266/812 -f 771/266/812 774/267/815 775/270/816 -f 775/270/816 787/285/828 776/273/817 -f 864/400/903 841/371/881 863/398/902 -f 863/398/902 976/587/1047 864/400/903 -f 865/401/904 864/400/903 976/587/1047 -f 976/587/1047 977/588/1048 865/401/904 -f 866/403/905 865/401/904 977/588/1048 -f 977/588/1048 857/391/896 866/403/905 -f 860/395/899 838/365/879 867/405/906 -f 867/405/906 978/589/1049 860/395/899 -f 978/589/1049 867/405/906 866/403/905 -f 866/403/905 857/391/896 978/589/1049 -f 860/395/899 854/390/893 979/590/1050 -f 979/590/1050 861/394/900 860/395/899 -f 979/590/1050 980/591/1051 862/396/901 -f 862/396/901 861/394/900 979/590/1050 -f 980/592/1051 846/382/885 863/398/902 -f 863/398/902 862/397/901 980/592/1051 -f 976/587/1047 863/398/902 846/382/885 -f 846/382/885 845/379/220 976/587/1047 -f 977/588/1048 976/587/1047 845/379/220 -f 845/379/220 849/383/888 977/588/1048 -f 852/386/891 857/391/896 977/588/1048 -f 977/588/1048 849/383/888 852/386/891 -f 854/390/893 860/395/899 978/589/1049 -f 978/589/1049 855/389/894 854/390/893 -f 855/389/894 978/589/1049 857/391/896 -f 854/390/893 853/387/892 981/593/1052 -f 981/593/1052 979/590/1050 854/390/893 -f 981/593/1052 859/594/898 980/591/1051 -f 980/591/1051 979/590/1050 981/593/1052 -f 859/393/898 847/381/886 846/382/885 -f 846/382/885 980/592/1051 859/393/898 -f 848/380/887 847/381/886 818/334/859 -f 818/334/859 820/335/861 848/380/887 -f 822/338/863 850/384/889 848/380/887 -f 848/380/887 820/335/861 822/338/863 -f 834/359/875 851/385/890 850/384/889 -f 850/384/889 822/338/863 834/359/875 -f 837/360/878 856/388/895 851/385/890 -f 851/385/890 834/359/875 837/360/878 -f 835/360/876 836/361/877 853/387/892 -f 837/360/878 835/360/876 853/387/892 -f 853/387/892 856/388/895 837/360/878 -f 858/392/897 981/593/1052 853/387/892 -f 853/387/892 836/361/877 858/392/897 -f 981/593/1052 858/392/897 817/333/858 -f 817/333/858 859/594/898 981/593/1052 -f 789/288/830 806/307/847 808/309/849 -f 808/309/849 797/296/838 789/288/830 -f 648/162/682 653/164/516 709/595/746 -f 647/160/681 770/265/811 663/177/696 -f 647/160/681 663/177/696 653/164/516 -f 648/162/682 647/160/681 653/164/516 -f 652/165/686 708/237/745 709/595/746 -f 709/595/746 653/164/516 652/165/686 -f 647/512/681 443/479/453 770/476/811 -f 526/596/91 110/115/110 612/113/647 -f 612/113/647 109/114/109 526/596/91 -f 982/597/1053 983/598/1054 984/599/1055 -f 984/599/1055 466/600/1056 982/597/1053 -f 984/599/1055 985/601/1057 463/602/1058 -f 463/602/1058 466/600/1056 984/599/1055 -f 463/602/1058 985/601/1057 986/603/1059 -f 986/603/1059 987/604/1060 143/605/1061 -f 143/605/1061 463/602/1058 986/603/1059 -f 984/599/1055 983/598/1054 988/606/1062 -f 985/601/1057 984/599/1055 988/606/1062 -f 988/606/1062 989/607/1063 985/601/1057 -f 990/608/1064 991/609/1065 985/601/1057 -f 985/601/1057 989/607/1063 990/608/1064 -f 985/601/1057 991/609/1065 986/603/1059 -f 992/610/1066 987/604/1060 986/603/1059 -f 986/603/1059 991/609/1065 992/610/1066 -f 987/604/1060 993/611/1067 994/612/1068 -f 994/612/1068 143/605/1061 987/604/1060 -f 995/613/1069 993/611/1067 987/604/1060 -f 987/604/1060 992/610/1066 995/613/1069 -f 982/597/1053 996/614/1070 983/598/1054 -f 466/600/1056 997/615/1071 982/597/1053 -f 931/602/1072 998/601/1073 999/599/1074 -f 999/599/1074 932/600/1075 931/602/1072 -f 999/599/1074 1000/598/1076 1001/597/1077 -f 1001/597/1077 932/600/1075 999/599/1074 -f 639/605/1078 1002/604/1079 1003/603/1080 -f 1003/603/1080 931/602/1072 639/605/1078 -f 1003/603/1080 998/601/1073 931/602/1072 -f 1004/606/1081 999/599/1074 998/601/1073 -f 998/601/1073 1005/607/1082 1004/606/1081 -f 999/599/1074 1004/606/1081 1000/598/1076 -f 998/601/1073 1003/603/1080 1006/609/1083 -f 1007/608/1084 1005/607/1082 998/601/1073 -f 998/601/1073 1006/609/1083 1007/608/1084 -f 1008/610/1085 1006/609/1083 1003/603/1080 -f 1003/603/1080 1002/604/1079 1008/610/1085 -f 1009/612/1086 1010/611/1087 1002/604/1079 -f 1002/604/1079 639/605/1078 1009/612/1086 -f 1011/613/1088 1008/610/1085 1002/604/1079 -f 1002/604/1079 1010/611/1087 1011/613/1088 -f 1000/598/1076 1012/614/1089 1001/597/1077 -f 932/600/1075 1001/597/1077 1013/615/1090 -# 2000 faces - diff --git a/games/raylib_demo/resources/catsham.png b/games/raylib_demo/resources/catsham.png Binary files differdeleted file mode 100644 index 8d7978e0..00000000 --- a/games/raylib_demo/resources/catsham.png +++ /dev/null diff --git a/games/raylib_demo/resources/catwhite.png b/games/raylib_demo/resources/catwhite.png Binary files differdeleted file mode 100644 index b849c4c0..00000000 --- a/games/raylib_demo/resources/catwhite.png +++ /dev/null diff --git a/games/raylib_demo/resources/fonts/alagard.rbmf b/games/raylib_demo/resources/fonts/alagard.rbmf Binary files differdeleted file mode 100644 index 8c9b68d3..00000000 --- a/games/raylib_demo/resources/fonts/alagard.rbmf +++ /dev/null diff --git a/games/raylib_demo/resources/fonts/alpha_beta.rbmf b/games/raylib_demo/resources/fonts/alpha_beta.rbmf Binary files differdeleted file mode 100644 index bdb2e752..00000000 --- a/games/raylib_demo/resources/fonts/alpha_beta.rbmf +++ /dev/null diff --git a/games/raylib_demo/resources/fonts/custom_alagard.png b/games/raylib_demo/resources/fonts/custom_alagard.png Binary files differdeleted file mode 100644 index c3eb63b7..00000000 --- a/games/raylib_demo/resources/fonts/custom_alagard.png +++ /dev/null diff --git a/games/raylib_demo/resources/fonts/custom_jupiter_crash.png b/games/raylib_demo/resources/fonts/custom_jupiter_crash.png Binary files differdeleted file mode 100644 index 451b591f..00000000 --- a/games/raylib_demo/resources/fonts/custom_jupiter_crash.png +++ /dev/null diff --git a/games/raylib_demo/resources/fonts/custom_mecha.png b/games/raylib_demo/resources/fonts/custom_mecha.png Binary files differdeleted file mode 100644 index 59caab2c..00000000 --- a/games/raylib_demo/resources/fonts/custom_mecha.png +++ /dev/null diff --git a/games/raylib_demo/resources/fonts/jupiter_crash.rbmf b/games/raylib_demo/resources/fonts/jupiter_crash.rbmf Binary files differdeleted file mode 100644 index d797e0d6..00000000 --- a/games/raylib_demo/resources/fonts/jupiter_crash.rbmf +++ /dev/null diff --git a/games/raylib_demo/resources/fonts/mecha.rbmf b/games/raylib_demo/resources/fonts/mecha.rbmf Binary files differdeleted file mode 100644 index 0266a065..00000000 --- a/games/raylib_demo/resources/fonts/mecha.rbmf +++ /dev/null diff --git a/games/raylib_demo/resources/fonts/pixantiqua.rbmf b/games/raylib_demo/resources/fonts/pixantiqua.rbmf Binary files differdeleted file mode 100644 index 04ef0e25..00000000 --- a/games/raylib_demo/resources/fonts/pixantiqua.rbmf +++ /dev/null diff --git a/games/raylib_demo/resources/fonts/pixelplay.rbmf b/games/raylib_demo/resources/fonts/pixelplay.rbmf Binary files differdeleted file mode 100644 index 31d14038..00000000 --- a/games/raylib_demo/resources/fonts/pixelplay.rbmf +++ /dev/null diff --git a/games/raylib_demo/resources/fonts/romulus.rbmf b/games/raylib_demo/resources/fonts/romulus.rbmf Binary files differdeleted file mode 100644 index be9da01a..00000000 --- a/games/raylib_demo/resources/fonts/romulus.rbmf +++ /dev/null diff --git a/games/raylib_demo/resources/fonts/setback.rbmf b/games/raylib_demo/resources/fonts/setback.rbmf Binary files differdeleted file mode 100644 index 09572215..00000000 --- a/games/raylib_demo/resources/fonts/setback.rbmf +++ /dev/null diff --git a/games/raylib_demo/resources/lena.png b/games/raylib_demo/resources/lena.png Binary files differdeleted file mode 100644 index 59ef68aa..00000000 --- a/games/raylib_demo/resources/lena.png +++ /dev/null diff --git a/games/raylib_demo/resources/mandrill.png b/games/raylib_demo/resources/mandrill.png Binary files differdeleted file mode 100644 index a1267573..00000000 --- a/games/raylib_demo/resources/mandrill.png +++ /dev/null diff --git a/games/raylib_demo/resources/platforms.png b/games/raylib_demo/resources/platforms.png Binary files differdeleted file mode 100644 index ff69a614..00000000 --- a/games/raylib_demo/resources/platforms.png +++ /dev/null diff --git a/games/raylib_demo/resources/raylib_logo.png b/games/raylib_demo/resources/raylib_logo.png Binary files differdeleted file mode 100644 index 66545627..00000000 --- a/games/raylib_demo/resources/raylib_logo.png +++ /dev/null diff --git a/games/raylib_demo/resources/raylib_logo128x128.png b/games/raylib_demo/resources/raylib_logo128x128.png Binary files differdeleted file mode 100644 index 99ba5437..00000000 --- a/games/raylib_demo/resources/raylib_logo128x128.png +++ /dev/null diff --git a/games/raylib_demo/resources/raylib_window.png b/games/raylib_demo/resources/raylib_window.png Binary files differdeleted file mode 100644 index e5e08bd4..00000000 --- a/games/raylib_demo/resources/raylib_window.png +++ /dev/null diff --git a/games/raylib_demo/resources/raylib_window_01.png b/games/raylib_demo/resources/raylib_window_01.png Binary files differdeleted file mode 100644 index 26607b01..00000000 --- a/games/raylib_demo/resources/raylib_window_01.png +++ /dev/null diff --git a/games/raylib_demo/resources/raylib_window_02.png b/games/raylib_demo/resources/raylib_window_02.png Binary files differdeleted file mode 100644 index 4a636e69..00000000 --- a/games/raylib_demo/resources/raylib_window_02.png +++ /dev/null diff --git a/games/raylib_demo/resources/raylib_window_03.png b/games/raylib_demo/resources/raylib_window_03.png Binary files differdeleted file mode 100644 index 176b2672..00000000 --- a/games/raylib_demo/resources/raylib_window_03.png +++ /dev/null diff --git a/games/skully_escape/makefile b/games/skully_escape/makefile index 7cfd3190..70f7f5a3 100644 --- a/games/skully_escape/makefile +++ b/games/skully_escape/makefile @@ -1,19 +1,17 @@ #************************************************************************************************** # -# raylib - Advance Game +# raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten) # -# makefile to compile advance game +# Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) # -# Copyright (c) 2014 Ramon Santamaria (@raysan5) -# -# This software is provided "as-is", without any express or implied warranty. In no event +# This software is provided "as-is", without any express or implied warranty. In no event # will the authors be held liable for any damages arising from the use of this software. # -# Permission is granted to anyone to use this software for any purpose, including commercial +# Permission is granted to anyone to use this software for any purpose, including commercial # applications, and to alter it and redistribute it freely, subject to the following restrictions: # -# 1. The origin of this software must not be misrepresented; you must not claim that you -# wrote the original software. If you use this software in a product, an acknowledgment +# 1. The origin of this software must not be misrepresented; you must not claim that you +# wrote the original software. If you use this software in a product, an acknowledgment # in the product documentation would be appreciated but is not required. # # 2. Altered source versions must be plainly marked as such, and must not be misrepresented @@ -23,10 +21,23 @@ # #************************************************************************************************** -# define raylib platform if not defined (by default, compile for RPI) -# Other possible platform: PLATFORM_DESKTOP +.PHONY: all clean + +# define raylib platform to compile for +# possible platforms: PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB +# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop() PLATFORM ?= PLATFORM_DESKTOP +# define NO to use OpenAL Soft as static library (shared by default) +SHARED_OPENAL ?= NO + +ifeq ($(PLATFORM),PLATFORM_WEB) + SHARED_OPENAL = NO +endif + +# define raylib directory for include and library +RAYLIB_PATH ?= C:\raylib\raylib + # determine PLATFORM_OS in case PLATFORM_DESKTOP selected ifeq ($(PLATFORM),PLATFORM_DESKTOP) # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows @@ -62,48 +73,96 @@ endif endif # define compiler flags: -# -O2 defines optimization level -# -Wall turns on most, but not all, compiler warnings -# -std=c99 use standard C from 1999 revision +# -O2 defines optimization level +# -Og enable debugging +# -s strip unnecessary data from build +# -Wall turns on most, but not all, compiler warnings +# -std=c99 defines C language mode (standard C from 1999 revision) +# -std=gnu99 defines C language mode (GNU C from 1999 revision) +# -fgnu89-inline declaring inline functions support (GCC optimized) +# -Wno-missing-braces ignore invalid warning (GCC bug 53119) +# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + CFLAGS = -O2 -s -Wall -std=c99 + endif + ifeq ($(PLATFORM_OS),LINUX) + CFLAGS = -O2 -s -Wall -std=c99 -D_DEFAULT_SOURCE + endif + ifeq ($(PLATFORM_OS),OSX) + CFLAGS = -O2 -s -Wall -std=c99 + endif +endif +ifeq ($(PLATFORM),PLATFORM_WEB) + CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 -s TOTAL_MEMORY=67108864 --profiling --preload-file resources + # -O2 # if used, also set --memory-init-file 0 + # --memory-init-file 0 # to avoid an external memory initialization code file (.mem) + # -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing + # -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + # --preload-file file.res # embbed file.res resource into .data file +endif ifeq ($(PLATFORM),PLATFORM_RPI) - CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline -else - CFLAGS = -O2 -Wall -std=c99 + CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline +endif +#CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes + +# define raylib release directory for compiled library +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/win32/mingw32 + endif + ifeq ($(PLATFORM_OS),LINUX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/linux + endif + ifeq ($(PLATFORM_OS),OSX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/osx + endif endif ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 --preload-file resources -s ALLOW_MEMORY_GROWTH=1 --shell-file ../../templates/web_shell/shell.html - #-s ASSERTIONS=1 --preload-file resources - #-s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing - #-s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/html5 +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/rpi endif # define any directories containing required header files +INCLUDES = -I. -I$(RAYLIB_RELEASE) -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external + ifeq ($(PLATFORM),PLATFORM_RPI) - INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include + INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries headers + # GLFW3 + INCLUDES += -I$(RAYLIB_PATH)/src/external/glfw3/include + # OpenAL Soft + INCLUDES += -I$(RAYLIB_PATH)/src/external/openal_soft/include + endif + ifeq ($(PLATFORM_OS),LINUX) + # you may optionally create this directory and install raylib + # and related headers there. Edit ../src/Makefile appropriately. + INCLUDES += -I/usr/local/include/raylib + endif + ifeq ($(PLATFORM_OS),OSX) + # additional directories for MacOS + endif endif # define library paths containing required libs +LFLAGS = -L. -L$(RAYLIB_RELEASE) -L$(RAYLIB_PATH)/src + ifeq ($(PLATFORM),PLATFORM_RPI) - LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -L../../../src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW - LFLAGS += -L../../external/glew/lib/$(LIBPATH) + LFLAGS += -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),WINDOWS) + # external libraries to link with + # GLFW3 + LFLAGS += -L$(RAYLIB_PATH)/src/external/glfw3/lib/$(LIBPATH) + # OpenAL Soft + LFLAGS += -L$(RAYLIB_PATH)/src/external/openal_soft/lib/$(LIBPATH) endif endif @@ -113,20 +172,27 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),LINUX) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl - # on XWindow could require also below libraries, just uncomment + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -lpthread -ldl + # on XWindow requires also below libraries LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) - # libraries for OS X 10.9 desktop compiling + # libraries for OSX 10.9 desktop compiling # requires the following packages: - # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa + # libglfw3-dev libopenal-dev libegl1-mesa-dev + LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAL -framework Cocoa else # libraries for Windows desktop compiling # NOTE: GLFW3 and OpenAL Soft libraries should be installed - LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32 + LIBS = -lraylib -lglfw3 -lopengl32 -lgdi32 + # if static OpenAL Soft required, define the corresponding libs + ifeq ($(SHARED_OPENAL),NO) + LIBS += -lopenal32 -lwinmm + CFLAGS += -Wl,-allow-multiple-definition + else + LIBS += -lopenal32dll + endif endif endif endif @@ -136,19 +202,20 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lbcm_host -lopenal endif ifeq ($(PLATFORM),PLATFORM_WEB) - LIBS = ../../src/libraylib.bc + # NOTE: Set the correct path to libraylib.bc + LIBS = $(RAYLIB_RELEASE)/libraylib.bc endif # define additional parameters and flags for windows ifeq ($(PLATFORM_OS),WINDOWS) # resources file contains windows exe icon # -Wl,--subsystem,windows hides the console window - WINFLAGS = ../../src/resources - #-Wl,--subsystem,windows + WINFLAGS = $(RAYLIB_PATH)/src/resources -Wl,--subsystem,windows endif ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html + WEB_SHELL = --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html endif # define all screen object files required @@ -167,13 +234,12 @@ SCREENS = \ player.o \ monster.o \ -# typing 'make' will invoke the first target entry in the file, -# in this case, the 'default' target entry is advance_game +# typing 'make' will invoke the default target entry default: skully_escape -# compile template - advance_game +# compile program skully_escape: skully_escape.c $(SCREENS) - $(CC) -o $@$(EXT) $< $(SCREENS) $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $^ $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile screen LOGO screens/screen_logo.o: screens/screen_logo.c @@ -235,10 +301,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) rm -f *.o else ifeq ($(PLATFORM_OS),LINUX) - find . -type f -executable -delete - rm -f *.o + find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f else - del *.o *.exe + del *.o *.exe /s endif endif endif diff --git a/games/wave_collector/Makefile b/games/wave_collector/Makefile index 186598f1..618ef22b 100644 --- a/games/wave_collector/Makefile +++ b/games/wave_collector/Makefile @@ -1,19 +1,17 @@ #************************************************************************************************** # -# raylib - Advance Game +# raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten) # -# makefile to compile advance game for desktop platforms, Raspberry Pi and HTML5 (emscripten) +# Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) # -# Copyright (c) 2014 Ramon Santamaria (@raysan5) -# -# This software is provided "as-is", without any express or implied warranty. In no event +# This software is provided "as-is", without any express or implied warranty. In no event # will the authors be held liable for any damages arising from the use of this software. # -# Permission is granted to anyone to use this software for any purpose, including commercial +# Permission is granted to anyone to use this software for any purpose, including commercial # applications, and to alter it and redistribute it freely, subject to the following restrictions: # -# 1. The origin of this software must not be misrepresented; you must not claim that you -# wrote the original software. If you use this software in a product, an acknowledgment +# 1. The origin of this software must not be misrepresented; you must not claim that you +# wrote the original software. If you use this software in a product, an acknowledgment # in the product documentation would be appreciated but is not required. # # 2. Altered source versions must be plainly marked as such, and must not be misrepresented @@ -30,6 +28,16 @@ # WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop() PLATFORM ?= PLATFORM_DESKTOP +# define NO to use OpenAL Soft as static library (shared by default) +SHARED_OPENAL ?= NO + +ifeq ($(PLATFORM),PLATFORM_WEB) + SHARED_OPENAL = NO +endif + +# define raylib directory for include and library +RAYLIB_PATH ?= C:\raylib\raylib + # determine PLATFORM_OS in case PLATFORM_DESKTOP selected ifeq ($(PLATFORM),PLATFORM_DESKTOP) # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows @@ -65,69 +73,99 @@ endif endif # define compiler flags: -# -O2 defines optimization level -# -Wall turns on most, but not all, compiler warnings -# -std=c99 use standard C from 1999 revision -ifeq ($(PLATFORM),PLATFORM_RPI) - CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline -else - CFLAGS = -O2 -Wall -std=c99 +# -O2 defines optimization level +# -Og enable debugging +# -s strip unnecessary data from build +# -Wall turns on most, but not all, compiler warnings +# -std=c99 defines C language mode (standard C from 1999 revision) +# -std=gnu99 defines C language mode (GNU C from 1999 revision) +# -fgnu89-inline declaring inline functions support (GCC optimized) +# -Wno-missing-braces ignore invalid warning (GCC bug 53119) +# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + CFLAGS = -O2 -s -Wall -std=c99 + endif + ifeq ($(PLATFORM_OS),LINUX) + CFLAGS = -O2 -s -Wall -std=c99 -D_DEFAULT_SOURCE + endif + ifeq ($(PLATFORM_OS),OSX) + CFLAGS = -O2 -s -Wall -std=c99 + endif endif ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 -s ALLOW_MEMORY_GROWTH=1 --preload-file resources --shell-file C:/raylib/raylib/templates/web_shell/shell.html - #-s ASSERTIONS=1 # to check for memory allocation errors (-O1 disables it) - #-s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing - #-s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 -s TOTAL_MEMORY=67108864 --profiling --preload-file resources + # -O2 # if used, also set --memory-init-file 0 + # --memory-init-file 0 # to avoid an external memory initialization code file (.mem) + # -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing + # -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) + # --preload-file file.res # embbed file.res resource into .data file +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline endif - #CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes +# define raylib release directory for compiled library +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + ifeq ($(PLATFORM_OS),WINDOWS) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/win32/mingw32 + endif + ifeq ($(PLATFORM_OS),LINUX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/linux + endif + ifeq ($(PLATFORM_OS),OSX) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/osx + endif +endif +ifeq ($(PLATFORM),PLATFORM_WEB) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/html5 +endif +ifeq ($(PLATFORM),PLATFORM_RPI) + RAYLIB_RELEASE = $(RAYLIB_PATH)/release/rpi +endif + # define any directories containing required header files +INCLUDES = -I. -I$(RAYLIB_RELEASE) -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external + ifeq ($(PLATFORM),PLATFORM_RPI) - INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads + INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) - # add standard directories for GNU/Linux - ifeq ($(PLATFORM_OS),LINUX) - INCLUDES = -I. -I../src -I/usr/local/include/raylib/ - else - INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + ifeq ($(PLATFORM_OS),WINDOWS) # external libraries headers # GLFW3 - INCLUDES += -I../../external/glfw3/include + INCLUDES += -I$(RAYLIB_PATH)/src/external/glfw3/include # OpenAL Soft - INCLUDES += -I../../external/openal_soft/include + INCLUDES += -I$(RAYLIB_PATH)/src/external/openal_soft/include + endif + ifeq ($(PLATFORM_OS),LINUX) + # you may optionally create this directory and install raylib + # and related headers there. Edit ../src/Makefile appropriately. + INCLUDES += -I/usr/local/include/raylib + endif + ifeq ($(PLATFORM_OS),OSX) + # additional directories for MacOS endif endif # define library paths containing required libs +LFLAGS = -L. -L$(RAYLIB_RELEASE) -L$(RAYLIB_PATH)/src + ifeq ($(PLATFORM),PLATFORM_RPI) - LFLAGS = -L. -L../../src -L/opt/vc/lib + LFLAGS += -L/opt/vc/lib endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) # add standard directories for GNU/Linux - ifeq ($(PLATFORM_OS),LINUX) - LFLAGS = -L. -L../../src - else - LFLAGS = -L. -L../../src - ifeq ($(PLATFORM_OS),WINDOWS) - LFLAGS += -LC:/GitHub/raylib/src - endif + ifeq ($(PLATFORM_OS),WINDOWS) # external libraries to link with # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - endif + LFLAGS += -L$(RAYLIB_PATH)/src/external/glfw3/lib/$(LIBPATH) + # OpenAL Soft + LFLAGS += -L$(RAYLIB_PATH)/src/external/openal_soft/lib/$(LIBPATH) endif endif -ifeq ($(PLATFORM),PLATFORM_WEB) - INCLUDES = -I. -I.. - LFLAGS = -L. -L.. -endif - # define any libraries to link into executable # if you want to link libraries (libname.so or libname.a), use the -lname ifeq ($(PLATFORM),PLATFORM_DESKTOP) @@ -135,18 +173,26 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ - -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -lpthread -ldl + # on XWindow requires also below libraries + LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) - # libraries for OS X 10.9 desktop compiling + # libraries for OSX 10.9 desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -framework OpenGL -framework OpenAl -framework Cocoa + LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAL -framework Cocoa else # libraries for Windows desktop compiling # NOTE: GLFW3 and OpenAL Soft libraries should be installed - LIBS = -lraylib -lglfw3 -lopengl32 -lopenal32 -lwinmm -lgdi32 + LIBS = -lraylib -lglfw3 -lopengl32 -lgdi32 + # if static OpenAL Soft required, define the corresponding libs + ifeq ($(SHARED_OPENAL),NO) + LIBS += -lopenal32 -lwinmm + CFLAGS += -Wl,-allow-multiple-definition + else + LIBS += -lopenal32dll + endif endif endif endif @@ -157,19 +203,19 @@ ifeq ($(PLATFORM),PLATFORM_RPI) endif ifeq ($(PLATFORM),PLATFORM_WEB) # NOTE: Set the correct path to libraylib.bc - LIBS = libraylib.bc + LIBS = $(RAYLIB_RELEASE)/libraylib.bc endif # define additional parameters and flags for windows ifeq ($(PLATFORM_OS),WINDOWS) # resources file contains windows exe icon # -Wl,--subsystem,windows hides the console window - WINFLAGS = C:/raylib/raylib/src/resources -Wl,-allow-multiple-definition - # -Wl,--subsystem,windows + WINFLAGS = $(RAYLIB_PATH)/src/resources -Wl,--subsystem,windows endif ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html + WEB_SHELL = --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html endif # define all screen object files required @@ -179,13 +225,12 @@ SCREENS = \ screens/screen_gameplay.o \ screens/screen_ending.o \ -# typing 'make' will invoke the default target entry called 'all', -# in this case, the 'default' target entry is advance_game +# typing 'make' will invoke the default target entry default: wave_collector -# compile template - advance_game +# compile program wave_collector: wave_collector.c $(SCREENS) - $(CC) -o $@$(EXT) $< $(SCREENS) $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + $(CC) -o $@$(EXT) $^ $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) # compile screen LOGO screens/screen_logo.o: screens/screen_logo.c @@ -208,22 +253,21 @@ clean: ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),OSX) find . -type f -perm +ugo+x -delete - rm -f screens/*.o + rm -f *.o else ifeq ($(PLATFORM_OS),LINUX) - find . -type f -executable -delete - rm -f screens/*.o + find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f else - del screens\*.o *.exe + del *.o *.exe /s endif endif endif ifeq ($(PLATFORM),PLATFORM_RPI) find . -type f -executable -delete - rm -f screens/*.o + rm -f *.o endif ifeq ($(PLATFORM),PLATFORM_WEB) - del screens/*.o *.html *.js + del *.o *.html *.js endif @echo Cleaning done |
