• R/O
  • SSH
  • HTTPS

コミット

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。


コミットメタ情報

リビジョン327 (tree)
日時2022-09-06 02:13:16
作者xops-mikan

ログメッセージ

構造体の記述方法を修正、一部変数名を変更

変更サマリ

差分

--- trunk/collision.cpp (revision 326)
+++ trunk/collision.cpp (revision 327)
@@ -34,7 +34,7 @@
3434 //! @brief コンストラクタ
3535 Collision::Collision()
3636 {
37- blockdata = NULL;
37+ BlockDataIF = NULL;
3838 cbdata = new Coll_Blockdata[MAX_BLOCKS];
3939 for(int i=0; i<MAX_BLOCKS; i++){
4040 cbdata[i].min_x = 0.0f;
@@ -55,17 +55,17 @@
5555 }
5656
5757 //! @brief ブロックデータを取り込む
58-//! @param in_blockdata ブロックデータ
59-int Collision::InitCollision(BlockDataInterface* in_blockdata)
58+//! @param in_BlockDataIF ブロックデータ
59+int Collision::InitCollision(BlockDataInterface* in_BlockDataIF)
6060 {
6161 int bs;
62- struct blockdata data;
62+ blockdata data;
6363 int vID[4];
6464
65- if( in_blockdata == NULL ){ return 1; }
66- blockdata = in_blockdata;
65+ if( in_BlockDataIF == NULL ){ return 1; }
66+ BlockDataIF = in_BlockDataIF;
6767
68- bs = blockdata->GetTotaldatas();
68+ bs = BlockDataIF->GetTotaldatas();
6969
7070 for(int i=0; i<bs; i++){
7171 cbdata[i].BoardBlock = false;
@@ -77,7 +77,7 @@
7777 float cz = 0.0f;
7878 float x, y, z, rx, ry, r;
7979
80- blockdata->Getdata(&data, i);
80+ BlockDataIF->Getdata(&data, i);
8181
8282 //中心を求める
8383 for(int j=0; j<8; j++){
@@ -243,15 +243,15 @@
243243 //! @attention 各当たり判定の関数から自動的に呼ばれます。
244244 bool Collision::CheckPolygonFront(int id, int face, float x, float y, float z)
245245 {
246- if( blockdata == NULL ){ return false; }
247- if( (id < 0)||(blockdata->GetTotaldatas() <= id) ){ return false; }
246+ if( BlockDataIF == NULL ){ return false; }
247+ if( (id < 0)||(BlockDataIF->GetTotaldatas() <= id) ){ return false; }
248248 if( (face < 0)||(6 < face) ){ return false; }
249249
250- struct blockdata bdata;
250+ blockdata bdata;
251251 float vx, vy, vz;
252252 float d;
253253
254- blockdata->Getdata(&bdata, id);
254+ BlockDataIF->Getdata(&bdata, id);
255255
256256 //面の中心を基準点に、座標のベクトルを求める
257257 vx = cbdata[id].polygon_center_x[face] - x;
@@ -274,15 +274,15 @@
274274 //! @return 表向き:true 裏向き:false
275275 bool Collision::CheckPolygonFrontRx(int id, int face, float rx)
276276 {
277- if( blockdata == NULL ){ return false; }
278- if( (id < 0)||(blockdata->GetTotaldatas() <= id) ){ return false; }
277+ if( BlockDataIF == NULL ){ return false; }
278+ if( (id < 0)||(BlockDataIF->GetTotaldatas() <= id) ){ return false; }
279279 if( (face < 0)||(6 < face) ){ return false; }
280280
281- struct blockdata bdata;
281+ blockdata bdata;
282282 float vx, vz;
283283 float d;
284284
285- blockdata->Getdata(&bdata, id);
285+ BlockDataIF->Getdata(&bdata, id);
286286
287287 //ベクトル算出
288288 vx = cosf(rx);
@@ -312,7 +312,7 @@
312312 //! @attention 各当たり判定の関数から自動的に呼ばれます。
313313 bool Collision::CheckIntersectTri(int blockid, int face, float RayPos_x, float RayPos_y, float RayPos_z, float RayDir_x, float RayDir_y, float RayDir_z, float *out_Dist)
314314 {
315- struct blockdata data;
315+ blockdata data;
316316 int vID[4];
317317 float d1, d2;
318318 float vx1, vy1, vz1;
@@ -320,7 +320,7 @@
320320 float x, y, z;
321321 float vx2, vy2, vz2;
322322
323- blockdata->Getdata(&data, blockid);
323+ BlockDataIF->Getdata(&data, blockid);
324324 blockdataface(face, vID, NULL);
325325
326326 //内積
@@ -422,8 +422,8 @@
422422 //! @warning *planeid が返す表面(0〜5)は、複数の面が該当する場合でも、最初に見つけた1面のみ返します。
423423 bool Collision::CheckBlockInside(int blockid, float x, float y, float z, bool worldgroup, int *planeid)
424424 {
425- if( blockdata == NULL ){ return false; }
426- if( (blockid < 0)||(blockdata->GetTotaldatas() <= blockid) ){ return false; }
425+ if( BlockDataIF == NULL ){ return false; }
426+ if( (blockid < 0)||(BlockDataIF->GetTotaldatas() <= blockid) ){ return false; }
427427
428428 //板状のブロックは計算外
429429 if( cbdata[blockid].BoardBlock == true ){ return false; }
@@ -470,9 +470,9 @@
470470 //! @return 埋っている:true 埋っていない:false
471471 bool Collision::CheckALLBlockInside(float x, float y, float z)
472472 {
473- if( blockdata == NULL ){ return false; }
473+ if( BlockDataIF == NULL ){ return false; }
474474
475- int bs = blockdata->GetTotaldatas();
475+ int bs = BlockDataIF->GetTotaldatas();
476476
477477 for(int i=0; i<bs; i++){
478478 if( CheckBlockInside(i, x, y, z, true, NULL) == true ){ return true; }
@@ -499,8 +499,8 @@
499499 //! @attention また、レイが複数のブロックに当たる場合は、レイの始点から一番近い判定を返します。
500500 bool Collision::CheckBlockIntersectRay(int blockid, float RayPos_x, float RayPos_y, float RayPos_z, float RayDir_x, float RayDir_y, float RayDir_z, int *face, float *Dist, float maxDist)
501501 {
502- if( blockdata == NULL ){ return false; }
503- if( (blockid < 0)||(blockdata->GetTotaldatas() <= blockid) ){ return false; }
502+ if( BlockDataIF == NULL ){ return false; }
503+ if( (blockid < 0)||(BlockDataIF->GetTotaldatas() <= blockid) ){ return false; }
504504 if( (RayDir_x == 0.0f)&&(RayDir_y == 0.0f)&&(RayDir_z == 0.0f) ){ return false; }
505505
506506 float pDist;
@@ -630,10 +630,10 @@
630630 //! @attention また、レイが複数のブロックに当たる場合は、<b>レイの始点から一番近い判定</b>を返します。
631631 bool Collision::CheckALLBlockIntersectRay(float RayPos_x, float RayPos_y, float RayPos_z, float RayDir_x, float RayDir_y, float RayDir_z, int *id, int *face, float *Dist, float maxDist)
632632 {
633- if( blockdata == NULL ){ return false; }
633+ if( BlockDataIF == NULL ){ return false; }
634634 if( (RayDir_x == 0.0f)&&(RayDir_y == 0.0f)&&(RayDir_z == 0.0f) ){ return false; }
635635
636- int bs = blockdata->GetTotaldatas();
636+ int bs = BlockDataIF->GetTotaldatas();
637637 float pDist;
638638 float min_pDist = FLT_MAX;
639639 int min_blockid = -1;
@@ -758,7 +758,7 @@
758758 //! @attention また、レイが複数のブロックに当たる場合は、<b>一番最初に発見した判定</b>を返します。
759759 bool Collision::CheckALLBlockIntersectDummyRay(float RayPos_x, float RayPos_y, float RayPos_z, float RayDir_x, float RayDir_y, float RayDir_z, int *id, int *face, float *Dist, float maxDist)
760760 {
761- if( blockdata == NULL ){ return false; }
761+ if( BlockDataIF == NULL ){ return false; }
762762 if( maxDist <= 0.0f ){ return false; }
763763
764764 float RayPos2_x = RayPos_x + RayDir_x * maxDist/2;
@@ -819,12 +819,12 @@
819819 //! @brief ブロックに沿って移動するベクトルを求める
820820 void Collision::ScratchVector(int id, int face, float in_vx, float in_vy, float in_vz, float *out_vx, float *out_vy, float *out_vz)
821821 {
822- if( blockdata == NULL ){ return; }
823- if( (id < 0)||(blockdata->GetTotaldatas() <= id) ){ return; }
822+ if( BlockDataIF == NULL ){ return; }
823+ if( (id < 0)||(BlockDataIF->GetTotaldatas() <= id) ){ return; }
824824 if( (face < 0)||(6 < face) ){ return; }
825825
826- struct blockdata bdata;
827- blockdata->Getdata(&bdata, id);
826+ blockdata bdata;
827+ BlockDataIF->Getdata(&bdata, id);
828828
829829 //内積
830830 float Dot = in_vx * bdata.material[face].vx + in_vy * bdata.material[face].vy + in_vz * bdata.material[face].vz;
@@ -837,12 +837,12 @@
837837 //! @brief ブロックに反射するベクトルを求める
838838 void Collision::ReflectVector(int id, int face, float in_vx, float in_vy, float in_vz, float *out_vx, float *out_vy, float *out_vz)
839839 {
840- if( blockdata == NULL ){ return; }
841- if( (id < 0)||(blockdata->GetTotaldatas() <= id) ){ return; }
840+ if( BlockDataIF == NULL ){ return; }
841+ if( (id < 0)||(BlockDataIF->GetTotaldatas() <= id) ){ return; }
842842 if( (face < 0)||(6 < face) ){ return; }
843843
844- struct blockdata bdata;
845- blockdata->Getdata(&bdata, id);
844+ blockdata bdata;
845+ BlockDataIF->Getdata(&bdata, id);
846846
847847 //内積
848848 float Dot = in_vx * bdata.material[face].vx + in_vy * bdata.material[face].vy + in_vz * bdata.material[face].vz;
@@ -857,12 +857,12 @@
857857 //! @attention 表向き:0.0〜PI/2(0.0度〜90.0度)、裏向き:-0.0〜-PI/2(-0.0度〜-90.0度)
858858 bool Collision::AngleVector(int id, int face, float in_vx, float in_vy, float in_vz, float *out_angle)
859859 {
860- if( blockdata == NULL ){ return false; }
861- if( (id < 0)||(blockdata->GetTotaldatas() <= id) ){ return false; }
860+ if( BlockDataIF == NULL ){ return false; }
861+ if( (id < 0)||(BlockDataIF->GetTotaldatas() <= id) ){ return false; }
862862 if( (face < 0)||(6 < face) ){ return false; }
863863
864- struct blockdata bdata;
865- blockdata->Getdata(&bdata, id);
864+ blockdata bdata;
865+ BlockDataIF->Getdata(&bdata, id);
866866
867867 float maxDist = sqrtf(in_vx*in_vx + in_vy*in_vy + in_vz*in_vz);
868868 if( maxDist == 0.0f ){ return false; }
@@ -881,14 +881,14 @@
881881 //! @attention 向き:0.0〜PI/2(0.0度〜90.0度)
882882 bool Collision::ScratchAngleVector(int id, int face, float in_vx, float in_vy, float in_vz, float *out_vx, float *out_vy, float *out_vz, float *out_angle)
883883 {
884- if( blockdata == NULL ){ return false; }
885- if( (id < 0)||(blockdata->GetTotaldatas() <= id) ){ return false; }
884+ if( BlockDataIF == NULL ){ return false; }
885+ if( (id < 0)||(BlockDataIF->GetTotaldatas() <= id) ){ return false; }
886886 if( (face < 0)||(6 < face) ){ return false; }
887887
888888 if( (in_vx == 0.0f)&&(in_vy == 0.0f)&&(in_vz == 0.0f) ){ return false; }
889889
890- struct blockdata bdata;
891- blockdata->Getdata(&bdata, id);
890+ blockdata bdata;
891+ BlockDataIF->Getdata(&bdata, id);
892892
893893 //内積
894894 float Dot = in_vx * bdata.material[face].vx + in_vy * bdata.material[face].vy + in_vz * bdata.material[face].vz;
--- trunk/collision.h (revision 326)
+++ trunk/collision.h (revision 327)
@@ -42,7 +42,7 @@
4242 #include <float.h>
4343
4444 //! 当たり判定用ブロックデータ構造体
45-struct Coll_Blockdata
45+typedef struct
4646 {
4747 float x[8]; //!< ブロック X座標
4848 float y[8]; //!< ブロック Y座標
@@ -58,13 +58,13 @@
5858 float max_z; //!< ブロック Z座標の最大値
5959 bool BoardBlock; //!< ブロック が厚さ0で板状になっているか
6060 int worldgroup; //!< 空間分割のグループ
61-};
61+} Coll_Blockdata;
6262
6363 //! @brief 当たり判定を行うクラス
6464 //! @details マップとして使用されるブロックデータへの当たり判定(衝突検出)を行います。
6565 class Collision
6666 {
67- class BlockDataInterface* blockdata; //!< 読み込んだブロックデータが格納されたクラスへのポインタ
67+ class BlockDataInterface* BlockDataIF; //!< 読み込んだブロックデータが格納されたクラスへのポインタ
6868 Coll_Blockdata *cbdata; //!< ブロックデータ
6969
7070 bool CheckIntersectTri(int blockid, int face, float RayPos_x, float RayPos_y, float RayPos_z, float RayDir_x, float RayDir_y, float RayDir_z, float *out_Dist);
@@ -72,7 +72,7 @@
7272 public:
7373 Collision();
7474 ~Collision();
75- int InitCollision(BlockDataInterface* in_blockdata);
75+ int InitCollision(BlockDataInterface* in_BlockDataIF);
7676 void GetBlockPosMINMAX(int id, float *min_x, float *min_y, float *min_z, float *max_x, float *max_y, float *max_z);
7777 int GetWorldGroup(float x, float z);
7878 bool CheckPolygonFront(int id, int face, float x, float y, float z);
--- trunk/d3dgraphics-directx.cpp (revision 326)
+++ trunk/d3dgraphics-directx.cpp (revision 327)
@@ -61,7 +61,7 @@
6161 hPSEnableTexture = NULL;
6262 #endif
6363
64- blockdata = NULL;
64+ BlockDataIF = NULL;
6565 bs = 0;
6666 for(int i=0; i<TOTAL_BLOCKTEXTURE; i++){
6767 mapTextureID[i] = -1;
@@ -1330,28 +1330,28 @@
13301330 }
13311331
13321332 //! @brief マップデータを取り込む
1333-//! @param in_blockdata ブロックデータ
1333+//! @param in_BlockDataIF ブロックデータ
13341334 //! @param directory ブロックデータが存在するディレクトリ
1335-void D3DGraphics::LoadMapdata(BlockDataInterface* in_blockdata, const char *directory)
1335+void D3DGraphics::LoadMapdata(BlockDataInterface* in_BlockDataIF, const char *directory)
13361336 {
13371337 //ブロックデータが指定されていなければ、処理しない。
1338- if( in_blockdata == NULL ){ return; }
1338+ if( in_BlockDataIF == NULL ){ return; }
13391339 if( directory == NULL ){ return; }
13401340
13411341 char fname[MAX_PATH];
13421342 char fnamefull[MAX_PATH];
13431343 //int bs;
1344- struct blockdata data;
1344+ blockdata data;
13451345 int vID[4];
13461346 int uvID[4];
13471347
13481348 //クラスを設定
1349- blockdata = in_blockdata;
1349+ BlockDataIF = in_BlockDataIF;
13501350
13511351 //テクスチャ読み込み
13521352 for(int i=0; i<TOTAL_BLOCKTEXTURE; i++){
13531353 //テクスチャ名を取得
1354- blockdata->GetTexture(fname, i);
1354+ BlockDataIF->GetTexture(fname, i);
13551355
13561356 if( strcmp(fname, "") == 0 ){ //指定されていなければ、処理しない
13571357 mapTextureID[i] = -1;
@@ -1373,7 +1373,7 @@
13731373 VERTEXTXTA* pVertices;
13741374
13751375 //ブロック数を取得
1376- bs = blockdata->GetTotaldatas();
1376+ bs = BlockDataIF->GetTotaldatas();
13771377
13781378 //ブロック数分のバッファーを作成
13791379 pd3dDevice->CreateVertexBuffer(bs*6*4*sizeof(VERTEXTXTA), 0, D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1, D3DPOOL_DEFAULT, &g_pVB, NULL);
@@ -1380,7 +1380,7 @@
13801380
13811381 for(int i=0; i<bs; i++){
13821382 //データを取得
1383- blockdata->Getdata(&data, i);
1383+ BlockDataIF->Getdata(&data, i);
13841384
13851385 for(int j=0; j<6; j++){
13861386 //面の頂点データの関連付けを取得
@@ -1412,11 +1412,11 @@
14121412 }
14131413 #else
14141414 //ブロック数を取得
1415- bs = blockdata->GetTotaldatas();
1415+ bs = BlockDataIF->GetTotaldatas();
14161416
14171417 for(int i=0; i<bs; i++){
14181418 //データを取得
1419- blockdata->Getdata(&data, i);
1419+ BlockDataIF->Getdata(&data, i);
14201420
14211421 for(int j=0; j<6; j++){
14221422 //面の頂点データの関連付けを取得
@@ -1457,9 +1457,9 @@
14571457 void D3DGraphics::RenderMapdata(bool wireframe)
14581458 {
14591459 //ブロックデータが読み込まれていなければ、処理しない。
1460- if( blockdata == NULL ){ return; }
1460+ if( BlockDataIF == NULL ){ return; }
14611461
1462- struct blockdata data;
1462+ blockdata data;
14631463 int textureID;
14641464
14651465 if( wireframe == true ){
@@ -1467,7 +1467,7 @@
14671467
14681468 //ワイヤーフレーム表示
14691469 for(int i=0; i<bs; i++){
1470- blockdata->Getdata(&data, i);
1470+ BlockDataIF->Getdata(&data, i);
14711471 Renderline(data.x[0], data.y[0], data.z[0], data.x[1], data.y[1], data.z[1], linecolor);
14721472 Renderline(data.x[1], data.y[1], data.z[1], data.x[2], data.y[2], data.z[2], linecolor);
14731473 Renderline(data.x[2], data.y[2], data.z[2], data.x[3], data.y[3], data.z[3], linecolor);
@@ -1527,7 +1527,7 @@
15271527
15281528 for(int i=0; i<bs; i++){
15291529 //データ取得
1530- blockdata->Getdata(&data, i);
1530+ BlockDataIF->Getdata(&data, i);
15311531
15321532 for(int j=0; j<6; j++){
15331533 //テクスチャ認識番号を取得
@@ -1579,7 +1579,7 @@
15791579
15801580 for(int i=0; i<bs; i++){
15811581 //データ取得
1582- blockdata->Getdata(&data, i);
1582+ BlockDataIF->Getdata(&data, i);
15831583
15841584 for(int j=0; j<6; j++){
15851585 //テクスチャ認識番号を取得
@@ -1613,7 +1613,7 @@
16131613 #ifdef BLOCKDATA_GPUMEMORY
16141614 if( g_pVB == NULL ){ return; }
16151615 #endif
1616- if( (bs == 0)&&(blockdata == NULL) ){ return; }
1616+ if( (bs == 0)&&(BlockDataIF == NULL) ){ return; }
16171617
16181618 //テクスチャを開放
16191619 for(int i=0; i<TOTAL_BLOCKTEXTURE; i++){
@@ -1629,7 +1629,7 @@
16291629 #endif
16301630 bs = 0;
16311631
1632- blockdata = NULL;
1632+ BlockDataIF = NULL;
16331633
16341634 #ifdef ENABLE_DEBUGLOG
16351635 //ログに出力
--- trunk/d3dgraphics-opengl.cpp (revision 326)
+++ trunk/d3dgraphics-opengl.cpp (revision 327)
@@ -72,7 +72,7 @@
7272 camera_ry = 0.0f;
7373 viewangle = 0.0f;
7474
75- blockdata = NULL;
75+ BlockDataIF = NULL;
7676 bs = 0;
7777 for(int i=0; i<TOTAL_BLOCKTEXTURE; i++){
7878 mapTextureID[i] = -1;
@@ -2036,12 +2036,12 @@
20362036 }
20372037
20382038 //! @brief マップデータを取り込む
2039-//! @param in_blockdata ブロックデータ
2039+//! @param in_BlockDataIF ブロックデータ
20402040 //! @param directory ブロックデータが存在するディレクトリ
2041-void D3DGraphics::LoadMapdata(BlockDataInterface* in_blockdata, const char *directory)
2041+void D3DGraphics::LoadMapdata(BlockDataInterface* in_BlockDataIF, const char *directory)
20422042 {
20432043 //ブロックデータが指定されていなければ、処理しない。
2044- if( in_blockdata == NULL ){ return; }
2044+ if( in_BlockDataIF == NULL ){ return; }
20452045 if( directory == NULL ){ return; }
20462046
20472047 char fname[MAX_PATH];
@@ -2048,15 +2048,15 @@
20482048 char fnamefull[MAX_PATH];
20492049
20502050 //クラスを設定
2051- blockdata = in_blockdata;
2051+ BlockDataIF = in_BlockDataIF;
20522052
20532053 //ブロック数を取得
2054- bs = blockdata->GetTotaldatas();
2054+ bs = BlockDataIF->GetTotaldatas();
20552055
20562056 //テクスチャ読み込み
20572057 for(int i=0; i<TOTAL_BLOCKTEXTURE; i++){
20582058 //テクスチャ名を取得
2059- blockdata->GetTexture(fname, i);
2059+ BlockDataIF->GetTexture(fname, i);
20602060
20612061 if( strcmp(fname, "") == 0 ){ //指定されていなければ、処理しない
20622062 mapTextureID[i] = -1;
@@ -2075,9 +2075,9 @@
20752075 void D3DGraphics::RenderMapdata(bool wireframe)
20762076 {
20772077 //ブロックデータが読み込まれていなければ、処理しない。
2078- if( blockdata == NULL ){ return; }
2078+ if( BlockDataIF == NULL ){ return; }
20792079
2080- struct blockdata data;
2080+ blockdata data;
20812081 int textureID;
20822082 int vID[4];
20832083 int uvID[4];
@@ -2090,7 +2090,7 @@
20902090
20912091 //ワイヤーフレーム表示
20922092 for(int i=0; i<bs; i++){
2093- blockdata->Getdata(&data, i);
2093+ BlockDataIF->Getdata(&data, i);
20942094 Renderline(data.x[0], data.y[0], data.z[0], data.x[1], data.y[1], data.z[1], linecolor);
20952095 Renderline(data.x[1], data.y[1], data.z[1], data.x[2], data.y[2], data.z[2], linecolor);
20962096 Renderline(data.x[2], data.y[2], data.z[2], data.x[3], data.y[3], data.z[3], linecolor);
@@ -2134,7 +2134,7 @@
21342134
21352135 for(int i=0; i<bs; i++){
21362136 //データ取得
2137- blockdata->Getdata(&data, i);
2137+ BlockDataIF->Getdata(&data, i);
21382138
21392139 for(int j=0; j<6; j++){
21402140 //テクスチャ認識番号を取得
@@ -2210,7 +2210,7 @@
22102210
22112211 bs = 0;
22122212
2213- blockdata = NULL;
2213+ BlockDataIF = NULL;
22142214 }
22152215
22162216 //! @brief モデルファイルを描画
--- trunk/d3dgraphics.h (revision 326)
+++ trunk/d3dgraphics.h (revision 327)
@@ -115,16 +115,16 @@
115115 #if (GRAPHIC_ENGINE == 0)||(GRAPHIC_ENGINE == 1)
116116
117117 //! 3Dポリゴン描画用構造体
118-struct VERTEXTXTA
118+typedef struct
119119 {
120120 D3DXVECTOR3 position; //!< The position
121121 DWORD color; //!< The color
122122 FLOAT tu; //!< The texture coordinates
123123 FLOAT tv; //!< The texture coordinates
124-};
124+} VERTEXTXTA;
125125
126126 //! 2Dポリゴン描画用構造体
127-struct TLVERTX
127+typedef struct
128128 {
129129 FLOAT x; //!< position
130130 FLOAT y; //!< position
@@ -133,12 +133,12 @@
133133 D3DCOLOR color; //!< color
134134 FLOAT tu; //!< texture coordinates
135135 FLOAT tv; //!< texture coordinates
136-};
136+} TLVERTX;
137137
138138 #elif GRAPHIC_ENGINE == 8
139139
140140 //! モデルデータの頂点格納構造体
141-struct MODELVDATA
141+typedef struct
142142 {
143143 float x; //!< position
144144 float y; //!< position
@@ -145,10 +145,10 @@
145145 float z; //!< position
146146 float u; //!< texture coordinates
147147 float v; //!< texture coordinates
148-};
148+} MODELVDATA;
149149
150150 //! モデルデータ構造体
151-struct MODELDATA
151+typedef struct
152152 {
153153 bool useflag; //!< 有効化フラグ
154154 int polygons; //!< ポリゴン数
@@ -156,16 +156,16 @@
156156 float *ColorAry; //!< 色格納配列
157157 float *ColorGrayAry; //!< 色格納配列(暗い)
158158 float *TexCoordAry; //!< テクスチャ座標格納配列
159-};
159+} MODELDATA;
160160
161161 //! テクスチャ構造体
162-struct TEXTUREDATA
162+typedef struct
163163 {
164164 bool useflag; //!< 有効化フラグ
165165 int width; //!< 幅
166166 int height; //!< 高さ
167167 unsigned char *data; //!< 実データ
168-};
168+} TEXTUREDATA;
169169
170170 #endif //GRAPHIC_ENGINE
171171
@@ -202,7 +202,7 @@
202202 D3DXMATRIX VSViewProjMatrix; //!< 頂点シェーダーに与えた変換行列
203203 #endif
204204
205- class BlockDataInterface* blockdata; //!< 読み込んだブロックデータを格納するクラスへのポインタ
205+ class BlockDataInterface* BlockDataIF; //!< 読み込んだブロックデータを格納するクラスへのポインタ
206206 int bs; //!< ブロック数
207207 int mapTextureID[TOTAL_BLOCKTEXTURE]; //!< テクスチャ番号
208208 #ifdef BLOCKDATA_GPUMEMORY
@@ -258,7 +258,7 @@
258258 float camera_ry; //!< カメラ回転角度
259259 float viewangle; //!< カメラの視野角
260260
261- class BlockDataInterface* blockdata; //!< 読み込んだブロックデータを格納するクラスへのポインタ
261+ class BlockDataInterface* BlockDataIF; //!< 読み込んだブロックデータを格納するクラスへのポインタ
262262 int bs; //!< ブロック数
263263 int mapTextureID[TOTAL_BLOCKTEXTURE]; //!< テクスチャ番号
264264
@@ -325,7 +325,7 @@
325325 void GetWorldTransformPos(float *x, float *y, float *z);
326326 void SetFog(bool enablefog, int skynumber);
327327 void SetCamera(float camera_x, float camera_y, float camera_z, float camera_rx, float camera_ry, float viewangle);
328- void LoadMapdata(class BlockDataInterface* in_blockdata, const char *directory);
328+ void LoadMapdata(class BlockDataInterface* in_BlockDataIF, const char *directory);
329329 void RenderMapdata(bool wireframe);
330330 int GetMapTextureID(int id);
331331 void CleanupMapdata();
--- trunk/datafile.h (revision 326)
+++ trunk/datafile.h (revision 327)
@@ -57,7 +57,7 @@
5757 #include <ctype.h>
5858
5959 //! ブロックデータ用構造体 (blockdata構造体で使用)
60-struct b_material
60+typedef struct
6161 {
6262 int textureID; //!< textureID
6363 float u[4]; //!< textureUV-U
@@ -69,9 +69,9 @@
6969 float vy; //!< normal vector
7070 float vz; //!< normal vector
7171 float shadow; //!< shadow
72-};
72+} b_material;
7373 //! ブロックデータ用構造体
74-struct blockdata
74+typedef struct
7575 {
7676 int id; //!< DataID
7777 float x[8]; //!< Position
@@ -78,10 +78,10 @@
7878 float y[8]; //!< Position
7979 float z[8]; //!< Position
8080 b_material material[6]; //!< Material data
81-};
81+} blockdata;
8282
8383 //! ポイントデータ用構造体
84-struct pointdata
84+typedef struct
8585 {
8686 int id; //!< DataID
8787 float x; //!< Position
@@ -92,10 +92,10 @@
9292 signed char p2; //!< Param
9393 signed char p3; //!< Param
9494 signed char p4; //!< Param
95-};
95+} pointdata;
9696
9797 //! 追加小物用の構造体
98-struct addsmallobject
98+typedef struct
9999 {
100100 char modelpath[_MAX_PATH]; //!< モデルデータパス
101101 char texturepath[_MAX_PATH]; //!< テクスチャパス
@@ -103,7 +103,7 @@
103103 int hp; //!< 耐久力
104104 char soundpath[_MAX_PATH]; //!< サウンドデータパス
105105 int jump; //!< 飛び具合
106-};
106+} addsmallobject;
107107
108108 //! @brief データを管理するクラス(基底クラス)
109109 //! @details ゲームのデータを、ファイルから読み込み処理するクラス群の基底クラスです。
--- trunk/event.h (revision 326)
+++ trunk/event.h (revision 327)
@@ -41,13 +41,13 @@
4141 #include "main.h"
4242
4343 //! イベントパラメーター用の構造体
44-struct EventParameter
44+typedef struct
4545 {
4646 int endcnt; //!< 終了カウント
4747 bool complete; //!< ミッション成功フラグ
4848 int MessageID; //!< イベントメッセージ番号
4949 bool SetMessageID; //!< イベントメッセージフラグ
50-};
50+} EventParameter;
5151
5252 //! @brief イベントを処理するクラス
5353 //! @details ミッションのイベントポイントを処理します。
--- trunk/gamemain.h (revision 326)
+++ trunk/gamemain.h (revision 327)
@@ -101,7 +101,7 @@
101101 void CleanupGame();
102102
103103 //! ゲームの状態を受け渡しする構造体
104-struct GameInfo
104+typedef struct
105105 {
106106 int selectmission_id; //!< 選択されたミッション
107107 char mifpath[MAX_PATH]; //!< MIFファイルのパス
@@ -111,11 +111,11 @@
111111 float ontarget; //!< 命中数
112112 int kill; //!< 倒した敵の数
113113 int headshot; //!< 敵の頭部に命中した数
114-};
114+} GameInfo;
115115
116116 #ifdef ENABLE_MENUOPTIONS
117117 //! メニューリンクテキスト構造体
118-struct MenuLinkTextData
118+typedef struct
119119 {
120120 bool enable; //!< リンクテキストとしての有効化フラグ
121121 int pos_x; //!< X座標
@@ -125,16 +125,16 @@
125125 int text_defaultcolor; //!< 標準の文字色
126126 int text_cursorcolor; //!< 選択時の文字色
127127 char text[32]; //!< テキスト
128-};
128+} MenuLinkTextData;
129129 #endif //ENABLE_MENUOPTIONS
130130
131131 #ifdef ENABLE_DEBUGCONSOLE
132132 //! コンソールを管理する構造体
133-struct ConsoleData
133+typedef struct
134134 {
135135 int color; //!< 色
136136 char textdata[MAX_CONSOLELEN+1]; //!< 文字列
137-};
137+} ConsoleData;
138138 #endif
139139
140140 //! @brief オープニング画面管理クラス
--- trunk/object.cpp (revision 326)
+++ trunk/object.cpp (revision 327)
@@ -1567,7 +1567,7 @@
15671567 (CollD->CheckALLBlockInside(pos_x + dist_x*2.0f, pos_y + HUMAN_MAPCOLLISION_CLIMBHEIGHT, pos_z + dist_z*2.0f) == false)
15681568 ){
15691569 int id, face;
1570- struct blockdata bdata;
1570+ blockdata bdata;
15711571 bool flag = false;
15721572
15731573 //足元の面の角度を取得
@@ -1685,7 +1685,7 @@
16851685 //地面に接地している場合の処理
16861686 if( FallFlag == true ){
16871687 int id, face;
1688- struct blockdata bdata;
1688+ blockdata bdata;
16891689 bool flag = true;
16901690
16911691 if( move_y < HUMAN_MAPCOLLISION_GROUND_HEIGHT ){ move_y_landing = true; }
@@ -1819,7 +1819,7 @@
18191819 else{ face_angle_per = 0.0f; }
18201820
18211821 //ブロック面の法線ベクトル取得
1822- struct blockdata bdata;
1822+ blockdata bdata;
18231823 inblockdata->Getdata(&bdata, id);
18241824 face_vx = bdata.material[face].vx;
18251825 face_vy = bdata.material[face].vy;
--- trunk/objectmanager.cpp (revision 326)
+++ trunk/objectmanager.cpp (revision 327)
@@ -2703,7 +2703,7 @@
27032703
27042704 //足元にあるブロックのテクスチャー番号を取得する
27052705 if( block_id != -1 ){
2706- struct blockdata bdata;
2706+ blockdata bdata;
27072707 BlockData->Getdata(&bdata, block_id);
27082708 block_textureid = bdata.material[block_face].textureID;
27092709 }
--- trunk/objectmanager.h (revision 326)
+++ trunk/objectmanager.h (revision 327)
@@ -69,11 +69,11 @@
6969 #include "main.h"
7070
7171 //! エフェクト描画計算用構造体
72-struct effectdata
72+typedef struct
7373 {
7474 int id; //!< データ番号
7575 float dist; //!< 距離
76-};
76+} effectdata;
7777
7878 //! @brief オブジェクト管理クラス
7979 //! @details 各オブジェクトの初期化・計算・描画などを行い管理します。
--- trunk/parameter.h (revision 326)
+++ trunk/parameter.h (revision 327)
@@ -57,7 +57,7 @@
5757 #include "main.h"
5858
5959 //! 人設定用の構造体
60-struct HumanParameter
60+typedef struct
6161 {
6262 int texture; //!< テクスチャ番号
6363 int model; //!< モデル番号
@@ -65,10 +65,10 @@
6565 int AIlevel; //!< AIレベル
6666 int Weapon[TOTAL_HAVEWEAPON]; //!< 武器
6767 int type; //!< 種類
68-};
68+} HumanParameter;
6969
7070 //! 武器設定用の構造体
71-struct WeaponParameter
71+typedef struct
7272 {
7373 const char *name; //!< 武器名
7474 const char *model; //!< モデルファイル名
@@ -103,10 +103,10 @@
103103 int ChangeWeaponID; //!< 切り替える武器対象
104104 int ChangeWeaponCnt; //!< 武器切り替え時間
105105 int pellet; //!< 発射弾数(ペレット数)
106-};
106+} WeaponParameter;
107107
108108 //! 小物設定用の構造体
109-struct SmallObjectParameter
109+typedef struct
110110 {
111111 const char *model; //!< モデル名
112112 const char *texture; //!< テクスチャ名
@@ -114,18 +114,18 @@
114114 int hp; //!< 耐久力
115115 int sound; //!< 命中時の効果音番号
116116 int jump; //!< 飛び具合
117-};
117+} SmallObjectParameter;
118118
119119 //! 銃弾オブジェクト用の構造体
120-struct BulletParameter
120+typedef struct
121121 {
122122 const char *model; //!< モデル名
123123 const char *texture; //!< テクスチャ名
124124 float size; //!< 描画倍率
125-};
125+} BulletParameter;
126126
127127 //! 標準ミッション設定用の構造体
128-struct OfficialMissionParameter
128+typedef struct
129129 {
130130 const char *name; //!< ミッション識別名
131131 const char *fullname; //!< ミッション正式名称
@@ -133,16 +133,16 @@
133133 const char *txt; //!< ファイル名(.pd1/.txt)
134134 bool collision; //!< 追加の当たり判定を示すフラグ
135135 bool screen; //!< 画面を暗くするフラグ
136-};
136+} OfficialMissionParameter;
137137
138138 //! AIレベルによる設定(性能値)用構造体
139-struct AIParameter
139+typedef struct
140140 {
141141 int aiming; //!< エイミング能力
142142 int attack; //!< 攻撃性
143143 int search; //!< 発見能力
144144 int limitserror; //!< 許容誤差
145-};
145+} AIParameter;
146146
147147 //! @brief 設定された値を管理するクラス
148148 //! @details 予め固定された設定値を管理します。
--- trunk/soundmanager.h (revision 326)
+++ trunk/soundmanager.h (revision 327)
@@ -70,7 +70,7 @@
7070 };
7171
7272 //! サウンドリスト用構造体
73-struct soundlist
73+typedef struct
7474 {
7575 int paramid; //!< 音源の種類番号・SoundmgrID定数
7676 int dataid; //!< データ番号
@@ -82,7 +82,7 @@
8282 float move_z; //!< 1フレーム後の Z座標移動量
8383 int teamid; //!< チーム番号
8484 int cnt; //!< カウント値
85-};
85+} soundlist;
8686
8787 //! @brief サウンド管理クラス
8888 //! @details 各サウンドの初期化・計算・再生などを行い管理します。