aboutsummaryrefslogtreecommitdiff
path: root/analyzer/analyzer.h
blob: 9e5097643240c91cbafcfc6b6a2ace75d567b164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// analyzer.h
// functions for analyzing the packets received from the game server

#include "parser/fight_results/fight_results.h"
#include "structures/array.h"
#include "structures/hashmap.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