@@ -9,29 +9,29 @@ Content-Transfer-Encoding: 8bit
9
9
更多统计信息
10
10
way-zer <
[email protected] > on 2024/7/21
11
11
---
12
- .../ arc/graphics/g2d/MySortedSpriteBatch .java | 27 +++++++++++++++++++
13
- core/src/mindustry/ClientLauncher.java | 3 + +-
12
+ core/src/ arc/graphics/g2d/MySpriteBatch .java | 26 +++++++++++++++++++
13
+ core/src/mindustry/ClientLauncher.java | 2 +-
14
14
core/src/mindustry/core/Logic.java | 3 +++
15
15
.../mindustry/ui/fragments/HudFragment.java | 7 +++++
16
16
core/src/mindustryX/Hooks.java | 1 +
17
17
core/src/mindustryX/features/DebugUtil.java | 21 +++++++++++++++
18
- 6 files changed, 61 insertions(+), 1 deletion(-)
19
- create mode 100644 core/src/arc/graphics/g2d/MySortedSpriteBatch .java
18
+ 6 files changed, 59 insertions(+), 1 deletion(-)
19
+ create mode 100644 core/src/arc/graphics/g2d/MySpriteBatch .java
20
20
create mode 100644 core/src/mindustryX/features/DebugUtil.java
21
21
22
- diff --git a/core/src/arc/graphics/g2d/MySortedSpriteBatch .java b/core/src/arc/graphics/g2d/MySortedSpriteBatch .java
22
+ diff --git a/core/src/arc/graphics/g2d/MySpriteBatch .java b/core/src/arc/graphics/g2d/MySpriteBatch .java
23
23
new file mode 100644
24
- index 0000000000000000000000000000000000000000..feca84a8eec0f7d514f9aa6be6f82134d8622721
24
+ index 0000000000000000000000000000000000000000..e2bdb30e190a210f25130c423c853892798e4c28
25
25
--- /dev/null
26
- +++ b/core/src/arc/graphics/g2d/MySortedSpriteBatch .java
27
- @@ -0,0 +1,27 @@
26
+ +++ b/core/src/arc/graphics/g2d/MySpriteBatch .java
27
+ @@ -0,0 +1,26 @@
28
28
+ package arc.graphics.g2d;
29
29
+
30
30
+ import arc.graphics.*;
31
31
+ import mindustryX.features.*;
32
32
+
33
33
+ //MDTX: add some DebugUtil count.
34
- + public class MySortedSpriteBatch extends SortedSpriteBatch {
34
+ + public class MySpriteBatch extends SpriteBatch {
35
35
+ @Override
36
36
+ protected void flush(){
37
37
+ DebugUtil.lastFlushCount++;
@@ -40,8 +40,7 @@ index 0000000000000000000000000000000000000000..feca84a8eec0f7d514f9aa6be6f82134
40
40
+
41
41
+ @Override
42
42
+ protected void flushRequests(){
43
- + if(flushing) return;
44
- + DebugUtil.lastVertices += numVertices / 6;
43
+ + DebugUtil.lastVertices += requestVertOffset / 6;
45
44
+ DebugUtil.lastDrawRequests += numRequests;
46
45
+ super.flushRequests();
47
46
+ }
@@ -53,28 +52,20 @@ index 0000000000000000000000000000000000000000..feca84a8eec0f7d514f9aa6be6f82134
53
52
+ }
54
53
+ }
55
54
diff --git a/core/src/mindustry/ClientLauncher.java b/core/src/mindustry/ClientLauncher.java
56
- index 01c14129869a0b38fe0943b0172db597e3b491a5..7c897514ef279333ed007b17a7b4c242880d8b22 100644
55
+ index 6042c38333736e5cb7d33db2e3effa8a1e261ca5..068a243ba87023201aaf0c287e9ee35341e312a3 100644
57
56
--- a/core/src/mindustry/ClientLauncher.java
58
57
+++ b/core/src/mindustry/ClientLauncher.java
59
- @@ -20,6 +20,7 @@ import mindustry.maps.*;
60
- import mindustry.mod.*;
61
- import mindustry.net.*;
62
- import mindustry.ui.*;
63
- + import mindustryX.features.*;
64
-
65
- import static arc.Core.*;
66
- import static mindustry.Vars.*;
67
- @@ -70,7 +71,7 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
58
+ @@ -70,7 +70,7 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
68
59
});
69
60
70
61
UI.loadColors();
71
- - batch = new SortedSpriteBatch ();
72
- + batch = new MySortedSpriteBatch ();
62
+ - batch = new SpriteBatch ();
63
+ + batch = new MySpriteBatch ();
73
64
assets = new AssetManager();
74
65
assets.setLoader(Texture.class, "." + mapExtension, new MapPreviewLoader());
75
66
76
67
diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java
77
- index 7d1a7bb5b951ab9b07c0ad8edfd83e75e57ad751..784e1b493873ee74cd95bae4b1da54ba7d780bd3 100644
68
+ index 59f9b3cdcd0a11e30959e5f8ba2a1cbcaf472cff..788f23d4a1a3b498a0f451f90c426a1b86516e5c 100644
78
69
--- a/core/src/mindustry/core/Logic.java
79
70
+++ b/core/src/mindustry/core/Logic.java
80
71
@@ -16,6 +16,7 @@ import mindustry.type.*;
@@ -85,15 +76,15 @@ index 7d1a7bb5b951ab9b07c0ad8edfd83e75e57ad751..784e1b493873ee74cd95bae4b1da54ba
85
76
86
77
import java.util.*;
87
78
88
- @@ -414 ,6 +415 ,7 @@ public class Logic implements ApplicationListener{
79
+ @@ -415 ,6 +416 ,7 @@ public class Logic implements ApplicationListener{
89
80
90
81
@Override
91
82
public void update(){
92
83
+ var start = Time.nanos();
93
84
Events.fire(Trigger.update);
94
85
universe.updateGlobal();
95
86
96
- @@ -497 ,6 +499 ,7 @@ public class Logic implements ApplicationListener{
87
+ @@ -498 ,6 +500 ,7 @@ public class Logic implements ApplicationListener{
97
88
}else if(netServer.isWaitingForPlayers() && runStateCheck){
98
89
checkGameState();
99
90
}
0 commit comments