Commit 9b44fc26 authored by Pablo Navarro's avatar Pablo Navarro

- Batch-replaced "int *params" with "intprt_t *params"

- Few fixes in interpreter.c's cast types
- Changes in cmake to add or remove optional modules easier
parent 2daf2ed6
......@@ -3,3 +3,4 @@
*.a
*.dcb
.idea
/3rdparty/steamworks
......@@ -32,7 +32,9 @@
#include <mod_proc_symbols.h>
#include <mod_sort_symbols.h>
#include <mod_timers_symbols.h>
#ifndef NO_MODREGEX
#include <mod_regex_symbols.h>
#endif
#include <libgrbase_symbols.h>
#include <libblit_symbols.h>
#include <libvideo_symbols.h>
......@@ -60,13 +62,16 @@
#include <libwm_symbols.h>
#include <mod_wm_symbols.h>
#include <mod_sys_symbols.h>
#ifndef NO_MODMEM
# include <mod_mem_symbols.h>
#endif
#ifndef NO_MODDEBUG
# include <mod_debug_symbols.h>
#endif
#include <mod_effects_symbols.h>
#ifndef NO_MODEFFECTS
# include <mod_effects_symbols.h>
#endif
/* Unofficial modules */
#ifndef NO_MODICONV
# include <iconv_symbols.h>
......@@ -74,12 +79,18 @@
#ifndef NO_MODCHIPMUNK
# include <mod_chipmunk_symbols.h>
#endif
#ifndef NO_MODMULTI
#include <mod_multi_symbols.h>
#endif
#ifndef NO_MODCURL
# include <mod_curl_symbols.h>
#endif
#ifndef NO_MODFSOCK
#include <mod_fsock_symbols.h>
#endif
#ifndef NO_MODTHEORA
#include <mod_theora_symbols.h>
#endif
#ifndef NO_MODSTEAM
#include <mod_steam_symbols.h>
#endif
......@@ -137,7 +148,9 @@ basic_symbols symbol_list[] = {
{ "mod_proc.fakelib" , NULL, mod_proc_constants_def, NULL, NULL, mod_proc_locals_def, mod_proc_exported_functions },
{ "mod_sort.fakelib" , NULL, NULL, NULL, NULL, NULL, mod_sort_exported_functions },
{ "mod_timers.fakelib" , NULL, NULL, NULL, mod_timers_globals_def, NULL, NULL },
#ifndef NO_MODREGEX
{ "mod_regex.fakelib" , NULL, NULL, NULL, mod_regex_globals_def, NULL, mod_regex_exported_functions },
#endif
{ "mod_video.fakelib" , mod_video_module_dependencies, NULL, NULL, NULL, NULL, mod_video_exported_functions },
{ "mod_mouse.fakelib" , mod_mouse_module_dependencies, NULL, NULL, NULL, NULL, NULL },
{ "mod_map.fakelib" , mod_map_module_dependencies, mod_map_constants_def, NULL, NULL, NULL, mod_map_exported_functions },
......@@ -158,7 +171,9 @@ basic_symbols symbol_list[] = {
#ifndef NO_MODDEBUG
{ "mod_debug.fakelib" , mod_debug_module_dependencies, NULL, NULL, NULL, NULL, NULL },
#endif
#ifndef NO_MODEFFECTS
{ "mod_effects.fakelib" , mod_effects_module_dependencies, mod_effects_constants_def, NULL, NULL, NULL, mod_effects_exported_functions },
#endif
/* Unofficial modules */
#ifndef NO_MODICONV
{ "mod_iconv.fakelib" , NULL, NULL, NULL, NULL, NULL, mod_iconv_exported_functions },
......@@ -166,15 +181,21 @@ basic_symbols symbol_list[] = {
#ifndef NO_MODCHIPMUNK
{ "mod_chipmunk.fakelib" , mod_chipmunk_module_dependencies, mod_chipmunk_constants_def, mod_chipmunk_types_def, mod_chipmunk_globals_def, mod_chipmunk_locals_def, mod_chipmunk_exported_functions },
#endif
#ifndef NO_MODMULTI
{ "mod_multi.fakelib" , mod_multi_module_dependencies, mod_multi_constants_def, NULL, NULL, NULL, mod_multi_exported_functions },
#endif
#ifndef NO_MODCURL
{ "mod_curl.fakelib" , NULL, mod_curl_constants_def, NULL, NULL, NULL, mod_curl_exported_functions },
#endif
#ifndef NO_MODSTEAM
{ "mod_steam.fakelib" , mod_steam_module_dependencies, mod_steam_constants_def, NULL, mod_steam_globals_def, NULL, mod_steam_exported_functions },
#endif
#ifndef NO_MODFSOCK
{ "mod_fsock.fakelib" , NULL, NULL, NULL, NULL, NULL, mod_fsock_exported_functions },
#endif
#ifndef NO_MODTHEORA
{ "mod_theora.fakelib" , mod_theora_module_dependencies, NULL, NULL, NULL, NULL, mod_theora_exported_functions },
#endif
{ NULL , NULL, NULL, NULL, NULL, NULL, NULL }
};
......@@ -206,7 +227,9 @@ extra_symbols symbol_list_runtime[] = {
{ NULL, mod_proc_locals_fixup, NULL, NULL, NULL, NULL, mod_proc_process_exec_hook, NULL}, //mod_proc
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, //mod_sort
{ mod_timers_globals_fixup, NULL, NULL, NULL, NULL, NULL, NULL, mod_timers_handler_hooks }, //mod_timers
#ifndef NO_MODREGEX
{ mod_regex_globals_fixup, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, //mod_regex
#endif
{ mod_video_globals_fixup, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, //mod_video
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, //mod_mouse
{ NULL, NULL, NULL, mod_map_module_finalize, NULL, NULL, NULL, NULL }, //mod_map
......@@ -227,7 +250,9 @@ extra_symbols symbol_list_runtime[] = {
#ifndef NO_MODDEBUG
{ mod_debug_globals_fixup, mod_debug_locals_fixup, mod_debug_module_initialize, mod_debug_module_finalize, NULL, NULL, mod_debug_process_exec_hook, NULL }, //mod_debug
#endif
#ifndef NO_MODEFFECTS
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, //modeffects
#endif
/* Unofficial modules */
#ifndef NO_MODICONV
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, //mod_iconv
......@@ -235,15 +260,21 @@ extra_symbols symbol_list_runtime[] = {
#ifndef NO_MODCHIPMUNK
{ mod_chipmunk_globals_fixup, mod_chipmunk_locals_fixup, mod_chipmunk_module_initialize, mod_chipmunk_module_finalize, NULL, NULL, NULL, mod_chipmunk_handler_hooks }, //mod_chipmunk
#endif
#ifndef NO_MODMULTI
{ NULL, NULL, mod_multi_module_initialize, NULL, NULL, NULL, NULL, mod_multi_handler_hooks }, //mod_multi
#endif
#ifndef NO_MODCURL
{ NULL, NULL, mod_curl_module_initialize, mod_curl_module_finalize, NULL, NULL, NULL, NULL }, //mod_curl
#endif
#ifndef NO_MODSTEAM
{ mod_steam_globals_fixup, NULL, mod_steam_module_initialize, mod_steam_module_finalize, NULL, NULL, NULL, NULL }, //mod_steam
#endif
#ifndef NO_MODFSOCK
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }, //mod_fsock
#endif
#ifndef NO_MODTHEORA
{ NULL, NULL, mod_theora_module_initialize, mod_theora_module_finalize, NULL, NULL, NULL, mod_theora_handler_hooks }, //mod_theora
#endif
};
#endif
......
......@@ -945,7 +945,8 @@ int instance_go(INSTANCE *r) {
r->proc->name, LOCDWORD(r, PROCESS_ID));
exit(0);
}
r->stack_ptr[-2] /= r->stack_ptr[-1];
//r->stack_ptr[-2] /= r->stack_ptr[-1];
r->stack_ptr[-2] = (int32_t)r->stack_ptr[-2] / (int32_t)r->stack_ptr[-1];
r->stack_ptr--;
ptr++;
break;
......@@ -1135,19 +1136,19 @@ int instance_go(INSTANCE *r) {
/* Comparisons */
case MN_EQ:
r->stack_ptr[-2] = (r->stack_ptr[-2] == r->stack_ptr[-1]);
r->stack_ptr[-2] = ((int32_t)r->stack_ptr[-2] == (int32_t)r->stack_ptr[-1]);
r->stack_ptr--;
ptr++;
break;
case MN_NE:
r->stack_ptr[-2] = (r->stack_ptr[-2] != r->stack_ptr[-1]);
r->stack_ptr[-2] = ((int32_t)r->stack_ptr[-2] != (int32_t)r->stack_ptr[-1]);
r->stack_ptr--;
ptr++;
break;
case MN_GTE:
r->stack_ptr[-2] = (r->stack_ptr[-2] >= r->stack_ptr[-1]);
r->stack_ptr[-2] = ((int32_t)r->stack_ptr[-2] >= (int32_t)r->stack_ptr[-1]);
r->stack_ptr--;
ptr++;
break;
......@@ -1159,7 +1160,7 @@ int instance_go(INSTANCE *r) {
break;
case MN_LTE:
r->stack_ptr[-2] = (r->stack_ptr[-2] <= r->stack_ptr[-1]);
r->stack_ptr[-2] = ((int32_t)r->stack_ptr[-2] <= (int32_t)r->stack_ptr[-1]);
r->stack_ptr--;
ptr++;
break;
......@@ -1171,7 +1172,7 @@ int instance_go(INSTANCE *r) {
break;
case MN_LT:
r->stack_ptr[-2] = (r->stack_ptr[-2] < r->stack_ptr[-1]);
r->stack_ptr[-2] = ((int32_t)r->stack_ptr[-2] < (int32_t)r->stack_ptr[-1]);
r->stack_ptr--;
ptr++;
break;
......@@ -1183,7 +1184,7 @@ int instance_go(INSTANCE *r) {
break;
case MN_GT:
r->stack_ptr[-2] = (r->stack_ptr[-2] > r->stack_ptr[-1]);
r->stack_ptr[-2] = ((int32_t)r->stack_ptr[-2] > (int32_t)r->stack_ptr[-1]);
r->stack_ptr--;
ptr++;
break;
......
......@@ -46,7 +46,7 @@
* Helper function preparing params
**/
static bgdata *prep(int *params) {
static bgdata *prep(intptr_t *params) {
bgdata *t = (bgdata *)malloc(sizeof(bgdata));
t->file = strdup((char *)string_get(params[0]));
t->id = (int *)params[1];
......@@ -71,7 +71,7 @@ int bgDoLoad(void *d) {
/* --------------------------------------------------------------------------- */
int bgload(int (*fn)(), int *params) {
int bgload(int (*fn)(), intptr_t *params) {
bgdata *t = prep(params);
t->fn = fn;
......
/*
* Copyright (C) 2014-2016 Joseba García Etxebarria <joseba.gar@gmail.com>
* Copyright (C) 2006-2012 SplinterGU (Fenix/Bennugd)
* Copyright (C) 2002-2006 Fenix Team (Fenix)
* Copyright (C) 1999-2002 José Luis Cebrián Pagüe (Fenix)
*
* This file is part of PixTudio
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*
*/
#ifndef BGLOAD_H
#define BGLOAD_H
/* --------------------------------------------------------------------------- */
typedef struct {
char *file;
int *id, (*fn)();
} bgdata;
/* --------------------------------------------------------------------------- */
extern int bgload(int (*fn)(), int *params);
/* --------------------------------------------------------------------------- */
#endif
/*
* Copyright (C) 2014-2016 Joseba García Etxebarria <joseba.gar@gmail.com>
* Copyright (C) 2006-2012 SplinterGU (Fenix/Bennugd)
* Copyright (C) 2002-2006 Fenix Team (Fenix)
* Copyright (C) 1999-2002 José Luis Cebrián Pagüe (Fenix)
*
* This file is part of PixTudio
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*
*/
#ifndef BGLOAD_H
#define BGLOAD_H
/* --------------------------------------------------------------------------- */
typedef struct {
char *file;
int *id, (*fn)();
} bgdata;
/* --------------------------------------------------------------------------- */
extern int bgload(int (*fn)(), intptr_t *params);
/* --------------------------------------------------------------------------- */
#endif
This diff is collapsed.
/*
* Copyright (C) 2014-2016 Joseba García Etxebarria <joseba.gar@gmail.com>
* Copyright (C) 2006-2012 SplinterGU (Fenix/Bennugd)
* Copyright (C) 2002-2006 Fenix Team (Fenix)
* Copyright (C) 1999-2002 José Luis Cebrián Pagüe (Fenix)
*
* This file is part of PixTudio
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*
*/
#ifndef __PIXEL_H
#define __PIXEL_H
/* --------------------------------------------------------------------------- */
#include <stdint.h>
/* --------------------------------------------------------------------------- */
extern int pixel_color8;
extern uint16_t pixel_color16;
extern uint32_t pixel_color32;
extern uint16_t pixel_color16_alpha;
extern int pixel_alpha;
extern uint8_t *pixel_alpha8;
extern uint16_t *pixel_alpha16;
/* --------------------------------------------------------------------------- */
/* Pixels */
/* ------ */
/* --------------------------------------------------------------------------- */
#define _Pixel8(ptr, color) \
*((uint8_t *)(ptr)) = \
((pixel_alpha == 255) ? (color) : (pixel_alpha8[(uint8_t)(((color) << 8) + *(ptr))]))
#define _Pixel16(ptr, color, color_alpha) \
*((uint16_t *)(ptr)) = \
((pixel_alpha == 255) ? (color) : (pixel_alpha16[(uint16_t) * (ptr)] + (color_alpha)))
#define _Pixel32(ptr, color) *((uint32_t *)(ptr)) = ((pixel_alpha == 255) ? (color) : (color))
/* --------------------------------------------------------------------------- */
extern int gr_get_pixel(GRAPH *dest, int x, int y);
extern void gr_put_pixel(GRAPH *dest, int x, int y, int color);
extern void gr_put_pixelc(GRAPH *dest, REGION *clip, int x, int y, int color);
extern void gr_setalpha(int value);
extern void gr_setcolor(int c);
/* --------------------------------------------------------------------------- */
#endif
/*
* Copyright (C) 2014-2016 Joseba García Etxebarria <joseba.gar@gmail.com>
* Copyright (C) 2006-2012 SplinterGU (Fenix/Bennugd)
* Copyright (C) 2002-2006 Fenix Team (Fenix)
* Copyright (C) 1999-2002 José Luis Cebrián Pagüe (Fenix)
*
* This file is part of PixTudio
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*
*/
#ifndef __PIXEL_H
#define __PIXEL_H
/* --------------------------------------------------------------------------- */
#include <stdint.h>
/* --------------------------------------------------------------------------- */
extern int pixel_color8;
extern uint16_t pixel_color16;
extern uint32_t pixel_color32;
extern uint16_t pixel_color16_alpha;
extern int pixel_alpha;
extern uint8_t *pixel_alpha8;
extern uint16_t *pixel_alpha16;
/* --------------------------------------------------------------------------- */
/* Pixels */
/* ------ */
/* --------------------------------------------------------------------------- */
#define _Pixel8(ptr, color) \
*((uint8_t *)(ptr)) = \
((pixel_alpha == 255) ? (color) : (pixel_alpha8[(uint8_t)(((color) << 8) + *(ptr))]))
#define _Pixel16(ptr, color, color_alpha) \
*((uint16_t *)(ptr)) = \
((pixel_alpha == 255) ? (color) : (pixel_alpha16[(uint16_t) * (ptr)] + (color_alpha)))
#define _Pixel32(ptr, color) *((uint32_t *)(ptr)) = ((pixel_alpha == 255) ? (color) : (color))
/* --------------------------------------------------------------------------- */
extern int gr_get_pixel(GRAPH *dest, int x, int y);
extern void gr_put_pixel(GRAPH *dest, int x, int y, int color);
extern void gr_put_pixelc(GRAPH *dest, REGION *clip, int x, int y, int color);
extern void gr_setalpha(int value);
extern void gr_setcolor(int c);
/* --------------------------------------------------------------------------- */
#endif
/*
* Copyright (C) 2014-2016 Joseba García Etxebarria <joseba.gar@gmail.com>
* Copyright (C) 2006-2012 SplinterGU (Fenix/Bennugd)
* Copyright (C) 2002-2006 Fenix Team (Fenix)
* Copyright (C) 1999-2002 José Luis Cebrián Pagüe (Fenix)
*
* This file is part of PixTudio
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*
*/
#ifndef __LIBBLIT_H
#define __LIBBLIT_H
#include "libgrbase.h"
#include "g_blit.h"
#include "g_pixel.h"
#endif
/*
* Copyright (C) 2014-2016 Joseba García Etxebarria <joseba.gar@gmail.com>
* Copyright (C) 2006-2012 SplinterGU (Fenix/Bennugd)
* Copyright (C) 2002-2006 Fenix Team (Fenix)
* Copyright (C) 1999-2002 José Luis Cebrián Pagüe (Fenix)
*
* This file is part of PixTudio
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*
*/
#ifndef __LIBBLIT_H
#define __LIBBLIT_H
#include "libgrbase.h"
#include "g_blit.h"
#include "g_pixel.h"
#endif
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* Copyright (C) 2014-2016 Joseba García Etxebarria <joseba.gar@gmail.com>
* Copyright (C) 2006-2012 SplinterGU (Fenix/Bennugd)
* Copyright (C) 2002-2006 Fenix Team (Fenix)
* Copyright (C) 1999-2002 José Luis Cebrián Pagüe (Fenix)
*
* This file is part of PixTudio
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*
*/
#ifndef __DRAW_H
#define __DRAW_H
#include "libgrbase.h"
/* --------------------------------------------------------------------------- */
extern uint32_t drawing_stipple;
/* --------------------------------------------------------------------------- */
void draw_vline(GRAPH *dest, REGION *clip, int x, int y, int h);
void draw_hline(GRAPH *dest, REGION *clip, int x, int y, int w);
void draw_box(GRAPH *dest, REGION *clip, int x, int y, int w, int h);
void draw_rectangle(GRAPH *dest, REGION *clip, int x, int y, int w, int h);
void draw_circle(GRAPH *dest, REGION *clip, int x, int y, int r);
void draw_fcircle(GRAPH *dest, REGION *clip, int x, int y, int r);
void draw_line(GRAPH *dest, REGION *clip, int x, int y, int w, int h);
void draw_bezier(GRAPH *dest, REGION *clip, int x1, int y1, int x2, int y2, int x3, int y3, int x4,
int y4, int level);
/* --------------------------------------------------------------------------- */
#endif
/*
* Copyright (C) 2014-2016 Joseba García Etxebarria <joseba.gar@gmail.com>
* Copyright (C) 2006-2012 SplinterGU (Fenix/Bennugd)
* Copyright (C) 2002-2006 Fenix Team (Fenix)
* Copyright (C) 1999-2002 José Luis Cebrián Pagüe (Fenix)
*
* This file is part of PixTudio
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*
*/
#ifndef __DRAW_H
#define __DRAW_H
#include "libgrbase.h"
/* --------------------------------------------------------------------------- */
extern uint32_t drawing_stipple;
/* --------------------------------------------------------------------------- */
void draw_vline(GRAPH *dest, REGION *clip, int x, int y, int h);
void draw_hline(GRAPH *dest, REGION *clip, int x, int y, int w);
void draw_box(GRAPH *dest, REGION *clip, int x, int y, int w, int h);
void draw_rectangle(GRAPH *dest, REGION *clip, int x, int y, int w, int h);
void draw_circle(GRAPH *dest, REGION *clip, int x, int y, int r);
void draw_fcircle(GRAPH *dest, REGION *clip, int x, int y, int r);
void draw_line(GRAPH *dest, REGION *clip, int x, int y, int w, int h);
void draw_bezier(GRAPH *dest, REGION *clip, int x1, int y1, int x2, int y2, int x3, int y3, int x4,
int y4, int level);
/* --------------------------------------------------------------------------- */
#endif
/*
* Copyright (C) 2014-2016 Joseba García Etxebarria <joseba.gar@gmail.com>
* Copyright (C) 2006-2012 SplinterGU (Fenix/Bennugd)
* Copyright (C) 2002-2006 Fenix Team (Fenix)
* Copyright (C) 1999-2002 José Luis Cebrián Pagüe (Fenix)
*
* This file is part of PixTudio
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.