parent
6c6fa6cc8e
commit
a60099a587
|
@ -849,7 +849,7 @@ static void setSideTexPixel(s32 x, s32 y, float u, float v)
|
|||
}
|
||||
}
|
||||
|
||||
static void api_circle(tic_mem* memory, s32 xm, s32 ym, u32 radius, u8 color)
|
||||
static void api_circle(tic_mem* memory, s32 xm, s32 ym, s32 radius, u8 color)
|
||||
{
|
||||
tic_machine* machine = (tic_machine*)memory;
|
||||
|
||||
|
@ -869,8 +869,8 @@ static void api_circle(tic_mem* memory, s32 xm, s32 ym, u32 radius, u8 color)
|
|||
if (r > x || err > y) err += ++x*2+1;
|
||||
} while (x < 0);
|
||||
|
||||
s32 yt = max(machine->state.clip.t, ym-(s32)radius);
|
||||
s32 yb = min(machine->state.clip.b, ym+(s32)radius+1);
|
||||
s32 yt = max(machine->state.clip.t, ym-radius);
|
||||
s32 yb = min(machine->state.clip.b, ym+radius+1);
|
||||
u8 final_color = mapColor(&machine->memory, color);
|
||||
for(s32 y = yt; y < yb; y++) {
|
||||
s32 xl = max(SidesBuffer.Left[y], machine->state.clip.l);
|
||||
|
@ -879,7 +879,7 @@ static void api_circle(tic_mem* memory, s32 xm, s32 ym, u32 radius, u8 color)
|
|||
}
|
||||
}
|
||||
|
||||
static void api_circle_border(tic_mem* memory, s32 xm, s32 ym, u32 radius, u8 color)
|
||||
static void api_circle_border(tic_mem* memory, s32 xm, s32 ym, s32 radius, u8 color)
|
||||
{
|
||||
s32 r = radius;
|
||||
s32 x = -r, y = 0, err = 2-2*r;
|
||||
|
|
|
@ -85,8 +85,8 @@ typedef struct
|
|||
void (*remap) (tic_mem* memory, const tic_map* src, const tic_tiles* tiles, s32 x, s32 y, s32 width, s32 height, s32 sx, s32 sy, u8 chromakey, s32 scale, RemapFunc remap, void* data);
|
||||
void (*map_set) (tic_mem* memory, tic_map* src, s32 x, s32 y, u8 value);
|
||||
u8 (*map_get) (tic_mem* memory, const tic_map* src, s32 x, s32 y);
|
||||
void (*circle) (tic_mem* memory, s32 x, s32 y, u32 radius, u8 color);
|
||||
void (*circle_border) (tic_mem* memory, s32 x, s32 y, u32 radius, u8 color);
|
||||
void (*circle) (tic_mem* memory, s32 x, s32 y, s32 radius, u8 color);
|
||||
void (*circle_border) (tic_mem* memory, s32 x, s32 y, s32 radius, u8 color);
|
||||
void (*tri) (tic_mem* memory, s32 x1, s32 y1, s32 x2, s32 y2, s32 x3, s32 y3, u8 color);
|
||||
void(*textri) (tic_mem* memory, float x1, float y1, float x2, float y2, float x3, float y3, float u1, float v1, float u2, float v2, float u3, float v3, bool use_map, u8 chroma);
|
||||
void (*clip) (tic_mem* memory, s32 x, s32 y, s32 width, s32 height);
|
||||
|
|
Loading…
Reference in New Issue