00001 /* 00002 * PSP Software Development Kit - http://www.pspdev.org 00003 * ----------------------------------------------------------------------- 00004 * Licensed under the BSD license, see LICENSE in PSPSDK root for details. 00005 * 00006 * Copyright (c) 2005 Jesper Svennevid 00007 */ 00008 00009 #ifndef __guInternal_h__ 00010 #define __guInternal_h__ 00011 00012 #include "pspgu.h" 00013 00014 typedef void (*GuCallback)(int); 00015 00016 typedef struct 00017 { 00018 GuCallback sig; 00019 GuCallback fin; 00020 short signal_history[16]; 00021 int signal_offset; 00022 int kernel_event_flag; 00023 int ge_callback_id; 00024 } GuSettings; 00025 00026 typedef struct 00027 { 00028 unsigned int* start; 00029 unsigned int* current; 00030 int parent_context; 00031 } GuDisplayList; 00032 00033 typedef struct 00034 { 00035 GuDisplayList list; 00036 int scissor_enable; 00037 int scissor_start[2]; 00038 int scissor_end[2]; 00039 int near_plane; 00040 int far_plane; 00041 int depth_offset; 00042 int unknown_state; 00043 int texture_function; 00044 int texture_proj_map_mode; 00045 int texture_map_mode; 00046 int sprite_mode[4]; 00047 unsigned int clear_color; 00048 unsigned int clear_stencil; 00049 unsigned int clear_depth; 00050 int texture_mode; 00051 } GuContext; 00052 00053 typedef struct 00054 { 00055 int pixel_size; 00056 int frame_width; 00057 void* frame_buffer; 00058 void* disp_buffer; 00059 void* depth_buffer; 00060 int depth_width; 00061 int width; 00062 int height; 00063 } GuDrawBuffer; 00064 00065 typedef struct 00066 { 00067 unsigned char row0[4]; 00068 unsigned char row1[4]; 00069 unsigned char row2[4]; 00070 unsigned char row3[4]; 00071 } GuLightSettings; 00072 00073 extern unsigned int gu_current_frame; 00074 extern GuContext gu_contexts[3]; 00075 extern int ge_list_executed[2]; 00076 extern void* ge_edram_address; 00077 extern GuSettings gu_settings; 00078 extern GuDisplayList* gu_list; 00079 extern int gu_curr_context; 00080 extern int gu_init; 00081 extern int gu_display_on; 00082 extern int gu_call_mode; 00083 extern int gu_states; 00084 extern GuDrawBuffer gu_draw_buffer; 00085 00086 extern unsigned int* gu_object_stack[]; 00087 extern int gu_object_stack_depth; 00088 00089 extern GuLightSettings light_settings[4]; 00090 00091 void sendCommandi(int cmd, int argument); 00092 void sendCommandiStall(int cmd, int argument); 00093 void sendCommandf(int cmd, float argument); 00094 00095 void callbackSig(int id, void* arg); 00096 void callbackFin(int id, void* arg); 00097 void resetValues(); 00098 00099 #endif