Update web examples -WORK IN PROGRESS-

This commit is contained in:
Ray 2017-04-01 00:51:31 +02:00
parent 0a33fbf8bb
commit e6ed85e993
70 changed files with 1204427 additions and 1274472 deletions

View file

@ -25,6 +25,9 @@ int screenHeight = 450;
int framesCounter = 0; int framesCounter = 0;
float timePlayed = 0.0f; float timePlayed = 0.0f;
static bool pause = false;
Music music;
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Module Functions Declaration // Module Functions Declaration
@ -42,7 +45,9 @@ int main()
InitAudioDevice(); // Initialize audio device InitAudioDevice(); // Initialize audio device
PlayMusicStream(0, "resources/audio/guitar_noodling.ogg"); // Play music stream music = LoadMusicStream("resources/audio/guitar_noodling.ogg");
PlayMusicStream(music);
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
@ -59,6 +64,8 @@ int main()
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
UnloadMusicStream(music); // Unload music stream buffers from RAM
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped) CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -73,33 +80,26 @@ void UpdateDrawFrame(void)
{ {
// Update // Update
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
framesCounter++; UpdateMusicStream(music); // Update music buffer with new stream data
// Testing music fading from one file to another // Restart music playing (stop and play)
/* if (IsKeyPressed(KEY_SPACE))
if (framesCounter > 600) // Wait for 10 seconds (600 frames)
{ {
volume -= 0.01; // Decrement music volume level StopMusicStream(music);
PlayMusicStream(music);
// When music volume level equal or lower than 0,
// restore volume level and init another music file
if (volume <= 0)
{
volume = 1.0;
framesCounter = 0;
PlayMusicStream(1, "resources/audio/another_file.ogg");
} }
SetMusicVolume(volume); // Pause/Resume music playing
if (IsKeyPressed(KEY_P))
{
pause = !pause;
if (pause) PauseMusicStream(music);
else ResumeMusicStream(music);
} }
*/
if (IsWindowMinimized()) PauseMusicStream(0); // Get timePlayed scaled to bar dimensions (400 pixels)
else ResumeMusicStream(0); timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*400;
timePlayed = GetMusicTimePlayed(0)/GetMusicTimeLength(0)*100*4; // We scale by 4 to fit 400 pixels
UpdateMusicStream(0); // Update music buffer with new stream data
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw
@ -108,11 +108,14 @@ void UpdateDrawFrame(void)
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
DrawText("MUSIC SHOULD BE PLAYING!", 255, 200, 20, LIGHTGRAY); DrawText("MUSIC SHOULD BE PLAYING!", 255, 150, 20, LIGHTGRAY);
DrawRectangle(200, 250, 400, 12, LIGHTGRAY); DrawRectangle(200, 200, 400, 12, LIGHTGRAY);
DrawRectangle(200, 250, (int)timePlayed, 12, MAROON); DrawRectangle(200, 200, (int)timePlayed, 12, MAROON);
DrawRectangleLines(200, 200, 400, 12, GRAY);
DrawText("PRESS SPACE TO RESTART MUSIC", 215, 250, 20, LIGHTGRAY);
DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 280, 20, LIGHTGRAY);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,114 @@
/*******************************************************************************************
*
* raylib [audio] example - Raw audio streaming
*
* NOTE: This example requires OpenAL Soft library installed
*
* This example has been created using raylib 1.6 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2015 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
#include <stdlib.h> // Required for: malloc(), free()
#include <math.h> // Required for: sinf()
#define MAX_SAMPLES 22050
#define MAX_SAMPLES_PER_UPDATE 4096
int main()
{
// Initialization
//--------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [audio] example - raw audio streaming");
InitAudioDevice(); // Initialize audio device
// Init raw audio stream (sample rate: 22050, sample size: 16bit-short, channels: 1-mono)
AudioStream stream = InitAudioStream(22050, 16, 1);
// Generate samples data from sine wave
short *data = (short *)malloc(sizeof(short)*MAX_SAMPLES);
// TODO: Review data generation, it seems data is discontinued for loop,
// for that reason, there is a clip everytime audio stream is looped...
for (int i = 0; i < MAX_SAMPLES; i++)
{
data[i] = (short)(sinf(((2*PI*(float)i)/2)*DEG2RAD)*32000);
}
PlayAudioStream(stream); // Start processing stream buffer (no data loaded currently)
int totalSamples = MAX_SAMPLES;
int samplesLeft = totalSamples;
Vector2 position = { 0, 0 };
SetTargetFPS(30); // Set our game to run at 30 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
// Refill audio stream if required
// NOTE: Every update we check if stream data has been already consumed and we update
// buffer with new data from the generated samples, we upload data at a rate (MAX_SAMPLES_PER_UPDATE),
// but notice that at some point we update < MAX_SAMPLES_PER_UPDATE data...
if (IsAudioBufferProcessed(stream))
{
int numSamples = 0;
if (samplesLeft >= MAX_SAMPLES_PER_UPDATE) numSamples = MAX_SAMPLES_PER_UPDATE;
else numSamples = samplesLeft;
UpdateAudioStream(stream, data + (totalSamples - samplesLeft), numSamples);
samplesLeft -= numSamples;
// Reset samples feeding (loop audio)
if (samplesLeft <= 0) samplesLeft = totalSamples;
}
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("SINE WAVE SHOULD BE PLAYING!", 240, 140, 20, LIGHTGRAY);
// NOTE: Draw a part of the sine wave (only screen width, proportional values)
for (int i = 0; i < GetScreenWidth(); i++)
{
position.x = i;
position.y = 250 + 50*data[i]/32000;
DrawPixelV(position, RED);
}
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
free(data); // Unload sine wave data
CloseAudioStream(stream); // Close raw audio stream and delete buffers from RAM
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -56,8 +56,7 @@ int main()
colors[i] = (Color){ GetRandomValue(20, 255), GetRandomValue(10, 55), 30, 255 }; colors[i] = (Color){ GetRandomValue(20, 255), GetRandomValue(10, 55), 30, 255 };
} }
SetCameraMode(CAMERA_FIRST_PERSON); // Set a first person camera mode SetCameraMode(camera, CAMERA_FIRST_PERSON); // Set a first person camera mode
SetCameraFovy(camera.fovy); // Set internal camera field-of-view Y
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
@ -88,7 +87,7 @@ void UpdateDrawFrame(void)
{ {
// Update // Update
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
UpdateCameraPlayer(&camera, &playerPosition); // Update camera and player position UpdateCamera(&camera); // Update camera and player position
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw

File diff suppressed because one or more lines are too long

View file

@ -47,10 +47,7 @@ int main()
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y camera.fovy = 45.0f; // Camera field-of-view Y
SetCameraMode(CAMERA_FREE); // Set a free camera mode SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
SetCameraPosition(camera.position); // Set internal camera position to match our camera position
SetCameraTarget(camera.target); // Set internal camera target to match our camera target
SetCameraFovy(camera.fovy); // Set internal camera field-of-view Y
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -50,9 +50,7 @@ int main()
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y camera.fovy = 45.0f; // Camera field-of-view Y
SetCameraMode(CAMERA_FREE); // Set a free camera mode SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
SetCameraPosition(camera.position); // Set internal camera position to match our camera position
SetCameraFovy(camera.fovy); // Set internal camera field-of-view Y
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -42,9 +42,7 @@ int main()
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera free"); InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera free");
SetCameraMode(CAMERA_FREE); // Set a free camera mode SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
SetCameraPosition(camera.position); // Set internal camera position to match our camera position
SetCameraTarget(camera.target); // Set internal camera target to match our camera target
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,9 @@
# #
# raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten) # raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten)
# #
# Copyright (c) 2015 Ramon Santamaria (@raysan5) # NOTE: By default examples are compiled using raylib static library and OpenAL Soft shared library
#
# Copyright (c) 2013-2016 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. # will the authors be held liable for any damages arising from the use of this software.
@ -26,6 +28,9 @@
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop() # WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
PLATFORM ?= PLATFORM_DESKTOP PLATFORM ?= PLATFORM_DESKTOP
# define NO to use OpenAL Soft as static library (shared by default)
SHARED_OPENAL ?= NO
# determine PLATFORM_OS in case PLATFORM_DESKTOP selected # determine PLATFORM_OS in case PLATFORM_DESKTOP selected
ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows
@ -62,49 +67,94 @@ endif
# define compiler flags: # define compiler flags:
# -O2 defines optimization level # -O2 defines optimization level
# -Og enable debugging
# -s strip unnecessary data from build
# -Wall turns on most, but not all, compiler warnings # -Wall turns on most, but not all, compiler warnings
# -std=c99 use standard C from 1999 revision # -std=c99 defines C language mode (standard C from 1999 revision)
ifeq ($(PLATFORM),PLATFORM_RPI) # -std=gnu99 defines C language mode (GNU C from 1999 revision)
CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline # -fgnu89-inline declaring inline functions support (GCC optimized)
else # -Wno-missing-braces ignore invalid warning (GCC bug 53119)
CFLAGS = -O2 -Wall -std=c99 # -D_DEFAULT_SOURCE use with -std=c99 on Linux to enable timespec and drflac
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 endif
ifeq ($(PLATFORM),PLATFORM_WEB) ifeq ($(PLATFORM),PLATFORM_WEB)
CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 -s ASSERTIONS=1 --profiling
#-s ASSERTIONS=1 # to check for memory allocation errors (-O1 disables it) # -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 ALLOW_MEMORY_GROWTH=1 # to allow memory resizing
#-s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) #-s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB)
endif endif
ifeq ($(PLATFORM),PLATFORM_RPI)
CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline
endif
#CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes #CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes
# define any directories containing required header files # define raylib release directory for compiled library
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),WINDOWS)
RAYLIB_PATH = ../release/win32/mingw32
endif
ifeq ($(PLATFORM_OS),LINUX)
RAYLIB_PATH = ../release/linux
endif
ifeq ($(PLATFORM_OS),OSX)
RAYLIB_PATH = ../release/osx
endif
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
RAYLIB_PATH = ../release/html5
endif
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDES = -I. -I../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads RAYLIB_PATH = ../release/rpi
else endif
INCLUDES = -I. -I../src -I../github/raylib/src
# external libraries headers # define any directories containing required header files
# GLFW3 INCLUDES = -I. -I../../../src -I../src/external -I$(RAYLIB_PATH)
INCLUDES += -I../external/glfw3/include
# GLEW: Not required any more, replaced by GLAD ifeq ($(PLATFORM),PLATFORM_RPI)
#INCLUDES += -I../external/glew/include INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
# OpenAL Soft endif
INCLUDES += -I../external/openal_soft/include ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),WINDOWS)
# external libraries headers
# GLFW3
INCLUDES += -I../src/external/glfw3/include
# OpenAL Soft
INCLUDES += -I../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 endif
# define library paths containing required libs # define library paths containing required libs
LFLAGS = -L. -L../src -L$(RAYLIB_PATH)
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
LFLAGS = -L. -L../src -L/opt/vc/lib LFLAGS += -L/opt/vc/lib
else endif
LFLAGS = -L. -L../src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries to link with # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),WINDOWS)
LFLAGS += -L../external/glfw3/lib/$(LIBPATH) # external libraries to link with
ifneq ($(PLATFORM_OS),OSX) # GLFW3
LFLAGS += -L../src/external/glfw3/lib/$(LIBPATH)
# OpenAL Soft # OpenAL Soft
LFLAGS += -L../external/openal_soft/lib/$(LIBPATH) LFLAGS += -L../src/external/openal_soft/lib/$(LIBPATH)
# GLEW: Not required any more, replaced by GLAD
#LFLAGS += -L../external/glew/lib/$(LIBPATH)
endif endif
endif endif
@ -114,20 +164,27 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),LINUX) ifeq ($(PLATFORM_OS),LINUX)
# libraries for Debian GNU/Linux desktop compiling # libraries for Debian GNU/Linux desktop compiling
# requires the following packages: # requires the following packages:
# libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev # libglfw3-dev libopenal-dev libegl1-mesa-dev
LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -lpthread -ldl
# on XWindow could require also below libraries, just uncomment # on XWindow could require also below libraries, just uncomment
#LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
else else
ifeq ($(PLATFORM_OS),OSX) ifeq ($(PLATFORM_OS),OSX)
# libraries for OS X 10.9 desktop compiling # libraries for OS X 10.9 desktop compiling
# requires the following packages: # requires the following packages:
# libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev # libglfw3-dev libopenal-dev libegl1-mesa-dev
LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAL -framework Cocoa
else else
# libraries for Windows desktop compiling # libraries for Windows desktop compiling
# NOTE: GLFW3 and OpenAL Soft libraries should be installed # 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 endif
endif endif
@ -138,7 +195,7 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
endif endif
ifeq ($(PLATFORM),PLATFORM_WEB) ifeq ($(PLATFORM),PLATFORM_WEB)
# just adjust the correct path to libraylib.bc # just adjust the correct path to libraylib.bc
LIBS = ../github/raylib/src/libraylib.bc LIBS = ../../../release/html5/libraylib.bc
endif endif
# define additional parameters and flags for windows # define additional parameters and flags for windows
@ -168,6 +225,8 @@ EXAMPLES = \
core_3d_picking \ core_3d_picking \
core_3d_camera_free \ core_3d_camera_free \
core_3d_camera_first_person \ core_3d_camera_first_person \
core_2d_camera \
core_world_screen \
shapes_logo_raylib \ shapes_logo_raylib \
shapes_basic_shapes \ shapes_basic_shapes \
shapes_colors_palette \ shapes_colors_palette \
@ -188,25 +247,28 @@ EXAMPLES = \
text_format_text \ text_format_text \
text_font_select \ text_font_select \
text_writing_anim \ text_writing_anim \
text_ttf_loading \
text_bmfont_unordered \
models_geometric_shapes \ models_geometric_shapes \
models_box_collisions \ models_box_collisions \
models_billboard \ models_billboard \
models_obj_loading \ models_obj_loading \
models_heightmap \ models_heightmap \
models_cubicmap \ models_cubicmap \
models_ray_picking \
shaders_model_shader \ shaders_model_shader \
shaders_shapes_textures \ shaders_shapes_textures \
shaders_custom_uniform \ shaders_custom_uniform \
shaders_postprocessing \ shaders_postprocessing \
shaders_basic_lighting \
audio_sound_loading \ audio_sound_loading \
audio_music_stream \ audio_music_stream \
fix_dylib \ audio_module_playing \
audio_raw_stream \
# typing 'make' will invoke the first target entry in the file, # typing 'make' will invoke the default target entry called 'all',
# in this case, the 'default' target entry is raylib # in this case, the 'default' target entry is raylib
default: examples all: examples
# compile all examples # compile all examples
examples: $(EXAMPLES) examples: $(EXAMPLES)
@ -229,10 +291,10 @@ core_mouse_wheel: core_mouse_wheel.c
# compile [core] example - gamepad input # compile [core] example - gamepad input
core_input_gamepad: core_input_gamepad.c core_input_gamepad: core_input_gamepad.c
ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM), $(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_RPI))
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
else else
@echo core_input_gamepad: Only supported on desktop platform @echo core_input_gamepad: Example not supported on PLATFORM_ANDROID or PLATFORM_WEB
endif endif
# compile [core] example - generate random values # compile [core] example - generate random values
@ -248,15 +310,15 @@ core_drop_files: core_drop_files.c
ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM),PLATFORM_DESKTOP)
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
else else
@echo core_drop_files: Only supported on desktop platform @echo core_drop_files: Example not supported on PLATFORM_ANDROID or PLATFORM_WEB or PLATFORM_RPI
endif endif
# compile [core] example - storage values # compile [core] example - storage values
core_storage_values: core_storage_values.c core_storage_values: core_storage_values.c
ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM), $(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_RPI))
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
else else
@echo core_storage_values: Only supported on desktop platform @echo core_storage_values: Example not supported on PLATFORM_ANDROID or PLATFORM_WEB
endif endif
# compile [core] example - gestures detection # compile [core] example - gestures detection
@ -279,6 +341,18 @@ core_3d_camera_free: core_3d_camera_free.c
core_3d_camera_first_person: core_3d_camera_first_person.c core_3d_camera_first_person: core_3d_camera_first_person.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [core] example - 2d camera
core_2d_camera: core_2d_camera.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [core] example - world screen
core_world_screen: core_world_screen.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [core] example - oculus rift
#core_oculus_rift: core_oculus_rift.c
# $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [shapes] example - raylib logo (with basic shapes) # compile [shapes] example - raylib logo (with basic shapes)
shapes_logo_raylib: shapes_logo_raylib.c shapes_logo_raylib: shapes_logo_raylib.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
@ -359,6 +433,14 @@ text_font_select: text_font_select.c
text_writing_anim: text_writing_anim.c text_writing_anim: text_writing_anim.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [text] example - text ttf loading
text_ttf_loading: text_ttf_loading.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [text] example - text bmfont unordered
text_bmfont_unordered: text_bmfont_unordered.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [models] example - basic geometric 3d shapes # compile [models] example - basic geometric 3d shapes
models_geometric_shapes: models_geometric_shapes.c models_geometric_shapes: models_geometric_shapes.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
@ -387,21 +469,25 @@ models_heightmap: models_heightmap.c
models_cubicmap: models_cubicmap.c models_cubicmap: models_cubicmap.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) --preload-file resources/cubicmap.png --preload-file resources/cubicmap_atlas.png $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) --preload-file resources/cubicmap.png --preload-file resources/cubicmap_atlas.png
# compile [models] example - model ray picking
models_ray_picking: models_ray_picking.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [shaders] example - model shader # compile [shaders] example - model shader
shaders_model_shader: shaders_model_shader.c shaders_model_shader: shaders_model_shader.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/base.vs --preload-file resources/shaders/grayscale.fs $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/glsl100/base.vs --preload-file resources/shaders/glsl100/grayscale.fs
# compile [shaders] example - shapes texture shader # compile [shaders] example - shapes texture shader
shaders_shapes_textures: shaders_shapes_textures.c shaders_shapes_textures: shaders_shapes_textures.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) --preload-file resources/texture_formats/sonic.png --preload-file resources/shaders/shapes_base.vs --preload-file resources/shaders/shapes_grayscale.fs $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) --preload-file resources/texture_formats/sonic.png --preload-file resources/shaders/glsl100/shapes_base.vs --preload-file resources/shaders/glsl100/shapes_grayscale.fs
# compile [shaders] example - custom uniform in shader # compile [shaders] example - custom uniform in shader
shaders_custom_uniform: shaders_custom_uniform.c shaders_custom_uniform: shaders_custom_uniform.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/base.vs --preload-file resources/shaders/swirl.fs $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/glsl100/base.vs --preload-file resources/shaders/glsl100/swirl.fs
# compile [shaders] example - postprocessing shader # compile [shaders] example - postprocessing shader
shaders_postprocessing: shaders_postprocessing.c shaders_postprocessing: shaders_postprocessing.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/base.vs --preload-file resources/shaders/bloom.fs $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) -s TOTAL_MEMORY=67108864 --preload-file resources/model/dwarf.obj --preload-file resources/model/dwarf_diffuse.png --preload-file resources/shaders/glsl100/base.vs --preload-file resources/shaders/glsl100/bloom.fs
# compile [shaders] example - shaders_basic_lighting # compile [shaders] example - shaders_basic_lighting
shaders_basic_lighting: shaders_basic_lighting.c shaders_basic_lighting: shaders_basic_lighting.c

View file

@ -43,9 +43,7 @@ int main()
bill = LoadTexture("resources/billboard.png"); // Our texture billboard bill = LoadTexture("resources/billboard.png"); // Our texture billboard
SetCameraMode(CAMERA_ORBITAL); // Set an orbital camera mode SetCameraMode(camera, CAMERA_ORBITAL); // Set an orbital camera mode
SetCameraPosition(camera.position); // Set internal camera position to match our camera position
SetCameraTarget(camera.target); // Set internal camera target to match our camera target
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -53,8 +53,7 @@ int main()
UnloadImage(image); // Unload cubesmap image from RAM, already uploaded to VRAM UnloadImage(image); // Unload cubesmap image from RAM, already uploaded to VRAM
SetCameraMode(CAMERA_ORBITAL); // Set an orbital camera mode SetCameraMode(camera, CAMERA_ORBITAL); // Set an orbital camera mode
SetCameraPosition(camera.position); // Set internal camera position to match our custom camera position
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -50,8 +50,7 @@ int main()
UnloadImage(image); // Unload heightmap image from RAM, already uploaded to VRAM UnloadImage(image); // Unload heightmap image from RAM, already uploaded to VRAM
SetCameraMode(CAMERA_ORBITAL); // Set an orbital camera mode SetCameraMode(camera, CAMERA_ORBITAL); // Set an orbital camera mode
SetCameraPosition(camera.position); // Set internal camera position to match our custom camera position
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,197 @@
/*******************************************************************************************
*
* raylib [models] example - Ray picking in 3d mode, ground plane, triangle, mesh
*
* This example has been created using raylib 1.7 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2015 Ramon Santamaria (@raysan5)
* Example contributed by Joel Davis (@joeld42)
*
********************************************************************************************/
#include "raylib.h"
#include "../src/raymath.h"
#include <stdio.h>
#include <float.h>
int main()
{
// Initialization
//--------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [models] example - 3d ray picking");
// Define the camera to look into our 3d world
Camera camera;
camera.position = (Vector3){ 10.0f, 8.0f, 10.0f }; // Camera position
camera.target = (Vector3){ 0.0f, 2.3f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.6f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
Vector3 cubePosition = { 0.0f, 1.0f, 0.0f };
Vector3 cubeSize = { 2.0f, 2.0f, 2.0f };
Ray ray; // Picking line ray
Model tower = LoadModel("resources/model/lowpoly-tower.obj"); // Load OBJ model
Texture2D texture = LoadTexture("resources/model/lowpoly-tower.png"); // Load model texture
tower.material.texDiffuse = texture; // Set model diffuse texture
Vector3 towerPos = { 0.0f, 0.0f, 0.0f }; // Set model position
BoundingBox towerBBox = CalculateBoundingBox( tower.mesh );
bool hitMeshBBox = false;
bool hitTriangle = false;
// Test triangle
Vector3 ta = (Vector3){ -25.0, 0.5, 0.0 };
Vector3 tb = (Vector3){ -4.0, 2.5, 1.0 };
Vector3 tc = (Vector3){ -8.0, 6.5, 0.0 };
Vector3 bary = { 0.0f, 0.0f, 0.0f };
SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
UpdateCamera(&camera); // Update camera
// Display information about closest hit
RayHitInfo nearestHit;
char *hitObjectName = "None";
nearestHit.distance = FLT_MAX;
nearestHit.hit = false;
Color cursorColor = WHITE;
// Get ray and test against ground, triangle, and mesh
ray = GetMouseRay(GetMousePosition(), camera);
// Check ray collision aginst ground plane
RayHitInfo groundHitInfo = GetCollisionRayGround(ray, 0.0f);
if ((groundHitInfo.hit) && (groundHitInfo.distance < nearestHit.distance))
{
nearestHit = groundHitInfo;
cursorColor = GREEN;
hitObjectName = "Ground";
}
// Check ray collision against test triangle
RayHitInfo triHitInfo = GetCollisionRayTriangle(ray, ta, tb, tc);
if ((triHitInfo.hit) && (triHitInfo.distance < nearestHit.distance))
{
nearestHit = triHitInfo;
cursorColor = PURPLE;
hitObjectName = "Triangle";
bary = Barycenter(nearestHit.hitPosition, ta, tb, tc);
hitTriangle = true;
}
else hitTriangle = false;
RayHitInfo meshHitInfo;
// Check ray collision against bounding box first, before trying the full ray-mesh test
if (CheckCollisionRayBox(ray, towerBBox))
{
hitMeshBBox = true;
// Check ray collision against mesh
meshHitInfo = GetCollisionRayMesh(ray, &tower.mesh);
if ((meshHitInfo.hit) && (meshHitInfo.distance < nearestHit.distance))
{
nearestHit = meshHitInfo;
cursorColor = ORANGE;
hitObjectName = "Mesh";
}
} hitMeshBBox = false;
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
Begin3dMode(camera);
// Draw the tower
DrawModel(tower, towerPos, 1.0, WHITE);
// Draw the test triangle
DrawLine3D(ta, tb, PURPLE);
DrawLine3D(tb, tc, PURPLE);
DrawLine3D(tc, ta, PURPLE);
// Draw the mesh bbox if we hit it
if (hitMeshBBox) DrawBoundingBox(towerBBox, LIME);
// If we hit something, draw the cursor at the hit point
if (nearestHit.hit)
{
DrawCube(nearestHit.hitPosition, 0.5, 0.5, 0.5, cursorColor);
DrawCubeWires(nearestHit.hitPosition, 0.5, 0.5, 0.5, YELLOW);
Vector3 normalEnd;
normalEnd.x = nearestHit.hitPosition.x + nearestHit.hitNormal.x;
normalEnd.y = nearestHit.hitPosition.y + nearestHit.hitNormal.y;
normalEnd.z = nearestHit.hitPosition.z + nearestHit.hitNormal.z;
DrawLine3D(nearestHit.hitPosition, normalEnd, YELLOW);
}
DrawRay(ray, MAROON);
DrawGrid(100, 1.0f);
End3dMode();
// Draw some debug GUI text
DrawText(FormatText("Hit Object: %s", hitObjectName), 10, 50, 10, BLACK);
if (nearestHit.hit)
{
int ypos = 70;
DrawText(FormatText("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, BLACK);
DrawText(FormatText("Hit Pos: %3.2f %3.2f %3.2f",
nearestHit.hitPosition.x,
nearestHit.hitPosition.y,
nearestHit.hitPosition.z), 10, ypos + 15, 10, BLACK);
DrawText(FormatText("Hit Norm: %3.2f %3.2f %3.2f",
nearestHit.hitNormal.x,
nearestHit.hitNormal.y,
nearestHit.hitNormal.z), 10, ypos + 30, 10, BLACK);
if (hitTriangle) DrawText(FormatText("Barycenter: %3.2f %3.2f %3.2f", bary.x, bary.y, bary.z), 10, ypos + 45, 10, BLACK);
}
DrawText("Use Mouse to Move Camera", 10, 430, 10, GRAY);
DrawFPS(10, 10);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

File diff suppressed because one or more lines are too long

View file

@ -75,9 +75,7 @@ int main()
target = LoadRenderTexture(screenWidth, screenHeight); target = LoadRenderTexture(screenWidth, screenHeight);
// Setup orbital camera // Setup orbital camera
SetCameraMode(CAMERA_ORBITAL); // Set an orbital camera mode SetCameraMode(camera, CAMERA_ORBITAL); // Set an orbital camera mode
SetCameraPosition(camera.position); // Set internal camera position to match our camera position
SetCameraTarget(camera.target); // Set internal camera target to match our camera target
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because one or more lines are too long

View file

@ -61,9 +61,7 @@ int main()
dwarf.material.texDiffuse = texture; // Bind texture to model dwarf.material.texDiffuse = texture; // Bind texture to model
// Setup orbital camera // Setup orbital camera
SetCameraMode(CAMERA_ORBITAL); // Set an orbital camera mode SetCameraMode(camera, CAMERA_ORBITAL); // Set an orbital camera mode
SetCameraPosition(camera.position); // Set internal camera position to match our camera position
SetCameraTarget(camera.target); // Set internal camera target to match our camera target
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because one or more lines are too long

View file

@ -65,9 +65,7 @@ int main()
target = LoadRenderTexture(screenWidth, screenHeight); target = LoadRenderTexture(screenWidth, screenHeight);
// Setup orbital camera // Setup orbital camera
SetCameraMode(CAMERA_ORBITAL); // Set an orbital camera mode SetCameraMode(camera, CAMERA_ORBITAL); // Set an orbital camera mode
SetCameraPosition(camera.position); // Set internal camera position to match our camera position
SetCameraTarget(camera.target); // Set internal camera target to match our camera target
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -47,8 +47,8 @@ int main()
fontBm = LoadSpriteFont("resources/fonts/bmfont.fnt"); // BMFont (AngelCode) fontBm = LoadSpriteFont("resources/fonts/bmfont.fnt"); // BMFont (AngelCode)
fontTtf = LoadSpriteFont("resources/fonts/pixantiqua.ttf"); // TTF font fontTtf = LoadSpriteFont("resources/fonts/pixantiqua.ttf"); // TTF font
fontPosition.x = screenWidth/2 - MeasureTextEx(fontBm, msgBm, fontBm.size, 0).x/2; fontPosition.x = screenWidth/2 - MeasureTextEx(fontBm, msgBm, fontBm.baseSize, 0).x/2;
fontPosition.y = screenHeight/2 - fontBm.size/2 - 80; fontPosition.y = screenHeight/2 - fontBm.baseSize/2 - 80;
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
@ -90,8 +90,8 @@ void UpdateDrawFrame(void)
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
DrawTextEx(fontBm, msgBm, fontPosition, fontBm.size, 0, MAROON); DrawTextEx(fontBm, msgBm, fontPosition, fontBm.baseSize, 0, MAROON);
DrawTextEx(fontTtf, msgTtf, (Vector2){ 75.0f, 240.0f }, fontTtf.size*0.8f, 2, LIME); DrawTextEx(fontTtf, msgTtf, (Vector2){ 75.0f, 240.0f }, fontTtf.baseSize*0.8f, 2, LIME);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

View file

@ -97,49 +97,7 @@ char id=123 x=191 y=141 width=14 height=45 xoffset=-1 yoffset=0
char id=124 x=416 y=141 width=5 height=45 xoffset=2 yoffset=0 xadvance=9 page=0 chnl=15 char id=124 x=416 y=141 width=5 height=45 xoffset=2 yoffset=0 xadvance=9 page=0 chnl=15
char id=125 x=207 y=141 width=13 height=45 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 char id=125 x=207 y=141 width=13 height=45 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15
char id=126 x=42 y=141 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 char id=126 x=42 y=141 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
‰PNG 0FFTMM…B`ˆ¸GDEF_Õ€„NGPOSWµzß<00>TdGSUB"n'“€Ô€OS/2Xƒò¸VcmapaÙ¾r¢cvt "ˆÀfeatTˆÔ,gaspÿÿ€|glyfÐà‘L5 headìc<63><6hheaõÂt$hmtx<74>Œÿw

IHDRÅ<>Îg IDATxœí<C593>MˆfǹßáE{¡±6V+Â+Ûj+„,ì0¸í…POâ…uœxF<78>Ë5Ìä•ï…€ žya'4ãà<C3A3>k/Lf“Ä‹@<40>Ú×w|u=
¹µp/Œz?Yœ·nW×[ÏSUçãýèóÿÁËL¿çÔ9§>þõ<O=uáÑ£G!„b^<¶î!„bõH!„3D@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!<21>;À;À£Ìë<C38C>Åç)7<>ï?Z|–ã®ñýß»£\ÍtìÒ•³öZS®F¿ùØŸ ŒcãÕøu×9†WO¬:V:oÍý³žWß:Ws/¬¶2e9­6eݧ>íÎÖ_ïUÛeã˜ÞýðêiŒw­­ÏØ+OK™Æ:_Ÿ:šÃ«Gc<47>#¦t]c<>#¥öøˆ®~ÔPÓ÷y¯1Ɖâ¸õp ¼oà à#™÷?áœôó,W€]à9ãûo<0F>ã­»Àï€K™Ï®S~P;À«Ñß?î<>Vºõó$ù¿CWZ9¾ Ÿ_¾kœ3ð=òÏ àø*muîYà™ÂwžY|¯…‡‹²œŸ_^6>»
8Çþ:ãÔ³}àû…ïœ_n47têoÒ=SëÔ,?q>{ŽºâEç³·èê§G,h¼çÃâóÖ<C3B3>eÈùö€? 8_G×+Î1TÜ´\tmåwô»¶0X[ý|Ìm¦o)éÚÆaãõƒÀ© à·Æç<C386>O%ïyƒ9äEÃScå°Î½ ܤ\ù.?Â~Hߤk‡À·Ç)ÚÆ` |¡« }x¼æ|¾¼`|¶\v~Ûg`|<>bñùó<C3B9>ÇeQ:Ÿ…底ŠÊ”{À<>eIÙ¥«ÛÞµŸ_¢þž†Ž=nW× ×GéÚ œ,^çþ+láx øl¡l^ßvü¢ðû»”<05>ÅmúYVu¾«ßÔr@ÿArÈuAWÎËQ˜!{Æâ€i¬)—èêu«(M€Sð ò³<C3B2>t3¼˜Ï⫊\C{ûaþ¦PÆu±K×ùÆÜ¢ë˜žælGcÍÔÒc¼Ny±mäê”ëI‰;t™ÅwÈŒßÅ®k}ÆKFÎúU÷9èR.Ñ)ù˜8•)'tõl(;ÀOñŸaëà•ÓŽ=X .`?“cà3œ·±EÀCàÇÎù½Ù=øuööuQÍLÕcø%å:´êóíÒµ·V.ÓnƾËðënP÷Äâ.ÝÀ:¤<>ª½CÉõkA¼G§Ês|ªðwŽ´¡Y¿9¢{Ä3€‡t®˜\çÿrtŒ±feH®c­©'%^ÁŸÑ¥<C391>"¶¶¤×J<C397>ù?ÐÇ Ý@ç Ú—9íHK<48>ñºŽÍº—Ðoæ\ ‡ÀÇ¿ÍÅW¤wA~{`±&3PvxuÖs/xõ®•=à<>ÂwÞXñù, î!<21>8»@'æÒûÞj«±¸<C2B8>$ŠæñJöèžÿÔÔ¸°š-AüøÀøN<°ÕΆR¿°3ðÁâÜ|H'”©ë"u}ì_[ü¬YÙ¦>ï¾þÿ”’+à2gÆÔbóýbM^%oQøÛÌ{ñMóžÅ#>n,*SÆr1½Ay€iq¥Ä™CàtƒúU:³~z®ÛÀç¬0¸
¼´ø½òkà]£9—f\F«Îz¸<E280A2>çˆ-á•,c°g¯%רçÛ‚[4ïÓYIúRj¿pj<70> ¯Ôb¹}Jæñôƨ97<39>Ç=ò.¯[Îo¼ºÜj51 gà˜.À%G<°ÕΆâ™Ðy1tÁ‡©IܸÎUR+ÒÑ
ž°¢ŽÇ^<5E>hŸ•Õ\—u-9ÿW.º¹O¤éË<>!<21>ùæüÿàwB¥<>1 ž¢ïk}±|Â'À&=µÁf9<‹ÇðçØ<C3A7>ä 𠆻˜jfa×h»Ÿa†—1 . q¡SÿÇœ
ƒNûŠ ¤­8¯/óf¤^ßæ*[ºëø4Ëmÿ><3E>ÄT,wŪÏçO¬~¾ÖÅë Û#ºz™>>Iûuyש ÖmÁsZÜd@¼DœÀzP±òð|ù1qCóÁrf5Ïš3ÑY~;KýY×<59>6òô~¤
,µjÄÖŒXaö5={d=øëœ¨!‘ó …HÓÖå[é +<2B>È=“ÿ<E2809C>íf*á Œ{Àÿ´†Ü«n½ ü'ò3Íš`3Åã[Fy`ÓÿUÊæÃÖÁ?žÙ…2¦±·¢cæîAl}û9§<39>¤Õÿ»¾XqV §g½+D{V§c:1Ôâ®XõùVpå×脜å2:¤{^%JÃëJ­Wï—==mõCcYÞ†N÷"ïSlQ‰a€´üGAÕç°*\®ñz~»Zõ—käibQ“«Da‰P¡ýcÆ]æø8ð_)h÷è:š@—RÀLÊ,וø¾æžÉÿi8~Ji`üûÎg}Mÿ`×÷·€¿Ážiö™M<4A>9Æè€þ)åÀ¡ÖÁNETC1æÊž¶½X\ÇË–­%¨¹<18>@.NÀޥs+äðV7Õ ~ž»"'$W}¾€\&97NEʳ¾Ôĉݧ»/(/Eõî¡÷¬ál½ŠW®|†á·RÐmêö8þÖ„Xx•ãSØÊé<C38A>nv—¥¥¬½ ²pêg/)ÇTÕZfªÜƒÏUú°&9õµÑ ¶0ý²¿Ô«Ä?¡Þ'Ô2håFCgœ{&c^zæÿ0<C3BF>YgCÜà[<råÃô@a~·±ø85këSWaˆ¿±ò”€´—sx<03>W>Ï"šso¦x9X`YH¯ú|1-æiËaá]רqbCïáü•+5ÄùÂ+'¢bjóå\£8U÷>^åø¶rz ø<>™÷ƒ¢ì˜kÀ©J-Å$Ô~ßjä7(:qb™m^ö×2håZ˜YYþÿ1qËÀ8Ôõbù$cáj‰æ¡>Á’Å#æ«K,U
K‰whc©°ªñ§·5¿ñr¤DÏüï­ý÷ÌÚü&-yPÆXYÓ7ïJÉ…¸|Œñ¬ž¹A¹&cŸç4Æ=\5¥¾,ÄH4 “t/«r< üsIh ûàsØ€%åo5àøÖ$h‰g9õWjäW°£MoqVmÅ<6D>héì3—rHàa0A•"TãˆV/jÖÖ•à*ÊùÍkfy5´ ŒCLÿže)Vâ^ÀYßœ­xËÓ¦À[Z•Á0hÇõÃr¦“<C2A6>>¹B¼œi<>²õ¬°=Y;§L¨ˆkÍúÔÇM”71)Ý]›±ú² °LšÏ<C5A1>²
³!k&t€=C/5jË :ÖÚ¥fñÌ6gÂ,ù}BY>Æò²<C3B2>Øß/ωc
B¤~.¸*¤¯l͘2<E28099>ƒÃZйºò"ùÆ<f²§;øËe`xÎϲ”vp^›é“Ú¯´ ÈcÐbÝÈY ãúQã×ôb…JÔ$8k R®ÅK—>S<>ï.mã,|ñ*%Ïr´)ÉàVýÌJÜb\kÊ©°Y~ç0²fBO`Öj¿_®“Î-Q nËÿ?Öì4^žÝšTªÐ ¥¥:UãÊÕ•Oÿ$yoŠdO^”÷9<ËRÈ^Ö¬¨oj`hKRÒš%l Bô÷P,×Pl©Ë‰„ "J®%/®)L¬•5õvŒ¶Õ2èL}¾ôø}ó\§q;
í¦5}®èÙ—¡÷ð*«ÙÐm%iãSà%ÊÐ-7¶fÖ g—ü€žë¤ß&ßù¿H^0Ôä÷®!]öS?rì«Ig±-É$6A1[qé=ÞädO9ÆJbýÜU9¼Z}ó%®á'<27>©Ù<C2A9> ü £±¥.­?ñó)‰wÏE,ƒV`cMЕåú„å<E2809E>+7ör¤Àr;o9_ŽÒùb¼GÁýèÕòVÏÜ3ó®Ë ôìÃÐ{ø"§«úæR ‰€<—ìð{»‰Tx &%<25>Å{A7)5Ñ^y>G¾“þ‰QŽç¿IÃÆIš[ö—HâN%5OY?¾.j,cYXVEKêßÞ¦E9úæ\‡ñ\a©_)³[ëµÕúyÓA*í+Âó©ï–µèÝ@l­ô¨±"y'½?±…0lijOÛò·óåhYngYÁâå†÷é¢ý[s<73>y¿uybÎ%[ÊvðîaÉm—[Ä@Ÿ<><C5B8><4A>L* ~v™Îâ½µ·)-&ìœïOY^2*p®—è’¨¤Œ@e-ûËùãëÎUÄM †©ÅË»ØkE ^¦µ>´,<2C>óLÿGt)t[öFh%NÈÝ è=ßèˆÛb0=—êC:H¥}Ex>¨ï^¿d%VªµPú¼W9<57>WJ¿·ü캖³@Ôž/Gi£¬ô|–« d5ÙøVN”ÒÄsÌ8ïRy{í³ïD§$´'uñå€g"‰É]pÍÀÞjv÷ÔaL\<5C>kö1|ÓÛ¼ìo J&ÞMÞì)G)ÓZj—WLÿ¯ÑÍ4¼ Î!®€[,'Q£s
}B¸±….7ãJX,Oºu‰g«ÐoéÌ≠ÏÒ¥q.å{<7B>±Ê\s¾Ôl¼¿xß[g^{<7B>rõ9¤Ê-];âÅõ„`é\œT)+jïæ¶ù ç°ÚçPWriyóe&rä@í€Sò53ÂŒFPïˆ+p<>;¢6±‡·ì/O«ê\„ô¶ÍK3móÿÝÂ8Gí>ôžé?®[}¶I
p¿s
}B¸ñò¼4À :»KçSŽónÔÒâžlíÌïÓýZÄþâGÔíÔæ­bi=_Íò½Üù¬Éœµ?}x>¡l¹UO¥­œá4[K<02>¥{¸·8ní90Ì•\ºö!›Œ¹ä@)[Ø3»ñÐgP( ´<5ækÙ_ '\bõœúضm¶ð¬>Ûæÿ÷ÌõqêÏÜëZÏãoZÌÕ-oPÛdX²ãßuœU.îlÃï´¢ÇÃÌ¿%Ã\ fp <èqü>¸XÔX7Æ<ß!Ý.)53òx n \= /j¯µb¹sƺ‡Öýk¥TžËL`È (ò­Ùs<C399>xè3(”:¡\y¼~è`úÓ¬<C393>XÒF7œT-<2D>½gÀªðÄÙ6Y4<óM}ñ\g—±oÉôŸ«[¥ÌØ«J&ÊÒžèá÷aïyËdö—ÿGœí C2«!k¢k¬“ÐobPÚ-®…šÜ Çtñ C°xkæ”1s†¤Üby“žÀƹ<C386>¡ÎXyúǸ‡GÀ—<C380>ã·âmõ+oš°@©±x¡Ô€ú
ÞqsŸyf¿¡ƒm¼™‰Ù
å(ÏÀ=ÊXl*VÀ¶Y4¼íHkÜEžõËÊ P2ý{u«4c;pª4ƒö±ÆƒI<û»ÁY+Jè¬Ã€ÞÙ6ƒ/6Ì:["¯k¬“Cëìê£ÑK„|ñ<C3B1> ÷ȳ<y\£¼‰Íú_<C3BA>µT°¦¯»Bÿë
ç®É‡_»<>cì”Ç<E2809D>Óºò¦ˆ%¼à®<C2AE>Ìx‡dõ²Žk5Z+§ÁЀ<C390>´Ó.¥œ ;Uå*YÈ `©ámÀr·l“ÿ¿´ö¿fVXŠUIs”vÿaÛ»^Zƒg®9_œÁñ€ö4Ø79ë½EÛ.l5±DcÄÅ;Ó•f²¡ý[é¼kvø»Ã©P*<2A>/XXZrƇë)¥‡Óõíññãþ¯Å\Þr]pvàÖ, AˆzëòÓóLÑg×ì·0jŒÏ…G<E280A6><1E>u,!„(q•³©eO€/‘Ÿ­åö™÷¾¿íÄ÷æ<_§Ø$ëà.ísKÏ#ÁE²ÍH!ÖÉ>ð3ìej÷Ð@(Ä$H!„
B!Ä9F@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!<42>»À£Å¿Bˆ™"<42> ö<>éfc¼Þv¢óÜt¾{³PFï·ñ æêˆå<CB86>_W åcq­ï4Þ“>×[ºWÞsŒ;Õóˆ{×ù^Íë÷ÀnÏrx¯÷iIëpzÒk.Ý£˜øy,Þ;ˆÞ+=÷uQªGc—ÛêGj¬%Cú ÚþÊ÷¤¦Ï²(<28>5Ç¶Ž±Émï<ŽGf`¡¢ÿØ+|woñ½!<21>àk~»m\~ÇøfêÀ ï(§àÅäï€?F¢ðyJܸÎf <09>0ÈÕ{Œz²|Àï?5B<jïÉmÚëwèËÞ¤k#Þ±5<C2B1>o¿±><3E>èÏUÊ<55>%G€ú ><17>ïR?S80<>¯ú63àíO&ï½W~ž;Þ/) Ó”ë¬76 ˆ–Ò —r@Û,:eøíí9&hcÑ÷žÔÖïÖ¾lH&¦çxñÿ“èÿKHôcèL<C3A8>Åïû¨è=à›Ͻm\fºÇu6£#ûðDòÞo>Où&íƒà€õÝ“7è_î¾mcø)<29>Õ©/9<>6CžeÉj8¤/ëÛ‡‰ñ îÁàüíâý<0F>÷8µðœ±ÞHôãU†ÍXüþùž¿<C5BE>“+†Ý«¾C½/}*ž<1E>þN•ûg9;@yÊ~øÊÀò¼Êê-M»ÀsÆg÷€ ×G<C397>Cã{_¡ýY¾Aÿ6<>hc°O×ÞsÜâôž\3¾Sj;V_v<½8öÓ¿sÇ~Õ9¶X ;Àçÿ®Óë‹¿/Å©…çL}à>]çs¡âõºÎÇâø2¶ir*îЯÌqEϽî$ß÷:©“ŹâßßsÊüyúu²Ûî
ˆ;®ð²:™>ăEiÀ€®Ñ¼<Ò¹ûò$g;â Ü©9ý<& <0B>P×C<C397>¼G÷,r<<ë”w•¯DßÀï‡j¹I»i=G*ài]´^Ÿ!ßg>O~€>¾ýýsì:n¹&¼¾ì5àáâÿçxŽõç¹ó,]{ÍñËõçïêC«`øYæ€<C3A6>#ºÎç¡ñùyç‡tb*æ%ì†ùÝÌ¡çÍðø±ó¹gî.qL×ÁZƒÔ±R”t<E2809D>Ï5wŒÛÉwŸ_7>o Èzå¶ùmÎÖÏ Îg¹.[”¢ß[V+Ôòݵá*Ë÷µ/©€ ü6ó^ 7ÈÏòÓø<C393>Øï['•¼÷+òýq:ñÓ—ÒjžÚx¯]Ö¶ku…W­ò×Ä£Ô®)¹ãâ ¼e ‚Ó¶}%¼Ñ"4ø—É™æÃà“SýcØý:O®Ïl<C38F>ë<EFBFBD>úðl+CiÆk)Xj̨ô±9 ë ÿAô^Z?o4/Ü“T¼¤ÔŠ•‡t"%÷ûïE{>ûœÈÉaù¾ÿ~–¨Ü
àä>ô±•3}NÞlþ'ÆûÖª…Üê’?.ÞOâž+ °kDƒ•sŒR»¬]ùcÝ'KäĦ÷”×±­àµí&вªÃ²Ý"Ó¶k@ið?¾Ê<«“‚³më^§pÌz<C38C>1cÊ<63>ãwØAX±9r¥ggqÝ¥¾±†F¥Áš­Aw<41>cøªûÜ“šèñWÈ—=ÎY`-»M]VÄÿ-]~µäÌìázs.†ðÙÖOÒ
9,×Àû,^ž…¡Ïê‡]ºØk”ŸÅMÚëàmlqn žÈ±LïÞ„¥O™¥ ËtåÏ_rÚ²ÁÎ5 fðÿõæÂóÀëÔùSA0Å€pÞ\1ÁgÝ·SÎá™ds3¢!>â=º³Uã <09>˜0¨¶BCýæ^ÐåCà“ø19¿+ Ek°¼Gõ#=fß—è´úLÂLÒDcÆc ugJ«.jÿ!î›ò®ºc:×JŽœÐŠÏø1ùz848× ºLÿàßs¶¸M"J ´6vŽƒ?t×ûõ¿ É€ú¨þò&88_®€˜¡þÅ¡x ö<>.¸0˜d­øË,?4è6ým˜š~ŸÛòÕ¿Dý Ç”\^Tzkߦ&ý”>õµñ4o°<XÒݯ¾ ]0…%ヒÑ-­ý“´•ý ìU5ƒ¿g=ˆÛNŸÕ"0uZæÿàöÉaÅ\Àr`´ÕŸxA—ÿŽÓöâÑbÚ={ë €]:3†Uà¹þ<><>\ï«ú_Á6Qmóª`AY•)=5e¾ŒmVý"ggV7ȯø¨Y*•ž7õc§ŸçL´)Á·ï­â¬ºiÍzrýA*”cábùv¯â»ƒ,jÚTÎrqB·¢`È,ÙZg;vo@Ú^h<¯—y0Xw6%ÑUà[ØÖ£šÁìv™Æ¡ÓY@r}´µòDzž¥.ÂÈ‹˜ØcbÃðéŠèDDN<[“¢cà?þ<1B><><EFBFBD>Óàêl<…%Jƒ?t {®ƒà!<21>Ê.-3ËqκÒb ð–?íÿ¦± ÛªLééÌÇòmZø¬ "o†”‰ÅåÈwµÌЮPŽNñê¦uOÞ~<7E>y?îô¬¥n<C2A5>Ú™<C39A>·.Ý*·e2£Ë-£¾GwÏc·7 Ár*è1°2;öY50”ÀçŒÏÜŒu VÌ€zî0kå<6B>åâ}ÑøŒÕ¤Ä«;Òvq“~YfYçÎÞ‡Â*'jÿZ¥6ÒHêZAÐgýù}:óNŽÏ1<AÑ*ÈåðÌ^0m6Àž‰Ô
”´‚{Rót¼d)ç¿<C3A7><C2BF>Ÿ ǟךÆq<>U W7½{â¥%®¥vf÷pñwíÌΊøôWâŠqlo@j5¥Çƒˆ÷\[3;¶õÕX¤JÔ&ê㺰޷ÜF¿¦´)Áün­¸ð.-rÉ<>µ4µH*jRbŽ=øO•?{<7B>Ä $ú$J×n<C397>‰58× ÒC±Ìè0^6@¯¾•RïÎ<C3AF>¾‰ªú2ÖÌ.=޵F¿e5ʘ;'ŽL—òv¿<76>±¶c꾺F¨ôi—­9D¬`ÀKtÂÓòå{KÿbâÜ5ÉMF,j6é;ø{ ¤z½J7UC²ð¶ýµûÆÌZ6å17…)Ÿi)cl´Ö=÷aÁŒ»tuÒK(²ÔYî<59>!‰ªZsf×:“>/xQì-÷¤õþ<C3B5>ÙfK)¨û´Ë>»4ZÁ€Ÿ"/¦jr•„ñÃá‡@ÚRÆÝQ b.{ûb¼à—}:Óo/Úr*<¿YP‡«Âsl3SÎ2,3ø©uSJVôÕUo(aàÏÍd-¿¥—7 ë¹ÅîoõKŸuæd=Ìeu³f³-ëï!?ñ#¸Ï
4Ë ?O<÷ÉÒi%\*-k³žxÛi[¦A~L²þÅX:Åñ-«ì+xŒúÁ¿ïY°}*<2A>¥õ‰”·¨´Ž¦ÆS»·Yn˜¥¥”C|§SºÖÁXyÙ­c{Ê;53·® n!<04>åÜC±¸È»]ÃÞ ÉÚZù{ä…QÚAz÷ä2ùX„xÕ@¼Ü0'¬¶•[úä Hcø¤k ƒs.þ#7mÉØŽ<>3çê —™.×ÏXé”s“™´Á%®ŽíÂ)mè4V=)õ½¹`À\nýšÉ¨÷lrâÁZm3*<2A>Q·Õd);\)Íå1ÝÍôéKU<>1Žú॓…å{å-ijÅØVW€UŸJ¦±Ú{ûkkŽme<6D>³fH{t¢9¼ÞÖl-—I,žM¥ËËj"¥Kmí€Sî“%ºrm̺'¹|Otå:=k&y‰n<E280B0> Ç.*×Fb<46><62>w¿ÓzÒš±¯tì7¢¿½‰œÕv¼ý7â¬sÞêŒÚÔË<C394>Ø<EFBFBD>lEÛ—£­>8­'Þý>ât©œEiâx@yÖîÅ.¤bî.+
\åvÀwh_“l[7¹*JÖ´<C396>Û<¨•óê
HyÀt¦1+Õ°woCR§`õêjœÎ¦J;Zx;ÃÕb•Û»'¥ ŒVçë•;>¶'ª—<E28094>àïš¾¬%†ñ®~©5ÔëÛâzâ|YdÞ±kÒ#ƒßv¬Á4ÎbjÝïÊ»ôû±€½¿([/¹™·;a\O¼{Rc²÷,^<5E>Ú{àYæÒ¾d*+è«Ð<C390>Ì"—„eÕxÑêµ I=šrÞ\)µ9ÞûPŠmò¬K©XÓà¤Ôäžúì=ŸeLi½y‰R¹‡Ü<6F>1Ê=U=)aíaPC©¾Dÿö]º'éžGË
PZx‡þ+Z\Ú%o­+ºÆ
^ƒ·gI3«5Û²zÜ£œLdU\¡ÿuÔìrÕ¶ºj˜j—Ém[Ó\¡}À«ÉMïeøËEÅ·¸½Bª)Ê ýêÿðiüAÃ[ã_:ö:w#í{¿ÓdA9úfu¬}÷é²8¶ô5å®Á³\ÆÏqqƒ¶WÐ^îÒ¾µKÿ Þ
­ïöYÕ<59> XÔ¦Ò <0A>OcšcÐrq¤çÉGÎ+ ¤<>ºerJ0å¶FÛ†Œz¥A/¿&ë<>—á/ç3ìm][îp¿[v¨ÿ¥N¸õY¶dØ ÷{ìzÒ—Úûú´–¾ »4ˆÔÖÁ˜˜ZZ~Ö§Ü%<+@)[jpïxåŽ÷¨èSn«|} ¯`<60>¡œ¡.[±,£åç¸ðèÑ£1Ž#„ØîÒùï±y¢Z±"ÖeBB!fˆ\B @!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ" !„'ãÀÜBIDATb†H!„3D@!„˜!B B!fˆB1Cæ$ö<><0F>GÉëÃÅg­ßƒà<>̹ÂënÅ1î:¿/½nö(sé|ï,®kŠò¦¯«å½éüþ÷ÀnÍEWrÕ9Wé¾Zg½6VÓfVÅ*ûÚ)Èõßµ}Š÷Œ[^ñ‘ö?ÅñcN`“çÀžó½¦<®S×ý ðÝ=ºë{pm%t×<E2809A>ï\~ÇúË*´ÕÙm$Ï3/°Ü_^^CY~FP˜äI¬ž]à¯ñþ”½Åo¦¤ncà—´•º†ð+V?°±R*1ë*«˜Ž«l<C2AB>Õ¥O<C2A5>½¼ÉfÍèçÄðªñÙWXO_r ¼•¼÷5¡(°Zv€ŸÒ 8­\ZüvªíUãØß¤}ðL]æoЯ¼—€ï<E282AC>[±f5jÓLß)CÚØ÷Y¯%`—Î6¥kmÉÍþë´ü8‰þ¾|£X-^¥¹\X¼®ßÙ[c
rÇÞ¥S³9Ž€§éÊûQΚžbžž£€\ÅžEÅ÷÷žñ<C5BE>ËȬz^¹ÍfÆbxm¬†Àó#•EÔáÍþ«°œ¯'ïÝ$ï™ã†ÀjyÑxÿp'úû°fê9âAïðΪÔO%–¼µâø*ðpñ÷1ðe:Q<>ÒÒA¥å-½â{æ5Êôþ¾)ë ð¯€ÿWYV±<56>«À¦øÐ_ƶÞâ´®?M¾}|žÍ<35>ÜDîo“¿KV€Ô÷sÖ„åët~ÊO2ïeÇ<65>Çð#—s¦³Räzü}+Õ3Yå©Qî¹ó<C2B9>­ø­ë/E\îOfÞ?¡3Û¤¤<1D>!3êût•ÆâÉß© ¼ ü:yï<79>À=Ë5ÏÒÝ›”Üý}|Œ³<C592>ìqà/<2F>¿™°Œ9Sj\­zW3<57>ÕD—V„XÛ¥òÕ¬dI)µãÜç­zð¡·”±t¼ïX.ˆ´ÍîÑ <12>‡À<E280A1>+Ëyž°Ú…u?[VôY…<59>hÿše<C5A1>6†à&y«æ5ÎNjbÞgy¢—µ<¶8È-§©rðüUéLëõLA SGŸ5ŽaÍߢ¢!w£âÿñÛ¾…¹"ö­Šùà‰Êp¼<E28098>¨%W9,n<>WŸï³ü,ƺ¾¾<IwoR>Þ[qYZ¹IÙ<> †úû<C3BA>žÇ-E•Š<C382>>KC¯Ñ¿]Ä„ÙkǵåûöŒ9%”qˆï: ×ÃÛä…Æò¹tç¹
¼¾q¹Ý.¬û95¹ÙÿÛtÏ=hCcöéøRîaþÐMÎÞͼ¿4¶À·±}¸±rð*ááâ85<05>üìrx.ó¾5K†®c¹m|ó9ò ³c”°"êÇœ![3óž§í>\aÙ$u%ó=Ë]ðÊs?mÍ+½ÇÖ=ù€îÞ[3‰>ޘܤn€þSÚÅj<C385>r<E280BA>¶€¹=ü D ¬¶üŒrݼN]´|lå±Üi)a‰]k½¸H×)—ž<E28094>µ,ë><3E>ÊroíE¾}?h(ë6¬3¥ç\\æ621ˆµ4ú»gvè÷ÒöpDçÂô8¦¤¥<G"pƒð|¸ÐÍ>v颤-Ÿð7XV¡¹e <09>Ü<EFBFBD>±œÉ™E™úÌŒ¦&ܯë¡X>rˤ ¶Ù°ÄUüAá·=<3D>»O×Áç8¤sgL<67>uOÞ§³ZY3‰ë¬Ïl)ü©Ž{<7B>ÓÆ ÜÌÕß¡xÑÈVg7w(_sJì¶šÒ: ÜĶ*¤±8Sb è\»Š…ÔÔ«Vÿ<>ýÇý[nÂÛ7pÛ²´¿FÝóÎÅ,YÞã À‡ƒç¸D·¼ê²ñ¹Œ<00>:Í ‹œ/Û2ÿ¿NÞÄåÍ:ãήf†RK˜cgX.k€½ÎÙŽ¦v6T"<22>Q{ÏÊâq»ƒûÙ­ŠÊ3át÷{Õ"À³ÆÄõ¬µþZî<5A>¸SHEÿ <09>Ý̹uP©iVüŠ'vÇlÇÇÀg¨ ˆ<>ŠÚžàR°êîðiì~w.<Aç~œ»_ŽYŽÊ‡¶Àm°-í-“)ËÕ{ÆRš®¸ƒÝx-ñ<>ÎGÎ|-óÿ<11>?/‡%R3‰åËn% Ìy {F+%†àtÆñ@<40>Š´w&7ñEE©nl<17>±ÚõË–Õ"u§<75>US÷Tl&œþƒIm»°¬]šªÃY³ûX„°Š¥ÅÒ`ñ¶KáýDÚ¶Qs?žZAYr³ÿܤ){Òj°V†Œ1™:Óçä–æHYÔø#ÀŒÍ7OÑ=Ì”·ÉWt+ªÞúMÎ$ÒJz ÏÅñ$˪ï!<21>Én3<0F>Úç(ÍN ë¤r±ë žÝzþ” <ÒÀI¯þæºZê¯虋³êɵ‹œ» M¶;÷rLÕŽálxŸX‰”XìZ3ÁZö±­­·Øœv5%cÞÏ¡X³ÿ,fkÂ[ëV³fÿÞD8Ç{tõ;å̸”-ƒT­
ŒÍ7¹Y@.ÑA 9S{Kô{ŽìN-‡ešº|©¢,·o¶ãqD箨<C2AE>MÔ¤2îÛIÅßš Dꢺ<C2A2>-VåSl]5ÑRsÉ@<ú,‰ XíÂrwµ˜lÇnÇñRű­l©0RNË…“ ´>¯Œy?‡»ŽJÁÐ<C381>œ®µØX³ÿWþ¾‰!‰€ZDKÁ_¹5 °‚ÿ`ýËεî1Áü˜„B†½ocÏûëåÎÓbJô¢át¦}Ãø|J¬{bùÍr»àPéºáMN/ûýÌÐŒ“;£¶]¬¢‡e¥ͷbBìAM]n<>”°V´¬s¹_.w†• Úgû~n Ö8Ø7>«HNÔFäº9†3Xër_Äò*üºÏ†,ÉËeƒ
<EFBFBD>Äëk;WoFÝêC,&g}AI}„X q<12>Ò¬±¥.´Ö_kVhf-}ÝÆH9=¤]ŒAµ^³LκŠÖif·²Ä­CXŸgZÛÔÔXã 7DN´lL±·ø~ V&«ç€?#oþï«zrÁUC¶•€Ç
ä
ëÏûbÅD¬Cÿ[tƒÍ:£ý-ak”púÜ<arÞòÌÔBÑâ';àµDºÆÜK)Ûç|­‰©Òûë ¡!íØ[!”fûC!Åf“«§ë©)V0ìdŸTôY—ìn7˜<37>3»^þ$óÝø<>Ñ À[Jx@ÿÔ;†µrì‡V»{U&Sƒ»tÑñV§{<7B>͘™Xq&ÖLëþ¦Áz^F¹¸î{<7B>[<5B>V@Û]xÀÛäÈ#MÏ{“eS® bµHÛ…Ø—Þ_OåÊ0F; Ù¦ÕY)ÔÇÈ|WlkSöJ“x9^)'Ê:°&}¬›ÖòLû€gú?þ!öÒžZW€—0¥&Ú×òã¦[»Zù”[I3OY‰ ÿЮb'Îø^ò=«r®z]½w<C2BD>PסÔv\-™Ó$-^¤pºüÍ»¿i½³¢zálðœç°"x­ýà4=m Î
ÌÔç<EFBFBD>³,XKSséž-Òvñ1×®k…Ðíø<C3AD>nYYk ©Ø¬èw8»=tKZ^Ü1-¾g,‘±ðLÿ¯ÿ»ƒ­uÔ.ç¨]òà Š¸SéÅëõ­ÎÈ
<óò,Ôtø«^W_šÕnÞý<C39E>Å…u­çf-c­ÅZ-sL—AsÌèfoÓ˜t@…¼Àë³ú¦¦]XíÚ³²ŒÕŽÃlÝ®*1-ÖŠ5cï»—IÎU¶äVÀ3ýǃŽ7c©uÔlÒQ»äaŠt(VZä@Kž…˜CºÈîUÒºoÀ&Ð÷þÑeÆË=·ûÀ{–§$ÚJ;4BW¶?£¾ž{{{Ī5X?`_¸%„¼,¤CÐlzr«Ö™¤¨%gÀ»Ô[¤§ÆŠméKoX<13>Q6ýÇ b¼
(mkÙüWÓ<57>B7²®þ<C2AE>ºˆ—ºëÿ$mK´î±ú™çÇÝdúÜßš\7¨ßT&P!äªÏÕÏ[´w¨ÇÀé· °5‡Ã ð?+¾çm_ÊⳚûûuBèšíÏÏ¿2y´[\q«ï^J¬õ¾¿.§Ø=+@ÎĘÃòÝC¿ 7¯ ³€1f·±ÓR†Hâšó„%Z¥ˆì<CB86>_}AJ¯#u£v€ õ¬4Psskpd.<2E>ËÚ{è[f€¿`œvQÓŽÿe<C3BF>ò‰ùam³znš8ì»Á[Ž\ß<>uë]xôèÑˆç­Æ[Vv͈*bjâ-{K©“­m¯[39öÅj³'t™-Wµ|nSÊ!Ħ’ë+é¬gDÏ<44>L€}ñ<E28093>ǽ­…¨!öͧËB½m¯‡æBœ/Ò¥²f\ÚÔ ]‡lí˜$߱зŒ5ÞOÝk3ëÞnY±9ä>À°Œ­Ã`¡Ù¿˜­ö¤lÓvËBˆéI3`º;½N-¼,_1't;jö/æÆKôÖߤíë'·m±»cï*,¥<>뮡Üb¾´Fë¯seˆbsy<73>³+úŠÂu­BÙ¤!„ !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ"<42>¹ €»À£<C380>¯»+/u®¿†<0F>ýÅëCã;W ÇÞ~oü6>Ç*¹¹xµb]Ë;ÀNrüܵö9',?Ÿô|)Vý­©“ñ¹Jç©¡ôüs÷Æ«oÖoâóÔÔ©Ü=²®wgñY® ¿_œ{[±êJz/¼>ñfÅ÷î6~'mC}ÛŽèÁÜÀï€KÎw>Þ[Mqþ®S¹Þó·¥k)q<>öcøNòÞëÀñ€rx¼ýÿý Ï36<0F>·ÿ¿<_øþàZòÞðÂÈåCÕ,å6Oö<4F>¯U|ïà<>—%Ì8ú üP-5\^nøþ÷8+:<0E>Ÿ<EFBFBD>TàÉèïŸLtž©ømôÿOT|ÿË"à;l÷Œ^ˆÁ Á|÷:E-æÉ“t3±SÎ2ƒ=xœç©»Z>O<>iý*Ëeéî׳À3ÿŸÐ=xŽº<C5BD><­MˆsGfYo2ng)¦çWÀQæý`žÿ5ðnæó£Åos|Êxÿx¸°x]i*éz¨™M¶ððÂwv€W“÷Nè¹W8½¿ñ«t¯cÑö.Ýsß&Þ£«³<00>OUþ._a>VËÊÓWhö­{bƒ¨qàMÍ,«6 È{­;èæù
¾Íþ<>t¦ø”·é|«ÇägƒžùÞ4Waò_÷èžõg8ÛYÞX¼ÿNg¤15ƒÓ ,[Ц”Wéÿ?>Êi{¹}vŸî…ÏR3½Ek<>è|[«†m¯Ï£¿YuAÄæP!˜jhPÔ\ð¢ˆk^cDc{Ó)þ”ßÿ¤ƒD<C692> Ü£sY×´ÏEˆ§Ç©qC]g˜¨<¡ Æó¸<h<.ägÿP?+ë³
`Ûýÿ<C3BD>Ö8€,œ£eÅÀ&¬.ˆ­&<26>!îŸ!+PĆ<C384>qÇ\LUk²t¹Tí³]úˆ<>RÅŸ>»Ø¿Xõ ±üŒeÓ:¢ÕkW/ä„S‰Ø3å¬lÛýÿ<C3BD>>q5XÏqVJ䈭&<26>mtÿˆ@T[fû·èLi<4C>Óͦ&(éÛÉûéb<5½KçÇž»%#6<>æž]j½°øÍª¸ü[ÿ𙸶‘ :ôâ-Æ`Ûýÿ<C3BD>¾q}é#ð6<C3B0>ÔoŸº´ÄÌxŒÓ<C592>?T-bŸÞ<C5B8>ÂwÇdøkü—èL.aK«ã6¾¹~‰mæÀ3ägÅSV©i|jvèV ¤LíkÞÖõÿ)Câ<,ë‹|åâÜѲ
ÅըƇt65AtÖ+ Ðy™ú<ö?YÞÊ1Ýý±®É r:¾ÈövÈS3eRè¢õŸÈ¼?d@ö&ë|S/—<þÿÀq¹`¹mv•aR!úyÕfàóÈ>ð}ã³müc<C3BC>wÏøNl)êcjL£Çsõ/¸+>ºø~Žà¦ò¢¾w€Ÿ˜µ²5CüyKÑSteO™ÒÔ|^üÿ<C3BC>rÁrBœKJà€ÓYt)ü*‰;uoJ9~0U¡¬ 6èÊôe¶gð_«º'!¦Ä[EP;K¶r,„ø”ÔeT@iLjýÿÖž´LV<07> õ¬}©Ðlù®+£Å|â5Kզʒˤ±Wðg<C3B0>,>û$«ol¥Áÿ³¨H y ÖMK:Þ‡Àk#œsJ_óyñÿ¦ˆÈåÊØöBdyŒÓ¨ð[•¿‰ýë«Ìÿ_,ƒÊ~šå™Ø5ÚÍÐ¥D@5+v<>¡Á¿•uG\ŸÐ%÷i­3¡-ÕX¤¬ ŠSqÞüÿ<C3BC>±ã΃Xb‰Ø²šåP<50>deñ·¨,sˆëˆž_Eƒ¿Åº#®ƒÙ¾5©I0<49>×dË\õ5ž7ÿ`Š8€t¹Ü6eû¢šœ  &À+eÌe8ç/¨ìø«É› †q@}ì‹•Õ¯•©,çeýʪóqn(Å%lå:Ëì¿Ä*û:ü7…à6òâG^4ÞO±²úwBê2²r³OEÿ?MµÉÁkcÇÔ¦¸<C2A6>*ð¶¥[Lm®Æ*0E€m 4ø_CË)WMͼÇt«r®¯'+~¾—‹õø!yÁg-7{GB8¿þÿÀù„8÷ôÙXVoâg*,eÜ´åÛ·‰K´êÍŠ¬<C5A0>kÉ™î½=2¬óÕ
ŽΫÿ?0Õ¾Bœkú€@M!VÅÐYmËNpc`íÌø]À19¯þÿ€â„èÁ~ÔUî DÊÏ) Ñ>ƒÃr ·óâØy[ÿŸ2Õ¾BœkÆBlAˆzù,.boø³êÍ€ ‰¿¼7övÞýÿ<C3BD>Ø„ÄAP±áü½u`ÍŒ½¾÷ó³„ô½‡!PtlÆ~—è6¢ò޹ |¥Ç±<C387>é69Jwâ <0C>ÞL}¸\yŽÏô(Û¶1Ös¯­Ïé}½<C2BD>ÿ¡å ù®W†Zj¯¿æ{ÊŸ°áÈ D‡^å¶™~DûVÓ19×Å3t<33>{9Â9ßdõ{ ô!Ý™3κO统ÕnI¾i¤bì-VïfÙ„2ˆ-C`³I;ÈÖ×*24ž'ÆNAœÛD&åøgc,7À<0E>u ÄºS)ωt¯oåÇy.ƒØB$„8%”7„ÚM<C39A>î÷rù >B”è¡Î5„$<©%ÆÊûp^Ë ¶ €Í&NÀÔçU³a8å>]ç9GÀ+ ß…³‰ˆö€’ï<E÷L=Ôù¯†¿s<>ÕÆmBÄ# ÄYnж!VŽ[´g²Ìm'ü*õI<C3B5>BÊauþ«ã]fÔ{¬oÓ±M(ƒØR.<zôhÝeB!ÄŠ‘@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!B B!fˆB1C$Bˆ" !„b†H!„3D@!„˜!ÿì@=V|IEND®B`0FFTMM…B`ˆ¸GDEF_Õ€„NGPOSWµzß<00>TdGSUB"n'“€Ô€OS/2Xƒò¸VcmapaÙ¾r¢cvt "ˆÀfeatTˆÔ,gaspÿÿ€|glyfÐà‘L5 headìc<63><6hheaõÂt$hmtx<74>Œÿw
kern33…loca§®µ:Ĉmaxp i˜ morxÀNÈwPname Q>:¤post#~”åq¤Np_ÅC#íÅC#íÿUÿUUUUÿUôªÿUUÂÃ8@.æôÌ<00>Ìë3 PfEd ¬UÿUôU«Ôv"UUªUUªªUUUªUªªUUUUUªªUUUUªªUUUªªUªUUUUªUªUUªUªªUUUUªUUÿUUUUUUªUªUUUUUªªUUUªUªªªªªUUªUUUªªªªªªUªªªªªªªªªªªªUUUUUªUUUUUUUUUUUUUUUUUUUªUUUUUUUUUUœ £¥§³·»ÿSax~ ¬ÿÿ  ¥§©µ¹¿R`x} ¬ÿÿÿãÿÃÿÂÿÁÿÀÿ¿ÿ¾ÿ»ÿiÿ]ÿGÿCà kern33…loca§®µ:Ĉmaxp i˜ morxÀNÈwPname Q>:¤post#~”åq¤Np_ÅC#íÅC#íÿUÿUUUUÿUôªÿUUÂÃ8@.æôÌ<00>Ìë3 PfEd ¬UÿUôU«Ôv"UUªUUªªUUUªUªªUUUUUªªUUUUªªUUUªªUªUUUUªUªUUªUªªUUUUªUUÿUUUUUUªUªUUUUUªªUUUªUªªªªªUUªUUUªªªªªªUªªªªªªªªªªªªUUUUUªUUUUUUUUUUUUUUUUUUUªUUUUUUUUUUœ £¥§³·»ÿSax~ ¬ÿÿ  ¥§©µ¹¿R`x} ¬ÿÿÿãÿÃÿÂÿÁÿÀÿ¿ÿ¾ÿ»ÿiÿ]ÿGÿCà
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab„Œ—œ<C593>Ÿž ¢¤£¥¦¨§©ª¬®­¯±°µ´¶·pefhušni<00>qgtjx¡³zdlkyc{~<7E>»¼²º¿Âv}…|†ƒˆ‰Š‡Ž<E280A1><00>o"ˆ****>P~¼ä(B\xŒžªÔ>fˆ¨ÐîBTj<03>¤ÈèFjˆ¢ºÐð8^nž¾äþ(LzަÈô"@btŽ æòBf¢Æà  ( > X ~ Ž ° È æ  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab„Œ—œ<C593>Ÿž ¢¤£¥¦¨§©ª¬®­¯±°µ´¶·pefhušni<00>qgtjx¡³zdlkyc{~<7E>»¼²º¿Âv}…|†ƒˆ‰Š‡Ž<E280A1><00>o"ˆ****>P~¼ä(B\xŒžªÔ>fˆ¨ÐîBTj<03>¤ÈèFjˆ¢ºÐð8^nž¾äþ(LzަÈô"@btŽ æòBf¢Æà  ( > X ~ Ž ° È æ
 

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,65 @@
/*******************************************************************************************
*
* raylib [text] example - BMFont unordered chars loading and drawing
*
* This example has been created using raylib 1.4 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2016 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
int main()
{
// Initialization
//--------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [text] example - bmfont unordered loading and drawing");
// NOTE: Using chars outside the [32..127] limits!
// NOTE: If a character is not found in the font, it just renders a space
const char msg[256] = "ASCII extended characters:\n¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆ\nÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæ\nçèéêëìíîïðñòóôõö÷øùúûüýþÿ";
// NOTE: Loaded font has an unordered list of characters (chars in the range 32..255)
SpriteFont font = LoadSpriteFont("resources/fonts/pixantiqua.fnt"); // BMFont (AngelCode)
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
// TODO: Update variables here...
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("Font name: PixAntiqua", 40, 50, 20, GRAY);
DrawText(FormatText("Font base size: %i", font.baseSize), 40, 80, 20, GRAY);
DrawText(FormatText("Font chars number: %i", font.charsCount), 40, 110, 20, GRAY);
DrawTextEx(font, msg, (Vector2){ 40, 180 }, font.baseSize, 0, MAROON);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadSpriteFont(font); // AngelCode SpriteFont unloading
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

File diff suppressed because one or more lines are too long

View file

@ -77,7 +77,7 @@ int main()
fontNames = tempFontNames; fontNames = tempFontNames;
textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].size*3, 1); textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].baseSize*3, 1);
btnNextRec = (Rectangle){ 673, positionY, 109, 44 }; // Button rectangle (useful for collision) btnNextRec = (Rectangle){ 673, positionY, 109, 44 }; // Button rectangle (useful for collision)
@ -166,7 +166,7 @@ void UpdateDrawFrame(void)
} }
// Text measurement for better positioning on screen // Text measurement for better positioning on screen
textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].size*3, 1); textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].baseSize*3, 1);
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw
@ -188,7 +188,7 @@ void UpdateDrawFrame(void)
DrawText("NEXT", 700, positionY + 13, 20, btnNextOutColor); DrawText("NEXT", 700, positionY + 13, 20, btnNextOutColor);
DrawTextEx(fonts[currentFont], text, (Vector2){ screenWidth/2 - textSize.x/2, DrawTextEx(fonts[currentFont], text, (Vector2){ screenWidth/2 - textSize.x/2,
260 + (70 - textSize.y)/2 }, fonts[currentFont].size*3, 260 + (70 - textSize.y)/2 }, fonts[currentFont].baseSize*3,
1, colors[currentFont]); 1, colors[currentFont]);
EndDrawing(); EndDrawing();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -68,8 +68,8 @@ int main()
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
positions[i].x = screenWidth/2 - MeasureTextEx(fonts[i], messages[i], fonts[i].size*2, spacings[i]).x/2; positions[i].x = screenWidth/2 - MeasureTextEx(fonts[i], messages[i], fonts[i].baseSize*2, spacings[i]).x/2;
positions[i].y = 60 + fonts[i].size + 50*i; positions[i].y = 60 + fonts[i].baseSize + 50*i;
} }
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
@ -118,7 +118,7 @@ void UpdateDrawFrame(void)
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
DrawTextEx(fonts[i], messages[i], positions[i], fonts[i].size*2, spacings[i], colors[i]); DrawTextEx(fonts[i], messages[i], positions[i], fonts[i].baseSize*2, spacings[i], colors[i]);
} }
EndDrawing(); EndDrawing();

File diff suppressed because one or more lines are too long

View file

@ -50,14 +50,14 @@ int main()
font2 = LoadSpriteFont("resources/fonts/custom_alagard.png"); // SpriteFont loading font2 = LoadSpriteFont("resources/fonts/custom_alagard.png"); // SpriteFont loading
font3 = LoadSpriteFont("resources/fonts/custom_jupiter_crash.png"); // SpriteFont loading font3 = LoadSpriteFont("resources/fonts/custom_jupiter_crash.png"); // SpriteFont loading
fontPosition1.x = screenWidth/2 - MeasureTextEx(font1, msg1, font1.size, -3).x/2; fontPosition1.x = screenWidth/2 - MeasureTextEx(font1, msg1, font1.baseSize, -3).x/2;
fontPosition1.y = screenHeight/2 - font1.size/2 - 80; fontPosition1.y = screenHeight/2 - font1.baseSize/2 - 80;
fontPosition2.x = screenWidth/2 - MeasureTextEx(font2, msg2, font2.size, -2).x/2; fontPosition2.x = screenWidth/2 - MeasureTextEx(font2, msg2, font2.baseSize, -2).x/2;
fontPosition2.y = screenHeight/2 - font2.size/2 - 10; fontPosition2.y = screenHeight/2 - font2.baseSize/2 - 10;
fontPosition3.x = screenWidth/2 - MeasureTextEx(font3, msg3, font3.size, 2).x/2; fontPosition3.x = screenWidth/2 - MeasureTextEx(font3, msg3, font3.baseSize, 2).x/2;
fontPosition3.y = screenHeight/2 - font3.size/2 + 50; fontPosition3.y = screenHeight/2 - font3.baseSize/2 + 50;
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
emscripten_set_main_loop(UpdateDrawFrame, 0, 1); emscripten_set_main_loop(UpdateDrawFrame, 0, 1);
@ -99,9 +99,9 @@ void UpdateDrawFrame(void)
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
DrawTextEx(font1, msg1, fontPosition1, font1.size, -3, WHITE); DrawTextEx(font1, msg1, fontPosition1, font1.baseSize, -3, WHITE);
DrawTextEx(font2, msg2, fontPosition2, font2.size, -2, WHITE); DrawTextEx(font2, msg2, fontPosition2, font2.baseSize, -2, WHITE);
DrawTextEx(font3, msg3, fontPosition3, font3.size, 2, WHITE); DrawTextEx(font3, msg3, fontPosition3, font3.baseSize, 2, WHITE);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,130 @@
/*******************************************************************************************
*
* raylib [text] example - TTF loading and usage
*
* This example has been created using raylib 1.3.0 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2015 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
int main()
{
// Initialization
//--------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [text] example - ttf loading");
const char msg[50] = "TTF SpriteFont";
// NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required)
// TTF SpriteFont loading with custom generation parameters
SpriteFont font = LoadSpriteFontTTF("resources/fonts/KAISG.ttf", 96, 0, 0);
// Generate mipmap levels to use trilinear filtering
// NOTE: On 2D drawing it won't be noticeable, it looks like FILTER_BILINEAR
GenTextureMipmaps(&font.texture);
float fontSize = font.baseSize;
Vector2 fontPosition = { 40, screenHeight/2 + 50 };
Vector2 textSize;
SetTextureFilter(font.texture, FILTER_POINT);
int currentFontFilter = 0; // FILTER_POINT
int count = 0;
char **droppedFiles;
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
fontSize += GetMouseWheelMove()*4.0f;
// Choose font texture filter method
if (IsKeyPressed(KEY_ONE))
{
SetTextureFilter(font.texture, FILTER_POINT);
currentFontFilter = 0;
}
else if (IsKeyPressed(KEY_TWO))
{
SetTextureFilter(font.texture, FILTER_BILINEAR);
currentFontFilter = 1;
}
else if (IsKeyPressed(KEY_THREE))
{
// NOTE: Trilinear filter won't be noticed on 2D drawing
SetTextureFilter(font.texture, FILTER_TRILINEAR);
currentFontFilter = 2;
}
textSize = MeasureTextEx(font, msg, fontSize, 0);
if (IsKeyDown(KEY_LEFT)) fontPosition.x -= 10;
else if (IsKeyDown(KEY_RIGHT)) fontPosition.x += 10;
// Load a dropped TTF file dynamically (at current fontSize)
if (IsFileDropped())
{
droppedFiles = GetDroppedFiles(&count);
if (count == 1) // Only support one ttf file dropped
{
UnloadSpriteFont(font);
font = LoadSpriteFontTTF(droppedFiles[0], fontSize, 0, 0);
ClearDroppedFiles();
}
}
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("Use mouse wheel to change font size", 20, 20, 10, GRAY);
DrawText("Use KEY_RIGHT and KEY_LEFT to move text", 20, 40, 10, GRAY);
DrawText("Use 1, 2, 3 to change texture filter", 20, 60, 10, GRAY);
DrawText("Drop a new TTF font for dynamic loading", 20, 80, 10, DARKGRAY);
DrawTextEx(font, msg, fontPosition, fontSize, 0, BLACK);
// TODO: It seems texSize measurement is not accurate due to chars offsets...
//DrawRectangleLines(fontPosition.x, fontPosition.y, textSize.x, textSize.y, RED);
DrawRectangle(0, screenHeight - 80, screenWidth, 80, LIGHTGRAY);
DrawText(FormatText("Font size: %02.02f", fontSize), 20, screenHeight - 50, 10, DARKGRAY);
DrawText(FormatText("Text size: [%02.02f, %02.02f]", textSize.x, textSize.y), 20, screenHeight - 30, 10, DARKGRAY);
DrawText("CURRENT TEXTURE FILTER:", 250, 400, 20, GRAY);
if (currentFontFilter == 0) DrawText("POINT", 570, 400, 20, BLACK);
else if (currentFontFilter == 1) DrawText("BILINEAR", 570, 400, 20, BLACK);
else if (currentFontFilter == 2) DrawText("TRILINEAR", 570, 400, 20, BLACK);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadSpriteFont(font); // SpriteFont unloading
ClearDroppedFiles(); // Clear internal buffers
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long