This commit is contained in:
luboslenco
2025-10-15 18:39:55 +02:00
parent 231fda884a
commit 5405d47fcf
242 changed files with 14647 additions and 15144 deletions
+4 -4
View File
@@ -3,7 +3,7 @@ let resource_bundled: map_t<string, gpu_texture_t> = map_create();
function resource_load(names: string[]) {
for (let i: i32 = 0; i < names.length; ++i) {
let s: string = names[i];
let s: string = names[i];
let image: gpu_texture_t = data_get_image(s);
map_set(resource_bundled, s, image);
}
@@ -15,19 +15,19 @@ function resource_get(name: string): gpu_texture_t {
function resource_tile50(img: gpu_texture_t, x: i32, y: i32): rect_t {
let size: i32 = config_raw.window_scale > 1 ? 100 : 50;
let r: rect_t = { x: x * size, y: y * size, w: size, h: size };
let r: rect_t = {x : x * size, y : y * size, w : size, h : size};
return r;
}
function resource_tile25(img: gpu_texture_t, x: i32, y: i32): rect_t {
let size: i32 = config_raw.window_scale > 1 ? 50 : 25;
let r: rect_t = { x: x * size, y: y * size, w: size, h: size };
let r: rect_t = {x : x * size, y : y * size, w : size, h : size};
return r;
}
function resource_tile18(img: gpu_texture_t, x: i32, y: i32): rect_t {
let size: i32 = config_raw.window_scale > 1 ? 36 : 18;
let r: rect_t = { x: x * size, y: img.height - (y + 1) * size, w: size, h: size };
let r: rect_t = {x : x * size, y : img.height - (y + 1) * size, w : size, h : size};
return r;
}