Files
simian/scripts/as.predefined
nick 4a43160537
CI / build-and-test (push) Successful in 2m19s
feat: math and texture functions. update tests
2025-11-19 15:49:03 +13:00

71 lines
1.9 KiB
Plaintext

typedef void string;
string format(const string&in fmt, const ?&in ...);
// Logging functions
void Print(const string&in);
void Log(int level, const string&in);
int LOG_TRACE;
int LOG_DEBUG;
int LOG_INFO;
int LOG_WARNING;
int LOG_ERROR;
int LOG_FATAL;
// Toast notification functions
namespace Toast {
void Info(const string&in msg);
void Warning(const string&in);
void Error(const string&in);
void Success(const string&in);
}
// Drawing functions
namespace Draw {
void Pixel(int x, int y, int color);
void Line(int startX, int startY, int endX, int endY, int color);
void Circle(int centerX, int centerY, float radius, int color);
void Text(const string&in text, int x, int y, int fontSize, int color);
void Rectangle(int x, int y, int width, int height, int color);
void FPS(int x, int y);
}
namespace Texture {
class Image {
int width;
int height;
int mipmaps;
int format;
};
Image@ LoadImage(const string&in path);
void Unload(const Image@&in image);
class Texture2D {
int id;
int width;
int height;
int mipmaps;
int format;
};
Texture2D@ LoadTexture(const string&in path);
Texture2D@ LoadFromImage(const Image@&in image);
void Draw(const Texture2D@&in texture, int x, int y, int color);
void Unload(const Texture2D@&in texture);
}
namespace Math {
float Sin(float angle);
float Cos(float angle);
float Tan(float angle);
float ASin(float value);
float ACos(float value);
float ATan(float value);
float ATan2(float y, float x);
float Sqrt(float value);
float Pow(float base, float exponent);
float Log(float value);
float Log10(float value);
float Exp(float exponent);
float Floor(float value);
float Ceil(float value);
float Modf(float x, float y);
float Abs(float value);
}