-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
498 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[package] | ||
name = "playdate-system" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
readme = "README.md" | ||
license = "MIT OR Apache-2.0" | ||
authors = ["Alex Koz <[email protected]>"] | ||
description = "High-level System API built on-top of Playdate API" | ||
homepage = "https://github.com/boozook/playdate" | ||
repository = "https://github.com/boozook/playdate.git" | ||
|
||
|
||
[features] | ||
default = ["sys/default"] | ||
# sys- features: | ||
lang-items = ["sys/lang-items"] | ||
allocator = ["sys/allocator"] | ||
panic-handler = ["sys/panic-handler"] | ||
eh-personality = ["sys/eh-personality"] | ||
error-ctx = ["sys/error-ctx"] | ||
bindgen-runtime = ["sys/bindgen-runtime"] | ||
bindgen-static = ["sys/bindgen-static"] | ||
bindings-derive-default = ["sys/bindings-derive-default"] | ||
bindings-derive-eq = ["sys/bindings-derive-eq"] | ||
bindings-derive-copy = ["sys/bindings-derive-copy"] | ||
bindings-derive-debug = ["sys/bindings-derive-debug"] | ||
bindings-derive-hash = ["sys/bindings-derive-hash"] | ||
bindings-derive-ord = ["sys/bindings-derive-ord"] | ||
bindings-derive-partialeq = ["sys/bindings-derive-partialeq"] | ||
bindings-derive-partialord = ["sys/bindings-derive-partialord"] | ||
bindings-derive-constparamty = ["sys/bindings-derive-constparamty"] | ||
bindings-documentation = ["sys/bindings-documentation"] | ||
|
||
|
||
[dependencies.sys] | ||
version = "0.1" | ||
path = "../sys" | ||
package = "playdate-sys" | ||
default-features = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# System API for PlayDate | ||
|
||
High-level system API built on-top of [playdate-sys][]. | ||
|
||
|
||
## Usage | ||
|
||
```rust | ||
use playdate_system::*; | ||
use playdate_sys::println; | ||
|
||
let system = System::new(); | ||
|
||
match system.language() { | ||
PDLanguage::English => println!("Hello"), | ||
PDLanguage::Japanese => println!("こんにちは"), | ||
PDLanguage::Unknown => println!("Привет"), | ||
} | ||
system.draw_fps(20, 20); | ||
``` | ||
|
||
|
||
[playdate-sys]: https://crates.io/crates/playdate-sys | ||
|
||
|
||
|
||
- - - | ||
|
||
This software is not sponsored or supported by Panic. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
pub use sys::ffi::PDLanguage; | ||
|
||
pub trait PDLanguageExt { | ||
#![allow(non_upper_case_globals)] | ||
const English: PDLanguage = PDLanguage::kPDLanguageEnglish; | ||
const Japanese: PDLanguage = PDLanguage::kPDLanguageJapanese; | ||
const Unknown: PDLanguage = PDLanguage::kPDLanguageUnknown; | ||
} | ||
|
||
|
||
impl PDLanguageExt for PDLanguage {} |
Oops, something went wrong.