/******************************************************** MAIN *********************************************************/ int main(void) { int map[XMAX][YMAX], bmap[XMAX][YMAX][2]; SPLAYER player; LPTCB task; floor_cnt = 1; init_genrand((unsigned long)time(NULL)); // 必ずmainに入れること init_task(); init_monster(); task = create_task(title_load, NULL, PRIO_00); task->p[0] = &player; task->p[1] = &floor_cnt; task = create_task(game_start, NULL, PRIO_00); task->p[0] = map; task->p[1] = &player; task->p[2] = bmap; loop_task(); // printf("taskcnt =%d\n", count_task()); return 0; }
void init_world(struct World *world, struct VEngine *veng) { int i, m; /* FIXME: why big maps appear broken? */ genmap(world->map, 40, 40); world->monstercount = 0; for (i = 0; i < 15; i ++) { m = world->monstercount ++; init_monster(world, m); v_init_monster(veng, m); } }
int relauch_proper(t_struct *st, int life) { aff_my_level(st); if (have_struct_map(st) == -1 || init_my_sdl(st) == -1) return (-1); init_heros(st); st->heros.life = life; init_monster(st); init_map_game(st); st->img = IMG_Load(TEXT_L); st->pos.x = st->width - 170; st->pos.y = 10; SDL_BlitSurface(st->img, NULL, st->ecran, &st->pos); SDL_Flip(st->ecran); free(st->img); return (map_not_end(st)); }
void charter_selete() {//인간,마법사,요정,카라스텐구,백랑텐구,캇파,반요,츠구모가미,흡혈귀,오니,사신, 달토끼, 천인, 용궁의사자, 유 령, 망령, 소령 for(int i = 0; i<MAXLEVEL; i++) env[i].floor = i; WaitForSingleObject(mutx, INFINITE); SetText() = "touhou crawl "; SetText() += version_string; SetText() += "\n동방프로젝트와 던전크롤의 동인게임\n\n"; if(load_name(user_name_file.c_str())) { SetText() += "당신의 이름은 \""; SetText() += you.user_name.name; SetText() += "\" 이다.\n"; } else { SetText() += "당신의 이름은 \""; SetText() += you.user_name.name; SetText() += "\" 이다.\n"; SetText() += "user_name.txt에서 당신의 이름을 바꿀 수 있어.\n"; } SetDisplayTexture(&img_title); ReleaseMutex(mutx); waitkeyinput(); WaitForSingleObject(mutx, INFINITE); SetText() += "시작한다!\n"; ReleaseMutex(mutx); Sleep(500); SetDisplayTexture(NULL); { ReplayClass.init_class(); ReplayClass.SaveReplayStart(); } init_state(); map_list.tutorial = GM_TITLE; start_mainmenu(); if(!saveexit) { init_identify(); init_monster(); initMap(); wiz_list.wizard_mode = 0; } if(map_list.tutorial == GM_TITLE) map_list.tutorial = GM_NORMAL; if(isNormalGame() && !saveexit) { char temp[200]; sprintf_s(temp,200,"%s, %s %s %s. 던전의 탐험을 시작했다.", you.user_name.name.c_str(),tribe_type_string[you.tribe],job_type_string[you.job],you.GetCharNameString()->c_str()); AddNote(you.turn,CurrentLevelString(),temp,CL_normal); SetTribe(you.tribe); TouhouPlayerble(you.char_name.name, true); SetJob(you.job,you.char_name.name); TouhouPlayerble(you.char_name.name, false); /*Test_char_init(item_, bonus);*/ you.CalcuHP(); Initialize(); } else if(map_list.tutorial == GM_TUTORIAL) { you.image = &img_play_sanae; you.char_name.name = "사나에"; you.tribe = TRI_HUMAN; you.job = JOB_SHAMAN; SetTribe(you.tribe); you.CalcuHP(); env[current_level].EnterMap(0,deque<monster*>()); printlog("카나코는 말했다 : 환영한다, 사나에! 이번 튜토리얼은 내가 담당하지.",true,false,false,CL_warning); printlog("카나코는 말했다 : 지나간 말은 컨트롤+P로 로그를 확인하고 궁금한건 ?를 눌러.",true,false,false,CL_warning); printlog("카나코는 말했다 : 일단 h j k l나 방향키로 움직일 수 있어. 대소문자에 조심해.",true,false,false,CL_warning); } else if(map_list.tutorial == GM_TUTORIAL2) { you.image = &img_play_sanae; you.char_name.name = "사나에"; you.tribe = TRI_HUMAN; you.job = JOB_SHAMAN; SetTribe(you.tribe); you.CalcuHP(); env[current_level].EnterMap(0,deque<monster*>()); printlog("안녕하세요. Dungeon Crawl Stone Soup (이하 돌죽) 팬게임 동방크롤입니다.",true,false,false,CL_warning); printlog("여기에선 돌죽 경험자분을 위한 튜토리얼입니다.",true,false,false,CL_warning); } else if(map_list.tutorial == GM_SPRINT1_AREANA) { you.image = &img_play_sanae; you.char_name.name = "사나에"; you.tribe = TRI_HUMAN; you.job = JOB_SHAMAN; SetTribe(you.tribe); you.CalcuHP(); env[current_level].EnterMap(0,deque<monster*>()); item_infor t; item *it; it = env[current_level].MakeItem(you.position,makeitem(ITM_RING,1,&t,RGT_SEE_INVISIBLE)); it->Identify(); you.additem(it,false); you.equip('a',ET_LEFT,false); env[current_level].DeleteItem(it); printlog("아레나에 온걸 환영한다! 승리할 것 같은 팀의 방향에 서있어라!",true,false,false,CL_help); printlog("만약 승자를 맞추게되면 레벨이 1 오른다. 틀리면 게임 오버! 기회는 3번...",true,false,false,CL_help); } changedisplay(DT_GAME); saveexit = true; }