瀏覽代碼

Merge pull request #285 from raysan5/develop

Integrate develop branch
pull/264/merge
Ray 8 年之前
committed by GitHub
父節點
當前提交
1ed3d3285f
共有 27 個檔案被更改,包括 4919 行新增3837 行删除
  1. +4
    -4
      docs/games/drturtle.html
  2. +4
    -4
      docs/games/just_do.html
  3. +4
    -4
      docs/games/koala_seasons.html
  4. +4
    -4
      docs/games/light_my_ritual.html
  5. +4
    -4
      docs/games/skully_escape.html
  6. +57
    -3
      docs/games/wave_collector.data
  7. +4
    -4
      docs/games/wave_collector.html
  8. +4514
    -3395
      docs/games/wave_collector.js
  9. +5
    -0
      examples/Makefile
  10. 二進制
      examples/textures/resources/fudesumi_BC1.dds
  11. 二進制
      examples/textures/resources/fudesumi_BC3.dds
  12. 二進制
      examples/textures/resources/fudesumi_ETC2.ktx
  13. 二進制
      games/wave_collector/resources/textures/line.png
  14. +29
    -38
      games/wave_collector/screens/screen_gameplay.c
  15. +2
    -1
      games/wave_collector/screens/screens.h
  16. +15
    -7
      games/wave_collector/wave_collector.c
  17. +9
    -5
      src/Makefile
  18. +0
    -161
      src/android/jni/include/AL/oalMacOSX_OALExtensions.h
  19. +0
    -0
      src/android/jni/include/AL/oalStaticBufferExtension.h
  20. +16
    -10
      src/audio.c
  21. +191
    -150
      src/core.c
  22. +5
    -5
      src/models.c
  23. +8
    -3
      src/physac.h
  24. +31
    -28
      src/raylib.h
  25. +2
    -1
      src/rlgl.c
  26. +5
    -1
      src/textures.c
  27. +6
    -5
      templates/web_shell/shell.html

+ 4
- 4
docs/games/drturtle.html 查看文件

@ -14,8 +14,8 @@
<!-- Facebook metatags for sharing -->
<meta property="og:title" content="raylib HTML5 GAME">
<meta property="og:image:type" content="image/png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:url" content="http://www.raylib.com/games">
<meta property="og:site_name" content="raylib.com">
<meta property="og:description" content="New hmtl5 videogame, developed using raylib videogames library">
@ -24,8 +24,8 @@
<meta name="twitter:site" content="@emegemegames">
<meta name="twitter:title" content="raylib HTML5 GAME">
<meta name="twitter:description" content="New HTML5 videogame, developed using raylib videogames library">
<meta name="twitter:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/common/img/raylib_logo.png">
<!--<link rel="stylesheet" href="./Koala Seasons by emegeme_files/main.css">-->
<link rel="shortcut icon" href="http://www.raylib.com/favicon.ico">

+ 4
- 4
docs/games/just_do.html 查看文件

@ -14,8 +14,8 @@
<!-- Facebook metatags for sharing -->
<meta property="og:title" content="raylib HTML5 GAME">
<meta property="og:image:type" content="image/png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:url" content="http://www.raylib.com/games">
<meta property="og:site_name" content="raylib.com">
<meta property="og:description" content="New hmtl5 videogame, developed using raylib videogames library">
@ -24,8 +24,8 @@
<meta name="twitter:site" content="@emegemegames">
<meta name="twitter:title" content="raylib HTML5 GAME">
<meta name="twitter:description" content="New HTML5 videogame, developed using raylib videogames library">
<meta name="twitter:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/common/img/raylib_logo.png">
<!--<link rel="stylesheet" href="./Koala Seasons by emegeme_files/main.css">-->
<link rel="shortcut icon" href="http://www.raylib.com/favicon.ico">

+ 4
- 4
docs/games/koala_seasons.html 查看文件

@ -14,8 +14,8 @@
<!-- Facebook metatags for sharing -->
<meta property="og:title" content="raylib HTML5 GAME">
<meta property="og:image:type" content="image/png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:url" content="http://www.raylib.com/games">
<meta property="og:site_name" content="raylib.com">
<meta property="og:description" content="New hmtl5 videogame, developed using raylib videogames library">
@ -24,8 +24,8 @@
<meta name="twitter:site" content="@emegemegames">
<meta name="twitter:title" content="raylib HTML5 GAME">
<meta name="twitter:description" content="New HTML5 videogame, developed using raylib videogames library">
<meta name="twitter:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/common/img/raylib_logo.png">
<!--<link rel="stylesheet" href="./Koala Seasons by emegeme_files/main.css">-->
<link rel="shortcut icon" href="http://www.raylib.com/favicon.ico">

+ 4
- 4
docs/games/light_my_ritual.html 查看文件

@ -14,8 +14,8 @@
<!-- Facebook metatags for sharing -->
<meta property="og:title" content="raylib HTML5 GAME">
<meta property="og:image:type" content="image/png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:url" content="http://www.raylib.com/games">
<meta property="og:site_name" content="raylib.com">
<meta property="og:description" content="New hmtl5 videogame, developed using raylib videogames library">
@ -24,8 +24,8 @@
<meta name="twitter:site" content="@emegemegames">
<meta name="twitter:title" content="raylib HTML5 GAME">
<meta name="twitter:description" content="New HTML5 videogame, developed using raylib videogames library">
<meta name="twitter:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/common/img/raylib_logo.png">
<!--<link rel="stylesheet" href="./Koala Seasons by emegeme_files/main.css">-->
<link rel="shortcut icon" href="http://www.raylib.com/favicon.ico">

+ 4
- 4
docs/games/skully_escape.html 查看文件

@ -14,8 +14,8 @@
<!-- Facebook metatags for sharing -->
<meta property="og:title" content="raylib HTML5 GAME">
<meta property="og:image:type" content="image/png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:url" content="http://www.raylib.com/games">
<meta property="og:site_name" content="raylib.com">
<meta property="og:description" content="New hmtl5 videogame, developed using raylib videogames library">
@ -24,8 +24,8 @@
<meta name="twitter:site" content="@emegemegames">
<meta name="twitter:title" content="raylib HTML5 GAME">
<meta name="twitter:description" content="New HTML5 videogame, developed using raylib videogames library">
<meta name="twitter:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/common/img/raylib_logo.png">
<!--<link rel="stylesheet" href="./Koala Seasons by emegeme_files/main.css">-->
<link rel="shortcut icon" href="http://www.raylib.com/favicon.ico">

+ 57
- 3
docs/games/wave_collector.data 查看文件

@ -615,7 +615,63 @@ cΆ
u" –-÷~~XT§Ê²âس¦Œ•]aaìiÇ‘úéÀÿoïÞc«®î€'MÆS¦È„DˆÌAym¸‰¯!$ènºi&fÅÄ1 Îàt‰2µ "uÈÃñpK&dnÌ=€: §d¨“âÔ�‡PÞ†­8"êf åì÷ýµ·)åÞ>¤“}>ÉInzoOÏí?ßïïœï9g~2­ºäwéóý¥YðTÛ€ìýø\œóßöÊ<�(6æH:ºŽŸ™Æn®[¨€£•”åûÕkÒ¥_{ö�§;_~W:{î®tÞÏövH‹„âê�u+óùÚ°&_rœYP,ê®ãg” Ô½&>Óô)Ž nË–ºæ Àà¬ß ²~еv'Ñ÷Ž4<ê!zÞ¾ ˜²¦è˜ûU>“âýÆm€­ô “4œ±Oª§Wþê@ŸÛ–¥aïí�ÖõºÙé[ëVqOÓ;ÒÀXï;mIÝiY ??K0š·Š»×¤Hb:½p `KŇÍ€A?ª.™ÌônG�'V;Ò©qRÔ$7º2 Ë«bcŽï2hþŸÞuG{ <ªì#X}sÝþ'?>vjêÏÚôùyµGܺ^7«c€†¥Š¸ÜgÔŠm›Ž=%�ûÓ½E[çËïL_\ýÏ�ù;±]¯¥@}H0/ ¸·:�“%.ÅÚé·¶#Ø�Ž‹ÏŒ¯©›tÖÂßýĸ‡KŽ7¾Ë—W﩯[p0G{ Ö„š7]¼|ËË]ÆÜ“úVþ9 �S{Dí¤±³òêöX¿?’ cX´=�Šsº\{oÉ`�:‚y|.Ÿ¨¿r¸¼- @ÅÔê4lþÞ¢­×-mK®/îË*qraK‰E¿ÉkR|—Æ£‹pÔg²ÕúqÒÝE˶¼xò ÓÓ)ãI½'­JÜ™†<TÛ®¿ÓùФ/=±ai[ÎåouŒqdñöTSåC<¿/–ÎÎsóvÖC»²¿{gº jÓ›±g?ß�P₦ @�›çµ8óÑë–%­&�ÿÇ­éœøÜù�oÚ_jœÑ⽡ ×ü+v
4.dú€c�ìNÝ¢-vDP<wQõ®ž“~ž>rÙ­éÄkg¶«}lôäÔ}ÂÌý°ó€y„Õí�WoO_½æõºÇb©âŒ;V¥ÏÍ­=¬ÅÏãýoT¿ýBÄ“FTäN‚¼¸p[:/Ž0îqóÜÔ/KŠõí´Hf//y@!øÇÿ/’¨¯¯}g]ŒaÀ´×Zc|—|‰$ûn¦ÿ8vI@ö¤Åhq(Mϸ�/Ž©½xÅ–—‡/ýû–áUëw^Xµa{Öj.Y½ç•«6\ëüQí-½©nÙÈßV/¿fí¾Ê| `ýÚö?ÝÆÚzóXß¾tCMç+îH¼¹èòC·oÏOÔcë`œ"˜Ø5ÛÐôžøì§§¬-¹œÑó{Y0kÙ{MŽîÔ¼¯HtâvÉs{^è9é‘üwŠõcޱaéúmy­B$(.à'eùÕ½»S·8È&¦Ðc ?Š#�Æì@ãÅë8å/NÝ‹'ØXoÏ[¼ÎZþ|[Û®Ô3‚[G<Ý6^]¼# ¿~sÝýg.ûO—1÷§Á3v¦Ïþ¤ö°ïõ™üë|�=ÊnV�ï.Øš>; "8óîµEû‰vÊ RŃx3.;j~Æ@ÓBÊ+«÷WÅ“}ÿbýÄXc\‘LÄwÈ/Nʾ“§><‰@ö”›O�G€ŠàYÌ{å-^ÇÏb«]¼ß´~V?íÞ©#ƒ[Þ_ö·# ÇÔ}ßû—<~ôä¢u
ñ³“ÆÎL=nœõN86ßf¯#ɉƒƒ†ÌYYÛ㻋Z¬g¸ô¹7žÊ�®O$Êšö“×'l©»­ëwx?j'JõÓåêûRïÉ‹ÆØó; âÿhí€yBP–?íÖ·²cõÔ3
ñ— E­BŸþòý¨9èuûª4hví!íŒÉkó†|ê>¦Ú›ï5ÖlK_¹ò¥·~ÓeÌ”tæÔ×Òàì÷𶓝ŸŸ†Ì}z_~PÌj4«g(Ì$Dá_ü­Šé;GŒ-Æø©i‹ß‹àGç3 ¦þ ÉHCOä1•>jÅÖ ±s!‚l¡ñ„ìi;rßÊGk&n=0¶aê¾Sód"ƒ˜Ú¿ø�›Ÿ?!Kºß¸(}rââ¼E½ïúÅ¿£"ßÎXd[aáR¥Xÿï>aƾ˜-h^c»hÅÖõã6×ÝOþ…àoê>@˱ŽÞP°8gäâW_Qµþõ(X±äo¯\µî­GcŠ?ŠýŠ� X¨+ˆÓ£�˞ݽxÀôÇÿQ1ãÉ·Ìxb߈߿ú—,hOÉψ[ Kmÿ˃Øî3 #÷×g²1l¸°jý¶Kôc‹$#?ï¿ë"àÿ3 ˆš€,€Çú~×XˆÅxâ�¢¼ØÍ�oÛ«ßfשD?õ[ø²ÏEmÁM5ÆÅV¾¨ˆ>òä¡• �NîH§F"}ÄõÅ…bÉSŒ-¯A¨/ø³æ’DÞ—Nl,VŒÛã©¿¾±¼•>ÊóÏe¿Óó¬£@0ï'úm¥˜±1‰C‡"Ù(LŠ%ëÇöQOýð¿›8¤µó÷Ë‚}¡•€>šL– ú­û/öÆêåCp-tEXtSoftwareby.blooddy.crypto.image.PNG24Encoder¨îIEND®B`‚RIFF.eWAVEfmt D¬ˆXdatae óÿñÿïÿíÿëÿéÿçÿåÿäÿâÿàÿÞÿÝÿÛÿÙÿ×ÿÖÿÔÿÒÿÑÿÏÿÍÿÌÿÊÿÉÿÇÿ%FHJLNòÿ·ÿ¶ÿ´ÿ³ÿ±ÿ°ÿ®ÿ­ÿ«ÿªÿ©ÿ§ÿ¦ÿ¤ÿ£ÿ¢ÿ ÿŸÿžÿ�ÿ›ÿšÿ™ÿ˜ÿ–ÿÔÿ’”–—™š†ÿ…ÿƒÿ‚ÿ�ÿ€ÿÿ~ÿ}ÿ{ÿzÿyÿxÿwÿvÿuÿtÿsÿrÿqÿpÿoÿnÿmÿlÿkÿ'çéêìí‰ZÿYÿXÿWÿVÿUÿUÿTÿSÿRÿQÿQÿPÿOÿNÿMÿMÿLÿKÿJÿJÿIÿHÿHÿGÿFÿ‚BCEFG€4ÿ3ÿ2ÿ2ÿ1ÿ1ÿ0ÿ/ÿ/ÿ.ÿ.ÿ-ÿ,ÿ,ÿ+ÿ+ÿ*ÿ*ÿ)ÿ)ÿ(ÿ(ÿ'ÿ'ÿ&ÿ&ÿc££¤¥¦Tÿÿÿÿÿÿÿÿÿÿÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ
ñ— E­BŸþòý¨9èuûª4hví!íŒÉkó†|ê>¦Ú›ï5ÖlK_¹ò¥·~ÓeÌ”tæÔ×Òàì÷𶓝ŸŸ†Ì}z_~PÌj4«g(Ì$Dá_ü­Šé;GŒ-Æø©i‹ß‹àGç3 ¦þ ÉHCOä1•>jÅÖ ±s!‚l¡ñ„ìi;rßÊGk&n=0¶aê¾Sód"ƒ˜Ú¿ø�›Ÿ?!Kºß¸(}rââ¼E½ïúÅ¿£"ßÎXd[aáR¥Xÿï>aƾ˜-h^c»hÅÖõã6×ÝOþ…àoê>@˱ŽÞP°8gäâW_Qµþõ(X±äo¯\µî­GcŠ?ŠýŠ� X¨+ˆÓ£�˞ݽxÀôÇÿQ1ãÉ·Ìxb߈߿ú—,hOÉψ[ Kmÿ˃Øî3 #÷×g²1l¸°jý¶Kôc‹$#?ï¿ë"àÿ3 ˆš€,€Çú~×XˆÅxâ�¢¼ØÍ�oÛ«ßfשD?õ[ø²ÏEmÁM5ÆÅV¾¨ˆ>òä¡• �NîH§F"}ÄõÅ…bÉSŒ-¯A¨/ø³æ’DÞ—Nl,VŒÛã©¿¾±¼•>ÊóÏe¿Óó¬£@0ï'úm¥˜±1‰C‡"Ù(LŠ%ëÇöQOýð¿›8¤µó÷Ë‚}¡•€>šL– ú­û/öÆêåCp-tEXtSoftwareby.blooddy.crypto.image.PNG24Encoder¨îIEND®B`‚—D´C�æ)7ÿ€£DÚ´C Ѩ9Ðæ)7ÿ°D¶u²C�2�» æ)7ÿ€¼Dg™µCg¹•;æ)7ÿÉD£†´CâóÄ:pæ)7ÿ€ÕD—Þ±CþvÇ»!æ)7ÿâD¸e®Cb"ƒ¼æ)7ÿ€îD ²C™`µ»+æ)7ÿûDï´¯CÜøH¼«æ)7ÿÀE´Ñ¸CX—a<Wæ)7ÿ
E/§C1+½?æ)7ÿ@E¬€µC4®Œ;« æ)7ÿ€E®CåmŒ¼À æ)7ÿÀEœ¸C©í?<
æ)7ÿ#E—½´C·«
;<
æ)7ÿ@)E5µCøb; Iæ)7ÿ€/E¥ÿ¨Cm¿½ÐÕæ)7ÿÀ5EñϰCÇ8¼æ)7ÿ<Ea.¦CA¸!½]æ)7ÿ@BEx
'CÄ"�¾æ)7ÿ€HEX¤C —:½Dæ)7ÿÀNE $çCI¡>_æ)7ÿUEva‹CQ®í½æ)7ÿ@[E´«Cw0¼æ)7ÿ€aE]D¦C· ½ÿÿæ)7ÿÀgE�ã¸CdÛd<æ)7ÿnEZÚC“‹Þ=æ)7ÿ@tE…B§C ½æ)7ÿ€zEßWìC Ø$>æ)7ÿ`€E¶‰�Có€Ï½æ)7ÿ€ƒE Ó®Cà+r¼æ)7ÿ †E&A§C´(½æ)7ÿÀ‰EnÛ¬C/§¼æ)7ÿàŒEÃù C±£^½æ)7ÿ�Ez ¸C8/A<æ)7ÿ “E Dè—¾æ)7ÿ@–E¢ƒC)¾æ)7ÿ`™EîØÃC§u9=æ)7ÿ€œEk•¦Cm½æ)7ÿ ŸEÆ×«Ckì¾¼æ)7ÿÀ¢El»C·­<æ)7ÿà¥E-®Cm Œ¼æ)7ÿ©E„;„CÁ ¾æ)7ÿ ¬Ev·C¥"<æ)7ÿ@¯EÃÈCÇÒj=æ)7ÿ`²Edý¤C…©/½æ)7ÿ€µE“cžC,é|½æ)7ÿ ¸EU†£CÀÎ@½æ)7ÿÀ»EêÅ«CpŽÀ¼æ)7ÿà¾EÆCNS=æ)7ÿÂEÇÀ¶C•ß<æ)7ÿ ÅE*’CÁ
Ľæ)7ÿ@ÈE(ÈCäk=æ)7ÿ`ËEïrµCû§‡;æ)7ÿ€ÎE¼$©C§þ¼æ)7ÿ ÑEIƒÄCL?A=æ)7ÿÀÔE†î‰CÑ(ö½æ)7ÿà×E&½²Ci$l»æ)7ÿÛE¯)³C»æ)7ÿ ÞEüÆÌCˆû�=æ)7ÿ@áEæÍC¨‹—=æ)7ÿ`äEƒÖŸC.ôk½æ)7ÿ€çE ²C™`µ»æ)7ÿ êE‘W©Cætù¼æ)7ÿÀíEô£³C¼¦†ºæ)7ÿàðEËç¬CŸ ¦¼æ)7ÿôE ¦ÀCM=æ)7ÿ ÷EYà¹CQЉ<æ)7ÿ@úE{ÑžCôâw½æ)7ÿ`ýEê~­Cƒ<˜¼æ)7ÿ@FEf¤C’6½æ)7ÿÐF)–¹CêÁ‚<æ)7ÿ`FO(åCÒ>æ)7ÿðF|W²C?@›»æ)7ÿ€FxV‹C¡îí½æ)7ÿFð��CjˆÕ½æ)7ÿ  F˜°•Cž[±½æ)7ÿ0 FË–¦CXò½æ)7ÿÀ F 1¯C¹a¼æ)7ÿPFìè3C¹ƒ¾æ)7ÿàFpŸC×_u½æ)7ÿpFͧŸCÒn½æ)7ÿF—9òCn 6>.æ)7ÿ�Fñ(ÒC‡z°=èhæ)7ÿ Fjé‘Cþvǽæ)7ÿ°Fð¯C|+>¼æ)7ÿ@F'ÖÆCøp\=æ)7ÿÐFúÇCwD_=æ)7ÿ`Fó_8Cu€¾æ)7ÿðFé±›C8޽æ)7ÿ€F�D#§d>æ)7ÿ!Fk‘C’Zʽæ)7ÿ "F©ä¤CëÊ0½æ)7ÿ0$FŒzÈCĨo=æ)7ÿÀ%F-ú¥C6$½æ)7ÿP'F–<×CP/Î=æ)7ÿà(FáߺC>ç <æ)7ÿp*Fn™²Cb"ƒ»æ)7ÿ,FÐnµC&†; æ)7ÿ�-FcL¾Cz
ñ<æ)7ÿ /Fõ3�C/e…½æ)7ÿ°0Fƒà§C®ß ½æ)7ÿ@2Fî$øCá^G>æ)7ÿÐ3F×÷ªCÅeÓ¼æ)7ÿ`5F÷w¶C0ç;æ)7ÿð6F•I’CFDŽæ)7ÿ€8FÒÃCD%9=æ)7ÿ:FŪC† ؼæ)7ÿ ;F –CŒà®½æ)7ÿ0=FÑ}óCÂ9>æ)7ÿÀ>F]j§C^F½æ)7ÿP@FÛ¢ùCI¼K>æ)7ÿàAF»iºCÞ–<æ)7ÿpCF( ¢C7$R½æ)7ÿEF{4–CãW®½æ)7ÿ�FF8ŽhCÛn:¾æ)7ÿ HF4�£C\~@½æ)7ÿ°IF8=ÄCT >=æ)7ÿ@KF Dúɾæ)7ÿÐLFÊf�C¾;„½æ)7ÿ`NF'º›Cà޽æ)7ÿðOF25¬C×a¶¼ æ)7ÿ€QFryÜCDÕì=ÿÿÿÿæ)7ÿSFØ »C8ì¤<ÿÿÿÿæ)7ÿ TF.¶CInÀ;æ)7ÿ0VF�ÅÌC~ó�=æ)7ÿÀWF¡T¾CiËñ<!"æ)7ÿPYF³¦�ChN¾@`æ)7ÿàZF˜,¡CÑP\½à/dæ)7ÿp\FX4¥Ci&-½P0dæ)7ÿ^FÕõ½C­ é< 0dæ)7ÿ�_Fë¡—C‹ý¥½À/dæ)7ÿ aF©´9C¸÷~¾ .dæ)7ÿ°bFyj›C!Ú�½°.dæ)7ÿ@dFYn„CV, ¾°-dæ)7ÿÐeFËñ‚C¹…¾ð-dæ)7ÿ`gFõüCùÀR>X1dæ)7ÿðhFßf”Cô丽(1dæ)7ÿ€jFù]CêI¾Ø2dæ)7ÿlFîušC q•½ˆ2dæ)7ÿ mFµ¤CZ:½ Ç¢æ)7ÿ0oF.ÖDäón>æ)7ÿÀpF U&Ch§�¾æ)7ÿPrFË›ÜC=ží= æ)7ÿàsF§²~CÀ
¾æ)7ÿpuFîT�C?¤„½æ)7ÿwF4ú¢C¯6G½æ)7ÿ�xF¹7ÄCË==æ)7ÿ zF Du¤Ý¾æ)7ÿ°{F»ÈClœr=æ)7ÿ@}Fqw½C^’Ý<æ)7ÿÐ~Fsl‹Cní½æ)7ÿ0€FX��C½’¾æ)7ÿø€FR1‘C4¬Ë½æ)7ÿÀ�FF˺CêŸ<æ)7ÿˆ‚FJ°TCØ~W¾æ)7ÿPƒF«7˜CN‘¢½æ)7ÿ„FZÖCsÇ=æ)7ÿà„FHgiCS19¾æ)7ÿ¨…FV¶¬C9“ª¼ æ)7ÿp†FsëßC> æ)7ÿ8‡FüžC‹ðu½æ)7ÿˆF D¯iœ¾æ)7ÿȈFEJ«CpÜ˼æ)7ÿ�‰FKÉÊCU…=æ)7ÿXŠF"­ãCº| >æ)7ÿ ‹F[¸CIn@<æ)7ÿè‹F˜ê¦Cš½æ)7ÿ°ŒFbKCD�e¾æ)7ÿx�F «’Cƒ ýæ)7ÿ@ŽF\®Cy„¼æ)7ÿ�F¾ÇCac^=æ)7ÿÐ�FPÊ¿CÜú =
æ)7ÿ˜�F›¯mC�í2¾“
¸«æ)7ÿ`‘Fö˜�Cšv¾¯
´«æ)7ÿ(’F¼kwCî¯$¾«
°«æ)7ÿð’FÉѯCT²C¼§
¬«æ)7ÿ¸“Fm¡ÿCÿE]>£
¨«æ)7ÿ€”FhŒfC~^=¾¿
¤«æ)7ÿH•FPÿÌCE’=»
 «æ)7ÿ–F‹\âCö£>·
œ«æ)7ÿØ–FÿáC¤’>³
˜«æ)7ÿ —F꤮Ct¶z¼Ï
”«æ)7ÿh˜FᓆC�ä¾Ë
�«æ)7ÿ0™Flõ$C§¨Ž¾Ç
Œ«æ)7ÿø™FBãEC¨%m¾Ã
ˆ«æ)7ÿÀšFK£—C�õ¥½ß
„«æ)7ÿˆ›FBgÎCPš=Û
€«æ)7ÿPœF C–r¨>×
ü«æ)7ÿ�FòF†C¦Å¾Ó
ø«æ)7ÿà�FeKÆCV=ï
ô«æ)7ÿ¨žFò‘CXȽë
ð«æ)7ÿpŸF5œáC>q>ç
ì«æ)7ÿ8 FÂs¿Cö=ã
è«æ)7ÿ¡FIÅCJJ=ÿ
䫿)7ÿÈ¡FÃëC&#>û
à«æ)7ÿ�¢FäP”C“e¹½÷
Ü«æ)7ÿX£F’¼¿CZ =ó
Ø«æ)7ÿ ¤FyáÔC?fÀ=
Ô«æ)7ÿè¤FNŸCtu½
Ыæ)7ÿ°¥F©
¦CGZ#½
Ì«æ)7ÿx¦F:¿C²b=
È«æ)7ÿ@§F­R™CLœ½
Ä«æ)7ÿ¨FhO CVmf½
À«æ)7ÿШFl¸�C oνÿÿÿÿæ)7ÿ˜©F*BœC슽ÿÿÿÿæ)7ÿ`ªF”¼CµØÈ<ÿÿÿÿæ)7ÿ(«F;¸×CÑÑ=æ)7ÿð«F°BÇCga= æ)7ÿ¸¬F—»Cˆ,¥<33æ)7ÿ€­F¾G“Cu¿½˜3dæ)7ÿH®Fk-ÝC]òð=ˆ4dæ)7ÿ¯F½Ð‹C+#ë½84dæ)7ÿدF<µÀC(¸=Ð9dæ)7ÿ °F)›½CjÖà<0:dæ)7ÿh±FéÉCÊñv=@:dæ)7ÿ0²Fù¿C� =À:dæ)7ÿø²F D«ž¾8dæ)7ÿÀ³FÖÌuCÞ'¾@7dæ)7ÿˆ´FO«Cjáϼ08dæ)7ÿPµFgɾC¢xü<07dæ)7ÿ¶FÂHºC#“<8=dæ)7ÿà¶F„J�C½òнæ)7ÿ¨·FQ>°CÁÙ/¼àæ)7ÿp¸F/­«C=Ѽæ)7ÿ8¹F3-ÃCï›1=æ)7ÿºFe*—Cí¸¨½æ)7ÿȺFØ™C¼B�½æ)7ÿ�»F�ʪCçŠ×¼ æ)7ÿX¼Fž9‹Cr—î½ æ)7ÿ ½FÄ.®Cš(ˆ¼æ)7ÿè½FéQíCª³'>æ)7ÿ°¾FåÇÍCÍÚ–=æ)7ÿx¿FOÀ·Cr™/<æ)7ÿ@ÀF*’CÁ
Ľæ)7ÿÁFוC‡z°½ æ)7ÿÐÁF�ÔvC�%¾æ)7ÿ˜ÂF¼ÎÐC¼�¨=æ)7ÿ`ÃF¯^òCõy6>æ)7ÿ(ÄFM¾C¥ì<æ)7ÿðÄF<Z€C¾æ)7ÿ¸ÅF=RÉCú„y=æ)7ÿ€ÆFZaÉCÕ5z=æ)7ÿHÇF�ÿ±Ch»»æ)7ÿÈFBgœCúнæ)7ÿØÈF£¶‹Cè»ë½æ)7ÿ ÉFÓÕ¸CHXb<æ)7ÿhÊFq¹·CãW.< æ)7ÿ0ËF"âŒCnã使)7ÿøËF
—½Còuà<æ)7ÿÀÌFe<ˆC�
¾æ)7ÿˆÍFÐáCtÿ>æ)7ÿPÎF²ëbC­B¾æ)7ÿÏFK6˜CX™¢½æ)7ÿàÏFN+ÊC¡¸�=��æ)7ÿ¨ÐFìµ§CÒ½$;dæ)7ÿpÑFÖb[C¶²M¾ç º«æ)7ÿ8ÒF|³CèîÀºã ¶«æ)7ÿÓF9wÕC|ÒÃ=ÿ ²«æ)7ÿÈÓF £C¬eF½û ®«æ)7ÿ�ÔF~.šC—½÷ ª«æ)7ÿXÕF Dt|â¾ó ¦«æ)7ÿ ÖF¡cÊC:ƒ= ¢«æ)7ÿèÖFmèËC:å‹= ž«æ)7ÿ°×FéÍÆC€\= š«æ)7ÿxØFÐd­CxŸš¼ –«æ)7ÿ@ÙFÂ�†Cžð¾ ’«æ)7ÿÚF¾„C5C
¾ Ž«æ)7ÿÐÚFÿ™CŒë�½ Š«æ)7ÿ˜ÛF^³ÄCrC= †«æ)7ÿ`ÜFµa@C¡3u¾/ ‚«æ)7ÿ(ÝF˜SCÔY¾+ þ«æ)7ÿðÝF`;“Cn½¿½' ú«æ)7ÿ¸ÞFíï†CA×¾# ö«æ)7ÿ€ßFÐÛ‚Cƾ? ò«æ)7ÿHàFÎ-³Ca¾»; î«æ)7ÿáF•N–C&¿­½7 ê«æ)7ÿØáF—œ·C[)<3 æ«æ)7ÿ âFz<±C5`¼O â«æ)7ÿhãF¯)³C»K Þ«æ)7ÿ0äFí}ƒC¼ë ¾G Ú«æ)7ÿøäFHbDËÚ�>C Ö«æ)7ÿÀåFäUüC¢S>_ Ò«æ)7ÿˆæF�U¼C�Ã<[ Ϋæ)7ÿPçF„\QCß\\¾W Ê«æ)7ÿèF£ó³C.³¹S Æ«æ)7ÿàèFy ¨C1Ý ½æ)7ÿ¨éFOÁCÞÀ=Ge;¸æ)7ÿpêF/‡ªC†²Ý¼é³ü¶æ)7ÿ8ëFkøÏC«ª£=tÌ·æ)7ÿìF­C�C«¨â½{M°·æ)7ÿÈìFtPöC?B>B8æ)7ÿ�íF» •CJ µ½Á.8æ)7ÿXîF˜áC/e>b„O7æ)7ÿ ïF ÉåC^¨>::Æ·æ)7ÿèïFÿ¥C[¸.½Ä/×8æ)7ÿ°ðFG¢ÔCuô¾=Û;F6æ)7ÿxñF“TöCNB>˜¶D8æ)7ÿ@òF蓵Cê¶“;{E©8æ)7ÿóF)zŽCá�Û½‡aÄ·æ)7ÿÐóFÉH#C+â�¾¤õ·æ)7ÿ˜ôFÐ�äCï>”f8æ)7ÿ`õFÒ”Cëq¶½Cj‡¸æ)7ÿ(öF¦H”CΕ¹½;Ϲæ)7ÿðöFN?¨CQŠ ½n0�8æ)7ÿ¸÷FŠº£CÌk>½b>ƒ¸æ)7ÿ€øFx·C#o <;¾¸æ)7ÿHùF=‚ Cud½1)v8æ)7ÿúF"ضCß$<ô䏿)7ÿØúF
Ç”C;²¶½Ú¶C¹æ)7ÿ ûFK‹C áï½4†V¸æ)7ÿhüF– ¬C-D¸¼e✷æ)7ÿ0ýF$¹C…§n<È€¬·æ)7ÿøýF•e½CYðÛ<)<ž¸æ)7ÿÀþFBÞsC]â)¾É5…8æ)7ÿˆÿF«³£C/¼>½vS$9æ)7ÿ(G DËE™¾v�¸æ)7ÿŒG©
¦CGZ#½9ª8æ)7ÿðG( ¢C7$R½D´ª·æ)7ÿTGÍ|ÌCnI�=ÊQû6æ)7ÿ¸GOÀ…C�O¾}äã·æ)7ÿGòF¸Cî7H<‘•¸æ)7ÿ€GÂ…°C”É"¼P£¸æ)7ÿäG„âDýd€>´[7æ)7ÿHG­¾C0Åì<Òç 7æ)7ÿ¬G3¶»C‚´<¾‡8æ)7ÿG2øƒC† ¾>;€8æ)7ÿtGyj›C!Ú�½ûh¸æ)7ÿØG™‚C²ì¾·o‡8æ)7ÿ<GÆø¨Cѽ9¤·æ)7ÿ G Døµã¾šà�7æ)7ÿGöhªCòuà¼:­[¸æ)7ÿhGcîC"²)>&&9æ)7ÿÌGÊ@ÎC9ž™=óqÀ6æ)7ÿ0G&�©CÕŽô¼O+ú·æ)7ÿ”GP”CŸº½úÝT6æ)7ÿøGzÙ¹CŠéˆ<sà�·æ)7ÿ\GÄ¥ƒC-w ¾ñ)·æ)7ÿÀG�Ï®CÐìr¼[ãÙ6æ)7ÿ$ GÊCwÇ€=Þ¶æ)7ÿˆ G÷[½CBÛ<™Ðóµæ)7ÿì G§ù¬C™k¤¼×47æ)7ÿP
G·cÁC ²=ÙéQ7æ)7ÿ´
G4ã­C)�¼¨Ï˜6æ)7ÿ GÖ�ôCßÝ<>Ù6æ)7ÿ| G,I¿CŒ=ñéÛ5æ)7ÿà G_ÑÜCÁ×î=8 ¢6æ)7ÿD GÄ8„CÉ ¾ü³5æ)7ÿ¨ G8ËŽC–µÙ½¢8�6æ)7ÿ Gg}¼C¶Æ<IEŵæ)7ÿp G›[²Ca¾™»“
l7æ)7ÿÔ G‘ºÒC§Î³=¿’
¶æ)7ÿ8G ¨©C¹ ò¼hÓ6æ)7ÿœGÔ§œC&™ˆ½œ6¥6æ)7ÿGDïœC ÷†½½°³6æ)7ÿdG}Œ¿C\'=E]¸6æ)7ÿÈGú…ÊC2˃=Mжæ)7ÿ,G·GÈCãUm=â”·æ)7ÿ�GÔV–Cꎭ½”š·æ)7ÿôG¯¶CÌk¾;c+(·æ)7ÿXGPÿ8C�€¾³\66æ)7ÿ¼Gr»¤CA­2½XR·æ)7ÿ GwB}CZ%¾\º“¶æ)7ÿ„GõþóCÙ;;>Ûå6æ)7ÿèGÄ=XCiLR¾þ¶æ)7ÿLGLO¬Câþ³¼yÍß4æ)7ÿ°G²ë’C¯�Á½ëÕB6æ)7ÿG:×µCfU¬;/ ·æ)7ÿxGH•µC‰7”;pŽ6æ)7ÿÜG‹Ý¿CòÛ
=�"w6æ)7ÿ@G*Cꊾ°™Î6æ)7ÿ¤G¹®ËC™“Š=޵æ)7ÿGåáCEF>€Æ=¶æ)7ÿlG§â#C q�¾µjŽ6æ)7ÿÐG º§CÜ¡½^çK7æ)7ÿ4G7ƼCN^Í<RVð6æ)7ÿ˜G CvÁþ>>Ù�5æ)7ÿüGÔ§œC&™ˆ½CÚœ¶æ)7ÿ`GD6ÍC®†“=úìH7æ)7ÿÄG#ä«C˽¼Ìq5æ)7ÿ(GéÈ�C)ν�¾b7æ)7ÿŒGúÃC8:0=F¢í6æ)7ÿðG*¥ÅC´N=5æ)7ÿTGª×…C9 ¾#[ɳæ)7ÿ¸GÝÆC[Á\=ÑaF¶æ)7ÿG›ÚÔC >À=Ï©@·æ)7ÿ€G妞C]Õy½Q0µæ)7ÿäGSJ¥C*%,½wxŠ·æ)7ÿHG4%¨CÊ»
½£Ð6æ)7ÿ¬G¸¬¬COt«¼›ƒ¶æ)7ÿGÍŠC„ñ½ øS´æ)7ÿtG”G¥CRE,½LF0·æ)7ÿØG¡Á½CÅZä<uïN5æ)7ÿ<G^úôCh>>ë0ˆ5æ)7ÿ Gú4’CۼŽ¾ç¶æ)7ÿGžòðCÎP2>tèk4æ)7ÿhGÞ÷§C[Î ½pGƶæ)7ÿÌG D žÓ¾�¿B´æ)7ÿ0 G-Þ¬Cµî¦¼m 7æ)7ÿ” G»|C‡ç¾Yº©¶æ)7ÿø Gs�ˆCÏ:þ½þ(`6æ)7ÿ\!G¢ÀC×=MÇ6æ)7ÿÀ!G=£ÏCA¸¡=9&á¶æ)7ÿ$"G„¢C_�L½5bl6æ)7ÿˆ"G<è®C6gn¼„Q7æ)7ÿì"GPŸC�u½Š϶æ)7ÿP#GoâÏC *£=s(Ç6æ)7ÿ´#GfÌ£CÈš=½ò,ô6æ)7ÿ$G�íŽC�ìØ½ä Å6æ)7ÿ|$Gô,¬CÇ"·¼>+ª6æ)7ÿà$GìHÚCgà=Õdü¶æ)7ÿD%GyDÌCÖÿ�=E1¶æ)7ÿ¨%G¡–CÐÜ«½ÛÂæ¶æ)7ÿ &G£`³C­ éºÃtì4æ)7ÿp&G/££C}?½gp·æ)7ÿÔ&GpûãCÕa >‡áË7æ)7ÿ8'G —C–A©½Yq�8æ)7ÿœ'G-¸ÝCJô=¢ñœ¶æ)7ÿ(G³Â¬CÒq©¼vº¸æ)7ÿd(Gå D_–‰>{ZÎ7æ)7ÿÈ(GŠ™ØC1)Ö=²`@¸æ)7ÿ,)GU5�C$]…½Þ‘8æ)7ÿ�)G Caä¾>òÙ¸æ)7ÿô)GóòšCƒ•’½Ûaß8æ)7ÿX*Gä³ïCL¬.>Ç‘J8æ)7ÿ¼*GéלCʇ½36·æ)7ÿ +GùK¹Ców< �8æ)7ÿ„+G¡C9C^½6‚ê·æ)7ÿè+G ÌÁCñw!=ލ—·æ)7ÿL,G®\¡CZ½'g98æ)7ÿ°,GDžÈCÉJq=¹ÔÅ·æ)7ÿ-GjÈ”C1ª¶½_¨È¶æ)7ÿx-Gåd¤C'¢6½•8¸æ)7ÿÜ-GÐW,C÷A‰¾` 䏿)7ÿ@.G-³wClG$¾ì͸æ)7ÿ¤.Gï€C` ¾ º­6æ)7ÿ/G}âDÛ+‰>u2¯¸æ)7ÿl/G4bžCAù|½ðsu¸æ)7ÿÐ/G*“@CGët¾*Zc8æ)7ÿ40G1üC?ùR>fyŶæ)7ÿ˜0G<´C¹a9DÛì·æ)7ÿü0G0›ºCxŸš<S�¸æ)7ÿ`1GP—ŸCÁ×n½©#Ò8æ)7ÿÄ1G Düû¾}ºª8æ)7ÿ(2GœCÅ‹½ɬ}¸æ)7ÿŒ2G¯ ˆC6“¾NÙ¥8æ)7ÿð2GjîÇCÕ@i=èBA·æ)7ÿT3Gm>¤CTd8½‘ÿº7æ)7ÿ¸3G @YC•ÒP¾>_x¸æ)7ÿ4G- EC Cn¾ù*ˆ·æ)7ÿ€4G¯›¶C].ô;èV$¹æ)7ÿä4GD˜CôH¢½:8æ)7ÿH5G…39C£´¾ÑˆŠµæ)7ÿ¬5GûàØC7Ë×=ßÎ:8æ)7ÿ6G8ËòC·7>ÌÄ;8æ)7ÿt6G©ß C+Õ_½&øó7æ)7ÿØ6GOSêCÐð>rDI9æ)7ÿ<7G^¼CeJ½<íÉ8æ)7ÿ 7G°˜ÑCs.­=?�¸æ)7ÿ8G½JªC^9ã¼>zQ8æ)7ÿh8GkzC4ß ¾‰}º8æ)7ÿÌ8GBy+CÀ䉾—Á¸æ)7ÿ09Gû;ƒC¬¬¾–H9æ)7ÿ”9GBÙ=C7èx¾2=9·æ)7ÿø9G‰q¸C’P<ü:·æ)7ÿ\:GçÁŸCYål½l×8æ)7ÿÀ:G.iD Pr>¡Ÿ·æ)7ÿ$;Góü¢C‡G½\±®¸æ)7ÿˆ;G+[°C9“*¼ĘM¸æ)7ÿì;G9j„Ce8 ¾îf 8æ)7ÿP<GOC&Ñ_¾ïy͸æ)7ÿ´<GDR”C‰]¹½Ë`·æ)7ÿ=G7ì[C¾éL¾§•·æ)7ÿ|=GUÕ(C$Ó‹¾‡d¸æ)7ÿà=GÔVúCÕÊM>äËü·æ)7ÿD>GÔ†ŸC°˜o½éö¶·æ)7ÿ¨>Gx“³C™Äžº̳†8æ)7ÿ ?G D`¾¾Ȭ
8æ)7ÿp?Gé¬gCt¸;¾‘P­8æ)7ÿÔ?Gt*ÃCÆ{1=€?æ)7ÿ8@G0u¹C^|<mÄ~?æ)7ÿœ@GöŽ«C©”ż¾{?æ)7ÿAG íùCU•L> út?æ)7ÿdAGøÊÛCSØè=^ƒl?æ)7ÿÈAGb“îC6`+>˜Åa?æ)7ÿ,BGám…C¸@¾1ÛT?æ)7ÿ�BGÛ�˜C4ß ½äE?æ)7ÿôBG )”C´Nº½ó5?æ)7ÿXCGÅ&ÅC�¸H=™g"?æ)7ÿ¼CG DóOоÚ9?æ)7ÿ DG�®«C±Â¼êZñ>æ)7ÿ„DG°|¦CÓ#½ïÃ>æ)7ÿèDG\Q“CÏ<¿½1 ”>æ)7ÿLEGwû®CÛâj¼ÂÅG>æ)7ÿ°EG§OéC#ù>6½È=æ)7ÿFG}EÁCRP=0�$æ)7ÿxFG5U±C5µù»6½È½æ)7ÿÜFG´ŠˆCãJþ½ÂÅG¾æ)7ÿ@GGÅÕŒCÇ+å½1 ”¾æ)7ÿ¤GGÏqšC+‰•½ïþæ)7ÿHG?“ËCÒò‰=êZñ¾æ)7ÿlHG]sCHŸ*¾Ú9¿æ)7ÿÐHG‹¼ÂC�u,=™g"¿æ)7ÿ4IGƒÖÑC3˜®=ó5¿æ)7ÿ˜IGÔîšC¡­’½äE¿æ)7ÿüIG_žCÏ“x½1ÛT¿æ)7ÿ`JG€`DQif>˜Åa¿æ)7ÿÄJGu”DFMs>^ƒl¿æ)7ÿ(KGs³‰C}‚÷½ út¿æ)7ÿŒKGAðÆCr¢]=¾{¿æ)7ÿðKGã~°C" $¼mÄ~¿æ)7ÿTLGbÕ„Cáþ ¾�€æ)7ÿ¸LG DEŸ¿ãðÿ>æ)7ÿMGÌûŠC2𽞺ÿ>æ)7ÿ€MGóÑÏC”É¢=é\ÿ>æ)7ÿäMG‰{ŽCׇ۽Ô×þ>æ)7ÿHNGjî•CÞñ¯½r+þ>æ)7ÿ¬NG �CPؾÞWý>æ)7ÿOGhþ™Co,˜½:]ü>æ)7ÿtOG—_ÁCÍ�=«;û>æ)7ÿØOG-ú¥C6$½^óù>æ)7ÿ<PGùãïCú8/>†„ø>æ)7ÿ PG§Œ­Cõú–¼[ïö>æ)7ÿQGû¯Cÿ(<¼4õ>æ)7ÿhQG}k�CÍ1нSó>æ)7ÿÌQGÃÉ—Ck¥½zLñ>æ)7ÿ0RGjÃÂCñÅ,=° ï>æ)7ÿ”RGÎS´Cœ/u:Ðì>æ)7ÿøRGž’CÝQýÙZê>æ)7ÿ\SG‚Dß$…>‡Áç>æ)7ÿÀSG<²C°L¥»yå>æ)7ÿ$TGˆ®LCY5c¾$â>æ)7ÿˆTGÞ,C3r‰¾Û ß>æ)7ÿìTGÌ“CòöÀ½4ûÛ>æ)7ÿPUGö¨Cø/½¡³Ø>æ)7ÿ´UGƒ§Cø$½¤JÕ>æ)7ÿVG×näCw³ >ÂÀÑ>æ)7ÿ|VG«ÉCR‘v=‰Î>æ)7ÿàVGÚ²CH
W»‡LÊ>æ)7ÿDWGÑx[CŽ’M¾TcÆ>æ)7ÿ¨WG—*‚CŠÌ¾‰[Â>æ)7ÿ XG†0¶CÖýÌ;Å5¾>æ)7ÿpXG
vÀC”Ô=¬ò¹>æ)7ÿÔXGñæ¥CLü$½ç’µ>æ)7ÿ8YG¨þDB~‰>«„?æ)7ÿœYG=}œCZ’‰½É¿|?æ)7ÿZG�©¡C¼™V½Å‹w?æ)7ÿdZGå÷¤CÔé/½sõo?æ)7ÿÈZGEz´C|ݲ:ˆf?æ)7ÿ,[Gbh·C‰…<jòY?æ)7ÿ�[GµC_öF;ø»K?æ)7ÿô[Gi^¬C-�²¼;�;?æ)7ÿX\GµCÑQ;”)?æ)7ÿ¼\Guµ¨C #½Ùö?æ)7ÿ ]G$î³CÑQ¹äç?æ)7ÿ„]GÐ"³CUÈ!»A6Õ>æ)7ÿè]Gp´³C¿]º�¦>æ)7ÿL^G&ã³C Ѩ¹šl>æ)7ÿ°^GAý³CEŸ¸†Ï >æ)7ÿ_G`´CEŸ€7,Ã=æ)7ÿx_G!ù³CÇ ¸&ÆÁ9æ)7ÿÜ_G þ³CEŸ€· [Õ;æ)7ÿ@`G�ú³CEŸ€¸º¥<æ)7ÿ¤`G`´CEŸ€7®‘(=æ)7ÿaGAý³CEŸ¸è�=æ)7ÿlaG`´CEŸ€7’wÕ=æ)7ÿÐaGAý³CEŸ¸™>æ)7ÿ4bG¿´CEŸ8BE>æ)7ÿ˜bG´CD²z>æ)7ÿübG´C›=š>æ)7ÿ`cGáû³Cèî@¸ ϸ>æ)7ÿÄcGAý³CEŸ¸~Ø>æ)7ÿ(dG¿´CEŸ8C¶ø>æ)7ÿRIFF.eWAVEfmt D¬ˆXdatae óÿñÿïÿíÿëÿéÿçÿåÿäÿâÿàÿÞÿÝÿÛÿÙÿ×ÿÖÿÔÿÒÿÑÿÏÿÍÿÌÿÊÿÉÿÇÿ%FHJLNòÿ·ÿ¶ÿ´ÿ³ÿ±ÿ°ÿ®ÿ­ÿ«ÿªÿ©ÿ§ÿ¦ÿ¤ÿ£ÿ¢ÿ ÿŸÿžÿ�ÿ›ÿšÿ™ÿ˜ÿ–ÿÔÿ’”–—™š†ÿ…ÿƒÿ‚ÿ�ÿ€ÿÿ~ÿ}ÿ{ÿzÿyÿxÿwÿvÿuÿtÿsÿrÿqÿpÿoÿnÿmÿlÿkÿ'çéêìí‰ZÿYÿXÿWÿVÿUÿUÿTÿSÿRÿQÿQÿPÿOÿNÿMÿMÿLÿKÿJÿJÿIÿHÿHÿGÿFÿ‚BCEFG€4ÿ3ÿ2ÿ2ÿ1ÿ1ÿ0ÿ/ÿ/ÿ.ÿ.ÿ-ÿ,ÿ,ÿ+ÿ+ÿ*ÿ*ÿ)ÿ)ÿ(ÿ(ÿ'ÿ'ÿ&ÿ&ÿc££¤¥¦Tÿÿÿÿÿÿÿÿÿÿÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿ
ÿ
ÿ
ÿ
@ -12967,8 +13023,6 @@ LÞš
zIWÂ$pøYñèöiCúó…“ »»õ“Í¥Í@Ãp(QkË\*œÿwb5ç £#¼®¡6ÐÂÿŽìü@0€ ú½Ô�,,ÐïOgIÝ j {R Ún±³sp‘"|5óÎýÜÄÐ5Ðï”覼V—Ë%ñïø9œ
 %QghÚÄ�j¢UŸ1oX]CSÚi| ¢qáðòØA½ü}hïA=Wþ�=S^ž”Æ7M•�HI>úŸÇ(ûz�!7aðN„vEý³‚�êÝyàRÿ®1àFÈZ*EµRf„ éëÊÔÍøúŸ ?høpxÓ>íöÂïáßUè&<€ºÕ+2# �ħíBH´Ø‡ ß%qÐó_Þ¢¿g 8&3ˆÒ�ŠFÈÐvÐ`*ƒuPP£×w”FøŠ˜_¡š&rቦ©L·Þ!Ô|vdÙðÿ;¤ø ÐÉÒ·£VJ4Ÿö8ÁAO8zωÿ¶Sï²V¤­ÒI[µ©âyÒ—‹êútŽÜRæÝüû¿ çœ Š�eÒ&IEND®B`‚‰PNG

IHDR`?útEXtSoftwareAdobe ImageReadyqÉe< iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.0-c060 61.134777, 2010/02/12-17:32:00 "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS5 Windows" xmpMM:InstanceID="xmp.iid:05C26790E09811E6BD84DA7C8067DC0F" xmpMM:DocumentID="xmp.did:05C26791E09811E6BD84DA7C8067DC0F"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:05C2678EE09811E6BD84DA7C8067DC0F" stRef:documentID="xmp.did:05C2678FE09811E6BD84DA7C8067DC0F"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>¢R¸,GIDATxÚbüÿÿ?Ã(8À8¦kÜ�´ÄhP xÁÂÀpaÇh8 ` ‚�À`à1Z \4Z �¶‚F60n+ާ¸ºIEND®B`‚‰PNG

IHDR€€L\öœsRGB®ÎégAMA±� üa pHYsÃÃÇo¨dtEXtSoftwarePaint.NET v3.5.11GóB7»IDATx^í—Ñb£: ÛÿÿÝ»ï²c6±>„CäRæe—Z²ä1�š/•oþý4j]wœJ–;¿M \×-&ëÀ*içÈ*œu!YçÈ:o^a‘ËÌ:Hš¹¿[à:n/öóŽ.pxj�þãßî8•QûC«þ¢f‰Qù´À½ÔuÑÚÝy»q‹EàQЪC^Èoxt?´ê�—Æè··?´Æ¨CXe´7°æ,Ñhõá«Ä©¼[­-êýÀnÜuå7¿@^H–÷ s4­:äÙEg‰q³·?´ÆÜCø\К7„³È꯮‹VòÒq t¿XjZuÈ q7¨’%P%Ú­:ä¥q•‹+qh�¹Êv×u�Öñ¿ »¥.Z[¢!o!Kôè§ÆÉo~�¼�¬ Qq÷w4­:äÙŽ&¦æ¬ó¢5æ· aw\´ú‡°›O‹9‹º?´ê�·à“%:«¿{äè~hÕ!ï îWâГ5„ÝbܸúCëøß„³âTÞ­‹VòF9ȧp×EkŸò+B^ÈU~ª?´ê�—†[LÖ~%­1£a·@W]´ŽÿMØÍ(‡VòÔƒ¸ã²p÷‡Ö>÷^çè9ЪCÞ¯xVZcÔ!œu•QûCkÞþô�³©Ï�Vòܳ.$«?ùÍ/�âãf´‹C«yi¢³º)uÑ£a•¬»q�­þ!<ºè¬þêºhÕ!oÁ}!î8•¬º÷>ÈÑ‹C«yi¢�xJh�ÉÂY¢?}qh½Î7awœ›º.Z[¢!oa”ƒ|
w]´ê�¢68º@wÑ~hÕ!/�O‰©9«.Zc²†°Š[ ;®Zó¾ �§òn]´ê�·0º7îþÐÚ§üŠ�2ºèÑúCëB÷£ˆ¼áª¸/doZc²†°—…«?´ê¸Ž§òn]´¶DŸEä-Œ~`7îóÊ~ÞCx�£qhÕ!Ï.Ð}`•¬º´Æd áÑq�­ý?? Yo Êè\÷‡VòÔgÅ©dõwádкнò.#0{?´Æd ᬠVqõ‡VÿÎ�UW¥®‹VòÜΘÕZû¸‡pY¢£8´.ÜC8଺h�ÉÂn²D÷@ëøC8+Nåݺhm‰n„¼Ýd‰qãî­}ÜC8KôhuѪCÞðÝý�U­1£áŸ":­ãa÷~nêþЪCÞBÖ…¸EgÕEku«¸¢’uqhÕ!ï2UÔº{ûCkÌèCXå,�GA««¸ÅŒ*ºP×EkKt#ä�Æ¿ <?ñýU/ñ¼¬€Ö>êþioà³Î‡hžŸ˜ú€ç?ÿñ캀îGyv�î‹;‡Ñ§Ä±ð´ÄsùÉÞºh�Q‡ð‘¯¡Æ©ìÙ£›/õ²¡G†Â*Žý0ª9%T½€º?´¶¸‡ð–Nð  ¹ˆ~�߀èž#Ö´ø�!üJ}¢ÐÚÇ=„Ÿ¡ÇDˆŸþßöÇZ¿oyA«y–_õÂÜàÆ›_xÄÎuyÞdÚï?Ã�Ö„Nû±¦Å³°¼ Ñ ÅZcÔ!¬²vqô¸*¨G»{iB'Xcõå‚?y�…§7šgióÐêÂ{âè1îr;ßè Ö´xÞß¼ö‚VòB��.•ýæPõ#k†çMGâGÖR—gmó žÐÚGÂ*Ï¢é1èD¿îß^0kA| ÿ–:ß„Y V'ЪCžüæ+ÐcÜås]¢7qaÎËB\ya­-]âУaõBÖâè±í2€è žµÊÑ㣃çWæ…<oîÏÂ÷u†ð =Æ]V-Ÿ™ç—øý±Ö‰´à Öþ­Ö^ÐÚÝyVè18CËZ†áD?í¿ Ñkñ,LKñÞ†èùÍW‡ðž7¿@�q—D÷ ú5~ãâˆþÿÇÂZ«<÷ˆ¼ u¡{!äY™|˜ç-æƒÌ¡=¦ýþ&Lð£UžD½¿¼X<ÇÁѽP.­1õ��× ¾ùî8•x? áÈ]·ZýCXÅ}!ûãÐß¾¤§P÷‡Ö–èFÈ[p‹9÷ z÷9ä7¿@^H¦è?ˆ>£'ˆÞÇÑ­:䥉~çÀîAôg(ý¡5FÂ*ïÜâ§Ç¡Õ?„Õ8•¬ºnêþÐÚ’5„Gí®‹Vò~,£]ZuÈKÃ-PÝï¬8´ÆŒ>„³põ‡VÿÎâ§õ‡ÖùFDÜû©¨uGï/�«L;ÇUĤ‘uwÝ«œCæ*Ixsss“Å××ÿ�ã5É�{IEND®B`‚‰PNG


+ 4
- 4
docs/games/wave_collector.html 查看文件

@ -14,8 +14,8 @@
<!-- Facebook metatags for sharing -->
<meta property="og:title" content="raylib HTML5 GAME">
<meta property="og:image:type" content="image/png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:url" content="http://www.raylib.com/games">
<meta property="og:site_name" content="raylib.com">
<meta property="og:description" content="New hmtl5 videogame, developed using raylib videogames library">
@ -24,8 +24,8 @@
<meta name="twitter:site" content="@emegemegames">
<meta name="twitter:title" content="raylib HTML5 GAME">
<meta name="twitter:description" content="New HTML5 videogame, developed using raylib videogames library">
<meta name="twitter:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/common/img/raylib_logo.png">
<!--<link rel="stylesheet" href="./Koala Seasons by emegeme_files/main.css">-->
<link rel="shortcut icon" href="http://www.raylib.com/favicon.ico">

+ 4514
- 3395
docs/games/wave_collector.js
文件差異過大導致無法顯示
查看文件


+ 5
- 0
examples/Makefile 查看文件

@ -541,6 +541,11 @@ physac/physics_restitution: physac/physics_restitution.c
# compile [physac] example - physics shatter
physac/physics_shatter: physac/physics_shatter.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS)
ifeq ($(PLATFORM),PLATFORM_ANDROID)
external/native_app_glue.o : native_app_glue.c native_app_glue.h
$(CC) -c $< $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(SHAREDFLAG)
endif
# fix dylib install path name for each executable (MAC)
fix_dylib:

二進制
examples/textures/resources/fudesumi_BC1.dds 查看文件


二進制
examples/textures/resources/fudesumi_BC3.dds 查看文件


二進制
examples/textures/resources/fudesumi_ETC2.ktx 查看文件


二進制
games/wave_collector/resources/textures/line.png 查看文件

Before After
Width: 96  |  Height: 8  |  Size: 977 B

+ 29
- 38
games/wave_collector/screens/screen_gameplay.c 查看文件

@ -26,6 +26,8 @@
#include "raylib.h"
#include "screens.h"
#include <stdio.h>
#include <stdlib.h> // Required for: malloc(), free()
#include <math.h> // Required for: sqrtf(), asinf()
@ -79,7 +81,7 @@ static Rectangle waveRec;
// Samples variables
static Sample *samples; // Game samples
static int totalSamples = 0; // Total game samples (proportional to waveData num samples)
static int totalSamples; // Total game samples (proportional to waveData num samples)
static int collectedSamples; // Samples collected by player
static int currentSample; // Last sample to go through player collect area
static float samplesSpeed; // All samples move at the same speed
@ -91,7 +93,6 @@ static Texture2D texPlayer;
static Texture2D texSampleSmall;
static Texture2D texSampleMid;
static Texture2D texSampleBig;
static Texture2D texLine;
static RenderTexture2D waveTarget;
@ -103,7 +104,7 @@ static Sound fxPause; // Pause sound
//------------------------------------------------------------------------------------
// Module Functions Declaration (local)
//------------------------------------------------------------------------------------
static void DrawSamples(Sample *samples, int sampleCount, int playedSamples, Rectangle bounds, Color color);
static void DrawSamplesMap(Sample *samples, int sampleCount, int playedSamples, Rectangle bounds, Color color);
//----------------------------------------------------------------------------------
// Gameplay Screen Functions Definition
@ -123,7 +124,6 @@ void InitGameplayScreen(void)
texSampleSmall = LoadTexture("resources/textures/sample_small.png");
texSampleMid = LoadTexture("resources/textures/sample_mid.png");
texSampleBig = LoadTexture("resources/textures/sample_big.png");
texLine = LoadTexture("resources/textures/line.png");
waveRec = (Rectangle){ 32, 32, 1280 - 64, 105 };
waveTarget = LoadRenderTexture(waveRec.width, waveRec.height);
@ -164,15 +164,15 @@ void InitGameplayScreen(void)
int samplesDivision = (int)(wave.sampleCount/requiredSamples);
totalSamples = wave.sampleCount/samplesDivision;
// We don't need wave any more (already got waveData)
UnloadWave(wave);
collectedSamples = 0;
// Init samples
samples = (Sample *)malloc(totalSamples*sizeof(Sample));
// Normalize wave data (min vs max values) to scale properly
float minSampleValue = 0.0f;
float maxSampleValue = 0.0f;
@ -184,7 +184,7 @@ void InitGameplayScreen(void)
}
float sampleScaleFactor = 1.0f/(maxSampleValue - minSampleValue); // 400 pixels maximum size
// Initialize samples
for (int i = 0; i < totalSamples; i++)
{
@ -200,11 +200,16 @@ void InitGameplayScreen(void)
samples[i].active = true;
samples[i].collected = false;
samples[i].color = RED;
samples[i].renderable = false;
}
samplesSpeed = MAX_SAMPLES_SPEED;
currentSample = 0;
//FILE *samplesFile = fopen("resources/samples.data", "wb");
//fwrite(samples, totalSamples*sizeof(Sample), 1, samplesFile);
//fclose(samplesFile);
// We already saved the samples we needed for the game, we can free waveData
free(waveData);
@ -250,7 +255,7 @@ void UpdateGameplayScreen(void)
player.position.y += movement.y*0.1f; // Scale gamepad movement value
}
*/
// Player logic: check player area limits
if (player.position.x < playerArea.x) player.position.x = playerArea.x;
else if ((player.position.x + player.width) > (playerArea.x + playerArea.width)) player.position.x = playerArea.x + playerArea.width - player.width;
@ -329,15 +334,13 @@ void UpdateGameplayScreen(void)
// Check ending conditions
if (currentSample >= totalSamples - 1)
{
StopMusicStream(music);
endingStatus = 1; // Win
finishScreen = 1;
}
if (synchro <= 0.0f)
{
synchro = 0.0f;
StopMusicStream(music);
endingStatus = 2; // Loose
finishScreen = 1;
}
@ -365,33 +368,20 @@ void DrawGameplayScreen(void)
if (i < (currentSample + 1)) col = Fade(DARKGRAY, 0.5f);
else col = WHITE;
//DrawCircleV(samples[i].position, samples[i].radius, col);
if (!samples[i].collected)
{
if (combo > 50) DrawTexture(texSampleSmall, samples[i].position.x - texSampleSmall.width/2, samples[i].position.y - texSampleSmall.height/2, col);
else if (combo > 25) DrawTexture(texSampleMid, samples[i].position.x - texSampleMid.width/2, samples[i].position.y - texSampleMid.height/2, col);
else DrawTexture(texSampleBig, samples[i].position.x - texSampleSmall.width/2, samples[i].position.y - texSampleBig.height/2, col);
//DrawCircleV(samples[i].position, samples[i].radius, col);
if (combo > 30) DrawTexture(texSampleSmall, samples[i].position.x - texSampleSmall.width/2, samples[i].position.y - texSampleSmall.height/2, col);
else if (combo > 15) DrawTexture(texSampleMid, samples[i].position.x - texSampleMid.width/2, samples[i].position.y - texSampleMid.height/2, col);
else DrawTexture(texSampleBig, samples[i].position.x - texSampleBig.width/2, samples[i].position.y - texSampleBig.height/2, col);
}
if (i < (currentSample + 1)) col = Fade(GRAY, 0.3f);
else col = Fade(WHITE, 0.5f);
else col = Fade(RED, 0.5f);
// Draw line between samples
//DrawLine(samples[i].position.x, samples[i].position.y, samples[i + 1].position.x, samples[i + 1].position.y, col);
float dx = samples[i + 1].position.x - samples[i].position.x;
float dy = samples[i + 1].position.y - samples[i].position.y;
float d = sqrtf(dx*dx + dy*dy);
float angle = asinf(dy/d);
// Draw lines using textures
//DrawTextureEx(texLine, (Vector2){ samples[i].position.x - 2, samples[i].position.y - 2 }, -RAD2DEG*angle, d/SAMPLES_SPACING, col);
// Draw lines using textures - IMPROVED
// TODO: Further improving to draw lines properly
DrawTexturePro(texLine, (Rectangle){ 0, 0, texLine.width, texLine.height },
(Rectangle){ samples[i].position.x, samples[i].position.y, (float)texLine.width*d/SAMPLES_SPACING, texLine.height },
(Vector2){ 0, (float)texLine.height/2 }, -RAD2DEG*angle, col);
DrawLineEx(samples[i].position, samples[i + 1].position, 3.0f, col);
}
}
@ -432,7 +422,7 @@ void DrawGameplayScreen(void)
// Draw wave
// NOTE: Old drawing method, replaced by rendertarget
//DrawSamples(samples, totalSamples, currentSample, waveRec, MAROON);
//DrawSamplesMap(samples, totalSamples, currentSample, waveRec, MAROON);
//DrawRectangle(waveRec.x + (int)currentSample*1240/totalSamples, waveRec.y, 2, 99, DARKGRAY);
//DrawRectangleLines(20, 20, 1240, 140, DARKGRAY);
//DrawRectangle(20, 150, (float)currentSample/totalSamples*1240, 10, GRAY);
@ -440,7 +430,7 @@ void DrawGameplayScreen(void)
// Draw wave using render target
ClearBackground(BLANK);
BeginTextureMode(waveTarget);
DrawSamples(samples, totalSamples, currentSample, (Rectangle){ 0, 0, waveTarget.texture.width, waveTarget.texture.height }, MAROON);
DrawSamplesMap(samples, totalSamples, currentSample, (Rectangle){ 0, 0, waveTarget.texture.width, waveTarget.texture.height }, MAROON);
EndTextureMode();
// TODO: Apply antialiasing shader
@ -451,13 +441,14 @@ void DrawGameplayScreen(void)
// Gameplay Screen Unload logic
void UnloadGameplayScreen(void)
{
StopMusicStream(music);
// Unload textures
UnloadTexture(texBackground);
UnloadTexture(texPlayer);
UnloadTexture(texSampleSmall);
UnloadTexture(texSampleMid);
UnloadTexture(texSampleBig);
UnloadTexture(texLine);
UnloadRenderTexture(waveTarget);
@ -466,7 +457,7 @@ void UnloadGameplayScreen(void)
UnloadSound(fxSampleOff);
UnloadSound(fxPause);
free(samples); // Unload game samples (crashes game)
free(samples); // Unload game samples
}
// Gameplay Screen should finish?
@ -483,7 +474,7 @@ int FinishGameplayScreen(void)
// NOTE: For proper visualization, MSAA x4 is recommended, alternatively
// it should be rendered to a bigger texture and then scaled down with
// bilinear/trilinear texture filtering
static void DrawSamples(Sample *samples, int sampleCount, int playedSamples, Rectangle bounds, Color color)
static void DrawSamplesMap(Sample *samples, int sampleCount, int playedSamples, Rectangle bounds, Color color)
{
// NOTE: We just pick a sample to draw every increment
float sampleIncrementX = (float)bounds.width/sampleCount;

+ 2
- 1
games/wave_collector/screens/screens.h 查看文件

@ -38,7 +38,8 @@ GameScreen currentScreen;
SpriteFont font;
Music music;
int endingStatus; // 1 - Win, 2 - Lose
//char *sampleFilename;
char *sampleFilename; // Required for custom music file
#ifdef __cplusplus
extern "C" { // Prevents name mangling of functions

+ 15
- 7
games/wave_collector/wave_collector.c 查看文件

@ -19,6 +19,9 @@
#include <stdlib.h>
#include <stdio.h> // Required for: printf()
#include <string.h> // Required for: strcpy()
#if defined(PLATFORM_WEB)
#include <emscripten/emscripten.h>
#endif
@ -57,20 +60,27 @@ int main(int argc, char *argv[])
{
// Initialization
//---------------------------------------------------------
/*
#if !defined(PLATFORM_WEB)
// TODO: Add support for dropped files on the exe
sampleFilename = (char *)malloc(256);
// TODO: Support for dropped files on the exe
// Support command line argument for custom music file
if (argc > 1)
{
// Just supporting an input argument parameter!!! o__O
if ((IsFileExtension(argv[1], ".ogg")) ||
(IsFileExtension(argv[1], ".wav")))
{
if (sampleFilename != NULL) free(sampleFilename);
sampleFilename = (char *)malloc(256);
strcpy(sampleFilename, argv[1]);
printf("Custom audio file: %s", sampleFilename);
}
}
#endif
*/
SetConfigFlags(FLAG_MSAA_4X_HINT);
InitWindow(screenWidth, screenHeight, "GGJ17 - WAVE COLLECTOR");
@ -104,8 +114,6 @@ int main(int argc, char *argv[])
// De-Initialization
//--------------------------------------------------------------------------------------
StopMusicStream(music);
switch (currentScreen)
{
case LOGO: UnloadLogoScreen(); break;
@ -251,7 +259,7 @@ static void UpdateDrawFrame(void)
} break;
case GAMEPLAY:
{
{
UpdateGameplayScreen();
if (FinishGameplayScreen() == 1) TransitionToScreen(ENDING);

+ 9
- 5
src/Makefile 查看文件

@ -101,7 +101,7 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID)
# Android standalone toolchain path
# NOTE: This path is also used if toolchain generation
#ANDROID_TOOLCHAIN = $(CURDIR)/toolchain
ANDROID_TOOLCHAIN = C:/raylib/android-standalone-toolchain
ANDROID_TOOLCHAIN = C:/raylib/android-toolchain
# Android architecture: ARM or ARM64
ANDROID_ARCH ?= ARM
@ -230,8 +230,13 @@ endif
# external required libraries (stb and others)
INCLUDES = -I. -Iexternal
# OpenAL Soft library
INCLUDES += -Iexternal/openal_soft/include
ifeq ($(PLATFORM),PLATFORM_ANDROID)
INCLUDES += -Iandroid/jni/include/AL
else
INCLUDES += -Iexternal/openal_soft/include
endif
# define any directories containing required header files
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
@ -325,12 +330,12 @@ else
endif
ifeq ($(PLATFORM),PLATFORM_ANDROID)
$(CC) -shared -o $(OUTPUT_PATH)/libraylib.so $(OBJS)
@echo "raylib shared library (libraylib.so) generated!"
@echo "raylib shared library generated (libraylib.so)!"
endif
else
# compile raylib static library.
$(AR) rcs $(OUTPUT_PATH)/libraylib.a $(OBJS)
@echo "libraylib.a generated (static library)!"
@echo "raylib static library generated (libraylib.a)!"
ifeq ($(SHARED_OPENAL),NO)
@echo "expected OpenAL Soft static library linking"
else
@ -377,7 +382,6 @@ external/stb_vorbis.o: external/stb_vorbis.c external/stb_vorbis.h
utils.o : utils.c utils.h
$(CC) -c $< $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(SHAREDFLAG)
# It installs generated and needed files to compile projects using raylib.
# The installation works manually.
# TODO: add other platforms.

+ 0
- 161
src/android/jni/include/AL/oalMacOSX_OALExtensions.h 查看文件

@ -1,161 +0,0 @@
/**********************************************************************************************************************************
*
* OpenAL cross platform audio library
* Copyright (c) 2004-2006, Apple Computer, Inc. All rights reserved.
* Copyright (c) 2007-2008, Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
* conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Inc. ("Apple") nor the names of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
**********************************************************************************************************************************/
#ifndef __OAL_MAC_OSX_OAL_EXTENSIONS_H__
#define __OAL_MAC_OSX_OAL_EXTENSIONS_H__
#include <OpenAL/al.h>
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ALC_EXT_MAC_OSX
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
// Retrieve functions via alGetProcAddress() by passing in strings: alcMacOSXMixerOutputRate or alcMacOSXGetMixerOutputRate
// Setting the Mixer Output Rate effectively sets the samnple rate at which the mixer
typedef ALvoid (*alcMacOSXRenderingQualityProcPtr) (ALint value);
typedef ALvoid (*alMacOSXRenderChannelCountProcPtr) (ALint value);
typedef ALvoid (*alcMacOSXMixerMaxiumumBussesProcPtr) (ALint value);
typedef ALvoid (*alcMacOSXMixerOutputRateProcPtr) (ALdouble value);
typedef ALint (*alcMacOSXGetRenderingQualityProcPtr) ();
typedef ALint (*alMacOSXGetRenderChannelCountProcPtr) ();
typedef ALint (*alcMacOSXGetMixerMaxiumumBussesProcPtr) ();
typedef ALdouble (*alcMacOSXGetMixerOutputRateProcPtr) ();
/* Render Quality. Used with alcMacOSXRenderingQuality() */
#define ALC_MAC_OSX_SPATIAL_RENDERING_QUALITY_HIGH 'rqhi'
#define ALC_MAC_OSX_SPATIAL_RENDERING_QUALITY_LOW 'rdlo'
// High Quality Spatial Algorithm suitable only for headphone use
#define ALC_IPHONE_SPATIAL_RENDERING_QUALITY_HEADPHONES 'hdph'
/*
Render Channels. Used with alMacOSXRenderChannelCount()
Allows a user to force OpenAL to render to stereo, regardless of the audio hardware being used
*/
#define ALC_MAC_OSX_RENDER_CHANNEL_COUNT_STEREO 'rcst'
/* GameKit extension */
#define AL_GAMEKIT 'gksr'
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AL_EXT_SOURCE_NOTIFICATIONS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/*
Source Notifications
Eliminates the need for continuous polling for source state by providing a
mechanism for the application to receive source state change notifications.
Upon receiving a notification, the application can retrieve the actual state
corresponding to the notification ID for which the notification was sent.
*/
#define AL_QUEUE_HAS_LOOPED 0x9000
/*
Notification Proc: ALSourceNotificationProc
sid - source id
notificationID - id of state that has changed
userData - user data provided to alSourceAddNotification()
*/
typedef ALvoid (*alSourceNotificationProc)(ALuint sid, ALuint notificationID, ALvoid* userData);
/*
API: alSourceAddNotification
sid - source id
notificationID - id of state for which caller wants to be notified of a change
notifyProc - notification proc
userData - ptr to applications user data, will be returned in the notification proc
Returns AL_NO_ERROR if request is successful.
Valid IDs:
AL_SOURCE_STATE
AL_BUFFERS_PROCESSED
AL_QUEUE_HAS_LOOPED - notification sent when a looping source has looped to it's start point
*/
typedef ALenum (*alSourceAddNotificationProcPtr) (ALuint sid, ALuint notificationID, alSourceNotificationProc notifyProc, ALvoid* userData);
/*
API: alSourceRemoveStateNotification
sid - source id
notificationID - id of state for which caller wants to remove an existing notification
notifyProc - notification proc
userData - ptr to applications user data, will be returned in the notification proc
*/
typedef ALvoid (*alSourceRemoveNotificationProcPtr) (ALuint sid, ALuint notificationID, alSourceNotificationProc notifyProc, ALvoid* userData);
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ALC_EXT_ASA : Apple Spatial Audio Extension
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/*
Used with the ASA API calls: alcASAGetSource(), alcASASetSource(), alcASAGetListener(), alcASASetListener()
*/
typedef ALenum (*alcASAGetSourceProcPtr) (ALuint property, ALuint source, ALvoid *data, ALuint* dataSize);
typedef ALenum (*alcASASetSourceProcPtr) (ALuint property, ALuint source, ALvoid *data, ALuint dataSize);
typedef ALenum (*alcASAGetListenerProcPtr) (ALuint property, ALvoid *data, ALuint* dataSize);
typedef ALenum (*alcASASetListenerProcPtr) (ALuint property, ALvoid *data, ALuint dataSize);
/* listener properties */
#define ALC_ASA_REVERB_ON 'rvon' // type ALuint
#define ALC_ASA_REVERB_GLOBAL_LEVEL 'rvgl' // type ALfloat -40.0 db - 40.0 db
#define ALC_ASA_REVERB_ROOM_TYPE 'rvrt' // type ALint
/* reverb room type presets for the ALC_ASA_REVERB_ROOM_TYPE property */
#define ALC_ASA_REVERB_ROOM_TYPE_SmallRoom 0
#define ALC_ASA_REVERB_ROOM_TYPE_MediumRoom 1
#define ALC_ASA_REVERB_ROOM_TYPE_LargeRoom 2
#define ALC_ASA_REVERB_ROOM_TYPE_MediumHall 3
#define ALC_ASA_REVERB_ROOM_TYPE_LargeHall 4
#define ALC_ASA_REVERB_ROOM_TYPE_Plate 5
#define ALC_ASA_REVERB_ROOM_TYPE_MediumChamber 6
#define ALC_ASA_REVERB_ROOM_TYPE_LargeChamber 7
#define ALC_ASA_REVERB_ROOM_TYPE_Cathedral 8
#define ALC_ASA_REVERB_ROOM_TYPE_LargeRoom2 9
#define ALC_ASA_REVERB_ROOM_TYPE_MediumHall2 10
#define ALC_ASA_REVERB_ROOM_TYPE_MediumHall3 11
#define ALC_ASA_REVERB_ROOM_TYPE_LargeHall2 12
#define ALC_ASA_REVERB_EQ_GAIN 'rveg' // type ALfloat
#define ALC_ASA_REVERB_EQ_BANDWITH 'rveb' // type ALfloat
#define ALC_ASA_REVERB_EQ_FREQ 'rvef' // type ALfloat
/* source properties */
#define ALC_ASA_REVERB_SEND_LEVEL 'rvsl' // type ALfloat 0.0 (dry) - 1.0 (wet) (0-100% dry/wet mix, 0.0 default)
#define ALC_ASA_OCCLUSION 'occl' // type ALfloat -100.0 db (most occlusion) - 0.0 db (no occlusion, 0.0 default)
#define ALC_ASA_OBSTRUCTION 'obst' // type ALfloat -100.0 db (most obstruction) - 0.0 db (no obstruction, 0.0 default)
#endif // __OAL_MAC_OSX_OAL_EXTENSIONS_H__

+ 0
- 0
src/android/jni/include/AL/oalStaticBufferExtension.h 查看文件


+ 16
- 10
src/audio.c 查看文件

@ -801,20 +801,26 @@ void ResumeMusicStream(Music music)
}
// Stop music playing (close stream)
// TODO: To clear a buffer, make sure they have been already processed!
void StopMusicStream(Music music)
{
alSourceStop(music->stream.source);
/*
// Clear stream buffers
// WARNING: Queued buffers must have been processed before unqueueing and reloaded with data!!!
void *pcm = calloc(AUDIO_BUFFER_SIZE*music->stream.sampleSize/8*music->stream.channels, 1);
for (int i = 0; i < MAX_STREAM_BUFFERS; i++)
{
UpdateAudioStream(music->stream, pcm, AUDIO_BUFFER_SIZE);
//alBufferData(music->stream.buffers[i], music->stream.format, pcm, AUDIO_BUFFER_SIZE*music->stream.sampleSize/8*music->stream.channels, music->stream.sampleRate);
//UpdateAudioStream(music->stream, pcm, AUDIO_BUFFER_SIZE); // Update one buffer at a time
alBufferData(music->stream.buffers[i], music->stream.format, pcm, AUDIO_BUFFER_SIZE*music->stream.sampleSize/8*music->stream.channels, music->stream.sampleRate);
}
free(pcm);
*/
// Restart music context
switch (music->ctxType)
@ -896,9 +902,9 @@ void UpdateMusicStream(Music music)
break;
}
}
// This error is registered when UpdateAudioStream() fails
k">if (alGetError() == AL_INVALID_VALUE) TraceLog(WARNING, "OpenAL: Error buffering data...");
// Free allocated pcm data
n">free(pcm);
// Reset audio stream for looping
if (!active)
@ -918,8 +924,6 @@ void UpdateMusicStream(Music music)
// just make sure to play again on window restore
if (state != AL_PLAYING) PlayMusicStream(music);
}
free(pcm);
}
}
@ -1066,7 +1070,8 @@ void CloseAudioStream(AudioStream stream)
}
// Update audio stream buffers with data
// NOTE: Only updates one buffer per call
// NOTE 1: Only updates one buffer of the stream source: unqueue -> update -> queue
// NOTE 2: To unqueue a buffer it needs to be processed: IsAudioBufferProcessed()
void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount)
{
ALuint buffer = 0;
@ -1075,9 +1080,10 @@ void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount)
// Check if any buffer was available for unqueue
if (alGetError() != AL_INVALID_VALUE)
{
alBufferData(buffer, stream.format, data, samplesCount*stream.channels*stream.sampleSize/8, stream.sampleRate);
alBufferData(buffer, stream.format, data, samplesCount*stream.sampleSize/8*stream.channels, stream.sampleRate);
alSourceQueueBuffers(stream.source, 1, &buffer);
}
else TraceLog(WARNING, "[AUD ID %i] Audio buffer not available for unqueuing", stream.source);
}
// Check if any audio stream buffers requires refill

+ 191
- 150
src/core.c 查看文件

@ -108,6 +108,16 @@
#include <string.h> // Required for: strrchr(), strcmp()
//#include <errno.h> // Macros for reporting and retrieving error conditions through error codes
#ifdef _WIN32
#include <direct.h> // Required for: _getch(), _chdir()
#define GETCWD _getcwd // NOTE: MSDN recommends not to use getcwd(), chdir()
#define CHDIR _chdir
#else
#include "unistd.h" // Required for: getch(), chdir() (POSIX)
#define GETCWD getcwd
#define CHDIR chdir
#endif
#if defined(__linux__) || defined(PLATFORM_WEB)
#include <sys/time.h> // Required for: timespec, nanosleep(), select() - POSIX
#elif defined(__APPLE__)
@ -259,6 +269,7 @@ static Matrix downscaleView; // Matrix to downscale view (in case
static const char *windowTitle; // Window text title...
static bool cursorOnScreen = false; // Tracks if cursor is inside client area
static bool cursorHidden = false; // Track if cursor is hidden
static int screenshotCounter = 0; // Screenshots counter
// Register mouse states
static char previousMouseState[3] = { 0 }; // Registers previous mouse button state
@ -380,7 +391,7 @@ static void *GamepadThread(void *arg); // Mouse reading thread
// Module Functions Definition - Window and OpenGL Context Functions
//----------------------------------------------------------------------------------
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB)
// Initialize Window and Graphics Context (OpenGL)
// Initialize window and OpenGL context
void InitWindow(int width, int height, const char *title)
{
TraceLog(INFO, "Initializing raylib (v1.7.0)");
@ -443,7 +454,7 @@ void InitWindow(int width, int height, const char *title)
#endif
#if defined(PLATFORM_ANDROID)
// Android activity initialization
// Initialize Android activity
void InitWindow(int width, int height, void *state)
{
TraceLog(INFO, "Initializing raylib (v1.7.0)");
@ -506,7 +517,7 @@ void InitWindow(int width, int height, void *state)
}
#endif
// Close Window and Terminate Context
// Close window and unload OpenGL context
void CloseWindow(void)
{
#if defined(SUPPORT_DEFAULT_FONT)
@ -562,7 +573,7 @@ void CloseWindow(void)
TraceLog(INFO, "Window closed successfully");
}
// Detect if KEY_ESCAPE pressed or Close icon pressed
// Check if KEY_ESCAPE pressed or Close icon pressed
bool WindowShouldClose(void)
{
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
@ -577,7 +588,7 @@ bool WindowShouldClose(void)
#endif
}
// Detect if window has been minimized (or lost focus)
// Check if window has been minimized (or lost focus)
bool IsWindowMinimized(void)
{
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
@ -587,7 +598,7 @@ bool IsWindowMinimized(void)
#endif
}
// Fullscreen toggle (only PLATFORM_DESKTOP)
// Toggle fullscreen mode (only PLATFORM_DESKTOP)
void ToggleFullscreen(void)
{
#if defined(PLATFORM_DESKTOP)
@ -646,7 +657,7 @@ void SetWindowMonitor(int monitor)
#endif
}
// Set window minimum dimensions (k">for FLAG_WINDOW_RESIZABLE)
// Set window minimum dimensions (FLAG_WINDOW_RESIZABLE)
void SetWindowMinSize(int width, int height)
{
#if defined(PLATFORM_DESKTOP)
@ -681,7 +692,7 @@ void ShowCursor()
cursorHidden = false;
}
// Hide mouse cursor
// Hides mouse cursor
void HideCursor()
{
#if defined(PLATFORM_DESKTOP)
@ -701,13 +712,13 @@ void HideCursor()
cursorHidden = true;
}
// Check if mouse cursor is hidden
// Check if cursor is not visible
bool IsCursorHidden()
{
return cursorHidden;
}
// Enable mouse cursor
// Enables cursor (unlock cursor)
void EnableCursor()
{
#if defined(PLATFORM_DESKTOP)
@ -719,7 +730,7 @@ void EnableCursor()
cursorHidden = false;
}
// Disable mouse cursor
// Disables cursor (lock cursor)
void DisableCursor()
{
#if defined(PLATFORM_DESKTOP)
@ -732,14 +743,14 @@ void DisableCursor()
}
#endif // !defined(PLATFORM_ANDROID)
// Sets Background Color
// Set background color (framebuffer clear color)
void ClearBackground(Color color)
{
// Clear full framebuffer (not only render area) to color
rlClearColor(color.r, color.g, color.b, color.a);
}
// Setup drawing canvas to start drawing
// Setup canvas (framebuffer) to start drawing
void BeginDrawing(void)
{
currentTime = GetTime(); // Number of elapsed seconds since InitTimer() was called
@ -754,7 +765,7 @@ void BeginDrawing(void)
// NOTE: Not required with OpenGL 3.3+
}
// End canvas drawing and Swap Buffers (Double Buffering)
// End canvas drawing and swap buffers (double buffering)
void EndDrawing(void)
{
rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2)
@ -782,7 +793,7 @@ void EndDrawing(void)
}
}
// Initialize 2D mode with custom camera
// Initialize 2D mode with custom camera (2D)
void Begin2dMode(Camera2D camera)
{
rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2)
@ -800,7 +811,7 @@ void Begin2dMode(Camera2D camera)
rlMultMatrixf(MatrixToFloat(matTransform));
}
// Ends 2D mode custom camera usage
// Ends 2D mode with custom camera
void End2dMode(void)
{
rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2)
@ -808,7 +819,7 @@ void End2dMode(void)
rlLoadIdentity(); // Reset current matrix (MODELVIEW)
}
// Initializes 3D mode k">for drawing (Camera setup)
// Initializes 3D mode n">with custom camera (3D)
void Begin3dMode(Camera camera)
{
rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2)
@ -897,7 +908,107 @@ void EndTextureMode(void)
rlLoadIdentity(); // Reset current matrix (MODELVIEW)
}
// Set target FPS for the game
// Returns a ray trace from mouse position
Ray GetMouseRay(Vector2 mousePosition, Camera camera)
{
Ray ray;
// Calculate normalized device coordinates
// NOTE: y value is negative
float x = (2.0f*mousePosition.x)/(float)GetScreenWidth() - 1.0f;
float y = 1.0f - (2.0f*mousePosition.y)/(float)GetScreenHeight();
float z = 1.0f;
// Store values in a vector
Vector3 deviceCoords = { x, y, z };
TraceLog(DEBUG, "Device coordinates: (%f, %f, %f)", deviceCoords.x, deviceCoords.y, deviceCoords.z);
// Calculate projection matrix (from perspective instead of frustum)
Matrix matProj = MatrixPerspective(camera.fovy, ((double)GetScreenWidth()/(double)GetScreenHeight()), 0.01, 1000.0);
// Calculate view matrix from camera look at
Matrix matView = MatrixLookAt(camera.position, camera.target, camera.up);
// Do I need to transpose it? It seems that yes...
// NOTE: matrix order may be incorrect... In OpenGL to get world position from
// camera view it just needs to get inverted, but here we need to transpose it too.
// For example, if you get view matrix, transpose and inverted and you transform it
// to a vector, you will get its 3d world position coordinates (camera.position).
// If you don't transpose, final position will be wrong.
MatrixTranspose(&matView);
//#define USE_RLGL_UNPROJECT
#if defined(USE_RLGL_UNPROJECT) // OPTION 1: Use rlglUnproject()
Vector3 nearPoint = rlglUnproject((Vector3){ deviceCoords.x, deviceCoords.y, 0.0f }, matProj, matView);
Vector3 farPoint = rlglUnproject((Vector3){ deviceCoords.x, deviceCoords.y, 1.0f }, matProj, matView);
#else // OPTION 2: Compute unprojection directly here
// Calculate unproject matrix (multiply projection matrix and view matrix) and invert it
Matrix matProjView = MatrixMultiply(matProj, matView);
MatrixInvert(&matProjView);
// Calculate far and near points
Quaternion qNear = { deviceCoords.x, deviceCoords.y, 0.0f, 1.0f };
Quaternion qFar = { deviceCoords.x, deviceCoords.y, 1.0f, 1.0f };
// Multiply points by unproject matrix
QuaternionTransform(&qNear, matProjView);
QuaternionTransform(&qFar, matProjView);
// Calculate normalized world points in vectors
Vector3 nearPoint = { qNear.x/qNear.w, qNear.y/qNear.w, qNear.z/qNear.w};
Vector3 farPoint = { qFar.x/qFar.w, qFar.y/qFar.w, qFar.z/qFar.w};
#endif
// Calculate normalized direction vector
Vector3 direction = VectorSubtract(farPoint, nearPoint);
VectorNormalize(&direction);
// Apply calculated vectors to ray
ray.position = camera.position;
ray.direction = direction;
return ray;
}
// Returns the screen space position from a 3d world space position
Vector2 GetWorldToScreen(Vector3 position, Camera camera)
{
// Calculate projection matrix (from perspective instead of frustum
Matrix matProj = MatrixPerspective(camera.fovy, (double)GetScreenWidth()/(double)GetScreenHeight(), 0.01, 1000.0);
// Calculate view matrix from camera look at (and transpose it)
Matrix matView = MatrixLookAt(camera.position, camera.target, camera.up);
MatrixTranspose(&matView);
// Convert world position vector to quaternion
Quaternion worldPos = { position.x, position.y, position.z, 1.0f };
// Transform world position to view
QuaternionTransform(&worldPos, matView);
// Transform result to projection (clip space position)
QuaternionTransform(&worldPos, matProj);
// Calculate normalized device coordinates (inverted y)
Vector3 ndcPos = { worldPos.x/worldPos.w, -worldPos.y/worldPos.w, worldPos.z/worldPos.w };
// Calculate 2d screen position vector
Vector2 screenPosition = { (ndcPos.x + 1.0f)/2.0f*(float)GetScreenWidth(), (ndcPos.y + 1.0f)/2.0f*(float)GetScreenHeight() };
return screenPosition;
}
// Get transform matrix for camera
Matrix GetCameraMatrix(Camera camera)
{
return MatrixLookAt(camera.position, camera.target, camera.up);
}
// Set target FPS (maximum)
void SetTargetFPS(int fps)
{
if (fps < 1) targetTime = 0.0;
@ -912,7 +1023,7 @@ int GetFPS(void)
return (int)(1.0f/GetFrameTime());
}
// Returns time in seconds for one frame
// Returns time in seconds for last frame drawn
float GetFrameTime(void)
{
// NOTE: We round value to milliseconds
@ -944,7 +1055,6 @@ float *VectorToFloat(Vector3 vec)
return buffer;
}
// Converts Matrix to float array
// NOTE: Returned vector is a transposed version of the Matrix struct,
// it should be this way because, despite raymath use OpenGL column-major convention,
// Matrix struct memory alignment and variables naming are not coherent
@ -1004,7 +1114,7 @@ int GetRandomValue(int min, int max)
return (rand()%(abs(max-min)+1) + min);
}
// Fades color by a percentadge
// Color fade-in or fade-out, alpha goes from 0.0f to 1.0f
Color Fade(Color color, float alpha)
{
if (alpha < 0.0f) alpha = 0.0f;
@ -1015,13 +1125,13 @@ Color Fade(Color color, float alpha)
return (Color){color.r, color.g, color.b, (unsigned char)colorAlpha};
}
// Activates raylib logo at startup
// Activate raylib logo at startup (can be done with flags)
void ShowLogo(void)
{
showLogo = true;
}
// Enable some window/system configurations
// Setup window configuration flags (view FLAGS)
void SetConfigFlags(char flags)
{
configFlags = flags;
@ -1030,25 +1140,17 @@ void SetConfigFlags(char flags)
if (configFlags & FLAG_FULLSCREEN_MODE) fullscreen = true;
}
// Takes a screenshot and saves it in the same folder as executable
void TakeScreenshot(void)
// NOTE TraceLog() function is located in [utils.h]
// Takes a screenshot of current screen (saved a .png)
void TakeScreenshot(const char *fileName)
{
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
static int shotNum = 0; // Screenshot number, increments every screenshot take during program execution
char buffer[20]; // Buffer to store file name
unsigned char *imgData = rlglReadScreenPixels(renderWidth, renderHeight);
sprintf(buffer, "screenshot%03i.png", shotNum);
// Save image as PNG
SavePNG(buffer, imgData, renderWidth, renderHeight, 4);
SavePNG(fileName, imgData, renderWidth, renderHeight, 4); // Save image as PNG
free(imgData);
shotNum++;
TraceLog(INFO, "[%s] Screenshot taken #03i", buffer, shotNum);
TraceLog(INFO, "Screenshot taken: %s", fileName);
#endif
}
@ -1066,15 +1168,46 @@ bool IsFileExtension(const char *fileName, const char *ext)
return result;
}
// Get directory for a given fileName (with path)
const char *GetDirectoryPath(const char *fileName)
{
char *lastSlash = NULL;
static char filePath[256]; // MAX_DIRECTORY_PATH_SIZE = 256
memset(filePath, 0, 256);
lastSlash = strrchr(fileName, '\\');
strncpy(filePath, fileName, strlen(fileName) - (strlen(lastSlash) - 1));
filePath[strlen(fileName) - strlen(lastSlash)] = '\0';
return filePath;
}
// Get current working directory
const char *GetWorkingDirectory(void)
{
static char currentDir[256]; // MAX_DIRECTORY_PATH_SIZE = 256
memset(currentDir, 0, 256);
GETCWD(currentDir, 256 - 1);
return currentDir;
}
// Change working directory, returns true if success
bool ChangeDirectory(const char *dir)
{
return (CHDIR(dir) == 0);
}
#if defined(PLATFORM_DESKTOP)
// Check if a file have been dropped into window
// Check if a file has been dropped into window
bool IsFileDropped(void)
{
if (dropFilesCount > 0) return true;
else return false;
}
// Retrieve dropped files into window
// Get dropped files names
char **GetDroppedFiles(int *count)
{
*count = dropFilesCount;
@ -1095,7 +1228,7 @@ void ClearDroppedFiles(void)
}
#endif
// Storage save integer value (to defined position)
// Save integer value to storage file (to defined position)
// NOTE: Storage positions is directly related to file memory layout (4 bytes each integer)
void StorageSaveValue(int position, int value)
{
@ -1135,7 +1268,7 @@ void StorageSaveValue(int position, int value)
}
}
// Storage load integer value (from defined position)
// Load integer value from storage file (from defined position)
// NOTE: If requested position could not be found, value 0 is returned
int StorageLoadValue(int position)
{
@ -1174,106 +1307,6 @@ int StorageLoadValue(int position)
return value;
}
// Returns a ray trace from mouse position
Ray GetMouseRay(Vector2 mousePosition, Camera camera)
{
Ray ray;
// Calculate normalized device coordinates
// NOTE: y value is negative
float x = (2.0f*mousePosition.x)/(float)GetScreenWidth() - 1.0f;
float y = 1.0f - (2.0f*mousePosition.y)/(float)GetScreenHeight();
float z = 1.0f;
// Store values in a vector
Vector3 deviceCoords = { x, y, z };
TraceLog(DEBUG, "Device coordinates: (%f, %f, %f)", deviceCoords.x, deviceCoords.y, deviceCoords.z);
// Calculate projection matrix (from perspective instead of frustum)
Matrix matProj = MatrixPerspective(camera.fovy, ((double)GetScreenWidth()/(double)GetScreenHeight()), 0.01, 1000.0);
// Calculate view matrix from camera look at
Matrix matView = MatrixLookAt(camera.position, camera.target, camera.up);
// Do I need to transpose it? It seems that yes...
// NOTE: matrix order may be incorrect... In OpenGL to get world position from
// camera view it just needs to get inverted, but here we need to transpose it too.
// For example, if you get view matrix, transpose and inverted and you transform it
// to a vector, you will get its 3d world position coordinates (camera.position).
// If you don't transpose, final position will be wrong.
MatrixTranspose(&matView);
//#define USE_RLGL_UNPROJECT
#if defined(USE_RLGL_UNPROJECT) // OPTION 1: Use rlglUnproject()
Vector3 nearPoint = rlglUnproject((Vector3){ deviceCoords.x, deviceCoords.y, 0.0f }, matProj, matView);
Vector3 farPoint = rlglUnproject((Vector3){ deviceCoords.x, deviceCoords.y, 1.0f }, matProj, matView);
#else // OPTION 2: Compute unprojection directly here
// Calculate unproject matrix (multiply projection matrix and view matrix) and invert it
Matrix matProjView = MatrixMultiply(matProj, matView);
MatrixInvert(&matProjView);
// Calculate far and near points
Quaternion qNear = { deviceCoords.x, deviceCoords.y, 0.0f, 1.0f };
Quaternion qFar = { deviceCoords.x, deviceCoords.y, 1.0f, 1.0f };
// Multiply points by unproject matrix
QuaternionTransform(&qNear, matProjView);
QuaternionTransform(&qFar, matProjView);
// Calculate normalized world points in vectors
Vector3 nearPoint = { qNear.x/qNear.w, qNear.y/qNear.w, qNear.z/qNear.w};
Vector3 farPoint = { qFar.x/qFar.w, qFar.y/qFar.w, qFar.z/qFar.w};
#endif
// Calculate normalized direction vector
Vector3 direction = VectorSubtract(farPoint, nearPoint);
VectorNormalize(&direction);
// Apply calculated vectors to ray
ray.position = camera.position;
ray.direction = direction;
return ray;
}
// Returns the screen space position from a 3d world space position
Vector2 GetWorldToScreen(Vector3 position, Camera camera)
{
// Calculate projection matrix (from perspective instead of frustum
Matrix matProj = MatrixPerspective(camera.fovy, (double)GetScreenWidth()/(double)GetScreenHeight(), 0.01, 1000.0);
// Calculate view matrix from camera look at (and transpose it)
Matrix matView = MatrixLookAt(camera.position, camera.target, camera.up);
MatrixTranspose(&matView);
// Convert world position vector to quaternion
Quaternion worldPos = { position.x, position.y, position.z, 1.0f };
// Transform world position to view
QuaternionTransform(&worldPos, matView);
// Transform result to projection (clip space position)
QuaternionTransform(&worldPos, matProj);
// Calculate normalized device coordinates (inverted y)
Vector3 ndcPos = { worldPos.x/worldPos.w, -worldPos.y/worldPos.w, worldPos.z/worldPos.w };
// Calculate 2d screen position vector
Vector2 screenPosition = { (ndcPos.x + 1.0f)/2.0f*(float)GetScreenWidth(), (ndcPos.y + 1.0f)/2.0f*(float)GetScreenHeight() };
return screenPosition;
}
// Get transform matrix for camera
Matrix GetCameraMatrix(Camera camera)
{
return MatrixLookAt(camera.position, camera.target, camera.up);
}
//----------------------------------------------------------------------------------
// Module Functions Definition - Input (Keyboard, Mouse, Gamepad) Functions
//----------------------------------------------------------------------------------
@ -1559,7 +1592,7 @@ int GetMouseWheelMove(void)
#endif
}
// Returns touch position X
// Returns touch position X for touch point 0 (relative to screen size)
int GetTouchX(void)
{
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)
@ -1569,7 +1602,7 @@ int GetTouchX(void)
#endif
}
// Returns touch position Y
// Returns touch position Y for touch point 0 (relative to screen size)
int GetTouchY(void)
{
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)
@ -1579,7 +1612,7 @@ int GetTouchY(void)
#endif
}
// Returns touch position XY
// Returns touch position XY for a touch point index (relative to screen size)
// TODO: Touch position should be scaled depending on display size and render size
Vector2 GetTouchPosition(int index)
{
@ -1836,8 +1869,8 @@ static void InitGraphicsDevice(int width, int height)
EGL_RED_SIZE, 8, // RED color bit depth (alternative: 5)
EGL_GREEN_SIZE, 8, // GREEN color bit depth (alternative: 6)
EGL_BLUE_SIZE, 8, // BLUE color bit depth (alternative: 5)
//EGL_ALPHA_SIZE, 8, // ALPHA bit depth
//EGL_TRANSPARENT_TYPE, EGL_TRANSPARENT_RGB, // Request transparent framebuffer
//EGL_ALPHA_SIZE, 8, // ALPHA bit depth (required for transparent framebuffer)
//EGL_TRANSPARENT_TYPE, EGL_NONE, // Request transparent framebuffer (EGL_TRANSPARENT_RGB does not work on RPI)
EGL_DEPTH_SIZE, 16, // Depth buffer size (Required to use Depth testing!)
//EGL_STENCIL_SIZE, 8, // Stencil buffer size
EGL_SAMPLE_BUFFERS, sampleBuffer, // Activate MSAA
@ -1912,7 +1945,7 @@ static void InitGraphicsDevice(int width, int height)
VC_DISPMANX_ALPHA_T alpha;
alpha.flags = DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS;
alpha.opacity = 255;
alpha.opacity = 255; // Set transparency level for framebuffer, requires EGLAttrib: EGL_TRANSPARENT_TYPE
alpha.mask = 0;
dispmanDisplay = vc_dispmanx_display_open(0); // LCD
@ -2362,7 +2395,11 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
// NOTE: Before closing window, while loop must be left!
}
#if defined(PLATFORM_DESKTOP)
else if (key == GLFW_KEY_F12 && action == GLFW_PRESS) TakeScreenshot();
else if (key == GLFW_KEY_F12 && action == GLFW_PRESS)
{
TakeScreenshot(FormatText("screenshot%03i.png", screenshotCounter));
screenshotCounter++;
}
#endif
else
{
@ -3002,8 +3039,12 @@ static void ProcessKeyboard(void)
// Check exit key (same functionality as GLFW3 KeyCallback())
if (currentKeyState[exitKey] == 1) windowShouldClose = true;
// Check screen capture key
if (currentKeyState[301] == 1) TakeScreenshot(); // raylib key: KEY_F12 (GLFW_KEY_F12)
// Check screen capture key (raylib key: KEY_F12)
if (currentKeyState[301] == 1)
{
TakeScreenshot(FormatText("screenshot%03i.png", screenshotCounter));
screenshotCounter++;
}
}
// Restore default keyboard input

+ 5
- 5
src/models.c 查看文件

@ -1541,11 +1541,11 @@ RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3)
result.hit = true;
result.distance = t;
result.hit = true;
result.hitNormal = VectorCrossProduct(edge1, edge2);
VectorNormalize(&result.hitNormal);
result.normal = VectorCrossProduct(edge1, edge2);
VectorNormalize(&result.normal);
Vector3 rayDir = ray.direction;
VectorScale(&rayDir, t);
result.hitPosition = VectorAdd(ray.position, rayDir);
result.position = VectorAdd(ray.position, rayDir);
}
return result;
@ -1568,8 +1568,8 @@ RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight)
VectorScale(&rayDir, t);
result.hit = true;
result.distance = t;
result.hitNormal = (Vector3){ 0.0, 1.0, 0.0 };
result.hitPosition = VectorAdd(ray.position, rayDir);
result.normal = (Vector3){ 0.0, 1.0, 0.0 };
result.position = VectorAdd(ray.position, rayDir);
}
}

+ 8
- 3
src/physac.h 查看文件

@ -274,13 +274,13 @@ PHYSACDEF void ClosePhysics(void);
// Global Variables Definition
//----------------------------------------------------------------------------------
#if !defined(PHYSAC_NO_THREADS)
static pthread_t physicsThreadId; // Physics thread id
static pthread_t physicsThreadId; // Physics thread id
#endif
static unsigned int usedMemory = 0; // Total allocated dynamic memory
static bool physicsThreadEnabled = false; // Physics thread enabled state
static double currentTime = 0; // Current time in milliseconds
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_RPI) || defined(__linux__) || defined(PLATFORM_WEB)
static double baseTime = 0; // Android and RPI platforms base time
static double baseTime = 0; // Android and RPI platforms base time
#endif
static double startTime = 0; // Start time in milliseconds
static double deltaTime = 0; // Delta time used for physics steps
@ -316,10 +316,12 @@ static void FindIncidentFace(Vector2 *v0, Vector2 *v1, PhysicsShape ref, Physics
static int Clip(Vector2 normal, float clip, Vector2 *faceA, Vector2 *faceB); // Calculates clipping based on a normal and two faces
static bool BiasGreaterThan(float valueA, float valueB); // Check if values are between bias range
static Vector2 TriangleBarycenter(Vector2 v1, Vector2 v2, Vector2 v3); // Returns the barycenter of a triangle given by 3 points
static void InitTimer(void); // Initializes hi-resolution timer
static double GetCurrentTime(void); // Get current time in milliseconds
static int GetRandomNumber(int min, int max); // Returns a random number between min and max (both included)
// Math functions
static void MathClamp(double *value, double min, double max); // Clamp a value in a range
static Vector2 MathCross(float value, Vector2 vector); // Returns the cross product of a vector and a value
static float MathCrossVector2(Vector2 v1, Vector2 v2); // Returns the cross product of two vectors
@ -327,8 +329,10 @@ static float MathLenSqr(Vector2 vector);
static float MathDot(Vector2 v1, Vector2 v2); // Returns the dot product of two vectors
static inline float DistSqr(Vector2 v1, Vector2 v2); // Returns the square root of distance between two vectors
static void MathNormalize(Vector2 *vector); // Returns the normalized values of a vector
#if defined(PHYSAC_STANDALONE)
static Vector2 Vector2Add(Vector2 v1, Vector2 v2); // Returns the sum of two given vectors
static Vector2 Vector2Subtract(Vector2 v1, Vector2 v2); // Returns the subtract of two given vectors
#endif
static Mat2 Mat2Radians(float radians); // Creates a matrix 2x2 from a given radians value
static void Mat2Set(Mat2 *matrix, float radians); // Set values from radians to a created matrix 2x2
@ -1978,6 +1982,7 @@ static void MathNormalize(Vector2 *vector)
vector->y *= ilength;
}
#if defined(PHYSAC_STANDALONE)
// Returns the sum of two given vectors
static inline Vector2 Vector2Add(Vector2 v1, Vector2 v2)
{
@ -1988,7 +1993,7 @@ static inline Vector2 Vector2Add(Vector2 v1, Vector2 v2)
static inline Vector2 Vector2Subtract(Vector2 v1, Vector2 v2)
{
return (Vector2){ v1.x - v2.x, v1.y - v2.y };
p">}
cp">#endif
// Creates a matrix 2x2 from a given radians value
static inline Mat2 Mat2Radians(float radians)

+ 31
- 28
src/raylib.h 查看文件

@ -479,8 +479,8 @@ typedef struct Ray {
typedef struct RayHitInfo {
bool hit; // Did the ray hit something?
float distance; // Distance to nearest hit
Vector3 hitPosition; // Position of nearest hit
Vector3 hitNormal; // Surface normal of hit
Vector3 position; // Position of nearest hit
Vector3 normal; // Surface normal of hit
} RayHitInfo;
// Wave type, defines audio wave data
@ -656,15 +656,15 @@ extern "C" { // Prevents name mangling of functions
// Window and Graphics Device Functions (Module: core)
//------------------------------------------------------------------------------------
#if defined(PLATFORM_ANDROID)
RLAPI void InitWindow(int width, int height, void *state); // Init Android Activity and OpenGL Graphics (struct android_app)
RLAPI void InitWindow(int width, int height, void *state); // Initialize Android activity
#elif defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB)
RLAPI void InitWindow(int width, int height, const char *title); // Initialize Window and OpenGL Graphics
RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
#endif
RLAPI void CloseWindow(void); // Close Window and Terminate Context
RLAPI bool WindowShouldClose(void); // Detect if KEY_ESCAPE pressed or Close icon pressed
RLAPI bool IsWindowMinimized(void); // Detect if window has been minimized (or lost focus)
RLAPI void ToggleFullscreen(void); // Fullscreen toggle (only PLATFORM_DESKTOP)
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus)
RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP)
RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
@ -675,29 +675,29 @@ RLAPI int GetScreenHeight(void); // Get current
#if !defined(PLATFORM_ANDROID)
RLAPI void ShowCursor(void); // Shows cursor
RLAPI void HideCursor(void); // Hides cursor
RLAPI bool IsCursorHidden(void); // Returns true if cursor is not visible
RLAPI void EnableCursor(void); // Enables cursor
RLAPI void DisableCursor(void); // Disables cursor
RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
RLAPI void DisableCursor(void); // Disables cursor (lock cursor)
#endif
RLAPI void ClearBackground(Color color); // Sets Background Color
RLAPI void BeginDrawing(void); // Setup drawing canvas to start drawing
RLAPI void EndDrawing(void); // End canvas drawing and Swap Buffers (Double Buffering)
RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)
RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing
RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering)
RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera
RLAPI void End2dMode(void); // Ends 2D mode custom camera usage
RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode k">for drawing (Camera setup)
RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera (2D)
RLAPI void End2dMode(void); // Ends 2D mode with custom camera
RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode n">with custom camera (3D)
RLAPI void End3dMode(void); // Ends 3D mode and returns to default 2D orthographic mode
RLAPI void BeginTextureMode(RenderTexture2D target); // Initializes render texture for drawing
RLAPI void EndTextureMode(void); // Ends drawing to render texture
RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position n">from a 3d world space position
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position k">for a 3d world space position
RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix)
RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum)
RLAPI int GetFPS(void); // Returns current FPS
RLAPI float GetFrameTime(void); // Returns time in seconds for one frame
RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn
RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value
RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color
@ -708,18 +708,21 @@ RLAPI float *MatrixToFloat(Matrix mat); // Converts Ma
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f
RLAPI void ShowLogo(void); // Activates raylib logo at startup (can be done with flags)
RLAPI void SetConfigFlags(char flags); // Setup some window configuration flags
RLAPI void ShowLogo(void); // Activate raylib logo at startup (can be done with flags)
RLAPI void SetConfigFlags(char flags); // Setup window configuration flags (view FLAGS)
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG)
RLAPI void TakeScreenshot(void); // Takes a screenshot and saves it in the same folder as executable
RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
RLAPI bool IsFileDropped(void); // Check if a file have been dropped into window
RLAPI char **GetDroppedFiles(int *count); // Retrieve dropped files into window
RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension
RLAPI const char *GetDirectoryPath(const char *fileName); // Get directory for a given fileName (with path)
RLAPI const char *GetWorkingDirectory(void); // Get current working directory
RLAPI bool ChangeDirectory(const char *dir); // Change working directory, returns true if success
RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
RLAPI char **GetDroppedFiles(int *count); // Get dropped files names
RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer
RLAPI void StorageSaveValue(int position, int value); // Storage save integer value (to defined position)
RLAPI int StorageLoadValue(int position); // Storage load integer value (from defined position)
RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position)
RLAPI int StorageLoadValue(int position); // Load integer value from storage file (from defined position)
//------------------------------------------------------------------------------------
// Input Handling Functions (Module: core)
@ -877,7 +880,7 @@ RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position,
RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
RLAPI Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, float fontSize, int spacing); // Measure string size for SpriteFont
RLAPI void DrawFPS(int posX, int posY); // Shows current FPS on top-left corner
RLAPI void DrawFPS(int posX, int posY); // Shows current FPS
RLAPI const char *FormatText(const char *text, ...); // Formatting of text with variables to 'embed'
RLAPI const char *SubText(const char *text, int position, int length); // Get a piece of a text string

+ 2
- 1
src/rlgl.c 查看文件

@ -1052,6 +1052,7 @@ void rlglInit(int width, int height)
// NOTE: On OpenGL 3.3 VAO and NPOT are supported by default
vaoSupported = true;
texNPOTSupported = true;
texFloatSupported = true;
// We get a list of available extensions and we check for some of them (compressed textures)
// NOTE: We don't need to check again supported extensions but we do (GLAD already dealt with that)
@ -1425,7 +1426,7 @@ unsigned int rlglLoadTexture(void *data, int width, int height, int format, int
case UNCOMPRESSED_R5G5B5A1: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB5_A1, width, height, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, (unsigned short *)data); break;
case UNCOMPRESSED_R4G4B4A4: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA4, width, height, 0, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, (unsigned short *)data); break;
case UNCOMPRESSED_R8G8B8A8: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (unsigned char *)data); break;
case UNCOMPRESSED_R32G32B32: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB32F, width, height, 0, GL_RGB, GL_FLOAT, (float *)data); break;
case UNCOMPRESSED_R32G32B32: k">if (texFloatSupported) glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB32F, width, height, 0, GL_RGB, GL_FLOAT, (float *)data); break;
case COMPRESSED_DXT1_RGB: if (texCompDXTSupported) LoadCompressedTexture((unsigned char *)data, width, height, mipmapCount, GL_COMPRESSED_RGB_S3TC_DXT1_EXT); break;
case COMPRESSED_DXT1_RGBA: if (texCompDXTSupported) LoadCompressedTexture((unsigned char *)data, width, height, mipmapCount, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT); break;
case COMPRESSED_DXT3_RGBA: if (texCompDXTSupported) LoadCompressedTexture((unsigned char *)data, width, height, mipmapCount, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT); break;

+ 5
- 1
src/textures.c 查看文件

@ -213,8 +213,12 @@ Image LoadImage(const char *fileName)
FILE *imFile = fopen(fileName, "rb");
stbi_set_flip_vertically_on_load(true);
// Load 32 bit per channel floats data
image.data = stbi_loadf_from_file(imFile, &image.width, &image.height, &imgBpp, 0);
stbi_set_flip_vertically_on_load(false);
fclose(imFile);
@ -381,7 +385,7 @@ Texture2D LoadTextureFromImage(Image image)
texture.mipmaps = image.mipmaps;
texture.format = image.format;
TraceLog(INFO, "[TEX %i] Parameters: %ix%i, %i mips, format %i", texture.id, texture.width, texture.height, texture.mipmaps, texture.format);
TraceLog(DEBUG, "[TEX ID %i] Parameters: %ix%i, %i mips, format %i", texture.id, texture.width, texture.height, texture.mipmaps, texture.format);
return texture;
}

+ 6
- 5
templates/web_shell/shell.html 查看文件

@ -14,18 +14,19 @@
<!-- Facebook metatags for sharing -->
<meta property="og:title" content="raylib HTML5 GAME">
<meta property="og:image:type" content="image/png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta property="og:url" content="http://www.raylib.com/games">
<meta property="og:site_name" content="raylib.com">
<meta property="og:description" content="New hmtl5 videogame, developed using raylib videogames library">
<!-- Twitter metatags for sharing -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@emegemegames">
<meta name="twitter:site" content="@raysan5">
<meta name="twitter:title" content="raylib HTML5 GAME">
<meta name="twitter:description" content="New HTML5 videogame, developed using raylib videogames library">
<meta name="twitter:image" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/img/raylib_logo.png">
<meta name="twitter:image" content="http://www.raylib.com/common/img/raylib_logo.png">
<meta name="twitter:url" content="http://www.raylib.com/common/img/raylib_logo.png">
<!--<link rel="stylesheet" href="./Koala Seasons by emegeme_files/main.css">-->
<link rel="shortcut icon" href="http://www.raylib.com/favicon.ico">

Loading…
取消
儲存