Skip to content

Commit 023bc15

Browse files
committed
Compaitability Support, Refactored UI & more
## Features 1- Implemented MouseInput in addition to Cursors. 2- Implemented Marks. 3- Probably the most appealing feature, support for 7.4 through 7.7 (hopefully). 4- Added tile cursor (blue square around the tile your mouse is hovering). 5- Added object cursor (yellow mask on the object you are about to interact with.) 6- Reformatted appearances for easy catchup with tibia 11 if desired. 7- Dat-Sprites-Converter is supporting more features, including multithreading for faster conversion. 8- Support for event priorities, avoiding corruption between diffierent modules. 9- Implemeted IUseWidget, IMoveWidget to handle using/moving an object (from map/body view/container view) 10- Implemented Regular Controls & Left-Smart-Click mouse presets. 11- Implemented highlighting objects in shaders (i.e the object/creature you are doing an action on) 12- Implemented LegacyAnimator to work with older clients prior to enhanced animations. ## Fixes 1- InputHandler now checks if "shift" is either pressed or not. 2- Drawing marks works with a maximum limit of 15 thin squares or 7 bold squares (or mix of them). 3- CreatureStatuPanel now uses progressbar instead & is using BinarySearch instead for better performance. 4- Fixed where Attack (red mark) identifier won't get removed after a creature has moved outside of the screen! 5- Fixed some inline enumerations and added them to an Enum. 6- Generalized the usage of InputHandler:Mouse so that it's easily hooked up into any module. 7- Creatures got invalid position when they were created causing the CreatureStatusPanel not to show (the position is outside of bounds). 8- Correctly showing the uncovered tiles (i.e diagonal tiles of stairs contigues to. 9- Reformatted appearances to resolve instable attributes (fixes stack position of some items, ...) 10- Support for orange messages (in console) 11- Fixed speech categories & reformatted enums to have First/Last 12- Cleaned some code and formated some files to follow the code structure. 13- Fixed MissleInstance, it should correctly animate and move now. ## Known Issues 1- Fixes#6, this caused some creatures that are completely covered to be drawn, causing more times to be drawn also, this shows their name in green and that's not how the game works. 2- TextualEffects are implemented but no respective UI element is connected to them! 3- Some map parts are yet not working as they'd do in a normal Tibia Client 4- Fixes#8 is suspected to be 100% correct. ## TODO: Focus 1- Fix minimap 2- Implement containers 3- Implement an interface for version management i.e the UI of inventory module has got changes through versions, we want the client to look exactly as it looked on those version.
1 parent 27494b8 commit 023bc15

212 files changed

Lines changed: 17911 additions & 8084 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
3.1 KB
Loading

OpenTibia/Assets/Images/Game/MarksFrames.png.meta

Lines changed: 121 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
1.04 KB
Loading

OpenTibia/Assets/Images/Game/TileCursor.png.meta

Lines changed: 121 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

OpenTibia/Assets/Materials/ObjectType.shader renamed to OpenTibia/Assets/Materials/AppearanceType.shader

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
Shader "OpenTibiaUnity/ObjectType" {
1+
Shader "OpenTibiaUnity/AppearanceType" {
22
Properties {
3-
[NoScaleOffset] _MainTex("MainTexture", 2D) = "white" {}
3+
[NoScaleOffset] _MainTex("Main Texture", 2D) = "white" {}
4+
_HighlightColor("Highlight Color", Color) = (1.0,1.0,1.0,1.0)
5+
_HighlightOpacity("Highlight Opacity", Float) = 0
46
}
57

68
SubShader {
@@ -26,6 +28,8 @@
2628
};
2729

2830
sampler2D _MainTex;
31+
fixed4 _HighlightColor;
32+
fixed _HighlightOpacity;
2933

3034
float4 _MainTex_ST;
3135

@@ -37,8 +41,10 @@
3741
}
3842

3943
fixed4 frag(VERT_OUT i) : SV_Target {
40-
fixed4 _MainTex_RGBA = tex2D(_MainTex, i.uv0);
41-
return _MainTex_RGBA;
44+
fixed4 _RegularColor = tex2D(_MainTex, i.uv0);
45+
fixed3 _Blended = lerp(_RegularColor.rgb, _HighlightColor.rgb, _HighlightOpacity);
46+
fixed4 _BlendedAndMasked = fixed4(_Blended, 1.0) * _RegularColor.a;
47+
return _BlendedAndMasked;
4248
}
4349

4450
ENDCG
File renamed without changes.

OpenTibia/Assets/Materials/DefaultMaterial.mat renamed to OpenTibia/Assets/Materials/AppearanceTypeMaterial.mat

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Material:
77
m_CorrespondingSourceObject: {fileID: 0}
88
m_PrefabInstance: {fileID: 0}
99
m_PrefabAsset: {fileID: 0}
10-
m_Name: DefaultMaterial
10+
m_Name: AppearanceTypeMaterial
1111
m_Shader: {fileID: 4800000, guid: aa855a65605987047a4fa37d8229a458, type: 3}
1212
m_ShaderKeywords: ETC1_EXTERNAL_ALPHA
1313
m_LightmapFlags: 4
@@ -112,6 +112,7 @@ Material:
112112
- _GlossMapScale: 1
113113
- _Glossiness: 0.5
114114
- _GlossyReflections: 1
115+
- _HighlightOpacity: 0
115116
- _Metallic: 0
116117
- _Mode: 0
117118
- _OcclusionStrength: 1
@@ -137,7 +138,7 @@ Material:
137138
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
138139
- _Flip: {r: 1, g: 1, b: 1, a: 1}
139140
- _HeadColor: {r: 1, g: 0.85, b: 0.014, a: 1}
140-
- _HighlightColor: {r: 1, g: 1, b: 1, a: 1}
141+
- _HighlightColor: {r: 1, g: 0.88235295, b: 0.21568628, a: 0}
141142
- _LegsColor: {r: 1, g: 1, b: 1, a: 1}
142143
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
143144
- _Specular: {r: 0, g: 0, b: 0, a: 0}

OpenTibia/Assets/Materials/DefaultMaterial.mat.meta renamed to OpenTibia/Assets/Materials/AppearanceTypeMaterial.mat.meta

File renamed without changes.

OpenTibia/Assets/Materials/LightSurface.shader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Shader "OpenTibiaUnity/LightSurface" {
22
Properties {
3-
[NoScaleOffset] _MainTex("MainTexture", 2D) = "white" {}
3+
[NoScaleOffset] _MainTex("Main Texture", 2D) = "white" {}
44
}
55

66
SubShader {

OpenTibia/Assets/Materials/Lightmap.shader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Shader "OpenTibiaUnity/Lightmap" {
22
Properties {
3-
[NoScaleOffset] _MainTex("MainTexture", 2D) = "white" {}
3+
[NoScaleOffset] _MainTex("Main Texture", 2D) = "white" {}
44
}
55

66
SubShader {

0 commit comments

Comments
 (0)