aboutsummaryrefslogtreecommitdiff
path: root/analyzer/analyzer.h
diff options
context:
space:
mode:
authorMosder <xmosder12@gmail.com>2026-07-28 19:37:29 +0200
committerMosder <xmosder12@gmail.com>2026-07-28 19:37:29 +0200
commita30d6feab718a887edc7eb5b0470faa77677a8c3 (patch)
tree87c97ea0fe71f7d9adbdbe399dea39ae24e53fd6 /analyzer/analyzer.h
parent9e874301350a70a1ba40b5508878d559f68f8f4a (diff)
feat: added a very-very basic total rewards thingy, still needs to do detection through the special packet sent by client and there's a lot of placeholder things and not the best code there. Also - normal items don't stack and they definitely should - that's gonna be a bit of refactoring :)))))))))))
Diffstat (limited to 'analyzer/analyzer.h')
-rw-r--r--analyzer/analyzer.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/analyzer/analyzer.h b/analyzer/analyzer.h
index 1b8d2f9..15bddf2 100644
--- a/analyzer/analyzer.h
+++ b/analyzer/analyzer.h
@@ -1,7 +1,32 @@
// analyzer.h
// functions for analyzing the packets received from the game server
+#include "structures/hashmap.h"
+#include "structures/array.h"
+#include "parser/fight_results/fight_results.h"
+
+#ifndef ANALYZER_H
+#define ANALYZER_H
+
+#define MAX_NAME_LENGTH 11
+
+typedef struct {
+ int exp;
+ int gold;
+ DynArray items[MAX_ITEM_TYPE]; // item type -> dynamic array of items
+ int psycho;
+ HashMap *saturations; // saturation type -> total gained
+} TotalRewards;
+
+typedef struct {
+ size_t fight_count;
+ char curr_character[MAX_NAME_LENGTH+1];
+ HashMap *characters; // nick -> TotalRewards
+} FileAnalState;
+
// analyze file
// params:
// - path - path to the file to analyze
extern void analyze_file(char *path);
+
+#endif