- Timestamp:
- 02/20/08 04:07:32 (5 years ago)
- Location:
- lang/d/koke/trunk
- Files:
-
- 4 modified
-
character.d (modified) (1 diff)
-
config.ini (modified) (3 diffs)
-
gamecore.d (modified) (5 diffs)
-
map.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/d/koke/trunk/character.d
r6898 r6962 381 381 // 動画を食べる 382 382 direction = cast(DIRECTION)t; 383 life += configparser.getint("ARASHI_EAT_MOVIE_LIFE_GAIN"); 384 383 385 gamemain.map.set(px,py,MapChip.TYPE.NONE); 384 386 -
lang/d/koke/trunk/config.ini
r6898 r6962 11 11 # 12 12 13 # �R���t�B�O�̃��A���^�C�������[�h�@�\(2008/02/20���) 14 # �@�Q�[����������܂܃R���t�B�O��W�����A���̂܂܃Q�[����������� 15 # �@�ύX��p�ł����\�B�������A(�}�b�v�T�C�Y�Ȃǂ��ꕔ�p�����[�^�͔�� 13 16 14 17 … … 20 23 # �@�}�b�v�T�C�Y���傫���Ȃ����킹�� 21 24 # �@CPU���ׂ��傫���Ȃ邽�߁A�ɒ[�ɑ傫�Ȓl�ɂ͒��� 25 # �@�����A���^�C�������[�h��� 22 26 MAP_WIDTH = 48 23 27 24 28 # MAP_HEIGHT 25 29 # �}�b�v�c��(�W��:48) 26 # �@����MAP_HEIGHT = 48 30 # �@����# �@�����A���^�C�������[�h��� 31 MAP_HEIGHT = 48 27 32 28 33 … … 92 97 # -------------------------------------------------------------------- 93 98 # ���炵 94 # ARASHI_TRANSFORM_RATIO = 595 # �j�R�~�����炵�ɂȂ�����(�W��: 5)99 # ARASHI_TRANSFORM_RATIO 100 # �j�R�~�����炵�ɂȂ�����(�W��:3) 96 101 # �@�j�R�~�����B�������A���̊m���Ńj�R�~�̑������炵�����܂� 97 ARASHI_TRANSFORM_RATIO = 5 102 ARASHI_TRANSFORM_RATIO = 3 103 104 # ARASHI_EAT_MOVIE_LIFE_GAIN 105 ARASHI_EAT_MOVIE_LIFE_GAIN = 10 -
lang/d/koke/trunk/gamecore.d
r6941 r6962 64 64 int config_reload_timer; // 「コンフィグをリロードした」表示用 65 65 66 static const int CONFIG_RELOAD_CHECK_INTERVAL = 40 * 5; // コンフィグ再読み込み確認67 static const int CONFIG_RELOAD_SHOW_INTERVAL = 80; // 「コンフィグ読み込んだ」表示時間66 static const int CONFIG_RELOAD_CHECK_INTERVAL = 40 * 5; // コンフィグ再読み込み確認 67 static const int CONFIG_RELOAD_SHOW_INTERVAL = 40 * 3; // 「コンフィグ読み込んだ」表示時間 68 68 69 69 this() … … 73 73 configparser = new ConfigParser(); 74 74 configparser.load(CONFIG_PATH); 75 config_reload_timer = 0; 75 76 76 77 int mapw = configparser.getint("MAP_WIDTH"); … … 249 250 250 251 // configが古い場合はロードしなおす 251 if(timer % CONFIG_RELOAD_CHECK_INTERVAL == 0 && !configparser.isLatest()){ 252 static int config_reload = 0; 253 config_reload++; 254 if(config_reload > CONFIG_RELOAD_CHECK_INTERVAL && !configparser.isLatest()){ 252 255 configparser.update(); 256 config_reload = 0; 253 257 config_reload_timer = CONFIG_RELOAD_SHOW_INTERVAL; 254 258 }else if(config_reload_timer > 0){ … … 312 316 313 317 // config_reload 314 if(config_reload_timer > 0 && timer % 1 0 < 5){315 Hell_drawFont("CONFIG RELOADED" , getScreenWidth() / 2 - 80, getScreenHeight() / 2316 , 2, 255,128,0);318 if(config_reload_timer > 0 && timer % 11 < 10){ 319 Hell_drawFont("CONFIG RELOADED" , (getScreenWidth() - 8 * 15)/ 2 , getScreenHeight() / 2 320 , 1 , 255,128,0); 317 321 } 318 322 … … 394 398 // 作画 395 399 void draw(){ 396 static const int r[] = [ 0 , 0 , 0 , 0 , 0 , 255 , 128 ]; 397 static const int g[] = [ 0 , 255 , 255 , 0 , 0 , 0 , 128 ]; 398 static const int b[] = [ 0 , 0 , 255 , 0 , 0 , 0 , 128 ]; 400 // キャラクタごとのカラー(Character.TYPE参照) 401 static const int r[] = [ 0 , 0 , 0 , 0 , 0 , 255 , 128 , 0 ]; 402 static const int g[] = [ 0 , 255 , 255 , 0 , 0 , 0 , 128 , 0 ]; 403 static const int b[] = [ 0 , 0 , 255 , 0 , 0 , 0 , 128 , 0 ]; 399 404 400 405 if(!logs[length - 1]) return; -
lang/d/koke/trunk/map.d
r6347 r6962 44 44 static int GRASS_COLOR_B = 128; 45 45 46 47 46 double grass; 48 47 … … 50 49 51 50 this(){ 52 GRASS_COLOR_R = configparser.getint("MAP_GRASS_COLOR_R");53 GRASS_COLOR_G = configparser.getint("MAP_GRASS_COLOR_G");54 GRASS_COLOR_B = configparser.getint("MAP_GRASS_COLOR_B");55 56 51 init(); 57 52 } … … 151 146 this.height = height; 152 147 148 this.map = new MapChip[width * height]; 149 foreach(inout m;map) m = new MapChip(); 150 151 this.movable_map = new bool[width * height]; 152 foreach(inout mm;movable_map) mm = true; 153 154 this.draw_ofs_x = 0; 155 this.draw_ofs_y = 0; 156 157 timer = 0; 158 } 159 160 void update(){ 161 timer++; 162 163 // 各種ゲームパラメタ 153 164 MAP_GRASS_AFFECT = configparser.getfloat("MAP_GRASS_AFFECT"); 154 165 MAP_REFRESH_INTERVAL = configparser.getint("MAP_REFRESH_INTERVAL"); 155 166 MOVIE_GRASS_FEED = configparser.getfloat("MAP_MOVIE_GRASS_FEED"); 156 167 MAP_GRASS_AFFECT_LIMIT = configparser.getfloat("MAP_GRASS_AFFECT_LIMIT"); 157 158 this.map = new MapChip[width * height];159 foreach(inout m;map) m = new MapChip();160 161 this.movable_map = new bool[width * height];162 foreach(inout mm;movable_map) mm = true;163 164 this.draw_ofs_x = 0;165 this.draw_ofs_y = 0;166 167 timer = 0;168 }169 170 void update(){171 timer++;172 168 173 169 int[] vecx = [ -1 , 0 , 1 , 0 ]; … … 237 233 // 参照・キャラクタバケットソート 238 234 void draw(){ 235 // 芝色 236 MapChip.GRASS_COLOR_R = configparser.getint("MAP_GRASS_COLOR_R"); 237 MapChip.GRASS_COLOR_G = configparser.getint("MAP_GRASS_COLOR_G"); 238 MapChip.GRASS_COLOR_B = configparser.getint("MAP_GRASS_COLOR_B"); 239 239 240 // Map座標系で作画範囲をクリップ 240 241 int x_st = toRoundMapX(toMapX(0,0));
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)