Skip to content

Commit 84ac2a4

Browse files
committed
Moved stacks and queue to 'scripts/Game/Collections', added PrintRaw() method to all of them.
1 parent 00ce0c1 commit 84ac2a4

File tree

7 files changed

+22
-8
lines changed

7 files changed

+22
-8
lines changed

scripts/Game/Global/ESE_DynamicQueue.c renamed to scripts/Game/Collections/ESE_DynamicQueue.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ class ESE_DynamicQueue<Class T>
140140
TrimTo(oldArray.Count());
141141
}
142142
// ----------------------------------------------------------------------------------------------------------- //
143+
void PrintRaw()
144+
{
145+
Print(Raw);
146+
}
147+
// ----------------------------------------------------------------------------------------------------------- //
143148
void ESE_DynamicQueue()
144149
{
145150
}

scripts/Game/Global/ESE_DynamicStack.c renamed to scripts/Game/Collections/ESE_DynamicStack.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ class ESE_DynamicStack<Class T>
141141
Resize(oldArray.Count());
142142
}
143143
// ----------------------------------------------------------------------------------------------------------- //
144+
void PrintRaw()
145+
{
146+
Print(Raw);
147+
}
148+
// ----------------------------------------------------------------------------------------------------------- //
144149
void ESE_DynamicStack()
145150
{
146151
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ class ESE_Queue<Class T>
164164
Resize(oldArray.Count());
165165
}
166166
// ----------------------------------------------------------------------------------------------------------- //
167+
void PrintRaw()
168+
{
169+
Print(Raw);
170+
}
171+
// ----------------------------------------------------------------------------------------------------------- //
167172
void ESE_Queue(int size)
168173
{
169174
MaxSize = size;
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ESE_Stack<Class T>
5252
if (topIndex < 0)
5353
{
5454
#ifdef ESE_VERBOSE
55-
Print("" + this + ": Attempted to peek index out of range ["+topIndex+"]", LogLevel.ERROR);
55+
Print("" + this + ": Attempted to pop index out of range ["+topIndex+"]", LogLevel.ERROR);
5656
#endif
5757
return nullValue;
5858
}
@@ -81,7 +81,7 @@ class ESE_Stack<Class T>
8181
if (topIndex < 0)
8282
{
8383
#ifdef ESE_VERBOSE
84-
Print("" + this + ": Attempted to peek index out of range ["+topIndex+"]", LogLevel.ERROR);
84+
Print("" + this + ": Attempted to pop index out of range ["+topIndex+"]", LogLevel.ERROR);
8585
#endif
8686
output = nullValue;
8787
return false;
@@ -164,6 +164,11 @@ class ESE_Stack<Class T>
164164
Resize(oldArray.Count());
165165
}
166166
// ----------------------------------------------------------------------------------------------------------- //
167+
void PrintRaw()
168+
{
169+
Print(Raw);
170+
}
171+
// ----------------------------------------------------------------------------------------------------------- //
167172
void ESE_Stack(int size)
168173
{
169174
MaxSize = size;

scripts/Game/ESE_Entities.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class ESE_Entities
2121
IEntity newEntity = ESE.SpawnPrefab(mat, resource);
2222
@endcode
2323
*/
24-
// #ESE_UPDATE_DOCUMENTATION - changed from using origin to transform
2524
static IEntity SpawnPrefab(vector transform[4], ResourceName prefabName)
2625
{
2726
if (!prefabName)
@@ -127,7 +126,6 @@ class ESE_Entities
127126
}
128127
}
129128
// -----------------------------------------------------------------------------------------------------------
130-
// #ESE_ADD_DOCUMENTATION
131129
/**
132130
Snaps given entity to whatever is underneath it as long as it is less than maxHeight away.
133131
Similar to SCR_TerrainHelper.SnapToTerrain() but uses a trace so it will snap to any entity not just the world terrain
@@ -184,7 +182,6 @@ class ESE_Entities
184182
transform[3] = endpos;
185183
}
186184
// -----------------------------------------------------------------------------------------------------------
187-
// #ESE_ADD_DOCUMENTATION
188185
static void SnapAndOrientToGround(out vector transform[4], IEntity ent, int maxHeight, bool noUnderwater = false)
189186
{
190187
BaseWorld world = GetGame().GetWorld();
@@ -244,7 +241,6 @@ class ESE_Entities
244241

245242
// ------------------------------------------------------------- MODELS & MATERIALS ------------------------------------------------------------- //
246243

247-
// #ESE_ADD_DOCUMENTATION
248244
// To be safe, use a string[256] array as the input for materials, use less for memory optimasation though if needed
249245
static void GetMaterial(IEntity entity, out string materials[], out int numMaterials)
250246
{

scripts/Game/ESE_IO.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class ESE_IO
1313
return readLen;
1414
}
1515

16-
// #ESE_ADD_DOCUMENTATION
1716
// Works like csv reader but using space delimiters instead of commas
1817
static int ReadSpaceDelimitedFileAsArray(string path, inout array<array<string>> output)
1918
{

scripts/Game/ESE_Math.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
class ESE_Math
1010
{
11-
// #ESE_ADD_DOCUMENTATION
1211
static float CeilToNearestMultiple(float number, float multiple)
1312
{
1413
if (multiple != 0 && number != 0)

0 commit comments

Comments
 (0)