Skip to content

Commit 48c0d1b

Browse files
committed
feat: blend mode and align constants
1 parent a9d4f3a commit 48c0d1b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Last tested against DragonRuby Game Toolkit v3.24.
1818
- `#init` method that gets run once on game boot
1919
- `CHEATSHEET.md` with common APIs from DRGTK and Scale
2020
- `#version` to get the version of your game
21+
- Constants for various values and enums: `FPS`, `BLEND_*`, `ALIGN_*`
2122

2223
## Use It
2324

app/main.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
FPS = 60
12
TRUE_BLACK = { r: 0, g: 0, b: 0 }
23
WHITE = { r: 255, g: 255, b: 255 }
4+
ALIGN_LEFT = 0
5+
ALIGN_CENTER = 1
6+
ALIGN_RIGHT = 2
7+
BLEND_NONE = 0
8+
BLEND_ALPHA = 1
9+
BLEND_ADDITIVE = 2
10+
BLEND_MODULO = 3
11+
BLEND_MULTIPLY = 4
312

413
# Access in code with `SPATHS[:my_sprite]`
514
# Replace with your sprites!

0 commit comments

Comments
 (0)