disable the unrecognized nls flag
[AROS-Contrib.git] / fish / shuffle / shuffle_main.c
blob78ce7e46c709b18191aa96e019b5d058d7ead403
1 #include "shuffle.h"
3 long __OSlibversion = 37;
4 struct shu_data info =
7 { 8,8, },
8 { 16,8, },
9 { 16,16, },
10 { 4,4, },
11 { 8,4, },
14 { DIR_UP,DIR_DOWN, },
15 { DIR_DOWN,DIR_UP, },
16 { DIR_LEFT,DIR_RIGHT, },
17 { DIR_RIGHT,DIR_LEFT, },
18 },
19 { 100,80,60,40,20,1, },
21 { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, },
22 { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, },
25 DIR_UP,
28 100,
29 NULL,
30 NULL,
31 NULL,
32 TRUE,
33 MODE_TILES,
36 struct Library * AslBase;
37 struct Library * GadToolsBase;
38 struct GfxBase * GfxBase;
39 struct Library * IconBase;
40 struct IntuitionBase * IntuitionBase;
42 BOOL openlibs(void)
44 AslBase = OpenLibrary("asl.library",0);
45 GadToolsBase = OpenLibrary("gadtools.library",0);
46 GfxBase = (struct GfxBase *)OpenLibrary("graphics.library",0);
47 IconBase = OpenLibrary("icon.library",0);
48 IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",0);
50 if (!AslBase || !GadToolsBase || !GfxBase || !IconBase || !IntuitionBase)
51 return FALSE;
53 return TRUE;
56 void closelibs(void)
58 if (AslBase) CloseLibrary(AslBase);
59 if (GadToolsBase) CloseLibrary(GadToolsBase);
60 if (GfxBase) CloseLibrary((struct Library*)GfxBase);
61 if (IconBase) CloseLibrary(IconBase);
62 if (IntuitionBase) CloseLibrary((struct Library *)IntuitionBase);
65 /* ------------------------------------------------------------------- */
66 /* for cback.o startup */
67 /* ------------------------------------------------------------------- */
69 long __stack = 8192;
70 char *__procname = "*shuffle V1.1*";
71 long __priority = 0L;
72 long __BackGroundIO = 0;
73 extern BPTR _Backstdout;
75 /* ----------------------------------------------------------------- */
77 void LoadIcon(int argc, char **argv);
79 int main(int argc, char **argv)
81 int end = FALSE;
82 if (TRUE == openlibs())
84 time(&RangeSeed);
85 if(!SetupScreen())
87 if(!OpenProject0Window())
89 info.writeicon = TRUE;
90 strcpy(info.f_file,"shuffle.config");
91 load_config("env:shuffle.config");
92 LoadIcon(argc,argv);
93 while(!end)
95 WaitPort(Project0Wnd->UserPort);
96 if(HandleProject0IDCMP() == FALSE)end = TRUE;
98 CloseProject0Window();
100 CloseDownScreen();
103 closelibs();
104 exit(0);
107 void LoadIcon(int argc,char **argv)
109 long i;
110 UBYTE fname[256];
111 if(!argc)
113 struct WBStartup *msg = (struct WBStartup *)argv;
114 if(msg)
116 if(msg->sm_NumArgs > 1)
118 for(i = 1; i < msg->sm_NumArgs;i++)
120 NameFromLock(msg->sm_ArgList[i].wa_Lock,fname,256);
121 AddPart(fname,msg->sm_ArgList[i].wa_Name,256);
122 load_config(fname);