mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-03 16:51:27 +00:00
Make sceGuResetGlobalVariables a private function
This commit is contained in:
@@ -18,7 +18,6 @@ noinst_HEADERS = guInternal.h
|
||||
|
||||
libpspgu_a_SOURCES = \
|
||||
guInternal.c \
|
||||
resetValues.c \
|
||||
sceGuAlphaFunc.c \
|
||||
sceGuAmbient.c \
|
||||
sceGuAmbientColor.c \
|
||||
|
@@ -82,7 +82,6 @@ extern int gu_object_stack_depth;
|
||||
|
||||
void callbackSig(int id, void *arg);
|
||||
void callbackFin(int id, void *arg);
|
||||
void _sceGuResetGlobalVariables();
|
||||
|
||||
typedef enum GECommand
|
||||
{
|
||||
|
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* PSP Software Development Kit - https://github.com/pspdev
|
||||
* -----------------------------------------------------------------------
|
||||
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
|
||||
*
|
||||
* Copyright (c) 2005 Jesper Svennevid
|
||||
*/
|
||||
|
||||
#include "guInternal.h"
|
||||
|
||||
void _sceGuResetGlobalVariables()
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
gu_init = 0;
|
||||
|
||||
gu_states = 0;
|
||||
gu_object_stack_depth = 0;
|
||||
|
||||
gu_display_on = GU_DISPLAY_OFF;
|
||||
gu_call_mode = GU_CALL_NORMAL;
|
||||
|
||||
gu_draw_buffer.pixel_size = GU_PSM_5551;
|
||||
gu_draw_buffer.frame_width = GU_SCR_WIDTH;
|
||||
gu_draw_buffer.frame_buffer = 0;
|
||||
gu_draw_buffer.disp_buffer = 0;
|
||||
gu_draw_buffer.depth_buffer = 0;
|
||||
gu_draw_buffer.depth_width = 0;
|
||||
gu_draw_buffer.width = GU_SCR_WIDTH;
|
||||
gu_draw_buffer.height = GU_SCR_HEIGHT;
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
GuContext* context = &gu_contexts[i];
|
||||
|
||||
context->scissor_enable = 0;
|
||||
context->scissor_start[0] = 0;
|
||||
context->scissor_start[1] = 0;
|
||||
context->scissor_end[0] = 0;
|
||||
context->scissor_end[1] = 0;
|
||||
|
||||
context->near_plane = 0;
|
||||
context->far_plane = 1;
|
||||
|
||||
context->depth_offset = 0;
|
||||
context->fragment_2x = 0;
|
||||
context->texture_function = 0;
|
||||
context->texture_proj_map_mode = 0;
|
||||
context->texture_map_mode = 0;
|
||||
context->sprite_mode[0] = 0;
|
||||
context->sprite_mode[1] = 0;
|
||||
context->sprite_mode[2] = 0;
|
||||
context->sprite_mode[3] = 0;
|
||||
context->clear_color = 0;
|
||||
context->clear_stencil = 0;
|
||||
context->clear_depth = 0xffff;
|
||||
context->texture_mode = 0;
|
||||
}
|
||||
|
||||
gu_settings.sig = NULL;
|
||||
gu_settings.fin = NULL;
|
||||
}
|
@@ -234,6 +234,59 @@ static unsigned int __attribute__((aligned(16))) ge_init_list[] = {
|
||||
ZV(END),
|
||||
};
|
||||
|
||||
static void sceGuResetGlobalVariables(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
gu_init = 0;
|
||||
|
||||
gu_states = 0;
|
||||
gu_object_stack_depth = 0;
|
||||
|
||||
gu_display_on = GU_DISPLAY_OFF;
|
||||
gu_call_mode = GU_CALL_NORMAL;
|
||||
|
||||
gu_draw_buffer.pixel_size = GU_PSM_5551;
|
||||
gu_draw_buffer.frame_width = GU_SCR_WIDTH;
|
||||
gu_draw_buffer.frame_buffer = 0;
|
||||
gu_draw_buffer.disp_buffer = 0;
|
||||
gu_draw_buffer.depth_buffer = 0;
|
||||
gu_draw_buffer.depth_width = 0;
|
||||
gu_draw_buffer.width = GU_SCR_WIDTH;
|
||||
gu_draw_buffer.height = GU_SCR_HEIGHT;
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
GuContext* context = &gu_contexts[i];
|
||||
|
||||
context->scissor_enable = 0;
|
||||
context->scissor_start[0] = 0;
|
||||
context->scissor_start[1] = 0;
|
||||
context->scissor_end[0] = 0;
|
||||
context->scissor_end[1] = 0;
|
||||
|
||||
context->near_plane = 0;
|
||||
context->far_plane = 1;
|
||||
|
||||
context->depth_offset = 0;
|
||||
context->fragment_2x = 0;
|
||||
context->texture_function = 0;
|
||||
context->texture_proj_map_mode = 0;
|
||||
context->texture_map_mode = 0;
|
||||
context->sprite_mode[0] = 0;
|
||||
context->sprite_mode[1] = 0;
|
||||
context->sprite_mode[2] = 0;
|
||||
context->sprite_mode[3] = 0;
|
||||
context->clear_color = 0;
|
||||
context->clear_stencil = 0;
|
||||
context->clear_depth = 0xffff;
|
||||
context->texture_mode = 0;
|
||||
}
|
||||
|
||||
gu_settings.sig = NULL;
|
||||
gu_settings.fin = NULL;
|
||||
}
|
||||
|
||||
void callbackFin(int id, void *arg)
|
||||
{
|
||||
GuSettings *settings = (GuSettings *)arg;
|
||||
@@ -259,7 +312,7 @@ int sceGuInit(void)
|
||||
PspGeCallbackData callback;
|
||||
|
||||
ge_edram_address = sceGeEdramGetAddr();
|
||||
_sceGuResetGlobalVariables();
|
||||
sceGuResetGlobalVariables();
|
||||
|
||||
res = sceKernelCreateEventFlag("SceGuSignal", PSP_EVENT_WAITMULTIPLE, 3, 0);
|
||||
if (res < 0)
|
||||
|
Reference in New Issue
Block a user