Update C sources, add new functions and rename package to
This commit is contained in:
parent
391c25482d
commit
08aa518a46
156 changed files with 34542 additions and 19573 deletions
|
@ -10,29 +10,29 @@ func main() {
|
|||
screenWidth := int32(800)
|
||||
screenHeight := int32(450)
|
||||
|
||||
raylib.InitWindow(screenWidth, screenHeight, "raylib [text] example - text formatting")
|
||||
rl.InitWindow(screenWidth, screenHeight, "raylib [text] example - text formatting")
|
||||
|
||||
score := 100020
|
||||
hiscore := 200450
|
||||
lives := 5
|
||||
|
||||
raylib.SetTargetFPS(60)
|
||||
rl.SetTargetFPS(60)
|
||||
|
||||
for !raylib.WindowShouldClose() {
|
||||
raylib.BeginDrawing()
|
||||
for !rl.WindowShouldClose() {
|
||||
rl.BeginDrawing()
|
||||
|
||||
raylib.ClearBackground(raylib.RayWhite)
|
||||
rl.ClearBackground(rl.RayWhite)
|
||||
|
||||
raylib.DrawText(fmt.Sprintf("Score: %08d", score), 200, 80, 20, raylib.Red)
|
||||
rl.DrawText(fmt.Sprintf("Score: %08d", score), 200, 80, 20, rl.Red)
|
||||
|
||||
raylib.DrawText(fmt.Sprintf("HiScore: %08d", hiscore), 200, 120, 20, raylib.Green)
|
||||
rl.DrawText(fmt.Sprintf("HiScore: %08d", hiscore), 200, 120, 20, rl.Green)
|
||||
|
||||
raylib.DrawText(fmt.Sprintf("Lives: %02d", lives), 200, 160, 40, raylib.Blue)
|
||||
rl.DrawText(fmt.Sprintf("Lives: %02d", lives), 200, 160, 40, rl.Blue)
|
||||
|
||||
raylib.DrawText(fmt.Sprintf("Elapsed Time: %02.02f ms", raylib.GetFrameTime()*1000), 200, 220, 20, raylib.Black)
|
||||
rl.DrawText(fmt.Sprintf("Elapsed Time: %02.02f ms", rl.GetFrameTime()*1000), 200, 220, 20, rl.Black)
|
||||
|
||||
raylib.EndDrawing()
|
||||
rl.EndDrawing()
|
||||
}
|
||||
|
||||
raylib.CloseWindow()
|
||||
rl.CloseWindow()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue