• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GLOBAL_SIS函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GLOBAL_SIS函数的典型用法代码示例。如果您正苦于以下问题:C++ GLOBAL_SIS函数的具体用法?C++ GLOBAL_SIS怎么用?C++ GLOBAL_SIS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GLOBAL_SIS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GenerateSpathi_generateMoons

static bool
GenerateSpathi_generateMoons (SOLARSYS_STATE *solarSys, PLANET_DESC *planet)
{
	COUNT angle;

	GenerateDefault_generateMoons (solarSys, planet);

	if (matchWorld (solarSys, planet, 0, MATCH_PLANET))
	{
#ifdef NOTYET
		utf8StringCopy (GLOBAL_SIS (PlanetName),
				sizeof (GLOBAL_SIS (PlanetName)),
				"Spathiwa");
#endif /* NOTYET */

		solarSys->MoonDesc[0].data_index = PELLUCID_WORLD;
		solarSys->MoonDesc[0].alternate_colormap = NULL;
		solarSys->MoonDesc[0].radius = MIN_MOON_RADIUS + MOON_DELTA;
		angle = NORMALIZE_ANGLE (LOWORD (RandomContext_Random (SysGenRNG)));
		solarSys->MoonDesc[0].location.x =
				COSINE (angle, solarSys->MoonDesc[0].radius);
		solarSys->MoonDesc[0].location.y =
				SINE (angle, solarSys->MoonDesc[0].radius);
		ComputeSpeed(&solarSys->MoonDesc[0], TRUE, 1);
	}

	return true;
}
开发者ID:smaass,项目名称:UQM-MegaMod,代码行数:28,代码来源:genspa.c


示例2: RealizeMistake

static void
RealizeMistake (RESPONSE_REF R)
{
    (void) R;  // ignored
    NPCPhrase (DGRUNTI);
    SET_GAME_STATE (SHOFIXTI_STACK1, 0);
    SET_GAME_STATE (SHOFIXTI_STACK3, 0);
    SET_GAME_STATE (SHOFIXTI_STACK2, 3);

    {
        UNICODE buf[ALLIANCE_NAME_BUFSIZE];

        GetAllianceName (buf, name_1);
        construct_response (
            shared_phrase_buf,
            i_am_captain0,
            GLOBAL_SIS (CommanderName),
            i_am_captain1,
            buf,
            i_am_captain2,
            GLOBAL_SIS (ShipName),
            i_am_captain3,
            (UNICODE*)NULL);
    }
    DoResponsePhrase (i_am_captain0, ExplainDefeat, shared_phrase_buf);
    Response (i_am_nice, ExplainDefeat);
    Response (i_am_guy, ExplainDefeat);
}
开发者ID:0xDEC0DE,项目名称:uqm-0.6.4-ee,代码行数:28,代码来源:shofixt.c


示例3: Intro

static void
Intro (void)
{
	SET_GAME_STATE (STARBASE_AVAILABLE, 1);
	NPCPhrase (STARBASE_WILL_BE_READY);
	return;

	if (GET_GAME_STATE (PROBE_ILWRATH_ENCOUNTER))
	{
		NPCPhrase (VERY_IMPRESSIVE);

		Response (cook_their_butts, ByeBye);
		Response (overthrow_evil_aliens, ByeBye);
		Response (annihilate_those_monsters, ByeBye);
	}
	else if (GET_GAME_STATE (STARBASE_VISITED))
	{
		if (GET_GAME_STATE (RADIOACTIVES_PROVIDED))
		{
			if (GET_GAME_STATE (MOONBASE_DESTROYED) == 0)
			{
				TellMoonBase (0);
			}
			else
			{
				BaseDestroyed (0);
			}
		}
		else
		{
			CommData.AlienColorMap =
					SetAbsColorMapIndex (CommData.AlienColorMap, 1);
			NPCPhrase (DO_YOU_HAVE_RADIO_THIS_TIME);

			if (GLOBAL_SIS (ElementAmounts[RADIOACTIVE]))
				GiveRadios (0);
			else
				AskAfterRadios (0);
		}
	}
	else /* first visit */
	{
		CommData.AlienColorMap =
				SetAbsColorMapIndex (CommData.AlienColorMap, 1);

		SET_GAME_STATE (STARBASE_VISITED, 1);

		NPCPhrase (ARE_YOU_SUPPLY_SHIP);
		construct_response (
				shared_phrase_buf,
				no_but_well_help0,
				GLOBAL_SIS (ShipName),
				no_but_well_help1,
				(UNICODE*)NULL);
		DoResponsePhrase (no_but_well_help0, NoRadioactives, shared_phrase_buf);
		Response (yes_this_is_supply_ship, NoRadioactives);
		Response (what_slave_planet, NoRadioactives);
	}
}
开发者ID:jurchik,项目名称:project6014,代码行数:59,代码来源:comandr.c


示例4: SpathiPassword

static void
SpathiPassword (RESPONSE_REF R)
{
	if (R == 0)
	{
		BYTE NumVisits;

		NumVisits = GET_GAME_STATE (SPATHI_HOME_VISITS);
		switch (NumVisits++)
		{
			default:
				NPCPhrase (WHAT_IS_PASSWORD);
				NumVisits = 1;
				break;
			case 1:
				NPCPhrase (WHAT_IS_PASSWORD_AGAIN);
				--NumVisits;
				break;
		}
		SET_GAME_STATE (SPATHI_HOME_VISITS, NumVisits);
	}
	else if (PLAYER_SAID (R, what_do_i_get))
	{
		NPCPhrase (YOU_GET_TO_LIVE);

		DISABLE_PHRASE (what_do_i_get);
	}

	if (GET_GAME_STATE (FOUND_PLUTO_SPATHI)
			|| GET_GAME_STATE (KNOW_SPATHI_PASSWORD))
	{
		Response (good_password, SpathiCouncil);
		if (PHRASE_ENABLED (what_do_i_get))
		{
			Response (what_do_i_get, SpathiPassword);
		}
	}
	else
	{
		construct_response (shared_phrase_buf,
				we_are_vindicator0,
				GLOBAL_SIS (CommanderName),
				we_are_vindicator1,
				GLOBAL_SIS (ShipName),
				we_are_vindicator2,
				(UNICODE*)NULL);
		DoResponsePhrase (we_are_vindicator0, ExitConversation, shared_phrase_buf);
		Response (gort_merenga, ExitConversation);
		Response (guph_florp, ExitConversation);
		Response (wagngl_fthagn, ExitConversation);
		Response (pleeese, ExitConversation);
		Response (screw_password, ExitConversation);
	}
}
开发者ID:0xDEC0DE,项目名称:uqm-0.6.4-ee,代码行数:54,代码来源:spahome.c


示例5: DrawElementAmount

static void
DrawElementAmount (COUNT element, bool selected)
{
	RECT r;
	TEXT t;
	UNICODE buf[40];

	r.corner.x = ELEMENT_SEL_ORG_X;
	r.extent.width = ELEMENT_SEL_WIDTH;
	r.extent.height = ELEMENT_SPACING_Y - 2;

	if (element == NUM_ELEMENT_CATEGORIES)
		r.corner.y = BIO_ORG_Y;
	else
		r.corner.y = ELEMENT_ORG_Y + (element * ELEMENT_SPACING_Y);
	
	// draw line background
	SetContextForeGroundColor (selected ?
			CARGO_SELECTED_BACK_COLOR : CARGO_BACK_COLOR);
	DrawFilledRectangle (&r);

	t.align = ALIGN_RIGHT;
	t.pStr = buf;
	t.baseline.y = r.corner.y + TEXT_BASELINE;

	if (element == NUM_ELEMENT_CATEGORIES)
	{	// Bio
		snprintf (buf, sizeof buf, "%u", GLOBAL_SIS (TotalBioMass));
	}
	else
	{	// Element
		// print element's worth
		SetContextForeGroundColor (selected ?
				CARGO_SELECTED_WORTH_COLOR : CARGO_WORTH_COLOR);
		t.baseline.x = ELEMENT_COL_1;
		snprintf (buf, sizeof buf, "%u", GLOBAL (ElementWorth[element]));
		t.CharCount = (COUNT)~0;
		font_DrawText (&t);
		
		snprintf (buf, sizeof buf, "%u", GLOBAL_SIS (ElementAmounts[element]));
	}

	// print the element/bio amount
	SetContextForeGroundColor (selected ?
			CARGO_SELECTED_AMOUNT_COLOR : CARGO_AMOUNT_COLOR);
	t.baseline.x = ELEMENT_COL_2;
	t.CharCount = (COUNT)~0;
	font_DrawText (&t);
}
开发者ID:intgr,项目名称:sc2-uqm,代码行数:49,代码来源:cargo.c


示例6: dumpPlanet

void
dumpPlanet (FILE *out, const PLANET_DESC *planet)
{
	(*pSolarSysState->genFuncs->generateName) (pSolarSysState, planet);
	fprintf (out, "- %-37s  %s\n", GLOBAL_SIS (PlanetName),
			planetTypeString (planet->data_index & ~PLANET_SHIELDED));
	dumpWorld (out, planet);
}
开发者ID:intgr,项目名称:sc2-uqm,代码行数:8,代码来源:uqmdebug.c


示例7: AquaintZoqFot

static void
AquaintZoqFot (RESPONSE_REF R)
{
	if (PLAYER_SAID (R, which_fot))
	{
		NPCPhrase_cb (HE_IS0, &SelectAlienZOQ);
		NPCPhrase_cb (HE_IS1, &SelectAlienPIK);
		NPCPhrase_cb (HE_IS2, &SelectAlienZOQ);
		NPCPhrase_cb (HE_IS3, &SelectAlienPIK);
		NPCPhrase_cb (HE_IS4, &SelectAlienZOQ);
		NPCPhrase_cb (HE_IS5, &SelectAlienPIK);
		NPCPhrase_cb (HE_IS6, &SelectAlienZOQ);
		NPCPhrase_cb (HE_IS7, &SelectAlienPIK);
		ZFPTalkSegue ((COUNT)~0);

		DISABLE_PHRASE (which_fot);
	}
	else if (PLAYER_SAID (R, quiet_toadies))
	{
		NPCPhrase_cb (TOLD_YOU0, &SelectAlienZOQ);
		NPCPhrase_cb (TOLD_YOU1, &SelectAlienPIK);
		NPCPhrase_cb (TOLD_YOU2, &SelectAlienZOQ);
		NPCPhrase_cb (TOLD_YOU3, &SelectAlienPIK);
		NPCPhrase_cb (TOLD_YOU4, &SelectAlienZOQ);
		NPCPhrase_cb (TOLD_YOU5, &SelectAlienPIK);
		NPCPhrase_cb (TOLD_YOU6, &SelectAlienZOQ);
		NPCPhrase_cb (TOLD_YOU7, &SelectAlienPIK);
		ZFPTalkSegue ((COUNT)~0);

		DISABLE_PHRASE (quiet_toadies);
	}

	if (PHRASE_ENABLED (we_are_vindicator0))
	{
		UNICODE buf[ALLIANCE_NAME_BUFSIZE];

		GetAllianceName (buf, name_1);
		construct_response (
				shared_phrase_buf,
				we_are_vindicator0,
				buf,
				we_are_vindicator1,
				GLOBAL_SIS (ShipName),
				we_are_vindicator2,
				(UNICODE*)NULL);
	}

	if (PHRASE_ENABLED (which_fot))
		Response (which_fot, AquaintZoqFot);
	if (PHRASE_ENABLED (we_are_vindicator0))
		DoResponsePhrase (we_are_vindicator0, ZoqFotIntro, shared_phrase_buf);
	if (PHRASE_ENABLED (quiet_toadies))
		Response (quiet_toadies, AquaintZoqFot);
	Response (all_very_interesting, ExitConversation);
	Response (valuable_info, ExitConversation);
}
开发者ID:njvack,项目名称:uqm-ios,代码行数:56,代码来源:zoqfotc.c


示例8: doInstantMove

// Move the Flagship to the destination of the autopilot.
// Should only be called from HyperSpace/QuasiSpace.
// It can be called from debugHook directly after entering HS/QS though.
void
doInstantMove (void)
{
	// Move to the new location:
	if ((GLOBAL (autopilot)).x == ~0 || (GLOBAL (autopilot)).y == ~0)
	{
		// If no destination has been selected, use the current location
		// as the destination.
		(GLOBAL (autopilot)).x = LOGX_TO_UNIVERSE(GLOBAL_SIS (log_x));
		(GLOBAL (autopilot)).y = LOGY_TO_UNIVERSE(GLOBAL_SIS (log_y));
	}
	else
	{
		// A new destination has been selected.
		GLOBAL_SIS (log_x) = UNIVERSE_TO_LOGX((GLOBAL (autopilot)).x);
		GLOBAL_SIS (log_y) = UNIVERSE_TO_LOGY((GLOBAL (autopilot)).y);
	}

	// Check for a solar systems at the destination.
	if (GET_GAME_STATE (ARILOU_SPACE_SIDE) <= 1)
	{
		// If there's a solar system at the destination, enter it.
		CurStarDescPtr = FindStar (0, &(GLOBAL (autopilot)), 0, 0);
		if (CurStarDescPtr)
		{
			// Leave HyperSpace/QuasiSpace if we're there:
			SET_GAME_STATE (USED_BROADCASTER, 0);
			GLOBAL (CurrentActivity) &= ~IN_BATTLE;

			// Enter IP:
			GLOBAL (ShipFacing) = 0;
			GLOBAL (ip_planet) = 0;
			GLOBAL (in_orbit) = 0;
					// This causes the ship position in IP to be reset.
			GLOBAL (CurrentActivity) |= START_INTERPLANETARY;
		}
	}

	// Turn off the autopilot:
	(GLOBAL (autopilot)).x = ~0;
	(GLOBAL (autopilot)).y = ~0;
}
开发者ID:intgr,项目名称:sc2-uqm,代码行数:45,代码来源:uqmdebug.c


示例9: DevicesMenu

BOOLEAN
DevicesMenu (void)
{
	MENU_STATE MenuState;
	DEVICES_STATE DevicesState;

	memset (&MenuState, 0, sizeof MenuState);
	MenuState.privData = &DevicesState;

	memset (&DevicesState, 0, sizeof DevicesState);

	DevicesState.count = InventoryDevices (DevicesState.list, NUM_DEVICES);
	if (!DevicesState.count)
		return FALSE;

	DrawDevices (&DevicesState, (COUNT)~0, MenuState.CurState);

	SetMenuSounds (MENU_SOUND_ARROWS | MENU_SOUND_PAGEUP | MENU_SOUND_PAGEDOWN,
			MENU_SOUND_SELECT);

	MenuState.InputFunc = DoManipulateDevices;
	DoInput (&MenuState, TRUE);

	SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT);

	if (GLOBAL_SIS (CrewEnlisted) != (COUNT)~0
			&& !(GLOBAL (CurrentActivity) & CHECK_ABORT))
	{
		LockMutex (GraphicsLock);
		ClearSISRect (DRAW_SIS_DISPLAY);
		UnlockMutex (GraphicsLock);

		if (!GET_GAME_STATE (PORTAL_COUNTER)
				&& !(GLOBAL (CurrentActivity) & START_ENCOUNTER)
				&& GLOBAL_SIS (CrewEnlisted) != (COUNT)~0)
			return TRUE;
	}
	
	return FALSE;
}
开发者ID:SirDifferential,项目名称:Shiver-Balance-Mod,代码行数:40,代码来源:devices.c


示例10: GetAllianceName

void
GetAllianceName (UNICODE *buf, RESPONSE_REF name_1)
{
	COUNT i;
	STRING S;

	i = GET_GAME_STATE (NEW_ALLIANCE_NAME);
	S = SetAbsStringTableIndex (CommData.ConversationPhrases, (name_1 - 1) + i);
	// XXX: this should someday be changed so that the function takes
	//   the buffer size as an argument
	strcpy (buf, (UNICODE *)GetStringAddress (S));
	if (i == 3)
	{
		strcat (buf, GLOBAL_SIS (CommanderName));
		strcat (buf, (UNICODE *)GetStringAddress (SetRelStringTableIndex (S, 1)));
	}
}
开发者ID:jurchik,项目名称:project6014,代码行数:17,代码来源:commglue.c


示例11: getStripRandomSeed

static DWORD
getStripRandomSeed (void)
{
	DWORD x, y;
	// We truncate the location because encounters move the ship slightly in
	// HSpace, and throw some other relatively immutable values in the mix to
	// vary the deal when stuck at the same general location again.
	// It is still possible but unlikely for encounters to move the ship into
	// another truncation sector so the player could choose from 2 deals.
	x = LOGX_TO_UNIVERSE (GLOBAL_SIS (log_x)) / 100;
	y = LOGY_TO_UNIVERSE (GLOBAL_SIS (log_y)) / 100;
	// prime numbers help randomness
	return y * 1013 + x + GLOBAL_SIS (NumLanders)
			+ GLOBAL_SIS (ModuleSlots[1]) + GLOBAL_SIS (ModuleSlots[4])
			+ GLOBAL_SIS (ModuleSlots[7]) + GLOBAL_SIS (ModuleSlots[10]);
}
开发者ID:intgr,项目名称:sc2-uqm,代码行数:16,代码来源:melnorm.c


示例12: ShowRemainingCapacity

void
ShowRemainingCapacity (void)
{
	RECT r;
	TEXT t;
	CONTEXT OldContext;
	UNICODE buf[40];

	OldContext = SetContext (StatusContext);
	SetContextFont (TinyFont);

	r.corner.x = 40;
	r.corner.y = FREE_ORG_Y;

	snprintf (buf, sizeof buf, "%u",
			GetStorageBayCapacity () - GLOBAL_SIS (TotalElementMass));
	t.baseline.x = ELEMENT_COL_2 + 1;
	t.baseline.y = r.corner.y + TEXT_BASELINE;
	t.align = ALIGN_RIGHT;
	t.pStr = buf;
	t.CharCount = (COUNT)~0;

	r.extent.width = t.baseline.x - r.corner.x + 1;
	r.extent.height = ELEMENT_SPACING_Y - 2;

	BatchGraphics ();
	// erase previous free amount
	SetContextForeGroundColor (CARGO_BACK_COLOR);
	DrawFilledRectangle (&r);
	// print the new free amount
	SetContextForeGroundColor (CARGO_WORTH_COLOR);
	font_DrawText (&t);
	UnbatchGraphics ();
	
	SetContext (OldContext);
}
开发者ID:intgr,项目名称:sc2-uqm,代码行数:36,代码来源:cargo.c


示例13: HomeWorld


//.........这里部分代码省略.........
	{
		NPCPhrase (NO_ITS_NOT_2);

		LastStack = 2;
		SET_GAME_STATE (SLYLANDRO_STACK3, 3);
	}
	else if (PLAYER_SAID (R, like_more_about_you))
	{
		SlylandroInfo (R);
		return;
	}
	else if (PLAYER_SAID (R, enough_about_me))
		NPCPhrase (OK_ENOUGH_YOU);
	else if (PLAYER_SAID (R, enough_info))
		NPCPhrase (OK_ENOUGH_INFO);
	else if (PLAYER_SAID (R, enough_probe))
		NPCPhrase (OK_ENOUGH_PROBE);
	else if (PLAYER_SAID (R, mega_self_destruct))
	{
		NPCPhrase (WHY_YES_THERE_IS);

		SET_GAME_STATE (SLYLANDRO_KNOW_BROKEN, 1);
		SET_GAME_STATE (DESTRUCT_CODE_ON_SHIP, 1);
		i = GET_GAME_STATE (SLYLANDRO_MULTIPLIER) + 1;
		SET_GAME_STATE (SLYLANDRO_MULTIPLIER, i);
		AddEvent (RELATIVE_EVENT, 0, 0, 0, SLYLANDRO_RAMP_DOWN);
	}

	switch (GET_GAME_STATE (SLYLANDRO_STACK1))
	{
		case 0:
			construct_response (shared_phrase_buf,
					we_are_us0,
					GLOBAL_SIS (CommanderName),
					we_are_us1,
					GLOBAL_SIS (ShipName),
					we_are_us2,
					(UNICODE*)NULL);
			pStr[0] = we_are_us0;
			break;
		case 1:
			pStr[0] = what_other_visitors;
			break;
		case 2:
			pStr[0] = any_other_visitors;
			break;
		case 3:
			pStr[0] = what_about_sentient_milieu;
			break;
		case 4:
			pStr[0] = who_else;
			break;
		case 5:
			pStr[0] = precursors_yow;
			break;
		case 6:
			pStr[0] = must_know_more;
			break;
	}
	switch (GET_GAME_STATE (SLYLANDRO_STACK2))
	{
		case 0:
			pStr[1] = who_are_you;
			break;
		case 1:
			if (PHRASE_ENABLED (like_more_about_you))
开发者ID:SirDifferential,项目名称:Shiver-Balance-Mod,代码行数:67,代码来源:slyhome.c


示例14: RestartMenu

static BOOLEAN
RestartMenu (MENU_STATE *pMS)
{
	TimeCount TimeOut;

	ReinitQueue (&race_q[0]);
	ReinitQueue (&race_q[1]);

	SetContext (ScreenContext);

	GLOBAL (CurrentActivity) |= CHECK_ABORT;
	if (GLOBAL_SIS (CrewEnlisted) == (COUNT)~0
			&& GET_GAME_STATE (UTWIG_BOMB_ON_SHIP)
			&& !GET_GAME_STATE (UTWIG_BOMB))
	{	// player blew himself up with Utwig bomb
		SET_GAME_STATE (UTWIG_BOMB_ON_SHIP, 0);

		SleepThreadUntil (FadeScreen (FadeAllToWhite, ONE_SECOND / 8)
				+ ONE_SECOND / 60);
		SetContextBackGroundColor (
				BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F));
		ClearDrawable ();
		FlushColorXForms ();

		TimeOut = ONE_SECOND / 8;
	}
	else
	{
		TimeOut = ONE_SECOND / 2;

		if (LOBYTE (LastActivity) == WON_LAST_BATTLE)
		{
			GLOBAL (CurrentActivity) = WON_LAST_BATTLE;
			Victory ();
			Credits (TRUE);

			FreeGameData ();
			
			GLOBAL (CurrentActivity) = CHECK_ABORT;
		}
	}

	LastActivity = 0;
	NextActivity = 0;

	// TODO: This fade is not always necessary, especially after a splash
	//   screen. It only makes a user wait.
	SleepThreadUntil (FadeScreen (FadeAllToBlack, TimeOut));
	if (TimeOut == ONE_SECOND / 8)
		SleepThread (ONE_SECOND * 3);

	pMS->CurFrame = CaptureDrawable (LoadGraphic (RESTART_PMAP_ANIM));

	DrawRestartMenuGraphic (pMS);
	GLOBAL (CurrentActivity) &= ~CHECK_ABORT;
	SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN, MENU_SOUND_SELECT);
	SetDefaultMenuRepeatDelay ();
	DoInput (pMS, TRUE);
	
	StopMusic ();
	if (pMS->hMusic)
	{
		DestroyMusic (pMS->hMusic);
		pMS->hMusic = 0;
	}

	Flash_terminate (pMS->flashContext);
	pMS->flashContext = 0;
	DestroyDrawable (ReleaseDrawable (pMS->CurFrame));
	pMS->CurFrame = 0;

	if (GLOBAL (CurrentActivity) == (ACTIVITY)~0)
		return (FALSE); // timed out

	if (GLOBAL (CurrentActivity) & CHECK_ABORT)
		return (FALSE); // quit

	TimeOut = FadeScreen (FadeAllToBlack, ONE_SECOND / 2);
	
	SleepThreadUntil (TimeOut);
	FlushColorXForms ();

	SeedRandomNumbers ();

	return (LOBYTE (GLOBAL (CurrentActivity)) != SUPER_MELEE);
}
开发者ID:njvack,项目名称:uqm-ios,代码行数:86,代码来源:restart.c


示例15: ByeBye

static void
ByeBye (RESPONSE_REF R)
{
	if (PLAYER_SAID (R, ok_i_will_get_radios))
		NPCPhrase (THANKS_FOR_HELPING);
	else if (PLAYER_SAID (R, well_go_get_them_now))
		NPCPhrase (GLAD_WHEN_YOU_COME_BACK);
	else if (PLAYER_SAID (R, we_will_take_care_of_base))
	{
		NPCPhrase (GOOD_LUCK_WITH_BASE);

		SET_GAME_STATE (WILL_DESTROY_BASE, 1);
	}
	else if (PLAYER_SAID (R, take_care_of_base_again))
		NPCPhrase (GOOD_LUCK_AGAIN);
	else if (PLAYER_SAID (R, base_was_abandoned)
			|| PLAYER_SAID (R, i_lied_it_was_abandoned))
	{
		NPCPhrase (IT_WAS_ABANDONED);
		NPCPhrase (HERE_COMES_ILWRATH);

		SET_GAME_STATE (PROBE_ILWRATH_ENCOUNTER, 1);
	}
	else if (PLAYER_SAID (R, oh_yes_big_fight))
	{
		NPCPhrase (IM_GLAD_YOU_WON);
		NPCPhrase (HERE_COMES_ILWRATH);

		SET_GAME_STATE (PROBE_ILWRATH_ENCOUNTER, 1);
	}
	else if (PLAYER_SAID (R, i_cant_talk_about_it))
	{
		NPCPhrase (IM_SURE_IT_WAS_DIFFICULT);
		NPCPhrase (HERE_COMES_ILWRATH);

		SET_GAME_STATE (PROBE_ILWRATH_ENCOUNTER, 1);
	}
	else if (PLAYER_SAID (R, cook_their_butts)
			|| PLAYER_SAID (R, overthrow_evil_aliens)
			|| PLAYER_SAID (R, annihilate_those_monsters))
	{
		SET_GAME_STATE (PROBE_ILWRATH_ENCOUNTER, 0);

		if (PLAYER_SAID (R, cook_their_butts))
			NPCPhrase (COOK_BUTTS);
		else if (PLAYER_SAID (R, overthrow_evil_aliens))
			NPCPhrase (OVERTHROW_ALIENS);
		else /* if (R == annihilate_those_monsters) */
			NPCPhrase (KILL_MONSTERS);

		construct_response (shared_phrase_buf,
				name_40,
				GLOBAL_SIS (CommanderName),
				name_41,
				(UNICODE*)NULL);

		NPCPhrase (THIS_MAY_SEEM_SILLY);

		Response (name_1, ByeBye);
		Response (name_2, ByeBye);
		Response (name_3, ByeBye);
		DoResponsePhrase (name_40, ByeBye, shared_phrase_buf);

		SET_GAME_STATE (STARBASE_AVAILABLE, 1);
	}
	else
	{
		if (PLAYER_SAID (R, name_1))
		{
			NPCPhrase (OK_THE_NAFS);

			SET_GAME_STATE (NEW_ALLIANCE_NAME, 0);
		}
		else if (PLAYER_SAID (R, name_2))
		{
			NPCPhrase (OK_THE_CAN);

			SET_GAME_STATE (NEW_ALLIANCE_NAME, 1);
		}
		else if (PLAYER_SAID (R, name_3))
		{
			NPCPhrase (OK_THE_UFW);

			SET_GAME_STATE (NEW_ALLIANCE_NAME, 2);
		}
		else /* if (PLAYER_SAID (R, name_4)) */
		{
			NPCPhrase (OK_THE_NAME_IS_EMPIRE0);
			NPCPhrase (GLOBAL_PLAYER_NAME);
			NPCPhrase (OK_THE_NAME_IS_EMPIRE1);

			SET_GAME_STATE (NEW_ALLIANCE_NAME, 3);
		}

		NPCPhrase (STARBASE_WILL_BE_READY);
	}
}
开发者ID:jurchik,项目名称:project6014,代码行数:97,代码来源:comandr.c


示例16: RevealSelf

static void
RevealSelf (RESPONSE_REF R)
{
	BYTE i, stack;

	stack = 0;
	if (PLAYER_SAID (R, we_are_vindicator0))
	{
		NPCPhrase (THATS_IMPOSSIBLE);

		DISABLE_PHRASE (we_are_vindicator0);
	}
	else if (PLAYER_SAID (R, our_mission_was_secret))
	{
		NPCPhrase (ACKNOWLEDGE_SECRET);

		DISABLE_PHRASE (our_mission_was_secret);
	}
	else if (PLAYER_SAID (R, first_give_info))
	{
		NPCPhrase (ASK_AWAY);

		stack = 1;
		DISABLE_PHRASE (first_give_info);
	}
	else if (PLAYER_SAID (R, whats_this_starbase))
	{
		NPCPhrase (STARBASE_IS);

		stack = 1;
		DISABLE_PHRASE (whats_this_starbase);
	}
	else if (PLAYER_SAID (R, what_about_earth))
	{
		NPCPhrase (HAPPENED_TO_EARTH);

		stack = 1;
		DISABLE_PHRASE (what_about_earth);
	}
	else if (PLAYER_SAID (R, where_are_urquan))
	{
		NPCPhrase (URQUAN_LEFT);

		stack = 1;
		DISABLE_PHRASE (where_are_urquan);
	}
	else if (PLAYER_SAID (R, it_went_away))
		NPCPhrase (DEEP_TROUBLE);
	else if (PLAYER_SAID (R, we_destroyed_it))
		NPCPhrase (GOOD_NEWS);
	else if (PLAYER_SAID (R, what_probe))
		NPCPhrase (SURE_HOPE);

	for (i = 0; i < 2; ++i, stack ^= 1)
	{
		if (stack == 1)
		{
			if (PHRASE_ENABLED (first_give_info))
				Response (first_give_info, RevealSelf);
			else if (PHRASE_ENABLED (whats_this_starbase))
				Response (whats_this_starbase, RevealSelf);
			else if (PHRASE_ENABLED (what_about_earth))
				Response (what_about_earth, RevealSelf);
			else if (PHRASE_ENABLED (where_are_urquan))
				Response (where_are_urquan, RevealSelf);
			else if (PHRASE_ENABLED (what_was_red_thing))
			{
				Response (what_was_red_thing, TellProbe);
			}
		}
		else
		{
			if (PHRASE_ENABLED (we_are_vindicator0))
			{
				construct_response (shared_phrase_buf,
						we_are_vindicator0,
						GLOBAL_SIS (CommanderName),
						we_are_vindicator1,
						GLOBAL_SIS (ShipName),
						we_are_vindicator2,
						(UNICODE*)NULL);
				DoResponsePhrase (we_are_vindicator0, RevealSelf, shared_phrase_buf);
			}
			else if (PHRASE_ENABLED (our_mission_was_secret))
				Response (our_mission_was_secret, RevealSelf);
			else
			{
				if (GET_GAME_STATE (MOONBASE_DESTROYED) == 0)
					Response (we_are_here_to_help, TellMoonBase);
				else
					Response (we_are_here_to_help, BaseDestroyed);
			}
		}
	}
}
开发者ID:jurchik,项目名称:project6014,代码行数:95,代码来源:comandr.c


示例17: TellMoonBase

static void
TellMoonBase (RESPONSE_REF R)
{
	if (R == 0)
	{
		NPCPhrase (DEALT_WITH_BASE_YET);
	}
	else if (PLAYER_SAID (R, i_lost_my_lander))
	{
		NPCPhrase (HERE_IS_A_NEW_LANDER);
		++GLOBAL_SIS (NumLanders);
		LockMutex (GraphicsLock);
		DrawLanders ();
		DeltaSISGauges (4, 0, 0);
		UnlockMutex (GraphicsLock);

		SET_GAME_STATE (LANDERS_LOST, 1);
	}
	else if (PLAYER_SAID (R, i_lost_another_lander))
	{
		NPCPhrase (HERE_IS_ANOTHER_LANDER);
		++GLOBAL_SIS (NumLanders);
		LockMutex (GraphicsLock);
		DrawLanders ();
		DeltaSISGauges (4, 0, 0);
		UnlockMutex (GraphicsLock);
	}
	else if (PLAYER_SAID (R, need_fuel_mercury) ||
			PLAYER_SAID (R, need_fuel_luna))
	{
		NPCPhrase (GIVE_FUEL);
		LockMutex (GraphicsLock);
		DeltaSISGauges (0, 5 * FUEL_TANK_SCALE, 0);
		UnlockMutex (GraphicsLock);

		SET_GAME_STATE (GIVEN_FUEL_BEFORE, 1);
	}
	else if (PLAYER_SAID (R, need_fuel_again))
	{
		NPCPhrase (GIVE_FUEL_AGAIN);
		LockMutex (GraphicsLock);
		DeltaSISGauges (0, 5 * FUEL_TANK_SCALE, 0);
		UnlockMutex (GraphicsLock);
	}
	else if (PLAYER_SAID (R, we_are_here_to_help))
	{
		NPCPhrase (BASE_ON_MOON);
	}
	else if (GET_GAME_STATE (STARBASE_YACK_STACK1) == 0)
	{
		NPCPhrase (ABOUT_BASE);

		SET_GAME_STATE (STARBASE_YACK_STACK1, 1);
	}
	else
	{
		NPCPhrase (ABOUT_BASE_AGAIN);
	}

	if (GLOBAL_SIS (NumLanders) == 0
			&& GET_GAME_STATE (CHMMR_BOMB_STATE) < 2)
	{
		if (GET_GAME_STATE (LANDERS_LOST))
			Response (i_lost_another_lander, TellMoonBase);
		else
			Response (i_lost_my_lander, TellMoonBase);
	}
	if (GLOBAL_SIS (FuelOnBoard) < 2 * FUEL_TANK_SCALE)
	{
		if (GET_GAME_STATE (GIVEN_FUEL_BEFORE))
			Response (need_fuel_again, TellMoonBase);
		else
			Response (need_fuel_luna, TellMoonBase);
	}
	if (GET_GAME_STATE (WILL_DESTROY_BASE) == 0)
		Response (we_will_take_care_of_base, ByeBye);
	else
		Response (take_care_of_base_again, ByeBye);
	if (GET_GAME_STATE (STARBASE_YACK_STACK1) == 0)
		Response (tell_me_about_base, TellMoonBase);
	else
		Response (tell_me_again, TellMoonBase);
}
开发者ID:jurchik,项目名称:project6014,代码行数:83,代码来源:comandr.c


示例18: AskAfterRadios

static void
AskAfterRadios (RESPONSE_REF R)
{
	if (PLAYER_SAID (R, i_lost_my_lander))
	{
		NPCPhrase (HERE_IS_A_NEW_LANDER);
		++GLOBAL_SIS (NumLanders);
		LockMutex (GraphicsLock);
		DrawLanders ();
		DeltaSISGauges (4, 0, 0);
		UnlockMutex (GraphicsLock);

		SET_GAME_STATE (LANDERS_LOST, 1);
	}
	else if (PLAYER_SAID (R, i_lost_another_lander))
	{
		NPCPhrase (HERE_IS_ANOTHER_LANDER);
		++GLOBAL_SIS (NumLanders);
		LockMutex (GraphicsLock);
		DrawLanders ();
		DeltaSISGauges (4, 0, 0);
		UnlockMutex (GraphicsLock);
	}
	else if (PLAYER_SAID (R, need_fuel_mercury) ||
			PLAYER_SAID (R, need_fuel_luna))
	{
		NPCPhrase (GIVE_FUEL);
		LockMutex (GraphicsLock);
		DeltaSISGauges (0, 5 * FUEL_TANK_SCALE, 0);
		UnlockMutex (GraphicsLock);

		SET_GAME_STATE (GIVEN_FUEL_BEFORE, 1);
	}
	else if (PLAYER_SAID (R, need_fuel_again))
	{
		NPCPhrase (GIVE_FUEL_AGAIN);
		LockMutex (GraphicsLock);
		DeltaSISGauges (0, 5 * FUEL_TANK_SCALE, 0);
		UnlockMutex (GraphicsLock);
	}
	else if (PLAYER_SAID (R, where_get_radios))
	{
		NPCPhrase (RADIOS_ON_MERCURY);

		DISABLE_PHRASE (where_get_radios);
	}

	{
		if (GLOBAL_SIS (NumLanders) == 0
				&& GET_GAME_STATE (CHMMR_BOMB_STATE) < 2)
		{
			if (GET_GAME_STATE (LANDERS_LOST))
				Response (i_lost_another_lander, AskAfterRadios);
			else
				Response (i_lost_my_lander, AskAfterRadios);
		}
		if (GLOBAL_SIS (FuelOnBoard) < 2 * FUEL_TANK_SCALE)
		{
			if (GET_GAME_STATE (GIVEN_FUEL_BEFORE))
				Response (need_fuel_again, AskAfterRadios);
			else
				Response (need_fuel_mercury, AskAfterRadios);
		}
		Response (well_go_get_them_now, ByeBye);
		if (PHRASE_ENABLED (where_get_radios))
		{
			Response (where_get_radios, AskAfterRadios);
		}
	}
}
开发者ID:jurchik,项目名称:project6014,代码行数:70,代码来源:comandr.c


示例19: NoRadioactives

static void
NoRadioactives (RESPONSE_REF R)
{
	if (PLAYER_SAID (R, yes_this_is_supply_ship))
	{
		NPCPhrase (ABOUT_TIME);

		if (GLOBAL_SIS (ElementAmounts[RADIOACTIVE]))
			GiveRadios (0);
		else
		{
			Response (i_lied, NoRadioactives);
			Response (plumb_out, NoRadioactives);
		}
	}
	else
	{
		if (PLAYER_SAID (R, where_can_i_get_radios))
		{
			NPCPhrase (RADIOS_ON_MERCURY);

			DISABLE_PHRASE (where_can_i_get_radios);
		}
		else if (PLAYER_SAID (R, no_but_well_help0))
			NPCPhrase (THE_WHAT_FROM_WHERE);
		else if (PLAYER_SAID (R, what_slave_planet)
				|| PLAYER_SAID (R, i_lied))
			NPCPhrase (DONT_KNOW_WHO_YOU_ARE);
		else if (PLAYER_SAID (R, plumb_out))
			NPCPhrase (WHAT_KIND_OF_IDIOT);
		else if (PLAYER_SAID (R, i_lost_my_lander))
		{
			NPCPhrase (HERE_IS_A_NEW_LANDER);
			++GLOBAL_SIS (NumLanders);
			LockMutex (GraphicsLock);
			DrawLanders ();
			DeltaSISGauges (4, 0, 0);
			UnlockMutex (GraphicsLock);

			SET_GAME_STATE (LANDERS_LOST, 1);
		}
		else if (PLAYER_SAID (R, i_lost_another_lander))
		{
			NPCPhrase (HERE_IS_ANOTHER_LANDER);
			++GLOBAL_SIS (NumLanders);
			LockMutex (GraphicsLock);
			DrawLanders ();
			DeltaSISGauges (4, 0, 0);
			UnlockMutex (GraphicsLock);
		}
		else if (PLAYER_SAID (R, need_fuel_mercury) ||
				PLAYER_SAID (R, need_fuel_luna))
		{
			NPCPhrase (GIVE_FUEL);
			LockMutex (GraphicsLock);
			DeltaSISGauges (0, 5 * FUEL_TANK_SCALE, 0);
			UnlockMutex (GraphicsLock);

			SET_GAME_STATE (GIVEN_FUEL_BEFORE, 1);
		}
		else if (PLAYER_SAID (R, need_fuel_again))
		{
			NPCPhrase (GIVE_FUEL_AGAIN);
			LockMutex (GraphicsLock);
			DeltaSISGauges (0, 5 * FUEL_TANK_SCALE, 0);
			UnlockMutex (GraphicsLock);
		}

		if (GLOBAL_SIS (ElementAmounts[RADIOACTIVE]))
			GiveRadios (0);
		else
		{
			if (GLOBAL_SIS (NumLanders) == 0
					&& GET_GAME_STATE (CHMMR_BOMB_STATE) < 2)
			{
				if (GET_GAME_STATE (LANDERS_LOST))
					Response (i_lost_another_lander, NoRadioactives);
				else
					Response (i_lost_my_lander, NoRadioactives);
			}
			if (GLOBAL_SIS (FuelOnBoard) < 2 * FUEL_TANK_SCALE)
			{
				if (GET_GAME_STATE (GIVEN_FUEL_BEFORE))
					Response (need_fuel_again, NoRadioactives);
				else
					Response (need_fuel_mercury, NoRadioactives);
			}
	
			Response (ok_i_will_get_radios, ByeBye);
			if (PHRASE_ENABLED (where_can_i_get_radios))
			{
				Response (where_can_i_get_radios, NoRadioactives);
			}
		}
	}
}
开发者ID:jurchik,项目名称:project6014,代码行数:96,代码来源:comandr.c


示例20: Buy

static void
Buy (RESPONSE_REF R)
{
	if (PLAYER_SAID (R, want_to_buy)
			|| PLAYER_SAID (R, im_ready_to_buy))
	{
		NPCPhrase (READY_TO_SELL);
		if (!GET_GAME_STATE (ROSY_SPHERE))
			NPCPhrase (HAVE_SPHERE);
		if (!GET_GAME_STATE (ARTIFACT_2_ON_SHIP))
			NPCPhrase (HAVE_ART_1);
		if (!GET_GAME_STATE (ARTIFACT_3_ON_SHIP))
			NPCPhrase (HAVE_ART_2);
		NPCPhrase (SHIPS_AND_FUEL);

		SET_GAME_STATE (KNOW_DRUUGE_SLAVERS, 3);
	}
	else if (PLAYER_SAID (R, buy_druuge_ship))
	{
#define SHIP_CREW_COST 100
		if (GLOBAL_SIS (CrewEnlisted) < SHIP_CREW_COST)
			NPCPhrase (NOT_ENOUGH_CREW);
		else if (EscortFeasibilityStudy (DRUUGE_SHIP) == 0)
			NPCPhrase (NOT_ENOUGH_ROOM);
		else
		{
			DeltaSISGauges (-SHIP_CREW_COST, 0, 0);
			SlaveryCount += SHIP_CREW_COST;
			AddEscortShips (DRUUGE_SHIP, 1);

			NPCPhrase (BOUGHT_SHIP);
		}
	}
#define ARTIFACT_CREW_COST 100
	else if (PLAYER_SAID (R, buy_rosy_sphere))
	{
		if (GLOBAL_SIS (CrewEnlisted) < ARTIFACT_CREW_COST)
			NPCPhrase (NOT_ENOUGH_CREW);
		else
		{
			DeltaSISGauges (-ARTIFACT_CREW_COST, 0, 0);
			SlaveryCount += ARTIFACT_CREW_COST;
			SET_GAME_STATE (ROSY_SPHERE_ON_SHIP, 1);
			SET_GAME_STATE (ROSY_SPHERE, 1);

			NPCPhrase (BOUGHT_SPHERE);
		}
	}
	else if (PLAYER_SAID (R, buy_art_1))
	{
		if (GLOBAL_SIS (CrewEnlisted) < ARTIFACT_CREW_COST)
			NPCPhrase (NOT_ENOUGH_CREW);
		else
		{
			DeltaSISGauges (-ARTIFACT_CREW_COST, 0, 0);
			SlaveryCount += ARTIFACT_CREW_COST;
			SET_GAME_STATE (ARTIFACT_2_ON_SHIP, 1);

			NPCPhrase (BOUGHT_ART_1);
		}
	}
	else if (PLAYER_SAID (R, buy_art_2))
	{
		if (GLOBAL_SIS (CrewEnlisted) < ARTIFACT_CREW_COST)
			NPCPhrase (NOT_ENOUGH_CREW);
		else
		{
			DeltaSISGauges (-ARTIFACT_CREW_COST, 0, 0);
			SlaveryCount += ARTIFACT_CREW_COST;
			SET_GAME_STATE (ARTIFACT_3_ON_SHIP, 1);

			NPCPhrase (BOUGHT_ART_2);
		}
	}
	else if (PLAYER_SAID (R, buy_fuel))
	{
#define FUEL_CREW_COST 10
		if (GLOBAL_SIS (CrewEnlisted) < FUEL_CREW_COST)
			NPCPhrase (NOT_ENOUGH_CREW);
		else
		{
			DeltaSISGauges (-FUEL_CREW_COST,
					FUEL_CREW_COST * FUEL_TANK_SCALE, 0);
			SlaveryCount += FUEL_CREW_COST;

			NPCPhrase (BOUGHT_FUEL);
		}
	}

	Response (buy_druuge_ship, Buy);
	if (!GET_GAME_STATE (ROSY_SPHERE))
		Response (buy_rosy_sphere, Buy);
	if (!GET_GAME_STATE (ARTIFACT_2_ON_SHIP))
		Response (buy_art_1, Buy);
	if (!GET_GAME_STATE (ARTIFACT_3_ON_SHIP))
		Response (buy_art_2, Buy);
	Response (buy_fuel, Buy);
	Response (done_buying, TradeWorld);
}
开发者ID:intgr,项目名称:sc2-uqm,代码行数:99,代码来源:druugec.c



注:本文中的GLOBAL_SIS函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GLRO函数代码示例发布时间:2022-05-30
下一篇:
C++ GLOBAL_LOCK函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap