
çŽ1幎åãç§ã®èšäºãåºãŠããŸãããããã¯ãã®èšäºã®ã æåã®éšå ããšåŒã¶ããšãã§ããŸãã æåã®éšåã§ã¯ãã§ããéããç±å¿ãªéçºè ã®å°é£ãªéãæŽçããŸããã ãããã®åªåã®çµæãèªå® ã§ãšã³ãžã³ããã¶ã€ããŒããã®ä»ã®ææ°ã®éçºããŒã«ãªãã§äœæãããRTSãžã£ã³ã«ã Land of Onimode ãã®ã²ãŒã ãã§ããŸããã ãããžã§ã¯ãã§ã¯ã C ++ãšAssemblerã䜿çšãããã¡ã€ã³ããŒã«ãšããŠç§èªèº«ã®é ã䜿çšãããŸããã
ãã®èšäºã§ã¯ãç§ãã©ã®ããã«ãèçè ãã®åœ¹å²ãåŒãåãããã®ãããžã§ã¯ããã埩掻ããããããšã決ãããã«ã€ããŠã話ããŸãã ç¬èªã®ã²ãŒã ãµãŒããŒã®äœæã«ã¯ãå€ãã®æ³šæãæãããŸãã
ããã¯èšäºã®ç¶ãã§ããã ããããå§ãŸããŸã ã
â èšäºã®åé ïŒã²ãŒã ã®åŸ©æŽ»
â èšäºã®çµããïŒãããã¯ãŒã¯
ç§ã®GUIã«ã€ããŠå°ã
GUIã§ã¯ ãã²ãŒã ã§äœ¿çšããå¿ èŠãªãã¹ãŠã®ã³ã³ããŒãã³ããäœæããå¿ èŠããããŸããã
1ïŒ ããã¹ããã£ãŒã«ã/ GStatic-ããã¹ãã衚瀺ã§ããŸãã ããã«ãããã¹ãã«ã¯ããã€ãã®ããããã£ããããŸã-ããã¹ãã®è²ãšãã©ã³ãã¯ã©ãã§ãå€æŽã§ããŸãã æåã¯ãç§ã¯ãã®æ©äŒãå¿ èŠãã©ãã確信ãæãŠãŸããã§ããããããã¯æçšä»¥äžã®ãã®ã§ããããšãå€æããŸããã

2ïŒ å ¥åãã£ãŒã«ã/ GEdit -1è¡ã®ããã¹ããšãã£ã¿ãŒã Windowsã®åæ§ã®ã³ã³ããŒãã³ããšåæ§ã®æ©èœãå®çŸããããšããŸããã æçµçã«ã圌ã¯ã¯ãªããããŒãã§ã®äœæ¥ãè¿œå ããŸããã ã©ã€ã»ã³ã¹ããŒãå ¥åããã ãã§ãããã匷å¶ãããŸããã

3ïŒ / GButtonãã¿ã³ã¯ãããŠã¹ã®ãããªã³ã°ãšæŒäžã«å¿çããéåžžã®ãã¿ã³ã§ãã

4ïŒ ã°ã©ãã£ãã¯ãã¿ã³/ GButtonImage-éåžžã®ãã¿ã³ãå€èŠ³ã®ã¿ã4ã€ã®ã°ã©ãã£ãã¯ã€ã¡ãŒãžã«ãã£ãŠæ±ºãŸããŸãïŒéåžžã®ç¶æ ãããŠã¹ã®äžãæŒãããŠéã¢ã¯ãã£ãïŒã

5ïŒ ãã©ã°ãã£ãŒã«ã/ GCheckBox -YES / NOã®ååã«ãã§ãã¯ããŒã¯ãä»ããããšãã§ãããã£ãŒã«ãã ãã£ãŒã«ãã®å³åŽã«èª¬æããããŸãã

6ïŒãªã¹ã/ GListBoxã¯åãªãããã¹ãæååã®ãªã¹ãã§ãã ãªã¹ãå ã®ä»»æã®è¡ãéžæã§ããŸãã

7ïŒ ããããããŠã³ãªã¹ã/ GComboBox-ã³ã³ããŒãã³ãã¯å ¥åãã£ãŒã«ãã®ããã«èŠãããªã¹ããéãè¿œå ã®ãã¿ã³ããããŸãã ç·šéãç¡å¹ã«ãããšãããããããŠã³ãªã¹ãã䜿çšããŠã®ã¿ãã£ãŒã«ãå€ãéžæã§ããŸãã äžè¬çã«ãããã¯ã å ¥åãã£ãŒã«ã ã ãªã¹ããããã³ãã¿ã³ã® 3ã€ã®ã³ã³ããŒãã³ããäžåºŠã«å«ããããå®è£ çšã®ããã ãã³ã³ããŒãã³ãã§ãã

8ïŒ Configurator / GDiscretBox-ã³ã³ããŒãã³ãã¯ã é³éãããŠã¹é床ãªã©ã®ã¬ãã«ã調æŽããããã«äœ¿çšãããŸãã

9ïŒ Picture / GPicture-ãã®ã³ã³ããŒãã³ãã䜿çšãããšãåããµã€ãºã®ã°ã©ãã£ãã¯ã€ã¡ãŒãžãããã€ã§ãããŠã³ããŒãããŠã衚瀺çšã«ããããéžæã§ããŸãã



10ïŒ ããªãŒ/ GTree-ããŒãã§æ§æãããè€éãªã³ã³ããŒãã³ãã§ãå éšã«ã¯ä»ã®ããŒããååšããå ŽåããããŸãã äžè¬ã«ãé£ç¹ã¯ãéå±€å šäœãäœæã§ããããšã§ãããããã°ã©ãã£ã«ã«ã«è¡šç€ºããå¿ èŠããããŸãã ã¢ã€ã³ã³ã䜿çšããããšãã§ããŸãã

11ïŒ ãããã¢ããã¡ãã¥ãŒ/ GMenu-å³ã¯ãªãã¯ãããšéåžžWindowsã«è¡šç€ºãããã¡ãã¥ãŒã®é¡äŒŒç©ã äž»ãªé£ç¹ã¯ããã«ãã¬ãã«ã¡ãã¥ãŒãäœæããèœåã«ãããŸãã

12ïŒ ãã€ã¢ãã°ããã¯ã¹/ GDialog-ä»ã®ã³ã³ããŒãã³ãããã®äžã«é 眮ããããã®ã¿ã€ãã«ä»ããŸãã¯ã¿ã€ãã«ãªãã®ãŠã£ã³ããŠã
13ïŒ Message / GMessageBoxã¯ãã¿ã€ãã«ãããã¹ããããã³OKããã³Cancelã¿ã€ãã®ãã¿ã³ã®ååšã«åºã¥ããŠèªåçã«æ§ç¯ããããã€ã¢ãã°ããã¯ã¹ã®ç¹æ®ãªã±ãŒã¹ã§ã ã

14ïŒ Scene / GScene-ãã€ã¢ãã°ããã¯ã¹ã®ç¹æ®ãªã±ãŒã¹ã§ãéåžžã¯ã¢ãã¿ãŒã®é åå šäœãã«ããŒããŸãã ã·ãŒã³ã®èæ¯ç»åãèšå®ããä»ã®ã³ã³ããŒãã³ããäžã«é 眮ã§ããŸãã ã·ãŒã³ã³ã³ããŒãã³ãã¯åžžã«ååšããŸãã å®éã«ã¯ãã¡ãã¥ãŒç»é¢ã®å€æŽã¯ãããŸããŸãªã·ãŒã³ã®å€æŽã§ãã

äžéšã®ã³ã³ããŒãã³ãã«ã¯1ã€ã®éèŠãªæ©èœããããŸããã³ã³ããŒãã³ããŠã£ã³ããŠã«åãŸããªãå¯èœæ§ãããä»»æã®éã®æ å ±ãå«ãŸããŠããå ŽåããããŸãã ããã¯ã Text Box ã List ãããã³Treeã³ã³ããŒãã³ãã«é©çšãããŸãã ãã®å Žåãã¹ã¯ããŒã«ããŒã䜿çšããŠã³ã³ããŒãã³ãã®ã³ã³ãã³ããã¹ã¯ããŒã«ããå¿ èŠããããŸãã è€éãã§ã¯ãã¹ã¯ããŒã«ããŒã®å®è£ ã¯éåžžãã³ã³ããŒãã³ãèªäœã®å®è£ ã®è€éããè¶ ããŠããŸãã
GUIå®è£ ã®ããã€ãã®ããéèŠãªãã€ã³ã
- OSã®æ©èœã«åŒ·ãçµã³ä»ããããªãããã«ãã¡ã€ã³ãŠã£ã³ããŠã1ã€ã ãäœæããŸãã 次ã«ããã®ãŠã£ã³ããŠã§ããŠã¹ã®åãããã£ããããããŠã¹ãå
¥ãã³ã³ããŒãã³ããç¹å®ããŸãã
- ã²ãŒã ã®æšæºçãªæç»ããžãã¯ãšã¯ç°ãªããã·ãŒã³å
šäœãå®å
šã«åæç»ãããå Žåãåæç»ãå¿
èŠãªã³ã³ããŒãã³ãã®ã¿ãåæç»ããããšããŸãã ããšãã°ãããŠã¹ããã¿ã³ã®äžã«ç§»åããå Žåããã¿ã³ãåæç»ããã ãã§æžã¿ãŸãã
- ãŸã å¿
èŠãªå Žåãããã移æ€ãè€éã«ããããšãèæ
®ããŠããæ£çŽãªãã¢ããªãã£ãå®è£
ããŸããã§ããã ã¢ããªãã£ãšã¯äœã§ããïŒ ããã¯ãäžéšã®ã³ã³ããŒãã³ããããŠã¹ããã£ããã£ããä»ã®ã³ã³ããŒãã³ãããã®ããŠã¹ã«å¿çããªãå Žåã§ãã ç§ãããããã¹ãŠæã£ãŠããŸãããå¿ã®äžã§ã¯ãã¢ãŒãã«ã³ã³ããŒãã³ãã«ã¯ãã³ã³ããŒãã³ããéãããããŸã§å¶åŸ¡ãä¿æããç¬èªã®åŠçãµã€ã¯ã«ãå¿
èŠã§ãã
äŸãæããŠèª¬æããŸãã MFCã§ã¯ã次ã®ãããªMessageBoxãåºåã§ããŸãã
if (MessageBox(" C:\Temp\test.avi . ?", "", MB_OKCANCEL | MB_ICONQUESTION)==IDOK)
ãã®çµæã次ã®ã¡ãã»ãŒãžããã¯ã¹ã衚瀺ãããŸãã
ããããéèŠãªããšã¯ãã OK ããŸãã¯ã ãã£ã³ã»ã« ã ãã¿ã³ãã¯ãªãã¯ãããŸã§ãç§ãåŒã³åºããMessageBoxïŒïŒé¢æ°ã¯å®äºããªãããšã§ãã ãããŠãããã¯éåžžã«äŸ¿å©ã§ãã GUIã«ãã¡ãã»ãŒãžã衚瀺ãããããŠã¹ãšããŒããŒãããã®MessageBoxã«ã®ã¿å¿çããŸãããããã°ã©ã ã¯éãããŸã§åŸ æ©ãããã¡ã€ã³ã®åŠçãµã€ã¯ã«ã䜿çšããŸãã ãããã£ãŠãåMessageBoxã®ã OK ããŸãã¯ã ãã£ã³ã»ã« ããã¿ã³ãæŒãããšãã®åå¿ãåå¥ã«èšè¿°ããå¿ èŠããããŸãã ç§ã®æèŠã§ã¯ãããã¯ç§ã®GUIã®äžå¿«ãªãã€ãã¹ã§ããã幞ããªããšã«ã²ãŒã ã§ã¯ããã»ã©äžè¬çã§ã¯ãããŸããã
- å
éšã§ã¯ã GUIã¯Windowsã§è¡ãããŠãããã¡ãã»ãŒãžãã®æŠå¿µã䜿çšããŸããã
- GUIã®çŸåšã®ããŒãžã§ã³ã«ã¯ã芪ã³ã³ããŒãã³ãã§ãã³ãã©ãŒããã¹ãããæ©èœããããŸããã ããšãã°ã Windowsã§ã¯ããã€ã¢ãã°ããã¯ã¹ã«ãã¿ã³ãé
眮ãããã€ã¢ãã°ããã¯ã¹ã®ã¯ã©ã¹ã®ãã¿ã³ã¯ãªãã¯ã«å¯Ÿããå¿çãé
眮ã§ããŸãã ç§ã®å Žåããã¿ã³å°çšã®OnLButtonClickïŒïŒå¿çãäœæããå¿
èŠããããŸãã
- ã ããŒã ãã®æŠå¿µã¯ã GUIã³ã³ããŒãã³ãã®èšèšã®ããã«å®è£
ãããŠããŸãã ããŒãã¯ã Windowsã®ããŒããšåæ§ã«æ©èœããŸã ã ã³ã³ããŒãã³ãã®å€èŠ³ãå®å
šã«å€æŽã§ããŸãã ç§ã®æåã®ãããã¯ã¯Windowsã§ããªãããããããã¯GThemeWindowsãšåŒã°ããŠããŸãã ã
ã¡ãã¥ãŒã¯éåžžã«æ©èœçã§ãããã次ã®ããã«èŠããŸããã
ã²ãŒã ã®ããã«ãç§ã¯GThemeOnimodããŒããäœæããŸãããããã¯ç§ã®å Žåã«ããé©ããŠããŸãã ããã§ãç§ã¯ãã§ã«çžç³ãä»ã®ããããªãã®ã«éææ§ã䜿çšãå§ããŸããã ããŒãã眮ãæãããšããã¹ãŠã®ã³ã³ããŒãã³ãã®å€èŠ³ãå®å šã«çœ®ãæããããããšãéèŠã§ãã
ã²ãŒã ã¡ãã¥ãŒã®åæç»ã«ã€ããŠ
ã¡ãã¥ãŒã®èæ¯ç»åããªãã¿ã®ãªãã¢ãŒãã£ã¹ããããªã¢ãŒãã§æ³šæããŸããã æåã®æ®µéã§ã¯ã圌ã¯ç§ã®ã²ãŒã ã奜ãã ã£ããšããäºå®ã ãã§å£çµããŠããŸãããããã£ãããšç§ãã¡ã®é¢ä¿ã¯éåžžã«å奜çã«ãªããŸããã
é·ãéãã¡ãã¥ãŒã®èæ¯ã«äœã衚瀺ãããã決å®ããããšã¯ã§ããŸããã§ããã ã²ãŒã ã«ã¯2ã€ã®ã¬ãŒã¹ãããã1ã€ã¯å®å®è¹ã§é£è¡ãã2ã€ç®ã¯ãŸã åŒããå°æããŠãããããããã2ã€ã®æŠå¿µãèæ¯ç»åã§ã€ãªãæ¹æ³ã¯æ確ã§ã¯ãããŸããã§ããã ããã€ãã®åçãæåŠãããåŸãããã¬ã¹ã³ç»ããšã¢ã€ãã¢ãè°è«ãããããšãæãåºããŸããã ãã®çµæãããã¬ã¹ã³ç»ãã¯ãæŽçªå£ç»ãã«å€ãããæ¯èŒçç°¡åã«æãããšãã§ããŸããã é«åºŠãªæè¡ãããã¡ãã¥ãŒã¯å®æçã«ãæŽçªçµµç»ããã¹ãã£ã³ããæ°ãããã®ãçºèŠããã¹ãã£ããŒãåãåããŸããã ãã€ããã¯ã¹ãè¿œå ããããã«ãã¡ãã¥ãŒã®å³åŽã«3ã€ã®è£ 食çãªã³ã³ããŒãã³ããæ¿å ¥ããŸããããããã®ã³ã³ããŒãã³ãã¯ãåžžã«ããçš®ã®æŽåçãªæŽ»åãè¡ããŸããããã®æå³ã¯ç§ã«ã¯ããŸãããããŸããã äžè¬çã«ãå®å®é£è¡å£«ãå®å®æãéããŠå¯ºé¢ã®å ¥ãå£ãèŠããšããèãæ¹ã§ããããç§ã®æèŠã§ã¯ããã®èŠèŠå¹æã¯åŸãããŸããã§ããã

ã¡ãã¥ãŒã®ã·ãŒã³éã®é·ç§»ã®ç¬éã«ãããºãŒã ã€ã³ãã®å¹æãããã°ã©ã ããããšããŸããã ãããŠãããã§ã¯ãç§ã¯æãŸããç®æšãéæããããšãã§ããããã§ããå°ãªããšãå人çã«ã¯ãã芳å¯è ããåé²ããŠãããå®éã«ã¯å¯ºé¢ã®äžã«å ¥ã£ãŠãããšããå°è±¡ãåããŸãã
ã¡ãã¥ãŒã®åé¡ã解決ããåŸãã²ãŒã ã®ã¢ããã°ã¬ãŒãçšã®ã¢ã€ã³ã³ã®å€èŠ³ã«æžæããŸããã ãã®ãugããã¯éåžžã«å°è±¡çã§ããããããã®åœ¢åŒã§ãããæ®ããŠã¯ãªããªãããšãç解ããŸããã
æ¢åã®ã¢ã€ã³ã³ã®å€èŠ³ãç§ãéåžžã«æ鬱ã«æ¯ãèãçç±ãæ確ã«ããããã«ããããã®å€èŠ³ã瀺ããŸãã

èšäºã®æåã®éšåãã次ã®ããã«ãã¢ãŒãã£ã¹ãã¯ãããžã§ã¯ããå®æãããã£ãšåã«ãããžã§ã¯ããå»ããŸããããã¢ã€ã³ã³ãå®éã«æ±ã£ã人ã¯ããŸããã§ããã
åæç»åŸãåãã¢ã€ã³ã³ã®æ°ããããŒãžã§ã³ã¯æ¬¡ã®ããã«ãªããŸããã

ãã®ãªãã·ã§ã³ã¯ã䜿çšã«éåžžã«é©ããŠããããã«æããŸãã ãšããã§ãã²ãŒã ã«ã¯ãã®ãããªã¢ã€ã³ã³ããããããããŸã-çŽ80åã§ãã 幞ããªããšã«ããããã®å€ãã¯å€èŠ³ã䌌ãŠããŸãããããšãã°ã 第1ã¬ãã«ã®é§ãšç¬¬2ã¬ãã«ã®é§ã¯ãäžéšã®è©³çŽ°ãšèæ¯è²ã®ã¿ãç°ãªããŸãã
ãã©ã³ã
Windowsãã©ã³ãã䜿çšããããšã¯ä»ã§ã¯äžå¯èœã«ãªã£ãŠããŸãã ããã§ãããªãã¯åã³äœããããããªããã°ãªããŸããã§ããã æãæçœãªãªãã·ã§ã³ã¯ãç»åã®åœ¢åŒã§ãã©ã³ããäºåçæãããã®ç»åã®åæåã®åº§æšãããã¹ããã¡ã€ã«ã«åå¥ã«ä¿åããããšã§ãã 次ã«ããããã®åº§æšããããã°ããã£ã©ã¯ã¿ãŒã1ã€ãã€æãããšãã§ããŸãã 幞ããªããšã«ãæ°å¹Žåãç§ã¯ãããè¡ãå°ããªãŠãŒãã£ãªãã£ãäœæããŸããã ãŠãŒãã£ãªãã£ã¯ããããããŠã³ããŒãã§ããŸã ã

ïŒææ ïŒããŒããã¹ã¯ãªãŒã³ã·ã§ããã§å·Šããäžã«æ°ä»ãããšããã§ã... 2006幎ã«ãã§ã«ããããã£ãããšãããããŸããããããŠãããã»ã©æéãçµã£ãŠããªãããã«æããŸãããïŒ
ãŠãŒãã£ãªãã£ã®äœ¿çšæ¹æ³ã¯ã»ãŒæ確ã ãšæããŸãã ãã©ã³ããšãã®ç¹æ§ãããã³ãã¯ã¹ãã£ã®é·ããéžæããŸãã ã«ãŒãã³ã°ãã£ãŒã«ãã«1ãå ¥åããããšããå§ãããŸããããããªããšããã£ã©ã¯ã¿ãŒã觊ãå§ããå¯èœæ§ããããããã¯å®å šã«æªãã§ãã ãŠãŒãã£ãªãã£ã¯ãã¯ã¹ãã£ãTGAãã¡ã€ã«ãšããŠä¿åããç»åèªäœã¯ã¢ã«ãã¡ãã£ã³ãã«äžã«ãããããã¢ã«ãã¡ãã£ã³ãã«ã衚瀺ããªãããã°ã©ã ã§ã¯ç©ºçœã®çœãã·ãŒããäœæãããŸãã ããã§ããç»åã¯ã¢ã«ãã¡ãã£ãã«ã«ååšããŸãã
çµæã®ãã¯ã¹ãã£ã¯ãå¥ã®ãŠã£ã³ããŠã§ç¢ºèªã§ããŸãã äžè¬ã«ãçµæãå€å°ãªããšãå¿«é©ã«ãªããŸã§èšå®ãè©Šãããã¯ã¹ãã£ãä¿åããŸãã

ãµãŒãããŒãã£ã®APIãªãã§ç°¡åã«ä¿åã§ããããã TGA圢åŒã䜿çšããŸããã
èçã²ãŒã
Windowsã¹ã¿ã€ã«ã®ããŒãã䜿çšããGUIãå€å°ãªããšããæ¯ãå¹ãå§ããããšããã€ãã«Windows 8/10ã§ã²ãŒã ã®èçãéå§ããæ©äŒãåŸãŸãã ã ããããåæ段éã§ã¯ãèªåã®ãããã¯ãŒã¯ãæã£ãŠããªãã£ããããã²ãŒã èªäœã®ããçŽããéå§ã§ããŸããã§ããã ãã®ãããããããšãã£ã¿ãŒã䜿çšããŠèšç»ãå®è£ ãå§ããŸããã 圌ã¯ãããã¯ãŒã¯ããããŸã§ã®GUIãå¿ èŠãšããŸããã§ããããŸãã DirectInputã䜿çšãããããŠã¹ãšããŒããŒãããæšæºã®Windowsã¡ãã»ãŒãžãä»ããŠãã¹ãŠã®ããŒã¿ãåãåããŸãã ã ããããã®åŸã圌ã¯ç©æ¥µçã«ã¢ã»ã³ãã©ã䜿çšããŠã²ãŒã ãªããžã§ã¯ããæç»ããŸããã
ãããŠãå°ããªããšããå§ããã®ã¯è«ççã§ããããªããªããããç§ããã¹ãŠãå°ç¡ãã«ãå§ããããããã«ãçµãããèŠã€ãããªãããšç解ããããã§ãã äžè¬ã«ããããžã§ã¯ãããDirectX h-ãã¡ã€ã«ãå床åé€ããŸããããäœæ¥ã®ç¯å²ãè©äŸ¡ããã ãã§ãªãããã®äœæ¥ãè¡ãå¿ èŠããããŸããã
ãŸãã IDirectDrawSurfaceãµãŒãã§ã¹äžã®ãã¹ãŠã®ãã€ã³ã¿ãŒãGSurfaceOLèªèº«ã®ãµãŒãã§ã¹ãžã®ãã€ã³ã¿ãŒã«çœ®ãæããŸããã GSurfaceOLã¯ã©ã¹ã§ã DirectDrawãµãŒãã§ã¹ã®åäœããšãã¥ã¬ãŒãããããšã«ãªã£ãŠããé¢æ°ãè¿œå ããŸããã
long BltFast(unsigned int dwX, unsigned int dwY, GSurfaceOL* lpDDSrcSurface, RECT* lpSrcRect, unsigned int dwFlags);
ãã®ã¢ãããŒãã¯ãã³ã³ãã€ã©ãŒã«ãã£ãŠçæããããšã©ãŒã®æ°ãããã«å€§å¹ ã«åæžããŸãããããã¯ãèªåã®ãµãŒãã§ã¹ãšãããã«å¯Ÿããé¢æ°ã®äž¡æ¹ãååšããããã§ãã
次ã«ãæ®ãã®ãšã©ãŒïŒæ°çŸä»¶ïŒããã¹ãŠèª¿ã¹ãç¹å®ã®åã±ãŒã¹ãåæããŸããã 幞ããªããšã«ãã»ãšãã©ã®ãšã©ãŒã¯åãçç±ã§çºçãããããåããœãªã¥ãŒã·ã§ã³ã泚ææ·±ãé©çšããã ãã§æžã¿ãŸããã
äžè¬çã«ã¯ãçŸåšã®ããã«æããŸããããšãã£ã¿ãŒããDirectXãžã®ãã¹ãŠã®åç §ãåé€ããããšãã§ããã®ã¯çŽ1é±éåã§ãã ããã«ãé¢æ°ãæ©èœããã®ã«æéãããããæçµçã«ãæåã®éèŠãªçµæãåŸãããŸããã
ããã§ç°¡åã«èª¬æããããã«ããã¹ãŠãããã»ã©åçŽã§ã¯ãªãããšã¯æããã§ãããå€ãã®å Žåãé²è¡ãéåžžã«é ãããããã€ãã®å°ããªå°é£ã«çŽé¢ããªããã°ãªããŸããã§ããã ããšãã°ãããã¯ãã§ã«æ©èœããŠãããšãã£ã¿ãŒã®ã¹ã¯ãªãŒã³ã·ã§ããã§ãããæ¬ é¥ããããèµ€ãäžç·ã§æžãçããŠããŸãã

ã¢ã»ã³ãã©ãŒã«ãã£ãŠæç»ãããã»ã°ã¡ã³ãã§æ§æããã寿åœã€ã³ãžã±ãŒã¿ãŒã¯ãç»åãéåžžã«ãŒãããŠããããšã瀺ããŠããŸãã ãã€ã³ããæçµæ®µéã«ããããšã«æ°ã¥ããŸã§ãç§ã¯é·ãéæãã§ãããæçµæ®µéã¯DirectXã«ãã£ãŠå¶åŸ¡ãããŠããŸããã
å ã»ã©èšã£ãããã«ãRAMå ã®16ãããã®è¡šé¢ã«ç»åå šäœããã€ã³ãããŸããã ãŸãã DirectXãä»ããŠæ¢ã«ãããªã¡ã¢ãªã«ãã«ã¹ã¯ãªãŒã³ãµã€ãºã§A1R5G5B5ãã¯ã¹ãã£ãäœæããŸããïŒæåã¯X1R5G5B5圢åŒã䜿çšããŠããŸãããã幞ããªããšã«ãäžéšã®ã³ã³ãã¥ãŒã¿ãŒã¯ãã®åœ¢åŒãç解ããªãããšã«æ°ä»ããŸããïŒæ¬¡ã«ã DirectXãã¯ã¹ãã£ã§LockïŒïŒãå®è¡ããŸã-aãããã³memcpyïŒïŒé¢æ°ã䜿çšããŠRAMãããã¯ã¹ãã£ãã³ããŒããŸãã UnlockïŒïŒãä»ããŠDirectXã®ãã¯ã¹ãã£ããªãªãŒã¹ããå®éã«ã¯ã DirectXã®æšæºãã¯ã¹ãã£ã§ã€ã¡ãŒãžãååŸããŸãã ãããŠä»ãããã¯2ã€ã®ãã¯ã¹ãã£ä»ãäžè§åœ¢ã®åœ¢ã§æãããšãã§ããŸãã 確ãã«ããã®ãã¯ã¹ãã£ã®ãµã€ãºã¯16ãããã§ãç»é¢ã®è§£å床ã¯24ãããã§ãã ããããããã§ã¯DirectX9ãæäžäœã«ããããšãå€æããŸãããåé¡ãªãäžè§åœ¢ã®ã¬ã³ããªã³ã°ã®ç¬éã«è²å€æãå®è¡ããŸãã æåã«ããã®å€æãèªåã§è¡ã£ãŠRAMããã»ã«ã³ããªãããªãããã¡ãŒã«çŽæ¥ããŒã¿ã移åããããšããããšãèªããªããã°ãªããŸãããã DirectXãšæ¯èŒããçµæã¯ç§ãæºè¶³ãããŸããã§ããã
ã ããããŒãããç»åã®ããã«ãã¹ãŠã説æãå§ããŸããã ã ãã...æåãç§ã¯ãã®ãã§ãŒã³ã®åé¡ãæç¶çã«æ€çŽ¢ããŸããã ããããã»ã«ã³ããªãããã¡ãŒãããã©ã€ããªãžã®ã€ã¡ãŒãžã®æçµè»¢éãå®è¡ããDirectXé¢æ°PresentïŒïŒãæ£ããæ§æãããŠããªãããšãå€æããŸããã
ç§ã«ãšã£ãŠããã®é¢æ°ã¯æ¬¡ã®ããã«èŠããŸããã
device_3d->Present(NULL, NULL, NULL, NULL);
ãã ãããŠã£ã³ããŠã¢ãŒãã§ã¯ãæåã®2ã€ã®ãã©ã¡ãŒã¿ãŒã«NULLãæå®ã§ããŸãããããã§ã¯ããfromããšãwhereãã®é·æ¹åœ¢ãã³ããŒãããŸãã æ¥ãã§ã PresentïŒïŒé¢æ°ããã«ã¹ã¯ãªãŒã³ãœãªã¥ãŒã·ã§ã³ããã³ããŒããŸããããNULLã䜿çšããã®ã¯éåžžã«æ®éã§ããã
ãããŠããã®ãããªäºçŽ°ãªããšã¯åžžã«åºãããã®ã§ãããã°ã©ãã®ä»äºã®è©äŸ¡ã¯æ確ãªæéæ ã«ã¯åããŠããŸãã-ã©ããªäºçŽ°ãªããšã§ãéçºãç¡æéã«é ãããããšãã§ããŸãã å人çã«ã¯ããèŠããã®çšèªã«3ãæããå¿ èŠãããããšããã«ãŒã«ãåžžã«å®ã£ãŠããŸããã éçºè ã®äž»ãªã¿ã¹ã¯ã¯ããã§ããã ãæ©ããšã©ãŒãä¿®æ£ãããããšã§ã¯ãªããã1ã€ã®ãšã©ãŒãä¿®æ£ãããšãã«æ°ãããšã©ãŒãäœæããªãããšãã§ãã çŽ1幎éã²ãŒã ãææ¢ãããŠãã²ãŒã èªäœã«ã¯ã»ãšãã©è§ŠããŸããã§ãããïŒãããã¯ãŒã¯ã€ã³ã¿ã©ã¯ã·ã§ã³ãšã¡ãã¥ãŒãé€ãïŒãæ®éçãªãã·ã§ã«ããäœæããéæ¥çãªã¿ã¹ã¯ã解決ããã ãã§ãã
ãšãã£ã¿ãŒãèµ·åããåŸãç§ã¯ã€ãã«ã²ãŒã ã«ç§»ããŸããã ããããããã§ã¯ããããã®ãå¥ã®ãã®ã«çœ®ãæããã ãã§ãªãããããããçŽãå¿ èŠããããŸããã ç·äœæ¥éã¯ã¯ããã«éèŠã§ããã ã¡ãã¥ãŒã¯ãã³ã³ããŒãã³ãã®é 眮ãé¡äŒŒããŠããã«ãããããããã»ãŒå®å šã«ããçŽãããŸããã ããããæ¹åã§ããããšãé¡ã£ãŠããŸãã
ããã...ç§ã¯ãã§ã«GUIã«ã€ããŠååã«è©±ãåã£ãã®ã§ãä»åºŠã¯ãã®èšäºãã·ã§ã«ã§ã®äœæ¥ã«é¢ããããã¥ã¡ã³ãã«å€ãããã誰ããå¿ èŠãšãããããããªããšãã«ãã®ãããã¯ãæ®ãå¿ èŠããããŸãã
ããããç§ã¯ãããã¯ãŒã¯ã«ãšã©ãŸãããšã«ããŸããã ååã®èšäºã§ã¯ã ãããã¯ãŒã¯ã«ã€ããŠéåžžã«ç°¡åã«èª¬æããRTSã«é¢é£ãããããã¯ãŒã¯ã²ãŒã ã®æ©èœã«é¢ããŠã¯ããããã¯ãŒã¯ã®çžäºäœçšãäœæããããšã«ããŸã泚æãåããŸããã§ããã ãŸããååã®èšäºã®èªè ã®äžã«ã¯ããã®äž»é¡ã«é¢ããå°éã®æ å ±ãåŸæããŠãã人ãããããšã«æ°ä»ããŸããã ãããã£ãŠãä»åã¯ãã€ã³ã¿ãŒããããµãŒããŒãšãããã¯ãŒã¯ã¯ã©ã€ã¢ã³ãã®èšè¿°ã«äœ¿çšããååã説æããããšã«ããŸããã ç§ã®æèŠã§ã¯ããã®è³æã¯ãæ¬è³ªãç解ãããããšã決ãã人ã«æ¯ã¹ãŠã¯ããã«ãéé ·ãã§ãã
â èšäºã®åé ïŒã²ãŒã ã®åŸ©æŽ»
â èšäºã®çµããïŒãããã¯ãŒã¯