Added smooth pixel-perfect camera example + Small typo fix in examples_template.c (#1760)

* Typo fix

Changed "bsasic" to "basic" in the comments.

* Added pixel-perfect camera example

Added pixel-perfect camera example, both the .c file and the cover .png image. The example works with any resolution you want, as long as the ratio stays the same
(ex. 16:9, 4:3) ecc.

* Fixed Typecasts

Fixed compiler errors (implicit conversions)

* Precomputed rectangles, time-based movement and whitespace fix

Moved the source and destination rectangles for the renderTexture into their own variables, modified the animation to be time-based instead of frame-based, fixed the bug with whitespaces.

* Fixed spacing and added more consistency with sinf() and cosf()

* Fixed *= operator spacing
This commit is contained in:
Gianni Alessandroni 2021-05-10 20:16:12 +02:00 committed by GitHub
parent e39e45824d
commit 4ab28fffb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 138 additions and 2 deletions

View file

@ -1,7 +1,7 @@
/*
WELCOME raylib EXAMPLES CONTRIBUTOR!
This is a bsasic template to anyone ready to contribute with some code example for the library,
This is a basic template to anyone ready to contribute with some code example for the library,
here there are some guidelines on how to create an example to be included in raylib
1. File naming: <module>_<description> - Lower case filename, words separated by underscore,
@ -95,4 +95,4 @@ int main()
//--------------------------------------------------------------------------------------
return 0;
}
}