[Moeng-cvs] CaveAdventure/src/editor agup.cpp,NONE,1.1 agup.h,NONE,1.1 agupitrn.h,NONE,1.1 aphoton.c
Status: Alpha
Brought to you by:
b_lindeijer
From: <b_l...@us...> - 2004-01-13 17:18:12
|
Update of /cvsroot/moeng/CaveAdventure/src/editor In directory sc8-pr-cvs1:/tmp/cvs-serv32087/src/editor Added Files: agup.cpp agup.h agupitrn.h aphoton.cpp aphoton.h editor.cpp editor.h gui_procs.cpp gui_procs.h main.cpp script.cpp script.h Log Message: CaveAdventure engine and stuff update (not working yet due to outdated scripts) --- NEW FILE: agup.cpp --- /* agup.c * * This file is part of the Allegro GUI Un-uglification Project. * It provides "theming" ability. * * Peter Wang <tj...@us...> */ #include <allegro.h> #include "agup.h" #include "agupitrn.h" static AL_CONST struct agup_theme *theme; int agup_fg_color; int agup_bg_color; void agup_init(AL_CONST struct agup_theme *thm) { if ((theme = thm)) { theme->init(); agup_fg_color = *(theme->fg_color); agup_bg_color = *(theme->bg_color); } } void agup_shutdown(void) { if (theme) { theme->shutdown(); theme = NULL; } } #define MAKE_WRAPPER(wrapper, proc) \ int wrapper(int msg, DIALOG *d, int c) \ { \ return ((theme) && (theme->proc)) ? theme->proc(msg, d, c) : D_O_K; \ } MAKE_WRAPPER(d_agup_box_proc, box_proc); MAKE_WRAPPER(d_agup_shadow_box_proc, shadow_box_proc); MAKE_WRAPPER(d_agup_button_proc, button_proc); MAKE_WRAPPER(d_agup_push_proc, push_proc); MAKE_WRAPPER(d_agup_check_proc, check_proc); MAKE_WRAPPER(d_agup_radio_proc, radio_proc); MAKE_WRAPPER(d_agup_icon_proc, icon_proc); MAKE_WRAPPER(d_agup_edit_proc, edit_proc); MAKE_WRAPPER(d_agup_list_proc, list_proc); MAKE_WRAPPER(d_agup_text_list_proc, text_list_proc); MAKE_WRAPPER(d_agup_textbox_proc, textbox_proc); MAKE_WRAPPER(d_agup_slider_proc, slider_proc); MAKE_WRAPPER(d_agup_menu_proc, menu_proc); MAKE_WRAPPER(d_agup_window_proc, window_proc); --- NEW FILE: agup.h --- /* * This file is part of the Allegro GUI Un-uglification Project. */ #ifndef _agup_included_agup_h #define _agup_included_agup_h struct agup_theme; extern int agup_fg_color; extern int agup_bg_color; void agup_init(AL_CONST struct agup_theme *); void agup_shutdown(void); int d_agup_box_proc(int, DIALOG *, int); int d_agup_shadow_box_proc(int, DIALOG *, int); int d_agup_button_proc(int, DIALOG *, int); int d_agup_push_proc(int, DIALOG *, int); int d_agup_check_proc(int, DIALOG *, int); int d_agup_radio_proc(int, DIALOG *, int); int d_agup_icon_proc(int, DIALOG *, int); int d_agup_edit_proc(int, DIALOG *, int); int d_agup_list_proc(int, DIALOG *, int); int d_agup_text_list_proc(int, DIALOG *, int); int d_agup_textbox_proc(int, DIALOG *, int); int d_agup_slider_proc(int, DIALOG *, int); int d_agup_menu_proc(int, DIALOG *, int); int d_agup_window_proc(int, DIALOG *, int); #endif --- NEW FILE: agupitrn.h --- /* * This file is part of the Allegro GUI Un-uglification Project. */ #ifndef _agup_included_agupitrn_h #define _agup_included_agupitrn_h struct agup_theme { int *fg_color; int *bg_color; void (*init)(void); void (*shutdown)(void); int (*box_proc)(int, DIALOG *, int); int (*shadow_box_proc)(int, DIALOG *, int); int (*button_proc)(int, DIALOG *, int); int (*push_proc)(int, DIALOG *, int); int (*check_proc)(int, DIALOG *, int); int (*radio_proc)(int, DIALOG *, int); int (*icon_proc)(int, DIALOG *, int); int (*edit_proc)(int, DIALOG *, int); int (*list_proc)(int, DIALOG *, int); int (*text_list_proc)(int, DIALOG *, int); int (*textbox_proc)(int, DIALOG *, int); int (*slider_proc)(int, DIALOG *, int); int (*menu_proc)(int, DIALOG *, int); int (*window_proc)(int, DIALOG *, int); }; /* internal Allegro function, don't want aintern.h just for this */ #ifdef __cplusplus extern "C" #endif void _draw_textbox(char *, int *, int, int, int, int, int, int, int, int, int, int, int, int); #endif --- NEW FILE: aphoton.cpp --- /* aphoton.c * * This file is part of the Allegro GUI Un-uglification Project. * It emulates the look of the QNX Photon MicroGUI widget set. * * Eric Botcazou <ebo...@mu...> */ #include <allegro.h> #include "aphoton.h" #include "agupitrn.h" /*----------------------------------------------------------------------*/ /* Recommend fg/bg colors */ /*----------------------------------------------------------------------*/ [...1016 lines suppressed...] aphoton_shutdown, d_aphoton_box_proc, d_aphoton_shadow_box_proc, d_aphoton_button_proc, d_aphoton_push_proc, d_aphoton_check_proc, d_aphoton_radio_proc, d_aphoton_icon_proc, d_aphoton_edit_proc, d_aphoton_list_proc, d_aphoton_text_list_proc, d_aphoton_textbox_proc, d_aphoton_slider_proc, d_aphoton_menu_proc, d_aphoton_window_proc }; AL_CONST struct agup_theme *aphoton_theme = &the_theme; --- NEW FILE: aphoton.h --- /* * This file is part of the Allegro GUI Un-uglification Project. If you * are looking for Photon header files, you are looking in the wrong place. */ #ifndef _agup_included_aphoton_h #define _agup_included_aphoton_h extern int aphoton_fg_color; extern int aphoton_bg_color; void aphoton_init(void); void aphoton_shutdown(void); void photon_scrollbar(BITMAP *bmp, int x, int y, int w, int h, int vert, int pos, int len); void photon_container(BITMAP *bmp, int x, int y, int w, int h); extern int container_black, container_gray1, container_gray2; extern int scrollbar_gray1, scrollbar_gray2; int d_aphoton_box_proc(int, DIALOG *, int); int d_aphoton_shadow_box_proc(int, DIALOG *, int); int d_aphoton_button_proc(int, DIALOG *, int); int d_aphoton_push_proc(int, DIALOG *, int); int d_aphoton_check_proc(int, DIALOG *, int); int d_aphoton_radio_proc(int, DIALOG *, int); int d_aphoton_icon_proc(int, DIALOG *, int); int d_aphoton_edit_proc(int, DIALOG *, int); int d_aphoton_list_proc(int, DIALOG *, int); int d_aphoton_text_list_proc(int, DIALOG *, int); int d_aphoton_textbox_proc(int, DIALOG *, int); int d_aphoton_slider_proc(int, DIALOG *, int); int d_aphoton_menu_proc(int, DIALOG *, int); int d_aphoton_window_proc(int, DIALOG *, int); extern AL_CONST struct agup_theme *aphoton_theme; #endif --- NEW FILE: editor.cpp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: editor.h --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gui_procs.cpp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gui_procs.h --- (This appears to be a binary file; contents omitted.) --- NEW FILE: main.cpp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: script.cpp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: script.h --- (This appears to be a binary file; contents omitted.) |