| 329 |
errorSl: TStringList; |
errorSl: TStringList; |
| 330 |
errorFileName: string; |
errorFileName: string; |
| 331 |
Item: TRoundItem; |
Item: TRoundItem; |
| 332 |
|
delCount: Integer; |
| 333 |
begin |
begin |
| 334 |
sl := TStringList.Create; |
sl := TStringList.Create; |
| 335 |
errorSl := TStringList.Create; |
errorSl := TStringList.Create; |
| 348 |
end; |
end; |
| 349 |
end; |
end; |
| 350 |
//Item := TRoundItem.Create; |
//Item := TRoundItem.Create; |
| 351 |
|
delCount := 0; |
| 352 |
//1行目はバージョン |
//1行目はバージョン |
| 353 |
if sl[0] = ROUND_INDEX_VERSION then begin |
if sl[0] = ROUND_INDEX_VERSION then begin |
| 354 |
for i := 1 to sl.Count - 1 do begin |
for i := 1 to sl.Count - 1 do begin |
| 355 |
Item := ParseRoundBoardLine(sl[i]); |
Item := ParseRoundBoardLine(sl[i - delCount]); |
| 356 |
if Item <> nil then begin |
if Item <> nil then begin |
| 357 |
FBoardList.Add(Item); |
FBoardList.Add(Item); |
| 358 |
RoundNameList.Add(Item.RoundName); |
RoundNameList.Add(Item.RoundName); |
| 359 |
end else begin |
end else begin |
| 360 |
errorSl.Add( sl[i] ); |
errorSl.Add( sl[i - delCount] ); |
| 361 |
sl.Delete(i); |
sl.Delete(i- delCount); |
| 362 |
|
Inc(delCount); |
| 363 |
end; |
end; |
| 364 |
end; |
end; |
| 365 |
end else begin |
end else begin |
| 366 |
if FOldFileRead then begin //ギコナビ本体がボードファイルをよみとった後じゃないとクラッシュするので |
if FOldFileRead then begin //ギコナビ本体がボードファイルをよみとった後じゃないとクラッシュするので |
| 367 |
for i := 1 to sl.Count - 1 do begin |
for i := 1 to sl.Count - 1 do begin |
| 368 |
Item := ParseOldRoundBoardLine(sl[i]); |
Item := ParseOldRoundBoardLine(sl[i - delCount]); |
| 369 |
if Item <> nil then begin |
if Item <> nil then begin |
| 370 |
FBoardList.Add(Item); |
FBoardList.Add(Item); |
| 371 |
RoundNameList.Add(Item.RoundName); |
RoundNameList.Add(Item.RoundName); |
| 372 |
end else begin |
end else begin |
| 373 |
errorSl.Add( sl[i] ); |
errorSl.Add( sl[i- delCount] ); |
| 374 |
sl.Delete(i); |
sl.Delete(i- delCount); |
| 375 |
|
Inc(delCount); |
| 376 |
end; |
end; |
| 377 |
end; |
end; |
| 378 |
end else |
end else |
| 395 |
errorSl: TStringList; |
errorSl: TStringList; |
| 396 |
errorFileName: string; |
errorFileName: string; |
| 397 |
Item: TRoundItem; |
Item: TRoundItem; |
| 398 |
|
delCount: Integer; |
| 399 |
// boardList : TStringList; |
// boardList : TStringList; |
| 400 |
begin |
begin |
| 401 |
// boardList := TStringList.Create; |
// boardList := TStringList.Create; |
| 417 |
end; |
end; |
| 418 |
end; |
end; |
| 419 |
//Item := TRoundItem.Create; |
//Item := TRoundItem.Create; |
| 420 |
|
delCount := 0; |
| 421 |
//1行目はバージョン |
//1行目はバージョン |
| 422 |
if sl[0] = ROUND_INDEX_VERSION then begin |
if sl[0] = ROUND_INDEX_VERSION then begin |
| 423 |
for i := 1 to sl.Count - 1 do begin |
for i := 1 to sl.Count - 1 do begin |
| 424 |
Item := ParseRoundThreadLine(sl[i]); |
Item := ParseRoundThreadLine(sl[i - delCount]); |
| 425 |
if Item <> nil then begin |
if Item <> nil then begin |
| 426 |
FItemList.Add(Item); |
FItemList.Add(Item); |
| 427 |
RoundNameList.Add(Item.RoundName); |
RoundNameList.Add(Item.RoundName); |
| 428 |
end else begin |
end else begin |
| 429 |
errorSl.Add(sl[i]); |
errorSl.Add(sl[i - delCount]); |
| 430 |
sl.Delete(i); |
sl.Delete(i - delCount); |
| 431 |
|
Inc(delCount); |
| 432 |
end; |
end; |
| 433 |
end; |
end; |
| 434 |
end else begin |
end else begin |
| 435 |
LoadRoundBoardFile; |
LoadRoundBoardFile; |
| 436 |
for i := 1 to sl.Count - 1 do begin |
for i := 1 to sl.Count - 1 do begin |
| 437 |
Item := ParseOldRoundThreadLine(sl[i]); |
Item := ParseOldRoundThreadLine(sl[i - delCount]); |
| 438 |
if Item <> nil then begin |
if Item <> nil then begin |
| 439 |
FItemList.Add(Item); |
FItemList.Add(Item); |
| 440 |
RoundNameList.Add(Item.RoundName); |
RoundNameList.Add(Item.RoundName); |
| 441 |
end else begin |
end else begin |
| 442 |
errorSl.Add(sl[i]); |
errorSl.Add(sl[i - delCount]); |
| 443 |
sl.Delete(i); |
sl.Delete(i - delCount); |
| 444 |
|
Inc(delCount); |
| 445 |
end; |
end; |
| 446 |
end; |
end; |
| 447 |
end; |
end; |
| 623 |
end; |
end; |
| 624 |
except |
except |
| 625 |
Result := nil; |
Result := nil; |
| 626 |
Exit; |
break; |
| 627 |
end; |
end; |
| 628 |
end; |
end; |
| 629 |
end; |
end; |