2022-08-01 23:11:07 +02:00
|
|
|
#pragma once
|
2022-08-01 23:55:56 +02:00
|
|
|
#include <stdbool.h>
|
2022-08-01 23:11:07 +02:00
|
|
|
|
|
|
|
SDL_Surface * LoadImage ( char * FilePath );
|
|
|
|
void DrawSurf ( int x, int y, SDL_Surface * Src, SDL_Rect * Clip, SDL_Surface * Dst );
|
2022-08-04 22:24:42 +02:00
|
|
|
void FillSurfRGB ( int R, int G, int B, SDL_Surface * Dst );
|
2022-08-05 00:06:41 +02:00
|
|
|
void DrawOutlineRect ( int x, int y, int w, int h, int Size, int R, int G, int B, SDL_Surface * Dst );
|
2022-08-01 23:11:07 +02:00
|
|
|
SDL_Surface * ScreenSet ( int Width, int Height, int Bits, SDL_Surface * Screen );
|
2022-08-01 23:55:56 +02:00
|
|
|
bool FlipScreen( SDL_Surface * Screen );
|
2022-08-01 23:11:07 +02:00
|
|
|
|
|
|
|
struct xyz {
|
|
|
|
int x, y, z;
|
2022-08-02 12:51:59 +02:00
|
|
|
};
|
2022-08-01 23:11:07 +02:00
|
|
|
|
2022-08-03 15:51:56 +02:00
|
|
|
// <https://gist.github.com/jordwest/8a12196436ebcf8df98a2745251915b5>
|
2022-08-02 12:51:59 +02:00
|
|
|
struct xyz OrthoToIso ( int x, int y, int z, int Multiply ) {
|
2022-08-01 23:11:07 +02:00
|
|
|
struct xyz xyz;
|
|
|
|
xyz.x = x * 1 * 0.5 * Multiply + z * -1 * 0.5 * Multiply;
|
|
|
|
xyz.z = x * 0.5 * 0.5 * Multiply + z * 0.5 * 0.5 * Multiply;
|
2022-08-02 12:51:59 +02:00
|
|
|
xyz.y = xyz.z;
|
2022-08-01 23:11:07 +02:00
|
|
|
return xyz;
|
|
|
|
}
|
|
|
|
|