[okadu] Version 2.14a バグ修正いろいろ
@@ -452,6 +452,10 @@ | ||
452 | 452 | m_GirderPlugin->CopyMapTemp(m_GirderMapV); |
453 | 453 | m_GirderPlugin->AddMapTemp(m_SegLen); |
454 | 454 | } |
455 | + if(m_LinePlugin){ | |
456 | + m_LinePlugin->CopyMapTemp(m_LineMapV); | |
457 | + m_LinePlugin->AddMapTemp(m_SegLen); // 本当は架線の折れ線距離を計算する必要があるが… | |
458 | + } | |
455 | 459 | } |
456 | 460 | |
457 | 461 | /* |
@@ -1262,7 +1266,15 @@ | ||
1262 | 1266 | IPolePos ipo = m_PoleList.begin(); |
1263 | 1267 | for(; ipo!=m_PoleList.end(); ipo++) ipo->RestoreAddress(); |
1264 | 1268 | IPGroupEndLocator ipge = m_GroupEnd.begin(); |
1265 | - for(; ipge!=m_GroupEnd.end(); ipge++) *ipge = (CGroupEndLocator *)ReplaceAdr(*ipge); | |
1269 | + for(; ipge!=m_GroupEnd.end();){ | |
1270 | + *ipge = (CGroupEndLocator *)ReplaceAdr(*ipge); | |
1271 | + if(*ipge){ | |
1272 | + ++ipge; | |
1273 | + }else{ | |
1274 | + //Dialog("GroupEnd not found!"); | |
1275 | + ipge = m_GroupEnd.erase(ipge); | |
1276 | + } | |
1277 | + } | |
1266 | 1278 | } |
1267 | 1279 | |
1268 | 1280 | /* |
@@ -86,6 +86,7 @@ | ||
86 | 86 | bool PickScene(VEC3, VEC3, VEC3 *, VEC3 *tri = NULL, int inv = 1); |
87 | 87 | bool ClipAlt(VEC3 *, VEC3 *, VEC3 *, int); |
88 | 88 | void Dump(); |
89 | + void SetDumpReady(bool r){ m_IsDumpReady = r; } | |
89 | 90 | void RenderScene(); |
90 | 91 | void RenderAfter(); |
91 | 92 | void SimulateScene(); |
@@ -101,6 +101,7 @@ | ||
101 | 101 | virtual void ScanInputCursorScenery() = 0; |
102 | 102 | void RenderScenery(); |
103 | 103 | virtual void RenderCursorScenery(){} |
104 | + virtual void RenderCursorSceneryFull(){} | |
104 | 105 | bool IsPausedScenery(){ return IsPausedCursorScenery(); } |
105 | 106 | virtual bool IsPausedCursorScenery(){ return false; } |
106 | 107 | }; |
@@ -29,6 +29,8 @@ | ||
29 | 29 | |
30 | 30 | CWindowDivInfo *GetDiv(){ return m_Div; } |
31 | 31 | CWindowDivInfo **GetDivAdr(){ return &m_Div; } |
32 | + int GetWidth() const { return m_Width; } | |
33 | + int GetHeight() const { return m_Height; } | |
32 | 34 | CScene *GetScene(){ return m_Scene; } |
33 | 35 | CCamera *GetCamera(){ return &m_Camera; } |
34 | 36 | void SetCamera(const CCamera& cam){ m_Camera = cam; } |
@@ -17,6 +17,11 @@ | ||
17 | 17 | #include "CSimulationMode.h" |
18 | 18 | #include "CConfigMode.h" |
19 | 19 | #include "CNeutralMode.h" |
20 | +#include "CRailPlugin.h" | |
21 | +#include "CTiePlugin.h" | |
22 | +#include "CGirderPlugin.h" | |
23 | +#include "CPierPlugin.h" | |
24 | +#include "CLinePlugin.h" | |
20 | 25 | |
21 | 26 | // 関数宣言 |
22 | 27 | bool IsLeapYear(int); |
@@ -345,6 +350,12 @@ | ||
345 | 350 | } |
346 | 351 | DeleteWarp(); |
347 | 352 | CScene **adr = &m_SceneList; |
353 | + g_Scene = sc; | |
354 | + g_RailPluginList->ClearDumpAll(); | |
355 | + g_TiePluginList->ClearDumpAll(); | |
356 | + g_GirderPluginList->ClearDumpAll(); | |
357 | + g_PierPluginList->ClearDumpAll(); | |
358 | + g_LinePluginList->ClearDumpAll(); | |
348 | 359 | g_Scene = NULL; |
349 | 360 | while(*adr){ |
350 | 361 | if(*adr==sc){ |
@@ -363,6 +374,11 @@ | ||
363 | 374 | g_Scene = m_SceneList = new CScene(g_DefaultSurface, g_DefaultEnv, lang(InitialScene)); |
364 | 375 | m_SceneNum = 1; |
365 | 376 | } |
377 | + CScene *ptr = m_SceneList; | |
378 | + while(ptr){ | |
379 | + ptr->SetDumpReady(false); | |
380 | + ptr = ptr->Next(); | |
381 | + } | |
366 | 382 | NumberScene(); |
367 | 383 | g_Scene->Enter(false); |
368 | 384 | g_ConfigMode->GetRootWindow()->OnDeleteScene(sc); |
@@ -149,6 +149,17 @@ | ||
149 | 149 | } |
150 | 150 | if(GetFocusInst() && GetFocusInst()->GetScene()==g_Scene){ |
151 | 151 | if(ms_PhotoMode<1) m_FocusInfo.GetPartsInst()->DrawBox(); |
152 | + //GetFocusInst()->PrintInfo(); // Full | |
153 | + } | |
154 | + } | |
155 | +} | |
156 | + | |
157 | +/* | |
158 | + * レンダリング (画面分割無視) | |
159 | + */ | |
160 | +void CNeutralMode::RenderCursorSceneryFull(){ | |
161 | + if(ms_PhotoMode<2){ | |
162 | + if(GetFocusInst() && GetFocusInst()->GetScene()==g_Scene){ | |
152 | 163 | GetFocusInst()->PrintInfo(); |
153 | 164 | } |
154 | 165 | } |
@@ -28,6 +28,7 @@ | ||
28 | 28 | void EnterCursorScenery(); |
29 | 29 | void ScanInputCursorScenery(); |
30 | 30 | void RenderCursorScenery(); |
31 | + void RenderCursorSceneryFull(); | |
31 | 32 | bool IsWindowDivisible(){ return true; } |
32 | 33 | }; |
33 | 34 |
@@ -18,7 +18,7 @@ | ||
18 | 18 | |
19 | 19 | // 内部定数 |
20 | 20 | extern const float RAILSIM_VERSION = 2.14f; // 本体バージョン |
21 | -extern const char* VERSION_STRING = "2.14"; // 表示バージョン文字列 (2.00a 等のバグ修正コードを含む) | |
21 | +extern const char* VERSION_STRING = "2.14a"; // 表示バージョン文字列 (2.00a 等のバグ修正コードを含む) | |
22 | 22 | |
23 | 23 | // 外部グローバル |
24 | 24 | extern char *g_PluginViewArg; |
@@ -73,6 +73,7 @@ | ||
73 | 73 | // m_Bank = bank; |
74 | 74 | m_Dist = dist<0.0f ? m_DefDist : dist; |
75 | 75 | m_FieldOfView = 0.25f*D3DX_PI; |
76 | + m_Wheel = 0.0f; | |
76 | 77 | SetCenter(); |
77 | 78 | } |
78 | 79 |
@@ -40,7 +40,7 @@ | ||
40 | 40 | <tr><td class="nowrap">RailSim II<br>Version 2.11</td><td>2009/02/07<br>Added manual control mode and ignore acceleration and deceleration mode.<br>Implemented splitting and merging of trains.<br>2009/04/26 - 2.11 additional description<br>Added new system-defined coordinate systems: "_CAMERA", "_LIGHT" (which enables billboards etc.).<br>2009/06/06 - 2.11a<br>Fixed a problem of wrong data source of Diffuse and Ambient material value in *.x files for RS2 train plugins. cf. material-changer</td></tr> |
41 | 41 | <tr><td class="nowrap">RailSim II<br>Version 2.12</td><td>2009/11/16<br>Supported downsampling and AVI saving for video (no audio recording yet).<br>Supported rail blocks and speed limit.<br>Implemented stereoscopy mode (switch at configulations mode).<br>Re-ordering in the train list, the car list and the scene list by drag & drop.<br>Fix: on network connection, UDP port should be opened, not TCP.</td></tr> |
42 | 42 | <tr><td class="nowrap">RailSim II<br>Version 2.13</td><td>2010/11/23<br>The function to move a platform along an object is implemented.<br>The functions to connect platforms dynamically in station plugins (rail-connector, rail-brancher, rail-disconnector) are implemented.<br>Added turntable test, traverser test and point test by a station plugin as sample plugins.<br>Supported select-all by Ctrl + A key on text input.<br>2012/03/20 - 2.13a<br>Bug fix on building multi track railways, causing the first track disappear.</td></tr> |
43 | -<tr><td class="nowrap">RailSim II<br>Version 2.14</td><td>2012/08/28<br>The screen is splittable in neutral mode.<br>In diagram setting, stop position at station can be specified with number.<br>Some bug fix on loading layout data.</td></tr> | |
43 | +<tr><td class="nowrap">RailSim II<br>Version 2.14</td><td>2012/08/28<br>The screen is splittable in neutral mode.<br>In diagram setting, stop position at station can be specified with number.<br>Some bug fix on loading layout data.<br>2012/09/09 - 2.14a<br>Fixed a bug of train speed display when using screen division.<br>Fixed a bug that train speed exceeds the plugin setting on speed limit region.<br>Fixed a crash when using line plugins which contain Profile description.<br>Fixed a bug that rail of deleted scene is displayed on another scene.<br>Some bug fix on loading layout data.</td></tr> | |
44 | 44 | </table> |
45 | 45 | </div> |
46 | 46 | </div> |
@@ -34,7 +34,7 @@ | ||
34 | 34 | <div class="contbox"> |
35 | 35 | <h2>Version 2.14</h2> |
36 | 36 | <p class="joint">Changes from previous version 2.13a to current 2.14 are below.</p> |
37 | -<p>2012/08/28 - 2.14<br>The screen is splittable in <a href="help/opr_neutral.html">neutral mode</a>.<br>In diagram setting, stop position at station can be specified with number.<br>Some bug fix on loading layout data.</p> | |
37 | +<p>2012/08/28 - 2.14<br>The screen is splittable in <a href="help/opr_neutral.html">neutral mode</a>.<br>In diagram setting, stop position at station can be specified with number.<br>Some bug fix on loading layout data.<br>2012/09/09 - 2.14a<br>Fixed a bug of train speed display when using screen division.<br>Fixed a bug that train speed exceeds the plugin setting on speed limit region.<br>Fixed a crash when using line plugins which contain Profile description.<br>Fixed a bug that rail of deleted scene is displayed on another scene.<br>Some bug fix on loading layout data.</p> | |
38 | 38 | </div> |
39 | 39 | <div class="contbox"> |
40 | 40 | <h2>Index</h2> |
@@ -41,7 +41,7 @@ | ||
41 | 41 | <tr><td class="nowrap">RailSim II<br>Version 2.11</td><td>2009/02/07<br>マニュアル操作モード・加減速度無視モードを追加。<br>編成の分割・併合機能を実装。<br>2009/04/26 - 2.11 追記<br>システム座標系に "_CAMERA", "_LIGHT" を追加(ビルボード等を実現可能)。<br>2009/06/06 - 2.11a<br>RS2 仕様の車輌プラグインにおいて *.x ファイルの Diffuse, Ambient マテリアル値が使用されていない問題を修正。参考: material-changer</td></tr> |
42 | 42 | <tr><td class="nowrap">RailSim II<br>Version 2.12</td><td>2009/11/16<br>ビデオ撮影にダウンサンプル機能、AVI 形式保存機能を追加(録音は未対応)。<br>閉塞区間機能および制限速度機能を実装。<br>ステレオ画面機能を実装 (オプション設定で切り替え)。<br>編成リスト、車輌リスト、シーンリストのドラッグ&ドロップによる並び替えに対応。<br>訂正: ネットワーク接続で開放が必要なポートは TCP ではなく UDP の誤りでした。<br>2010/08/15<br>LGPL ライセンスによりオープンソース化。</td></tr> |
43 | 43 | <tr><td class="nowrap">RailSim II<br>Version 2.13</td><td>2010/11/23<br>プラットフォームをオブジェクトに連動して動かす機能を実装。<br>駅舎プラグインにおいてプラットフォーム同士を動的に接続する機能 (rail-connector, rail-brancher, rail-disconnector) を実装。<br>サンプルプラグインに転車台テスト、遷車台テスト、駅舎プラグインによる分岐テストを追加。<br>テキスト入力時に Ctrl + A キーによる全選択に対応。<br>2012/03/20 - 2.13a<br>複線設置時に 1 本目のレールが正常に表示されなくなるバグを修正。</td></tr> |
44 | -<tr><td class="nowrap">RailSim II<br>Version 2.14</td><td>2012/08/28<br>ニュートラルモードに画面分割機能を追加。<br>ダイヤ設定のホーム停止位置を数値指定できるようにした。<br>レイアウト読み込み時の不具合を一部修正。</td></tr> | |
44 | +<tr><td class="nowrap">RailSim II<br>Version 2.14</td><td>2012/08/28<br>ニュートラルモードに画面分割機能を追加。<br>ダイヤ設定のホーム停止位置を数値指定できるようにした。<br>レイアウト読み込み時の不具合を一部修正。<br>2012/09/09 - 2.14a<br>画面分割時に列車速度等が正しく表示されない問題を修正。<br>速度制限時に編成速度がプラグインの設定値を超える不具合を修正。<br>架線プラグインで Profile を記述すると線路延長時に落ちる不具合を修正。<br>削除したシーンのレールが他のシーンに表示される不具合を修正。<br>レイアウト読み込み時の不具合を一部修正。</td></tr> | |
45 | 45 | </table> |
46 | 46 | </div> |
47 | 47 | </div> |
@@ -32,9 +32,9 @@ | ||
32 | 32 | <p>RailSim II をダウンロードしていただきありがとうございます。<br>初めてご利用になる方はまず<a href="help/introduction.html">はじめに</a>をお読みください。</p> |
33 | 33 | </div> |
34 | 34 | <div class="contbox"> |
35 | -<h2>Version 2.14</h2> | |
36 | -<p class="joint">前バージョン 2.13a から 2.14 への変更点は以下の通りです。</p> | |
37 | -<p>2012/08/28 - 2.14<br><a href="help/opr_neutral.html">ニュートラルモード</a>に画面分割機能を追加。<br>ダイヤ設定のホーム停止位置を数値指定できるようにした。<br>レイアウト読み込み時の不具合を一部修正。</p> | |
35 | +<h2>Version 2.14a</h2> | |
36 | +<p class="joint">前バージョン 2.13a から 2.14a への変更点は以下の通りです。</p> | |
37 | +<p>2012/08/28 - 2.14<br><a href="help/opr_neutral.html">ニュートラルモード</a>に画面分割機能を追加。<br>ダイヤ設定のホーム停止位置を数値指定できるようにした。<br>レイアウト読み込み時の不具合を一部修正。<br>2012/09/09 - 2.14a<br>画面分割時に列車速度等が正しく表示されない問題を修正。<br>速度制限時に編成速度がプラグインの設定値を超える不具合を修正。<br>架線プラグインで Profile を記述すると線路延長時に落ちる不具合を修正。<br>削除したシーンのレールが他のシーンに表示される不具合を修正。<br>レイアウト読み込み時の不具合を一部修正。</p> | |
38 | 38 | </div> |
39 | 39 | <div class="contbox"> |
40 | 40 | <h2>目次</h2> |
@@ -671,8 +671,11 @@ | ||
671 | 671 | g_WindDirObject.RenderA(alpha); |
672 | 672 | } |
673 | 673 | devResetMatrix(); |
674 | - g_StrTex->RenderRight(g_DispWidth*45/100, g_DispHeight-TILE_UNIT, | |
675 | - 0xffffffff, 0xff000000, FlashIn("%s: %.1f [m/s]", lang(WindSpeed), MAXFPS*windspeed)); | |
674 | + if(ms_ActiveMode!=g_NeutralMode || !g_ConfigMode->IsWindowDiv()){ | |
675 | + int vp_w = g_DispWidth, vp_h = g_DispHeight; | |
676 | + g_StrTex->RenderRight(vp_w*45/100, vp_h-TILE_UNIT, | |
677 | + 0xffffffff, 0xff000000, FlashIn("%s: %.1f [m/s]", lang(WindSpeed), MAXFPS*windspeed)); | |
678 | + } | |
676 | 679 | } |
677 | 680 | |
678 | 681 | /* |
@@ -7,6 +7,7 @@ | ||
7 | 7 | #include "debug.h" |
8 | 8 | #include "graphic.h" // sv3.fWindowes |
9 | 9 | #include "window.h" |
10 | +#include "input.h" | |
10 | 11 | |
11 | 12 | #if defined(__BORLANDC__) // for BC++ |
12 | 13 | #define IDI_ICON1 1001 |
@@ -189,6 +190,7 @@ | ||
189 | 190 | svw.fActive = (BOOL)wParam; |
190 | 191 | Debug(svw.fActive ? "<アクティブ>\n" : "<非アクティブ>\n"); |
191 | 192 | if(svw.fActive){ |
193 | + svi.wheel = 0; | |
192 | 194 | ShowCursor(FALSE); |
193 | 195 | }else{ |
194 | 196 | ShowCursor(TRUE); |
@@ -520,6 +520,7 @@ | ||
520 | 520 | devTEX_POINT(1); |
521 | 521 | if(ms_PhotoMode) return; |
522 | 522 | if(ms_NeedResetViewport) ResetViewport(); |
523 | + RenderCursorSceneryFull(); | |
523 | 524 | m_Interface.Render(); |
524 | 525 | GetCamera()->PrintInfo(CameraCtrlExp()); |
525 | 526 | RenderFrame(1); |
@@ -333,7 +333,9 @@ | ||
333 | 333 | */ |
334 | 334 | float CTrainGroup::CalcSignedSpeedLimit(){ |
335 | 335 | if(m_SpeedLimit<0) return m_EffectTargetSpeed; |
336 | - return m_EffectTargetSpeed<0.0f ? -m_SpeedLimit : m_SpeedLimit; | |
336 | + float abs_limited_speed = fabsf(m_EffectTargetSpeed); | |
337 | + if(abs_limited_speed>m_SpeedLimit) abs_limited_speed = (float)m_SpeedLimit; | |
338 | + return m_EffectTargetSpeed<0.0f ? -abs_limited_speed : abs_limited_speed; | |
337 | 339 | } |
338 | 340 | |
339 | 341 | /* |