/*****************************************************************
 	  	     さまざまな定義
 *****************************************************************/
#ifndef _MO_DECLARE_HEAD
#define _MO_DECLARE_HEAD



#if 0 
#define  color_speed   1.05f   /*  ペンの色の変化（点滅）の速さ  */
#define  fcolor_limit  200.0f  /*  変化（点滅）する色の上限  */
#endif


/*****************************************************************************************/
/*****************************************************************************************/
/*****************************************************************************************/


/***************  フラグの定義  ***************/

#define  FLAG_DEFAULT_LIST      /*  ファイルリストの先頭にデフォルトマシンを入れるとき  */
#define  FLAG_DIGITAL_MENU_X    /*  メニューのｘ方向のカーソルの動きをデジタルにするとき  */

/*  正射影のときの環境マッピング用のライト
    0 ‥‥ 正射影のときの環境マッピングを行わない
    1 ‥‥ 単振動で動かすとき 
    2 ‥‥ Ａボタンを押したときのみ動かすとき
    3 ‥‥ カメラと同じ位置に固定するとき
    4 ‥‥ 実験用  */
#define  FLAG_ENV_ORTHO     2

/***************  フラグの定義  終わり  ***************/



/***************  デジタルカーソル  ***************/

#define  digital_cursor_color_r   255   /*  デジタルカーソルの色（ｒ） */
#define  digital_cursor_color_g    64   /*  デジタルカーソルの色（ｇ） */
#define  digital_cursor_color_b    64   /*  デジタルカーソルの色（ｂ） */

#ifdef FLAG_DIGITAL_MENU_X
#define  cursor_menu_x_loop1    18   /*  ２回目にカーソルが動くフレームの間隔  */
#define  cursor_menu_x_loop2     8   /*  ３回目以降にカーソルが動くフレームの間隔  */
#define  cursor_menu_x_level    40   /*  ３Ｄスティックがこれ以下のときは動かない  */
#endif

#define  cursor_palette_loop1    15   /*  ２回目にカーソルが動くフレームの間隔  */
#define  cursor_palette_loop2     5   /*  ３回目以降にカーソルが動くフレームの間隔  */
#define  cursor_palette_level    40   /*  ３Ｄスティックがこれ以下のときは動かない  */

#define  cursor_parts_loop1      15   /*  ２回目にカーソルが動くフレームの間隔  */
#define  cursor_parts_loop2       5   /*  ３回目以降にカーソルが動くフレームの間隔  */
#define  cursor_parts_level      40   /*  ３Ｄスティックがこれ以下のときは動かない  */

#define  cursor_setting_loop1    15   /*  ２回目にカーソルが動くフレームの間隔  */
#define  cursor_setting_loop2     5   /*  ３回目以降にカーソルが動くフレームの間隔  */
#define  cursor_setting_level    40   /*  ３Ｄスティックがこれ以下のときは動かない  */

#define  cursor_mname_loop1      15   /*  ２回目にカーソルが動くフレームの間隔  */
#define  cursor_mname_loop2       5   /*  ３回目以降にカーソルが動くフレームの間隔  */
#define  cursor_mname_level      40   /*  ３Ｄスティックがこれ以下のときは動かない  */

/***************  デジタルカーソル  終わり  ***************/



/***************  環境マッピング  ***************/

#define  mo_envmap_scale  1250    /*  環境マッピング用テクスチャのスケール  */
#define  mo_envmap_a      80      /*  環境マッピング用テクスチャのアルファ  */

#if (FLAG_ENV_ORTHO==1)  /**  環境マッピング用のライトを単振動で動かすとき  **/
#define  mo_env_r   20000   /*  環境マッピング用のライトを単振動で動かすときの振幅  */
#define  mo_env_T   720     /*  環境マッピング用のライトを単振動で動かすときの周期（単位はフレーム数） */
#elif (FLAG_ENV_ORTHO==2)  /**  環境マッピング用のライトをＡボタンを押したときのみ動かすとき  **/
#define  env_light_x_min   -7000    /*  環境マッピング用のライトのｘ座標の最小値  */
#define  env_light_x_max   20000    /*  環境マッピング用のライトのｘ座標の最大値  */
#define  env_light_speed     300    /*  環境マッピング用のライトの移動速度  */
#endif

#define  ENV_BRIGHT  0.8f   /*  環境マッピングを行うと暗くなるが、その明るさの倍率（ウイングＦのテクスチャ用） */ 

/***************  環境マッピング  終わり  ***************/



/***************  ワークスマシン  ***************/

#define  stick_limit_1    8      /*  ３Ｄスティックのｘ,ｙ座標がこれ以下のときは動かない（その１） */
#define  stick_weight_1   15.0f  /*  ３Ｄスティックの重さ（その１: 通常） */
#define  stick_weight_4   20.0f  /*  ３Ｄスティックの重さ（その４: メニュー） */

#define  first_cursol_fx    48.0f   /*  カーソルの初期位置ｘ  */
#define  first_cursol_fy    28.0f   /*  カーソルの初期位置ｙ  */

#define  cursol_left_limit     24   /*  カーソルの左の限界のスクリーン座標  */
#define  cursol_right_limit   295   /*  カーソルの右の限界のスクリーン座標  */
#define  cursol_up_limit       20   /*  カーソルの上の限界のスクリーン座標  */
#define  cursol_down_limit    228   /*  カーソルの下の限界のスクリーン座標  */

#define  mo_camera_z  1320.0f       /*  カメラの位置のｚ座標  */

#define  mo_back_color_r1       0           /*  バックの上部の色(ｒ) */
#define  mo_back_color_g1       0           /*  バックの上部の色(ｇ) */
#define  mo_back_color_b1       0           /*  バックの上部の色(ｂ) */
#define  mo_back_color_r2      10           /*  バックの下部の色(ｒ) */
#define  mo_back_color_g2       0           /*  バックの下部の色(ｇ) */
#define  mo_back_color_b2      60           /*  バックの下部の色(ｂ) */
#define  mo_body_perse_back_color_r   24    /*  Ｂｏｄｙパース図のバックの色（ｒ） */
#define  mo_body_perse_back_color_g   24    /*  Ｂｏｄｙパース図のバックの色（ｇ） */
#define  mo_body_perse_back_color_b   24    /*  Ｂｏｄｙパース図のバックの色（ｂ） */

#define  mo_cross_limit       50     /*  cross_up, cross_down, cross_left, cross_right の上限  */
#define  mo_car_rotate_speed  0.1f   /*  Ｂｏｄｙパース図の車の回転の速さ  */

#define  mo_car_scale_speed  0.002f  /*  Ｂｏｄｙパース図の車の倍率の変化の速さ  */
#define  mo_max_car_scale    6.0f    /*  Ｂｏｄｙパース図の車の倍率の最大値  */
#define  mo_min_car_scale    0.2f    /*  Ｂｏｄｙパース図の車の倍率の最小値  */

#define  mo_car_trans_speed  2.0f    /*  Ｂｏｄｙパース図の車の移動の速さ  */
#define  mo_car_trans_limit  40.0f/*64.0f*/   /*  Ｂｏｄｙパース図の車の移動できる距離の限界  */
#define  mo_car_trans_value  35.0f/*20.0f*/   /*  Ｂｏｄｙパース図の車の scale が変化すると、どれだけ trans が変化するか  */

#define  mo_near_clip   10.0f     /*  Ｂｏｄｙパース図の車のニア・クリップ面  */
#define  mo_far_clip    20000.0f  /*  Ｂｏｄｙパース図の車のファー・クリップ面  */


/*  ワークスマシンのビューポートをｙ方向（下）にどれだけずらすか
    （斜め上から見ているので、少しずらすとちょうどよくなる） */
#define  wm_vp_dy   2  

#define  wm_body_pers_standard_x   25  /*  ワークスマシンのＢｏｄｙパース図の枠の内部の左上のスクリーン座標ｘ  */
#define  wm_body_pers_standard_y   90  /*  ワークスマシンのＢｏｄｙパース図の枠の内部の左上のスクリーン座標ｙ  */
#define  wm_body_pers_x_size      128  /*  ワークスマシンのＢｏｄｙパース図の枠の内部のｘ方向の大きさ  */
#define  wm_body_pers_y_size      128  /*  ワークスマシンのＢｏｄｙパース図の枠の内部のｙ方向の大きさ  */

#define  wm_dname_x   252    /*  ドライバー名の右下のスクリーン座標ｘ  */
#define  wm_dname_y   219    /*  ドライバー名の右下のスクリーン座標ｙ  */

#define  wm_face_standard_x   256   /*  ドライバーの顔の枠の内部の左上のスクリーン座標ｘ  */
#define  wm_face_standard_y   186   /*  ドライバーの顔の枠の内部の左上のスクリーン座標ｙ  */
#define  wm_face_x_size        32   /*  ドライバーの顔の枠の内部のｘ方向の大きさ  */
#define  wm_face_y_size        32   /*  ドライバーの顔の枠の内部のｙ方向の大きさ  */

#define  wm_mname_standard_x  170   /*  テクスチャ「マシン名」の左上のスクリーン座標ｘ  */
#define  wm_mname_standard_y   79   /*  テクスチャ「マシン名」の左上のスクリーン座標ｙ  */
#define  wm_mname_x_size       48   /*  テクスチャ「マシン名」のｘ方向の大きさ  */
#define  wm_mname_y_size       16   /*  テクスチャ「マシン名」のｙ方向の大きさ  */

#define  wm_mnameframe_standard_x   190  /*  名前の枠（72×16）の左上のスクリーン座標ｘ  */
#define  wm_mnameframe_standard_y    97  /*  名前の枠（72×16）の左上のスクリーン座標ｙ  */
#define  wm_mnameframe2_standard_x  178  /*  名前の枠（120×16）の左上のスクリーン座標ｘ  */
#define  wm_mnameframe2_standard_y   97  /*  名前の枠（120×16）の左上のスクリーン座標ｙ  */

#define  wm_setting_standard_x  170  /*  テクスチャ「セッティング」の左上のスクリーン座標ｘ  */
#define  wm_setting_standard_y  117  /*  テクスチャ「セッティング」の左上のスクリーン座標ｙ  */
#define  wm_setting_x_size       48  /*  テクスチャ「セッティング」のｘ方向の大きさ  */
#define  wm_setting_y_size       16  /*  テクスチャ「セッティング」のｙ方向の大きさ  */

#define  wm_setting_body_ulx           wm_mnameframe_standard_x   /*  テクスチャ（セッティングのボディ）の左上のスクリーン座標ｘ  */
#define  wm_setting_body_uly           133                        /*  テクスチャ（セッティングのボディ）の左上のスクリーン座標ｙ  */
#define  wm_setting_body_type_ulx      230                        /*  テクスチャ（セッティングのボディの能力）の左上のスクリーン座標ｘ  */
#define  wm_setting_body_type_uly      wm_setting_body_uly        /*  テクスチャ（セッティングのボディの能力）の左上のスクリーン座標ｙ  */
#define  wm_setting_boost_ulx          wm_setting_body_ulx        /*  テクスチャ（セッティングのブースト）の左上のスクリーン座標ｘ  */
#define  wm_setting_boost_uly          150                        /*  テクスチャ（セッティングのブースト）の左上のスクリーン座標ｙ  */
#define  wm_setting_boost_type_ulx     wm_setting_body_type_ulx   /*  テクスチャ（セッティングのブーストの能力）の左上のスクリーン座標ｘ  */
#define  wm_setting_boost_type_uly     wm_setting_boost_uly       /*  テクスチャ（セッティングのブーストの能力）の左上のスクリーン座標ｙ  */
#define  wm_setting_grip_ulx           wm_setting_body_ulx        /*  テクスチャ（セッティングのグリップ）の左上のスクリーン座標ｘ  */
#define  wm_setting_grip_uly           167                        /*  テクスチャ（セッティングのグリップ）の左上のスクリーン座標ｙ  */
#define  wm_setting_grip_type_ulx      wm_setting_body_type_ulx   /*  テクスチャ（セッティングのグリップの能力）の左上のスクリーン座標ｘ  */
#define  wm_setting_grip_type_uly      wm_setting_grip_uly        /*  テクスチャ（セッティングのグリップの能力）の左上のスクリーン座標ｙ  */

#define  wm_entry_weight_ulx      170   /*  マシンをエントリーしているときテクスチャ「ウエイト」の左上のスクリーン座標ｘ  */
#define  wm_entry_weight_uly      190   /*  マシンをエントリーしているときテクスチャ「ウエイト」の左上のスクリーン座標ｙ  */
#define  wm_no_entry_weight_ulx   200   /*  マシンをエントリーしていないときテクスチャ「ウエイト」の左上のスクリーン座標ｘ  */
#define  wm_no_entry_weight_uly   195   /*  マシンをエントリーしていないときテクスチャ「ウエイト」の左上のスクリーン座標ｙ  */

#define  wm_exit_standard_x  265  /*  テクスチャ「EXIT」の左上のスクリーン座標ｘ  */
#define  wm_exit_standard_y   20  /*  テクスチャ「EXIT」の左上のスクリーン座標ｙ  */
#define  wm_exit_x_size       32  /*  テクスチャ「EXIT」のｘ方向の大きさ  */
#define  wm_exit_y_size       16  /*  テクスチャ「EXIT」のｙ方向の大きさ  */

#define  weight_dx   1     /* 「ウエイト ◯◯ ｋｇ」のウエイトと数字の間隔  */
#define  kg_dx       1     /* 「ウエイト ◯◯ ｋｇ」の数字とｋｇの間隔  */

/***************  ワークスマシン  終わり  ***************/



/***************  パーツ  ***************/

#define  TOTAL_PARTS  7   /*  ボディ, エンジン, ウイングの各パーツがそれぞれ何種類あるか  */

#define  weight_body_G     270    /*  ボディＧのウエイト（ｋｇ） */
#define  weight_body_F     290    /*  ボディＦのウエイト（ｋｇ） */
#define  weight_body_E     320    /*  ボディＥのウエイト（ｋｇ） */
#define  weight_body_D     350    /*  ボディＤのウエイト（ｋｇ） */
#define  weight_body_C     420    /*  ボディＣのウエイト（ｋｇ） */
#define  weight_body_B     580    /*  ボディＢのウエイト（ｋｇ） */
#define  weight_body_A     630    /*  ボディＡのウエイト（ｋｇ） */
#define  weight_engine_G   510    /*  エンジンＧのウエイト（ｋｇ） */
#define  weight_engine_F   560    /*  エンジンＦのウエイト（ｋｇ） */
#define  weight_engine_E   630    /*  エンジンＥのウエイト（ｋｇ） */
#define  weight_engine_D   720    /*  エンジンＤのウエイト（ｋｇ） */
#define  weight_engine_C   890    /*  エンジンＣのウエイト（ｋｇ） */
#define  weight_engine_B   930    /*  エンジンＢのウエイト（ｋｇ） */
#define  weight_engine_A  1170    /*  エンジンＡのウエイト（ｋｇ） */
#define  weight_wing_G       0    /*  ウイングＧのウエイト（ｋｇ） */
#define  weight_wing_F     100    /*  ウイングＦのウエイト（ｋｇ） */
#define  weight_wing_E     120    /*  ウイングＥのウエイト（ｋｇ） */
#define  weight_wing_D     140    /*  ウイングＤのウエイト（ｋｇ） */
#define  weight_wing_C     190    /*  ウイングＣのウエイト（ｋｇ） */
#define  weight_wing_B     250    /*  ウイングＢのウエイト（ｋｇ） */
#define  weight_wing_A     420    /*  ウイングＡのウエイト（ｋｇ） */


#define  parts_frame_not_select_color_r  100   /*  選択されていないパーツの枠の色（ｒ） */
#define  parts_frame_not_select_color_g  100   /*  選択されていないパーツの枠の色（ｇ） */
#define  parts_frame_not_select_color_b  100   /*  選択されていないパーツの枠の色（ｂ） */


#define  parts_machine_center_x    75    /*  左下に出るマシンの全体像の中心のスクリーン座標ｘ  */
#define  parts_machine_center_y   191    /*  左下に出るマシンの全体像の中心のスクリーン座標ｙ  */
#define  parts_machine_scale      0.6f   /*  左下に出るマシンの全体像のスケール  */

#define  parts_basic_center_x     43    /*  １番左上のパーツの中心のスクリーン座標ｘ（枠の中心ではなくパーツの中心） */
#define  parts_basic_center_y     47    /*  １番左上のパーツの中心のスクリーン座標ｙ（枠の中心ではなくパーツの中心） */
#define  parts_basic_ulx          24    /*  １番左上のパーツの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_basic_uly          41    /*  １番左上のパーツの枠の内部の左上のスクリーン座標ｙ  */

#define  parts_frame_x_size   38     /*  枠の内部のｘ方向の大きさ  */
#define  parts_frame_y_size   36     /*  枠の内部のｙ方向の大きさ  */

#define  parts_frame_dx       -1     /*  枠と枠の間のｘ方向の大きさ  */
#define  parts_frame_dy       -1     /*  枠と枠の間のｙ方向の大きさ  */
/* （-1 のとき線が１ドット,  0 のとき線が２ドット,  1 のとき線と線の間に１ドットの隙間, 2 のとき線と線の間に２ドットの隙間, ‥‥‥） */

#define  parts_body_G_ulx   parts_basic_ulx                                /*  ボディＧの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_body_G_uly   parts_basic_uly                                /*  ボディＧの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_body_G_lrx  (parts_body_G_ulx + parts_frame_x_size - 1)     /*  ボディＧの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_body_G_lry  (parts_body_G_uly + parts_frame_y_size - 1)     /*  ボディＧの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_body_F_ulx  (parts_body_G_lrx + parts_frame_dx + 3)         /*  ボディＦの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_body_F_uly   parts_basic_uly                                /*  ボディＦの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_body_F_lrx  (parts_body_F_ulx + parts_frame_x_size - 1)     /*  ボディＦの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_body_F_lry  (parts_body_F_uly + parts_frame_y_size - 1)     /*  ボディＦの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_body_E_ulx  (parts_body_F_lrx + parts_frame_dx + 3)         /*  ボディＥの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_body_E_uly   parts_basic_uly                                /*  ボディＥの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_body_E_lrx  (parts_body_E_ulx + parts_frame_x_size - 1)     /*  ボディＥの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_body_E_lry  (parts_body_E_uly + parts_frame_y_size - 1)     /*  ボディＥの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_body_D_ulx  (parts_body_E_lrx + parts_frame_dx + 3)         /*  ボディＤの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_body_D_uly   parts_basic_uly                                /*  ボディＤの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_body_D_lrx  (parts_body_D_ulx + parts_frame_x_size - 1)     /*  ボディＤの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_body_D_lry  (parts_body_D_uly + parts_frame_y_size - 1)     /*  ボディＤの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_body_C_ulx  (parts_body_D_lrx + parts_frame_dx + 3)         /*  ボディＣの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_body_C_uly   parts_basic_uly                                /*  ボディＣの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_body_C_lrx  (parts_body_C_ulx + parts_frame_x_size - 1)     /*  ボディＣの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_body_C_lry  (parts_body_C_uly + parts_frame_y_size - 1)     /*  ボディＣの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_body_B_ulx  (parts_body_C_lrx + parts_frame_dx + 3)         /*  ボディＢの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_body_B_uly   parts_basic_uly                                /*  ボディＢの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_body_B_lrx  (parts_body_B_ulx + parts_frame_x_size - 1)     /*  ボディＢの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_body_B_lry  (parts_body_B_uly + parts_frame_y_size - 1)     /*  ボディＢの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_body_A_ulx  (parts_body_B_lrx + parts_frame_dx + 3)         /*  ボディＡの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_body_A_uly   parts_basic_uly                                /*  ボディＡの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_body_A_lrx  (parts_body_A_ulx + parts_frame_x_size - 1)     /*  ボディＡの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_body_A_lry  (parts_body_A_uly + parts_frame_y_size - 1)     /*  ボディＡの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_engine_G_ulx   parts_body_G_ulx                               /*  エンジンＧの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_engine_G_uly  (parts_body_G_lry + parts_frame_dy + 3)         /*  エンジンＧの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_engine_G_lrx  (parts_engine_G_ulx + parts_frame_x_size - 1)   /*  エンジンＧの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_engine_G_lry  (parts_engine_G_uly + parts_frame_y_size - 1)   /*  エンジンＧの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_engine_F_ulx   parts_body_F_ulx                               /*  エンジンＦの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_engine_F_uly   parts_engine_G_uly                             /*  エンジンＦの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_engine_F_lrx  (parts_engine_F_ulx + parts_frame_x_size - 1)   /*  エンジンＦの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_engine_F_lry  (parts_engine_F_uly + parts_frame_y_size - 1)   /*  エンジンＦの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_engine_E_ulx   parts_body_E_ulx                               /*  エンジンＥの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_engine_E_uly   parts_engine_G_uly                             /*  エンジンＥの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_engine_E_lrx  (parts_engine_E_ulx + parts_frame_x_size - 1)   /*  エンジンＥの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_engine_E_lry  (parts_engine_E_uly + parts_frame_y_size - 1)   /*  エンジンＥの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_engine_D_ulx   parts_body_D_ulx                               /*  エンジンＤの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_engine_D_uly   parts_engine_G_uly                             /*  エンジンＤの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_engine_D_lrx  (parts_engine_D_ulx + parts_frame_x_size - 1)   /*  エンジンＤの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_engine_D_lry  (parts_engine_D_uly + parts_frame_y_size - 1)   /*  エンジンＤの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_engine_C_ulx   parts_body_C_ulx                               /*  エンジンＣの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_engine_C_uly   parts_engine_G_uly                             /*  エンジンＣの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_engine_C_lrx  (parts_engine_C_ulx + parts_frame_x_size - 1)   /*  エンジンＣの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_engine_C_lry  (parts_engine_C_uly + parts_frame_y_size - 1)   /*  エンジンＣの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_engine_B_ulx   parts_body_B_ulx                               /*  エンジンＢの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_engine_B_uly   parts_engine_G_uly                             /*  エンジンＢの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_engine_B_lrx  (parts_engine_B_ulx + parts_frame_x_size - 1)   /*  エンジンＢの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_engine_B_lry  (parts_engine_B_uly + parts_frame_y_size - 1)   /*  エンジンＢの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_engine_A_ulx   parts_body_A_ulx                               /*  エンジンＡの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_engine_A_uly   parts_engine_G_uly                             /*  エンジンＡの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_engine_A_lrx  (parts_engine_A_ulx + parts_frame_x_size - 1)   /*  エンジンＡの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_engine_A_lry  (parts_engine_A_uly + parts_frame_y_size - 1)   /*  エンジンＡの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_wing_G_ulx   parts_body_G_ulx                               /*  ウイングＧの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_wing_G_uly  (parts_engine_G_lry + parts_frame_dy + 3)       /*  ウイングＧの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_wing_G_lrx  (parts_wing_G_ulx + parts_frame_x_size - 1)     /*  ウイングＧの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_wing_G_lry  (parts_wing_G_uly + parts_frame_y_size - 1)     /*  ウイングＧの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_wing_F_ulx   parts_body_F_ulx                               /*  ウイングＦの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_wing_F_uly   parts_wing_G_uly                               /*  ウイングＦの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_wing_F_lrx  (parts_wing_F_ulx + parts_frame_x_size - 1)     /*  ウイングＦの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_wing_F_lry  (parts_wing_F_uly + parts_frame_y_size - 1)     /*  ウイングＦの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_wing_E_ulx   parts_body_E_ulx                               /*  ウイングＥの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_wing_E_uly   parts_wing_G_uly                               /*  ウイングＥの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_wing_E_lrx  (parts_wing_E_ulx + parts_frame_x_size - 1)     /*  ウイングＥの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_wing_E_lry  (parts_wing_E_uly + parts_frame_y_size - 1)     /*  ウイングＥの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_wing_D_ulx   parts_body_D_ulx                               /*  ウイングＤの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_wing_D_uly   parts_wing_G_uly                               /*  ウイングＤの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_wing_D_lrx  (parts_wing_D_ulx + parts_frame_x_size - 1)     /*  ウイングＤの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_wing_D_lry  (parts_wing_D_uly + parts_frame_y_size - 1)     /*  ウイングＤの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_wing_C_ulx   parts_body_C_ulx                               /*  ウイングＣの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_wing_C_uly   parts_wing_G_uly                               /*  ウイングＣの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_wing_C_lrx  (parts_wing_C_ulx + parts_frame_x_size - 1)     /*  ウイングＣの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_wing_C_lry  (parts_wing_C_uly + parts_frame_y_size - 1)     /*  ウイングＣの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_wing_B_ulx   parts_body_B_ulx                               /*  ウイングＢの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_wing_B_uly   parts_wing_G_uly                               /*  ウイングＢの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_wing_B_lrx  (parts_wing_B_ulx + parts_frame_x_size - 1)     /*  ウイングＢの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_wing_B_lry  (parts_wing_B_uly + parts_frame_y_size - 1)     /*  ウイングＢの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_wing_A_ulx   parts_body_A_ulx                               /*  ウイングＡの枠の内部の左上のスクリーン座標ｘ  */
#define  parts_wing_A_uly   parts_wing_G_uly                               /*  ウイングＡの枠の内部の左上のスクリーン座標ｙ  */
#define  parts_wing_A_lrx  (parts_wing_A_ulx + parts_frame_x_size - 1)     /*  ウイングＡの枠の内部の右下のスクリーン座標ｘ  */
#define  parts_wing_A_lry  (parts_wing_A_uly + parts_frame_y_size - 1)     /*  ウイングＡの枠の内部の右下のスクリーン座標ｙ  */

#define  parts_FBODY_ulx   50                                       /*  テクスチャ「Ｆボディ」の左上のスクリーン座標ｘ  */
#define  parts_FBODY_uly  (parts_body_E_uly+parts_frame_y_size/2-8) /*  テクスチャ「Ｆボディ」の左上のスクリーン座標ｙ  */
#define  parts_RBODY_ulx   parts_FBODY_ulx                          /*  テクスチャ「Ｒボディ」の左上のスクリーン座標ｘ  */
#define  parts_RBODY_uly  (parts_FBODY_uly+parts_frame_y_size+1)    /*  テクスチャ「Ｒボディ」の左上のスクリーン座標ｙ  */
#define  parts_WING_ulx    parts_FBODY_ulx                          /*  テクスチャ「ウイング」の左上のスクリーン座標ｘ  */
#define  parts_WING_uly   (parts_RBODY_uly+parts_frame_y_size+1)    /*  テクスチャ「ウイング」の左上のスクリーン座標ｙ  */

#define  parts_weight_ulx   150    /*  パーツを選んだときのテクスチャ「ウエイト」の左上のスクリーン座標ｘ  */
#define  parts_weight_uly   155    /*  パーツを選んだときのテクスチャ「ウエイト」の左上のスクリーン座標ｙ  */

#define  parts_ok_udy       4   /*  ウイングＡの枠の内部の右下のスクリーン座標ｙとテクスチャ「ＯＫ」の間隔  */
#define  parts_ok_x_size   32   /*  テクスチャ「ＯＫ」のｘ方向の大きさ  */
#define  parts_ok_y_size   16   /*  テクスチャ「ＯＫ」のｙ方向の大きさ  */
#define  parts_ok_ulx     (parts_wing_A_lrx - parts_ok_x_size + 1)   /*  テクスチャ「ＯＫ」の左上のスクリーン座標ｘ  */
#define  parts_ok_uly     (parts_wing_A_lry + parts_ok_udy + 1)      /*  テクスチャ「ＯＫ」の左上のスクリーン座標ｙ  */
    
/***************  パーツ  終わり  ***************/



/***************  セッティングを選んだとき  ***************/

#define  setting_body_x_size    32     /*  テクスチャ「ボディ」のｘ方向の大きさ  */
#define  setting_body_y_size    16     /*  テクスチャ「ボディ」のｙ方向の大きさ  */
#define  setting_E_x_size       24     /*  テクスチャ「Ｅ」のｘ方向の大きさ  */
#define  setting_E_y_size       16     /*  テクスチャ「Ｅ」のｙ方向の大きさ  */
#define  setting_ok_x_size      32     /*  テクスチャ「ＯＫ」のｘ方向の大きさ  */
#define  setting_ok_y_size      16     /*  テクスチャ「ＯＫ」のｙ方向の大きさ  */

#define  setting_ulx           122     /*  黒い板の左上のスクリーン座標ｘ  */
#define  setting_uly            38     /*  黒い板の左上のスクリーン座標ｙ  */
#define  setting_up_space        3     /*  黒い板の上からテクスチャ「ボディ」までを何ドット開けるか  */
#define  setting_left_space      5     /*  黒い板の左からテクスチャ「ボディ」までを何ドット開けるか  */
#define  setting_dy              3     /*  テクスチャ「ボディ」からテクスチャ「ブースト」までを何ドット開けるか  */
#define  setting_dx              2     /*  テクスチャ「Ｅ」からテクスチャ「Ｄ」までを何ドット開けるか  */
#define  setting_dx2             4     /*  テクスチャ「ボディ」からテクスチャ「Ｅ」までを何ドット開けるか  */
#define  setting_dy2             3     /*  テクスチャ「グリップ」からテクスチャ「ＯＫ」までを何ドット開けるか  */


#define  setting_body_ulx     (setting_ulx + setting_left_space)       /*  ボディの左上のスクリーン座標ｘ  */
#define  setting_body_uly     (setting_uly + setting_up_space)         /*  ボディの左上のスクリーン座標ｙ  */
#define  setting_body_E_ulx   (setting_body_ulx + setting_body_x_size + setting_dx2)     /*  ボディの「Ｅ」の左上のスクリーン座標ｘ  */
#define  setting_body_E_uly    setting_body_uly        /*  ボディの「Ｅ」の左上のスクリーン座標ｙ  */
#define  setting_body_D_ulx   (setting_body_E_ulx +  setting_E_x_size + setting_dx)      /*  ボディの「Ｄ」の左上のスクリーン座標ｘ  */
#define  setting_body_D_uly    setting_body_uly        /*  ボディの「Ｄ」の左上のスクリーン座標ｙ  */
#define  setting_body_C_ulx   (setting_body_D_ulx +  setting_E_x_size + setting_dx)      /*  ボディの「Ｃ」の左上のスクリーン座標ｘ  */
#define  setting_body_C_uly    setting_body_uly        /*  ボディの「Ｃ」の左上のスクリーン座標ｙ  */
#define  setting_body_B_ulx   (setting_body_C_ulx +  setting_E_x_size + setting_dx)      /*  ボディの「Ｂ」の左上のスクリーン座標ｘ  */
#define  setting_body_B_uly    setting_body_uly        /*  ボディの「Ｂ」の左上のスクリーン座標ｙ  */
#define  setting_body_A_ulx   (setting_body_B_ulx +  setting_E_x_size + setting_dx)      /*  ボディの「Ａ」の左上のスクリーン座標ｘ  */
#define  setting_body_A_uly    setting_body_uly        /*  ボディの「Ａ」の左上のスクリーン座標ｙ  */

#define  setting_boost_ulx     setting_body_ulx        /*  ブーストの左上のスクリーン座標ｘ  */
#define  setting_boost_uly    (setting_body_uly + setting_body_y_size + setting_dy)      /*  ブーストの左上のスクリーン座標ｙ  */
#define  setting_boost_E_ulx   setting_body_E_ulx      /*  ブーストの「Ｅ」の左上のスクリーン座標ｘ  */
#define  setting_boost_E_uly   setting_boost_uly       /*  ブーストの「Ｅ」の左上のスクリーン座標ｙ  */
#define  setting_boost_D_ulx   setting_body_D_ulx      /*  ブーストの「Ｄ」の左上のスクリーン座標ｘ  */
#define  setting_boost_D_uly   setting_boost_uly       /*  ブーストの「Ｄ」の左上のスクリーン座標ｙ  */
#define  setting_boost_C_ulx   setting_body_C_ulx      /*  ブーストの「Ｃ」の左上のスクリーン座標ｘ  */
#define  setting_boost_C_uly   setting_boost_uly       /*  ブーストの「Ｃ」の左上のスクリーン座標ｙ  */
#define  setting_boost_B_ulx   setting_body_B_ulx      /*  ブーストの「Ｂ」の左上のスクリーン座標ｘ  */
#define  setting_boost_B_uly   setting_boost_uly       /*  ブーストの「Ｂ」の左上のスクリーン座標ｙ  */
#define  setting_boost_A_ulx   setting_body_A_ulx      /*  ブーストの「Ａ」の左上のスクリーン座標ｘ  */
#define  setting_boost_A_uly   setting_boost_uly       /*  ブーストの「Ａ」の左上のスクリーン座標ｙ  */

#define  setting_grip_ulx      setting_body_ulx        /*  グリップの左上のスクリーン座標ｘ  */
#define  setting_grip_uly     (setting_boost_uly + setting_body_y_size + setting_dy)     /*  グリップの左上のスクリーン座標ｙ  */
#define  setting_grip_E_ulx    setting_body_E_ulx      /*  グリップの「Ｅ」の左上のスクリーン座標ｘ  */
#define  setting_grip_E_uly    setting_grip_uly        /*  グリップの「Ｅ」の左上のスクリーン座標ｙ  */
#define  setting_grip_D_ulx    setting_body_D_ulx      /*  グリップの「Ｄ」の左上のスクリーン座標ｘ  */
#define  setting_grip_D_uly    setting_grip_uly        /*  グリップの「Ｄ」の左上のスクリーン座標ｙ  */
#define  setting_grip_C_ulx    setting_body_C_ulx      /*  グリップの「Ｃ」の左上のスクリーン座標ｘ  */
#define  setting_grip_C_uly    setting_grip_uly        /*  グリップの「Ｃ」の左上のスクリーン座標ｙ  */
#define  setting_grip_B_ulx    setting_body_B_ulx      /*  グリップの「Ｂ」の左上のスクリーン座標ｘ  */
#define  setting_grip_B_uly    setting_grip_uly        /*  グリップの「Ｂ」の左上のスクリーン座標ｙ  */
#define  setting_grip_A_ulx    setting_body_A_ulx      /*  グリップの「Ａ」の左上のスクリーン座標ｘ  */
#define  setting_grip_A_uly    setting_grip_uly        /*  グリップの「Ａ」の左上のスクリーン座標ｙ  */

#define  setting_ok_ulx   (setting_grip_A_ulx - 8)     /*  テクスチャ「ＯＫ」の左上のスクリーン座標ｘ  */
#define  setting_ok_uly   (setting_grip_A_uly + setting_E_y_size + setting_dy2)   /*  テクスチャ「ＯＫ」の左上のスクリーン座標ｙ  */

#define  setting_lrx   (setting_grip_A_ulx + setting_E_x_size + setting_left_space - 1 ) /*  黒い板の右下のスクリーン座標ｘ  */
#define  setting_lry   (setting_ok_uly + setting_ok_y_size + setting_up_space - 1 )      /*  黒い板の右下のスクリーン座標ｙ  */


#define  setting_left_limit    setting_ulx     /*  カーソルの左の限界のスクリーン座標  */
#define  setting_right_limit   setting_lrx     /*  カーソルの右の限界のスクリーン座標  */
#define  setting_up_limit      setting_uly     /*  カーソルの上の限界のスクリーン座標  */
#define  setting_down_limit    setting_lry     /*  カーソルの下の限界のスクリーン座標  */

/***************  セッティングを選んだとき  終わり  ***************/



/***************  カラーを選んだとき  ***************/

#define  palette_ulx    168     /*  パレットの左上のスクリーン座標ｘ  */
#define  palette_uly  /*52*/44  /*  パレットの左上のスクリーン座標ｙ  */

#define  palette_grid       1   /*  パレットの中のグリッドの太さ  */
#define  palette_grid_out   1   /*  パレットの端のグリッドの太さ  */
#define  palette_grid_ok    1   /*  パレットと「ＯＫ」の間隔  */
#define  one_palette_size  14   /*  １色のパレットの大きさ  */
#define  palette_x_size     8   /*  パレットがｘ方向にいくつあるか  */ 
#define  palette_y_size     8   /*  パレットがｙ方向にいくつあるか  */

#define  palette_first_ulx  (palette_ulx+palette_grid_out)   /*  １番左上の色の左上のスクリーン座標ｘ  */
#define  palette_first_uly  (palette_uly+palette_grid_out)   /*  １番左上の色の左上のスクリーン座標ｙ  */

#define  color_ok_x_size   32   /*  テクスチャ「ＯＫ」のｘ方向の大きさ  */
#define  color_ok_y_size   16   /*  テクスチャ「ＯＫ」のｙ方向の大きさ  */

/*  パレットの右下のスクリーン座標ｘ  */
#define  palette_lrx  (palette_first_ulx+palette_x_size*(palette_grid+one_palette_size)-palette_grid+palette_grid_out-1) 
/*  パレットの右下のスクリーン座標ｙ  */
#define  palette_lry  (palette_first_uly+palette_y_size*(palette_grid+one_palette_size)-palette_grid+palette_grid_out-1)

#define  color_ok_ulx  (palette_lrx-color_ok_x_size+1)   /*  テクスチャ「ＯＫ」の左上のスクリーン座標ｘ  */
#define  color_ok_uly  (palette_lry+1)                   /*  テクスチャ「ＯＫ」の左上のスクリーン座標ｙ  */

/***************  カラーを選んだとき  終わり  ***************/



/***************  エントリー画面  ***************/

#define  entry_ok_ulx   244     /*  テクスチャ「ＯＫ」の左上のスクリーン座標ｘ  */
#define  entry_ok_uly    18     /*  テクスチャ「ＯＫ」の左上のスクリーン座標ｙ  */

/***************  エントリー画面  終わり  ***************/



#endif
