1
AGI Development Tools / Re: Sierra's Debug/Testing Version of AGI
« on: March 06, 2024, 02:55:29 PM »
Sorry for resurrecting an old thread, but I think the reason for the IO handling being different in this case is that they used a "debug"-build of the AGI interpreter.
If you look in the interpreter source code snippets found on various disks, you'll find the defined symbol "PRODUCTION". Open SEGPTR.C and you'll find a snippet like
That's probably all there is to it!
If you look in the interpreter source code snippets found on various disks, you'll find the defined symbol "PRODUCTION". Open SEGPTR.C and you'll find a snippet like
Code: [Select]
#if PRODUCTION
/*************** Production i/o (using volumes) ***********************/
void NotFound();
TEXT logDirName[] = "logdir";
TEXT viewDirName[] = "viewdir";
TEXT picDirName[] = "picdir";
TEXT sndDirName[] = "snddir";
....
#else
...
GetDirs()
{
STRPTR dp;
FILE_HANDLE fd;
COUNT len;
SetMark();
dp = GetMem(1000);
if ((fd = open("where", 0)) == NO_HANDLE) {
WindowPrint("No 'where' file.\nPress ESC to quit.");
Quit();
}
len = read(fd, dp, 1000);
*(dp+len) = 0;
close(fd);
GetStr(logDir, &dp);
GetStr(picDir, &dp);
GetStr(viewDir, &dp);
GetStr(sndDir, &dp);
GetStr(wordPath, &dp);
strcpy(objPath, wordPath);
strcat(wordPath, "words.tok");
strcat(objPath, "object");
wordFileName = wordPath;
objectFileName = objPath;
FreeMark();
}
That's probably all there is to it!

Thanks a lot for AGI Studio and its associated documentation - it helped ALOT during development!