示例#1
0
GAE_Pointer_t* GAE_Pointer_create(const unsigned int axes, const unsigned int buttons) {
	GAE_Pointer_t* pointer = (GAE_Pointer_t*)malloc(sizeof(GAE_Pointer_t));
	unsigned int index = 0U;
	float depressed = 0.0F;

	pointer->axes = GAE_Array_create(sizeof(float));
	for (index = 0U; index < axes; ++index)
		GAE_Array_push(pointer->axes, (void*)&depressed);

	pointer->buttons = GAE_Array_create(sizeof(float));
	for (index = 0U; index < buttons; ++index)
		GAE_Array_push(pointer->buttons, (void*)&depressed);

	return pointer;
}
示例#2
0
GAE_Pointer_t* GAE_Pointer_create(const unsigned int axes, const unsigned int buttons) {
	GAE_Pointer_t* pointer = malloc(sizeof(GAE_Pointer_t));
	unsigned int index = 0U;

	pointer->axes = GAE_Array_create(sizeof(float));
	for (index = 0U; index < axes; ++index) {
		float* value = malloc(sizeof(float));
		*value = 0.0F;
		GAE_Array_push(pointer->axes, value);
	}

	pointer->buttons = GAE_Array_create(sizeof(float));
	for (index = 0U; index < buttons; ++index) {
		float* value = malloc(sizeof(float));
		*value = 0.0F;
		GAE_Array_push(pointer->buttons, value);
	}

	return pointer;
}
示例#3
0
GAE_Material_t* GAE_Material_addTexture(GAE_Material_t* material, GAE_Texture_t* const texture) {
	GAE_Array_push(material->textures, texture);
	return material;
}
示例#4
0
GAE_StateStack_t* GAE_StateStack_replace(GAE_StateStack_t* stack, GAE_State_t* state) {
	free(GAE_Array_pop(stack->stack));
	GAE_Array_push(stack->stack, state);
	return stack;
}
示例#5
0
GAE_StateStack_t* GAE_StateStack_push(GAE_StateStack_t* stack, GAE_State_t* state) {
	GAE_Array_push(stack->stack, state);
	return stack;
}