//----------------------------------------------------------- // Read texture position //----------------------------------------------------------- void C_Cover::ReadSize(SStream *str) { if (0 == mgg) gtfo("Mother Gauge needed"); int px = 0; int py = 0; int wd = 0; int ht = 0; ReadSIZE(str,&px,&py,&wd,&ht); px += mgg->GetXPos(); py += mgg->GetYPos(); //---- Build the needle quad ------------------------ vtab = new TC_VTAB[4]; vOfs = mgg->FixRoom(4); mgg->BuildQuad(vtab,px,py,wd,ht); quad = vtab; }
//--------------------------------------------------------------------- // Read parameters (Read from) //--------------------------------------------------------------------- int C_Knob::Read(SStream *stream, Tag tag) { switch (tag) { case 'fixe': fixe = 1; return TAG_READ; case 'file': case 'bmap': rotn.GetTexture(stream); return TAG_READ; case 'rect': case 'size': { ReadSIZE(stream,&x1,&y1,&wd,&ht); InitQuad(); return TAG_READ; } case 'posn': ReadPOSN(stream); return TAG_READ; case 'proj': ReadPROJ(stream); return TAG_READ; case 'curs': { char cart[64] = {0}; ReadString (cart, 64, stream); if (cart[0] == 0) TAG_READ; cTag = globals->cum->BindCursor (cart); return TAG_READ; } case 'help': { ReadString (help, 64, stream); return TAG_READ; } } return TAG_IGNORED; }