mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: byte => u8
This commit is contained in:
parent
b49d873217
commit
d4a0d6f73c
221 changed files with 1365 additions and 1365 deletions
|
@ -25,7 +25,7 @@ fn on_frame(mut app App) {
|
|||
for mut frame in app.frames {
|
||||
for mut rocket in frame {
|
||||
if !rocket.exploded {
|
||||
rocket.color.a = byte(f32_max(rocket.color.a - 8, 0))
|
||||
rocket.color.a = u8(f32_max(rocket.color.a - 8, 0))
|
||||
rocket.draw(mut app.gg)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ import rand
|
|||
|
||||
pub fn random_color() gx.Color {
|
||||
return gx.Color{
|
||||
r: rand.byte()
|
||||
g: rand.byte()
|
||||
b: rand.byte()
|
||||
r: rand.u8()
|
||||
g: rand.u8()
|
||||
b: rand.u8()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ pub fn (particle Particle) draw(mut ctx gg.Context) {
|
|||
|
||||
pub fn (mut particle Particle) tick(mut rocket Rocket, mut ctx gg.Context) {
|
||||
particle.lifespan -= get_params().age_rate
|
||||
particle.color.a = byte(particle.lifespan)
|
||||
particle.color.a = u8(particle.lifespan)
|
||||
|
||||
if particle.lifespan <= 0 {
|
||||
rocket.dead = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue