Skip to content

Commit

Permalink
add font size to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
ov7a committed Jun 29, 2024
1 parent 39ccdfb commit f6ca867
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions cli/assets/templates/assemblyscript/src/wasm4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// └───────────────────────────────────────────────────────────────────────────┘

export const SCREEN_SIZE: u32 = 160;
export const FONT_SIZE: u32 = 8;

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions cli/assets/templates/c/src/wasm4.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ WASM_EXPORT("update") void update ();
// └───────────────────────────────────────────────────────────────────────────┘

#define SCREEN_SIZE 160
#define FONT_SIZE 8

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions cli/assets/templates/c3/cart/src/wasm4.c3
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module w4;
// └───────────────────────────────────────────────────────────────────────────┘

const SCREEN_SIZE = 160;
const FONT_SIZE = 8;

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions cli/assets/templates/d/source/wasm4.d
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ extern(C):
// └───────────────────────────────────────────────────────────────────────────┘

enum screenSize = 160;
enum fontSize = 8;

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions cli/assets/templates/go/w4/wasm4.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "unsafe"
// └───────────────────────────────────────────────────────────────────────────┘

const SCREEN_SIZE int = 160
const FONT_SIZE int = 8

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
6 changes: 6 additions & 0 deletions cli/assets/templates/grain/bindings/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Functions and constants included in the Wasm4 module.
_SCREEN_SIZE : Uint8
```

### Wasm4.**_FONT_SIZE**

```grain
_FONT_SIZE : Uint8
```

### Wasm4.**_BUTTON_1**

```grain
Expand Down
1 change: 1 addition & 0 deletions cli/assets/templates/grain/bindings/wasm4.gr
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use DataStructures.{ newInt32, tagUint8, untagUint8, tagUint16, untagUint16 }
// └───────────────────────────────────────────────────────────────────────────┘

provide let _SCREEN_SIZE = 160us
provide let _FONT_SIZE = 8us

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions cli/assets/templates/nelua/src/wasm4.nelua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ context.rootpragmas.usenanoprintf = true
-- └───────────────────────────────────────────────────────────────────────────┘

global SCREEN_SIZE <comptime> = 160
global FONT_SIZE <comptime> = 8

-- ┌───────────────────────────────────────────────────────────────────────────┐
-- │ │
Expand Down
1 change: 1 addition & 0 deletions cli/assets/templates/nim/src/cart/wasm4.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const
SCREEN_SIZE* = 160
FONT_SIZE* = 8

const
PALETTE* = (cast[ptr array[4, uint32]](0x04))
Expand Down
1 change: 1 addition & 0 deletions cli/assets/templates/odin/src/w4/wasm4_wasm32.odin
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ foreign import wasm4 "env"
// └───────────────────────────────────────────────────────────────────────────┘

SCREEN_SIZE :: 160
FONT_SIZE :: 8

PALETTE := (^Palette)(uintptr(0x04))
DRAW_COLORS := (^u16)(uintptr(0x14))
Expand Down
1 change: 1 addition & 0 deletions cli/assets/templates/penne/src/wasm4.pn
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// └───────────────────────────────────────────────────────────────────────────┘

pub const SCREEN_SIZE: u32 = 160;
pub const FONT_SIZE: u32 = 8;

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions cli/assets/templates/rust/src/wasm4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// └───────────────────────────────────────────────────────────────────────────┘

pub const SCREEN_SIZE: u32 = 160;
pub const FONT_SIZE: u32 = 8;

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions cli/assets/templates/zig/src/wasm4.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// └───────────────────────────────────────────────────────────────────────────┘

pub const SCREEN_SIZE: u32 = 160;
pub const FONT_SIZE: u32 = 8;

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions examples/multiplayer/src/wasm4.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ WASM_EXPORT("update") void update ();
// └───────────────────────────────────────────────────────────────────────────┘

#define SCREEN_SIZE 160
#define FONT_SIZE 8

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions examples/platformer-test/src/wasm4.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ WASM_EXPORT("update") void update ();
// └───────────────────────────────────────────────────────────────────────────┘

#define SCREEN_SIZE 160
#define FONT_SIZE 8

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions examples/pong/src/wasm4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// └───────────────────────────────────────────────────────────────────────────┘

pub const SCREEN_SIZE: u32 = 160;
pub const FONT_SIZE: u32 = 8;

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions examples/snake/src/wasm4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// └───────────────────────────────────────────────────────────────────────────┘

export const SCREEN_SIZE: u32 = 160;
export const FONT_SIZE: u32 = 8;

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions examples/sound-demo/src/wasm4.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ WASM_EXPORT("update") void update ();
// └───────────────────────────────────────────────────────────────────────────┘

#define SCREEN_SIZE 160
#define FONT_SIZE 8

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down
1 change: 1 addition & 0 deletions examples/watris/src/wasm4.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ WASM_EXPORT("update") void update ();
// └───────────────────────────────────────────────────────────────────────────┘

#define SCREEN_SIZE 160
#define FONT_SIZE 8

// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
Expand Down

0 comments on commit f6ca867

Please sign in to comment.