From 66320582a36d6c0b5ebd063bfbe4c04cb4424b8f Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 28 Apr 2017 00:29:23 +0200 Subject: Some work on example games --- games/drturtle/makefile | 2 +- games/just_do/makefile | 2 +- games/just_do/screens/screen_level02.c | 13 ------------- games/koala_seasons/Makefile | 2 +- .../koala_seasons/resources/shaders/glsl100/blend_color.fs | 4 ++-- games/koala_seasons/screens/screen_gameplay.c | 2 +- games/skully_escape/makefile | 2 +- games/wave_collector/Makefile | 2 +- 8 files changed, 8 insertions(+), 21 deletions(-) (limited to 'games') diff --git a/games/drturtle/makefile b/games/drturtle/makefile index 5657deaa..89821929 100644 --- a/games/drturtle/makefile +++ b/games/drturtle/makefile @@ -94,7 +94,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) endif endif ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1 --profiling --preload-file resources + 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 diff --git a/games/just_do/makefile b/games/just_do/makefile index f86ed2c7..6dc096fb 100644 --- a/games/just_do/makefile +++ b/games/just_do/makefile @@ -94,7 +94,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) endif endif ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 -s --profiling --preload-file resources + 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 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 index 0928d3ad..c9eee6ff 100644 --- a/games/koala_seasons/Makefile +++ b/games/koala_seasons/Makefile @@ -94,7 +94,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 + 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 diff --git a/games/koala_seasons/resources/shaders/glsl100/blend_color.fs b/games/koala_seasons/resources/shaders/glsl100/blend_color.fs index eceb16be..ae23f941 100644 --- a/games/koala_seasons/resources/shaders/glsl100/blend_color.fs +++ b/games/koala_seasons/resources/shaders/glsl100/blend_color.fs @@ -3,8 +3,8 @@ precision mediump float; // Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; +varying vec2 fragTexCoord; +varying vec4 fragColor; // Input uniform values uniform sampler2D texture0; diff --git a/games/koala_seasons/screens/screen_gameplay.c b/games/koala_seasons/screens/screen_gameplay.c index de698df6..6bbcfaaf 100644 --- a/games/koala_seasons/screens/screen_gameplay.c +++ b/games/koala_seasons/screens/screen_gameplay.c @@ -490,7 +490,7 @@ void UpdateGameplayScreen(void) if (monthTimer >= monthChange) { - if ((currentMonth == 10)) + if (currentMonth == 10) { clockInitRotation = 225; clockFinalRotation = clockInitRotation + 90; diff --git a/games/skully_escape/makefile b/games/skully_escape/makefile index 4e5ef8da..70f7f5a3 100644 --- a/games/skully_escape/makefile +++ b/games/skully_escape/makefile @@ -94,7 +94,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 + 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 diff --git a/games/wave_collector/Makefile b/games/wave_collector/Makefile index dee622ca..618ef22b 100644 --- a/games/wave_collector/Makefile +++ b/games/wave_collector/Makefile @@ -94,7 +94,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) endif endif ifeq ($(PLATFORM),PLATFORM_WEB) - CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1 --profiling --preload-file resources + 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 -- cgit v1.2.3 From a64e909e5508cfa9ec5539f27269c7c684b06221 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 3 May 2017 14:16:11 +0200 Subject: Added games license --- games/drturtle/LICENSE.txt | 20 ++++++++++++++++++++ games/just_do/LICENSE.txt | 20 ++++++++++++++++++++ games/koala_seasons/LICENSE.txt | 20 ++++++++++++++++++++ games/light_my_ritual/LICENSE.txt | 20 ++++++++++++++++++++ games/skully_escape/LICENSE.txt | 20 ++++++++++++++++++++ games/wave_collector/LICENSE.txt | 20 ++++++++++++++++++++ 6 files changed, 120 insertions(+) create mode 100644 games/drturtle/LICENSE.txt create mode 100644 games/just_do/LICENSE.txt create mode 100644 games/koala_seasons/LICENSE.txt create mode 100644 games/light_my_ritual/LICENSE.txt create mode 100644 games/skully_escape/LICENSE.txt create mode 100644 games/wave_collector/LICENSE.txt (limited to 'games') diff --git a/games/drturtle/LICENSE.txt b/games/drturtle/LICENSE.txt new file mode 100644 index 00000000..510604da --- /dev/null +++ b/games/drturtle/LICENSE.txt @@ -0,0 +1,20 @@ + +This game sources are licensed under an unmodified zlib/libpng license, +which is an OSI-certified, BSD-like license: + +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. \ No newline at end of file diff --git a/games/just_do/LICENSE.txt b/games/just_do/LICENSE.txt new file mode 100644 index 00000000..510604da --- /dev/null +++ b/games/just_do/LICENSE.txt @@ -0,0 +1,20 @@ + +This game sources are licensed under an unmodified zlib/libpng license, +which is an OSI-certified, BSD-like license: + +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. \ No newline at end of file diff --git a/games/koala_seasons/LICENSE.txt b/games/koala_seasons/LICENSE.txt new file mode 100644 index 00000000..510604da --- /dev/null +++ b/games/koala_seasons/LICENSE.txt @@ -0,0 +1,20 @@ + +This game sources are licensed under an unmodified zlib/libpng license, +which is an OSI-certified, BSD-like license: + +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. \ No newline at end of file diff --git a/games/light_my_ritual/LICENSE.txt b/games/light_my_ritual/LICENSE.txt new file mode 100644 index 00000000..510604da --- /dev/null +++ b/games/light_my_ritual/LICENSE.txt @@ -0,0 +1,20 @@ + +This game sources are licensed under an unmodified zlib/libpng license, +which is an OSI-certified, BSD-like license: + +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. \ No newline at end of file diff --git a/games/skully_escape/LICENSE.txt b/games/skully_escape/LICENSE.txt new file mode 100644 index 00000000..510604da --- /dev/null +++ b/games/skully_escape/LICENSE.txt @@ -0,0 +1,20 @@ + +This game sources are licensed under an unmodified zlib/libpng license, +which is an OSI-certified, BSD-like license: + +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. \ No newline at end of file diff --git a/games/wave_collector/LICENSE.txt b/games/wave_collector/LICENSE.txt new file mode 100644 index 00000000..510604da --- /dev/null +++ b/games/wave_collector/LICENSE.txt @@ -0,0 +1,20 @@ + +This game sources are licensed under an unmodified zlib/libpng license, +which is an OSI-certified, BSD-like license: + +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. \ No newline at end of file -- cgit v1.2.3 From 73774aadd63bba93908ee57f1e711c9bf2c70b53 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 3 May 2017 14:16:42 +0200 Subject: Review makefiles --- games/light_my_ritual/makefile | 2 +- src/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'games') diff --git a/games/light_my_ritual/makefile b/games/light_my_ritual/makefile index 287538c5..7bede523 100644 --- a/games/light_my_ritual/makefile +++ b/games/light_my_ritual/makefile @@ -94,7 +94,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) 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 + CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 --profiling --preload-file resources -s TOTAL_MEMORY=33554432 # -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 diff --git a/src/Makefile b/src/Makefile index b616b583..7dce33b9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -39,7 +39,7 @@ PLATFORM ?= PLATFORM_DESKTOP SHARED ?= NO # define NO to use OpenAL Soft as static library (or shared by default) -SHARED_OPENAL ?= YES +SHARED_OPENAL ?= NO # on PLATFORM_WEB force OpenAL Soft shared library ifeq ($(PLATFORM),PLATFORM_WEB) @@ -304,7 +304,7 @@ else @echo "raylib shared library (libraylib.so) generated!" endif else - # compile raylib static library. + # compile raylib static library. $(AR) rcs $(OUTPUT_PATH)/libraylib.a $(OBJS) @echo "libraylib.a generated (static library)!" ifeq ($(SHARED_OPENAL),NO) -- cgit v1.2.3