| 1035 | } |
| 1036 | |
| 1037 | void CObjectDialog::OnJumpToStartPos() { |
| 1038 | char str[255]; |
| 1039 | int found_obj = -1; |
| 1040 | int highest = -1; |
| 1041 | for (int i = 0; i <= Highest_object_index && found_obj == -1; i++) { |
| 1042 | if (Objects[i].type == OBJ_PLAYER) { |
| 1043 | if (Objects[i].id > highest) |
| 1044 | highest = Objects[i].id; |
| 1045 | |
| 1046 | if (Objects[i].id == m_current_start_pos) { |
| 1047 | found_obj = i; |
| 1048 | } |
| 1049 | } |
| 1050 | } |
| 1051 | |
| 1052 | if (found_obj == -1) { |
| 1053 | sprintf(str, "There was no player defined for this start position. The highest numbered player is #%d.", highest); |
| 1054 | OutrageMessageBox(str); |
| 1055 | } else { |
| 1056 | MoveViewer(&Objects[found_obj].pos, Objects[found_obj].roomnum, &Objects[found_obj].orient); |
| 1057 | TV_changed = 1; |
| 1058 | } |
| 1059 | } |
| 1060 | |
| 1061 | void CObjectDialog::OnRedCheck() { |
| 1062 | int cur = m_current_start_pos; |
nothing calls this directly
no test coverage detected