Elin Decompiled Documentation EA 23.102 Nightly
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
TileMapElona.cs
Go to the documentation of this file.
1using CreativeSpore.SuperTilemapEditor;
2using UnityEngine;
3
5{
7
8 public override void Draw()
9 {
10 Zone zone = EMono._zone;
14 map = zone.map;
15 Size = map.Size;
17 isMining = EMono.scene.actionMode == ActionMode.Mine;
19 count = 0;
20 totalFire = 0;
21 pcX = EMono.pc.pos.x;
22 pcZ = EMono.pc.pos.z;
23 float num = lightSetting.nightRatioCurve.Evaluate(EMono.scene.timeRatio);
24 modSublight1 = profile.global.modSublight1 * num;
25 modSublight2 = profile.global.modSublight2 * num;
26 pcMaxLight = EMono.player.lightPower * profile.global.fovModNonGradient * 0.8f;
28 subtleHighlightArea = EMono.scene.actionMode.AreaHihlight == AreaHighlightMode.Build || EMono.scene.actionMode.AreaHihlight != AreaHighlightMode.Edit;
29 highlightArea = EMono.scene.actionMode.AreaHihlight == AreaHighlightMode.Edit || subtleHighlightArea;
31 _lightMod = lightSetting.lightMod * lightSetting.lightModCurve.Evaluate(EMono.scene.timeRatio);
32 _baseBrightness = lightSetting.baseBrightness * lightSetting.baseBrightnessCurve.Evaluate(EMono.scene.timeRatio);
33 Fov.nonGradientMod = profile.global.fovModNonGradient;
40 lowObj = false;
42 {
43 lowBlock = (hideRoomFog = (showFullWall = (hideHang = false)));
44 showRoof = true;
45 }
46 else if (buildMode)
47 {
51 hideRoomFog = true;
53 }
54 else if (ActionMode.IsAdv)
55 {
57 {
58 if (!EMono.pc.IsMoving)
59 {
60 lowblockTimer = 0.1f;
61 }
62 }
63 else
64 {
65 lowblockTimer = 0f;
66 }
68 hideRoomFog = currentRoom != null && currentRoom.lot.idRoofStyle != 0;
69 x = EMono.pc.pos.x;
70 z = EMono.pc.pos.z;
74 EMono.game.config.showRoof = !hideRoomFog;
75 }
76 else
77 {
78 lowBlock = (hideRoomFog = (showFullWall = (hideHang = false)));
79 showRoof = true;
80 }
81 if (map.config.indoor)
82 {
83 showRoof = false;
84 }
85 int num2 = TilemapUtils.GetMouseGridX(elomap.fogmap, EMono.scene.cam) - elomap.minX;
86 int num3 = TilemapUtils.GetMouseGridY(elomap.fogmap, EMono.scene.cam) - elomap.minY;
87 WidgetDebug.output = num2 + "/" + num3 + "\n";
88 base.HitPoint.Set(num2, num3);
89 base.HitPoint.Clamp();
90 for (z = 0; z < screen.height; z++)
91 {
92 for (x = 0; x < screen.width; x++)
93 {
94 cx = screen.scrollX + x;
95 cz = screen.scrollY + z;
96 if (cx >= 0 && cz >= 0 && cx < Size && cz < Size)
97 {
98 DrawTile();
99 }
100 }
101 }
102 EMono.scene.sfxFire.SetVolume(Mathf.Clamp(0.1f * (float)totalFire + ((totalFire != 0) ? 0.2f : 0f), 0f, 1f));
103 int valueOrDefault = (currentRoom?.lot?.idBGM).GetValueOrDefault();
104 if ((valueOrDefault != 0 && (EMono.Sound.currentPlaylist != EMono.Sound.plLot || EMono.Sound.plLot.list[0].data.id != valueOrDefault)) || (valueOrDefault == 0 && EMono.Sound.currentPlaylist == EMono.Sound.plLot))
105 {
107 }
108 if (currentRoom != lastRoom)
109 {
112 }
113 }
114
115 public override void DrawTile()
116 {
117 count++;
118 index = cx + cz * Size;
119 cell = (param.cell = map.cells[cx, cz]);
122 roof = cell.HasRoof;
127 light = (int)cell.light;
128 float num = Fov.DistanceFloat(cx, cz, pcX, pcZ);
129 if (num < 4f)
130 {
131 num = 4f;
132 }
133 if (light < pcMaxLight && num < (float)(EMono.player.lightRadius - 1))
134 {
135 float num2 = (light + pcMaxLight) / 2f * modSublight1 / num;
136 if (num2 > light)
137 {
138 light = num2;
139 }
140 }
142 liquidLv = (param.liquidLv = ((cell.liquidLv + cell._bridge != 0) ? cell.sourceBridge.tileType.LiquidLV : sourceFloor.tileType.LiquidLV) * 10);
143 if (liquidLv > 99)
144 {
145 liquidLv = (param.liquidLv = 99);
146 }
148 hasBridge = cell._bridge != 0;
149 if (cell.room != null)
150 {
151 cell.room.lot.sync = true;
152 }
154 CellEffect effect = cell.effect;
155 if (effect != null && effect.FireAmount > 0)
156 {
157 blockLight += 0.2f;
158 totalFire++;
159 }
161 {
163 }
164 blockLight -= 0.025f * (float)(int)cell.shadowMod * _heightMod.x;
165 param.color = (blockLight = (int)(blockLight * 50f) * 262144 + ((cell.lightR >= 64) ? 63 : cell.lightR) * 4096 + ((cell.lightG >= 64) ? 63 : cell.lightG) * 64 + ((cell.lightB >= 64) ? 63 : cell.lightB));
166 param.x = (float)cx * screen.tileAlign.x;
167 param.y = (float)cz * screen.tileAlign.y + (float)height * _heightMod.y;
168 param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)height * _heightMod.z;
169 if (detail != null)
170 {
171 TransAnime anime = detail.anime;
172 if (anime != null && anime.animeBlock)
173 {
174 TransAnime anime2 = detail.anime;
175 param.x += anime2.v.x;
176 param.y += anime2.v.y;
177 param.z += anime2.v.z;
178 }
179 if (detail.designation != null)
180 {
182 }
183 }
184 if (cell.isSlopeEdge)
185 {
186 float num3 = (float)height * _heightMod.y;
187 orgY = param.y;
188 orgZ = param.z;
191 {
192 param.matColor = 0f;
193 param.color = 262144 * (int)((_baseBrightness + fogBrightness) * 50f);
194 param.tile = 0f;
195 for (int i = 0; (float)i < num3 / heightBlockSize; i++)
196 {
197 param.y += ugFix.y;
198 param.z += ugFix.z + slopeFixZ * (float)i;
200 }
201 }
202 else
203 {
204 SourceBlock.Row defBlock;
205 if (sourceBlock.tileType.IsFullBlock)
206 {
207 defBlock = sourceBlock;
208 param.mat = matBlock;
209 param.tile = sourceBlock._tiles[cell.blockDir % sourceBlock._tiles.Length];
210 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
211 }
212 else
213 {
214 defBlock = sourceFloor._defBlock;
215 param.mat = matFloor;
216 param.tile = defBlock._tiles[cell.blockDir % defBlock._tiles.Length];
217 if (defBlock.id != 1)
218 {
219 param.matColor = ((sourceFloor.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
220 }
221 else
222 {
223 param.matColor = 104025f;
224 }
225 }
226 for (int j = 0; (float)j < num3 / heightBlockSize; j++)
227 {
228 param.y += ugFix.y;
229 param.z += ugFix.z + slopeFixZ * (float)j;
230 defBlock.renderData.Draw(param);
231 }
232 }
233 param.y = orgY;
234 param.z = orgZ;
235 }
236 if (sourceBlock.id != 0)
237 {
238 base.tileType = sourceBlock.tileType;
239 room = cell.room;
240 _lowblock = (showFullWall ? (room != null) : lowBlock);
241 if (base.tileType.RepeatBlock)
242 {
243 room = room ?? cell.Front.room ?? cell.Right.room ?? cell.FrontRight.room;
244 if (room != null)
245 {
246 roomHeight = ((_lowblock && !base.tileType.ForceRpeatBlock) ? 0f : room.lot.realHeight);
247 maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)room.lot.mh * _heightMod.y;
248 }
249 else
250 {
251 roomHeight = 0f;
252 }
253 }
254 else
255 {
256 roomHeight = 0f;
257 }
258 param.mat = matBlock;
259 param.dir = cell.blockDir;
260 switch (base.tileType.blockRenderMode)
261 {
262 case BlockRenderMode.FullBlock:
263 if (cell.isSurrounded)
264 {
265 switch (innerMode)
266 {
267 case InnerMode.InnerBlock:
268 case InnerMode.BuildMode:
269 param.matColor = 104025f;
270 param.color = 262144 * (int)((_baseBrightness + fogBrightness) * 50f);
271 param.tile = (_lowblock ? 3000000 : 0);
273 return;
274 case InnerMode.None:
275 case InnerMode.Height:
276 param.color = blockLight;
277 break;
278 }
279 }
280 param.tile = sourceBlock._tiles[cell.blockDir % sourceBlock._tiles.Length] + (_lowblock ? 3000000 : 0);
281 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
282 if (roomHeight == 0f)
283 {
284 if (!cell.hasDoor)
285 {
286 sourceBlock.renderData.Draw(param);
287 }
288 }
289 else
290 {
291 sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock, cell.hasDoor, cell.effect?.FireAmount ?? 0);
292 }
293 break;
294 case BlockRenderMode.WallOrFence:
295 {
296 orgY = param.y;
297 orgZ = param.z;
298 int blockDir = cell.blockDir;
299 if (blockDir == 0 || blockDir == 2)
300 {
301 param.dir = 0;
302 if (blockDir == 2 && cell.Left.sourceBlock.tileType.IsWallOrFence)
303 {
304 Cell left = cell.Left;
305 _sourceBlock = left.sourceBlock;
306 if (_sourceBlock.useAltColor)
307 {
308 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
309 }
310 else
311 {
312 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
313 }
314 }
315 else
316 {
318 if (_sourceBlock.useAltColor)
319 {
320 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
321 }
322 else
323 {
324 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
325 }
326 }
327 param.tile = (tile = _sourceBlock._tiles[0] + (_lowblock ? 1000000 : 0));
328 if (roomHeight == 0f || !base.tileType.RepeatBlock)
329 {
330 if (!cell.hasDoor)
331 {
332 _sourceBlock.renderData.Draw(param);
333 }
334 }
335 else
336 {
337 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, cell.hasDoor, cell.effect?.FireAmount ?? 0);
338 }
339 param.z -= 0.01f;
340 if (blockDir == 2 || (cell.Front.HasWallOrFence && cell.Front.blockDir != 0))
341 {
342 param.tile = tile + 16;
343 if (roomHeight == 0f || !base.tileType.RepeatBlock)
344 {
345 _sourceBlock.renderData.Draw(param);
346 }
347 else
348 {
349 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
350 }
351 }
353 {
354 orgX = param.x;
355 param.tile = tile + 16;
356 param.x += cornerWallFix.x;
357 param.y += cornerWallFix.y;
358 param.z += cornerWallFix.z;
359 if (roomHeight == 0f || !base.tileType.RepeatBlock)
360 {
361 _sourceBlock.renderData.Draw(param);
362 }
363 else
364 {
365 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix);
366 }
367 param.x = orgX;
368 }
369 }
370 if (blockDir == 1 || blockDir == 2)
371 {
372 param.y = orgY;
373 param.z = orgZ;
374 param.dir = 1;
375 if (blockDir == 2 && cell.Back.sourceBlock.tileType.IsWallOrFence)
376 {
377 Cell back = cell.Back;
378 _sourceBlock = back.sourceBlock;
379 if (_sourceBlock.useAltColor)
380 {
381 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
382 }
383 else
384 {
385 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
386 }
387 }
388 else
389 {
391 if (_sourceBlock.useAltColor)
392 {
393 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
394 }
395 else
396 {
397 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
398 }
399 }
400 param.tile = (tile = -_sourceBlock._tiles[0] + (_lowblock ? (-1000000) : 0));
401 if (roomHeight == 0f || !base.tileType.RepeatBlock)
402 {
403 if (!cell.hasDoor)
404 {
405 _sourceBlock.renderData.Draw(param);
406 }
407 }
408 else
409 {
410 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, cell.hasDoor, cell.effect?.FireAmount ?? 0);
411 }
413 {
414 orgX = param.x;
415 param.tile = -tile + 16;
416 if (roomHeight == 0f || !base.tileType.RepeatBlock)
417 {
418 _sourceBlock.renderData.Draw(param);
419 }
420 else
421 {
422 _sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
423 }
424 param.x = orgX;
425 }
426 }
427 if (cell.room != null && !hideRoomFog && !cell.hasDoor)
428 {
429 return;
430 }
431 param.y = orgY;
432 param.z = orgZ;
433 break;
434 }
435 case BlockRenderMode.HalfBlock:
436 _sourceBlock = ((sourceBlock.id == 5) ? EMono.sources.blocks.rows[matBlock.defBlock] : sourceBlock);
437 param.tile = _sourceBlock._tiles[0];
438 param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref matBlock.matColor, _sourceBlock.colorMod));
439 param.tile2 = _sourceBlock.sourceAutoFloor._tiles[0];
440 param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref matBlock.matColor, _sourceBlock.sourceAutoFloor.colorMod));
441 sourceBlock.renderData.Draw(param);
442 break;
443 case BlockRenderMode.Pillar:
444 {
445 RenderData renderData = sourceBlock.renderData;
446 param.tile = sourceBlock._tiles[cell.blockDir % sourceBlock._tiles.Length];
447 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
448 int num4 = cell.objDir * 2 + 1;
449 if (num4 == 0)
450 {
451 renderData.Draw(param);
452 }
453 else
454 {
455 renderData.DrawRepeat(param, num4, sourceBlock.tileType.RepeatSize);
456 }
457 param.tile = renderData.idShadow;
458 SourcePref shadowPref = renderData.shadowPref;
459 int shadow = shadowPref.shadow;
460 passShadow.AddShadow(param.x + renderData.offsetShadow.x, param.y + renderData.offsetShadow.y, param.z + renderData.offsetShadow.z, ShadowData.Instance.items[shadow], shadowPref);
461 break;
462 }
463 default:
464 param.tile = sourceBlock._tiles[cell.blockDir % sourceBlock._tiles.Length] + ((_lowblock && base.tileType.UseLowWallTiles) ? 3000000 : 0);
465 param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
466 if (roomHeight == 0f)
467 {
468 sourceBlock.renderData.Draw(param);
469 }
470 else
471 {
472 sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock);
473 }
474 break;
475 }
476 }
477 if (cell.effect != null)
478 {
479 if (cell.effect.IsLiquid)
480 {
482 SourceMaterial.Row defaultMaterial = sourceEffect.DefaultMaterial;
483 tile = 4 + Rand.bytes[index % Rand.MaxBytes] % 4;
484 param.tile = tile + cell.sourceEffect._tiles[0];
485 param.mat = defaultMaterial;
486 param.matColor = BaseTileMap.GetColorInt(ref defaultMaterial.matColor, sourceEffect.colorMod);
487 sourceEffect.renderData.Draw(param);
488 }
489 else
490 {
491 param.tile = cell.effect.source._tiles[0];
492 if (cell.effect.IsFire)
493 {
495 }
496 else
497 {
498 cell.effect.source.renderData.Draw(param);
499 }
500 }
501 }
502 if (detail != null)
503 {
504 TransAnime anime3 = detail.anime;
505 if (anime3 != null && !anime3.animeBlock)
506 {
507 TransAnime anime4 = detail.anime;
508 param.x += anime4.v.x;
509 param.y += anime4.v.y;
510 param.z += anime4.v.z;
511 }
512 }
513 if (cell.obj != 0)
514 {
515 SourceObj.Row sourceObj = cell.sourceObj;
516 param.mat = cell.matObj;
517 if (sourceObj.useAltColor)
518 {
519 param.matColor = ((sourceObj.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref param.mat.altColor, sourceObj.colorMod));
520 }
521 else
522 {
523 param.matColor = ((sourceObj.colorMod == 0) ? 104025 : BaseTileMap.GetColorInt(ref param.mat.matColor, sourceObj.colorMod));
524 }
525 if (sourceObj.HasGrowth)
526 {
528 }
529 else
530 {
531 if (sourceObj.tileType.IsUseBlockDir)
532 {
533 param.tile = sourceObj._tiles[cell.blockDir % sourceObj._tiles.Length];
534 }
535 else
536 {
537 param.tile = sourceObj._tiles[cell.objDir % sourceObj._tiles.Length];
538 }
539 if (_lowblock && sourceObj.tileType.IsSkipLowBlock)
540 {
541 param.tile += ((param.tile > 0f) ? 1 : (-1)) * 3000000;
542 }
543 sourceObj.renderData.Draw(param);
544 int shadow2 = sourceObj.pref.shadow;
545 if (shadow2 > 1 && !cell.ignoreObjShadow)
546 {
547 passShadow.AddShadow(param.x + sourceObj.renderData.offsetShadow.x, param.y + sourceObj.renderData.offsetShadow.y, param.z + sourceObj.renderData.offsetShadow.z, ShadowData.Instance.items[shadow2], sourceObj.pref);
548 }
549 }
550 }
551 if (cell.decal != 0)
552 {
554 }
555 if (detail == null)
556 {
557 return;
558 }
559 if (highlightArea && detail.area != null)
560 {
561 passArea.Add(param, (int)detail.area.GetTile(index) - ((!subtleHighlightArea) ? 1 : 0), 0f);
562 }
563 if (detail.footmark != null && sourceFloor.id != 0)
564 {
565 param.tile = detail.footmark.tile;
566 param.mat = matFloor;
567 param.matColor = floorMatColor;
569 }
570 if (detail.things.Count == 0 && detail.charas.Count == 0)
571 {
572 return;
573 }
574 int num5 = 0;
575 thingPos.x = 0f;
576 thingPos.y = 0f;
577 param.y += ((cell._bridge != 0) ? cell.sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
578 orgX = param.x;
579 orgY = param.y;
580 orgZ = param.z;
581 Thing thing = null;
582 bool flag = liquidLv == 0;
583 if (detail.things.Count > 0)
584 {
585 _ = zSetting.max1;
586 for (int k = 0; k < detail.things.Count; k++)
587 {
588 Thing thing2 = detail.things[k];
589 _actorPos.x = orgX;
590 _actorPos.y = orgY;
591 _actorPos.z = orgZ;
592 SourcePref pref = thing2.sourceCard.pref;
594 float num6 = (tileType.UseMountHeight ? 0f : ((pref.height == 0f) ? 0.1f : pref.height));
595 if (tileType.CanStack || !thing2.IsInstalled)
596 {
597 if (thing?.id != thing2.id)
598 {
599 _actorPos.x += thingPos.x;
600 }
601 _actorPos.y += thingPos.y;
602 _actorPos.z += renderSetting.thingZ + (float)k * -0.01f + zSetting.mod1 * thingPos.y;
603 }
604 if (thing2.IsInstalled && tileType.UseMountHeight)
605 {
606 if (hideHang && cell.room == null && thing2.altitude > 3)
607 {
608 continue;
609 }
610 thing2.TileType.GetMountHeight(ref _actorPos, Point.shared.Set(index), thing2.dir, thing2);
611 flag = false;
612 }
613 else
614 {
615 flag = thingPos.y == 0f && liquidLv == 0;
616 }
617 param.liquidLv = ((k == 0) ? liquidLv : 0);
618 thingPos.y += num6;
619 if (!thing2.sourceCard.multisize || (thing2.pos.x == cx && thing2.pos.z == cz))
620 {
621 if (iconMode != 0)
622 {
623 int num7 = 0;
624 switch (iconMode)
625 {
626 case CardIconMode.State:
627 if (thing2.placeState == PlaceState.installed)
628 {
629 num7 = 18;
630 }
631 break;
632 case CardIconMode.Deconstruct:
633 if (thing2.isDeconstructing)
634 {
635 num7 = 14;
636 }
637 break;
638 }
639 if (thing2.isNPCProperty)
640 {
641 num7 = 13;
642 }
643 if (num7 != 0)
644 {
645 passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num7);
646 }
647 }
648 thing2.SetRenderParam(param);
649 thing2.renderer.Draw(param, ref _actorPos, flag);
650 }
651 param.x = orgX;
652 param.y = orgY;
653 param.z = orgZ;
654 thing = thing2;
655 }
656 }
657 if (detail.charas.Count <= 0)
658 {
659 return;
660 }
661 param.shadowFix = 0f;
662 param.color += 1310720f;
663 float max = zSetting.max2;
664 bool flag2 = EMono.pc.fov != null && EMono.pc.fov.lastPoints.ContainsKey(index);
665 for (int l = 0; l < detail.charas.Count; l++)
666 {
667 Chara chara = detail.charas[l];
668 if (chara.host != null || (!flag2 && chara.party?.leader != EMono.pc && !chara.isDead))
669 {
670 continue;
671 }
672 _actorPos.x = orgX;
673 _actorPos.y = orgY;
674 _actorPos.z = orgZ;
675 chara.SetRenderParam(param);
676 _ = chara.IsAliveInCurrentZone;
677 if (chara.IsDeadOrSleeping && chara.IsPCC)
678 {
679 float num8 = chara.renderer.data.size.y * 0.3f;
680 if (thingPos.y > max)
681 {
682 thingPos.y = max;
683 }
684 float num9 = thingPos.y + num8;
685 float num10 = (float)l * -0.01f;
686 if (num9 > zSetting.thresh1)
687 {
688 num10 = zSetting.mod1;
689 }
690 _actorPos.x += thingPos.x;
691 _actorPos.y += thingPos.y;
692 _actorPos.z += renderSetting.laydownZ + num10;
693 param.liquidLv = ((thingPos.y == 0f && liquidLv > 0) ? 90 : 0);
694 thingPos.y += num8 * 0.8f;
695 chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
696 }
697 else
698 {
699 param.liquidLv = liquidLv;
700 _actorPos.z += 0.01f * (float)l + renderSetting.charaZ;
701 num5++;
702 chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
703 }
704 param.x = orgX;
705 param.y = orgY;
706 param.z = orgZ;
707 }
708 }
709}
AreaHighlightMode
BlockRenderMode
PlaceState
Definition: PlaceState.cs:2
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
bool ForceInnerBlockMode()
Definition: AM_Select.cs:8
static AM_Select Select
Definition: ActionMode.cs:59
static bool IsAdv
Definition: ActionMode.cs:117
virtual BaseTileMap.CardIconMode cardIconMode
Definition: ActionMode.cs:229
bool IsActive
Definition: ActionMode.cs:121
virtual bool IsBuildMode
Definition: ActionMode.cs:181
static AM_Bird Bird
Definition: ActionMode.cs:31
static AM_Mine Mine
Definition: ActionMode.cs:33
virtual byte GetTile(int index)
Definition: Area.cs:75
Vector3 tileWeight
virtual void RefreshWeather()
MeshPass passArea
Definition: BaseTileMap.cs:141
Vector3 cornerWallFix
Definition: BaseTileMap.cs:96
float maxHeight
Definition: BaseTileMap.cs:396
int floorMatColor
Definition: BaseTileMap.cs:438
RenderData rendererInnerBlock
Definition: BaseTileMap.cs:203
float blockLight
Definition: BaseTileMap.cs:378
bool highlightArea
Definition: BaseTileMap.cs:275
float slopeFixZ
Definition: BaseTileMap.cs:50
InnerMode defaultInnerMode
Definition: BaseTileMap.cs:90
InnerMode innerMode
Definition: BaseTileMap.cs:233
float modSublight2
Definition: BaseTileMap.cs:410
MeshPass passGuideBlock
Definition: BaseTileMap.cs:137
MeshPass passShadow
Definition: BaseTileMap.cs:133
bool hideRoomFog
Definition: BaseTileMap.cs:281
static int GetColorInt(ref Color matColor, int p)
float _lightMod
Definition: BaseTileMap.cs:305
float[] lightLookUp
Definition: BaseTileMap.cs:302
TileType tileType
Definition: BaseTileMap.cs:494
float lightLimit
Definition: BaseTileMap.cs:406
float modSublight1
Definition: BaseTileMap.cs:408
bool showFullWall
Definition: BaseTileMap.cs:287
SceneLightProfile lightSetting
Definition: BaseTileMap.cs:496
RenderParam param
Definition: BaseTileMap.cs:428
Vector3 ugFix
Definition: BaseTileMap.cs:58
new BaseGameScreen screen
Definition: BaseTileMap.cs:348
bool usingHouseBoard
Definition: BaseTileMap.cs:293
Vector3 thingPos
Definition: BaseTileMap.cs:470
MeshPass passDecal
Definition: BaseTileMap.cs:157
float _baseBrightness
Definition: BaseTileMap.cs:308
void RefreshHeight()
Definition: BaseTileMap.cs:888
Room currentRoom
Definition: BaseTileMap.cs:484
Vector3 _actorPos
Definition: BaseTileMap.cs:432
GameSetting.RenderSetting renderSetting
Definition: BaseTileMap.cs:356
Vector3 _heightMod
Definition: BaseTileMap.cs:329
float pcMaxLight
Definition: BaseTileMap.cs:386
float lowblockTimer
Definition: BaseTileMap.cs:311
float fogBrightness
Definition: BaseTileMap.cs:416
SourceMaterial.Row matBlock
Definition: BaseTileMap.cs:372
RenderDataEffect rendererEffect
Definition: BaseTileMap.cs:229
bool hasBridge
Definition: BaseTileMap.cs:342
SourceBlock.Row _sourceBlock
Definition: BaseTileMap.cs:492
float heightBlockSize
Definition: BaseTileMap.cs:48
bool buildMode
Definition: BaseTileMap.cs:340
RenderData renderFootmark
Definition: BaseTileMap.cs:197
bool subtleHighlightArea
Definition: BaseTileMap.cs:278
SourceMaterial.Row matFloor
Definition: BaseTileMap.cs:374
CellDetail detail
Definition: BaseTileMap.cs:476
SourceBlock.Row sourceBlock
Definition: BaseTileMap.cs:478
float roomHeight
Definition: BaseTileMap.cs:394
GameSetting.RenderSetting.ZSetting zSetting
Definition: BaseTileMap.cs:358
float shadowStrength
Definition: BaseTileMap.cs:412
bool _lowblock
Definition: BaseTileMap.cs:344
SourceFloor.Row sourceFloor
Definition: BaseTileMap.cs:480
CardIconMode iconMode
Definition: BaseTileMap.cs:336
int currentHeight
Definition: BaseTileMap.cs:442
override void Draw(RenderParam p)
Definition: CardRenderer.cs:49
string id
Definition: Card.cs:31
bool isNPCProperty
Definition: Card.cs:526
Fov fov
Definition: Card.cs:53
PlaceState placeState
Definition: Card.cs:79
TileType TileType
Definition: Card.cs:2011
Point pos
Definition: Card.cs:55
Trait trait
Definition: Card.cs:49
int altitude
Definition: Card.cs:214
bool isDeconstructing
Definition: Card.cs:418
bool IsInstalled
Definition: Card.cs:2241
int dir
Definition: Card.cs:142
CardRenderer renderer
Definition: Card.cs:57
TaskDesignation designation
Definition: CellDetail.cs:19
List< Thing > things
Definition: CellDetail.cs:11
TransAnime anime
Definition: CellDetail.cs:21
List< Chara > charas
Definition: CellDetail.cs:13
Area area
Definition: CellDetail.cs:15
Footmark footmark
Definition: CellDetail.cs:17
int FireAmount
Definition: CellEffect.cs:150
bool IsFire
Definition: CellEffect.cs:135
bool IsLiquid
Definition: CellEffect.cs:138
SourceCellEffect.Row source
Definition: CellEffect.cs:133
Definition: Cell.cs:7
Room room
Definition: Cell.cs:102
byte TopHeight
Definition: Cell.cs:117
bool HasWallOrFence
Definition: Cell.cs:831
SourceBlock.Row sourceBlock
Definition: Cell.cs:1052
SourceMaterial.Row matBlock
Definition: Cell.cs:1030
SourceFloor.Row sourceFloor
Definition: Cell.cs:1054
CellEffect effect
Definition: Cell.cs:94
Cell Back
Definition: Cell.cs:153
byte decal
Definition: Cell.cs:44
Cell Front
Definition: Cell.cs:129
SourceMaterial.Row matObj
Definition: Cell.cs:1036
bool UseLowBlock
Definition: Cell.cs:861
ushort lightG
Definition: Cell.cs:88
byte light
Definition: Cell.cs:60
byte height
Definition: Cell.cs:72
GrowSystem growth
Definition: Cell.cs:225
ushort lightB
Definition: Cell.cs:90
SourceFloor.Row sourceBridge
Definition: Cell.cs:1056
CellDetail detail
Definition: Cell.cs:92
bool isShadowed
Definition: Cell.cs:246
bool HasRoof
Definition: Cell.cs:648
Cell Left
Definition: Cell.cs:165
SourceMaterial.Row matFloor
Definition: Cell.cs:1032
bool isSeen
Definition: Cell.cs:282
byte obj
Definition: Cell.cs:38
bool isSlopeEdge
Definition: Cell.cs:354
SourceObj.Row sourceObj
Definition: Cell.cs:1072
SourceCellEffect.Row sourceEffect
Definition: Cell.cs:1070
bool isSurrounded
Definition: Cell.cs:234
Cell Right
Definition: Cell.cs:141
bool ignoreObjShadow
Definition: Cell.cs:378
bool hasDoor
Definition: Cell.cs:258
int blockDir
Definition: Cell.cs:898
Cell FrontRight
Definition: Cell.cs:177
ushort lightR
Definition: Cell.cs:86
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:546
Chara host
Definition: Chara.cs:33
Party party
Definition: Chara.cs:43
override bool IsDeadOrSleeping
Definition: Chara.cs:558
override bool IsMoving
Definition: Chara.cs:593
override void SetRenderParam(RenderParam p)
Definition: Chara.cs:6082
bool isDead
Definition: Chara.cs:374
override bool IsPCC
Definition: Chara.cs:667
Definition: EMono.cs:4
static Chara pc
Definition: EMono.cs:13
static Zone _zone
Definition: EMono.cs:19
static Game game
Definition: EMono.cs:7
static Scene scene
Definition: EMono.cs:27
static SoundManager Sound
Definition: EMono.cs:39
static SourceManager sources
Definition: EMono.cs:41
EloMap elomap
Definition: EloMapActor.cs:7
Definition: EloMap.cs:8
int minX
Definition: EloMap.cs:112
STETilemap fogmap
Definition: EloMap.cs:96
int minY
Definition: EloMap.cs:114
int tile
Definition: Footmark.cs:7
Definition: Fov.cs:6
static float DistanceFloat(int x1, int y1, int x2, int y2)
Definition: Fov.cs:129
Dictionary< int, byte > lastPoints
Definition: Fov.cs:36
bool showRoof
Definition: Game.cs:12
bool showWall
Definition: Game.cs:15
bool noRoof
Definition: Game.cs:27
Config config
Definition: Game.cs:215
virtual void OnRenderTileMap(RenderParam p)
Definition: GrowSystem.cs:189
int mh
Definition: Lot.cs:58
float realHeight
Definition: Lot.cs:64
int idBGM
Definition: Lot.cs:16
int Size
Definition: MapBounds.cs:20
bool indoor
Definition: MapConfig.cs:29
int SizeXZ
Definition: Map.cs:133
RoomManager rooms
Definition: Map.cs:31
Cell[,] cells
Definition: Map.cs:85
MapConfig config
Definition: Map.cs:37
void Add(Point point, float tile=0f, float color=0f)
Definition: MeshPass.cs:122
void AddShadow(MeshPassParam p, ref Vector3 fix)
Definition: MeshPass.cs:195
Chara leader
Definition: Party.cs:30
Definition: Point.cs:9
static Point shared
Definition: Point.cs:20
Point Set(int _x, int _z)
Definition: Point.cs:479
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
Cell cell
Definition: Point.cs:51
Definition: Rand.cs:4
static int MaxBytes
Definition: Rand.cs:5
static byte[] bytes
Definition: Rand.cs:9
new void Draw(RenderParam p, int tile=0)
void Draw(RenderParam p, int tile)
Definition: RenderData.cs:128
Vector3 offsetShadow
Definition: RenderData.cs:22
void DrawRepeat(RenderParam p, int count, float size, bool skipFirst=false)
Definition: RenderData.cs:214
SourcePref shadowPref
Definition: RenderData.cs:48
int idShadow
Definition: RenderData.cs:14
SourceMaterial.Row mat
Definition: RenderParam.cs:17
bool multisize
Definition: RenderRow.cs:64
RenderData renderData
Definition: RenderRow.cs:71
SourcePref pref
Definition: RenderRow.cs:68
bool useAltColor
Definition: RenderRow.cs:80
TileType tileType
Definition: RenderRow.cs:77
int[] _tiles
Definition: RenderRow.cs:12
SourceMaterial.Row DefaultMaterial
Definition: RenderRow.cs:86
int colorMod
Definition: RenderRow.cs:16
void Refresh()
Definition: RoomManager.cs:52
Lot lot
Definition: Room.cs:21
AnimationCurve baseBrightnessCurve
AnimationCurve lightLimit
AnimationCurve shadowCurve
AnimationCurve nightRatioCurve
AnimationCurve lightModCurve
SceneGlobalProfile global
Definition: SceneProfile.cs:6
SceneLightProfile light
Definition: SceneProfile.cs:10
float timeRatio
Definition: Scene.cs:124
CameraSupport camSupport
Definition: Scene.cs:41
SoundSource sfxFire
Definition: Scene.cs:85
EloMapActor elomapActor
Definition: Scene.cs:97
ActionMode actionMode
Definition: Scene.cs:77
Camera cam
Definition: Scene.cs:37
SceneProfile profile
Definition: Scene.cs:73
List< Item > items
Definition: ShadowData.cs:101
static ShadowData Instance
Definition: ShadowData.cs:99
SourceBlock blocks
bool HasGrowth
Definition: SourceObj.cs:26
float height
Definition: SourcePref.cs:47
int shadow
Definition: SourcePref.cs:35
virtual void Draw(int x, int z, RenderParam p)
Definition: Thing.cs:8
override void SetRenderParam(RenderParam p)
Definition: Thing.cs:1401
override CardRow sourceCard
Definition: Thing.cs:47
override void Draw()
Definition: TileMapElona.cs:8
EloMap elomap
Definition: TileMapElona.cs:6
override void DrawTile()
int id
Definition: TileRow.cs:8
virtual bool IsUseBlockDir
Definition: TileType.cs:129
virtual bool CanStack
Definition: TileType.cs:121
virtual void GetMountHeight(ref Vector3 v, Point p, int d, Card target=null)
Definition: TileType.cs:367
virtual bool IsSkipLowBlock
Definition: TileType.cs:125
virtual bool UseMountHeight
Definition: TileType.cs:209
virtual TileType tileType
Definition: Trait.cs:48
Vector3 v
Definition: TransAnime.cs:5
bool animeBlock
Definition: TransAnime.cs:21
Definition: Zone.cs:12
void RefreshBGM()
Definition: Zone.cs:2742
Map map
Definition: Zone.cs:60