This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static void parse() { | |
| try { | |
| String basePath = "C:\\Workspace\\crumbling-islands-arena\\game\\panorama\\localization\\"; | |
| List<String> lines = Files.readAllLines(Paths.get(basePath + "addon_russian.txt")); | |
| Pattern linePattern = Pattern.compile(".*HeroTips_npc_dota_hero_([^\"]*).*"); | |
| Pattern abilityPattern = Pattern.compile("([QWER])</font>:([^<\"]*)(<br/>|\")??"); | |
| List<String> result = new ArrayList<>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "menu_common.as" | |
| IMGUI imGUI; | |
| void Init(string p_level_name) { | |
| } | |
| void DrawGUI() { | |
| imGUI.render(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Graph extends Canvas{ | |
| Timer mainTimer; | |
| Thread mainThread; | |
| BufferStrategy bufferStrategy; | |
| BufferedImage bufferImage = Game.graphConf.createCompatibleImage(Game.screenWidth, Game.screenHeight); | |
| static RenderingHints renderingHints; | |
| float alpha = 0.8f; | |
| int loadLen = 0; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variables ( | |
| Bool "Is in a race" False | |
| Bool "Just finished racing" False | |
| Bool "Already tried racing" False | |
| Number "Race start time" 0 | |
| Number "Race result time" 0 | |
| ) | |
| trigger "Race start" ( | |
| description "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const naive_search_index = []; | |
| for (let folder of folders) { | |
| naive_search_index.push({ | |
| name: folder.title.toLowerCase(), | |
| id: string_id_to_number(folder.id) | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static u32 color_name_to_color_argb(String &color_name) { | |
| char c = *color_name.start; | |
| switch (color_name.length) { | |
| // Red | |
| case 3: return 0xFFE91E63; | |
| case 4: { | |
| if (c == 'B'/*lue*/) return 0xFF2196F3; else | |
| if (c == 'G'/*ray*/) return 0xFF9E9E9E; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Folder_Color* string_to_folder_color(String string) { | |
| static Folder_Color None(0, 0xff555555, 0); | |
| static Folder_Color Purple1(0xFFE1BEE7, 0xff8e24aa, 0xffeecbf4); | |
| static Folder_Color Purple2(0xFFCE93D8, 0xff8e24aa, 0xffe4a8ee); | |
| static Folder_Color Purple3(0xFFBA68C8, 0xfff3e5f5, 0xffcb75da); | |
| static Folder_Color Purple4(0xFF8E24AA, 0xfff3e5f5, 0xffa637c5); | |
| static Folder_Color Indigo1(0xFFD1C4E9, 0xff5e35b1, 0xffddd0f5); | |
| static Folder_Color Indigo2(0xFFB39DDB, 0xff5e35b1, 0xffc7b0ef); | |
| static Folder_Color Indigo3(0xFF9575CD, 0xffede7f6, 0xffa281dd); | |
| static Folder_Color Indigo4(0xFF5E35B1, 0xffede7f6, 0xff7146ca); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <chrono> | |
| struct Object { | |
| int property_to_sort_by; | |
| int property_to_group_by; | |
| }; | |
| int compare_objects(const void* a, const void* b) { | |
| Object* left = (Object*) a; | |
| Object* right = (Object*) b; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <chrono> | |
| const int total_objects = 10000; | |
| int group_identifiers[] = { | |
| 123, | |
| 20, | |
| 3, | |
| 41, | |
| 5893, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bool mat4_invert(mat4& m, mat4& inv) { | |
| double det; | |
| inv.m11 = m.m22 * m.m33 * m.m44 - | |
| m.m22 * m.m34 * m.m43 - | |
| m.m32 * m.m23 * m.m44 + | |
| m.m32 * m.m24 * m.m43 + | |
| m.m42 * m.m23 * m.m34 - | |
| m.m42 * m.m24 * m.m33; |