void ViewMap (void) { id0_boolean_t button0held; viewtype = actoratview; button0held = false; maporgx = player->tilex - VIEWTILEX/2; if (maporgx<0) maporgx = 0; maporgy = player->tiley - VIEWTILEY/2; if (maporgy<0) maporgy = 0; do { // // let user pan around // IN_ReadControl(0,&control); if (control.xaxis == -1 && maporgx>0) maporgx--; if (control.xaxis == 1 && maporgx<mapwidth-VIEWTILEX) maporgx++; if (control.yaxis == -1 && maporgy>0) maporgy--; if (control.yaxis == 1 && maporgy<mapheight-VIEWTILEY) maporgy++; if (control.button0 && !button0held) { button0held = true; // REFKEEN - Make this C++ friendly if (viewtype == lastview-1) viewtype = mapview; else viewtype = (viewtypeenum)(viewtype + 1); #if 0 viewtype++; if (viewtype==lastview) viewtype = mapview; #endif } if (!control.button0) button0held = false; OverheadRefresh (); BE_ST_ShortSleep(); } while (!Keyboard[sc_Escape]); IN_ClearKeysDown (); DrawPlayScreen (); }
void ViewMap (void) { boolean button0held; viewtype = actoratview; // button0held = false; maporgx = player->tilex - VIEWTILEX/2; if (maporgx<0) maporgx = 0; if (maporgx>MAPSIZE-VIEWTILEX) maporgx=MAPSIZE-VIEWTILEX; maporgy = player->tiley - VIEWTILEY/2; if (maporgy<0) maporgy = 0; if (maporgy>MAPSIZE-VIEWTILEY) maporgy=MAPSIZE-VIEWTILEY; do { // // let user pan around // PollControls (); if (controlx < 0 && maporgx>0) maporgx--; if (controlx > 0 && maporgx<mapwidth-VIEWTILEX) maporgx++; if (controly < 0 && maporgy>0) maporgy--; if (controly > 0 && maporgy<mapheight-VIEWTILEY) maporgy++; #if 0 if (c.button0 && !button0held) { button0held = true; viewtype++; if (viewtype>visview) viewtype = mapview; } if (!c.button0) button0held = false; #endif OverheadRefresh (); } while (!Keyboard[sc_Escape]); IN_ClearKeysDown (); }
void ViewMap (void) { boolean button0held; viewtype = actoratview; button0held = false; maporgx = player->tilex - VIEWTILEX/2; if (maporgx<0) maporgx = 0; maporgy = player->tiley - VIEWTILEY/2; if (maporgy<0) maporgy = 0; do { // // let user pan around // IN_ReadControl(0,&control); if (control.xaxis == -1 && maporgx>0) maporgx--; if (control.xaxis == 1 && maporgx<mapwidth-VIEWTILEX) maporgx++; if (control.yaxis == -1 && maporgy>0) maporgy--; if (control.yaxis == 1 && maporgy<mapheight-VIEWTILEY) maporgy++; if (control.button0 && !button0held) { button0held = true; viewtype++; if (viewtype==lastview) viewtype = mapview; } if (!control.button0) button0held = false; OverheadRefresh (); } while (!Keyboard[sc_Escape]); IN_ClearKeysDown (); DrawPlayScreen (); }