Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Smooth Pixel-perfect camera example #200

Open
wants to merge 352 commits into
base: showcase-all
Choose a base branch
from

Conversation

LeviLovie
Copy link

No description provided.

ShivanshuKantPrasad and others added 27 commits April 11, 2024 10:11
* Fix examples not being detected

I am unsure what the `target.cfg` does but it made so that running
`cargo run --example <example_name>` gave `no example target
<example_name>` error. Removing it allows cargo to detect and run
examples.

* Add missing specs.rs and roguelike.rs files

* Disable broken examples to make unit tests pass

* Port floppy example to rust

* Fix specs.rs

Specs adds three new dependencies to the project.

* Fix asteroids.rs

* Fix drop.rs

- Use newer api to load sound
- When a window is closed the OpenGL context is destroyed, it is not
  possible to unload a shader after the OpenGL context is destroyed.
  Hence test_shader_dropping function doesn't work and is removed.

* Fix arkanoid.rs

* Use d.measure_text insted of rl.measure_text

* Fix roguelike.rs

* Fix yaw_pitch_roll.rs

For some reason plane.obj file was corrupt. I replaced it with the
one used in the main raylib repo.

* make roguelike.rs require "with_serde" feature

* Install sdl in github ci workflow

* Make it pass lint test
* build, callbacks: fix/clarify wasm building

* build: wasm building requires -O3 to be set in EMCC_CFLAGS, apperently. see emscripten-core/emscripten#19346

* bindings: moved functions for handling log callbacks over to c code

* bindings: use our own raylib.h in the c code

* audio: rename the 'ready' functions to match their function names

* test: updated test to match AsRef PR

* audio: brought back PhantomData for RaylibAudio so that the struct is and !Send and !Sync

* audio: AsRef for more functions

* raylib/cargo, raylib-sys/cargo: realized i had left in some unused imports

* callbacks: make custom_trace_log_callback public as a stab in the dark to see if that fixes the windows issue

* callbacks,tests: realized that since rust marks our external function as having 'char *' as the first argument on windows-gnu

* callbacks: realized the c code wasn't wrapped in extern 'c' when compiling in c++

* callbacks: have windows compile a cpp file instead of a c file for utils_log

* fixed the windows link error but now it complains about the char fix i did

* log: vsprintf -> vsnprintf

* log: use the result of vsnprintf instead of strlen

* build: removed some flags i forgot i added.

* log: actually, just use from_ptr, because what raylib gives us is always going to end in \0

* tests: disable callbacks test under windows after confirming that the issue literally only happens when we use cargo test

* tests: disable callbacks test under windows after confirming that the issue literally only happens when we use cargo test

* ci: remove windows test after confirming it only fails under CI. ran cargo clippy --fix
* Add floppy sample (deltaphc#38)

* Fixed camera2D.rs example (deltaphc#44)

---------

Co-authored-by: Shivanshu Kant Prasad <[email protected]>
Co-authored-by: odka <[email protected]>
* Add floppy sample (deltaphc#38)

* Fixed camera2D.rs example (deltaphc#44)

---------

Co-authored-by: Shivanshu Kant Prasad <[email protected]>
Co-authored-by: odka <[email protected]>
…et and core now works fully on web rgui/physac/rlgl untested on web.
@LeviLovie
Copy link
Author

@deltaphc I'm sorry to disturb, but I'm having problem testing if my example works here, when i try cargo run in the showcase dir it crahes:

cargo run
error: current package believes it's in a workspace when it's not:
current:   /Users/levi/Dev/UnsafeSoftware/raylib-rs/showcase/Cargo.toml
workspace: /Users/levi/Dev/UnsafeSoftware/raylib-rs/Cargo.toml

this may be fixable by adding `showcase` to the `workspace.members` array of the manifest located at: /Users/levi/Dev/UnsafeSoftware/raylib-rs/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.

@LeviLovie
Copy link
Author

Also, I'm sorry if i did something wrong, I'm new to contributing

@IoIxD
Copy link
Contributor

IoIxD commented Dec 4, 2024

If you're still interested in merging this, development now happens over at raylib-rs/raylib-rs.

Also you would need to merge this into the main branch, not showcase-all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.