diff options
Diffstat (limited to 'Bobi.c')
-rw-r--r-- | Bobi.c | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -1,5 +1,5 @@ /* -** $Id$ +** Bobi - The Ultimate Amiga Bob Manipulator ** ** Bobi.c - Hautprogramm ** @@ -44,6 +44,7 @@ ** 02-Nov-93 CHW V3.0 Compiliert mit sc6, ASL-Filerequester ** 13-Jun-20 CHW V3.1 Kann beim Startup Bob-File laden (CLI+WB) */ + #include <proto/exec.h> #include <exec/libraries.h> #include <proto/graphics.h> @@ -293,6 +294,9 @@ LONG Main(LONG arglen, char *argline) struct WBStartup *startup = (struct WBStartup *)argline; char filename[200] = "\0"; /* File beim Start laden? */ + LONG mainidcmpflags = MainNW.IDCMPFlags; + LONG toolidcmpflags = ToolNW.IDCMPFlags; + ToolNW.TopEdge=10000; /* ToolWindow ganz unten */ if(!(GfxBase = (struct GfxBase *)OpenLibrary("graphics.library",0L))) @@ -326,6 +330,29 @@ LONG Main(LONG arglen, char *argline) /* + ** Wenn ein Argument angegben wurde, Bobs laden + */ + if (arglen > 0) /* Start vom CLI */ + { + strncpy(filename, argline, arglen); + filename[arglen-1] = '\0'; + } + else if (startup->sm_NumArgs > 1) /* Started with some arguments */ + { + struct WBArg *arg = startup->sm_ArgList+1; + + if (arg->wa_Lock) + CurrentDir(arg->wa_Lock); + + if (arg->wa_Name && *arg->wa_Name) + strcpy(filename, arg->wa_Name); + } + + if (*filename) + LoadBobs(filename); + + + /* ** Tada! Die Hauptschleife */ for(;;) |