From 836c1636a2b5d7779c69cbb633a9ac690d54ef90 Mon Sep 17 00:00:00 2001 From: Ray San Date: Wed, 8 Feb 2017 20:02:40 +0100 Subject: [PATCH 1/2] Remove lighting system from rlgl standalone header --- src/audio.c | 2 +- src/audio.h | 2 ++ src/rlgl.h | 22 ---------------------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/audio.c b/src/audio.c index 5a5b008f..adbe4f4f 100644 --- a/src/audio.c +++ b/src/audio.c @@ -859,7 +859,7 @@ void SetMusicPitch(Music music, float pitch) // Set music loop count (loop repeats) // NOTE: If set to -1, means infinite loop -void SetMusicLoopCount(Music music, float count); +void SetMusicLoopCount(Music music, float count) { music->loopCount = count; } diff --git a/src/audio.h b/src/audio.h index 6f0c235a..05ba1a1d 100644 --- a/src/audio.h +++ b/src/audio.h @@ -109,6 +109,7 @@ extern "C" { // Prevents name mangling of functions void InitAudioDevice(void); // Initialize audio device and context void CloseAudioDevice(void); // Close the audio device and context bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully +void SetMasterVolume(float volume); // Set master volume (listener) Wave LoadWave(const char *fileName); // Load wave data from file Wave LoadWaveEx(void *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from raw array data @@ -138,6 +139,7 @@ void ResumeMusicStream(Music music); // Resume playin bool IsMusicPlaying(Music music); // Check if music is playing void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level) void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level) +void SetMusicLoopCount(Music music, float count); // Set music loop count (loop repeats) float GetMusicTimeLength(Music music); // Get music time length (in seconds) float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) diff --git a/src/rlgl.h b/src/rlgl.h index 9cee39cc..41f671e6 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -251,25 +251,6 @@ typedef unsigned char byte; float fovy; // Camera field-of-view apperture in Y (degrees) } Camera; - // Light type - typedef struct LightData { - unsigned int id; // Light unique id - bool enabled; // Light enabled - int type; // Light type: LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT - - Vector3 position; // Light position - Vector3 target; // Light target: LIGHT_DIRECTIONAL and LIGHT_SPOT (cone direction target) - float radius; // Light attenuation radius light intensity reduced with distance (world distance) - - Color diffuse; // Light diffuse color - float intensity; // Light intensity level - - float coneAngle; // Light cone max angle: LIGHT_SPOT - } LightData, *Light; - - // Light types - typedef enum { LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT } LightType; - // Texture parameters: filter mode // NOTE 1: Filtering considers mipmaps if available in the texture // NOTE 2: Filter is accordingly set for minification and magnification @@ -415,9 +396,6 @@ void EndShaderMode(void); // End custo void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied) void EndBlendMode(void); // End blending mode (reset to default: alpha blending) -Light CreateLight(int type, Vector3 position, Color diffuse); // Create a new light, initialize it and add to pool -void DestroyLight(Light light); // Destroy a light and take it out of the list - void TraceLog(int msgType, const char *text, ...); float *MatrixToFloat(Matrix mat); From 42d5e3bd24afe53097dfb4dcbedbe43dc24a4f88 Mon Sep 17 00:00:00 2001 From: Ray San Date: Thu, 9 Feb 2017 18:13:23 +0100 Subject: [PATCH 2/2] [web] Added new social networks Replaced tabs by spaces --- docs/common/css/main.css | 4 +- docs/common/img/icon_handmade.png | Bin 0 -> 2364 bytes docs/common/img/icon_youtube.png | Bin 0 -> 1456 bytes docs/examples.html | 126 ++++++++++++++------------- docs/games.html | 122 +++++++++++++------------- docs/helpme.html | 140 +++++++++++++++--------------- docs/index.html | 130 +++++++++++++-------------- docs/license.html | 134 ++++++++++++++-------------- 8 files changed, 334 insertions(+), 322 deletions(-) create mode 100644 docs/common/img/icon_handmade.png create mode 100644 docs/common/img/icon_youtube.png diff --git a/docs/common/css/main.css b/docs/common/css/main.css index dd014629..7eb86e87 100644 --- a/docs/common/css/main.css +++ b/docs/common/css/main.css @@ -61,8 +61,10 @@ p a:hover{text-decoration: none; color:gray;} filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#e0e0e0',GradientType=0 ); } -#social{ width:300px; height:50px; position:relative; float:right; margin-right:8px; margin-top:20px; margin-bottom:20px; } +#social{ width:372px; height:50px; position:relative; float:right; margin-right:8px; margin-top:20px; margin-bottom:20px; } #social a:hover{ background-position: 0 -36px;} +#youtube{ width:36px; height:36px; float:left; position:relative; background-image: url(../img/icon_youtube.png); cursor: pointer; background-repeat:no-repeat; background-position: 0 0;} +#handmade{ width:36px; height:36px; float:left; position:relative; background-image: url(../img/icon_handmade.png); cursor: pointer; background-repeat:no-repeat; background-position: 0 0;} #twitch{ width:36px; height:36px; float:left; position:relative; background-image: url(../img/icon_twitch.png); cursor: pointer; background-repeat:no-repeat; background-position: 0 0;} #patreon{ width:36px; height:36px; float:left; position:relative; background-image: url(../img/icon_patreon.png); cursor: pointer; background-repeat:no-repeat; background-position: 0 0;} #itchio{ width:36px; height:36px; float:left; position:relative; background-image: url(../img/icon_itchio.png); cursor: pointer; background-repeat:no-repeat; background-position: 0 0;} diff --git a/docs/common/img/icon_handmade.png b/docs/common/img/icon_handmade.png new file mode 100644 index 0000000000000000000000000000000000000000..ad4ca7f2f9bbb737a9248155816cd09642bb4ece GIT binary patch literal 2364 zcmV-C3B&e@P)(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRZ^!bwCyRCwC#noW-#M-_&jQ~hygh$A+zV8IT-PXLq!OBO*0A_w9G?1aPw5@Lhx zIM~j_<9K3EoM6X^ViJ;wjFICYSp>l^U;!dOArdR@0_mcu0H2I=e+gyh^lfs9fsTNDASL(KDYR>x@zxVHs!YT(Cr(t;qj@@-va^y zfRbV$bB3(L;4w(O$XDOK2=yXfO}6(R31i+_L#jnO?d|Dz=M7z)+a-HEH*?6m z#=#0jUE@{gFsO#mFbEnd6m?Cf;X%-We>C|?Q56vF!#<_{ZMh()f*`0C*<705x%@b$KxY6m^NSp$yccI;NhaFWOj%tGdp8OH~npcI?=We@yX^AR<(C&B4njI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4K~U}k1RaNZPSREoKC=NTCpA@%4s z+)NrblR>#|wTgFSv;Sg@QZ|@k_%BYA&trTa@qO<6Jc*v0BT-qX*Txw01&ZV2)%z{nJQiA+ve_0000< KMNUMnLSTZA0i)Ld literal 0 HcmV?d00001 diff --git a/docs/examples.html b/docs/examples.html index e495dd95..87f20536 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -1,15 +1,15 @@ - - + + - - raylib - examples - - - - - + + raylib - examples + + + + + @@ -19,53 +19,55 @@ - + - + - - - -
- + + + +
+ -
- -
+
+ +
+ - - - -
- + -
+
+
-
-

Examples are organized by colors depending on the raylib module features - they are teaching. Currently, raylib main modules are 7.

-
+
+

Examples are organized by colors depending on the raylib module features + they are teaching. Currently, raylib main modules are 7.

+

Wanna see all functions available in raylib? Check cheatsheet


Click to filter by module:

-
+
-
+
- + -
+
- - + + - + - - - + + + - - - + + + - + - - - + ga('send', 'pageview'); + + \ No newline at end of file diff --git a/docs/games.html b/docs/games.html index c3f98054..a236a795 100644 --- a/docs/games.html +++ b/docs/games.html @@ -1,15 +1,15 @@ - - + + - - raylib - games - - - - - + + raylib - games + + + + + @@ -19,95 +19,97 @@ - + - + - - - -
- + + + +
+ -
- -
+
+ +
+ - - - -
- + -
+
+
-
-

Games are organized in three categories:

-
+
+

Games are organized in three categories:

+
sample games
full games
users games
-
+
-
+
- + -
+ - - + + - + - - - + + + - - - + + + - + - - - + ga('send', 'pageview'); + + \ No newline at end of file diff --git a/docs/helpme.html b/docs/helpme.html index 93e8495d..c692077b 100644 --- a/docs/helpme.html +++ b/docs/helpme.html @@ -1,15 +1,15 @@ - - + + - - raylib - helpme - - - - - + + raylib - helpme + + + + + @@ -19,79 +19,81 @@ - - - - -
- + + + + +
+ -
- -
+
+ +
+ - - - -
- + -
+
+
-
-

I’m working hard on raylib but my resources are quite limited. - If you enjoy raylib and want to help / contribute, please, let me know.

-
-

The following help is highly appreciated:

-
-

- C programming - Can you write / review / test / improve the code?

-

- Documentation / Tutorials writters - Can you write some tutorial?

-

- Linux, OSX, consoles... - Can you compile and test raylib on another system?

-

- Testers of current features - Can you find some bug on raylib?

-

- Web Development - Can you help with the web?

-
-

If you can not help on any of the above points but you still want to contribute... +

+

I’m working hard on raylib but my resources are quite limited. + If you enjoy raylib and want to help / contribute, please, let me know.

+
+

The following help is highly appreciated:

+
+

- C programming - Can you write / review / test / improve the code?

+

- Documentation / Tutorials writters - Can you write some tutorial?

+

- Linux, OSX, consoles... - Can you compile and test raylib on another system?

+

- Testers of current features - Can you find some bug on raylib?

+

- Web Development - Can you help with the web?

+
+

If you can not help on any of the above points but you still want to contribute... please, consider helping with a small donation or contributing with raylib patreon. It will really motivate to continue improving this project.

-
-
-
- - - - -
-
-
+
+
+
+ + + + +
+
+
- + -
- - - - + ga('send', 'pageview'); + + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 00dd2079..d177dca2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,16 +1,16 @@ - - + + - - raylib - - - - - + + raylib + + + + + @@ -29,7 +29,7 @@ - + - - - -
- + + + +
+ -
- -
+
+ +
+ - - - -
- + -
+
+
-
- raylib is a simple and easy-to-use library to learn videogames programming. +
+ raylib is a simple and easy-to-use library to learn videogames programming.


-

raylib is highly inspired by Borland BGI graphics lib and by XNA framework. Allegro and SDL have also been analyzed for reference.

-
+

raylib is highly inspired by Borland BGI graphics lib and by XNA framework. Allegro and SDL have also been analyzed for reference.

+

NOTE for ADVENTURERS: raylib is a programming library to learn videogames programming; no fancy interface, no visual helpers, no auto-debugging... just coding in the most pure spartan-programmers way. Are you ready to learn? Jump to code examples!.


- some raylib features -
-
- - Written in plain C code (C99)
- - Uses PascalCase/camelCase notation
- - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0)
- - Unique OpenGL abstraction layer (usable as standalone module): [rlgl]
- - Powerful fonts module with SpriteFonts support (XNA fonts, AngelCode fonts, TTF)
- - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
- - Basic 3d support for Geometrics, Models, Heightmaps and Billboards
+ some raylib features +
+
+ - Written in plain C code (C99)
+ - Uses PascalCase/camelCase notation
+ - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0)
+ - Unique OpenGL abstraction layer (usable as standalone module): [rlgl]
+ - Powerful fonts module with SpriteFonts support (XNA fonts, AngelCode fonts, TTF)
+ - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
+ - Basic 3d support for Geometrics, Models, Heightmaps and Billboards
- Materials (diffuse, normal, specular) and Lighting (point, directional, spot)
- Shaders support, including Model shaders and Postprocessing shaders
- - Powerful math module for Vector and Matrix operations: [raymath]
- - Audio loading and playing with streaming support (WAV, OGG, FLAC, XM, MOD)
+ - Powerful math module for Vector and Matrix operations: [raymath]
+ - Audio loading and playing with streaming support (WAV, OGG, FLAC, XM, MOD)
- VR stereo rendering support with configurable HMD device parameters
- Multiplatform support: Android, Raspberry Pi, HTML5, Oculus Rift CV1
- Custom color palette for fancy visuals on raywhite background
- Minimal external dependencies (GLFW3, OpenGL, OpenAL)
- Complete binding to Lua: [rlua]
-
-
+
+
raylib architechture

Wanna see all functions available in raylib? CHECK CHEATSHEET

-

raylib is open-source and free to use. View license.

+

raylib is open-source and free to use. View license.


raylib supporters on patreon

The following people is supporting raylib project on patreon. Many thanks to all of them for believing in the project and contributing to it.

@@ -128,24 +130,24 @@

- Evan


And a very special thanks to Ilya Zarembsky for his generous contribution. Many thanks Ilya! Hope your students enjoy raylib! :D

-
+
- + -
+
- - - + ga('send', 'pageview'); + + \ No newline at end of file diff --git a/docs/license.html b/docs/license.html index f9fc1b9f..5032bad1 100644 --- a/docs/license.html +++ b/docs/license.html @@ -1,15 +1,15 @@ - - + + - - raylib - license - - - - - + + raylib - license + + + + + @@ -19,75 +19,77 @@ - - - - -
- + + + + +
+ -
- -
+
+ +
+ - - - -
- + -
+
+
-
- license -

-

raylib is licensed under an unmodified zlib/libpng license, which is an - OSI-certified, BSD-like license that allows static linking with closed - source software. It is reproduced in its entirety below.

-
-
-

Copyright (c) 2013-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.

-
-
-
+
+ license +

+

raylib is licensed under an unmodified zlib/libpng license, which is an + OSI-certified, BSD-like license that allows static linking with closed + source software. It is reproduced in its entirety below.

+
+
+

Copyright (c) 2013-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.

+
+
+
- + -
+
- - - + ga('send', 'pageview'); + + \ No newline at end of file