MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / EvaluateFireProcedural

Function EvaluateFireProcedural

Descent3/procedurals.cpp:1248–1346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1246 procedural->memory_type = PROC_MEMORY_TYPE_FIRE;
1247}
1248void EvaluateFireProcedural(int handle) {
1249 proc_struct *procedural = GameTextures[handle].procedural;
1250
1251 int dest_bitmap = procedural->procedural_bitmap;
1252 if (procedural->memory_type != PROC_MEMORY_TYPE_FIRE) {
1253 AllocateMemoryForFireProcedural(handle);
1254 }
1255 ProcDestData = (uint8_t *)procedural->proc1;
1256 // fade and the current texture
1257 FadeProcTexture(handle);
1258 // HeatProcTexture (handle);
1259 // Do the static procedurals first
1260 int i;
1261 for (i = 0; i < procedural->num_static_elements; i++) {
1262 static_proc_element *proc = &procedural->static_proc_elements[i];
1263 switch (proc->type) {
1264 case PROC_LINE_LIGHTNING:
1265 AddProcLightning(proc->x1, proc->y1, proc->x2, proc->y2, BRIGHT_COLOR, proc);
1266 break;
1267 case PROC_SPHERE_LIGHTNING:
1268 AddProcSphereLightning(handle, proc);
1269 break;
1270 case PROC_RISING_EMBER:
1271 AddProcRisingEmber(handle, proc);
1272 break;
1273 case PROC_RANDOM_EMBERS:
1274 AddProcRandomEmber(handle, proc);
1275 break;
1276 case PROC_SPINNERS:
1277 AddProcSpinners(handle, proc);
1278 break;
1279 case PROC_ROAMERS:
1280 AddProcRoamers(handle, proc);
1281 break;
1282 case PROC_FOUNTAIN:
1283 AddProcFountain(handle, proc);
1284 break;
1285 case PROC_CONE:
1286 AddProcCone(handle, proc);
1287 break;
1288 case PROC_FALL_RIGHT:
1289 AddProcFallRight(handle, proc);
1290 break;
1291 case PROC_FALL_LEFT:
1292 AddProcFallLeft(handle, proc);
1293 break;
1294 default:
1295 break;
1296 }
1297 }
1298 int proc_num = procedural->dynamic_proc_elements;
1299 while (proc_num != -1) {
1300 dynamic_proc_element *proc = &DynamicProcElements[proc_num];
1301
1302 switch (proc->type) {
1303 case PROC_RISING_EMBER:
1304 DoDynamicRisingEmber(handle, proc);
1305 break;

Callers 1

EvaluateProceduralFunction · 0.85

Calls 15

FadeProcTextureFunction · 0.85
AddProcLightningFunction · 0.85
AddProcSphereLightningFunction · 0.85
AddProcRisingEmberFunction · 0.85
AddProcRandomEmberFunction · 0.85
AddProcSpinnersFunction · 0.85
AddProcRoamersFunction · 0.85
AddProcFountainFunction · 0.85
AddProcConeFunction · 0.85
AddProcFallRightFunction · 0.85
AddProcFallLeftFunction · 0.85

Tested by

no test coverage detected