Lines Matching refs:stackPointer
40 int stackPointer; /* Points above used stack, 0 initially */ member
57 stack->stackPointer = 0; in createStateStack()
66 while (stateStack->stackPointer > 0) { in deleteStateStack()
67 stateStack->stackPointer--; in deleteStateStack()
68 deallocateGameState((GameState *)stateStack->states[stateStack->stackPointer]); in deleteStateStack()
69 deallocate(stateStack->states[stateStack->stackPointer]); in deleteStateStack()
70 deallocate(stateStack->commands[stateStack->stackPointer]); in deleteStateStack()
83 return stateStack->stackPointer == 0; in stateStackIsEmpty()
89 if (stack->stackPointer == stack->stackSize) { in ensureSpaceForGameState()
102 stateStack->commands[stateStack->stackPointer] = NULL; in pushGameState()
103 stateStack->states[stateStack->stackPointer++] = element; in pushGameState()
109 stateStack->commands[stateStack->stackPointer - 1] = strdup(playerCommands); in attachPlayerCommandsToLastState()
115 if (stateStack->stackPointer == 0) in popGameState()
118 stateStack->stackPointer--; in popGameState()
119 memcpy(gameState, stateStack->states[stateStack->stackPointer], stateStack->elementSize); in popGameState()
120 deallocate(stateStack->states[stateStack->stackPointer]); in popGameState()
121 *playerCommand = stateStack->commands[stateStack->stackPointer]; in popGameState()