Browse Source

(#133) Additional work

rexim 4 years ago
parent
commit
52fb92f74a
3 changed files with 8 additions and 1 deletions
  1. 3 0
      sample.txt
  2. 3 0
      src/emote_downloader.cpp
  3. 2 1
      src/vodus_emotes.cpp

+ 3 - 0
sample.txt

@@ -4,6 +4,9 @@
 [0:00:02] <zhiayang> AYAYA AYAYA AYAYA AYAYA AYAYA AYAYA AYAYA AYAYA AYAYA AYAYA
 [0:00:02.50] <Tsoding> tsodinW tsodinW tsodinW tsodinW tsodinW tsodinW tsodinW tsodinW 
 [0:00:03] <herrhotzenplotz> phpHop phpHop phpHop phpHop phpHop phpHop phpHop phpHop phpHop phpHop
+[0:00:03.50] <herrhotzenplotz> 😂 😂 😂 😂 😂 😂 😂 😂 😂 😂
+[0:00:03.60] <herrhotzenplotz> 🅱 🅱 🅱 🅱 🅱 🅱 🅱 🅱 🅱 🅱 🅱 
+[0:00:03.70] <herrhotzenplotz> 🇯🇵 👩🏾 ? 
 [0:00:04] <Tsoding> HELL YEEEAH BROTHAA
 [0:00:04] <igooddoog> KKoooona KKoooona KKoooona KKoooona KKoooona KKoooona KKoooona KKoooona KKoooona
 [0:00:05] <igooddoog> KKona KKona KKona KKona KKona KKona KKona KKona KKona

+ 3 - 0
src/emote_downloader.cpp

@@ -597,5 +597,8 @@ int main(int argc, char **argv)
         if(still_alive) curl_multi_wait(cm, NULL, 0, 1000, NULL);
     } while (still_alive || (transfers < downloads.size));
 
+    // TODO: emote_downloader should download and setup the twitter emoji pack
+    // Twitter Emoji Pack: https://twemoji.twitter.com/
+
     return 0;
 }

+ 2 - 1
src/vodus_emotes.cpp

@@ -89,7 +89,7 @@ struct Emote
     }
 };
 
-const size_t EMOTE_MAPPING_CAPACITY = 1021;
+const size_t EMOTE_MAPPING_CAPACITY = 5000;
 const size_t EMOTE_GIFS_CAPACITY = EMOTE_MAPPING_CAPACITY;
 
 String_View file_extension(String_View filename)
@@ -208,6 +208,7 @@ struct Emote_Cache
             abort();
         }
 
+        // TODO: Emote_Cache::populate_from_file should crash if we don't have enough emote capacity
         while (mapping_csv.unwrap.count > 0 && emote_mapping_count < EMOTE_MAPPING_CAPACITY) {
             auto line = mapping_csv.unwrap.chop_by_delim('\n');
             auto name = line.chop_by_delim(',');