… | |
… | |
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 | |
43 | Pixmap *pixmaps; /* list of pixmaps */ |
42 | Pixmap *pixmaps; /* list of pixmaps */ |
44 | Pixmap *masks; /* list of masks */ |
43 | Pixmap *masks; /* list of masks */ |
45 | int FontSize; /* Size of font (really images) */ |
44 | int 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 | |
49 | ArchFlagsRec archFlags[] = { |
48 | static 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 | */ |
71 | XColor exactcolor, discolor[13]; |
70 | XColor discolor[13]; |
72 | Colormap colormap=(Colormap)NULL; |
71 | Colormap colormap=(Colormap)NULL; |
73 | |
72 | |
74 | |
73 | |
75 | /********************************************************************** |
74 | /********************************************************************** |
76 | * private |
75 | * private |
77 | **********************************************************************/ |
76 | **********************************************************************/ |
|
|
77 | |
|
|
78 | static void AppDestroy(App self); |
|
|
79 | static Edit AppEditInsert(App self,String path,EditType type); |
|
|
80 | static void AppEditAttach(App self,Edit edit); |
78 | |
81 | |
79 | #if 0 |
82 | #if 0 |
80 | static void AbsToCr(App self,String abs) |
83 | static 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 | */ |
858 | void AppDestroy(App self) |
858 | static 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 | |
1012 | void 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 | */ |
1020 | Edit AppEditInsert(App self,String path,EditType type) |
1015 | static 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 | */ |
1058 | void AppEditAttach(App self,Edit edit) |
1053 | static 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; |