mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: fix typos (#21089)
This commit is contained in:
parent
9ad84ddc21
commit
f77bb32044
193 changed files with 403 additions and 402 deletions
|
@ -712,7 +712,7 @@ fn (mut app App) handle_tap() {
|
|||
} else if avgy < (m * 9 / 10) + ypad {
|
||||
app.new_game()
|
||||
} else {
|
||||
// TODO remove and implement an actual way to toggle themes on mobile
|
||||
// TODO: remove and implement an actual way to toggle themes on mobile
|
||||
}
|
||||
}
|
||||
} else if app.state == .over {
|
||||
|
|
|
@ -59,7 +59,7 @@ pub fn load_texture(file_name string) (gfx.Image, gfx.Sampler) {
|
|||
buffer := read_bytes_from_file(file_name)
|
||||
stbi.set_flip_vertically_on_load(true)
|
||||
img := stbi.load_from_memory(buffer.data, buffer.len) or {
|
||||
eprintln('Texure file: [${file_name}] ERROR!')
|
||||
eprintln('Texture file: [${file_name}] ERROR!')
|
||||
exit(0)
|
||||
}
|
||||
sg_img, sg_smp := create_texture(int(img.width), int(img.height), img.data)
|
||||
|
|
|
@ -30,13 +30,13 @@ pub fn read_bytes_from_file(file_path string) []u8 {
|
|||
$if android {
|
||||
path = 'models/' + file_path
|
||||
buffer = os.read_apk_asset(path) or {
|
||||
eprintln('Texure file: [${path}] NOT FOUND!')
|
||||
eprintln('Texture file: [${path}] NOT FOUND!')
|
||||
exit(0)
|
||||
}
|
||||
} $else {
|
||||
path = os.resource_abs_path('assets/models/' + file_path)
|
||||
buffer = os.read_bytes(path) or {
|
||||
eprintln('Texure file: [${path}] NOT FOUND!')
|
||||
eprintln('Texture file: [${path}] NOT FOUND!')
|
||||
exit(0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ fn (mut a App) event(e &ui.Event) {
|
|||
if a.mode != .game {
|
||||
return
|
||||
}
|
||||
// TODO mouse movement for real Pong sharks
|
||||
// TODO: mouse movement for real Pong sharks
|
||||
// a.game.move_player(player_one, 0, -1)
|
||||
}
|
||||
.key_down {
|
||||
|
@ -344,7 +344,7 @@ fn (mut g Game) quit() {
|
|||
}
|
||||
|
||||
fn (mut g Game) draw_big_digit(px f32, py f32, digit int) {
|
||||
// TODO use draw_line or draw_point to fix tearing with non-monospaced terminal fonts
|
||||
// TODO: use draw_line or draw_point to fix tearing with non-monospaced terminal fonts
|
||||
mut gfx := g.app.tui
|
||||
x, y := int(px), int(py)
|
||||
match digit {
|
||||
|
@ -457,7 +457,7 @@ fn (mut g Game) free() {
|
|||
g.players.clear()
|
||||
}
|
||||
|
||||
// TODO Remove these wrapper functions when we can assign methods as callbacks
|
||||
// TODO: Remove these wrapper functions when we can assign methods as callbacks
|
||||
fn init(mut app App) {
|
||||
app.init()
|
||||
}
|
||||
|
|
|
@ -320,7 +320,7 @@ fn (mut g Game) get_tetro() {
|
|||
// g.tetro = g.tetros_cache[idx..idx + tetro_size].clone()
|
||||
}
|
||||
|
||||
// TODO mut
|
||||
// TODO: mut
|
||||
fn (mut g Game) drop_tetro() {
|
||||
for i in 0 .. tetro_size {
|
||||
tetro := g.tetro[i]
|
||||
|
|
|
@ -221,7 +221,7 @@ fn (mut app App) read_bytes(path string) bool {
|
|||
pub fn read_bytes_from_file(file_path string) []u8 {
|
||||
mut buffer := []u8{}
|
||||
buffer = os.read_bytes(file_path) or {
|
||||
eprintln('ERROR: Texure file: [${file_path}] NOT FOUND.')
|
||||
eprintln('ERROR: Texture file: [${file_path}] NOT FOUND.')
|
||||
exit(0)
|
||||
}
|
||||
return buffer
|
||||
|
|
|
@ -69,7 +69,7 @@ pub fn (app &App) create_todo(mut ctx Context, name string) vweb.Result {
|
|||
// insert the todo into our database
|
||||
sql app.db {
|
||||
insert todo into Todo
|
||||
} or { return ctx.server_error('could not insert a new TODO in the datbase') }
|
||||
} or { return ctx.server_error('could not insert a new TODO in the database') }
|
||||
|
||||
ctx.created_todo = true
|
||||
|
||||
|
@ -127,7 +127,7 @@ pub fn (app &App) delete_todo(mut ctx Context, id int) vweb.Result {
|
|||
|
||||
fn main() {
|
||||
os.chdir(os.dir(@FILE))!
|
||||
// create a new App instance with a connection to the datbase
|
||||
// create a new App instance with a connection to the database
|
||||
mut app := &App{
|
||||
db: sqlite.connect('todo.db')!
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue