Terraria
v1.4.4.9
Terraria source code documentation
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Events
_
a
c
d
e
f
i
l
m
o
p
r
s
t
u
w
Files
File List
File Members
All
Enumerations
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Properties
Events
Macros
Loading...
Searching...
No Matches
TestHighFPSIssues.cs
Go to the documentation of this file.
1
using
System.Collections.Generic
;
2
using
Microsoft.Xna.Framework
;
3
using
Terraria.GameInput
;
4
5
namespace
Terraria
;
6
7
public
class
TestHighFPSIssues
8
{
9
private
static
List<double>
_tapUpdates
=
new
List<double>
();
10
11
private
static
List<double>
_tapUpdateEnds
=
new
List<double>
();
12
13
private
static
List<double>
_tapDraws
=
new
List<double>
();
14
15
private
static
int
conU
;
16
17
private
static
int
conUH
;
18
19
private
static
int
conD
;
20
21
private
static
int
conDH
;
22
23
private
static
int
race
;
24
25
public
static
void
TapUpdate
(
GameTime
gt
)
26
{
27
_tapUpdates
.Add(
gt
.TotalGameTime.TotalMilliseconds);
28
conD
= 0;
29
race
--;
30
if
(++
conU
>
conUH
)
31
{
32
conUH
=
conU
;
33
}
34
}
25
public
static
void
TapUpdate
(
GameTime
gt
) {
…
}
35
36
public
static
void
TapUpdateEnd
(
GameTime
gt
)
37
{
38
_tapUpdateEnds
.Add(
gt
.TotalGameTime.TotalMilliseconds);
39
}
36
public
static
void
TapUpdateEnd
(
GameTime
gt
) {
…
}
40
41
public
static
void
TapDraw
(
GameTime
gt
)
42
{
43
_tapDraws
.Add(
gt
.TotalGameTime.TotalMilliseconds);
44
conU
= 0;
45
race
++;
46
if
(++
conD
>
conDH
)
47
{
48
conDH
=
conD
;
49
}
50
}
41
public
static
void
TapDraw
(
GameTime
gt
) {
…
}
51
52
public
static
void
Update
(
GameTime
gt
)
53
{
54
if
(
PlayerInput
.
Triggers
.Current.Down)
55
{
56
race
= (
conUH
= (
conDH
= 0));
57
}
58
double
num = gt.TotalGameTime.TotalMilliseconds - 5000.0;
59
while
(
_tapUpdates
.Count > 0 &&
_tapUpdates
[0] < num)
60
{
61
_tapUpdates
.RemoveAt(0);
62
}
63
while
(
_tapDraws
.Count > 0 &&
_tapDraws
[0] < num)
64
{
65
_tapDraws
.RemoveAt(0);
66
}
67
while
(
_tapUpdateEnds
.Count > 0 &&
_tapUpdateEnds
[0] < num)
68
{
69
_tapUpdateEnds
.RemoveAt(0);
70
}
71
Main.versionNumber =
"total (u/d) "
+ _tapUpdates.Count +
" "
+ _tapUpdateEnds.Count +
" "
+
race
+
" "
+
conUH
+
" "
+
conDH
;
72
Main
.
NewText
(
Main
.
versionNumber
);
73
}
52
public
static
void
Update
(
GameTime
gt
) {
…
}
74
}
7
public
class
TestHighFPSIssues
{
…
};
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
Terraria.GameInput.PlayerInput.Triggers
static TriggersPack Triggers
Definition
PlayerInput.cs:192
Terraria.GameInput.PlayerInput
Definition
PlayerInput.cs:18
Terraria.Main.versionNumber
static string versionNumber
Definition
Main.cs:303
Terraria.Main.NewText
static void NewText(string newText, byte R=byte.MaxValue, byte G=byte.MaxValue, byte B=byte.MaxValue)
Definition
Main.cs:61429
Terraria.Main
Definition
Main.cs:79
Terraria.TestHighFPSIssues.TapDraw
static void TapDraw(GameTime gt)
Definition
TestHighFPSIssues.cs:41
Terraria.TestHighFPSIssues.TapUpdateEnd
static void TapUpdateEnd(GameTime gt)
Definition
TestHighFPSIssues.cs:36
Terraria.TestHighFPSIssues.conU
static int conU
Definition
TestHighFPSIssues.cs:15
Terraria.TestHighFPSIssues.conD
static int conD
Definition
TestHighFPSIssues.cs:19
Terraria.TestHighFPSIssues.conDH
static int conDH
Definition
TestHighFPSIssues.cs:21
Terraria.TestHighFPSIssues.Update
static void Update(GameTime gt)
Definition
TestHighFPSIssues.cs:52
Terraria.TestHighFPSIssues._tapDraws
static List< double > _tapDraws
Definition
TestHighFPSIssues.cs:13
Terraria.TestHighFPSIssues._tapUpdates
static List< double > _tapUpdates
Definition
TestHighFPSIssues.cs:9
Terraria.TestHighFPSIssues.conUH
static int conUH
Definition
TestHighFPSIssues.cs:17
Terraria.TestHighFPSIssues.race
static int race
Definition
TestHighFPSIssues.cs:23
Terraria.TestHighFPSIssues.TapUpdate
static void TapUpdate(GameTime gt)
Definition
TestHighFPSIssues.cs:25
Terraria.TestHighFPSIssues._tapUpdateEnds
static List< double > _tapUpdateEnds
Definition
TestHighFPSIssues.cs:11
Terraria.TestHighFPSIssues
Definition
TestHighFPSIssues.cs:8
Microsoft.Xna.Framework
Definition
AlphaTestEffect.cs:1
System.Collections.Generic
Definition
IHashKeyCollection.cs:1
Terraria.GameInput
Definition
CursorMode.cs:1
Terraria
Definition
Achievement.cs:7
source
Terraria
TestHighFPSIssues.cs
Generated by
1.10.0