paint: cleanup

This commit is contained in:
luboslenco
2026-03-09 13:17:15 +01:00
parent cdf85fbe77
commit e554a2376c
201 changed files with 843 additions and 451 deletions
-116
View File
@@ -1,116 +0,0 @@
#pragma once
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#include "iron_armpack.h"
#include "iron_array.h"
#include "iron_gc.h"
#include "iron_json.h"
#include "iron_map.h"
#include "iron_string.h"
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#define f64 double
#define i64 int64_t
#define u64 uint64_t
#define f32 float
#define i32 int32_t
#define u32 uint32_t
#define i16 int16_t
#define u16 uint16_t
#define i8 int8_t
#define u8 uint8_t
#define any void *
void _kickstart();
void kickstart() {
int bos;
gc_start(&bos);
_kickstart();
}
f32 math_floor(f32 x) {
return floorf(x);
}
f32 math_cos(f32 x) {
return cosf(x);
}
f32 math_sin(f32 x) {
return sinf(x);
}
f32 math_tan(f32 x) {
return tanf(x);
}
f32 math_sqrt(f32 x) {
return sqrtf(x);
}
f32 math_abs(f32 x) {
return fabsf(x);
}
f32 math_random() {
return rand() / (float)RAND_MAX;
}
f32 math_atan2(f32 y, f32 x) {
return atan2f(y, x);
}
f32 math_asin(f32 x) {
return asinf(x);
}
f32 math_pi() {
return 3.14159265358979323846;
}
f32 math_pow(f32 x, f32 y) {
return powf(x, y);
}
f32 math_round(f32 x) {
return roundf(x);
}
f32 math_ceil(f32 x) {
return ceilf(x);
}
f32 math_min(f32 x, f32 y) {
return x < y ? x : y;
}
f32 math_max(f32 x, f32 y) {
return x > y ? x : y;
}
f32 math_log(f32 x) {
return logf(x);
}
f32 math_log2(f32 x) {
return log2f(x);
}
f32 math_atan(f32 x) {
return atanf(x);
}
f32 math_acos(f32 x) {
return acosf(x);
}
f32 math_exp(f32 x) {
return expf(x);
}
f32 math_fmod(f32 x, f32 y) {
return fmod(x, y);
}
#ifdef _WIN32
i32 parse_int(const char *s) {
return _strtoi64(s, NULL, 10);
}
i32 parse_int_hex(const char *s) {
return _strtoi64(s, NULL, 16);
}
#else
i32 parse_int(const char *s) {
return strtol(s, NULL, 10);
}
i32 parse_int_hex(const char *s) {
return strtol(s, NULL, 16);
}
#endif
f32 parse_float(const char *s) {
return strtof(s, NULL);
}
-6
View File
@@ -7,8 +7,6 @@ project.add_cfiles("../../sources/iron_string.c");
project.add_cfiles("../../sources/iron_array.c");
project.add_cfiles("../../sources/iron_gc.c");
project.add_define("NO_GC");
project.add_define("NO_GC_USE_HEAP");
project.add_define("NO_IRON_API");
project.add_include_dir("../../sources/libs");
project.add_cfiles("../../sources/libs/quickjs-amalgam.c");
@@ -21,14 +19,10 @@ project.add_cfiles("ashader.c");
project.add_cfiles('../../sources/libs/kong/libs/*.c');
project.add_cfiles('../../sources/libs/kong/*.c');
project.add_cfiles('../../sources/libs/kong/backends/*.c');
// project.add_cfiles('../../sources/libs/kong/backends/*.cpp'); // d3d12.cpp
if (platform === "windows") {
project.add_define('_CRT_SECURE_NO_WARNINGS');
project.add_lib('d3dcompiler');
// project.add_include_dir('../../sources/libs/kong/libs/dxc/inc');
// project.add_lib('../../sources/libs/kong/libs/dxc/lib/x64/dxcompiler');
// hlslbin
project.add_lib("dxguid");
}
else if (platform === "macos") {