void TTransBox::Show(int fast) { Buf = (byte*) memalloc(w * h); Bkg = (byte*) memalloc(w * h); lockmem(Buf, w * h); lockmem(Bkg, w * h); GetBitmap32(x, y, Bkg, w, h); MouseHide(); if (iniEnhancedGuiOn && (!fast)) for (int i = w; i > 0; i -= w/OPEN_STEP) {Draw(i); SDL_Delay(15);} memcpy(Buf, Templ, w * h); Draw(0); MouseShow(); }
bool Load(const char *filename) { static char fileName[stringsize] = ""; if(filename) strncat(strcpy(fileName, ""), filename, stringsize-1); if(strlen(fileName) == 0) return False; else if(seterror()==0) { initstack(); unlockmem(); inithashtable(); lockmem(); initlex(); initlib(); initsyslib(); initmodify(); parsefile(inipath); parsefile(fileName); checkdefinitions(); modify_definitions(); lockmem(); if (gettemplate("main")->tag == FUNC) { Interpret("main"); } return True; } else { initstack(); unlockmem(); inithashtable(); lockmem(); initlex(); initlib(); initsyslib(); initmodify(); parsefile(inipath); checkdefinitions(); modify_definitions(); lockmem(); return False; } }
void CreateInterpreter(void) { if(seterror() == 0) { Write(BANNER); createstack(); createhashtable(); createIO(); createmem(atol(GetOption("MemorySize"))); initstack(); inithashtable(); lockmem(); initlex(); initlib(); initsyslib(); initmodify(); parsefile(inipath); checkdefinitions(); modify_definitions(); lockmem(); } else exit(1); }