public void SetProBowlPlayer(Conference conf, String proBowlPos, String fromTeam, TSBPlayer fromTeamPos) { //NFC => 30*2 + (int) int offset = 0; if (conf == Conference.NFC) offset += 0x48; //(30 spots * 2 bytes); int teamIndex = GetTeamIndex(fromTeam); byte ti = (byte)teamIndex; byte pi = (byte)fromTeamPos; int posIndex = -1; switch(proBowlPos) { case "RET1": posIndex = positionNames.Length; break; case "RET2": posIndex = positionNames.Length +1; break; case "RET3": posIndex = positionNames.Length +2; break; default: posIndex = GetPositionIndex(proBowlPos); break; } int loc = mProwbowlStartingLoc + offset + (2 * posIndex); OutputRom[loc ] = pi; OutputRom[loc + 1] = ti; }
/// </summary> /// <param name="conf"></param> /// <param name="proBowlPos"></param> /// <param name="fromTeam"></param> /// <param name="fromTeamPos"></param> public void SetProBowlPlayer(Conference conf, String proBowlPos, String fromTeam, TSBPlayer fromTeamPos) { //NFC => 30*2 + (int) int offset = 0; if (conf == Conference.NFC) offset += 60; //(30 spots * 2 bytes); int teamIndex = GetTeamIndex(fromTeam); if (teamIndex < 0) { throw new Exception(String.Format("Error, team '{0}' is invalid",fromTeam)); } byte val1 = (byte)teamIndex; byte val2 = (byte)fromTeamPos; int posIndex = GetPositionIndex(proBowlPos); int loc = mProwbowlStartingLoc + offset + (2* posIndex); OutputRom[loc] = val1; OutputRom[loc+1] = val2; }