Skip to content

Commit 02ec1e0

Browse files
committed
Updated raylib example
1 parent 4624778 commit 02ec1e0

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

Diff for: src/c/translation/types/mod.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ impl TypeBaseBuilder {
5252
let ast_type = if let Some(concrete) = self.concrete {
5353
concrete
5454
} else if let Some(size) = self.size {
55-
Type::new(TypeKind::CInteger(size, self.sign), self.source)
55+
let sign = self
56+
.sign
57+
.or_else(|| (!size.is_char()).then_some(IntegerSign::Signed));
58+
59+
Type::new(TypeKind::CInteger(size, sign), self.source)
5660
} else if let Some(sign) = self.sign {
5761
Type::new(TypeKind::CInteger(CInteger::Int, Some(sign)), self.source)
5862
} else {

Diff for: tests/raylib/_.adept

+6-17
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11

22
pragma => {
33
adept(c"3.0")
4-
5-
#[windows] {
6-
link(c"libraylib.a")
7-
return
8-
}
9-
10-
#[macos] {
11-
link(c"libraylib.a")
12-
linkFramework(c"OpenGL")
13-
linkFramework(c"Cocoa")
14-
linkFramework(c"IOKit")
15-
linkFramework(c"Foundation")
16-
linkFramework(c"CoreFoundation")
17-
return
18-
}
19-
20-
panic("Unsupported platform")
4+
link(c"libraylib.a")
5+
linkFramework(c"OpenGL")
6+
linkFramework(c"Cocoa")
7+
linkFramework(c"IOKit")
8+
linkFramework(c"Foundation")
9+
linkFramework(c"CoreFoundation")
2110
}
2211

Diff for: tests/raylib/main.adept

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
func main {
3-
screen_width := 800
4-
screen_height := 450
3+
screen_width int = 800
4+
screen_height int = 450
55

66
InitWindow(screen_width, screen_height, c"Example Window!")
77

0 commit comments

Comments
 (0)