aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-09-25 03:40:44 +0300
committerCrystalwarrior <varsash@gmail.com>2019-09-25 03:40:44 +0300
commitb67f083506803c3cf075e8872cacb329b063e8b3 (patch)
tree0a31ffc5912fbd309ab5d791acd80a61cc04a805 /include
parenta028b8496e6684f89efc3b8bf7946fb5901faa99 (diff)
Optimize color markdown stuff properly by creating lists and preloading things
Diffstat (limited to 'include')
-rw-r--r--include/courtroom.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/include/courtroom.h b/include/courtroom.h
index 72dec046..d6bf4512 100644
--- a/include/courtroom.h
+++ b/include/courtroom.h
@@ -354,8 +354,29 @@ private:
int realization_state = 0;
int screenshake_state = 0;
int text_color = 0;
- static const int max_colors = 12; //How many unique user colors are possible
- QVector<int> color_row_to_number; //Current color list indexes to real color references
+
+ //How many unique user colors are possible
+ static const int max_colors = 12;
+
+ //Text Color-related optimization:
+ //Current color list indexes to real color references
+ QVector<int> color_row_to_number;
+
+ //List of associated RGB colors for this color index
+ QVector<QColor> color_rgb_list;
+
+ //List of markdown start characters, their index is tied to the color index
+ QStringList color_markdown_start_list;
+
+ //List of markdown end characters, their index is tied to the color index
+ QStringList color_markdown_end_list;
+
+ //Whether or not we're supposed to remove this char during parsing
+ QVector<bool> color_markdown_remove_list;
+
+ //Whether or not this color allows us to play the talking animation
+ QVector<bool> color_markdown_talking_list;
+ //Text Color-related optimization END
bool is_presenting_evidence = false;