Ejemplo n.º 1
0
/*
 * Add Clock Node
 */
void addClock(clockType type)	{
	
	GameClock clock = getClock(NULL);	
	if(checkUniqueClockType(type))	{
		if(clock->first == NULL)	{
			clock->first = clock->last = createClockNode(type);
		} else {
			clock->last->next = createClockNode(type);
			clock->last = clock->last->next;
		}
	}
}
/*
 * Add Clock Node
 */
int addClock(clockType type)	{
    GameClock clock = getClock(NULL);
    if(checkUniqueClockType(type))	{
        if(clock->first == NULL)	{
            clock->first = clock->last = createClockNode(type);
        } else {
            clock->last->next = createClockNode(type);
            clock->last = clock->last->next;
        }
    } else {
        fprintf(stderr,"Attempt to add non unique clock\n");
        return 0;
    }
    return 1;
}