30 #include "engines/icb/p4_generic.h" 31 #include "engines/icb/gfx/psx_pcdefines.h" 32 #include "engines/icb/gfx/rlp_api.h" 33 #include "engines/icb/common/pc_props.h" 34 #include "engines/icb/common/px_staticlayers.h" 36 #include "common/endian.h" 40 #define WEATHER_SCREEN_WIDTH SCREEN_WIDTH 41 #define WEATHER_HALF_SCREEN_WIDTH (WEATHER_SCREEN_WIDTH / 2) 42 #define WEATHER_SCREEN_HEIGHT SCREEN_DEPTH 43 #define WEATHER_HALF_SCREEN_HEIGHT (WEATHER_SCREEN_HEIGHT / 2) 44 #define WEATHER_SCREEN_DEPTH 512 45 #define WEATHER_HALF_SCREEN_DEPTH (WEATHER_SCREEN_DEPTH / 2) 46 #define WEATHER_MAX_PARTICLES 256 48 #define MAX_PROP_STATES 512 49 #define MAX_CAMERA_PROPS 16 51 #define _MAX_SHADOW_LAYERS_ 4 52 #define WEATHER_NONE 0 53 #define WEATHER_RAIN 1 54 #define WEATHER_SNOW 2 56 extern uint32 bg_buffer_id;
57 extern LRECT full_rect;
60 friend void sv_WeatherControls();
67 bool8 Init(
const char *camera_name,
const char *h_camera_name);
68 void Init_construction_matrices();
69 void Init_base_bitmap_buffers();
74 void Load_props_old();
82 inline uint8 *GetBackground();
83 inline uint32 GetPropQty();
84 inline const char *GetPropName(uint32 n);
85 inline uint32 GetPropRange(uint32 n);
86 bool8 DoesPropExist(
const char *propName);
88 int32 OK() {
return m_setOk; };
90 bool8 DoesCameraExist(
const char *camera_name,
const char *camera_cluster_name);
93 void HackMakeCamera();
96 void RefreshBackdrop();
97 void Set_draw(bool8 helper);
99 const char *GetSetName()
const {
return set_name; }
102 char set_name[MAXPATHLEN];
103 char set_url[MAXPATHLEN];
105 char set_cluster[MAXPATHLEN];
106 uint32 set_cluster_hash;
108 char h_set_name[MAXPATHLEN];
109 char rvpcm_file_name[MAXPATHLEN];
110 uint32 rvpcm_file_hash;
111 char rvcam_file_name[MAXPATHLEN];
112 uint32 rvcam_file_hash;
113 char rvsl_file_name[MAXPATHLEN];
114 uint32 rvsl_file_hash;
115 char rvbg_file_name[MAXPATHLEN];
116 uint32 rvbg_file_hash;
117 char rlx_file_name[MAXPATHLEN];
118 uint32 rlx_file_hash;
125 void InitWeather(int32 type, int32 particleQty, int32 lightning, int32 windX, int32 windY, int32 windZ);
128 int16 m_wParticleX[WEATHER_MAX_PARTICLES];
129 int16 m_wParticleY[WEATHER_MAX_PARTICLES];
130 int16 m_wParticleZ[WEATHER_MAX_PARTICLES];
131 int8 m_wParticleDX[WEATHER_MAX_PARTICLES];
132 int8 m_wParticleDY[WEATHER_MAX_PARTICLES];
133 int8 m_wParticleDZ[WEATHER_MAX_PARTICLES];
134 int32 m_wLightningTimer;
139 int32 m_wParticleQty;
150 uint32 m_propSurfaceIds[MAX_CAMERA_PROPS];
151 int32 m_propSurfaces[MAX_PROP_STATES];
152 int32 m_propResolutions[MAX_CAMERA_PROPS];
153 int32 m_TotalPropSurfaces;
156 inline rlp_API *_set::GetPRig() {
return (
rlp_API *)(((uint8 *)m_currentCamera) + FROM_LE_32(m_currentCamera->lightOffset)); }
158 inline pcStaticLayers *_set::GetStaticLayers() {
return (
pcStaticLayers *)(((uint8 *)m_currentCamera) + FROM_LE_32(m_currentCamera->layerOffset)); }
161 if (m_currentCamera->id == PCSETFILE_ID_ICB) {
164 temp.SetSchema(PCINTERACTIBLE_SCHEMA);
165 temp.SetId(PCINTERACTIBLE_ID);
169 return (
pcInteractibleFile *)(((uint8 *)m_currentCamera) + FROM_LE_32(m_currentCamera->interactiblesOffset));
172 inline pcPropFile *_set::GetProps() {
return m_props; }
174 inline uint8 *_set::GetBackground() {
return (uint8 *)(((uint8 *)m_currentCamera) + FROM_LE_32(m_currentCamera->backgroundOffset)); }
176 inline PXcamera &_set::GetCamera() {
return m_camera; }
178 inline uint32 _set::GetPropQty() {
181 return propFile->GetPropQty();
184 inline const char *_set::GetPropName(uint32 n) {
188 return propFile->GetProp(n)->GetName();
191 inline uint32 _set::GetPropRange(uint32 n) {
195 return propFile->GetProp(n)->GetStateQty();
Definition: pc_props.h:86
Definition: rlp_api.h:185
Definition: pc_props.h:295
Definition: px_staticlayers.h:43
Definition: px_camera.h:39