X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。
| Revision | 270 (tree) |
|---|---|
| Time | 2021-03-21 17:57:42 |
| Author | |
高解像度時に一部画面レイアウトをスケーリングするよう設計変更、OpenGLコアがコンパイルできない問題の修正。
| @@ -408,7 +408,8 @@ | ||
| 408 | 408 | return 1; |
| 409 | 409 | } |
| 410 | 410 | //フォント名:MS ゴシック サイズ:18 |
| 411 | - if( FAILED( D3DXCreateFont( pd3dDevice, -18, 0, FW_NORMAL, 1, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, | |
| 411 | + //if( FAILED( D3DXCreateFont( pd3dDevice, -18, 0, FW_NORMAL, 1, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, | |
| 412 | + if( FAILED( D3DXCreateFont( pd3dDevice, (int)(((float)SCREEN_HEIGHT / 480) * -18), 0, FW_NORMAL, 1, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, | |
| 412 | 413 | DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "MS ゴシック", &pxmsfont) ) |
| 413 | 414 | ){ |
| 414 | 415 | return 1; |
| @@ -1779,6 +1780,20 @@ | ||
| 1779 | 1780 | End2DMSFontTextRender(); |
| 1780 | 1781 | } |
| 1781 | 1782 | |
| 1783 | +//! @brief 文字を表示(システムフォント使用)【スケーリング機能付き】 | |
| 1784 | +//! @param x x座標 | |
| 1785 | +//! @param y y座標 | |
| 1786 | +//! @param str 文字列 (改行コード:可) | |
| 1787 | +//! @param color 色 | |
| 1788 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DMSFontText()関数と同等です。 | |
| 1789 | +void D3DGraphics::Draw2DMSFontTextScaling(int x, int y, char *str, int color) | |
| 1790 | +{ | |
| 1791 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 1792 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 1793 | + | |
| 1794 | + Draw2DMSFontText((int)(scaling_x * x), (int)(scaling_y * y), str, color); | |
| 1795 | +} | |
| 1796 | + | |
| 1782 | 1797 | //! @brief 文字を中央揃えで表示(システムフォント使用) |
| 1783 | 1798 | //! @param x x座標 |
| 1784 | 1799 | //! @param y y座標 |
| @@ -1810,6 +1825,22 @@ | ||
| 1810 | 1825 | End2DMSFontTextRender(); |
| 1811 | 1826 | } |
| 1812 | 1827 | |
| 1828 | +//! @brief 文字を中央揃えで表示(システムフォント使用)【スケーリング機能付き】 | |
| 1829 | +//! @param x x座標 | |
| 1830 | +//! @param y y座標 | |
| 1831 | +//! @param w 横の大きさ | |
| 1832 | +//! @param h 縦の大きさ | |
| 1833 | +//! @param str 文字列 (改行コード:可) | |
| 1834 | +//! @param color 色 | |
| 1835 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DMSFontTextCenter()関数と同等です。 | |
| 1836 | +void D3DGraphics::Draw2DMSFontTextCenterScaling(int x, int y, int w, int h, char *str, int color) | |
| 1837 | +{ | |
| 1838 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 1839 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 1840 | + | |
| 1841 | + Draw2DMSFontTextCenter((int)(scaling_x * x), (int)(scaling_y * y), w, h, str, color); | |
| 1842 | +} | |
| 1843 | + | |
| 1813 | 1844 | //! @brief 文字を表示(システムフォント使用、小さい) |
| 1814 | 1845 | //! @param x x座標 |
| 1815 | 1846 | //! @param y y座標 |
| @@ -1930,6 +1961,22 @@ | ||
| 1930 | 1961 | End2DRender(); |
| 1931 | 1962 | } |
| 1932 | 1963 | |
| 1964 | +//! @brief 文字を表示(テクスチャフォント使用)【スケーリング機能付き】 | |
| 1965 | +//! @param x x座標 | |
| 1966 | +//! @param y y座標 | |
| 1967 | +//! @param str 文字列 (改行コード:<b>不可</b>) | |
| 1968 | +//! @param color 色 | |
| 1969 | +//! @param fontwidth 一文字の幅 | |
| 1970 | +//! @param fontheight 一文字の高さ | |
| 1971 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DTextureFontText()関数と同等です。 | |
| 1972 | +void D3DGraphics::Draw2DTextureFontTextScaling(int x, int y, char *str, int color, int fontwidth, int fontheight) | |
| 1973 | +{ | |
| 1974 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 1975 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 1976 | + | |
| 1977 | + Draw2DTextureFontText((int)(scaling_x * x), (int)(scaling_y * y), str, color, (int)(scaling_x * fontwidth), (int)(scaling_x * fontheight)); | |
| 1978 | +} | |
| 1979 | + | |
| 1933 | 1980 | //! @brief 中央寄せに文字を表示(テクスチャフォント使用) |
| 1934 | 1981 | //! @param x x座標の加算分 |
| 1935 | 1982 | //! @param y y座標 |
| @@ -1943,6 +1990,22 @@ | ||
| 1943 | 1990 | Draw2DTextureFontText((SCREEN_WIDTH - strlen(str)*fontwidth)/2 + x, y, str, color, fontwidth, fontheight); |
| 1944 | 1991 | } |
| 1945 | 1992 | |
| 1993 | +//! @brief 中央寄せに文字を表示(テクスチャフォント使用)【スケーリング機能付き】 | |
| 1994 | +//! @param x x座標の加算分 | |
| 1995 | +//! @param y y座標 | |
| 1996 | +//! @param str 文字列 (改行コード:<b>不可</b>) | |
| 1997 | +//! @param color 色 | |
| 1998 | +//! @param fontwidth 一文字の幅 | |
| 1999 | +//! @param fontheight 一文字の高さ | |
| 2000 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DTextureFontTextCenter()関数と同等です。 | |
| 2001 | +void D3DGraphics::Draw2DTextureFontTextCenterScaling(int x, int y, char *str, int color, int fontwidth, int fontheight) | |
| 2002 | +{ | |
| 2003 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 2004 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 2005 | + | |
| 2006 | + Draw2DTextureFontTextCenter((int)(scaling_x * x), (int)(scaling_y * y), str, color, (int)(scaling_x * fontwidth), (int)(scaling_x * fontheight)); | |
| 2007 | +} | |
| 2008 | + | |
| 1946 | 2009 | #ifdef ENABLE_DEBUGCONSOLE |
| 1947 | 2010 | //! @brief 文字を表示(デバック用フォント使用) |
| 1948 | 2011 | //! @param x x座標 |
| @@ -2161,6 +2224,21 @@ | ||
| 2161 | 2224 | End2DRender(); |
| 2162 | 2225 | } |
| 2163 | 2226 | |
| 2227 | +//! @brief 四角形を描画【スケーリング機能付き】 | |
| 2228 | +//! @param x1 左上の x座標 | |
| 2229 | +//! @param y1 左上の y座標 | |
| 2230 | +//! @param x2 右下の x座標 | |
| 2231 | +//! @param y2 右下の y座標 | |
| 2232 | +//! @param color 色 | |
| 2233 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DBox()関数と同等です。 | |
| 2234 | +void D3DGraphics::Draw2DBoxScaling(int x1, int y1, int x2, int y2, int color) | |
| 2235 | +{ | |
| 2236 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 2237 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 2238 | + | |
| 2239 | + Draw2DBox((int)(scaling_x * x1), (int)(scaling_y * y1), (int)(scaling_x * x2), (int)(scaling_y * y2), color); | |
| 2240 | +} | |
| 2241 | + | |
| 2164 | 2242 | //! @brief 画像を描画 |
| 2165 | 2243 | //! @param x x座標 |
| 2166 | 2244 | //! @param y y座標 |
| @@ -2216,6 +2294,22 @@ | ||
| 2216 | 2294 | End2DRender(); |
| 2217 | 2295 | } |
| 2218 | 2296 | |
| 2297 | +//! @brief 画像を描画【スケーリング機能付き】 | |
| 2298 | +//! @param x x座標 | |
| 2299 | +//! @param y y座標 | |
| 2300 | +//! @param id テクスチャ認識番号 | |
| 2301 | +//! @param width 幅 | |
| 2302 | +//! @param height 高さ | |
| 2303 | +//! @param alpha 透明度(0.0〜1.0) | |
| 2304 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DTexture()関数と同等です。 | |
| 2305 | +void D3DGraphics::Draw2DTextureScaling(int x, int y, int id, int width, int height, float alpha) | |
| 2306 | +{ | |
| 2307 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 2308 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 2309 | + | |
| 2310 | + Draw2DTexture((int)(scaling_x * x), (int)(scaling_y * y), id, (int)(scaling_x * width), (int)(scaling_y * height), alpha); | |
| 2311 | +} | |
| 2312 | + | |
| 2219 | 2313 | //! @brief 2D描画用設定を解除 |
| 2220 | 2314 | void D3DGraphics::End2DRender() |
| 2221 | 2315 | { |
| @@ -187,7 +187,8 @@ | ||
| 187 | 187 | |
| 188 | 188 | //システムフォント用意 |
| 189 | 189 | //フォント名:MS ゴシック サイズ:18 |
| 190 | - SystemFont = CreateFont(18, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, "MS ゴシック"); | |
| 190 | + //SystemFont = CreateFont(18, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, "MS ゴシック"); | |
| 191 | + SystemFont = CreateFont((int)(((float)SCREEN_HEIGHT / 480) * 18), 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, "MS ゴシック"); | |
| 191 | 192 | //フォント名:MS ゴシック サイズ:12 |
| 192 | 193 | SystemSmallFont = CreateFont(12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, "MS ゴシック"); |
| 193 | 194 |
| @@ -316,7 +317,8 @@ | ||
| 316 | 317 | |
| 317 | 318 | //システムフォント用意 |
| 318 | 319 | //フォント名:MS ゴシック サイズ:18 |
| 319 | - SystemFont = CreateFont(18, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, "MS ゴシック"); | |
| 320 | + //SystemFont = CreateFont(18, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, "MS ゴシック"); | |
| 321 | + SystemFont = CreateFont((int)(((float)SCREEN_HEIGHT / 480) * 18), 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, "MS ゴシック"); | |
| 320 | 322 | //フォント名:MS ゴシック サイズ:12 |
| 321 | 323 | SystemSmallFont = CreateFont(12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, "MS ゴシック"); |
| 322 | 324 |
| @@ -2440,6 +2442,20 @@ | ||
| 2440 | 2442 | End2DRender(); |
| 2441 | 2443 | } |
| 2442 | 2444 | |
| 2445 | +//! @brief 文字を表示(システムフォント使用)【スケーリング機能付き】 | |
| 2446 | +//! @param x x座標 | |
| 2447 | +//! @param y y座標 | |
| 2448 | +//! @param str 文字列 (改行コード:可) | |
| 2449 | +//! @param color 色 | |
| 2450 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DMSFontText()関数と同等です。 | |
| 2451 | +void D3DGraphics::Draw2DMSFontTextScaling(int x, int y, char *str, int color) | |
| 2452 | +{ | |
| 2453 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 2454 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 2455 | + | |
| 2456 | + Draw2DMSFontText((int)(scaling_x * x), (int)(scaling_y * y), str, color); | |
| 2457 | +} | |
| 2458 | + | |
| 2443 | 2459 | //! @brief 文字を中央揃えで表示(システムフォント使用) |
| 2444 | 2460 | //! @param x x座標 |
| 2445 | 2461 | //! @param y y座標 |
| @@ -2452,9 +2468,28 @@ | ||
| 2452 | 2468 | //未使用引数対策 |
| 2453 | 2469 | UNREFERENCED_PARAMETER(h); |
| 2454 | 2470 | |
| 2455 | - Draw2DMSFontText(x + (w/2 - (StrMaxLineLen(str)*9/2)), y, str, color); | |
| 2471 | + int fonthalfsize = (int)(((float)SCREEN_HEIGHT / 480) * 9); | |
| 2472 | + | |
| 2473 | + //Draw2DMSFontText(x + (w/2 - (StrMaxLineLen(str)*9/2)), y, str, color); | |
| 2474 | + Draw2DMSFontText(x + (w/2 - (StrMaxLineLen(str)*fonthalfsize/2)), y, str, color); | |
| 2456 | 2475 | } |
| 2457 | 2476 | |
| 2477 | +//! @brief 文字を中央揃えで表示(システムフォント使用)【スケーリング機能付き】 | |
| 2478 | +//! @param x x座標 | |
| 2479 | +//! @param y y座標 | |
| 2480 | +//! @param w 横の大きさ | |
| 2481 | +//! @param h 縦の大きさ | |
| 2482 | +//! @param str 文字列 (改行コード:可) | |
| 2483 | +//! @param color 色 | |
| 2484 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DMSFontTextCenter()関数と同等です。 | |
| 2485 | +void D3DGraphics::Draw2DMSFontTextCenterScaling(int x, int y, int w, int h, char *str, int color) | |
| 2486 | +{ | |
| 2487 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 2488 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 2489 | + | |
| 2490 | + Draw2DMSFontTextCenter((int)(scaling_x * x), (int)(scaling_y * y), w, h, str, color); | |
| 2491 | +} | |
| 2492 | + | |
| 2458 | 2493 | //! @brief 文字を表示(システムフォント使用、小さい) |
| 2459 | 2494 | //! @param x x座標 |
| 2460 | 2495 | //! @param y y座標 |
| @@ -2643,6 +2678,22 @@ | ||
| 2643 | 2678 | delete [] TexCoordAry; |
| 2644 | 2679 | } |
| 2645 | 2680 | |
| 2681 | +//! @brief 文字を表示(テクスチャフォント使用)【スケーリング機能付き】 | |
| 2682 | +//! @param x x座標 | |
| 2683 | +//! @param y y座標 | |
| 2684 | +//! @param str 文字列 (改行コード:<b>不可</b>) | |
| 2685 | +//! @param color 色 | |
| 2686 | +//! @param fontwidth 一文字の幅 | |
| 2687 | +//! @param fontheight 一文字の高さ | |
| 2688 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DTextureFontText()関数と同等です。 | |
| 2689 | +void D3DGraphics::Draw2DTextureFontTextScaling(int x, int y, char *str, int color, int fontwidth, int fontheight) | |
| 2690 | +{ | |
| 2691 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 2692 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 2693 | + | |
| 2694 | + Draw2DTextureFontText((int)(scaling_x * x), (int)(scaling_y * y), str, color, (int)(scaling_x * fontwidth), (int)(scaling_x * fontheight)); | |
| 2695 | +} | |
| 2696 | + | |
| 2646 | 2697 | //! @brief 中央寄せに文字を表示(テクスチャフォント使用) |
| 2647 | 2698 | //! @param x x座標の加算分 |
| 2648 | 2699 | //! @param y y座標 |
| @@ -2656,6 +2707,22 @@ | ||
| 2656 | 2707 | Draw2DTextureFontText((SCREEN_WIDTH - strlen(str)*fontwidth)/2 + x, y, str, color, fontwidth, fontheight); |
| 2657 | 2708 | } |
| 2658 | 2709 | |
| 2710 | +//! @brief 中央寄せに文字を表示(テクスチャフォント使用)【スケーリング機能付き】 | |
| 2711 | +//! @param x x座標の加算分 | |
| 2712 | +//! @param y y座標 | |
| 2713 | +//! @param str 文字列 (改行コード:<b>不可</b>) | |
| 2714 | +//! @param color 色 | |
| 2715 | +//! @param fontwidth 一文字の幅 | |
| 2716 | +//! @param fontheight 一文字の高さ | |
| 2717 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DTextureFontTextCenter()関数と同等です。 | |
| 2718 | +void D3DGraphics::Draw2DTextureFontTextCenterScaling(int x, int y, char *str, int color, int fontwidth, int fontheight) | |
| 2719 | +{ | |
| 2720 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 2721 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 2722 | + | |
| 2723 | + Draw2DTextureFontTextCenter((int)(scaling_x * x), (int)(scaling_y * y), str, color, (int)(scaling_x * fontwidth), (int)(scaling_x * fontheight)); | |
| 2724 | +} | |
| 2725 | + | |
| 2659 | 2726 | #ifdef ENABLE_DEBUGCONSOLE |
| 2660 | 2727 | //! @brief 文字を表示(デバック用フォント使用) |
| 2661 | 2728 | //! @param x x座標 |
| @@ -2895,6 +2962,21 @@ | ||
| 2895 | 2962 | End2DRender(); |
| 2896 | 2963 | } |
| 2897 | 2964 | |
| 2965 | +//! @brief 四角形を描画【スケーリング機能付き】 | |
| 2966 | +//! @param x1 左上の x座標 | |
| 2967 | +//! @param y1 左上の y座標 | |
| 2968 | +//! @param x2 右下の x座標 | |
| 2969 | +//! @param y2 右下の y座標 | |
| 2970 | +//! @param color 色 | |
| 2971 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DBox()関数と同等です。 | |
| 2972 | +void D3DGraphics::Draw2DBoxScaling(int x1, int y1, int x2, int y2, int color) | |
| 2973 | +{ | |
| 2974 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 2975 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 2976 | + | |
| 2977 | + Draw2DBox((int)(scaling_x * x1), (int)(scaling_y * y1), (int)(scaling_x * x2), (int)(scaling_y * y2), color); | |
| 2978 | +} | |
| 2979 | + | |
| 2898 | 2980 | //! @brief 画像を描画 |
| 2899 | 2981 | //! @param x x座標 |
| 2900 | 2982 | //! @param y y座標 |
| @@ -2961,6 +3043,22 @@ | ||
| 2961 | 3043 | End2DRender(); |
| 2962 | 3044 | } |
| 2963 | 3045 | |
| 3046 | +//! @brief 画像を描画【スケーリング機能付き】 | |
| 3047 | +//! @param x x座標 | |
| 3048 | +//! @param y y座標 | |
| 3049 | +//! @param id テクスチャ認識番号 | |
| 3050 | +//! @param width 幅 | |
| 3051 | +//! @param height 高さ | |
| 3052 | +//! @param alpha 透明度(0.0〜1.0) | |
| 3053 | +//! @attention 640x480相当の解像度から現解像度へスケーリングします。それ以外はDraw2DTexture()関数と同等です。 | |
| 3054 | +void D3DGraphics::Draw2DTextureScaling(int x, int y, int id, int width, int height, float alpha) | |
| 3055 | +{ | |
| 3056 | + float scaling_x = (float)SCREEN_HEIGHT / 480;//(float)SCREEN_WIDTH / 640; | |
| 3057 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 3058 | + | |
| 3059 | + Draw2DTexture((int)(scaling_x * x), (int)(scaling_y * y), id, (int)(scaling_x * width), (int)(scaling_y * height), alpha); | |
| 3060 | +} | |
| 3061 | + | |
| 2964 | 3062 | //! @brief 2D描画用設定を解除 |
| 2965 | 3063 | void D3DGraphics::End2DRender() |
| 2966 | 3064 | { |
| @@ -97,6 +97,9 @@ | ||
| 97 | 97 | #pragma comment(lib, "lib/zlib/zlib.lib") |
| 98 | 98 | #pragma comment(lib, "lib/libpng/libpng.lib") |
| 99 | 99 | |
| 100 | +#pragma comment(linker, "/NODEFAULTLIB:libcmt.lib") | |
| 101 | +#pragma comment(linker, "/NODEFAULTLIB:libcpmt.lib") | |
| 102 | + | |
| 100 | 103 | #define GRAPHICS_CORE "OpenGL 1.1" //!< バージョン表示用情報 |
| 101 | 104 | |
| 102 | 105 | #endif //GRAPHIC_ENGINE |
| @@ -327,10 +330,14 @@ | ||
| 327 | 330 | void RenderCenterline(); |
| 328 | 331 | void Renderline(float x1, float y1, float z1, float x2, float y2, float z2, int color); |
| 329 | 332 | void Draw2DMSFontText(int x, int y, char *str, int color); |
| 333 | + void Draw2DMSFontTextScaling(int x, int y, char *str, int color); | |
| 330 | 334 | void Draw2DMSFontTextCenter(int x, int y, int w, int h, char *str, int color); |
| 335 | + void Draw2DMSFontTextCenterScaling(int x, int y, int w, int h, char *str, int color); | |
| 331 | 336 | void Draw2DMSSmallFontText(int x, int y, char *str, int color); |
| 332 | 337 | void Draw2DTextureFontText(int x, int y, char *str, int color, int fontwidth, int fontheight); |
| 338 | + void Draw2DTextureFontTextScaling(int x, int y, char *str, int color, int fontwidth, int fontheight); | |
| 333 | 339 | void Draw2DTextureFontTextCenter(int x, int y, char *str, int color, int fontwidth, int fontheight); |
| 340 | + void Draw2DTextureFontTextCenterScaling(int x, int y, char *str, int color, int fontwidth, int fontheight); | |
| 334 | 341 | #ifdef ENABLE_DEBUGCONSOLE |
| 335 | 342 | void Draw2DTextureDebugFontText(int x, int y, char *str, int color); |
| 336 | 343 | #endif |
| @@ -337,7 +344,9 @@ | ||
| 337 | 344 | void Draw2DLine(int x1, int y1, int x2, int y2, int color); |
| 338 | 345 | void Draw2DCycle(int x, int y, int r, int color); |
| 339 | 346 | void Draw2DBox(int x1, int y1, int x2, int y2, int color); |
| 347 | + void Draw2DBoxScaling(int x1, int y1, int x2, int y2, int color); | |
| 340 | 348 | void Draw2DTexture(int x, int y, int id, int width, int height, float alpha); |
| 349 | + void Draw2DTextureScaling(int x, int y, int id, int width, int height, float alpha); | |
| 341 | 350 | bool SaveScreenShot(char *fname); |
| 342 | 351 | int GetColorCode(float red, float green, float blue, float alpha); |
| 343 | 352 | }; |
| @@ -379,6 +379,10 @@ | ||
| 379 | 379 | { |
| 380 | 380 | float effect = 0.0f; |
| 381 | 381 | |
| 382 | + //float scaling_x = (float)SCREEN_WIDTH / 640; | |
| 383 | + float scaling_y = (float)SCREEN_HEIGHT / 480; | |
| 384 | + int swidth = (int)((float)SCREEN_WIDTH / SCREEN_HEIGHT * 480); | |
| 385 | + | |
| 382 | 386 | //ブラックアウト設定 |
| 383 | 387 | if( framecnt < (int)(1.0f*GAMEFPS) ){ |
| 384 | 388 | effect = GetEffectAlpha(framecnt, 1.0f, 1.0f, 0.0f, true); |
| @@ -395,8 +399,8 @@ | ||
| 395 | 399 | d3dg->Draw2DBox(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, d3dg->GetColorCode(0.0f,0.0f,0.0f,effect)); |
| 396 | 400 | |
| 397 | 401 | //上下の黒縁描画 |
| 398 | - d3dg->Draw2DBox(0, 0, SCREEN_WIDTH, 40, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f)); | |
| 399 | - d3dg->Draw2DBox(0, SCREEN_HEIGHT - 40, SCREEN_WIDTH, SCREEN_HEIGHT, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f)); | |
| 402 | + d3dg->Draw2DBox(0, 0, SCREEN_WIDTH, (int)(scaling_y * 40), d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f)); | |
| 403 | + d3dg->Draw2DBox(0, SCREEN_HEIGHT - (int)(scaling_y * 40), SCREEN_WIDTH, SCREEN_HEIGHT, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f)); | |
| 400 | 404 | |
| 401 | 405 | //プロジェクト名 |
| 402 | 406 | if( ((int)(0.5f*GAMEFPS) < framecnt)&&(framecnt < (int)(4.0f*GAMEFPS)) ){ |
| @@ -405,7 +409,7 @@ | ||
| 405 | 409 | sprintf(str, "%s project", GAMENAME); |
| 406 | 410 | if( framecnt < (int)(1.5f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 0.5f, false); } |
| 407 | 411 | if( framecnt > (int)(3.0f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 3.0f, true); } |
| 408 | - d3dg->Draw2DTextureFontTextCenter(0, SCREEN_HEIGHT - 140, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 22, 22); | |
| 412 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 340, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 22, 22); | |
| 409 | 413 | } |
| 410 | 414 | |
| 411 | 415 | //スタッフ名・その1 |
| @@ -413,14 +417,14 @@ | ||
| 413 | 417 | float effectA = 1.0f; |
| 414 | 418 | if( framecnt < (int)(5.5f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 4.5f, false); } |
| 415 | 419 | if( framecnt > (int)(7.5f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 7.5f, true); } |
| 416 | - d3dg->Draw2DTextureFontText(60, 150, "ORIGINAL", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20); | |
| 420 | + d3dg->Draw2DTextureFontTextScaling(60, 150, "ORIGINAL", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20); | |
| 417 | 421 | } |
| 418 | 422 | if( ((int)(5.0f*GAMEFPS) < framecnt)&&(framecnt < (int)(9.0f*GAMEFPS)) ){ |
| 419 | 423 | float effectA = 1.0f; |
| 420 | 424 | if( framecnt < (int)(6.0f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 5.0f, false); } |
| 421 | 425 | if( framecnt > (int)(8.0f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 8.0f, true); } |
| 422 | - d3dg->Draw2DTextureFontText(100, 180, "nine-two", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20); | |
| 423 | - d3dg->Draw2DTextureFontText(100, 210, "TENNKUU", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20); | |
| 426 | + d3dg->Draw2DTextureFontTextScaling(100, 180, "nine-two", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20); | |
| 427 | + d3dg->Draw2DTextureFontTextScaling(100, 210, "TENNKUU", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20); | |
| 424 | 428 | } |
| 425 | 429 | |
| 426 | 430 | //スタッフ名・その2 |
| @@ -428,14 +432,14 @@ | ||
| 428 | 432 | float effectA = 1.0f; |
| 429 | 433 | if( framecnt < (int)(8.0f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 7.0f, false); } |
| 430 | 434 | if( framecnt > (int)(10.0f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 10.0f, true); } |
| 431 | - d3dg->Draw2DTextureFontText(SCREEN_WIDTH - 310, 300, "REMAKE", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20); | |
| 435 | + d3dg->Draw2DTextureFontTextScaling(swidth - 310, 300, "REMAKE", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20); | |
| 432 | 436 | } |
| 433 | 437 | if( ((int)(7.5f*GAMEFPS) < framecnt)&&(framecnt < (int)(11.5f*GAMEFPS)) ){ |
| 434 | 438 | float effectA = 1.0f; |
| 435 | 439 | if( framecnt < (int)(8.5f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 7.5f, false); } |
| 436 | 440 | if( framecnt > (int)(10.5f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 10.5f, true); } |
| 437 | - d3dg->Draw2DTextureFontText(SCREEN_WIDTH - 270, 330, "[-_-;](mikan)", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20); | |
| 438 | - //d3dg->Draw2DTexture(410, 360, opening_banner, 200, 40, effectA); | |
| 441 | + d3dg->Draw2DTextureFontTextScaling(swidth - 270, 330, "[-_-;](mikan)", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20); | |
| 442 | + //d3dg->Draw2DTextureScaling(swidth - 230, 360, opening_banner, 200, 40, effectA); | |
| 439 | 443 | } |
| 440 | 444 | |
| 441 | 445 | //ゲーム名 |
| @@ -446,7 +450,7 @@ | ||
| 446 | 450 | if( framecnt < (int)(13.0f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 12.0f, false); } |
| 447 | 451 | if( ((int)(15.0f*GAMEFPS) < framecnt)&&(framecnt < (int)(16.0f*GAMEFPS)) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 15.0f, true); } |
| 448 | 452 | if( framecnt >= (int)(16.0f*GAMEFPS) ){ effectA = 0.0f; } |
| 449 | - d3dg->Draw2DTextureFontTextCenter(0, (SCREEN_HEIGHT-11)/2, str, d3dg->GetColorCode(1.0f,0.0f,0.0f,effectA), 22, 22); | |
| 453 | + d3dg->Draw2DTextureFontTextCenterScaling(0, (480-11)/2, str, d3dg->GetColorCode(1.0f,0.0f,0.0f,effectA), 22, 22); | |
| 450 | 454 | } |
| 451 | 455 | } |
| 452 | 456 |
| @@ -755,9 +759,11 @@ | ||
| 755 | 759 | int color; |
| 756 | 760 | float effect; |
| 757 | 761 | |
| 762 | + int swidth = (int)((float)SCREEN_WIDTH / SCREEN_HEIGHT * 480); | |
| 763 | + | |
| 758 | 764 | //ゲームのバージョン情報表示 |
| 759 | - d3dg->Draw2DTextureFontText(522+1, 75+1, GAMEVERSION, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f), 18, 22); | |
| 760 | - d3dg->Draw2DTextureFontText(522, 75, GAMEVERSION, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 18, 22); | |
| 765 | + d3dg->Draw2DTextureFontTextScaling(swidth - 118+1, 75+1, GAMEVERSION, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f), 18, 22); | |
| 766 | + d3dg->Draw2DTextureFontTextScaling(swidth - 118, 75, GAMEVERSION, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 18, 22); | |
| 761 | 767 | |
| 762 | 768 | if( modescreen == 0 ){ |
| 763 | 769 | //スクロールバーの情報を取得 |
| @@ -916,7 +922,7 @@ | ||
| 916 | 922 | d3dg->Draw2DLine(mainmenu_mouseX, 0, mainmenu_mouseX, SCREEN_HEIGHT, d3dg->GetColorCode(1.0f,0.0f,0.0f,1.0f)); |
| 917 | 923 | |
| 918 | 924 | //ゲームのロゴマーク描画 |
| 919 | - d3dg->Draw2DTexture(20, 25, gametitle, 480, 80, 1.0f); | |
| 925 | + d3dg->Draw2DTextureScaling(20, 25, gametitle, 480, 80, 1.0f); | |
| 920 | 926 | |
| 921 | 927 | //ブラックアウト設定 |
| 922 | 928 | if( framecnt < (int)(2.0f*GAMEFPS) ){ |
| @@ -1631,7 +1637,7 @@ | ||
| 1631 | 1637 | //メモ:背景画像の描画は、自動的に行われる。 |
| 1632 | 1638 | |
| 1633 | 1639 | //固定文字表示 |
| 1634 | - d3dg->Draw2DTextureFontTextCenter(0, 30, "BRIEFING", d3dg->GetColorCode(1.0f,1.0f,0.0f,effectA), 60, 42); | |
| 1640 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 30, "BRIEFING", d3dg->GetColorCode(1.0f,1.0f,0.0f,effectA), 60, 42); | |
| 1635 | 1641 | d3dg->Draw2DTextureFontText(SCREEN_WIDTH - 210 - effectB_sizeW*20/2, SCREEN_HEIGHT - 37 - effectB_sizeH/2, |
| 1636 | 1642 | "LEFT CLICK TO BEGIN", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectB), effectB_sizeW, effectB_sizeH); |
| 1637 | 1643 | d3dg->Draw2DTextureFontText(SCREEN_WIDTH - 210 - 18*20/2, SCREEN_HEIGHT - 37 - 26/2, "LEFT CLICK TO BEGIN", d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 18, 26); |
| @@ -1638,15 +1644,15 @@ | ||
| 1638 | 1644 | |
| 1639 | 1645 | //ブリーフィング画像描画 |
| 1640 | 1646 | if( TwoTexture == false ){ |
| 1641 | - if( TextureA == -1 ){ d3dg->Draw2DBox(40, 180, 40+160, 180+150, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f)); } | |
| 1642 | - else{ d3dg->Draw2DTexture(40, 180, TextureA, 160, 150, 1.0f); } | |
| 1647 | + if( TextureA == -1 ){ d3dg->Draw2DBoxScaling(40, 180, 40+160, 180+150, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f)); } | |
| 1648 | + else{ d3dg->Draw2DTextureScaling(40, 180, TextureA, 160, 150, 1.0f); } | |
| 1643 | 1649 | } |
| 1644 | 1650 | else{ |
| 1645 | - if( TextureA == -1 ){ d3dg->Draw2DBox(40, 130, 40+160, 130+150, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f)); } | |
| 1646 | - else{ d3dg->Draw2DTexture(40, 130, TextureA, 160, 150, 1.0f); } | |
| 1651 | + if( TextureA == -1 ){ d3dg->Draw2DBoxScaling(40, 130, 40+160, 130+150, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f)); } | |
| 1652 | + else{ d3dg->Draw2DTextureScaling(40, 130, TextureA, 160, 150, 1.0f); } | |
| 1647 | 1653 | |
| 1648 | - if( TextureB == -1 ){ d3dg->Draw2DBox(40, 300, 40+160, 300+150, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f)); } | |
| 1649 | - else{ d3dg->Draw2DTexture(40, 300, TextureB, 160, 150, 1.0f); } | |
| 1654 | + if( TextureB == -1 ){ d3dg->Draw2DBoxScaling(40, 300, 40+160, 300+150, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f)); } | |
| 1655 | + else{ d3dg->Draw2DTextureScaling(40, 300, TextureB, 160, 150, 1.0f); } | |
| 1650 | 1656 | } |
| 1651 | 1657 | |
| 1652 | 1658 | //ミッション名を取得・表示 |
| @@ -1657,10 +1663,10 @@ | ||
| 1657 | 1663 | else{ |
| 1658 | 1664 | strcpy(mname, MIFdata.GetMissionFullname()); |
| 1659 | 1665 | } |
| 1660 | - d3dg->Draw2DTextureFontTextCenter(0, 90, mname, d3dg->GetColorCode(1.0f,0.5f,0.0f,1.0f), 18, 25); | |
| 1666 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 90, mname, d3dg->GetColorCode(1.0f,0.5f,0.0f,1.0f), 18, 25); | |
| 1661 | 1667 | |
| 1662 | 1668 | //ミッション説明を表示 |
| 1663 | - d3dg->Draw2DMSFontText(230, 180, MIFdata.GetBriefingText(), d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f)); | |
| 1669 | + d3dg->Draw2DMSFontTextScaling(230, 180, MIFdata.GetBriefingText(), d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f)); | |
| 1664 | 1670 | } |
| 1665 | 1671 | |
| 1666 | 1672 | void briefing::Destroy() |
| @@ -2810,7 +2816,15 @@ | ||
| 2810 | 2816 | |
| 2811 | 2817 | //スコープ描画 |
| 2812 | 2818 | if( (Camera_F1mode == false)&&(Camera_Debugmode == false)&&(myHuman->GetScopeMode() != 0) ){ |
| 2813 | - d3dg->Draw2DTexture(0, 0, Resource.GetScopeTexture(), SCREEN_WIDTH, SCREEN_HEIGHT, 1.0f); | |
| 2819 | + if( ((float)SCREEN_WIDTH / SCREEN_HEIGHT) > 1.5f ){ | |
| 2820 | + int swidth = (int)((float)SCREEN_HEIGHT * 1.333f)+1; | |
| 2821 | + d3dg->Draw2DTexture((SCREEN_WIDTH-swidth)/2, 0, Resource.GetScopeTexture(), swidth, SCREEN_HEIGHT, 1.0f); | |
| 2822 | + d3dg->Draw2DBox(0, 0, (SCREEN_WIDTH-swidth)/2, SCREEN_HEIGHT, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f)); | |
| 2823 | + d3dg->Draw2DBox(SCREEN_WIDTH - (SCREEN_WIDTH-swidth)/2, 0, SCREEN_WIDTH, SCREEN_HEIGHT, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f)); | |
| 2824 | + } | |
| 2825 | + else{ | |
| 2826 | + d3dg->Draw2DTexture(0, 0, Resource.GetScopeTexture(), SCREEN_WIDTH, SCREEN_HEIGHT, 1.0f); | |
| 2827 | + } | |
| 2814 | 2828 | |
| 2815 | 2829 | if( myHuman->GetScopeMode() == 1 ){ |
| 2816 | 2830 | d3dg->Draw2DLine(SCREEN_WIDTH/2-49, SCREEN_HEIGHT/2, SCREEN_WIDTH/2-4, SCREEN_HEIGHT/2, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f)); |
| @@ -2821,10 +2835,18 @@ | ||
| 2821 | 2835 | d3dg->Draw2DBox(SCREEN_WIDTH/2-1, SCREEN_HEIGHT/2-50, SCREEN_WIDTH/2+1, SCREEN_HEIGHT/2+50, d3dg->GetColorCode(0.0f,0.0f,0.0f,0.5f)); |
| 2822 | 2836 | } |
| 2823 | 2837 | if( myHuman->GetScopeMode() == 2 ){ |
| 2824 | - d3dg->Draw2DLine(0, SCREEN_HEIGHT/2, SCREEN_WIDTH, SCREEN_HEIGHT/2, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f)); | |
| 2825 | - d3dg->Draw2DLine(SCREEN_WIDTH/2, 0, SCREEN_WIDTH/2, SCREEN_HEIGHT, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f)); | |
| 2826 | - d3dg->Draw2DBox(0, SCREEN_HEIGHT/2-1, SCREEN_WIDTH, SCREEN_HEIGHT/2+1, d3dg->GetColorCode(0.0f,0.0f,0.0f,0.5f)); | |
| 2827 | - d3dg->Draw2DBox(SCREEN_WIDTH/2-1, 0, SCREEN_WIDTH/2+1, SCREEN_HEIGHT, d3dg->GetColorCode(0.0f,0.0f,0.0f,0.5f)); | |
| 2838 | + int w; | |
| 2839 | + if( ((float)SCREEN_WIDTH / SCREEN_HEIGHT) > 1.5f ){ | |
| 2840 | + int swidth = (int)((float)SCREEN_HEIGHT * 1.333f)+1; | |
| 2841 | + w = 140 + (SCREEN_WIDTH-swidth)/2; | |
| 2842 | + } | |
| 2843 | + else{ | |
| 2844 | + w = 140; | |
| 2845 | + } | |
| 2846 | + d3dg->Draw2DLine(w, SCREEN_HEIGHT/2, SCREEN_WIDTH -w, SCREEN_HEIGHT/2, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f)); | |
| 2847 | + d3dg->Draw2DLine(SCREEN_WIDTH/2, 60, SCREEN_WIDTH/2, SCREEN_HEIGHT -60, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f)); | |
| 2848 | + d3dg->Draw2DBox(w, SCREEN_HEIGHT/2-1, SCREEN_WIDTH -w, SCREEN_HEIGHT/2+1, d3dg->GetColorCode(0.0f,0.0f,0.0f,0.5f)); | |
| 2849 | + d3dg->Draw2DBox(SCREEN_WIDTH/2-1, 60, SCREEN_WIDTH/2+1, SCREEN_HEIGHT -60, d3dg->GetColorCode(0.0f,0.0f,0.0f,0.5f)); | |
| 2828 | 2850 | } |
| 2829 | 2851 | } |
| 2830 | 2852 |
| @@ -2982,8 +3004,8 @@ | ||
| 2982 | 3004 | float effectA = 1.0f; |
| 2983 | 3005 | if( message_cnt < (int)(0.2f*GAMEFPS) ){ effectA = GetEffectAlpha(message_cnt, 1.0f, 0.2f, 0.0f, false); } |
| 2984 | 3006 | if( (int)((TOTAL_EVENTENT_SHOWMESSEC-0.2f)*GAMEFPS) < message_cnt ){ effectA = GetEffectAlpha(message_cnt, 1.0f, 0.2f, (TOTAL_EVENTENT_SHOWMESSEC - 0.2f), true); } |
| 2985 | - d3dg->Draw2DMSFontTextCenter(0 +1, SCREEN_HEIGHT - 140 +1, SCREEN_WIDTH, 140, messtr, d3dg->GetColorCode(0.1f,0.1f,0.1f,effectA)); | |
| 2986 | - d3dg->Draw2DMSFontTextCenter(0, SCREEN_HEIGHT - 140, SCREEN_WIDTH, 140, messtr, d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA)); | |
| 3007 | + d3dg->Draw2DMSFontTextCenterScaling(0 +1, 340 +1, SCREEN_WIDTH, 140, messtr, d3dg->GetColorCode(0.1f,0.1f,0.1f,effectA)); | |
| 3008 | + d3dg->Draw2DMSFontTextCenterScaling(0, 340, SCREEN_WIDTH, 140, messtr, d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA)); | |
| 2987 | 3009 | } |
| 2988 | 3010 | |
| 2989 | 3011 | #ifdef ENABLE_DEBUGCONSOLE |
| @@ -2995,14 +3017,14 @@ | ||
| 2995 | 3017 | |
| 2996 | 3018 | //リロード表示 |
| 2997 | 3019 | if( reloadcnt > 0 ){ |
| 2998 | - d3dg->Draw2DTextureFontTextCenter(3, SCREEN_HEIGHT - 180+3, "RELOADING", d3dg->GetColorCode(0.2f,0.2f,0.2f,1.0f), 32, 34); | |
| 2999 | - d3dg->Draw2DTextureFontTextCenter(0, SCREEN_HEIGHT - 180, "RELOADING", d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 32, 34); | |
| 3020 | + d3dg->Draw2DTextureFontTextCenterScaling(3, 300+3, "RELOADING", d3dg->GetColorCode(0.2f,0.2f,0.2f,1.0f), 32, 34); | |
| 3021 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 300, "RELOADING", d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 32, 34); | |
| 3000 | 3022 | } |
| 3001 | 3023 | |
| 3002 | 3024 | //武器切り替え表示 |
| 3003 | 3025 | if( selectweaponcnt > 0 ){ |
| 3004 | - d3dg->Draw2DTextureFontTextCenter(3, SCREEN_HEIGHT - 180+3, "CHANGING", d3dg->GetColorCode(0.2f,0.2f,0.2f,1.0f), 32, 34); | |
| 3005 | - d3dg->Draw2DTextureFontTextCenter(0, SCREEN_HEIGHT - 180, "CHANGING", d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 32, 34); | |
| 3026 | + d3dg->Draw2DTextureFontTextCenterScaling(3, 300+3, "CHANGING", d3dg->GetColorCode(0.2f,0.2f,0.2f,1.0f), 32, 34); | |
| 3027 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 300, "CHANGING", d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 32, 34); | |
| 3006 | 3028 | } |
| 3007 | 3029 | |
| 3008 | 3030 | //照準表示 |
| @@ -3046,8 +3068,8 @@ | ||
| 3046 | 3068 | if( tag == true ){ |
| 3047 | 3069 | int color; |
| 3048 | 3070 | if( ObjMgr.GetObjectInfoTag(camera_x, camera_y, camera_z, camera_rx, camera_ry, &color, str) == true ){ |
| 3049 | - d3dg->Draw2DTextureFontTextCenter(1, SCREEN_HEIGHT/2 + 30 +1 , str, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f), 14, 18); | |
| 3050 | - d3dg->Draw2DTextureFontTextCenter(0, SCREEN_HEIGHT/2 + 30, str, color, 14, 18); | |
| 3071 | + d3dg->Draw2DTextureFontTextCenterScaling(1, 270 +1 , str, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f), 14, 18); | |
| 3072 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 270, str, color, 14, 18); | |
| 3051 | 3073 | } |
| 3052 | 3074 | } |
| 3053 | 3075 |
| @@ -3159,10 +3181,10 @@ | ||
| 3159 | 3181 | } |
| 3160 | 3182 | |
| 3161 | 3183 | if( GameInfoData.missioncomplete == true ){ |
| 3162 | - d3dg->Draw2DTextureFontTextCenter(0, SCREEN_HEIGHT/2 + 10, "objective complete", d3dg->GetColorCode(1.0f,0.5f,0.0f,effect), 28, 32); | |
| 3184 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 240 + 10, "objective complete", d3dg->GetColorCode(1.0f,0.5f,0.0f,effect), 28, 32); | |
| 3163 | 3185 | } |
| 3164 | 3186 | else{ |
| 3165 | - d3dg->Draw2DTextureFontTextCenter(0, SCREEN_HEIGHT/2 + 10, "mission failure", d3dg->GetColorCode(1.0f,0.0f,0.0f,effect), 28, 32); | |
| 3187 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 240 + 10, "mission failure", d3dg->GetColorCode(1.0f,0.0f,0.0f,effect), 28, 32); | |
| 3166 | 3188 | } |
| 3167 | 3189 | } |
| 3168 | 3190 |
| @@ -4569,7 +4591,7 @@ | ||
| 4569 | 4591 | //メモ:背景画像の描画は、自動的に行われる。 |
| 4570 | 4592 | |
| 4571 | 4593 | //固定文字表示 |
| 4572 | - d3dg->Draw2DTextureFontTextCenter(0, 40, "RESULT", d3dg->GetColorCode(1.0f,0.0f,1.0f,effectA), 50, 42); | |
| 4594 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 40, "RESULT", d3dg->GetColorCode(1.0f,0.0f,1.0f,effectA), 50, 42); | |
| 4573 | 4595 | |
| 4574 | 4596 | //ミッション名を取得し表示 |
| 4575 | 4597 | if( MIFdata.GetFiletype() == false ){ |
| @@ -4578,27 +4600,27 @@ | ||
| 4578 | 4600 | else{ |
| 4579 | 4601 | strcpy(mname, MIFdata.GetMissionFullname()); |
| 4580 | 4602 | } |
| 4581 | - d3dg->Draw2DTextureFontTextCenter(0, 100, mname, d3dg->GetColorCode(0.5f,0.5f,1.0f,1.0f), 18, 25); | |
| 4603 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 100, mname, d3dg->GetColorCode(0.5f,0.5f,1.0f,1.0f), 18, 25); | |
| 4582 | 4604 | |
| 4583 | 4605 | //ミッションクリアーの有無 |
| 4584 | 4606 | if( GameInfoData.missioncomplete == true ){ |
| 4585 | - d3dg->Draw2DTextureFontTextCenter(0, 150, "mission successful", d3dg->GetColorCode(0.0f,1.0f,0.0f,1.0f), 24, 32); | |
| 4607 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 150, "mission successful", d3dg->GetColorCode(0.0f,1.0f,0.0f,1.0f), 24, 32); | |
| 4586 | 4608 | } |
| 4587 | 4609 | else{ |
| 4588 | - d3dg->Draw2DTextureFontTextCenter(0, 150, "mission failure", d3dg->GetColorCode(1.0f,0.0f,0.0f,1.0f), 24, 32); | |
| 4610 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 150, "mission failure", d3dg->GetColorCode(1.0f,0.0f,0.0f,1.0f), 24, 32); | |
| 4589 | 4611 | } |
| 4590 | 4612 | |
| 4591 | 4613 | //結果表示 |
| 4592 | 4614 | sprintf(str, "Time %dmin %dsec", GameInfoData.framecnt/(int)GAMEFPS/60, GameInfoData.framecnt/(int)GAMEFPS%60); |
| 4593 | - d3dg->Draw2DTextureFontTextCenter(0, 210, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 20, 32); | |
| 4615 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 210, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 20, 32); | |
| 4594 | 4616 | sprintf(str, "Rounds fired %d", GameInfoData.fire); |
| 4595 | - d3dg->Draw2DTextureFontTextCenter(0, 260, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 20, 32); | |
| 4617 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 260, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 20, 32); | |
| 4596 | 4618 | sprintf(str, "Rounds on target %d", intontarget); |
| 4597 | - d3dg->Draw2DTextureFontTextCenter(0, 310, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 20, 32); | |
| 4619 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 310, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 20, 32); | |
| 4598 | 4620 | sprintf(str, "Accuracy rate %.1f%%", rate); |
| 4599 | - d3dg->Draw2DTextureFontTextCenter(0, 360, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 20, 32); | |
| 4621 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 360, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 20, 32); | |
| 4600 | 4622 | sprintf(str, "Kill %d / HeadShot %d", GameInfoData.kill, GameInfoData.headshot); |
| 4601 | - d3dg->Draw2DTextureFontTextCenter(0, 410, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 20, 32); | |
| 4623 | + d3dg->Draw2DTextureFontTextCenterScaling(0, 410, str, d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), 20, 32); | |
| 4602 | 4624 | } |
| 4603 | 4625 | |
| 4604 | 4626 | //! @brief screen派生クラスの初期化(クラスの設定) |