struct item_* __fastcall__ GetItemPtr (void) { return &Item[Itm1]; } static void printitmname (void) { printtok (hidereadw((void*)&GetItemPtr()->Name)); } void vLook (void)//char Itm1) { static void (*func)(void); if (Itm1!=0xFF) { if (Itm1>=128 && Itm1<160){ //i= } if (SearchInv (Player.Inv) || SearchInv (CurRoomInv)) { if (hidereadw((void*)GetItemPtr()->Info)==0) { printtok ("No help available for that %W."); return; } printtok (hidereadw((void*)GetItemPtr()->Info)); //printtok ((void*)&Item[Itm1].Info); } else { printnoitem(); } return; } StoreNum=-1; CRm=&Room[Player.CurRoom]; CurRoomInv=Player.RoomInv[Player.CurRoom]; printtok ((char*)hidereadw((void*)&CRm->Desc)); func=hidereadw((void*)&CRm->RoomHandler); (*func) (); printcr(); for (i=0; i<8 && (Itm1=CurRoomInv[i])!=0xFF;++i) { prints ("There is a "); printitmname(); printscr (" here."); } if (i) /*{cputc (13); cputc (10);}*/ printcr(); } void vGo (void)//char Itm1) { //static char s; /* 1 if go successful */ //static char Dir; //static unsigned char i; i=0; // switch (Itm1) // { // case iNorth: // case iSouth: // case iEast: // case iWest: // i=1; j = Itm1-iNorth; break; // case iTeleporter: if (Itm1>=160 && Itm1<164) { i=1; j = Itm1&0x0F; } if (Itm1==iTeleporter) { if (SearchInv(CurRoomInv)) { printtok ("There's no teleporter here."); return; } Player.ExitRoom = Player.CurRoom; Player.CurRoom = rTeleporter; goto x0; //i = 1; } /*if (i == 0) { printmsg(msgCantGoThere); return; }*/ if (i == 0 || (i= CRm->NextRoom[j])==255) { printmsg(msgCantGoThere); return; } Player.CurRoom = i; Player.ExitRoom = -1; //i = 1; x0: vLook2(); return; }; void vGet (void)//char Itm1) { //i=-1; if (Itm1>=128 && Itm1<160) { if (GetCateItem ((void*)&CurRoomInv)) return; } if (SearchInv (CurRoomInv)) { //printscr (Message[msgItemNotAvail]); return; printnoitem(); return; } if (Player.Inv[7] != 255) { //printscr ("You don't have room for that item."); printmsg (msgHoldingTooManyItems); return; } if (SearchInv (Player.Inv)) { //printtok ("You already have that %W."); return; printmsg (msgAlreadyHave); return; } if (hidereadw((void*)GetItemPtr()->Attrib) & itemAMovable) { if (!RemoveInv (CurRoomInv)) { //printscr (Message[msgItemNotAvail]); printnoitem(); return; } if (AddInv (&Player.Inv) <0) { //printscr ("You cannot carry any more items."); printmsg (msgHoldingTooManyItems); return; } printokay(); return; } //else { printcantmove (); //} } void vPut (void)//char Itm1) { //char i; //if (Itm1>=128 && Itm1<160) { if (GetCateItem2 ()) return; //} //i = SearchInv (Player.Inv); if (SearchInv (Player.Inv)) { //printscr ("You don't have that item."); return; printmsgDontHave(); return; } for (i = 0; CurRoomInv[i] !=255 && i<8; ++i); if (i == 8) { //printscr ("This room is full."); printmsg (msgTooManyItemsInRoom); return; } if (hidereadw((void*)GetItemPtr()->Attrib) & itemAMovable) { if (RemoveInv (Player.Inv) == 0) { //printscr ("This item's not available."); printmsgDontHave(); return; } if (AddInv (CurRoomInv)<0) { //printscr ("Can't put that item down here."); printmsg (msgTooManyItemsInRoom); return; } //printscr ("Okay."); printokay(); } else { //printscr ("You can't move this item."); return; printcantmove (); } }