Example #1
0
bool not(bool previousResult) {
	result = !previousResult;

	char desiredBoolString[100];
	char actualBoolString[100];
	sprintf(desiredBoolString,"%s", previousResult ? "true" : "false");
	sprintf(actualBoolString,"%s", result ? "true" : "false");
	addMessageToList(
			buildMessage("not()", desiredBoolString, actualBoolString, result));

	return result;
}
Example #2
0
/*Add a message to the list */
MESSAGE * addMessage(MESSAGE_TYPE msgType, BOOL proxPos, UDWORD player)
{
	//first create a message of the required type
	MESSAGE* psMsgToAdd = createMessage(msgType, player);

	debug(LOG_MSG, "adding message for player %d, type is %d, proximity is %d", player, msgType, proxPos);

	ASSERT(psMsgToAdd, "createMessage failed");
	if (!psMsgToAdd)
	{
		return NULL;
	}
	//then add to the players' list
	addMessageToList(apsMessages, psMsgToAdd, player);

	//add a proximity display
	if (msgType == MSG_PROXIMITY)
	{
		addProximityDisplay(psMsgToAdd, proxPos, player);
	}

	return psMsgToAdd;
}