mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: various fixes for [heap]/auto-heap handling (#10033)
This commit is contained in:
@ -13,7 +13,7 @@ mut:
|
||||
}
|
||||
|
||||
fn my_audio_stream_callback(buffer &f32, num_frames int, num_channels int, mut acontext AppState) {
|
||||
mut soundbuffer := buffer
|
||||
mut soundbuffer := unsafe { buffer }
|
||||
for frame := 0; frame < num_frames; frame++ {
|
||||
t := int(f32(acontext.frame_0 + frame) * 0.245)
|
||||
// "Techno" by Gabriel Miceli
|
||||
|
@ -16,6 +16,7 @@ const (
|
||||
orange = ui.Color{255, 140, 0}
|
||||
)
|
||||
|
||||
[heap]
|
||||
struct App {
|
||||
mut:
|
||||
tui &ui.Context = 0
|
||||
@ -238,6 +239,7 @@ fn (mut b Ball) update(dt f32) {
|
||||
b.pos.y += b.vel.y * b.acc.y * dt
|
||||
}
|
||||
|
||||
[heap]
|
||||
struct Game {
|
||||
mut:
|
||||
app &App = 0
|
||||
|
@ -256,6 +256,7 @@ fn (mut r Rat) randomize() {
|
||||
r.app.height - block_size - buffer)
|
||||
}
|
||||
|
||||
[heap]
|
||||
struct App {
|
||||
mut:
|
||||
termui &termui.Context = 0
|
||||
|
Reference in New Issue
Block a user