static int MakeSelection(int mode, int x, int character, struct PlayerData *data, int cmd) { switch (mode) { case MODE_MAIN: mode = MainMenu(x, character, cmd); break; case MODE_SELECTNAME: if (!NameSelection(x, character, data, cmd)) mode = MODE_MAIN; break; case MODE_SELECTFACE: if (!FaceSelection(x, character, data, cmd)) mode = MODE_MAIN; break; case MODE_SELECTSKIN: if (!SkinSelection(x, character, data, cmd)) mode = MODE_MAIN; break; case MODE_SELECTHAIR: if (!HairSelection(x, character, data, cmd)) mode = MODE_MAIN; break; case MODE_SELECTARMS: if (!ArmSelection(x, character, data, cmd)) mode = MODE_MAIN; break; case MODE_SELECTBODY: if (!BodySelection(x, character, data, cmd)) mode = MODE_MAIN; break; case MODE_SELECTLEGS: if (!LegSelection(x, character, data, cmd)) mode = MODE_MAIN; break; case MODE_LOADTEMPLATE: if (!TemplateSelection(1, x, character, data, cmd)) mode = MODE_MAIN; break; case MODE_SAVETEMPLATE: if (!TemplateSelection(0, x, character, data, cmd)) mode = MODE_MAIN; break; } DisplayPlayer(x, data, character, mode == MODE_SELECTNAME); // ShowPlayerControls(x, data); return mode; }
static void ShowSelection(int x, struct PlayerData *data, int character) { int i; DisplayPlayer(x, data, character, 0); if (data->weaponCount == 0) { TextStringAt(x + 40, (SCREEN_HEIGHT / 10) + 20, "None selected..."); } else { for (i = 0; i < data->weaponCount; i++) TextStringAt(x + 40, (SCREEN_HEIGHT / 10) + 20 + i * TextHeight(), gunDesc[data->weapons[i]].gunName); } }
static void ShowSelection(int x, struct PlayerData *data, int character) { DisplayPlayer(x, data, character, 0); if (data->weaponCount == 0) { CDogsTextStringAt( x + 40, (gGraphicsDevice.cachedConfig.ResolutionHeight / 10) + 20, "None selected..."); } else { int i; for (i = 0; i < data->weaponCount; i++) { CDogsTextStringAt( x + 40, (gGraphicsDevice.cachedConfig.ResolutionHeight / 10) + 20 + i * CDogsTextHeight(), gGunDescriptions[data->weapons[i]].gunName); } } }
void DisplayAutoMap(int showAll) { int x, y, i, j; TTile *tile; unsigned char *p; unsigned char *screen; TTileItem *t; int cmd1, cmd2; int obj; screen = p = GetDstScreen(); for (x = 0; x < SCREEN_MEMSIZE; x++) p[x] = tableGreen[p[x] & 0xFF]; screen += MAP_YOFFS * SCREEN_WIDTH + MAP_XOFFS; for (y = 0; y < YMAX; y++) for (i = 0; i < MAP_FACTOR; i++) { for (x = 0; x < XMAX; x++) if (AutoMap(x, y) || showAll) { tile = &Map(x, y); for (j = 0; j < MAP_FACTOR; j++) if ((tile->flags & IS_WALL) != 0) *screen++ = WALL_COLOR; else if ((tile->flags & NO_WALK) != 0) *screen++ = DoorColor(x, y); else *screen++ = FLOOR_COLOR; } else screen += MAP_FACTOR; screen += SCREEN_WIDTH - XMAX * MAP_FACTOR; } for (y = 0; y < YMAX; y++) for (x = 0; x < XMAX; x++) { t = Map(x, y).things; while (t) { if ((t->flags & TILEITEM_OBJECTIVE) != 0) { obj = ObjectiveFromTileItem(t-> flags); if ((gMission.missionData-> objectives[obj]. flags & OBJECTIVE_HIDDEN) == 0 || showAll) { if ((gMission.missionData-> objectives[obj]. flags & OBJECTIVE_POSKNOWN) != 0 || AutoMap(x, y) || showAll) DisplayObjective(t, obj); } } else if (t->kind == KIND_OBJECT && t->data && AutoMap(x, y)) { TObject *o = t->data; if (o->objectIndex == OBJ_KEYCARD_RED) DrawDot(t, RED_DOOR_COLOR); else if (o->objectIndex == OBJ_KEYCARD_BLUE) DrawDot(t, BLUE_DOOR_COLOR); else if (o->objectIndex == OBJ_KEYCARD_GREEN) DrawDot(t, GREEN_DOOR_COLOR); else if (o->objectIndex == OBJ_KEYCARD_YELLOW) DrawDot(t, YELLOW_DOOR_COLOR); } t = t->next; } } DisplayPlayer(gPlayer1); DisplayPlayer(gPlayer2); DisplayExit(); DisplaySummary(); CopyToScreen(); if (!showAll) { do { cmd1 = cmd2 = 0; GetPlayerCmd(gPlayer1 ? &cmd1 : NULL, gPlayer2 ? &cmd2 : NULL); } while (((cmd1 | cmd2) & CMD_BUTTON3) != 0 || KeyDown(gOptions.mapKey)); memset(GetDstScreen(), 0, SCREEN_MEMSIZE); } }