Skip to content

Commit

Permalink
Merge pull request #191 from boozook/rem-old-prebuilt
Browse files Browse the repository at this point in the history
Remove old pre-built bindings and `sdk_2_1` feature
  • Loading branch information
boozook authored Jan 17, 2024
2 parents 2f0f07d + 8b91b50 commit 55c6415
Show file tree
Hide file tree
Showing 24 changed files with 17 additions and 108,509 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This project allows you to create games for the [Playdate handheld gaming system
- with [examples][ctrl-examples-dir]
* __All the parts of API are accumulated in [One Crate][playdate-crate]__ ([git][playdate-crate-git])
* UI components
- [crank-indicator][crank-indicator-gh] (port from [lua version][crank-indicator-lua]), requires SDK 2.1
- [crank-indicator][crank-indicator-gh] (port from [lua version][crank-indicator-lua])

Welcome to [discussions][] and [issues][] for any questions and suggestions.
Take a look at [videos](#demo) or [do something great](#usage).
Expand All @@ -33,9 +33,9 @@ Follow the instructions for:

## Compatibility

* __Minimal__ supported versions of Playdate SDK is `2.0.0` but with earlier versions all should work probably.
* __Minimal__ supported versions of Playdate SDK is `2.1.0` but with earlier versions all should work probably.

* __Latest__ version of SDK is `2.0.3`, all tested and works correctly.
* __Latest__ version of SDK is `2.2.0`, all tested and works correctly.



Expand Down
4 changes: 1 addition & 3 deletions api/gfx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "playdate-graphics"
version = "0.3.12"
version = "0.3.13"
readme = "README.md"
description = "High-level graphics API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
Expand All @@ -15,7 +15,6 @@ repository.workspace = true
[features]
default = ["sys/default", "color/default", "fs/default"]

sdk_2_1 = []

# playdate-sys features, should be shared because it's build configuration:

Expand Down Expand Up @@ -60,7 +59,6 @@ features = [
"sys/bindings-derive-ord",
"sys/bindings-derive-partialeq",
"sys/bindings-derive-partialord",
"sdk_2_1"
]
rustdoc-args = ["--cfg", "docsrs", "--show-type-layout"]
default-target = "thumbv7em-none-eabihf"
Expand Down
1 change: 0 additions & 1 deletion api/gfx/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ impl crate::text::api::Api for Cache {
/// Equivalent to [`sys::ffi::playdate_graphics::getTextTracking`]
#[doc(alias = "sys::ffi::playdate_graphics::getTextTracking")]
#[inline(always)]
#[cfg(feature = "sdk_2_1")]
fn get_text_tracking(&self) -> unsafe extern "C" fn() -> c_int {
self.0.getTextTracking.expect("getTextTracking")
}
Expand Down
3 changes: 0 additions & 3 deletions api/gfx/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ pub fn set_text_tracking(tracking: c_int) { Graphics::Default().set_text_trackin
/// Equivalent to [`sys::ffi::playdate_graphics::getTextTracking`].
#[doc(alias = "sys::ffi::playdate_graphics::getTextTracking")]
#[inline(always)]
#[cfg(feature = "sdk_2_1")]
pub fn get_text_tracking() -> c_int { Graphics::Default().get_text_tracking() }


Expand Down Expand Up @@ -477,7 +476,6 @@ impl<Api: crate::api::Api> Graphics<Api> {
///
/// Equivalent to [`sys::ffi::playdate_graphics::getTextTracking`].
#[doc(alias = "sys::ffi::playdate_graphics::getTextTracking")]
#[cfg(feature = "sdk_2_1")]
pub fn get_text_tracking(&self) -> c_int {
let f = self.0.get_text_tracking();
unsafe { f() }
Expand Down Expand Up @@ -599,7 +597,6 @@ pub mod api {
/// Equivalent to [`sys::ffi::playdate_graphics::getTextTracking`]
#[doc(alias = "sys::ffi::playdate_graphics::getTextTracking")]
#[inline(always)]
#[cfg(feature = "sdk_2_1")]
fn get_text_tracking(&self) -> unsafe extern "C" fn() -> c_int { *sys::api!(graphics.getTextTracking) }

/// Equivalent to [`sys::ffi::playdate_graphics::getGlyphKerning`]
Expand Down
7 changes: 1 addition & 6 deletions api/playdate/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "playdate"
version = "0.1.14"
version = "0.1.15"
readme = "README.md"
description = "High-level Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
Expand Down Expand Up @@ -39,12 +39,8 @@ default = [
"sprite/default",
"system/default",
"entry-point",
"sdk_2_1"
]

# SDK v2.1 compatibility
sdk_2_1 = ["gfx/sdk_2_1", "sprite/sdk_2_1"]

lang-items = ["sys/lang-items"]
allocator = ["sys/allocator"]
panic-handler = ["sys/panic-handler"]
Expand Down Expand Up @@ -133,7 +129,6 @@ features = [
"sys/bindings-derive-ord",
"sys/bindings-derive-partialeq",
"sys/bindings-derive-partialord",
# "sdk_2_1"
]
rustdoc-args = ["--cfg", "docsrs", "--show-type-layout"]
default-target = "thumbv7em-none-eabihf"
Expand Down
6 changes: 2 additions & 4 deletions api/sprite/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "playdate-sprite"
version = "0.2.8"
version = "0.2.9"
readme = "README.md"
description = "High-level sprite API built on-top of Playdate API"
keywords = ["playdate", "sdk", "api", "gamedev"]
Expand All @@ -19,9 +19,8 @@ repository.workspace = true


[features]
default = ["sys/default", "gfx/default", "sdk_2_1"]
default = ["sys/default", "gfx/default"]

sdk_2_1 = ["gfx/sdk_2_1"]

# playdate-sys features, should be shared because it's build configuration:

Expand Down Expand Up @@ -69,7 +68,6 @@ features = [
"sys/bindings-derive-ord",
"sys/bindings-derive-partialeq",
"sys/bindings-derive-partialord",
# "sdk_2_1"
]
rustdoc-args = ["--cfg", "docsrs", "--show-type-layout"]
default-target = "thumbv7em-none-eabihf"
Expand Down
2 changes: 0 additions & 2 deletions api/sprite/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,15 +512,13 @@ pub trait Api {
/// Returns [`sys::ffi::playdate_sprite::setCenter`].
#[doc(alias = "sys::ffi::playdate_sprite::setCenter")]
#[inline(always)]
#[cfg(feature = "sdk_2_1")]
fn set_center(&self) -> unsafe extern "C" fn(s: *mut LCDSprite, x: c_float, y: c_float) {
*sys::api!(sprite.setCenter)
}

/// Returns [`sys::ffi::playdate_sprite::getCenter`].
#[doc(alias = "sys::ffi::playdate_sprite::getCenter")]
#[inline(always)]
#[cfg(feature = "sdk_2_1")]
fn get_center(&self) -> unsafe extern "C" fn(s: *mut LCDSprite, x: *mut c_float, y: *mut c_float) {
*sys::api!(sprite.getCenter)
}
Expand Down
2 changes: 0 additions & 2 deletions api/sprite/src/sprite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,6 @@ impl<Userdata, Api: api::Api, const FOD: bool> Sprite<Userdata, Api, FOD> {
/// Equivalent to [`sys::ffi::playdate_sprite::setCenter`].
#[doc(alias = "sys::ffi::playdate_sprite::setCenter")]
#[inline(always)]
#[cfg(feature = "sdk_2_1")]
pub fn set_center(&self, x: c_float, y: c_float) {
let f = self.1.set_center();
unsafe { f(self.0, x, y) }
Expand All @@ -642,7 +641,6 @@ impl<Userdata, Api: api::Api, const FOD: bool> Sprite<Userdata, Api, FOD> {
/// Equivalent to [`sys::ffi::playdate_sprite::getCenter`].
#[doc(alias = "sys::ffi::playdate_sprite::getCenter")]
#[inline(always)]
#[cfg(feature = "sdk_2_1")]
pub fn center(&self) -> (c_float, c_float) {
let (mut x, mut y) = (0.0, 0.0);
let f = self.1.get_center();
Expand Down
2 changes: 1 addition & 1 deletion api/sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "playdate-sys"
version = "0.2.12"
version = "0.2.13"
build = "src/build.rs"
readme = "README.md"
description = "Low-level Playdate API bindings"
Expand Down
Loading

0 comments on commit 55c6415

Please sign in to comment.