ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/crossedit/App.c
(Generate patch)

Comparing deliantra/server/crossedit/App.c (file contents):
Revision 1.1 by root, Fri Feb 3 07:11:42 2006 UTC vs.
Revision 1.2 by pippijn, Sun May 7 08:19:29 2006 UTC

34#include "Attr.h" 34#include "Attr.h"
35#include "Cnv.h" 35#include "Cnv.h"
36#include "Bitmaps.h" 36#include "Bitmaps.h"
37#include "App.h" 37#include "App.h"
38#include "debug.h" 38#include "debug.h"
39#include "util.h"
40 39
41#include <proto.h> 40#include <proto.h>
42 41
43Pixmap *pixmaps; /* list of pixmaps */ 42Pixmap *pixmaps; /* list of pixmaps */
44Pixmap *masks; /* list of masks */ 43Pixmap *masks; /* list of masks */
45int FontSize; /* Size of font (really images) */ 44int FontSize; /* Size of font (really images) */
46#define E_EDITABLE (E_MONSTER | E_EXIT | E_TREASURE | E_BACKGROUND | \ 45#define E_EDITABLE (E_MONSTER | E_EXIT | E_TREASURE | E_BACKGROUND | \
47 E_DOOR | E_SPECIAL | E_SHOP | E_NORMAL | E_FALSE_WALL) 46 E_DOOR | E_SPECIAL | E_SHOP | E_NORMAL | E_FALSE_WALL)
48 47
49ArchFlagsRec archFlags[] = { 48static ArchFlagsRec archFlags[] = {
50 { 0, "toggle", E_EDITABLE }, 49 { 0, "toggle", E_EDITABLE },
51 { 0, "monster", E_MONSTER }, 50 { 0, "monster", E_MONSTER },
52 { 0, "exit", E_EXIT }, 51 { 0, "exit", E_EXIT },
53 { 0, "treasure", E_TREASURE }, 52 { 0, "treasure", E_TREASURE },
54 { 0, "background", E_BACKGROUND }, 53 { 0, "background", E_BACKGROUND },
66 65
67/* 66/*
68 * plaah: where to put these ??? 67 * plaah: where to put these ???
69 * 0.91.9 - moved to start of file - needed for ReadPixmaps function. 68 * 0.91.9 - moved to start of file - needed for ReadPixmaps function.
70 */ 69 */
71XColor exactcolor, discolor[13]; 70XColor discolor[13];
72Colormap colormap=(Colormap)NULL; 71Colormap colormap=(Colormap)NULL;
73 72
74 73
75/********************************************************************** 74/**********************************************************************
76 * private 75 * private
77 **********************************************************************/ 76 **********************************************************************/
77
78static void AppDestroy(App self);
79static Edit AppEditInsert(App self,String path,EditType type);
80static void AppEditAttach(App self,Edit edit);
78 81
79#if 0 82#if 0
80static void AbsToCr(App self,String abs) 83static void AbsToCr(App self,String abs)
81{ 84{
82 char mapdir[PATH_MAX+1],path[PATH_MAX+1],*current,*filename; 85 char mapdir[PATH_MAX+1],path[PATH_MAX+1],*current,*filename;
817 XtGetApplicationResources 820 XtGetApplicationResources
818 (self->shell, 821 (self->shell,
819 (XtPointer) & self->res, 822 (XtPointer) & self->res,
820 resources, resourcesNum, 823 resources, resourcesNum,
821 NULL, 0); 824 NULL, 0);
822
823 /*** images & colors ***/
824 InitializeColors(XtDisplay(self->shell));
825 825
826 /* Default */ 826 /* Default */
827 displaymode=Dm_Png; 827 displaymode=Dm_Png;
828 FontSize=32; 828 FontSize=32;
829 829
853} 853}
854 854
855/* 855/*
856 * member: vanish application 856 * member: vanish application
857 */ 857 */
858void AppDestroy(App self) 858static void AppDestroy(App self)
859{ 859{
860 Edit edit; 860 Edit edit;
861 Edit temp; 861 Edit temp;
862 862
863 debug0("AppDestroy()"); 863 debug0("AppDestroy()");
1007 AppUpdate(self); 1007 AppUpdate(self);
1008} 1008}
1009 1009
1010 1010
1011 1011
1012void InitializeColors (Display *dpy)
1013{
1014 return; /* this function does nothing anymore */
1015}
1016
1017/* 1012/*
1018 * member: add editor 1013 * member: add editor
1019 */ 1014 */
1020Edit AppEditInsert(App self,String path,EditType type) 1015static Edit AppEditInsert(App self,String path,EditType type)
1021{ 1016{
1022 Edit edit; 1017 Edit edit;
1023 Edit editor; 1018 Edit editor;
1024 1019
1025 /*** check if exist ***/ 1020 /*** check if exist ***/
1053} 1048}
1054 1049
1055/* 1050/*
1056 * attach Edit to App environment 1051 * attach Edit to App environment
1057 */ 1052 */
1058void AppEditAttach(App self,Edit edit) 1053static void AppEditAttach(App self,Edit edit)
1059{ 1054{
1060 debug1("AppEditAttach() %s\n",EditGetPath(edit)); 1055 debug1("AppEditAttach() %s\n",EditGetPath(edit));
1061 /*** attach edit to list ***/ 1056 /*** attach edit to list ***/
1062 edit->next = self->edit; 1057 edit->next = self->edit;
1063 self->edit = edit; 1058 self->edit = edit;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines