Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
BaseGameScreen Class Reference
Inheritance diagram for BaseGameScreen:
EMono GameScreen GameScreenElona GameScreenNoMap

Classes

class  FocusOption
 

Public Member Functions

void Activate ()
 
virtual void OnActivate ()
 
void Deactivate ()
 
virtual void OnDeactivate ()
 
virtual void SetUnitSize ()
 
virtual void OnEndPlayerTurn ()
 
void Draw ()
 
void UpdateShaders (float time=0f)
 
virtual void OnChangeHour ()
 
virtual void RefreshPosition ()
 
void RefreshAll ()
 
void RefreshScreenSize ()
 
Point GetRandomPoint ()
 
void RefreshSky ()
 
virtual void RefreshWeather ()
 
void RefreshGrading ()
 
void RefreshTilt ()
 
void ScrollMouse (float x, float y)
 
void ScrollAxis (Vector3 axis, bool direct=false)
 
void Focus (Int3 ints)
 
void Focus (int x, int y)
 
void Focus (Card c)
 
void FocusCenter ()
 
void Focus (Point pos)
 
void FocusPC ()
 
void FocusImmediate (Point pos)
 
void SnapScreen (ref Vector3 v, float zoom)
 
void SetZoom (float z)
 
void SetTargetZoomIndex (int index)
 
void ModTargetZoomIndex (int a)
 

Public Attributes

float SharpenAmount
 
float camSpeed2
 
float heightLight
 
float pushbackSpeed
 
Vector2 snapSize
 
Vector2 tileSize
 
Vector2 tileAlign
 
Vector2 tileWorldSize
 
Vector2 tileViewSize
 
Vector3 tileWeight
 
Vector3 focusFix
 
Vector3 tileOffsetHeight
 
Vector3 tileWeightHeight
 
Vector3 planeAngle
 
Vector3 planeSpeed
 
Vector2 paddings
 
Vector2 paddingOffset
 
Vector3 lastPos
 
Rect mapLimit
 
float Zoom
 
float nextMove
 
float focusSpeed
 
float focusSpeedSlow
 
float focusSpeedSlow2
 
int width
 
int height
 
int scrollX
 
int scrollY
 
int moonLevel
 
BaseTileMap tileMap
 
BaseTileSelector tileSelector
 
ScreenGuide guide
 
Grid grid
 
MeshRenderer overlayShadow
 
PCOrbit pcOrbit
 
float forcePrecision
 
bool isCameraMoving
 
FocusOption focusOption
 
Vector3? focusPos
 
Vector3 position
 
float screenFixX
 
float screenFixX2
 
float screenFixX3
 
float screenFixX4
 
float screenFixY
 
float screenFixY2
 
float screenFixY3
 
float screenFixY4
 
bool instantFocus
 
int targetZoomIndex
 
float targetZoom = 0.5f
 
float zoomTimer
 
Vector3 zoomPos
 

Protected Attributes

Vector3 camPos
 
Vector3 pushBack
 

Properties

bool fixFocus [get]
 
virtual float TargetZoom [get]
 
CameraSupport camSupport [get]
 
Transform transFocus [get]
 
virtual float SkyRate [get]
 
virtual float ViewHeight [get]
 
virtual bool IsGameScreen [get]
 
virtual bool IsLocalMap [get]
 
- Properties inherited from EMono
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Private Attributes

readonly int _BackDrawPower = Shader.PropertyToID("_BackDrawPower")
 
readonly int _Snow = Shader.PropertyToID("_Snow")
 
readonly int _SkyLevel = Shader.PropertyToID("_SkyLevel")
 
readonly int _NightRate = Shader.PropertyToID("_NightRate")
 
readonly int _ViewHeight = Shader.PropertyToID("_ViewHeight")
 
readonly int _FogStrength = Shader.PropertyToID("_FogStrength")
 
readonly int _FogColor = Shader.PropertyToID("_FogColor")
 
readonly int _FowColor = Shader.PropertyToID("_FowColor")
 
readonly int _SunColor = Shader.PropertyToID("_SunColor")
 
readonly int _SeaColor = Shader.PropertyToID("_SeaColor")
 
readonly int _SkyColor = Shader.PropertyToID("_SkyColor")
 
readonly int _SkyBGColor = Shader.PropertyToID("_SkyBGColor")
 
readonly int _Offset = Shader.PropertyToID("_Offset")
 
readonly int _Zoom = Shader.PropertyToID("_Zoom")
 
readonly int _LightPower = Shader.PropertyToID("_LightPower")
 
readonly int _AnimeSpeedGlobal = Shader.PropertyToID("_AnimeSpeedGlobal")
 
readonly int _ScreenFlash = Shader.PropertyToID("_ScreenFlash")
 
Vector3 _camPos
 
Point _randomPoint = new Point()
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Static Public Attributes inherited from EMono
static Core core
 

Detailed Description

Definition at line 4 of file BaseGameScreen.cs.

Member Function Documentation

◆ Activate()

void BaseGameScreen.Activate ( )
inline

Definition at line 192 of file BaseGameScreen.cs.

193 {
194 if (!(EMono.core.screen == this))
195 {
196 if (EMono.core.screen != null)
197 {
199 }
200 SetUnitSize();
201 EMono.core.screen = this;
202 Point._screen = this;
203 base.gameObject.SetActive(value: true);
204 EMono.scene.flock.SetActive(IsLocalMap);
206 EMono.scene.firefly.SetActive(IsLocalMap);
207 EMono.scene.star.SetActive(IsLocalMap);
208 EMono.scene.sfxRain.SetActive(IsGameScreen);
209 EMono.scene.sfxSea.SetActive(IsGameScreen);
210 EMono.scene.sfxWind.SetActive(IsGameScreen);
211 EMono.scene.sfxFire.SetActive(IsGameScreen);
212 OnActivate();
213 ParticleSystem.MainModule main = EMono.scene.rain.main;
214 ParticleSystem.MainModule main2 = EMono.scene.snow.main;
215 ParticleSystem.MainModule main3 = EMono.scene.ether.main;
216 bool flag2 = (main3.prewarm = true);
217 bool prewarm = (main2.prewarm = flag2);
218 main.prewarm = prewarm;
219 ParticleSystem[] blossoms = EMono.scene.blossoms;
220 for (int i = 0; i < blossoms.Length; i++)
221 {
222 ParticleSystem.MainModule main4 = blossoms[i].main;
223 main4.prewarm = true;
224 }
225 if ((bool)overlayShadow)
226 {
228 overlayShadow.sharedMaterial = EMono.scene.profile.matOverlay;
229 }
230 EMono.scene.camSupport.grading.material = EMono.scene.profile.matGrading;
231 if (IsGameScreen)
232 {
235 RefreshAll();
236 tileMap.OnActivate(this);
238 }
239 else if (EMono.core.config != null)
240 {
242 }
243 }
244 }
virtual void OnActivate()
MeshRenderer overlayShadow
virtual bool IsLocalMap
BaseTileMap tileMap
virtual bool IsGameScreen
virtual void SetUnitSize()
void OnActivate(BaseGameScreen _screen)
Definition: BaseTileMap.cs:510
void RefreshUIBrightness()
Definition: CoreConfig.cs:959
BaseGameScreen screen
Definition: Core.cs:67
CoreConfig config
Definition: Core.cs:70
Definition: EMono.cs:4
static Core core
Definition: EMono.cs:5
static Scene scene
Definition: EMono.cs:27
Material matOverlay
Definition: SceneProfile.cs:14
Material matGrading
Definition: SceneProfile.cs:16
ParticleSystem ether
Definition: Scene.cs:53
SoundSource sfxWind
Definition: Scene.cs:81
ParticleSystem snow
Definition: Scene.cs:51
VFX fireflyNight
Definition: Scene.cs:45
VFX firefly
Definition: Scene.cs:43
SoundSource sfxFire
Definition: Scene.cs:85
VFX star
Definition: Scene.cs:47
void ApplyZoneConfig()
Definition: Scene.cs:811
SceneProfile profile
Definition: Scene.cs:73
SoundSource sfxSea
Definition: Scene.cs:83
void OnChangeHour()
Definition: Scene.cs:764
FlockController flock
Definition: Scene.cs:67
ParticleSystem rain
Definition: Scene.cs:49
SoundSource sfxRain
Definition: Scene.cs:79
ParticleSystem[] blossoms
Definition: Scene.cs:63
static void RefreshHighlights()

References Scene.ApplyZoneConfig(), Scene.blossoms, Core.config, EMono.core, Deactivate(), Scene.ether, Scene.firefly, Scene.fireflyNight, Scene.flock, IsGameScreen, IsLocalMap, SceneProfile.matGrading, SceneProfile.matOverlay, OnActivate(), BaseTileMap.OnActivate(), Scene.OnChangeHour(), overlayShadow, Scene.profile, Scene.rain, RefreshAll(), WidgetHotbar.RefreshHighlights(), CoreConfig.RefreshUIBrightness(), EMono.scene, Core.screen, SetUnitSize(), Scene.sfxFire, Scene.sfxRain, Scene.sfxSea, Scene.sfxWind, Scene.snow, Scene.star, and tileMap.

Referenced by ActionMode.Activate(), Core.Awake(), and Scene.Init().

◆ Deactivate()

void BaseGameScreen.Deactivate ( )
inline

Definition at line 250 of file BaseGameScreen.cs.

251 {
252 OnDeactivate();
253 base.gameObject.SetActive(value: false);
254 EMono.core.screen = null;
255 }
virtual void OnDeactivate()

References OnDeactivate().

Referenced by Activate(), Scene.Init(), and ZoneInspector.RefreshScreen().

◆ Draw()

void BaseGameScreen.Draw ( )
inline

Definition at line 269 of file BaseGameScreen.cs.

270 {
271 if (!IsGameScreen)
272 {
273 return;
274 }
275 if (Zoom != targetZoom)
276 {
277 bool flag = EMono.scene.actionMode == ActionMode.Bird;
279 float num = camera.zoomSpeed * (flag ? 0.05f : (camera.linearZoom ? 2f : 1f)) * Core.delta;
280 zoomTimer += num * 0.3f;
281 float t = ((flag || !camera.linearZoom) ? num : zoomTimer);
282 float num2 = Mathf.Lerp(EMono.screen.Zoom, targetZoom, t);
283 if (Mathf.Abs(num2 - targetZoom) < (flag ? 0.0005f : 0.003f))
284 {
285 num2 = targetZoom;
286 }
287 if (camera.zoomToMouse && zoomPos != Vector3.zero)
288 {
289 position = Vector3.Lerp(position, zoomPos, t);
290 }
292 }
293 RenderObject.gameSpeed = EMono.scene.actionMode.gameSpeed;
294 RenderObject.gameDelta = Core.gameDeltaNoPause;
296 {
297 if (Zoom != targetZoom)
298 {
300 }
301 Vector3 vector = (EMono.pc.isSynced ? EMono.player.position : EMono.pc.pos.Position()) + focusFix;
302 position = vector;
303 scrollX = Mathf.FloorToInt(position.x / tileWorldSize.x) - width / 2 + (int)paddingOffset.x;
304 scrollY = Mathf.FloorToInt(position.y / tileWorldSize.y) - height / 4 + (int)paddingOffset.y;
305 }
306 tileMap.Draw();
307 if (instantFocus)
308 {
309 instantFocus = false;
310 }
312 if (EMono.game.activeZone != null)
313 {
314 for (int num3 = EMono._map.pointAnimes.Count - 1; num3 >= 0; num3--)
315 {
316 if (EMono._map.pointAnimes[num3].Update())
317 {
318 EMono._map.pointAnimes.RemoveAt(num3);
319 }
320 }
321 }
323 if (Scene.skipAnime)
324 {
326 Scene.skipAnime = false;
327 }
329 FlockController flock = EMono.scene.flock;
330 int visible;
331 if (targetZoom <= 1.25f)
332 {
333 Room room = EMono.pc.pos.cell.room;
334 visible = ((room == null || !room.HasRoof) ? 1 : 0);
335 }
336 else
337 {
338 visible = 0;
339 }
340 flock.UpdateVisible((byte)visible != 0);
341 if (EMono.pc.isSynced && (bool)EMono.pc.renderer.orbit)
342 {
344 }
345 }
virtual float gameSpeed
Definition: ActionMode.cs:119
static AM_Bird Bird
Definition: ActionMode.cs:31
Vector2 paddingOffset
Transform transFocus
virtual float TargetZoom
Vector2 tileWorldSize
void UpdateShaders(float time=0f)
virtual void RefreshPosition()
FocusOption focusOption
virtual void Draw()
Definition: BaseTileMap.cs:533
TCOrbit orbit
Definition: CardRenderer.cs:7
Point pos
Definition: Card.cs:55
CardRenderer renderer
Definition: Card.cs:57
Room room
Definition: Cell.cs:102
override bool isSynced
Definition: Chara.cs:676
Zone currentZone
Definition: Chara.cs:240
CameraConfig camera
Definition: CoreConfig.cs:604
void ApplyZoom(float a)
Definition: CoreConfig.cs:922
Definition: Core.cs:14
static float gameDeltaNoPause
Definition: Core.cs:23
static float delta
Definition: Core.cs:17
static Chara pc
Definition: EMono.cs:13
static Zone _zone
Definition: EMono.cs:19
static BaseGameScreen screen
Definition: EMono.cs:29
static Game game
Definition: EMono.cs:7
static Map _map
Definition: EMono.cs:17
void UpdateEffects()
static EffectManager Instance
Zone activeZone
Definition: Game.cs:245
List< TransAnime > pointAnimes
Definition: Map.cs:83
ref Vector3 Position(int height)
Definition: Point.cs:524
Cell cell
Definition: Point.cs:51
Definition: Room.cs:4
bool HasRoof
Definition: Room.cs:29
Definition: Scene.cs:8
static bool skipAnime
Definition: Scene.cs:25
float timeRatio
Definition: Scene.cs:124
ActionMode actionMode
Definition: Scene.cs:77
virtual bool IsRegion
Definition: Spatial.cs:501
virtual void Refresh()
Definition: TCOrbit.cs:3

References EMono._map, EMono._zone, Scene.actionMode, Game.activeZone, CoreConfig.ApplyZoom(), ActionMode.Bird, CoreConfig.camera, Point.cell, Core.config, EMono.core, Chara.currentZone, Core.delta, BaseTileMap.Draw(), fixFocus, Scene.flock, focusFix, focusOption, focusPos, EMono.game, Core.gameDeltaNoPause, ActionMode.gameSpeed, Room.HasRoof, height, EffectManager.Instance, instantFocus, IsGameScreen, Spatial.IsRegion, Chara.isSynced, EffectManager.KillAll(), CoreConfig.CameraConfig.linearZoom, CardRenderer.orbit, paddingOffset, EMono.pc, Map.pointAnimes, Card.pos, position, Point.Position(), TCOrbit.Refresh(), RefreshPosition(), Card.renderer, Cell.room, EMono.scene, EMono.screen, scrollX, scrollY, Scene.skipAnime, CoreConfig.CameraConfig.smoothFollow, targetZoom, TargetZoom, tileMap, tileWorldSize, Scene.timeRatio, transFocus, EffectManager.UpdateEffects(), UpdateShaders(), width, Zoom, zoomPos, zoomTimer, and CoreConfig.CameraConfig.zoomToMouse.

Referenced by Scene.OnUpdate().

◆ Focus() [1/4]

void BaseGameScreen.Focus ( Card  c)
inline

Definition at line 749 of file BaseGameScreen.cs.

750 {
751 if (c != null)
752 {
753 Focus(c.GetRootCard().pos);
754 }
755 }
void Focus(Int3 ints)
Card GetRootCard()
Definition: Card.cs:3173

References Focus(), Card.GetRootCard(), and Card.pos.

◆ Focus() [2/4]

void BaseGameScreen.Focus ( int  x,
int  y 
)
inline

Definition at line 738 of file BaseGameScreen.cs.

739 {
740 if (EMono.AdvMode)
741 {
742 SE.Beep();
743 return;
744 }
745 position.x = (scrollX = x);
746 position.y = (scrollY = y);
747 }
static bool AdvMode
Definition: EMono.cs:9

References EMono.AdvMode, scrollX, and scrollY.

◆ Focus() [3/4]

void BaseGameScreen.Focus ( Int3  ints)
inline

Definition at line 733 of file BaseGameScreen.cs.

734 {
735 position = new Vector3(ints.x, ints.y, ints.z);
736 }
int x
Definition: Int3.cs:6
int y
Definition: Int3.cs:18
int z
Definition: Int3.cs:30

References position, Int3.x, Int3.y, and Int3.z.

Referenced by WidgetMainText.Append(), LayerNewZone.Embark(), Focus(), Scene.FocusAndPause(), FocusCenter(), FocusImmediate(), FocusPC(), NotificationBattle.OnClick(), NotificationGuest.OnClick(), and HotItemFocusChara.OnClick().

◆ Focus() [4/4]

void BaseGameScreen.Focus ( Point  pos)
inline

Definition at line 763 of file BaseGameScreen.cs.

764 {
765 position = pos.PositionCenter();
766 }
ref Vector3 PositionCenter()
Definition: Point.cs:563

References position, and Point.PositionCenter().

◆ FocusCenter()

void BaseGameScreen.FocusCenter ( )
inline

Definition at line 757 of file BaseGameScreen.cs.

758 {
759 Point pos = new Point(EMono._map.Size / 2, EMono._map.Size / 2);
760 Focus(pos);
761 }
int Size
Definition: MapBounds.cs:20
Definition: Point.cs:9

References EMono._map, Focus(), and MapBounds.Size.

◆ FocusImmediate()

void BaseGameScreen.FocusImmediate ( Point  pos)
inline

Definition at line 776 of file BaseGameScreen.cs.

777 {
778 focusPos = null;
779 Focus(pos);
780 instantFocus = true;
783 }

References Focus(), focusPos, instantFocus, and RefreshPosition().

◆ FocusPC()

void BaseGameScreen.FocusPC ( )
inline

◆ GetRandomPoint()

Point BaseGameScreen.GetRandomPoint ( )
inline

Definition at line 577 of file BaseGameScreen.cs.

578 {
579 int num = EMono.screen.scrollX - EMono.screen.scrollY + width / 2 - (height / 2 + 1) / 2;
580 int num2 = EMono.screen.scrollY + EMono.screen.scrollX + width / 2 + height / 2 / 2;
581 num = num - 20 + EMono.rnd(40);
582 num2 = num2 - 20 + EMono.rnd(40);
583 return _randomPoint.Set(num, num2);
584 }
static int rnd(int a)
Definition: EMono.cs:47
Point Set(int _x, int _z)
Definition: Point.cs:479

References _randomPoint, height, EMono.rnd(), Point.Set(), and width.

Referenced by GameUpdater.Update100ms().

◆ ModTargetZoomIndex()

void BaseGameScreen.ModTargetZoomIndex ( int  a)
inline

Definition at line 858 of file BaseGameScreen.cs.

859 {
861 {
862 int num = targetZoomIndex;
863 targetZoomIndex -= a;
864 int num2 = ((!EMono.core.config.camera.extendZoomMin) ? 1 : 0);
865 int num3 = (EMono.core.config.camera.extendZoomMax ? 4 : 3);
866 if (targetZoomIndex < num2)
867 {
868 targetZoomIndex = num2;
869 }
870 else if (targetZoomIndex >= num3)
871 {
872 targetZoomIndex = num3;
873 }
875 {
877 }
879 }
880 }
void SetTargetZoomIndex(int index)
bool pressing
Definition: ButtonState.cs:35
Definition: EInput.cs:8
static ButtonState buttonScroll
Definition: EInput.cs:359
static Vector3 mposWorld
Definition: EInput.cs:339
bool IsActive
Definition: EloMapActor.cs:21
EloMapActor elomapActor
Definition: Scene.cs:97

References EInput.buttonScroll, CoreConfig.camera, Core.config, EMono.core, Scene.elomapActor, CoreConfig.CameraConfig.extendZoomMin, EloMapActor.IsActive, EInput.mposWorld, ButtonState.pressing, EMono.scene, SetTargetZoomIndex(), targetZoomIndex, and zoomPos.

Referenced by ActionMode.InputWheel().

◆ OnActivate()

virtual void BaseGameScreen.OnActivate ( )
inlinevirtual

Reimplemented in GameScreen, and GameScreenElona.

Definition at line 246 of file BaseGameScreen.cs.

247 {
248 }

Referenced by Activate().

◆ OnChangeHour()

virtual void BaseGameScreen.OnChangeHour ( )
inlinevirtual

Reimplemented in GameScreenElona.

Definition at line 402 of file BaseGameScreen.cs.

403 {
404 }

Referenced by Scene.OnChangeHour().

◆ OnDeactivate()

virtual void BaseGameScreen.OnDeactivate ( )
inlinevirtual

Reimplemented in GameScreenElona.

Definition at line 257 of file BaseGameScreen.cs.

258 {
259 }

Referenced by Deactivate().

◆ OnEndPlayerTurn()

virtual void BaseGameScreen.OnEndPlayerTurn ( )
inlinevirtual

Definition at line 265 of file BaseGameScreen.cs.

266 {
267 }

Referenced by Chara.Tick().

◆ RefreshAll()

void BaseGameScreen.RefreshAll ( )
inline

Definition at line 520 of file BaseGameScreen.cs.

521 {
523 bool indoor = EMono._map.config.indoor;
524 ScreenGrading grading = camSupport.grading;
525 EMono.scene.flock.SetActive(!indoor);
526 if (indoor)
527 {
528 grading.material.DisableKeyword("CLOUD_ON");
529 }
530 else
531 {
532 grading.material.EnableKeyword("CLOUD_ON");
533 }
535 {
536 EMono.scene.matFloorEx.EnableKeyword("EX_ON");
537 }
538 else
539 {
540 EMono.scene.matFloorEx.DisableKeyword("EX_ON");
541 }
542 grading.profile.vignette.enable = EMono.scene.profile.light.vignette;
543 grading.profile.vignette.vignetteColor = EMono.scene.profile.light.vignetteColor;
544 RefreshSky();
545 RefreshTilt();
546 }
CameraSupport camSupport
void RefreshScreenSize()
ScreenGrading grading
GraphicSetting graphic
Definition: CoreConfig.cs:594
bool indoor
Definition: MapConfig.cs:29
MapConfig config
Definition: Map.cs:37
SceneLightProfile light
Definition: SceneProfile.cs:10
Material matFloorEx
Definition: Scene.cs:103

References EMono._map, camSupport, Core.config, Map.config, EMono.core, Scene.flock, CoreConfig.GraphicSetting.floorEx, CameraSupport.grading, CoreConfig.graphic, MapConfig.indoor, SceneProfile.light, Scene.matFloorEx, Scene.profile, RefreshScreenSize(), RefreshSky(), RefreshTilt(), EMono.scene, SceneLightProfile.vignette, and SceneLightProfile.vignetteColor.

Referenced by Activate(), CoreDebug.COM_PlayStartDrama(), BuildMenu.Deactivate(), BuildMenu.OnActivate(), WidgetArtTool.OnActivate(), DramaManager.ParseLine(), HotItemContext.Show(), and TraitMapBoard.TrySetAct().

◆ RefreshGrading()

void BaseGameScreen.RefreshGrading ( )
inline

Definition at line 675 of file BaseGameScreen.cs.

676 {
677 float timeRatio = (EMono.core.IsGameStarted ? EMono.scene.timeRatio : 0f);
678 if ((bool)camSupport.grading.profile.overlay)
679 {
680 camSupport.grading.profile.overlay.Refresh(timeRatio, EMono._zone.IsSnowCovered);
681 }
682 ScreenGrading.blind = EMono.pc.isBlind;
683 camSupport.grading.profile.sharpen.enable = EMono.core.config.graphic.sharpen > 0;
684 camSupport.grading.profile.sharpen.Strength = Mathf.Clamp(0.1f * (float)EMono.core.config.graphic.sharpen, 0f, (this is GameScreen) ? 10f : 1f);
685 camSupport.beautify.sharpen = Mathf.Clamp(0.01f * (float)EMono.core.config.graphic.sharpen2, 0f, (this is GameScreen) ? 10f : 0.5f);
686 camSupport.grading.SetGrading();
688 Color tintColor = EMono._map.config.colorScreen.Get();
689 if (tintColor.a == 0f)
690 {
691 tintColor = sceneTemplate.colorScreen;
692 }
693 camSupport.beautify.tintColor = tintColor;
694 tintColor = EMono._map.config.colorSea.Get();
695 MATERIAL.sourceWaterSea.matColor = ((tintColor.a == 0f) ? MATERIAL.sourceWaterSea.GetColor() : tintColor);
697 float num = 0f;
698 if (!EMono._map.IsIndoor)
699 {
700 num += 0.01f * EMono.core.config.test.brightnessNight * EMono.scene.profile.light.nightRatioCurve.Evaluate(EMono.scene.timeRatio);
701 }
702 camSupport.grading.nightBrightness = num;
703 }
bool isBlind
Definition: Chara.cs:125
static SourceMaterial.Row sourceWaterSea
Definition: MATERIAL.cs:41
SerializableColor colorSea
Definition: MapConfig.cs:98
SerializableColor colorScreen
Definition: MapConfig.cs:95
string idSceneTemplate
Definition: MapConfig.cs:23
bool IsIndoor
Definition: Map.cs:131
AnimationCurve nightRatioCurve
Color colorScreen
Definition: SceneTemplate.cs:7
static SceneTemplate Load(string id)
Definition: SceneTemplate.cs:9
virtual bool IsSnowCovered
Definition: Spatial.cs:531
virtual string IDSceneTemplate
Definition: Zone.cs:191

References EMono._map, EMono._zone, camSupport, Color, MapConfig.colorScreen, SceneTemplate.colorScreen, MapConfig.colorSea, Core.config, Map.config, EMono.core, SerializableColor.Get(), CameraSupport.grading, CoreConfig.graphic, MapConfig.idSceneTemplate, Zone.IDSceneTemplate, Chara.isBlind, Map.IsIndoor, Spatial.IsSnowCovered, SceneProfile.light, SceneTemplate.Load(), SceneLightProfile.nightRatioCurve, EMono.pc, Scene.profile, CoreConfig.RefreshUIBrightness(), EMono.scene, CoreConfig.GraphicSetting.sharpen, CoreConfig.GraphicSetting.sharpen2, MATERIAL.sourceWaterSea, and Scene.timeRatio.

Referenced by GameDate.AdvanceMin(), CoreConfig.ApplyGrading(), RefreshSky(), and TraitMapBoard.TrySetAct().

◆ RefreshPosition()

virtual void BaseGameScreen.RefreshPosition ( )
inlinevirtual

Reimplemented in GameScreenElona.

Definition at line 406 of file BaseGameScreen.cs.

407 {
409 {
410 return;
411 }
412 if (focusOption != null)
413 {
414 Vector3 vector = (focusOption.player ? (EMono.pc.pos.Position() + focusFix) : focusOption.pos.PositionCenter());
415 vector.z = position.z;
417 {
418 position = Vector3.MoveTowards(position, vector, focusOption.speed * Core.delta);
419 }
420 else
421 {
422 position = Vector3.Lerp(position, vector, focusOption.speed * Core.delta);
423 }
424 }
425 else if (focusPos.HasValue)
426 {
427 Vector3 obj = focusPos ?? position;
428 float x = obj.x;
429 Vector3 obj2 = focusPos ?? position;
430 focusPos = new Vector3(x, obj2.y, position.z);
432 if (Vector3.Distance(position, focusPos ?? position) < 0.1f)
433 {
434 focusPos = null;
435 }
436 }
437 else if ((bool)transFocus)
438 {
439 pushBack = Vector3.zero;
440 position.x = transFocus.position.x;
441 position.y = transFocus.position.y;
442 }
443 else if (fixFocus)
444 {
445 float z = position.z;
447 for (int i = 0; i < EMono.core.config.camera.zooms.Length; i++)
448 {
450 {
451 targetZoomIndex = i;
452 }
453 }
454 Vector3 b = (EMono.pc.isSynced ? EMono.player.position : EMono.pc.pos.Position()) + focusFix;
455 if (instantFocus)
456 {
457 position = b;
458 }
460 {
461 position = Vector3.Lerp(position, b, focusSpeed * Core.delta * Mathf.Lerp(0.2f, 1f, 1f - Mathf.Clamp(ActionMode.Adv.rightMouseTimer, 0f, 1f)));
462 }
463 else
464 {
465 position = b;
466 }
467 position.z = z;
468 pcOrbit.transform.position = EMono.pc.renderer.position;
469 }
470 else
471 {
473 {
475 }
476 pushBack = Vector3.zero;
477 int num = scrollX - scrollY;
478 int num2 = scrollY + scrollX;
479 if ((float)num <= mapLimit.x)
480 {
481 pushBack.x = mapLimit.x - (float)num;
482 }
483 if ((float)num2 <= mapLimit.y)
484 {
485 pushBack.y = mapLimit.y - (float)num2;
486 }
487 if ((float)num >= (float)EMono._map.Size + mapLimit.width - (float)(width / 2))
488 {
489 pushBack.x = (float)EMono._map.Size + mapLimit.width - (float)(width / 2) - (float)num;
490 }
491 if ((float)num2 >= (float)EMono._map.Size + mapLimit.height - (float)(height / 2))
492 {
493 pushBack.y = (float)EMono._map.Size + mapLimit.height - (float)(height / 2) - (float)num2;
494 }
495 position += Quaternion.Euler(planeAngle) * pushBack * Core.delta * pushbackSpeed;
496 }
497 scrollX = Mathf.FloorToInt(position.x / tileWorldSize.x) - width / 2 + (int)paddingOffset.x;
498 scrollY = Mathf.FloorToInt(position.y / tileWorldSize.y) - height / 4 + (int)paddingOffset.y;
499 if (lastPos.x != (float)scrollX || lastPos.y != (float)scrollY)
500 {
501 lastPos.x = scrollX;
502 lastPos.y = scrollY;
503 }
504 camPos.x = position.x;
505 camPos.y = position.y;
506 SnapScreen(ref camPos, Zoom);
507 camPos.z = -500f;
508 _camPos.x = camPos.x + screenFixX2 + screenFixX4;
509 _camPos.y = camPos.y + screenFixY2 + screenFixY4;
510 _camPos.z = camPos.z;
511 EMono.scene.cam.transform.localPosition = _camPos;
512 camPos.z = 0f;
513 EMono.scene.transAudio.position = camPos + EMono.scene.posAudioListener;
514 if ((bool)WidgetMinimap.Instance)
515 {
517 }
518 }
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
override float TargetZoom
Definition: AM_Adv.cs:241
float rightMouseTimer
Definition: AM_Adv.cs:164
bool IsActive
Definition: ActionMode.cs:121
static AM_Adv Adv
Definition: ActionMode.cs:15
void SnapScreen(ref Vector3 v, float zoom)
Vector3 planeAngle
Vector3 position
Definition: CardRenderer.cs:21
Vector3 posAudioListener
Definition: Scene.cs:33
static WidgetMinimap Instance

References _camPos, EMono._map, EMono._zone, ActionMode.Adv, CoreConfig.camera, camPos, Core.config, EMono.core, Chara.currentZone, Core.delta, fixFocus, focusFix, focusOption, focusPos, focusSpeed, focusSpeedSlow, height, if(), WidgetMinimap.Instance, instantFocus, ActionMode.IsActive, lastPos, BaseGameScreen.FocusOption.linear, mapLimit, WidgetMinimap.OnUpdate(), paddingOffset, EMono.pc, planeAngle, BaseGameScreen.FocusOption.pos, Card.pos, Scene.posAudioListener, position, CardRenderer.position, Point.Position(), Point.PositionCenter(), pushBack, pushbackSpeed, Card.renderer, AM_Adv.rightMouseTimer, EMono.scene, screenFixX2, screenFixX4, screenFixY2, screenFixY4, scrollX, scrollY, MapBounds.Size, CoreConfig.CameraConfig.smoothFollow, SnapScreen(), BaseGameScreen.FocusOption.speed, AM_Adv.TargetZoom, targetZoom, TargetZoom, targetZoomIndex, tileWorldSize, transFocus, width, Zoom, and CoreConfig.CameraConfig.zooms.

Referenced by Draw(), FocusImmediate(), FocusPC(), Card.MoveImmediate(), AM_Adv.OnActivate(), ScrollMouse(), and Card.Teleport().

◆ RefreshScreenSize()

void BaseGameScreen.RefreshScreenSize ( )
inline

Definition at line 548 of file BaseGameScreen.cs.

549 {
551 width = (int)((float)Screen.width / tileSize.x / Zoom) + (int)paddings.x + 2;
552 height = (int)((float)Screen.height / (tileSize.y / 2f) / Zoom) + (int)paddings.y + 4;
555 Vector3 localScale = new Vector3(EMono.scene.cam.orthographicSize * ((float)Screen.width / (float)Screen.height) * 2.5f, EMono.scene.cam.orthographicSize * 2.5f, 1f);
557 {
558 EMono.scene.skyBG.transform.localScale = localScale;
559 float num = ((ActionMode.IsAdv || Zoom >= 1f || EMono._map.IsIndoor) ? 0f : (0.4f / Zoom));
561 {
562 num += 0.8f;
563 }
565 {
566 EMono.scene.sfxWind.SetVolume(Mathf.Min(num, 1f));
567 }
568 }
569 Vector3 vector = EMono.scene.cam.transform.position;
570 EMono.scene.cam.transform.position = Vector3.zero;
571 Vector3 vector2 = EMono.scene.cam.WorldToScreenPoint(Vector3.zero);
572 screenFixX2 = vector2.x % screenFixX * screenFixX3;
573 screenFixY2 = vector2.y % screenFixY * screenFixY3;
574 EMono.scene.cam.transform.position = vector;
575 }
Divider divier
void ResizeCameraToPixelPerfect()
CameraSupport.Divider divider
Definition: CoreConfig.cs:563
bool IsGameStarted
Definition: Core.cs:84
static World world
Definition: EMono.cs:37
static Player player
Definition: EMono.cs:11
bool simulatingZone
Definition: Player.cs:980
CameraSupport camSupport
Definition: Scene.cs:41
Camera cam
Definition: Scene.cs:37
Condition
Definition: Weather.cs:16
Condition CurrentCondition
Definition: Weather.cs:79
Weather weather
Definition: World.cs:12

References EMono._map, Scene.cam, camSupport, Scene.camSupport, Core.config, EMono.core, Weather.CurrentCondition, CoreConfig.Fix.divider, CameraSupport.divier, CoreConfig.fix, height, Core.IsGameStarted, Map.IsIndoor, paddings, EMono.player, CameraSupport.ResizeCameraToPixelPerfect(), EMono.scene, screenFixX, screenFixX2, screenFixX3, screenFixY, screenFixY2, screenFixY3, Scene.sfxWind, Player.simulatingZone, World.weather, width, EMono.world, Zoom, and CameraSupport.Zoom.

Referenced by CoreConfig.Apply(), CoreConfig.ApplyZoom(), Core.OnChangeResolution(), RefreshAll(), and ZoneInspector.RefreshScreen().

◆ RefreshSky()

void BaseGameScreen.RefreshSky ( )
inline

Definition at line 586 of file BaseGameScreen.cs.

587 {
589 bool indoor = EMono._map.config.indoor;
590 EMono.scene.firefly.baseParticleCount = graphic.fireflyCount;
591 EMono.scene.fireflyNight.baseParticleCount = graphic.fireflyCount * 10;
592 EMono.scene.star.baseParticleCount = graphic.starCount;
593 EMono.scene.star.gameObject.GetComponent<ParticleSystemRenderer>().enabled = EMono.world.date.IsNight;
594 EMono.scene.star.SetActive(IsLocalMap && !indoor);
595 EMono.scene.firefly.SetActive(IsLocalMap && graphic.firefly && !indoor);
596 EMono.scene.fireflyNight.SetActive(IsLocalMap && graphic.firefly && !indoor);
597 if ((bool)overlayShadow && (bool)EMono.scene.profile.matOverlay && this is GameScreen)
598 {
599 overlayShadow.sharedMaterial.SetFloat("_ShadowStrength", EMono._map.config.shadowStrength * (EMono._zone.IsSnowCovered ? 0.5f : 1f) * EMono.setting.render.shadowStrength);
600 }
603 }
virtual void RefreshWeather()
bool IsNight
Definition: Date.cs:112
static GameSetting setting
Definition: EMono.cs:31
RenderSetting render
Definition: GameSetting.cs:301
float shadowStrength
Definition: MapConfig.cs:71
GameDate date
Definition: World.cs:6

References EMono._map, EMono._zone, Core.config, Map.config, EMono.core, World.date, CoreConfig.GraphicSetting.firefly, Scene.firefly, CoreConfig.GraphicSetting.fireflyCount, Scene.fireflyNight, CoreConfig.graphic, MapConfig.indoor, IsLocalMap, Date.IsNight, Spatial.IsSnowCovered, SceneProfile.matOverlay, overlayShadow, Scene.profile, RefreshGrading(), RefreshWeather(), GameSetting.render, EMono.scene, EMono.setting, GameSetting.RenderSetting.shadowStrength, MapConfig.shadowStrength, Scene.star, CoreConfig.GraphicSetting.starCount, and EMono.world.

Referenced by Scene.OnChangeHour(), RefreshAll(), and Weather.SetCondition().

◆ RefreshTilt()

void BaseGameScreen.RefreshTilt ( )
inline

Definition at line 705 of file BaseGameScreen.cs.

706 {
707 camSupport.tiltShift.enabled = ((ActionMode.Bird.IsActive || EMono._zone.IsRegion) ? EMono.game.config.tiltRegion : EMono.game.config.tilt);
708 camSupport.tiltShift.blurArea = (ActionMode.Bird.IsActive ? 12f : (0.1f * (float)(EMono._zone.IsRegion ? EMono.game.config.tiltPowerRegion : EMono.game.config.tiltPower)));
709 }
bool tilt
Definition: Game.cs:18
int tiltPower
Definition: Game.cs:72
int tiltPowerRegion
Definition: Game.cs:75
bool tiltRegion
Definition: Game.cs:21
Config config
Definition: Game.cs:215

References EMono._zone, Game.config, EMono.game, Spatial.IsRegion, Game.Config.tilt, Game.Config.tiltPower, Game.Config.tiltPowerRegion, and Game.Config.tiltRegion.

Referenced by AM_Bird.OnActivate(), AM_Bird.OnDeactivate(), RefreshAll(), and Scene.ToggleTilt().

◆ RefreshWeather()

virtual void BaseGameScreen.RefreshWeather ( )
inlinevirtual

Reimplemented in GameScreenElona.

Definition at line 605 of file BaseGameScreen.cs.

606 {
607 bool flag = EMono._map.config.indoor || (EMono.pc.IsInActiveZone && (EMono.pc.pos.cell.room?.HasRoof ?? false));
608 bool flag2 = EMono.pc.pos.cell.room?.data.atrium ?? false;
609 Weather weather = EMono.world.weather;
610 Weather.Condition currentCondition = weather.CurrentCondition;
611 EMono.scene.filterRain.enabled = !flag && weather.IsRaining && EMono.core.config.graphic.enhanceRain;
612 EMono.scene.filterRain.Fade = ((currentCondition == Weather.Condition.RainHeavy) ? 0.4f : 0.3f);
613 EMono.scene.rain.enableEmission = !flag && weather.IsRaining;
614 ParticleSystem.EmissionModule emission = EMono.scene.rain.emission;
615 emission.rateOverTime = ((currentCondition == Weather.Condition.RainHeavy) ? 750 : 200);
616 EMono.scene.snow.enableEmission = !flag && currentCondition == Weather.Condition.Snow;
617 EMono.scene.ether.enableEmission = !flag && weather.IsEther;
618 bool enableEmission = !flag && weather.IsBlossom;
619 ParticleSystem[] blossoms = EMono.scene.blossoms;
620 for (int i = 0; i < blossoms.Length; i++)
621 {
622 blossoms[i].enableEmission = enableEmission;
623 }
624 enableEmission = !flag && currentCondition == Weather.Condition.SnowHeavy && EMono.core.config.graphic.blizzard;
625 blossoms = EMono.scene.blizzards;
626 for (int i = 0; i < blossoms.Length; i++)
627 {
628 blossoms[i].enableEmission = enableEmission;
629 }
630 EMono.scene.transBlizzard.localScale = new Vector3(1f, 1f, 1f);
631 bool flag3 = (EMono._map.config.forceGodRay || (EMono.core.config.graphic.godray && !flag && (currentCondition == Weather.Condition.Fine || currentCondition == Weather.Condition.Snow))) && !BuildMenu.Instance;
632 EMono.scene.godray.SetActive(flag3, delegate(bool enabled)
633 {
634 if (!enabled)
635 {
636 EMono.scene.godray.Clear();
637 }
638 });
639 EMono.scene.godrayDust.SetActive(flag3 && EMono.world.date.IsNight);
640 EMono.scene.snow.SetActive(enable: true);
641 EMono.scene.rain.SetActive(enable: true);
642 EMono.scene.ether.SetActive(enable: true);
643 EMono.scene.blossom.SetActive(enable: true);
644 Zone zone = EMono._zone;
645 if (EMono._zone is Zone_Tent)
646 {
647 zone = (EMono._zone.parent as Zone) ?? EMono._zone;
648 }
649 float num = ((zone.lv <= -2) ? 0f : ((zone.lv <= -1) ? 0.3f : ((flag && !flag2) ? 0.6f : 1f)));
650 EMono.scene.sfxRain.SetVolume(weather.IsRaining ? num : 0f);
651 EMono.scene.sfxSea.SetVolume(EMono._zone.VolumeSea * num);
652 EMono.scene.camSupport.grading.profile.fog = EMono.setting.render.fogs[EMono._map.config.fog];
653 EMono.scene.camSupport.grading.userFog = ((!EMono._map.config.indoor && flag) ? 0f : 1f);
654 float num2 = ((EMono._map.IsIndoor || !EMono.world.weather.IsRaining) ? 0f : ((currentCondition == Weather.Condition.RainHeavy) ? (-0.08f) : (-0.04f)));
656 {
657 num2 += EMono.scene.profile.global.snowBrightness;
658 }
659 camSupport.grading.sceneBrightness = num2;
660 ParticleSystem.MainModule main = EMono.scene.rain.main;
661 ParticleSystem.MainModule main2 = EMono.scene.snow.main;
662 ParticleSystem.MainModule main3 = EMono.scene.ether.main;
663 bool flag5 = (main3.prewarm = false);
664 bool prewarm = (main2.prewarm = flag5);
665 main.prewarm = prewarm;
666 blossoms = EMono.scene.blossoms;
667 for (int i = 0; i < blossoms.Length; i++)
668 {
669 ParticleSystem.MainModule main4 = blossoms[i].main;
670 main4.prewarm = false;
671 }
672 camSupport.grading.SetGrading();
673 }
bool atrium
Definition: AreaData.cs:66
AreaData data
Definition: BaseArea.cs:29
static BuildMenu Instance
Definition: BuildMenu.cs:77
FogType fog
Definition: MapConfig.cs:77
SceneGlobalProfile global
Definition: SceneProfile.cs:6
ParticleSystem godrayDust
Definition: Scene.cs:57
ParticleSystem blossom
Definition: Scene.cs:59
ParticleSystem godray
Definition: Scene.cs:55
ParticleSystem[] blizzards
Definition: Scene.cs:65
int lv
Definition: Spatial.cs:142
virtual float VolumeSea
Definition: Spatial.cs:478
bool IsEther
Definition: Weather.cs:156
bool IsBlossom
Definition: Weather.cs:141
bool IsRaining
Definition: Weather.cs:117
Definition: Zone.cs:12

References EMono._map, EMono._zone, AreaData.atrium, CoreConfig.GraphicSetting.blizzard, Scene.blizzards, Scene.blossom, Scene.blossoms, camSupport, Point.cell, Core.config, Map.config, EMono.core, Weather.CurrentCondition, BaseArea.data, World.date, CoreConfig.GraphicSetting.enhanceRain, Scene.ether, MapConfig.fog, GameSetting.RenderSetting.fogs, SceneProfile.global, Scene.godray, Scene.godrayDust, CameraSupport.grading, CoreConfig.graphic, Room.HasRoof, BuildMenu.Instance, Weather.IsBlossom, Weather.IsEther, Date.IsNight, Weather.IsRaining, Spatial.IsSnowCovered, Spatial.lv, EMono.pc, Card.pos, Scene.profile, Scene.rain, GameSetting.render, Cell.room, EMono.scene, EMono.setting, Scene.sfxRain, Scene.sfxSea, Scene.snow, Spatial.VolumeSea, World.weather, and EMono.world.

Referenced by BaseTileMap.Draw(), TileMapElona.Draw(), and RefreshSky().

◆ ScrollAxis()

void BaseGameScreen.ScrollAxis ( Vector3  axis,
bool  direct = false 
)
inline

Definition at line 721 of file BaseGameScreen.cs.

722 {
723 if (direct)
724 {
725 position += axis;
726 }
727 else
728 {
729 position += axis * Core.delta * camSpeed2 * EMono.core.config.camera.senseKeyboard / Zoom;
730 }
731 }

References camSpeed2, position, and Zoom.

Referenced by ActionMode.InputMovement().

◆ ScrollMouse()

void BaseGameScreen.ScrollMouse ( float  x,
float  y 
)
inline

Definition at line 711 of file BaseGameScreen.cs.

712 {
713 position.x += x / Zoom;
714 position.y += y / Zoom;
715 if (x > 0.1f || x < -0.1f || y > 0.1f || y < 0.1f)
716 {
718 }
719 }

References RefreshPosition(), and Zoom.

Referenced by ActionMode.InputMovement().

◆ SetTargetZoomIndex()

void BaseGameScreen.SetTargetZoomIndex ( int  index)
inline

◆ SetUnitSize()

virtual void BaseGameScreen.SetUnitSize ( )
inlinevirtual

Reimplemented in GameScreen, and GameScreenElona.

Definition at line 261 of file BaseGameScreen.cs.

262 {
263 }

Referenced by Activate().

◆ SetZoom()

void BaseGameScreen.SetZoom ( float  z)
inline

◆ SnapScreen()

void BaseGameScreen.SnapScreen ( ref Vector3  v,
float  zoom 
)
inline

Definition at line 785 of file BaseGameScreen.cs.

786 {
787 float num = snapSize.x / zoom;
788 float num2 = snapSize.y / zoom;
789 switch (EMono.core.config.fix.snapType)
790 {
791 case CoreConfig.ScreenSnapType.Default:
792 v.x = num * (float)Mathf.RoundToInt(v.x / num);
793 v.y = num2 * (float)Mathf.RoundToInt(v.y / num2);
794 break;
795 case CoreConfig.ScreenSnapType.Floor:
796 v.x = num * (float)Mathf.FloorToInt(v.x / num);
797 v.y = num2 * (float)Mathf.FloorToInt(v.y / num2);
798 break;
799 case CoreConfig.ScreenSnapType.Ceil:
800 v.x = num * (float)Mathf.CeilToInt(v.x / num);
801 v.y = num2 * (float)Mathf.CeilToInt(v.y / num2);
802 break;
803 case CoreConfig.ScreenSnapType.Hack3:
804 num = snapSize.x;
805 num2 = snapSize.y;
806 v.x = num * (float)Mathf.RoundToInt(v.x / num);
807 v.y = num2 * (float)Mathf.RoundToInt(v.y / num2);
808 break;
809 case CoreConfig.ScreenSnapType.Hack4:
810 num = snapSize.x;
811 num2 = snapSize.y;
812 v.x = num * (float)Mathf.FloorToInt(v.x / num);
813 v.y = num2 * (float)Mathf.FloorToInt(v.y / num2);
814 break;
815 case CoreConfig.ScreenSnapType.Hack5:
816 num = snapSize.x;
817 num2 = snapSize.y;
818 v.x = num * (float)Mathf.CeilToInt(v.x / num);
819 v.y = num2 * (float)Mathf.CeilToInt(v.y / num2);
820 break;
821 case CoreConfig.ScreenSnapType.Hack6:
822 v.x = 0.01f * (float)Mathf.FloorToInt(v.x * 100f) + 0.001f;
823 v.y = 0.01f * (float)Mathf.FloorToInt(v.y * 100f) + 0.001f;
824 break;
825 case CoreConfig.ScreenSnapType.Hack7:
826 v.x = 0.01f * (float)Mathf.FloorToInt(v.x * 100f) - 0.001f;
827 v.y = 0.01f * (float)Mathf.FloorToInt(v.y * 100f) - 0.001f;
828 break;
829 case CoreConfig.ScreenSnapType.Hack8:
830 v.x = 0.01f * (float)Mathf.RoundToInt(v.x * 100f) + 0.005f;
831 v.y = 0.01f * (float)Mathf.RoundToInt(v.y * 100f) + 0.005f;
832 break;
833 case CoreConfig.ScreenSnapType.Hack9:
834 v.x = 0.01f * (float)Mathf.RoundToInt(v.x * 100f) + 0.025f;
835 v.y = 0.01f * (float)Mathf.RoundToInt(v.y * 100f) + 0.025f;
836 break;
837 }
838 }
ScreenSnapType snapType
Definition: CoreConfig.cs:565

References Core.config, EMono.core, CoreConfig.fix, snapSize, and CoreConfig.Fix.snapType.

Referenced by RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ UpdateShaders()

void BaseGameScreen.UpdateShaders ( float  time = 0f)
inline

Definition at line 347 of file BaseGameScreen.cs.

348 {
350 SceneColorProfile color = profile.color;
351 SceneLightProfile light = profile.light;
352 Color value = color.fog.Evaluate(time);
353 float value2 = light.nightRatioCurve.Evaluate(time);
354 Shader.SetGlobalFloat(_Snow, EMono._zone.IsSnowCovered ? 1f : 0f);
355 Shader.SetGlobalFloat(_BackDrawPower, (!ActionMode.Cinema.IsActive) ? EMono.game.config.backDrawAlpha : 0);
356 Shader.SetGlobalFloat(_SkyLevel, SkyRate);
357 Shader.SetGlobalFloat(_NightRate, value2);
358 Shader.SetGlobalFloat(_ViewHeight, ViewHeight);
359 Shader.SetGlobalFloat(_FogStrength, value.a * 0.1f);
360 Shader.SetGlobalColor(_FogColor, value);
362 if ((bool)EMono._map.fowProfile)
363 {
364 fowProfile = EMono._map.fowProfile;
365 }
366 if ((bool)fowProfile)
367 {
368 switch (fowProfile.type)
369 {
370 case FOWType.Color:
371 Shader.SetGlobalColor(_FowColor, fowProfile.color);
372 break;
373 case FOWType.ColorAdd:
374 Shader.SetGlobalColor(_FowColor, fowProfile.color * color.fow.Evaluate(time));
375 break;
376 default:
377 Shader.SetGlobalColor(_FowColor, color.fow.Evaluate(time));
378 break;
379 }
380 }
381 else
382 {
383 Shader.SetGlobalColor(_FowColor, color.fow.Evaluate(time));
384 }
385 Shader.SetGlobalColor(_SunColor, EMono._zone.IsSnowCovered ? color.sunSnow.Evaluate(time) : color.sun.Evaluate(time));
386 Shader.SetGlobalColor(_SeaColor, color.sea.Evaluate(time));
387 Shader.SetGlobalColor(_SkyColor, color.sky.Evaluate(time));
388 Shader.SetGlobalColor(_SkyBGColor, color.skyBG.Evaluate(time));
389 Shader.SetGlobalVector(_Offset, EMono.core.config.camera.extendZoomMin ? (position * 0.3f) : (position * 0.5f));
390 Shader.SetGlobalFloat(_Zoom, Zoom);
391 Shader.SetGlobalFloat(_LightPower, light.lightPower.Evaluate(time) * light.lightPowerMod);
392 Shader.SetGlobalFloat(_AnimeSpeedGlobal, EMono.game.config.animeSpeed);
393 Shader.SetGlobalColor(_ScreenFlash, ScreenFlash.currentColor);
394 ParticleSystem.MainModule main = EMono.scene.godray.main;
395 main.startColor = (EMono._zone.IsSnowCovered ? color.godraySnow.Evaluate(time) : color.godray.Evaluate(time));
396 camSupport.grading.vignettePower = light.vignetteCurve.Evaluate(time);
397 camSupport.grading.UpdateVignette();
398 camSupport.bloom.threshold = light.bloomCurve.Evaluate(time);
399 camSupport.beautify.bloomIntensity = light.bloomCurve2.Evaluate(time);
400 }
FOWType
Definition: FOWType.cs:2
static AM_Cinema Cinema
Definition: ActionMode.cs:73
readonly int _ScreenFlash
readonly int _Snow
readonly int _Offset
readonly int _BackDrawPower
readonly int _ViewHeight
readonly int _LightPower
readonly int _SunColor
readonly int _SkyBGColor
readonly int _FogStrength
readonly int _Zoom
readonly int _FowColor
readonly int _SeaColor
readonly int _FogColor
readonly int _SkyColor
readonly int _SkyLevel
readonly int _NightRate
virtual float SkyRate
virtual float ViewHeight
readonly int _AnimeSpeedGlobal
FowProfile fowProfile
int animeSpeed
Definition: Game.cs:84
int backDrawAlpha
Definition: Game.cs:81
FowProfile fowProfile
Definition: Map.cs:101
AnimationCurve lightPower
AnimationCurve bloomCurve
AnimationCurve bloomCurve2
AnimationCurve vignetteCurve
SceneColorProfile color
Definition: SceneProfile.cs:12
static Color currentColor
Definition: ScreenFlash.cs:8
BiomeProfile biome
Definition: Zone.cs:126

References _AnimeSpeedGlobal, _BackDrawPower, _FogColor, _FogStrength, _FowColor, _LightPower, EMono._map, _NightRate, _Offset, _ScreenFlash, _SeaColor, _SkyBGColor, _SkyColor, _SkyLevel, _Snow, _SunColor, _ViewHeight, EMono._zone, _Zoom, Game.Config.animeSpeed, Game.Config.backDrawAlpha, Zone.biome, SceneLightProfile.bloomCurve, SceneLightProfile.bloomCurve2, CoreConfig.camera, camSupport, ActionMode.Cinema, FowProfile.color, Color, SceneProfile.color, Core.config, Game.config, EMono.core, ScreenFlash.currentColor, CoreConfig.CameraConfig.extendZoomMin, SceneColorProfile.fog, SceneColorProfile.fow, BiomeProfile.fowProfile, Map.fowProfile, EMono.game, Scene.godray, SceneColorProfile.godray, SceneColorProfile.godraySnow, CameraSupport.grading, ActionMode.IsActive, Spatial.IsSnowCovered, SceneProfile.light, SceneLightProfile.lightPower, SceneLightProfile.lightPowerMod, SceneLightProfile.nightRatioCurve, position, Scene.profile, EMono.scene, SceneColorProfile.sea, SceneColorProfile.sky, SceneColorProfile.skyBG, SkyRate, SceneColorProfile.sun, SceneColorProfile.sunSnow, FowProfile.type, ViewHeight, SceneLightProfile.vignetteCurve, and Zoom.

Referenced by Draw(), Scene.OnUpdate(), and LayerTreasureMap.SetMap().

Member Data Documentation

◆ _AnimeSpeedGlobal

readonly int BaseGameScreen._AnimeSpeedGlobal = Shader.PropertyToID("_AnimeSpeedGlobal")
private

Definition at line 47 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _BackDrawPower

readonly int BaseGameScreen._BackDrawPower = Shader.PropertyToID("_BackDrawPower")
private

Definition at line 17 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _camPos

Vector3 BaseGameScreen._camPos
private

Definition at line 161 of file BaseGameScreen.cs.

Referenced by RefreshPosition().

◆ _FogColor

readonly int BaseGameScreen._FogColor = Shader.PropertyToID("_FogColor")
private

Definition at line 29 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _FogStrength

readonly int BaseGameScreen._FogStrength = Shader.PropertyToID("_FogStrength")
private

Definition at line 27 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _FowColor

readonly int BaseGameScreen._FowColor = Shader.PropertyToID("_FowColor")
private

Definition at line 31 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _LightPower

readonly int BaseGameScreen._LightPower = Shader.PropertyToID("_LightPower")
private

Definition at line 45 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _NightRate

readonly int BaseGameScreen._NightRate = Shader.PropertyToID("_NightRate")
private

Definition at line 23 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _Offset

readonly int BaseGameScreen._Offset = Shader.PropertyToID("_Offset")
private

Definition at line 41 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _randomPoint

Point BaseGameScreen._randomPoint = new Point()
private

Definition at line 163 of file BaseGameScreen.cs.

Referenced by GetRandomPoint().

◆ _ScreenFlash

readonly int BaseGameScreen._ScreenFlash = Shader.PropertyToID("_ScreenFlash")
private

Definition at line 49 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _SeaColor

readonly int BaseGameScreen._SeaColor = Shader.PropertyToID("_SeaColor")
private

Definition at line 35 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _SkyBGColor

readonly int BaseGameScreen._SkyBGColor = Shader.PropertyToID("_SkyBGColor")
private

Definition at line 39 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _SkyColor

readonly int BaseGameScreen._SkyColor = Shader.PropertyToID("_SkyColor")
private

Definition at line 37 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _SkyLevel

readonly int BaseGameScreen._SkyLevel = Shader.PropertyToID("_SkyLevel")
private

Definition at line 21 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _Snow

readonly int BaseGameScreen._Snow = Shader.PropertyToID("_Snow")
private

Definition at line 19 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _SunColor

readonly int BaseGameScreen._SunColor = Shader.PropertyToID("_SunColor")
private

Definition at line 33 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _ViewHeight

readonly int BaseGameScreen._ViewHeight = Shader.PropertyToID("_ViewHeight")
private

Definition at line 25 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ _Zoom

readonly int BaseGameScreen._Zoom = Shader.PropertyToID("_Zoom")
private

Definition at line 43 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ camPos

Vector3 BaseGameScreen.camPos
protected

Definition at line 141 of file BaseGameScreen.cs.

Referenced by RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ camSpeed2

float BaseGameScreen.camSpeed2

Definition at line 53 of file BaseGameScreen.cs.

Referenced by ScrollAxis().

◆ focusFix

Vector3 BaseGameScreen.focusFix

Definition at line 71 of file BaseGameScreen.cs.

Referenced by Draw(), RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ focusOption

FocusOption BaseGameScreen.focusOption

Definition at line 133 of file BaseGameScreen.cs.

Referenced by Draw(), DramaManager.ParseLine(), and RefreshPosition().

◆ focusPos

Vector3? BaseGameScreen.focusPos

Definition at line 136 of file BaseGameScreen.cs.

Referenced by Draw(), FocusImmediate(), FocusPC(), and RefreshPosition().

◆ focusSpeed

float BaseGameScreen.focusSpeed

Definition at line 96 of file BaseGameScreen.cs.

Referenced by RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ focusSpeedSlow

float BaseGameScreen.focusSpeedSlow

Definition at line 99 of file BaseGameScreen.cs.

Referenced by RefreshPosition().

◆ focusSpeedSlow2

float BaseGameScreen.focusSpeedSlow2

Definition at line 102 of file BaseGameScreen.cs.

◆ forcePrecision

float BaseGameScreen.forcePrecision

Definition at line 127 of file BaseGameScreen.cs.

◆ grid

Grid BaseGameScreen.grid

Definition at line 120 of file BaseGameScreen.cs.

Referenced by BaseTileMap.Draw(), and AM_Cinema.OnUpdateInput().

◆ guide

◆ height

◆ heightLight

float BaseGameScreen.heightLight

Definition at line 55 of file BaseGameScreen.cs.

◆ instantFocus

bool BaseGameScreen.instantFocus

◆ isCameraMoving

bool BaseGameScreen.isCameraMoving

Definition at line 130 of file BaseGameScreen.cs.

◆ lastPos

Vector3 BaseGameScreen.lastPos

Definition at line 85 of file BaseGameScreen.cs.

Referenced by RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ mapLimit

Rect BaseGameScreen.mapLimit

Definition at line 87 of file BaseGameScreen.cs.

Referenced by RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ moonLevel

int BaseGameScreen.moonLevel

Definition at line 112 of file BaseGameScreen.cs.

Referenced by GameScreen.OnActivate().

◆ nextMove

float BaseGameScreen.nextMove

Definition at line 93 of file BaseGameScreen.cs.

◆ overlayShadow

MeshRenderer BaseGameScreen.overlayShadow

Definition at line 122 of file BaseGameScreen.cs.

Referenced by Activate(), and RefreshSky().

◆ paddingOffset

Vector2 BaseGameScreen.paddingOffset

Definition at line 83 of file BaseGameScreen.cs.

Referenced by Draw(), RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ paddings

Vector2 BaseGameScreen.paddings

Definition at line 81 of file BaseGameScreen.cs.

Referenced by RefreshScreenSize().

◆ pcOrbit

PCOrbit BaseGameScreen.pcOrbit

◆ planeAngle

Vector3 BaseGameScreen.planeAngle

Definition at line 77 of file BaseGameScreen.cs.

Referenced by RefreshPosition().

◆ planeSpeed

Vector3 BaseGameScreen.planeSpeed

Definition at line 79 of file BaseGameScreen.cs.

Referenced by GameScreen.OnActivate().

◆ position

◆ pushBack

Vector3 BaseGameScreen.pushBack
protected

Definition at line 143 of file BaseGameScreen.cs.

Referenced by RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ pushbackSpeed

float BaseGameScreen.pushbackSpeed

Definition at line 57 of file BaseGameScreen.cs.

Referenced by RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ screenFixX

float BaseGameScreen.screenFixX

Definition at line 145 of file BaseGameScreen.cs.

Referenced by RefreshScreenSize().

◆ screenFixX2

float BaseGameScreen.screenFixX2

Definition at line 147 of file BaseGameScreen.cs.

Referenced by RefreshPosition(), and RefreshScreenSize().

◆ screenFixX3

float BaseGameScreen.screenFixX3

Definition at line 149 of file BaseGameScreen.cs.

Referenced by RefreshScreenSize().

◆ screenFixX4

float BaseGameScreen.screenFixX4

Definition at line 151 of file BaseGameScreen.cs.

Referenced by RefreshPosition().

◆ screenFixY

float BaseGameScreen.screenFixY

Definition at line 153 of file BaseGameScreen.cs.

Referenced by RefreshScreenSize().

◆ screenFixY2

float BaseGameScreen.screenFixY2

Definition at line 155 of file BaseGameScreen.cs.

Referenced by RefreshPosition(), and RefreshScreenSize().

◆ screenFixY3

float BaseGameScreen.screenFixY3

Definition at line 157 of file BaseGameScreen.cs.

Referenced by RefreshScreenSize().

◆ screenFixY4

float BaseGameScreen.screenFixY4

Definition at line 159 of file BaseGameScreen.cs.

Referenced by RefreshPosition().

◆ scrollX

int BaseGameScreen.scrollX

Definition at line 108 of file BaseGameScreen.cs.

Referenced by Draw(), Focus(), RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ scrollY

int BaseGameScreen.scrollY

Definition at line 110 of file BaseGameScreen.cs.

Referenced by Draw(), Focus(), RefreshPosition(), and GameScreenElona.RefreshPosition().

◆ SharpenAmount

float BaseGameScreen.SharpenAmount

Definition at line 51 of file BaseGameScreen.cs.

◆ snapSize

Vector2 BaseGameScreen.snapSize

Definition at line 59 of file BaseGameScreen.cs.

Referenced by SnapScreen().

◆ targetZoom

float BaseGameScreen.targetZoom = 0.5f

◆ targetZoomIndex

int BaseGameScreen.targetZoomIndex

Definition at line 168 of file BaseGameScreen.cs.

Referenced by ModTargetZoomIndex(), RefreshPosition(), and SetTargetZoomIndex().

◆ tileAlign

◆ tileMap

◆ tileOffsetHeight

Vector3 BaseGameScreen.tileOffsetHeight

Definition at line 73 of file BaseGameScreen.cs.

◆ tileSelector

◆ tileSize

Vector2 BaseGameScreen.tileSize

Definition at line 61 of file BaseGameScreen.cs.

Referenced by GameScreen.SetUnitSize(), and GameScreenElona.SetUnitSize().

◆ tileViewSize

Vector2 BaseGameScreen.tileViewSize

Definition at line 67 of file BaseGameScreen.cs.

Referenced by GameScreen.SetUnitSize(), and GameScreenElona.SetUnitSize().

◆ tileWeight

◆ tileWeightHeight

Vector3 BaseGameScreen.tileWeightHeight

Definition at line 75 of file BaseGameScreen.cs.

◆ tileWorldSize

Vector2 BaseGameScreen.tileWorldSize

◆ width

◆ Zoom

◆ zoomPos

Vector3 BaseGameScreen.zoomPos

Definition at line 174 of file BaseGameScreen.cs.

Referenced by Draw(), and ModTargetZoomIndex().

◆ zoomTimer

float BaseGameScreen.zoomTimer

Definition at line 172 of file BaseGameScreen.cs.

Referenced by Draw(), SetTargetZoomIndex(), and SetZoom().

Property Documentation

◆ camSupport

CameraSupport BaseGameScreen.camSupport
getprotected

◆ fixFocus

bool BaseGameScreen.fixFocus
get

Definition at line 176 of file BaseGameScreen.cs.

Referenced by Draw(), and RefreshPosition().

◆ IsGameScreen

virtual bool BaseGameScreen.IsGameScreen
get

Definition at line 188 of file BaseGameScreen.cs.

Referenced by Activate(), and Draw().

◆ IsLocalMap

virtual bool BaseGameScreen.IsLocalMap
get

Definition at line 190 of file BaseGameScreen.cs.

Referenced by Activate(), and RefreshSky().

◆ SkyRate

virtual float BaseGameScreen.SkyRate
get

Definition at line 184 of file BaseGameScreen.cs.

Referenced by UpdateShaders().

◆ TargetZoom

virtual float BaseGameScreen.TargetZoom
get

◆ transFocus

Transform BaseGameScreen.transFocus
getprotected

Definition at line 182 of file BaseGameScreen.cs.

Referenced by Draw(), and RefreshPosition().

◆ ViewHeight

virtual float BaseGameScreen.ViewHeight
get

Definition at line 186 of file BaseGameScreen.cs.

Referenced by UpdateShaders().


The documentation for this class was generated from the following file: