Initial commit.
This commit is contained in:
commit
4ecdad09fd
21 changed files with 3909 additions and 0 deletions
2
.gitingore
Normal file
2
.gitingore
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
assets/*.h
|
||||||
|
build*
|
12
.gitmodules
vendored
Normal file
12
.gitmodules
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[submodule "raygui"]
|
||||||
|
path = raygui
|
||||||
|
url = https://github.com/raysan5/raygui.git
|
||||||
|
[submodule "IconFontCppHeaders"]
|
||||||
|
path = IconFontCppHeaders
|
||||||
|
url = https://github.com/juliettef/IconFontCppHeaders.git
|
||||||
|
[submodule "imgui-filebrowser"]
|
||||||
|
path = imgui-filebrowser
|
||||||
|
url = https://github.com/AirGuanZ/imgui-filebrowser.git
|
||||||
|
[submodule "imgui"]
|
||||||
|
path = imgui
|
||||||
|
url = https://github.com/ocornut/imgui.git
|
81
.vscode/settings.json
vendored
Normal file
81
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
{
|
||||||
|
"C_Cpp.default.compileCommands": "builddir\\vscode_compile_commands.json",
|
||||||
|
"files.associations": {
|
||||||
|
"array": "cpp",
|
||||||
|
"atomic": "cpp",
|
||||||
|
"hash_map": "cpp",
|
||||||
|
"bit": "cpp",
|
||||||
|
"*.tcc": "cpp",
|
||||||
|
"bitset": "cpp",
|
||||||
|
"cctype": "cpp",
|
||||||
|
"charconv": "cpp",
|
||||||
|
"chrono": "cpp",
|
||||||
|
"clocale": "cpp",
|
||||||
|
"cmath": "cpp",
|
||||||
|
"codecvt": "cpp",
|
||||||
|
"compare": "cpp",
|
||||||
|
"concepts": "cpp",
|
||||||
|
"condition_variable": "cpp",
|
||||||
|
"csignal": "cpp",
|
||||||
|
"cstdarg": "cpp",
|
||||||
|
"cstddef": "cpp",
|
||||||
|
"cstdint": "cpp",
|
||||||
|
"cstdio": "cpp",
|
||||||
|
"cstdlib": "cpp",
|
||||||
|
"cstring": "cpp",
|
||||||
|
"ctime": "cpp",
|
||||||
|
"cwchar": "cpp",
|
||||||
|
"cwctype": "cpp",
|
||||||
|
"deque": "cpp",
|
||||||
|
"forward_list": "cpp",
|
||||||
|
"list": "cpp",
|
||||||
|
"map": "cpp",
|
||||||
|
"set": "cpp",
|
||||||
|
"string": "cpp",
|
||||||
|
"unordered_map": "cpp",
|
||||||
|
"unordered_set": "cpp",
|
||||||
|
"vector": "cpp",
|
||||||
|
"exception": "cpp",
|
||||||
|
"algorithm": "cpp",
|
||||||
|
"functional": "cpp",
|
||||||
|
"iterator": "cpp",
|
||||||
|
"memory": "cpp",
|
||||||
|
"memory_resource": "cpp",
|
||||||
|
"numeric": "cpp",
|
||||||
|
"optional": "cpp",
|
||||||
|
"random": "cpp",
|
||||||
|
"ratio": "cpp",
|
||||||
|
"source_location": "cpp",
|
||||||
|
"string_view": "cpp",
|
||||||
|
"system_error": "cpp",
|
||||||
|
"tuple": "cpp",
|
||||||
|
"type_traits": "cpp",
|
||||||
|
"utility": "cpp",
|
||||||
|
"fstream": "cpp",
|
||||||
|
"future": "cpp",
|
||||||
|
"initializer_list": "cpp",
|
||||||
|
"iomanip": "cpp",
|
||||||
|
"iosfwd": "cpp",
|
||||||
|
"iostream": "cpp",
|
||||||
|
"istream": "cpp",
|
||||||
|
"limits": "cpp",
|
||||||
|
"mutex": "cpp",
|
||||||
|
"new": "cpp",
|
||||||
|
"numbers": "cpp",
|
||||||
|
"ostream": "cpp",
|
||||||
|
"semaphore": "cpp",
|
||||||
|
"shared_mutex": "cpp",
|
||||||
|
"sstream": "cpp",
|
||||||
|
"stdexcept": "cpp",
|
||||||
|
"stop_token": "cpp",
|
||||||
|
"streambuf": "cpp",
|
||||||
|
"thread": "cpp",
|
||||||
|
"cfenv": "cpp",
|
||||||
|
"cinttypes": "cpp",
|
||||||
|
"typeindex": "cpp",
|
||||||
|
"typeinfo": "cpp",
|
||||||
|
"valarray": "cpp",
|
||||||
|
"variant": "cpp"
|
||||||
|
},
|
||||||
|
"mesonbuild.configureOnOpen": true
|
||||||
|
}
|
1
IconFontCppHeaders
Submodule
1
IconFontCppHeaders
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 321a095aa2704fa8b8c3a2b366eeca247a9825a5
|
BIN
assets/forkawesome-webfont.ttf
Normal file
BIN
assets/forkawesome-webfont.ttf
Normal file
Binary file not shown.
1547
assets/forkawesome.h
Normal file
1547
assets/forkawesome.h
Normal file
File diff suppressed because it is too large
Load diff
194
assets/icon.h
Normal file
194
assets/icon.h
Normal file
|
@ -0,0 +1,194 @@
|
||||||
|
// File: 'icon.png' (8954 bytes)
|
||||||
|
// Exported using binary_to_compressed_c.cpp
|
||||||
|
static const unsigned int icon_size = 8954;
|
||||||
|
static const unsigned int icon_data[8956/4] =
|
||||||
|
{
|
||||||
|
0x474e5089, 0x0a1a0a0d, 0x0d000000, 0x52444849, 0x80000000, 0x80000000, 0x00000608, 0x613ec300, 0x000000cb, 0x47527301, 0xceae0042, 0x0000e91c,
|
||||||
|
0x44490020, 0x9c785441, 0x78779ded, 0xc7f65594, 0x49f4ef3f, 0x4a13a46f, 0x2f49bde8, 0x02c54401, 0x2a022a2e, 0x56588b20, 0x7054fdb1, 0x58aeb055,
|
||||||
|
0x175dd040, 0xe29045c4, 0xc16ba8aa, 0xde94174a, 0x0426bd09, 0x64c90bd2, 0xfdfde532, 0xe98666f1, 0xa4cc9999, 0x99e7df28, 0xbefb9927, 0xde773def,
|
||||||
|
0xf7b9ee73, 0xb9ce7b9e, 0x348a2882, 0x10820814, 0x81c2aaa8, 0xea9b40b6, 0xd881adbf, 0x8fc772ea, 0xf8b99408, 0x81c703e4, 0x639fd5a3, 0x1aa07940,
|
||||||
|
0xe4fa8b68, 0x0410d081, 0xd78c96a0, 0x0c80fd00, 0x1ed02060, 0xab7daa48, 0x1702209c, 0xafc0c380, 0x1b607ac0, 0xca901550, 0x5e0f89eb, 0x0cb78009,
|
||||||
|
0xf847f5f2, 0x123978c9, 0x312187a3, 0xf6a00fbd, 0x4000a2a7, 0x6c06fc07, 0xff56d600, 0x1b2717ef, 0xdbf800a4, 0x31fa6b33, 0x13dbd67e, 0x47180bb8,
|
||||||
|
0x20787a70, 0x05581e70, 0xd80e072c, 0x78816b94, 0x87a7ace0, 0x440845eb, 0x09f97451, 0xa07ebd46, 0x901cf019, 0xbcb3d489, 0xe08208fa, 0xac41bdf5,
|
||||||
|
0x32f03f73, 0x57d00eb0, 0x5301e597, 0xeed1fa6b, 0x8f8c1278, 0xdb500d5b, 0xbd639909, 0x15d7d63e, 0x81dc0198, 0x22ddf2a4, 0x7e45522e, 0xac30fd89,
|
||||||
|
0x9569cb55, 0x949b4a14, 0x18724fea, 0x08689b4d, 0xd70828d3, 0xcad3082a, 0x7f48d309, 0x4ceb2e01, 0x5234ae5c, 0xff5a33a6, 0xe3a7973f, 0xf5b97658,
|
||||||
|
0x9ca72273, 0x1d932aca, 0x3528f89d, 0x5f7ac5b9, 0xd305977e, 0xdd3c0f80, 0xc0da5750, 0x2190011f, 0x900baecd, 0x442dda24, 0xf195f451, 0xc0998103,
|
||||||
|
0x926e9e8d, 0xe6cc04c9, 0x4f4eed2b, 0x73a3250a, 0x639d192c, 0x8621d819, 0x025af166, 0x2090a0b7, 0xb726708a, 0x0a87cd82, 0x80a070d9, 0x380a070d,
|
||||||
|
0x7ac2b17d, 0x30172e5d, 0x5a66bc99, 0xa4aad211, 0x2d8207c6, 0xc0052e08, 0x0326d303, 0xeae88173, 0xf1807bef, 0xdaa4cb48, 0x6af01060, 0xd0975ff5,
|
||||||
|
0x1ed6e4a8, 0x3391a218, 0x23224fba, 0xb433c67b, 0x71a92c4b, 0xf7925a9a, 0x7573670f, 0xc050386c, 0xf9723b77, 0xbb25fb66, 0xda5455f6, 0x52950b6b,
|
||||||
|
0x6cc19546, 0xf816345b, 0xc13a1bcc, 0x045f0214, 0x13e04ee0, 0x48c5e517, 0x07e83b8c, 0x4de044fd, 0x6e9aeee0, 0x8605cb94, 0xaee38d77, 0xf4c6148c,
|
||||||
|
0xefaab24b, 0x0ad28286, 0xc96f9f23, 0x6cfaf961, 0xb02c1e36, 0xf01e50d3, 0xcea1a41f, 0x20b526a3, 0x8be08218, 0x5a049c00, 0x08e7a9ba, 0xd9700d70,
|
||||||
|
0xe00aba4b, 0x2045e061, 0x7a62f1c2, 0x73272852, 0x5a4b9b24, 0xb7e996bc, 0x8caee0b4, 0xeba31214, 0x1be7b56b, 0x592bf2b2, 0xb79b3ebe, 0x61493cbe,
|
||||||
|
0xc626a199, 0x03cf0115, 0x4f6603ef, 0x85e04237, 0x88015bc0, 0x5f2d0a06, 0x5a0a3542, 0xf0708424, 0x3deda96c, 0x6996912b, 0xd2006135, 0x78eced8f,
|
||||||
|
0x4b562521, 0x800e8176, 0x79c34df6, 0x2674f6e6, 0xa941490c, 0x5e80f008, 0xafcac807, 0x9ba3fba4, 0xb2a92fc8, 0x8b341f9b, 0x6e6ce10f, 0xf647ab85,
|
||||||
|
0x19220f00, 0x90223c97, 0x00ade042, 0x7b4e0734, 0xc003df51, 0x64d73742, 0x3cfe9248, 0xbdf6661e, 0x733344db, 0xfba33a6c, 0x227c0624, 0x9a305757,
|
||||||
|
0xf8cc8644, 0x8599ad8d, 0x9e33d0dc, 0x4d89bd0a, 0x9b680b07, 0x2cd1c61a, 0x08d24a8f, 0xa75e02cc, 0x28106d06, 0xa4059021, 0x07782b96, 0x3ca2e6e8,
|
||||||
|
0x3652c919, 0x2be6071b, 0x521352e4, 0xf27cb562, 0xcdb60f4c, 0x7dadc01d, 0x01f32f1b, 0xc23d2e66, 0x5242ccd6, 0xfc7cb4e3, 0x6feb3764, 0x3758f259,
|
||||||
|
0x9dd13d96, 0xd26968c4, 0xbd3854aa, 0x64d2057e, 0xc12047f8, 0xed408d13, 0x002df89b, 0x546bc696, 0x20d4fc76, 0xc76d6ccd, 0x5ec091f5, 0x15adb324,
|
||||||
|
0x4bd23149, 0xfa780410, 0xf91c56b6, 0x0e770677, 0x39b7f64a, 0x6cdf060d, 0x5fdbc4bf, 0x90a9429e, 0x1e8ce9f1, 0xaca845c4, 0x9ee004d7, 0x5d1c2961,
|
||||||
|
0xa363c198, 0xc4e9625b, 0xc75a71a9, 0xf605ae6a, 0x8b75ff55, 0xdf810840, 0x3132d002, 0x486efb84, 0x44cab2a3, 0xdb5094eb, 0x0f80ad4b, 0x3fef7e91,
|
||||||
|
0x2680ef80, 0x820837b6, 0x25614e40, 0xb1c5bbc3, 0xccc1bdff, 0x835db7b9, 0x83fbd59b, 0x263ab9b3, 0x2887ddcd, 0xb93ebc8a, 0x45dafd1d, 0x222fbcbb,
|
||||||
|
0xfbbcc144, 0xc167b03a, 0x8e748620, 0x875f2b25, 0xccc4e64c, 0xf04d2404, 0x829a2792, 0x104ad420, 0x2c04356a, 0xee89d698, 0xcf1c91e9, 0xbd25da76,
|
||||||
|
0xb48ed81d, 0x9d6a71c4, 0xef302152, 0xf2fc8ebe, 0xa5da5f4a, 0x09a6d586, 0x4655060d, 0xdf5f6333, 0x2ae5d14d, 0x892fd2fe, 0xb7756e27, 0x4e82ba60,
|
||||||
|
0xff59c2cd, 0x98de3f5a, 0xb3b91ed2, 0x7995c000, 0xc34847d3, 0x2b51c043, 0x64a8d001, 0x27a3367c, 0x574a2111, 0x7ed97b97, 0x54930e89, 0x28527a61,
|
||||||
|
0xc01cdf5b, 0xd45ba363, 0xc3837486, 0x64c9ff53, 0x5a22b1fb, 0xe4b28626, 0x3f5eaeb1, 0xd4f00827, 0xcf367498, 0x84f34fe9, 0x6f324010, 0xf012603b,
|
||||||
|
0xbee21015, 0x40b4ff1e, 0xe98127ad, 0x1fd62149, 0xaeba52ac, 0x8a04104e, 0x6e31572e, 0xe7bb0a70, 0xab67a20f, 0x6d92dac8, 0xe5bd5850, 0x3ebe0b22,
|
||||||
|
0xe7295a8d, 0x883d99b3, 0xb3bdf50c, 0xc51b69f6, 0xb883059e, 0xf912406d, 0x86ae5525, 0x26909b84, 0xeaee31d2, 0x020847f0, 0xd3180ab2, 0xa3e9913f,
|
||||||
|
0x3065505a, 0x59d122d3, 0x16010548, 0x5589dfdc, 0x2227774f, 0xac9a2824, 0xa73270de, 0xf7f32982, 0xb4cef001, 0x116d740e, 0x7e67e0c1, 0x6be7bae3,
|
||||||
|
0x213bce5c, 0xe7c9542a, 0xf6f27b33, 0x59b80ed4, 0xb605f5e5, 0xeaeea900, 0x020855f0, 0xa6b78dc6, 0xd1db6074, 0x2d1db662, 0x2b572bb2, 0x64fc7ce5,
|
||||||
|
0xd818ee37, 0xfdf0b750, 0xe660de87, 0x5177d78e, 0x4260615a, 0x8c0f0a46, 0x6bfbc66c, 0x50f9b2ce, 0x7deaad41, 0x2496d6e2, 0x34986b45, 0xa3062f6f,
|
||||||
|
0x1da03993, 0xc6d213f0, 0xc3d3a159, 0xade04248, 0x7660209d, 0xe04cb900, 0x883d19d3, 0x7e32bf09, 0x58288785, 0x1ff7bb33, 0x8f00f992, 0x9ec43a2e,
|
||||||
|
0x6bb42593, 0x87a2c61a, 0x6e5250bb, 0x4707d664, 0xf8f75202, 0x377cc921, 0x5a6137ab, 0x3db47d97, 0x98012df0, 0x00440413, 0x176d7b6e, 0x99f8efad,
|
||||||
|
0xb56550a8, 0xa94043e1, 0xfddef190, 0x35d6199d, 0x1a241036, 0xbc6d561c, 0xcfefc2c0, 0xf391a212, 0x849eccf9, 0xfcbce46a, 0x0cf271c9, 0x18d18086,
|
||||||
|
0xf58e3dd1, 0x49a3f5af, 0x903dcba4, 0xf17fc07e, 0x11bdc5a0, 0xc0088082, 0x38735b17, 0xccf3d7a5, 0xd8dc9947, 0x6fa79e2b, 0x3460c74b, 0x238afcf3,
|
||||||
|
0xee059614, 0x1c143485, 0xda672acd, 0x7801fb7b, 0x74cea1ff, 0x64e70b4c, 0xfeef054e, 0x00f234ef, 0xb57b309b, 0x1cd3648e, 0x337042b7, 0xf536a8b0,
|
||||||
|
0xfc14d407, 0x396735ef, 0xabc74973, 0xb832db13, 0x72e72c53, 0xbb9c4c75, 0xa684ddd7, 0x97a74251, 0x3acbfdc6, 0x4faf5323, 0x6930e263, 0x7fd4f63e,
|
||||||
|
0x9b32a932, 0x87171699, 0x0b58165a, 0x30d4bb7b, 0x3b76ccd6, 0xbc0bdc1c, 0x9ad9eee0, 0x5a4040b4, 0x4db3609a, 0x9947ccfb, 0x9f0265c8, 0xf883dd3c,
|
||||||
|
0xeddf3528, 0x5f9bc4b8, 0x99040c9c, 0x97a78106, 0x4ce07264, 0x465b5d29, 0x9dfdeef0, 0xa078d800, 0xcb7f2f80, 0xe72e5221, 0x98e0e4c5, 0x8eb57bb3,
|
||||||
|
0x7b678be4, 0xcf6a5bb9, 0x7692f242, 0x10424f09, 0x3e20cde8, 0x2d817cdd, 0x8a488b87, 0xa9f2b351, 0x0264c8ee, 0x94765f7f, 0x9cbb0f5f, 0x643a36b0,
|
||||||
|
0x1b119566, 0x19f3e2a1, 0x64a8d0bd, 0xf8f0cd98, 0x3c00c3e2, 0x13449497, 0xb996f045, 0xb1c7ba23, 0x8e6971f4, 0x902760e5, 0xc7227921, 0x40675afb,
|
||||||
|
0xc499e005, 0x5f1e0044, 0x8451087c, 0x98e35de1, 0x460dbe35, 0x73719993, 0x125790f6, 0x7a8a1890, 0xbdd99ac5, 0x1878b539, 0x09a592ad, 0xe775d2f8,
|
||||||
|
0x84b273d9, 0xe99ab574, 0x7fbf3ef1, 0x706e319f, 0xb5ff6f32, 0x48b36603, 0xc59d846c, 0x86580930, 0xb83bd30b, 0x024e02d7, 0x858d9b50, 0x681213c7,
|
||||||
|
0xe3b356ae, 0xd7cb3158, 0xdcf00367, 0xaeb9ad9d, 0x0bb21347, 0xcff03c74, 0xd0d43503, 0xc852a1f0, 0xab598cec, 0xe0045cb7, 0x5454d4cd, 0xfd87b475,
|
||||||
|
0xb82dadf8, 0x0512607d, 0xea1d4ea5, 0x5f29e07a, 0x06a80aea, 0x73020b50, 0x98005252, 0x2a21def9, 0x326426f4, 0x7764fe58, 0x394293d2, 0x240baf9f,
|
||||||
|
0x398106b9, 0x7563b6f7, 0x897f3a7a, 0xba53aa8a, 0xeae91f8b, 0xe48aead2, 0xd5cbd04f, 0x5b9d5705, 0xd50dd356, 0x1b607af0, 0x80cd1d1b, 0xabb230b0,
|
||||||
|
0xb57378aa, 0x126bf934, 0xbfd0e2a9, 0x5bdbf086, 0xa6adbc03, 0x5a63a0d1, 0xb7e66338, 0xd6eb1787, 0xaa1915d8, 0xf4cfbfe0, 0x3990a940, 0x481407ce,
|
||||||
|
0x3b2e772e, 0xbd8f23b7, 0x7d9300d5, 0xa6bcdc69, 0x8104114d, 0x5ae676ef, 0x994ad4cb, 0x3fcf2dbb, 0x0858ea0e, 0xc51d69ae, 0x61db93eb, 0xc4a48b36,
|
||||||
|
0xf49539da, 0xa6f3ee02, 0x7800ab0e, 0xc049fde8, 0x2c353e63, 0x6d0d8424, 0x74e1f0da, 0xff45b7ef, 0x09317830, 0xaca02095, 0x13c0f9a3, 0x6864b6b7,
|
||||||
|
0x33ab3897, 0x435e0dad, 0x82713e0a, 0x51bdaf2d, 0x56036fed, 0x236f1f97, 0xddbf0660, 0xffaa8bda, 0xe1e77898, 0x758c184e, 0xef7afd67, 0x9b744e81,
|
||||||
|
0x76c009be, 0xc90628f3, 0x26a3d4b9, 0xdec78050, 0xf229043f, 0x991a8ac7, 0xb06ac75f, 0x88ca6221, 0x95df76a6, 0xc1af8ed5, 0x90ef6f72, 0x5bf4c616,
|
||||||
|
0x97f6f05a, 0xbfb7064e, 0x6e20c522, 0xd960bc77, 0x0e69ac31, 0x41639af0, 0x0727136a, 0x394a3446, 0xf9404132, 0xbbe655dc, 0x698dffc2, 0xb737c3c9,
|
||||||
|
0xa74b5ba0, 0x61809818, 0x24d684d6, 0xc8853ac7, 0x02ab4809, 0xd0d590b7, 0xbe5bfbfb, 0x5f995c58, 0xe9c6d718, 0x77f705c6, 0x75bffde4, 0xf8d35426,
|
||||||
|
0x81833b1d, 0xe1347beb, 0x063a07dd, 0xae1c1275, 0x94e6f055, 0x4d1480f6, 0x916b8365, 0x209cb6a2, 0x39c78208, 0x2fdb4cc0, 0x192a8b17, 0x9b9629dc,
|
||||||
|
0x7c1c91ae, 0xed3e3655, 0x7478faa3, 0x5509f761, 0x0f9b3346, 0x64fbb215, 0x8cb94a09, 0xe923ad5e, 0x00862edf, 0xc1d8afef, 0xf5f91460, 0x105344b0,
|
||||||
|
0x28ab57a0, 0x6e887406, 0x0996ab74, 0xf7985243, 0x1e7669d5, 0x34bc762f, 0xeae31813, 0xd0027719, 0x04aac903, 0x10c48b40, 0x60ac5f4e, 0x48ad1de6,
|
||||||
|
0xf2f0d18e, 0xdae96d3d, 0x6ceaf022, 0x465ccecd, 0xa31bb2bf, 0x98df68d1, 0x7bbc9156, 0xb7fa277f, 0x5d66ed77, 0x37b2fc1b, 0xdc5f1b9f, 0x1f61c185,
|
||||||
|
0x690b4bbf, 0x277067b3, 0x0d782eb7, 0x68ef3312, 0xedaf6dc5, 0x30d35da4, 0x46b79c8e, 0x740add21, 0x646fca40, 0xfe227707, 0xb76b9219, 0x23d3dd15,
|
||||||
|
0x6ddf3dd9, 0xf1ad76f4, 0x3cb39afe, 0x54c92ff4, 0x50a952ac, 0x773b24a9, 0x46256565, 0x104111a3, 0x6bf9faf8, 0xe077b9b8, 0xd6cbedec, 0x9e793165,
|
||||||
|
0x54afc7e4, 0xa5ab512a, 0x5ebd4d5d, 0x4060c18f, 0x9b3e0410, 0x06db93d1, 0x668c0624, 0xd08a21b0, 0xb60da1e1, 0x63e0b7cc, 0xa163a260, 0x25bb41ab,
|
||||||
|
0x4ec92592, 0xeb4fe638, 0xe166c744, 0x1da76a81, 0xc8b96f56, 0x21f677e4, 0x51510208, 0x46464451, 0x51ab56a2, 0x8684d5ab, 0xbd502b4a, 0x9b27cf5e,
|
||||||
|
0x8f5d702e, 0x8e753426, 0xdf19f1a4, 0xec63ccef, 0x8801bbeb, 0x2a248c8c, 0xa68eca2a, 0xf5e80820, 0x92db3e7a, 0x58e74643, 0x4376cbab, 0x98402087,
|
||||||
|
0x7effc146, 0xa978e8bf, 0xb004b023, 0x3575e88b, 0x58e3deb2, 0x94253ade, 0x670407db, 0x6a505f86, 0xf637cee0, 0x91228a20, 0x84849191, 0xf0e8bf38,
|
||||||
|
0xc3c270f0, 0x914511c3, 0x53b73321, 0xe928ece5, 0x4674ca13, 0x2779796e, 0x111228a2, 0x32156111, 0x8585845b, 0x81111111, 0xfb5c8a28, 0xfa740efc,
|
||||||
|
0x4bacd1da, 0xc5343ddc, 0xd2082271, 0xb1c13f70, 0x380095d0, 0x363f7885, 0x26d065aa, 0x66963361, 0xd0993262, 0x992eb56a, 0x7878416f, 0x0a952a38,
|
||||||
|
0x5bc0c183, 0x15aa9c5f, 0x1f9617cd, 0xd93264c3, 0x08571869, 0xa5430b0b, 0x1a346152, 0x2767c7f9, 0x2eb3456a, 0x3c0b90a1, 0xe065ca3a, 0x1d6f138d,
|
||||||
|
0x291bdad9, 0xb92026ab, 0x32152b74, 0x8e0e0dc6, 0x62a5cb97, 0x74fe1f3d, 0x8810411e, 0x5279a888, 0x05291919, 0xe2b0bc94, 0x7f837a38, 0xdcb8b23d,
|
||||||
|
0xce6f82c0, 0x9a9b8758, 0xd5e7b960, 0xa1504f4f, 0x7770d537, 0x2184c1c3, 0x02e5c829, 0x79bb1aa1, 0xf21c177e, 0x800a3832, 0x0de8849d, 0x8cf64626,
|
||||||
|
0x65dc2627, 0xb1ad57e8, 0x8873fbf0, 0xab5688a2, 0xd9af2e45, 0x2a54a086, 0x9854a951, 0xd93e264c, 0x9a2fc174, 0x1e74fe1f, 0x468cd9b3, 0xa68af1a3,
|
||||||
|
0xad40a142, 0x9b366356, 0xb65d78f9, 0x03eb345f, 0x866ad189, 0xbca38975, 0xc978e8d2, 0x15b0186e, 0x1e523900, 0x3ddc3b20, 0xadf02534, 0x8dcac6ab,
|
||||||
|
0xa4f50bd2, 0xb9611d86, 0xafacf2d7, 0xeea1b158, 0xdc17d669, 0x36026ef0, 0x015b7c13, 0x524d8c18, 0x88104102, 0x4b725108, 0x7919c0ef, 0x5736716c,
|
||||||
|
0xcbacd1c7, 0x9472e5c8, 0x8c35ef4a, 0x1041a346, 0x93de7e04, 0xbe4ab3ef, 0xef67ac54, 0x326452a9, 0xe9997599, 0x87cdcd0b, 0x7729290a, 0x160d51ea,
|
||||||
|
0x1125fa63, 0x972391a2, 0xd2e82ddb, 0x02ebd290, 0xe76002f6, 0x228a2a55, 0x44480db7, 0xecce0aa3, 0x523da7ef, 0xdacb2c62, 0x82085bdb, 0x42a54a80,
|
||||||
|
0x1c364514, 0xeb042df0, 0x88f93de7, 0x4d33e8a2, 0x8a29da90, 0xe5f76b22, 0x7d6cfcfb, 0x672b4c21, 0x5744ef54, 0x5e56781b, 0xc33772db, 0x3d91aef1,
|
||||||
|
0xb8e4e783, 0x800978f3, 0x02d13d4f, 0x9d77030b, 0xe68df128, 0xe7bb6289, 0x9da5817d, 0x6facd2be, 0xc4d5ec8c, 0xe5867155, 0x68008b1f, 0xc0005691,
|
||||||
|
0x21fe5895, 0xd617829d, 0xa96d5995, 0x5bfd45f2, 0xbd76a8a0, 0x76b674ce, 0xe1534579, 0xa5b6eb87, 0xacd2be9d, 0x1ced0c6f, 0xccd95c07, 0x4000c6ab,
|
||||||
|
0xa0045709, 0x8aed601f, 0xe8ab9745, 0x7c4e1690, 0xd3bdef94, 0x9566645b, 0xa331fe01, 0x4ac0043e, 0x8dddbab3, 0x689b4d05, 0xe50a4f48, 0x6da55162,
|
||||||
|
0x1dd50871, 0x190022de, 0xed0e0f8e, 0x6fdebc12, 0x049d5336, 0x1b97e641, 0x76f965ba, 0x44b7c8b1, 0x95f959cd, 0xbe1541d5, 0xa5fc6bcf, 0xd19010d9,
|
||||||
|
0x332f25d9, 0x38008ae0, 0x79baebb9, 0xd3282028, 0x7f693349, 0x892c1063, 0x087d7291, 0x9a32a934, 0xed5e49fd, 0xad31b744, 0xd3702c02, 0x15c20799,
|
||||||
|
0x78e0e801, 0xe0fb4075, 0x56d6836d, 0x9acf2c00, 0xde4c66cd, 0xb4a5e4e5, 0x45343022, 0xb2bca451, 0x010458f1, 0xc9707606, 0x0920f6cb, 0xd2523840,
|
||||||
|
0x91fa4066, 0x924aa191, 0x97978262, 0x70c01cd7, 0x1697b361, 0xb57dcb61, 0x6c080015, 0x6902ebfb, 0xd568b44d, 0x1a01ed2e, 0x5aa9d219, 0x48a28856,
|
||||||
|
0xadef149b, 0xbc20fe64, 0x36b9cc3a, 0xea2d4ee9, 0x4b475bdc, 0xb7b34d0b, 0x6602e312, 0x104119b3, 0xae34d308, 0x0082473c, 0x1d4393ad, 0xd00201ed,
|
||||||
|
0x83f872da, 0x0724da1d, 0x6d5f7737, 0xdc72c005, 0x74e71349, 0x55a16e6a, 0x9dca7ccb, 0xb86e8ee3, 0xd328d156, 0xd4e9bad8, 0x80349d6d, 0x06039b87,
|
||||||
|
0x899a5c85, 0x90967bfb, 0x22fb17a5, 0x51090000, 0x9a69bf6a, 0x68bf264c, 0xe9b81436, 0xd8646dd4, 0x4b5aff6c, 0x00002c83, 0x448eb4d7, 0xff274514,
|
||||||
|
0xf1606f3f, 0xcb35f3df, 0x50d4bb68, 0x817de7bb, 0x358d9da5, 0x9e1ba9b3, 0x22e191b6, 0x2e10287c, 0x7da13557, 0xfa45e953, 0x67960023, 0x4f78752c,
|
||||||
|
0x69cebc33, 0xe1b81436, 0x1565ac69, 0x48ba8760, 0x92096cdc, 0x3df2aaa8, 0x99e58469, 0xcb7c2d6e, 0x9a101a38, 0x08ee0c41, 0x5c43c226, 0xa5dc34f2,
|
||||||
|
0x4ebb8400, 0x8c501446, 0x526d26e8, 0x5bbef5e8, 0xaaaaaad6, 0xe7c10410, 0x75d77414, 0x5ea69ff7, 0x041047af, 0xe716edae, 0x010db3f3, 0x5aea786e,
|
||||||
|
0x9962ea00, 0x0c2d21d3, 0xd18e5cb9, 0x2549f468, 0xcc7af5eb, 0xdbfd3366, 0xe61d1347, 0xf35246db, 0x526d2d04, 0x4c9930c2, 0xaa03cd3e, 0x9b30aaaa,
|
||||||
|
0x8f48f4cd, 0x71aa2124, 0x08e45b9c, 0x3fad3c37, 0xe8f0000d, 0x940066a8, 0x287f7b97, 0xb1dee5b7, 0x53f3fd03, 0xc9283b1c, 0x1a839a7f, 0x1ba3ec6f,
|
||||||
|
0x09d8469e, 0x84db2580, 0x38c41d56, 0x743c1b2c, 0x41047363, 0x79d3a740, 0x993334b5, 0x7af5e84c, 0x93193264, 0x2f9b75af, 0xbc1e23d9, 0xa69599b1,
|
||||||
|
0x93214637, 0xa56544c9, 0xf53489b4, 0x68bf34ba, 0x1a780436, 0x18b0ac02, 0xd2caea38, 0xc2149e99, 0x9809bee8, 0x4b4a66cd, 0xbfbc6b4b, 0x5104a4a4,
|
||||||
|
0x4b7e9914, 0x8eb3bf73, 0x9868c727, 0x51052430, 0x79a27d14, 0xa0b4c8ff, 0x05d6c739, 0x9487d744, 0xbac0328a, 0x30655dc1, 0x758b3663, 0x6f3cfeea,
|
||||||
|
0x3264476a, 0x15151519, 0x1567271e, 0x56541515, 0xcb972256, 0x39c13d99, 0xbc17d942, 0x95bda539, 0xa5656566, 0x3a74fbdb, 0xabe6959d, 0x15abb4f7,
|
||||||
|
0x6586facd, 0xd8b1ce03, 0xb82c004e, 0x1c4aecec, 0xd04f3434, 0x076a6f32, 0xb0a45144, 0x10a5d0b0, 0x4a3a74e8, 0x04104a4a, 0xf59e2f81, 0x5b0640ef,
|
||||||
|
0xf9a8c524, 0x3dc911e0, 0xc8a8a8be, 0x74e810a5, 0x258b8a3a, 0x4f55b217, 0xbdd46b75, 0xc2aca01f, 0x532ea765, 0xca0042e0, 0xd4244c2a, 0xe9b3d661,
|
||||||
|
0x55939aa3, 0xd5cde3a0, 0x28282927, 0xa2d5ab40, 0x451068d1, 0x4acaca91, 0xf9fe832b, 0x8580e760, 0xd1194fa2, 0x3a79f394, 0x463caf66, 0x5a216161,
|
||||||
|
0x2bead6ad, 0xee734b68, 0x887f8ed4, 0x34eef774, 0xa8014b80, 0xc1600d4b, 0x27b6f71b, 0xe3cb5635, 0xd3a30f8b, 0xaee9d0e9, 0xcb923d24, 0xb27f2ce5,
|
||||||
|
0x9423c06b, 0x43684d66, 0x07868c52, 0x25d075ff, 0x768f25cd, 0xc1619ee1, 0x4ba88b8b, 0x6e0024f8, 0xa63a0e6e, 0xb8ce6a8f, 0xdeacc9c1, 0x13aec39a,
|
||||||
|
0x3214a825, 0xc91369ae, 0x829203ed, 0x769d34b6, 0x0fb71a43, 0x2df3e248, 0x513cec39, 0xb8104c8c, 0xb71475a6, 0xf5aa480f, 0xe090d350, 0x0aa5a786,
|
||||||
|
0xfdd1c9c0, 0x418eae6c, 0x26de831d, 0x528f8897, 0xcd8de0f1, 0x4c6694ea, 0x376992b8, 0xc68d31a4, 0x09abccbb, 0x665d7367, 0x01902d69, 0x8f4b1dc7,
|
||||||
|
0x78039f39, 0x6e1c8d15, 0x064c7a78, 0xbd2a751c, 0xdf7cb8d0, 0xb866a2af, 0x1931e9e1, 0xf4b1cc70, 0x0d55d668, 0x1b8347f0, 0x12751e9e, 0x38104100,
|
||||||
|
0x00aae17e, 0x366091fc, 0x158ba9c3, 0x9b95a78e, 0x43161381, 0x54a58e50, 0xba367b72, 0x455c349b, 0x8bc9c423, 0x260de8e5, 0xcf0833c7, 0x91169501,
|
||||||
|
0xb61f4a70, 0x11fd90f9, 0x3346552f, 0x621e17d3, 0x9c638ad6, 0x5a08a9cc, 0xa82cff63, 0xf2f99a32, 0x994c8bb7, 0x77ef8fbf, 0xd69505e6, 0x8f2e83a6,
|
||||||
|
0x570c39eb, 0x0afe04f2, 0xbabdb70c, 0x5d8140e1, 0x458b8182, 0xe6b5fe7a, 0xc893260c, 0xd18eab4b, 0x930c7dbf, 0xe772a786, 0xd43fe4a0, 0xd8d8397a,
|
||||||
|
0xa598bc71, 0x64f8b36b, 0x13bb05d3, 0xf144dc3f, 0xf7eb0406, 0xffa30cbb, 0x8a64ae15, 0xdbd600c8, 0x18996d5e, 0x43c5c9ca, 0xfdf89eed, 0x7f0b3148,
|
||||||
|
0x5be7cb38, 0x6d5cb872, 0xe4a8d058, 0xc093ea8c, 0x5ca9e1a4, 0xa349a3df, 0x1759aecb, 0x64afcac8, 0x966cfaf9, 0xf322cbad, 0x5bbb15fc, 0x4c9196b7,
|
||||||
|
0xd4ca961c, 0xd5069beb, 0xd2752307, 0xe4e9575a, 0x5bbf01fb, 0x4a06a5b8, 0x1092ffaa, 0x9152e6ad, 0x864bb39e, 0x3922e693, 0xc4de8574, 0xb22f5b17,
|
||||||
|
0x6b165d6c, 0xae63e5f7, 0x8c4acf0e, 0x232130d6, 0x9ac34999, 0x7045a5d2, 0x16360a72, 0xac4de854, 0xa3bd22de, 0xefebfb75, 0x50bf1d1d, 0xeb699b4e,
|
||||||
|
0x032f8b1d, 0xb6d180d1, 0x4a446ebb, 0xd2c56313, 0x0f59ba27, 0xec877446, 0x97ba4902, 0xee97b5ae, 0x98232dae, 0xbb952c38, 0xad1a5232, 0x10af951b,
|
||||||
|
0x5ce86945, 0x49cb2eb6, 0x9bee8e4b, 0x7561c4c0, 0xfd1725af, 0xabfb8e70, 0xc1b5394f, 0x600dc08f, 0x45f40d9f, 0xbca04e1c, 0x9f326063, 0x35e1e8ce,
|
||||||
|
0x8bc71db1, 0x9b36b659, 0xadb29b55, 0x2e429be3, 0x4d1efae3, 0x952c3898, 0x50137dd1, 0xb0f83ebb, 0x85f8e351, 0xcdae9672, 0x6cfaf962, 0x995ee6ce,
|
||||||
|
0x20e80f20, 0x0ec693cd, 0xd279bfac, 0xf27797e8, 0xaca736f5, 0x398033a1, 0x83002f60, 0x2000b491, 0x17214e31, 0x08f1f8b8, 0x306f1b9f, 0xf3b77c8a,
|
||||||
|
0x66d74b12, 0x5c8eddf1, 0x2a23f2eb, 0x81d8c94c, 0x36be4cc9, 0x02ed7e95, 0x2eb9f89f, 0x646e5251, 0xf34926d5, 0xc8a47efd, 0x3122de5a, 0xa6867b84,
|
||||||
|
0x2a587132, 0x9bf549e9, 0xd4a0b65e, 0x9fc4d240, 0x2a04cb91, 0x01fcecab, 0xc03b037a, 0xc064005e, 0xcf6ec079, 0xaef4f175, 0xfb3af5fc, 0x6d7c3013,
|
||||||
|
0xd945e584, 0xe2ff31a6, 0x8e48bdef, 0x79b9d0d1, 0xc0ea2138, 0x8c1821c6, 0x9505d922, 0x7c084f34, 0x53decb80, 0x6ac4a4a5, 0x36d661b8, 0x0be75776,
|
||||||
|
0x7251088a, 0x262480fb, 0x50654f0d, 0x130698c7, 0x809b683b, 0x91a706db, 0xf60341f2, 0xc0cde2e9, 0xb613c027, 0x9f5f2f77, 0x13bd2dc5, 0x7d82ebf8,
|
||||||
|
0x53f93ab5, 0xd2e8132e, 0xd2fc8222, 0x337a742a, 0x8c95f959, 0x3d277579, 0x69b1455b, 0x0980bf4e, 0xc8ce9941, 0xceffbff0, 0x7c25e3ce, 0xee1768f8,
|
||||||
|
0xe17fd6bd, 0x9b27c475, 0xcde1302e, 0x9fe98c3d, 0x27255688, 0x6c494c3a, 0x30e88a84, 0x95ce8725, 0x4c92f4f1, 0x0415eabf, 0xdfdfa729, 0xb01e6a6e,
|
||||||
|
0xc3d602b6, 0xd2b01d3b, 0x6ea38bf6, 0x008d815f, 0x6c146a84, 0xd6c8583c, 0xddbe22cc, 0x8da0297e, 0xa4a82ecb, 0xbb186a6d, 0x6933144e, 0x7d3e5ede,
|
||||||
|
0x7bad67a6, 0x9995654e, 0x60ed2f51, 0xd34931c7, 0x7eeef7dc, 0xfc9542a2, 0xd3ed5fa5, 0x563f6fbd, 0x48efbdcc, 0x369be5a9, 0x54f7b2d1, 0x0d974529,
|
||||||
|
0x3df65d14, 0x3415d0ce, 0x0540594a, 0x0aa5f4e0, 0x121666b6, 0xb0a2ae13, 0x2ee3aecc, 0xeae2fdb7, 0x3aa61f95, 0xaf05847b, 0x718ed3dc, 0x7d6b9383,
|
||||||
|
0x8ba9eff6, 0x99d9ac15, 0xf27b4fcb, 0x93d12bc8, 0x694a149e, 0x12bc9185, 0x2ebd7f3d, 0x770f858d, 0x5c867bf6, 0xec62695e, 0xd9ac5d9c, 0xc4cb4b91,
|
||||||
|
0x2fd2fe50, 0x3cbfb791, 0x67295a89, 0xb93db3f5, 0x53ff1ae9, 0x5e38edde, 0x77b34dcc, 0x67a25790, 0xbe449f54, 0x991176de, 0x7a67a04c, 0xc57b2324,
|
||||||
|
0x0e39d193, 0x29f22d6d, 0x6974020a, 0x7750111e, 0x8f2bd9fc, 0xa74ae2f1, 0x40ddbe7d, 0x2eda3b4f, 0xf03bfd9e, 0x42416d8a, 0x1f339ab4, 0x692bf70e,
|
||||||
|
0x15716e64, 0x464a372b, 0xaf273d90, 0x9b6bd8e4, 0x09ecc61a, 0xaf16686d, 0xb61786e5, 0xe0615a53, 0xac093e96, 0xcf87aa7a, 0xcb9d0f67, 0xe5fa31d3,
|
||||||
|
0x553dec9d, 0x86ac7242, 0x4fe8df5f, 0x6610848b, 0x4bc638ad, 0x93218eab, 0xdc99cc09, 0xd31bff9e, 0x1ccae6b2, 0x3ceee3f0, 0x2ec7ff6e, 0x8c8ceb2e,
|
||||||
|
0xfbcc941d, 0xfa66750f, 0xdeac43c2, 0x589d639a, 0x8c156985, 0xa4c89fe9, 0xda194d61, 0xe7deb625, 0x137a1500, 0x25aca6cd, 0x3ec3b9df, 0x2db5cc09,
|
||||||
|
0x66d4d570, 0x0e1c49c0, 0x6fff7893, 0xa460799d, 0x7a3a9e77, 0xb66f9983, 0xbad9625f, 0x99dfbe2c, 0xad24d187, 0x55c26202, 0xcc9c1b8c, 0xf4a961c4,
|
||||||
|
0xebc57b69, 0x32e9ff74, 0xc6dece46, 0xd24a8285, 0x9fccb5e2, 0xfb5b91d6, 0x45b6acd6, 0xcdae9611, 0x9925e9e2, 0xe9e895e4, 0x57c91e9e, 0x33b2f5cf,
|
||||||
|
0xcdfbbd5e, 0x7c589e19, 0xccc9a318, 0x9892036d, 0x4b83b53b, 0x8a2396e3, 0xf8cc0dcb, 0x7e8b08e8, 0x3f5a1290, 0xde735374, 0x3593bfbd, 0xb9497e6d,
|
||||||
|
0xcd7ecf91, 0xf3bae961, 0x6fb36afc, 0xe5af1692, 0x26548cee, 0x93ad4f0d, 0x58577b30, 0x1e19f5f0, 0xb1d0745d, 0x8e680ab8, 0xb81fc6cd, 0x0566323f,
|
||||||
|
0x5ba5590e, 0x6c728626, 0x15478651, 0x6291fbfd, 0xcf3bae96, 0x50e5377f, 0x3e925974, 0xc8c642a5, 0x1a4cf19e, 0xbdcdca9e, 0x9b0eede3, 0x5cd9c5b2,
|
||||||
|
0xeee7131d, 0xc941d365, 0x57b23d6e, 0x6a8e8f3c, 0x4d6e88c1, 0x282ace9c, 0x912c94af, 0xda7b7eef, 0x1f8fde3a, 0xd387c292, 0xa354babb, 0x3015f6eb,
|
||||||
|
0x0a2ece76, 0xaad0ab4a, 0x737c3ce5, 0x6f0f2673, 0xe734874a, 0x5282ef50, 0x6437cb03, 0x4ecf8ff1, 0x8f48a970, 0x95e72d56, 0xc4f2da7b, 0xc7b5eead,
|
||||||
|
0x2c158ba9, 0xc7c5975b, 0x7539b2eb, 0x7a56caf1, 0x4cd1b69f, 0xb8ca961c, 0xe675c9c1, 0x8a306e56, 0x8eb7dfa4, 0xa64e79f3, 0xa9810fdf, 0xb8ee858e,
|
||||||
|
0xe7d819d9, 0x53e57d78, 0xc43f183d, 0x5cf733de, 0xd78f8e9e, 0x58fe2a49, 0x93af15f6, 0x9922ad1e, 0xe329ac34, 0x94fb2487, 0x5fa3e355, 0xc96a78b2,
|
||||||
|
0x8afaab61, 0xb3d25108, 0x224d2455, 0x0265c855, 0x39ca7227, 0x5d0cb678, 0xab4af075, 0x4ee650e4, 0x526350ed, 0x2ad2fceb, 0x947e5f9e, 0xb39c3f45,
|
||||||
|
0xa75b659a, 0x353ed284, 0x1508b89c, 0x87137a15, 0xe87197cf, 0x9735995c, 0xe33d0dce, 0x9d83e7f9, 0x94fae968, 0x2288276e, 0x90b87afc, 0xf8b2eb65,
|
||||||
|
0xa50e7374, 0x5104d215, 0xf37194a5, 0xc97ed235, 0x41f19ec8, 0x6012403b, 0x99e72fc9, 0xc73ecef2, 0x0ed03362, 0x9e7fee17, 0x700df25a, 0x97416db3,
|
||||||
|
0x5dec1116, 0x4af29830, 0xe6b7ab13, 0x166d74b0, 0x58140e1b, 0x6392fae3, 0x9195dc35, 0xa9e1a4c2, 0xdff34c74, 0x66585dce, 0xe74ff160, 0x8b2eb658,
|
||||||
|
0x339d6743, 0x0264ca73, 0x99639d19, 0xf1952c38, 0x6add9243, 0x78385715, 0x3f458cb6, 0xa6d5639c, 0x2463576c, 0xb1a4a52a, 0xad3ebbee, 0x9d471356,
|
||||||
|
0xb6ffccde, 0xdae9645d, 0x9bde7e2c, 0x26aa1567, 0x0fc66a91, 0x9ec18691, 0x6fcb7cad, 0x664c1350, 0x6d0f8e91, 0x939668e4, 0xb8a7d7fb, 0x3c000a38,
|
||||||
|
0x603f400b, 0xcb4be5ab, 0x5d4e50c4, 0xf0d2672c, 0x25be7ca6, 0x81107ac7, 0x2fe72d56, 0x389912fd, 0xbb6b952c, 0xcedc05c5, 0x6066585d, 0x4a52e9df,
|
||||||
|
0x8c180c2a, 0x9de214a2, 0xd36b561c, 0x7224d1aa, 0x473942fc, 0xa6532eb2, 0x96a21233, 0x4b5e2cd3, 0x3e1116d7, 0xc8379409, 0x62b3d429, 0x0f25a483,
|
||||||
|
0x8f12b99c, 0x1455b3d8, 0x9bd4bc3f, 0xe4c088b8, 0xdbef7a1d, 0x6ff23c33, 0xa01fb1a7, 0xd5d7b03b, 0xec86a105, 0x4e901b99, 0xa342b510, 0x9837a392,
|
||||||
|
0x8631d419, 0xb952c389, 0xdf926063, 0x467f9a81, 0xca5939ec, 0xac5975b2, 0xd14d98dc, 0xdffb0365, 0xbc901c1b, 0x55257943, 0x3d7fb9b4, 0x8976cec5,
|
||||||
|
0x5d1b81ef, 0x628a233d, 0x0fd0028d, 0xa68382d8, 0x8d223298, 0x52ed1f0f, 0xb9ff26cb, 0x94893461, 0x273e8ce9, 0x298770b9, 0xe4b1f7f3, 0xc58ef3e7,
|
||||||
|
0xb017a066, 0xd633d5c7, 0xc43da3c3, 0x2c06ffe6, 0xa8d02db5, 0xf6b47ce4, 0x364fbb3c, 0x0df9bcae, 0x10b90a0d, 0x7effe630, 0x7e8f98a4, 0x203c72c9,
|
||||||
|
0x78dfe00a, 0x0f543e60, 0x8531e001, 0xec523c6a, 0x68b85d80, 0x6cd1b69f, 0x55ffb379, 0x867aa00f, 0xe7d224d1, 0x1bad5fc9, 0x43c83653, 0xe45901ca,
|
||||||
|
0x0115d4fc, 0xb8163990, 0xbcf02e40, 0xc4cb416d, 0x2d1db650, 0x4e55a5e2, 0xa8ab8aab, 0xf1f73c63, 0x289f7651, 0x3cf3ada1, 0x30350662, 0x00346c1f,
|
||||||
|
0x7202d478, 0xcdd02760, 0xc854a052, 0x7e459930, 0x506fa579, 0x0ab816cf, 0x7771f8f7, 0x6d67231e, 0xa810a947, 0xf1473fb2, 0xb83fa077, 0x4ee20b49,
|
||||||
|
0x10a3c000, 0x24f241f4, 0x92681bb5, 0x5dec3462, 0xa7a83830, 0x33855c8b, 0x74f50a72, 0xdc89be9b, 0x1a84a762, 0x72bc4855, 0xe473ecb9, 0xde0b2fb7,
|
||||||
|
0xe72cc06d, 0x71325486, 0xcb3adeee, 0x5215742b, 0x6f5dcfa4, 0x7cc571ed, 0x57bf5490, 0x021707cc, 0xaeb64350, 0x6c5f81d7, 0x3563920b, 0x973bb8fc,
|
||||||
|
0xb69c2b59, 0x4822af1e, 0x11d97678, 0x77cfefd6, 0xb7f44075, 0xea5f3cc0, 0xac021a72, 0x050fdc17, 0x04fb4809, 0x52bbe356, 0x3460c321, 0x3a87aff3,
|
||||||
|
0xff6c79d7, 0xbff30d9f, 0x8b63cd3e, 0xca56a10e, 0xfcec1bd1, 0xae81b2fc, 0x1028cb80, 0xc7f67c77, 0xb80979e6, 0x00c8c91b, 0x1d28c180, 0xbff0f0a4,
|
||||||
|
0x96f9f20f, 0x5e4ff71c, 0x6ab0ad45, 0xff1e05e3, 0x993230e0, 0x137cc8e0, 0x6fadeed2, 0x41e26927, 0x0a186a00, 0x69c1c17e, 0xcc451444, 0xdfbb9166,
|
||||||
|
0x142eebda, 0x816a2ae9, 0x33e4f79f, 0xeb5ede69, 0xf3c0767b, 0xcf7726c0, 0xdba5e27a, 0x837ac021, 0x8f96f767, 0x858e4980, 0xd64a2111, 0x5e97dabe,
|
||||||
|
0xdbbb03ad, 0xb6c567f5, 0xfb5cc5a3, 0x40d6efdc, 0x042c0713, 0x6cf7701e, 0xa5adfc8d, 0xaf802800, 0x2f1c9b80, 0xf8288784, 0x8d5ed9e2, 0x4376bb36,
|
||||||
|
0xf3bb8fc1, 0x5db5edb8, 0x07818eae, 0x8edfdde9, 0xc1380434, 0x35bbf49b, 0x28d4000a, 0x5ac02104, 0x05e3afa0, 0xb2c65295, 0xe771ba27, 0x77a6c0a0,
|
||||||
|
0xf960b3fb, 0xcca66cfa, 0xd718e7df, 0xe066c16f, 0xaa6dc03a, 0x000980d3, 0x310428d4, 0x4e86bb48, 0x410554f9, 0x8eb4fe60, 0x734b723c, 0x855ce8af,
|
||||||
|
0x3cbfb784, 0xc9ff53c5, 0x43c4c774, 0x163f0748, 0xde08babb, 0xb5e5c81f, 0x428d4000, 0x84fc0a90, 0x4cb94b83, 0x8b366026, 0x2b5b7d3c, 0xf6d49b5e,
|
||||||
|
0x0d51e6ea, 0x9e449a30, 0xbcc9925e, 0xdf594eaf, 0x210e039d, 0xee0bfcf5, 0xa789f0ea, 0xe5a09ebe, 0x0ef82685, 0xa540e187, 0x30655194, 0x2c53b833,
|
||||||
|
0x4eea9f2b, 0xf5c6ac4a, 0x9c727fd3, 0xfe31d3cb, 0xcd6c3d8d, 0x92a3442c, 0x81f3c63b, 0x851f8a64, 0xf01e4d9b, 0x9f3e28fd, 0x103500ed, 0x34ca4428,
|
||||||
|
0x616d9df2, 0xb34cc195, 0x1d3610f8, 0xf4dba02c, 0x99d9ac4d, 0x3fd92beb, 0xfbf7fe3c, 0xb23dba25, 0x8599ad99, 0xba8527a4, 0x80fffe62, 0xf9900411,
|
||||||
|
0xb00687e0, 0xeaf3583e, 0xb26003e0, 0xbf1f67bb, 0x4faf05b5, 0x0f541f6a, 0x2a80c6d9, 0xfbff99a3, 0xbf779330, 0xb6e9ed39, 0x7107800f, 0xff07db33,
|
||||||
|
0x960ce10f, 0x1b305800, 0xa76148c9, 0xcc662c69, 0x79c2cd8e, 0x414e81ef, 0x21bca93d, 0xf9bd97e3, 0x20f0b23c, 0x465fce47, 0x5d5b96ab, 0x42606ddd,
|
||||||
|
0xb57b80da, 0x5ceabaa6, 0xd415ac00, 0x02d7082c, 0x4073631f, 0x66a74035, 0x2b3c1c11, 0x1b8ec879, 0x53dbc29c, 0xf31c93db, 0x9c1b98e7, 0xc4f1d3cb,
|
||||||
|
0xf6acc3e2, 0x80bf366c, 0xe8ddde64, 0xf35aa6e9, 0x8015b6af, 0x80904257, 0x1c230424, 0x2884442f, 0x1030ad29, 0xc2f055a6, 0x363cd6f8, 0x761fe5aa,
|
||||||
|
0xcc1bd058, 0x29c5f5bc, 0x38ecfb5e, 0xa2269515, 0xbcae94c2, 0xe4f24178, 0x448b889d, 0x0808b6de, 0x095102ef, 0x4a3f2578, 0x0000f30f, 0x4449a802,
|
||||||
|
0x02045441, 0x4bf55ed2, 0x5ba58738, 0xe5af1691, 0x99d35bc9, 0x80d37d7a, 0x2fa88e27, 0x5899d65c, 0xe659c3f8, 0x0b8a757e, 0x0e9e9505, 0xcf0036b1,
|
||||||
|
0xc6e36f02, 0x8082c79b, 0x15502df1, 0x82f3d781, 0xaade48de, 0xd4dd3ddd, 0xf4cd5224, 0xf879cd51, 0x8544e6e6, 0x5ae3ce36, 0x58ab4bf2, 0xde19f5f0,
|
||||||
|
0x358cf6fb, 0xb603d256, 0xbb010f03, 0xa031ba6a, 0x65640b3c, 0xc810b5e0, 0x5e303690, 0xe6574a41, 0x0a21e116, 0xca688ca6, 0x1f03433d, 0x6c2c154a,
|
||||||
|
0xb2cc5a3b, 0xb47c5975, 0x95153cf6, 0x55c01e35, 0x1604cc00, 0x87af4353, 0x821f32c0, 0xb5e00020, 0x41340010, 0x17ba32f2, 0x806a61cf, 0x5df3f874,
|
||||||
|
0x95dc2919, 0xfc941291, 0xc9c1b53f, 0xaf960a9c, 0xc6c562cf, 0xe7578e6c, 0xeaa0f7e6, 0x58a7f241, 0xc18f9484, 0x47572e65, 0xc1578504, 0xb95ad4a8,
|
||||||
|
0x17d082f7, 0xcc33a969, 0x31490ddd, 0x2b0a721a, 0xe80ef5ad, 0x9ec8cd10, 0x8e7464f1, 0x51d69ae5, 0x34713e75, 0x1db64518, 0xfefd622b, 0xccecd602,
|
||||||
|
0x9614cbb5, 0x2b25a71a, 0xedb263df, 0xf0e7801f, 0x7043dd42, 0x50416f18, 0x127c0005, 0x07e69002, 0x78d18133, 0x21e108d0, 0xae2aca0a, 0x6a868f6c,
|
||||||
|
0x10e80c14, 0x71ced0cd, 0x4d18ec0c, 0x80b0d4bb, 0x905a5c05, 0x91c55257, 0x3e6ccbac, 0xfdfac854, 0x523d6c05, 0x3ddea768, 0x302de8cc, 0x7f81ab03,
|
||||||
|
0xc75a26e0, 0x9fce8215, 0x12b01360, 0x3a104df2, 0xe300cf02, 0xb062b0f1, 0x77f1dbad, 0x68ab84c4, 0x7d2a1293, 0xda68c392, 0x56b84344, 0x4156b841,
|
||||||
|
0x78414698, 0x8d309c88, 0x32904102, 0x9855958b, 0xb919d328, 0x4ca4695c, 0x9e5ce467, 0xe5d9638e, 0x24e38fd6, 0x8d46cdce, 0x2d21542b, 0xc5c0df81,
|
||||||
|
0x50ee1ce1, 0x2ba97c67, 0x10b3e042, 0x38c3b480, 0x680bb801, 0xbba8d16c, 0xacad3291, 0x8b2d21c2, 0x3f25d427, 0xc0058ea0, 0x2cbfd44a, 0x04919d4a,
|
||||||
|
0xb8100261, 0xc5817fe4, 0x7c3ca429, 0xbe23802b, 0xbc2f5c3e, 0x56a20fa8, 0x8209fee2, 0x32f91480, 0x148a180c, 0x395f5502, 0x6d232f59, 0xf2406ed1,
|
||||||
|
0x4fe9da8a, 0x83caf525, 0x6d6e24fa, 0xaaf2ed44, 0x8f269129, 0x325e4819, 0xbc3481ed, 0x08fa5658, 0x2b31d233, 0xb1dc9187, 0xdc312036, 0x1b3653ef,
|
||||||
|
0x086fbbc4, 0x96a0b08d, 0x2d0b6082, 0x3c290ad0, 0x1ad00dba, 0x5dc20388, 0x14a0047c, 0xcb24ece9, 0x0ec914a7, 0x34291c7f, 0x027018fe, 0xbe77fe0f,
|
||||||
|
0xf3bd21a0, 0x1a2707ff, 0x251ef51b, 0x0000e4aa, 0x45490000, 0x42ae444e, 0x00008260,
|
||||||
|
};
|
||||||
|
|
BIN
assets/icon.png
Normal file
BIN
assets/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.7 KiB |
1049
assets/icon.svg
Normal file
1049
assets/icon.svg
Normal file
File diff suppressed because it is too large
Load diff
After Width: | Height: | Size: 36 KiB |
14
assets/update-assets.sh
Executable file
14
assets/update-assets.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
if [ -z "$CXX" ]; then
|
||||||
|
export CXX=g++
|
||||||
|
fi
|
||||||
|
add_image() {
|
||||||
|
./btcc -nocompress $1 $2 > $2.h
|
||||||
|
}
|
||||||
|
add_font() {
|
||||||
|
./btcc -base85 $1 $2 > $2.h
|
||||||
|
}
|
||||||
|
$CXX imgui/misc/fonts/binary_to_compressed_c.cpp -o btcc
|
||||||
|
add_font forkawesome-webfont.ttf forkawesome
|
||||||
|
add_image icon.png icon
|
||||||
|
rm btcc
|
330
cmake2meson.py
Executable file
330
cmake2meson.py
Executable file
|
@ -0,0 +1,330 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# Copyright 2014 Jussi Pakkanen
|
||||||
|
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
import typing as T
|
||||||
|
from pathlib import Path
|
||||||
|
import sys
|
||||||
|
import re
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
|
class Token:
|
||||||
|
def __init__(self, tid: str, value: str):
|
||||||
|
self.tid = tid
|
||||||
|
self.value = value
|
||||||
|
self.lineno = 0
|
||||||
|
self.colno = 0
|
||||||
|
|
||||||
|
class Statement:
|
||||||
|
def __init__(self, name: str, args: list):
|
||||||
|
self.name = name.lower()
|
||||||
|
self.args = args
|
||||||
|
|
||||||
|
class Lexer:
|
||||||
|
def __init__(self) -> None:
|
||||||
|
self.token_specification = [
|
||||||
|
# Need to be sorted longest to shortest.
|
||||||
|
('ignore', re.compile(r'[ \t]')),
|
||||||
|
('string', re.compile(r'"([^\\]|(\\.))*?"', re.M)),
|
||||||
|
('varexp', re.compile(r'\${[-_0-9a-z/A-Z.]+}')),
|
||||||
|
('id', re.compile('''[,-><${}=+_0-9a-z/A-Z|@.*]+''')),
|
||||||
|
('eol', re.compile(r'\n')),
|
||||||
|
('comment', re.compile(r'#.*')),
|
||||||
|
('lparen', re.compile(r'\(')),
|
||||||
|
('rparen', re.compile(r'\)')),
|
||||||
|
]
|
||||||
|
|
||||||
|
def lex(self, code: str) -> T.Iterator[Token]:
|
||||||
|
lineno = 1
|
||||||
|
line_start = 0
|
||||||
|
loc = 0
|
||||||
|
col = 0
|
||||||
|
while loc < len(code):
|
||||||
|
matched = False
|
||||||
|
for (tid, reg) in self.token_specification:
|
||||||
|
mo = reg.match(code, loc)
|
||||||
|
if mo:
|
||||||
|
col = mo.start() - line_start
|
||||||
|
matched = True
|
||||||
|
loc = mo.end()
|
||||||
|
match_text = mo.group()
|
||||||
|
if tid == 'ignore':
|
||||||
|
continue
|
||||||
|
if tid == 'comment':
|
||||||
|
yield(Token('comment', match_text))
|
||||||
|
elif tid == 'lparen':
|
||||||
|
yield(Token('lparen', '('))
|
||||||
|
elif tid == 'rparen':
|
||||||
|
yield(Token('rparen', ')'))
|
||||||
|
elif tid == 'string':
|
||||||
|
yield(Token('string', match_text[1:-1]))
|
||||||
|
elif tid == 'id':
|
||||||
|
yield(Token('id', match_text))
|
||||||
|
elif tid == 'eol':
|
||||||
|
# yield('eol')
|
||||||
|
lineno += 1
|
||||||
|
col = 1
|
||||||
|
line_start = mo.end()
|
||||||
|
elif tid == 'varexp':
|
||||||
|
yield(Token('varexp', match_text[2:-1]))
|
||||||
|
else:
|
||||||
|
raise ValueError(f'lex: unknown element {tid}')
|
||||||
|
break
|
||||||
|
if not matched:
|
||||||
|
raise ValueError('Lexer got confused line %d column %d' % (lineno, col))
|
||||||
|
|
||||||
|
class Parser:
|
||||||
|
def __init__(self, code: str) -> None:
|
||||||
|
self.stream = Lexer().lex(code)
|
||||||
|
self.getsym()
|
||||||
|
|
||||||
|
def getsym(self) -> None:
|
||||||
|
try:
|
||||||
|
self.current = next(self.stream)
|
||||||
|
except StopIteration:
|
||||||
|
self.current = Token('eof', '')
|
||||||
|
|
||||||
|
def accept(self, s: str) -> bool:
|
||||||
|
if self.current.tid == s:
|
||||||
|
self.getsym()
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
def expect(self, s: str) -> bool:
|
||||||
|
if self.accept(s):
|
||||||
|
return True
|
||||||
|
raise ValueError(f'Expecting {s} got {self.current.tid}.', self.current.lineno, self.current.colno)
|
||||||
|
|
||||||
|
def statement(self) -> Statement:
|
||||||
|
cur = self.current
|
||||||
|
if self.accept('comment'):
|
||||||
|
return Statement('_', [cur.value])
|
||||||
|
self.accept('id')
|
||||||
|
self.expect('lparen')
|
||||||
|
args = self.arguments()
|
||||||
|
self.expect('rparen')
|
||||||
|
return Statement(cur.value, args)
|
||||||
|
|
||||||
|
def arguments(self) -> T.List[T.Union[Token, T.Any]]:
|
||||||
|
args = [] # type: T.List[T.Union[Token, T.Any]]
|
||||||
|
if self.accept('lparen'):
|
||||||
|
args.append(self.arguments())
|
||||||
|
self.expect('rparen')
|
||||||
|
arg = self.current
|
||||||
|
if self.accept('comment'):
|
||||||
|
rest = self.arguments()
|
||||||
|
args += rest
|
||||||
|
elif self.accept('string') \
|
||||||
|
or self.accept('varexp') \
|
||||||
|
or self.accept('id'):
|
||||||
|
args.append(arg)
|
||||||
|
rest = self.arguments()
|
||||||
|
args += rest
|
||||||
|
return args
|
||||||
|
|
||||||
|
def parse(self) -> T.Iterator[Statement]:
|
||||||
|
while not self.accept('eof'):
|
||||||
|
yield(self.statement())
|
||||||
|
|
||||||
|
def token_or_group(arg: T.Union[Token, T.List[Token]]) -> str:
|
||||||
|
if isinstance(arg, Token):
|
||||||
|
return ' ' + arg.value
|
||||||
|
elif isinstance(arg, list):
|
||||||
|
line = ' ('
|
||||||
|
for a in arg:
|
||||||
|
line += ' ' + token_or_group(a)
|
||||||
|
line += ' )'
|
||||||
|
return line
|
||||||
|
raise RuntimeError('Conversion error in token_or_group')
|
||||||
|
|
||||||
|
class Converter:
|
||||||
|
ignored_funcs = {'cmake_minimum_required': True,
|
||||||
|
'enable_testing': True,
|
||||||
|
'include': True}
|
||||||
|
|
||||||
|
def __init__(self, cmake_root: str):
|
||||||
|
self.cmake_root = Path(cmake_root).expanduser()
|
||||||
|
self.indent_unit = ' '
|
||||||
|
self.indent_level = 0
|
||||||
|
self.options = [] # type: T.List[tuple]
|
||||||
|
|
||||||
|
def convert_args(self, args: T.List[Token], as_array: bool = True) -> str:
|
||||||
|
res = []
|
||||||
|
if as_array:
|
||||||
|
start = '['
|
||||||
|
end = ']'
|
||||||
|
else:
|
||||||
|
start = ''
|
||||||
|
end = ''
|
||||||
|
for i in args:
|
||||||
|
if i.tid == 'id':
|
||||||
|
res.append("'%s'" % i.value)
|
||||||
|
elif i.tid == 'varexp':
|
||||||
|
res.append('%s' % i.value.lower())
|
||||||
|
elif i.tid == 'string':
|
||||||
|
res.append("'%s'" % i.value)
|
||||||
|
else:
|
||||||
|
raise ValueError(f'Unknown arg type {i.tid}')
|
||||||
|
if len(res) > 1:
|
||||||
|
return start + ', '.join(res) + end
|
||||||
|
if len(res) == 1:
|
||||||
|
return res[0]
|
||||||
|
return ''
|
||||||
|
|
||||||
|
def write_entry(self, outfile: T.TextIO, t: Statement) -> None:
|
||||||
|
if t.name in Converter.ignored_funcs:
|
||||||
|
return
|
||||||
|
preincrement = 0
|
||||||
|
postincrement = 0
|
||||||
|
if t.name == '_':
|
||||||
|
line = t.args[0]
|
||||||
|
elif t.name == 'add_subdirectory':
|
||||||
|
line = "subdir('" + t.args[0].value + "')"
|
||||||
|
elif t.name == 'pkg_search_module' or t.name == 'pkg_search_modules':
|
||||||
|
varname = t.args[0].value.lower()
|
||||||
|
mods = ["dependency('%s')" % i.value for i in t.args[1:]]
|
||||||
|
if len(mods) == 1:
|
||||||
|
line = '{} = {}'.format(varname, mods[0])
|
||||||
|
else:
|
||||||
|
line = '{} = [{}]'.format(varname, ', '.join(["'%s'" % i for i in mods]))
|
||||||
|
elif t.name == 'find_package':
|
||||||
|
line = "{}_dep = dependency('{}')".format(t.args[0].value, t.args[0].value)
|
||||||
|
elif t.name == 'find_library':
|
||||||
|
line = "{} = find_library('{}')".format(t.args[0].value.lower(), t.args[0].value)
|
||||||
|
elif t.name == 'add_executable':
|
||||||
|
line = '{}_exe = executable({})'.format(t.args[0].value, self.convert_args(t.args, False))
|
||||||
|
elif t.name == 'add_library':
|
||||||
|
if t.args[1].value == 'SHARED':
|
||||||
|
libcmd = 'shared_library'
|
||||||
|
args = [t.args[0]] + t.args[2:]
|
||||||
|
elif t.args[1].value == 'STATIC':
|
||||||
|
libcmd = 'static_library'
|
||||||
|
args = [t.args[0]] + t.args[2:]
|
||||||
|
else:
|
||||||
|
libcmd = 'library'
|
||||||
|
args = t.args
|
||||||
|
line = '{}_lib = {}({})'.format(t.args[0].value, libcmd, self.convert_args(args, False))
|
||||||
|
elif t.name == 'add_test':
|
||||||
|
line = 'test(%s)' % self.convert_args(t.args, False)
|
||||||
|
elif t.name == 'option':
|
||||||
|
optname = t.args[0].value
|
||||||
|
description = t.args[1].value
|
||||||
|
if len(t.args) > 2:
|
||||||
|
default = t.args[2].value
|
||||||
|
else:
|
||||||
|
default = None
|
||||||
|
self.options.append((optname, description, default))
|
||||||
|
return
|
||||||
|
elif t.name == 'project':
|
||||||
|
pname = t.args[0].value
|
||||||
|
args = [pname]
|
||||||
|
for l in t.args[1:]:
|
||||||
|
l = l.value.lower()
|
||||||
|
if l == 'cxx':
|
||||||
|
l = 'cpp'
|
||||||
|
args.append(l)
|
||||||
|
args = ["'%s'" % i for i in args]
|
||||||
|
line = 'project(' + ', '.join(args) + ", default_options : ['default_library=static'])"
|
||||||
|
elif t.name == 'set':
|
||||||
|
varname = t.args[0].value.lower()
|
||||||
|
line = '{} = {}\n'.format(varname, self.convert_args(t.args[1:]))
|
||||||
|
elif t.name == 'if':
|
||||||
|
postincrement = 1
|
||||||
|
try:
|
||||||
|
line = 'if %s' % self.convert_args(t.args, False)
|
||||||
|
except AttributeError: # complex if statements
|
||||||
|
line = t.name
|
||||||
|
for arg in t.args:
|
||||||
|
line += token_or_group(arg)
|
||||||
|
elif t.name == 'elseif':
|
||||||
|
preincrement = -1
|
||||||
|
postincrement = 1
|
||||||
|
try:
|
||||||
|
line = 'elif %s' % self.convert_args(t.args, False)
|
||||||
|
except AttributeError: # complex if statements
|
||||||
|
line = t.name
|
||||||
|
for arg in t.args:
|
||||||
|
line += token_or_group(arg)
|
||||||
|
elif t.name == 'else':
|
||||||
|
preincrement = -1
|
||||||
|
postincrement = 1
|
||||||
|
line = 'else'
|
||||||
|
elif t.name == 'endif':
|
||||||
|
preincrement = -1
|
||||||
|
line = 'endif'
|
||||||
|
else:
|
||||||
|
line = '''# {}({})'''.format(t.name, self.convert_args(t.args))
|
||||||
|
self.indent_level += preincrement
|
||||||
|
indent = self.indent_level * self.indent_unit
|
||||||
|
outfile.write(indent)
|
||||||
|
outfile.write(line)
|
||||||
|
if not(line.endswith('\n')):
|
||||||
|
outfile.write('\n')
|
||||||
|
self.indent_level += postincrement
|
||||||
|
|
||||||
|
def convert(self, subdir: Path = None) -> None:
|
||||||
|
if not subdir:
|
||||||
|
subdir = self.cmake_root
|
||||||
|
cfile = Path(subdir).expanduser() / 'CMakeLists.txt'
|
||||||
|
try:
|
||||||
|
with cfile.open(encoding='utf-8') as f:
|
||||||
|
cmakecode = f.read()
|
||||||
|
except FileNotFoundError:
|
||||||
|
print('\nWarning: No CMakeLists.txt in', subdir, '\n', file=sys.stderr)
|
||||||
|
return
|
||||||
|
p = Parser(cmakecode)
|
||||||
|
with (subdir / 'meson.build').open('w', encoding='utf-8') as outfile:
|
||||||
|
for t in p.parse():
|
||||||
|
if t.name == 'add_subdirectory':
|
||||||
|
# print('\nRecursing to subdir',
|
||||||
|
# self.cmake_root / t.args[0].value,
|
||||||
|
# '\n')
|
||||||
|
self.convert(subdir / t.args[0].value)
|
||||||
|
# print('\nReturning to', self.cmake_root, '\n')
|
||||||
|
self.write_entry(outfile, t)
|
||||||
|
if subdir == self.cmake_root and len(self.options) > 0:
|
||||||
|
self.write_options()
|
||||||
|
|
||||||
|
def write_options(self) -> None:
|
||||||
|
filename = self.cmake_root / 'meson_options.txt'
|
||||||
|
with filename.open('w', encoding='utf-8') as optfile:
|
||||||
|
for o in self.options:
|
||||||
|
(optname, description, default) = o
|
||||||
|
if default is None:
|
||||||
|
typestr = ''
|
||||||
|
defaultstr = ''
|
||||||
|
else:
|
||||||
|
if default == 'OFF':
|
||||||
|
typestr = ' type : \'boolean\','
|
||||||
|
default = 'false'
|
||||||
|
elif default == 'ON':
|
||||||
|
default = 'true'
|
||||||
|
typestr = ' type : \'boolean\','
|
||||||
|
else:
|
||||||
|
typestr = ' type : \'string\','
|
||||||
|
defaultstr = ' value : %s,' % default
|
||||||
|
line = "option({!r},{}{} description : '{}')\n".format(optname,
|
||||||
|
typestr,
|
||||||
|
defaultstr,
|
||||||
|
description)
|
||||||
|
optfile.write(line)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
p = argparse.ArgumentParser(description='Convert CMakeLists.txt to meson.build and meson_options.txt')
|
||||||
|
p.add_argument('cmake_root', help='CMake project root (where top-level CMakeLists.txt is)')
|
||||||
|
P = p.parse_args()
|
||||||
|
|
||||||
|
Converter(P.cmake_root).convert()
|
1
imgui
Submodule
1
imgui
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d2291df55190e2f070af2635863f47a96d378a52
|
1
imgui-filebrowser
Submodule
1
imgui-filebrowser
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit cfccc2aab651cb19cbc2c3ad36be78c36078ec76
|
448
main.cpp
Normal file
448
main.cpp
Normal file
|
@ -0,0 +1,448 @@
|
||||||
|
#include "imgui.h"
|
||||||
|
#include "imgui_impl_sdl2.h"
|
||||||
|
#include "imgui_impl_opengl3.h"
|
||||||
|
#include "imfilebrowser.h"
|
||||||
|
#include "playback.h"
|
||||||
|
#include "icon.h"
|
||||||
|
#include "IconsForkAwesome.h"
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
#include <json/json.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "forkawesome.h"
|
||||||
|
#include <numbers>
|
||||||
|
#include <cmath>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <SDL.h>
|
||||||
|
#include <SDL_image.h>
|
||||||
|
#if defined(IMGUI_IMPL_OPENGL_ES2)
|
||||||
|
#include <SDL_opengles2.h>
|
||||||
|
#else
|
||||||
|
#include <SDL_opengl.h>
|
||||||
|
#endif
|
||||||
|
static const char* NAME = "Neko Player";
|
||||||
|
#ifdef __EMSCRIPTEN__
|
||||||
|
#include "../libs/emscripten/emscripten_mainloop_stub.h"
|
||||||
|
#endif
|
||||||
|
using namespace std::filesystem;
|
||||||
|
using namespace std::numbers;
|
||||||
|
static float accent_color = 280.0;
|
||||||
|
float GetHue(ImVec4 rgba){
|
||||||
|
float r = rgba.x, g = rgba.y, b = rgba.z;
|
||||||
|
float hue;
|
||||||
|
if ((r >= g) && (g >= b)) {
|
||||||
|
hue = 60.0 * (g-b)/(r-b);
|
||||||
|
} else if ((g > r) && (r >= b)) {
|
||||||
|
hue = 60.0 * (2.0 - ((r-b)/(g-b)));
|
||||||
|
} else if ((g >= b) && (b > r)) {
|
||||||
|
hue = 60.0 * (2.0 + ((b-r)/(g-r)));
|
||||||
|
} else if ((b > g) && (g > r)) {
|
||||||
|
hue = 60.0 * (4.0 - ((g-r)/(b-r)));
|
||||||
|
} else if ((b > r) && (r >= g)) {
|
||||||
|
hue = 60.0 * (4.0 - ((r-g)/(b-g)));
|
||||||
|
} else if ((r >= b) && (b > g)) {
|
||||||
|
hue = 60.0 * (6.0 - ((b-g)/(r-g)));
|
||||||
|
} else {
|
||||||
|
hue = -1.0;
|
||||||
|
}
|
||||||
|
return hue;
|
||||||
|
}
|
||||||
|
void change_accent_color(ImGuiCol color, float hue) {
|
||||||
|
ImGuiStyle& style = ImGui::GetStyle();
|
||||||
|
ImVec4 in = style.Colors[color];
|
||||||
|
float Target = hue;
|
||||||
|
float Current = GetHue(in);
|
||||||
|
float H = 360-Target+Current; // TODO: Figure out why these magic numbers are necessary.
|
||||||
|
//printf("Cur: %f, Target: %f, Diff: %f", Current, Target, H);
|
||||||
|
float U = cos(H*pi/180.0);
|
||||||
|
float W = sin(H*pi/180.0);
|
||||||
|
ImVec4 out = in;
|
||||||
|
out.x = (.299+.701*U+.168*W)*in.x
|
||||||
|
+ (.587-.587*U+.330*W)*in.y
|
||||||
|
+ (.114-.114*U-.497*W)*in.z;
|
||||||
|
out.y = (.299-.299*U-.328*W)*in.x
|
||||||
|
+ (.587+.413*U+.035*W)*in.y
|
||||||
|
+ (.114-.114*U+.292*W)*in.z;
|
||||||
|
out.z = (.299-.3*U+1.25*W)*in.x
|
||||||
|
+ (.587-.588*U-1.05*W)*in.y
|
||||||
|
+ (.114+.886*U-.203*W)*in.z;
|
||||||
|
//printf(", Actual: %f\n", GetHue(out));
|
||||||
|
style.Colors[color] = out;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateStyle(bool dark) {
|
||||||
|
if (dark) {
|
||||||
|
ImGui::StyleColorsDark();
|
||||||
|
} else {
|
||||||
|
ImGui::StyleColorsLight();
|
||||||
|
}
|
||||||
|
ImGuiCol colors[] = {
|
||||||
|
ImGuiCol_FrameBgHovered,
|
||||||
|
ImGuiCol_FrameBgActive,
|
||||||
|
ImGuiCol_CheckMark,
|
||||||
|
ImGuiCol_SliderGrab,
|
||||||
|
ImGuiCol_SliderGrabActive,
|
||||||
|
ImGuiCol_Button,
|
||||||
|
ImGuiCol_ButtonHovered,
|
||||||
|
ImGuiCol_ButtonActive,
|
||||||
|
ImGuiCol_Header,
|
||||||
|
ImGuiCol_HeaderHovered,
|
||||||
|
ImGuiCol_HeaderActive,
|
||||||
|
ImGuiCol_ResizeGripActive,
|
||||||
|
ImGuiCol_ResizeGripHovered,
|
||||||
|
ImGuiCol_Tab,
|
||||||
|
ImGuiCol_TabHovered,
|
||||||
|
ImGuiCol_TabActive,
|
||||||
|
ImGuiCol_TabUnfocusedActive,
|
||||||
|
ImGuiCol_DockingPreview,
|
||||||
|
ImGuiCol_TableHeaderBg,
|
||||||
|
ImGuiCol_TextSelectedBg,
|
||||||
|
ImGuiCol_DragDropTarget,
|
||||||
|
ImGuiCol_SeparatorHovered,
|
||||||
|
ImGuiCol_SeparatorActive,
|
||||||
|
ImGuiCol_NavHighlight,
|
||||||
|
};
|
||||||
|
ImGuiCol colors_dark[] = {
|
||||||
|
ImGuiCol_FrameBg,
|
||||||
|
ImGuiCol_TitleBgActive,
|
||||||
|
ImGuiCol_ResizeGrip,
|
||||||
|
};
|
||||||
|
for (auto color : colors) {
|
||||||
|
change_accent_color(color, accent_color);
|
||||||
|
}
|
||||||
|
if (dark) {
|
||||||
|
for (auto color : colors_dark) {
|
||||||
|
change_accent_color(color, accent_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Main code
|
||||||
|
int main(int, char**)
|
||||||
|
{
|
||||||
|
bool enable_kms = std::getenv("LAP_KMS") != nullptr;
|
||||||
|
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "false");
|
||||||
|
SDL_SetHint(SDL_HINT_APP_NAME, NAME);
|
||||||
|
// Setup SDL
|
||||||
|
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0)
|
||||||
|
{
|
||||||
|
printf("Error: %s\n", SDL_GetError());
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (std::string(SDL_GetCurrentVideoDriver()) == "KMSDRM") {
|
||||||
|
enable_kms = true;
|
||||||
|
}
|
||||||
|
IMG_Init(IMG_INIT_PNG|IMG_INIT_WEBP);
|
||||||
|
const char* prefPath = SDL_GetPrefPath("Catmeow72", NAME);
|
||||||
|
|
||||||
|
// Decide GL+GLSL versions
|
||||||
|
#if defined(IMGUI_IMPL_OPENGL_ES2)
|
||||||
|
// GL ES 2.0 + GLSL 100
|
||||||
|
const char* glsl_version = "#version 100";
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
// GL 3.2 Core + GLSL 150
|
||||||
|
const char* glsl_version = "#version 150";
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); // Always required on Mac
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
|
||||||
|
#else
|
||||||
|
// GL 3.0 + GLSL 130
|
||||||
|
const char* glsl_version = "#version 130";
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// From 2.0.18: Enable native IME.
|
||||||
|
#ifdef SDL_HINT_IME_SHOW_UI
|
||||||
|
SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Create window with graphics context
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
|
||||||
|
SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
|
||||||
|
SDL_Window* window = SDL_CreateWindow(NAME, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 475, 54, window_flags);
|
||||||
|
if (enable_kms) {
|
||||||
|
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||||
|
}
|
||||||
|
SDL_SetWindowMinimumSize(window, 475, 54);
|
||||||
|
SDL_Surface* icon = IMG_Load_RW(SDL_RWFromConstMem(icon_data, icon_size), 1);
|
||||||
|
SDL_SetWindowIcon(window, icon);
|
||||||
|
SDL_GLContext gl_context = SDL_GL_CreateContext(window);
|
||||||
|
SDL_GL_MakeCurrent(window, gl_context);
|
||||||
|
SDL_GL_SetSwapInterval(1); // Enable vsync
|
||||||
|
|
||||||
|
// Setup Dear ImGui context
|
||||||
|
IMGUI_CHECKVERSION();
|
||||||
|
ImGui::CreateContext();
|
||||||
|
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||||
|
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
|
||||||
|
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
|
||||||
|
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
|
||||||
|
io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
|
||||||
|
io.IniFilename = strdup((std::string(prefPath) + "imgui.ini").c_str());
|
||||||
|
if (enable_kms) {
|
||||||
|
io.MouseDrawCursor = true;
|
||||||
|
}
|
||||||
|
//io.ConfigViewportsNoAutoMerge = true;
|
||||||
|
//io.ConfigViewportsNoTaskBarIcon = true;
|
||||||
|
|
||||||
|
// Setup Dear ImGui style
|
||||||
|
UpdateStyle(true);
|
||||||
|
//ImGui::StyleColorsLight();
|
||||||
|
|
||||||
|
// When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
|
||||||
|
ImGuiStyle& style = ImGui::GetStyle();
|
||||||
|
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
|
||||||
|
{
|
||||||
|
style.WindowRounding = 0.0f;
|
||||||
|
style.Colors[ImGuiCol_WindowBg].w = 1.0f;
|
||||||
|
}
|
||||||
|
style.FrameRounding = 12;
|
||||||
|
style.WindowRounding = 12;
|
||||||
|
|
||||||
|
// Setup Platform/Renderer backends
|
||||||
|
ImGui_ImplSDL2_InitForOpenGL(window, gl_context);
|
||||||
|
ImGui_ImplOpenGL3_Init(glsl_version);
|
||||||
|
|
||||||
|
// Load Fonts
|
||||||
|
// - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
|
||||||
|
// - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
|
||||||
|
// - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
|
||||||
|
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
|
||||||
|
// - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
|
||||||
|
// - Read 'docs/FONTS.md' for more instructions and details.
|
||||||
|
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
|
||||||
|
//io.Fonts->AddFontDefault();
|
||||||
|
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f);
|
||||||
|
//io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
|
||||||
|
//io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
|
||||||
|
//io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
|
||||||
|
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese());
|
||||||
|
//IM_ASSERT(font != nullptr);
|
||||||
|
io.Fonts->AddFontDefault();
|
||||||
|
ImFontConfig config;
|
||||||
|
config.MergeMode = true;
|
||||||
|
config.GlyphMinAdvanceX = 13.0f;
|
||||||
|
static const ImWchar icon_ranges[] = { ICON_MIN_FK, ICON_MAX_FK, 0 };
|
||||||
|
io.Fonts->AddFontFromMemoryCompressedBase85TTF(forkawesome_compressed_data_base85, 13.0f, &config, icon_ranges);
|
||||||
|
|
||||||
|
// Our state
|
||||||
|
bool show_demo_window = false;
|
||||||
|
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
|
||||||
|
|
||||||
|
ImGui::FileBrowser fileDialog;
|
||||||
|
fileDialog.SetTitle("Open...");
|
||||||
|
fileDialog.SetTypeFilters({ ".wav", ".ogg", ".mp3", ".qoa", ".flac", ".xm", ".mod"});
|
||||||
|
std::string userdir = std::getenv(
|
||||||
|
#ifdef _WIN32
|
||||||
|
"UserProfile"
|
||||||
|
#else
|
||||||
|
"HOME"
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
fileDialog.SetPwd(path(userdir) / path("Music"));
|
||||||
|
Playback *playback = new Playback();
|
||||||
|
float position = 0.0;
|
||||||
|
// Main loop
|
||||||
|
bool done = false;
|
||||||
|
bool dark_mode = true;
|
||||||
|
bool prefs_window = false;
|
||||||
|
bool stopped = true;
|
||||||
|
{
|
||||||
|
Json::Value config;
|
||||||
|
std::ifstream stream;
|
||||||
|
stream.open(path(prefPath) / "config.json");
|
||||||
|
if (stream.is_open()) {
|
||||||
|
stream >> config;
|
||||||
|
if (config.isMember("dark_mode")) {
|
||||||
|
dark_mode = config["dark_mode"].asBool();\
|
||||||
|
}
|
||||||
|
if (config.isMember("accent_color")) {
|
||||||
|
accent_color = config["accent_color"].asFloat();
|
||||||
|
}
|
||||||
|
if (config.isMember("demo_window")) {
|
||||||
|
show_demo_window = config["demo_window"].asBool();
|
||||||
|
}
|
||||||
|
stream.close();
|
||||||
|
UpdateStyle(dark_mode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#ifdef __EMSCRIPTEN__
|
||||||
|
// For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file.
|
||||||
|
// You may manually call LoadIniSettingsFromMemory() to load settings from your own storage.
|
||||||
|
io.IniFilename = nullptr;
|
||||||
|
EMSCRIPTEN_MAINLOOP_BEGIN
|
||||||
|
#else
|
||||||
|
while (!done)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
position = playback->GetPosition();
|
||||||
|
// Poll and handle events (inputs, window resize, etc.)
|
||||||
|
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
|
||||||
|
// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
|
||||||
|
// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
|
||||||
|
// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
|
||||||
|
SDL_Event event;
|
||||||
|
while (SDL_PollEvent(&event))
|
||||||
|
{
|
||||||
|
ImGui_ImplSDL2_ProcessEvent(&event);
|
||||||
|
if (event.type == SDL_QUIT)
|
||||||
|
done = true;
|
||||||
|
if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start the Dear ImGui frame
|
||||||
|
ImGui_ImplOpenGL3_NewFrame();
|
||||||
|
ImGui_ImplSDL2_NewFrame();
|
||||||
|
ImGui::NewFrame();
|
||||||
|
auto dockid = ImGui::DockSpaceOverViewport(nullptr, ImGuiDockNodeFlags_AutoHideTabBar);
|
||||||
|
// 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
|
||||||
|
if (show_demo_window)
|
||||||
|
ImGui::ShowDemoWindow(&show_demo_window);
|
||||||
|
ImGui::SetNextWindowDockID(dockid);
|
||||||
|
ImGui::Begin("Player", nullptr, ImGuiWindowFlags_MenuBar);
|
||||||
|
{
|
||||||
|
if (ImGui::BeginMenuBar()) {
|
||||||
|
if (ImGui::BeginMenu(ICON_FK_FILE "File")) {
|
||||||
|
if (ImGui::MenuItem(ICON_FK_FOLDER_OPEN "Open")) {
|
||||||
|
fileDialog.Open();
|
||||||
|
}
|
||||||
|
if (ImGui::MenuItem(ICON_FK_WINDOW_CLOSE "Quit")) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
ImGui::EndMenu();
|
||||||
|
}
|
||||||
|
if (ImGui::BeginMenu(ICON_FK_SCISSORS "Edit")) {
|
||||||
|
if (ImGui::MenuItem(ICON_FK_COG "Preferences...")) {
|
||||||
|
prefs_window = true;
|
||||||
|
}
|
||||||
|
ImGui::EndMenu();
|
||||||
|
}
|
||||||
|
#ifdef DEBUG
|
||||||
|
if (ImGui::BeginMenu(ICON_FK_COG "Debug")) {
|
||||||
|
if (ImGui::MenuItem("Show ImGui Demo Window", nullptr, show_demo_window)) {
|
||||||
|
show_demo_window = !show_demo_window;
|
||||||
|
}
|
||||||
|
ImGui::EndMenu();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
ImGui::EndMenuBar();
|
||||||
|
}
|
||||||
|
ImGui::SetCursorPosY(ImGui::GetWindowHeight() - 27);
|
||||||
|
if (ImGui::Button(playback->IsPaused() ? ICON_FK_PLAY "##Pause" : ICON_FK_PAUSE "##Pause")) {
|
||||||
|
playback->Pause();
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button(ICON_FK_REFRESH "##Restart")) {
|
||||||
|
playback->Seek(0.0);
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::SetNextItemWidth(ImGui::GetWindowWidth() - (ImGui::GetFontSize() * 22) - (ImGui::GetStyle().FramePadding.x * 10));
|
||||||
|
if (ImGui::SliderFloat("##Seek", &position, 0.0f, playback->GetLength(), "%.0fs", ImGuiSliderFlags_NoRoundToFormat))
|
||||||
|
playback->Seek(position);
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button(ICON_FK_STOP "##Stop")) {
|
||||||
|
playback->Stop();
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::SetNextItemWidth(ImGui::GetFontSize() * 8);
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::SliderFloat("##Volume", &playback->volume, 0.0, 100.0, ICON_FK_VOLUME_UP ": %.0f%%")) {
|
||||||
|
playback->Update();
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::SetNextItemWidth(ImGui::GetFontSize() * 8);
|
||||||
|
if (ImGui::SliderFloat("##Speed", &playback->speed, 0.25, 4.0, "Speed: %.2fx", ImGuiSliderFlags_Logarithmic)) {
|
||||||
|
playback->Update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui::End();
|
||||||
|
if (prefs_window) {
|
||||||
|
ImVec2 min_size;
|
||||||
|
min_size.x = ImGui::GetFontSize() * 18;
|
||||||
|
min_size.y = (ImGui::GetStyle().FramePadding.y * 5) + (ImGui::GetFontSize() * 5);
|
||||||
|
ImVec2 max_size;
|
||||||
|
max_size.x = 99999999999;
|
||||||
|
max_size.y = min_size.y;
|
||||||
|
ImGui::SetNextWindowSizeConstraints(min_size, max_size);
|
||||||
|
ImGui::Begin("Preferences...", &prefs_window);
|
||||||
|
{
|
||||||
|
if (ImGui::Checkbox(ICON_FK_MOON "Dark Mode", &dark_mode)) {
|
||||||
|
UpdateStyle(dark_mode);
|
||||||
|
}
|
||||||
|
ImGui::SetNextItemWidth(ImGui::GetWindowWidth() - (ImGui::GetStyle().FramePadding.x * 4));
|
||||||
|
if (ImGui::SliderFloat("##AccentColor", &accent_color, 0.0, 360.0, "UI hue: %.0f°", ImGuiSliderFlags_NoRoundToFormat)) {
|
||||||
|
UpdateStyle(dark_mode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui::End();
|
||||||
|
}
|
||||||
|
fileDialog.Display();
|
||||||
|
|
||||||
|
if (fileDialog.HasSelected()) {
|
||||||
|
playback->Start(fileDialog.GetSelected().string());
|
||||||
|
SDL_SetWindowTitle(window, (fileDialog.GetSelected().filename().replace_extension("").string() + std::string(" - ") + std::string(NAME)).c_str());
|
||||||
|
fileDialog.ClearSelected();
|
||||||
|
}
|
||||||
|
if (playback->IsStopped() && !stopped) {
|
||||||
|
SDL_SetWindowTitle(window, NAME);
|
||||||
|
}
|
||||||
|
// Rendering
|
||||||
|
ImGui::Render();
|
||||||
|
glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y);
|
||||||
|
glClearColor(clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||||
|
|
||||||
|
// Update and Render additional Platform Windows
|
||||||
|
// (Platform functions may change the current OpenGL context, so we save/restore it to make it easier to paste this code elsewhere.
|
||||||
|
// For this specific demo app we could also call SDL_GL_MakeCurrent(window, gl_context) directly)
|
||||||
|
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
|
||||||
|
{
|
||||||
|
SDL_Window* backup_current_window = SDL_GL_GetCurrentWindow();
|
||||||
|
SDL_GLContext backup_current_context = SDL_GL_GetCurrentContext();
|
||||||
|
ImGui::UpdatePlatformWindows();
|
||||||
|
ImGui::RenderPlatformWindowsDefault();
|
||||||
|
SDL_GL_MakeCurrent(backup_current_window, backup_current_context);
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_GL_SwapWindow(window);
|
||||||
|
}
|
||||||
|
// Cleanup
|
||||||
|
#ifdef __EMSCRIPTEN__
|
||||||
|
EMSCRIPTEN_MAINLOOP_END;
|
||||||
|
#endif
|
||||||
|
delete playback;
|
||||||
|
|
||||||
|
// Cleanup
|
||||||
|
ImGui_ImplOpenGL3_Shutdown();
|
||||||
|
ImGui_ImplSDL2_Shutdown();
|
||||||
|
ImGui::DestroyContext();
|
||||||
|
|
||||||
|
SDL_GL_DeleteContext(gl_context);
|
||||||
|
SDL_DestroyWindow(window);
|
||||||
|
IMG_Quit();
|
||||||
|
SDL_Quit();
|
||||||
|
{
|
||||||
|
Json::Value config;
|
||||||
|
std::ofstream stream;
|
||||||
|
stream.open(path(prefPath) / "config.json");
|
||||||
|
config["dark_mode"] = dark_mode;
|
||||||
|
config["accent_color"] = accent_color;
|
||||||
|
config["demo_window"] = show_demo_window;
|
||||||
|
stream << config;
|
||||||
|
stream.close();
|
||||||
|
}
|
||||||
|
free((void*)io.IniFilename);
|
||||||
|
return 0;
|
||||||
|
}
|
42
meson.build
Normal file
42
meson.build
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
project('looping-audio-player-raylib', ['c', 'cpp'],
|
||||||
|
version : '0.1',
|
||||||
|
default_options : ['warning_level=3',
|
||||||
|
'cpp_std=c++20'])
|
||||||
|
|
||||||
|
if get_option('debug')
|
||||||
|
add_global_arguments('-DDEBUG', language: 'cpp')
|
||||||
|
endif
|
||||||
|
deps = [
|
||||||
|
dependency('raylib'),
|
||||||
|
dependency('sdl2'),
|
||||||
|
dependency('sdl2_image'),
|
||||||
|
dependency('gl'),
|
||||||
|
dependency('jsoncpp'),
|
||||||
|
]
|
||||||
|
|
||||||
|
srcs = [
|
||||||
|
'main.cpp',
|
||||||
|
'playback.cpp',
|
||||||
|
'imgui/imgui.cpp',
|
||||||
|
'imgui/imgui_widgets.cpp',
|
||||||
|
'imgui/imgui_tables.cpp',
|
||||||
|
'imgui/imgui_draw.cpp',
|
||||||
|
'imgui/imgui_demo.cpp',
|
||||||
|
'imgui/backends/imgui_impl_sdl2.cpp',
|
||||||
|
'imgui/backends/imgui_impl_opengl3.cpp',
|
||||||
|
]
|
||||||
|
|
||||||
|
include_dirs = [
|
||||||
|
'imgui',
|
||||||
|
'imgui/backends',
|
||||||
|
'imgui-filebrowser',
|
||||||
|
'IconFontCppHeaders',
|
||||||
|
'assets',
|
||||||
|
]
|
||||||
|
|
||||||
|
res = run_command('./assets/update-assets.sh')
|
||||||
|
|
||||||
|
exe = executable('player', srcs,
|
||||||
|
dependencies: deps,
|
||||||
|
include_directories: include_dirs,
|
||||||
|
install : true)
|
103
playback.cpp
Normal file
103
playback.cpp
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
#include "playback.h"
|
||||||
|
#include <raylib.h>
|
||||||
|
#include <thread>
|
||||||
|
using namespace std::chrono;
|
||||||
|
void Playback::ThreadFunc() {
|
||||||
|
InitAudioDevice();
|
||||||
|
Music music = LoadMusicStream(filePath.c_str());
|
||||||
|
PlayMusicStream(music);
|
||||||
|
length = GetMusicTimeLength(music);
|
||||||
|
while (running) {
|
||||||
|
if (file_changed.exchange(false)) {
|
||||||
|
StopMusicStream(music);
|
||||||
|
UnloadMusicStream(music);
|
||||||
|
music = LoadMusicStream(filePath.c_str());
|
||||||
|
PlayMusicStream(music);
|
||||||
|
length = GetMusicTimeLength(music);
|
||||||
|
}
|
||||||
|
UpdateMusicStream(music);
|
||||||
|
if (flag_mutex.try_lock()) {
|
||||||
|
if (seeking.exchange(false)) {
|
||||||
|
SeekMusicStream(music, position);
|
||||||
|
}
|
||||||
|
if (paused) {
|
||||||
|
PauseMusicStream(music);
|
||||||
|
} else {
|
||||||
|
ResumeMusicStream(music);
|
||||||
|
}
|
||||||
|
if (update.exchange(false)) {
|
||||||
|
SetMasterVolume(volume / 100.0);
|
||||||
|
SetMusicPitch(music, speed);
|
||||||
|
}
|
||||||
|
flag_mutex.unlock();
|
||||||
|
}
|
||||||
|
position = GetMusicTimePlayed(music);
|
||||||
|
std::this_thread::sleep_for(5ms);
|
||||||
|
}
|
||||||
|
UnloadMusicStream(music);
|
||||||
|
CloseAudioDevice();
|
||||||
|
}
|
||||||
|
|
||||||
|
Playback::Playback() {
|
||||||
|
running = false;
|
||||||
|
paused = true;
|
||||||
|
position = 0;
|
||||||
|
length = 0;
|
||||||
|
volume = 100.0;
|
||||||
|
speed = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Playback::~Playback() {
|
||||||
|
Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Playback::Start(std::string filePath) {
|
||||||
|
this->filePath = filePath;
|
||||||
|
printf("Playing %s...\n", filePath.c_str());
|
||||||
|
flag_mutex.lock();
|
||||||
|
paused = false;
|
||||||
|
Update();
|
||||||
|
if (running.exchange(true)) {
|
||||||
|
file_changed.store(true);
|
||||||
|
} else {
|
||||||
|
thread = std::thread(&Playback::ThreadFunc, this);
|
||||||
|
}
|
||||||
|
flag_mutex.unlock();
|
||||||
|
}
|
||||||
|
double Playback::GetPosition() {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
double Playback::GetLength() {
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Playback::Seek(double position) {
|
||||||
|
flag_mutex.lock();
|
||||||
|
this->position = position;
|
||||||
|
seeking.store(true);
|
||||||
|
flag_mutex.unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Playback::Pause() {
|
||||||
|
flag_mutex.lock();
|
||||||
|
paused = !paused;
|
||||||
|
flag_mutex.unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Playback::IsPaused() {
|
||||||
|
return paused;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Playback::Stop() {
|
||||||
|
if (running.exchange(false)) {
|
||||||
|
thread.join();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Playback::Update() {
|
||||||
|
update.store(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Playback::IsStopped() {
|
||||||
|
return !running;
|
||||||
|
}
|
33
playback.h
Normal file
33
playback.h
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#pragma once
|
||||||
|
#include <thread>
|
||||||
|
#include <string>
|
||||||
|
#include <atomic>
|
||||||
|
#include <mutex>
|
||||||
|
class Playback {
|
||||||
|
private:
|
||||||
|
std::string filePath;
|
||||||
|
std::atomic_bool running;
|
||||||
|
std::atomic_bool file_changed;
|
||||||
|
std::atomic_bool seeking;
|
||||||
|
std::atomic_bool update;
|
||||||
|
std::mutex flag_mutex;
|
||||||
|
std::thread thread;
|
||||||
|
double position;
|
||||||
|
double length;
|
||||||
|
bool paused;
|
||||||
|
void ThreadFunc();
|
||||||
|
public:
|
||||||
|
Playback();
|
||||||
|
~Playback();
|
||||||
|
double GetPosition();
|
||||||
|
double GetLength();
|
||||||
|
void Seek(double position);
|
||||||
|
void Start(std::string filePath);
|
||||||
|
bool IsPaused();
|
||||||
|
void Pause();
|
||||||
|
void Stop();
|
||||||
|
void Update();
|
||||||
|
bool IsStopped();
|
||||||
|
float volume;
|
||||||
|
float speed;
|
||||||
|
};
|
9
subprojects/jsoncpp.wrap
Normal file
9
subprojects/jsoncpp.wrap
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[wrap-file]
|
||||||
|
directory = jsoncpp-1.9.5
|
||||||
|
source_url = https://github.com/open-source-parsers/jsoncpp/archive/1.9.5.tar.gz
|
||||||
|
source_filename = jsoncpp-1.9.5.tar.gz
|
||||||
|
source_hash = f409856e5920c18d0c2fb85276e24ee607d2a09b5e7d5f0a371368903c275da2
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
jsoncpp = jsoncpp_dep
|
||||||
|
|
15
subprojects/sdl2.wrap
Normal file
15
subprojects/sdl2.wrap
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[wrap-file]
|
||||||
|
directory = SDL2-2.26.5
|
||||||
|
source_url = https://github.com/libsdl-org/SDL/releases/download/release-2.26.5/SDL2-2.26.5.tar.gz
|
||||||
|
source_filename = SDL2-2.26.5.tar.gz
|
||||||
|
source_hash = ad8fea3da1be64c83c45b1d363a6b4ba8fd60f5bde3b23ec73855709ec5eabf7
|
||||||
|
patch_filename = sdl2_2.26.5-5_patch.zip
|
||||||
|
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_2.26.5-5/get_patch
|
||||||
|
patch_hash = 4d8d3ae534c326f27b2d97616fdfa7cce41bd0333c7d9683dd8ae39d4ad70e6a
|
||||||
|
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_2.26.5-5/SDL2-2.26.5.tar.gz
|
||||||
|
wrapdb_version = 2.26.5-5
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
sdl2 = sdl2_dep
|
||||||
|
sdl2main = sdl2main_dep
|
||||||
|
sdl2_test = sdl2_test_dep
|
13
subprojects/sdl2_image.wrap
Normal file
13
subprojects/sdl2_image.wrap
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[wrap-file]
|
||||||
|
directory = SDL2_image-2.6.3
|
||||||
|
source_url = https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.6.3.tar.gz
|
||||||
|
source_filename = SDL2_image-2.6.3.tar.gz
|
||||||
|
source_hash = 931c9be5bf1d7c8fae9b7dc157828b7eee874e23c7f24b44ba7eff6b4836312c
|
||||||
|
patch_filename = sdl2_image_2.6.3-2_patch.zip
|
||||||
|
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_image_2.6.3-2/get_patch
|
||||||
|
patch_hash = 1741274f30b5b88299b2588a498a54a4203861ec1fa64c3bf99b359a6b618354
|
||||||
|
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_image_2.6.3-2/SDL2_image-2.6.3.tar.gz
|
||||||
|
wrapdb_version = 2.6.3-2
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
sdl2_image = sdl2_image_dep
|
14
x86_64-w64-mingw32.txt
Normal file
14
x86_64-w64-mingw32.txt
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[binaries]
|
||||||
|
c = 'x86_64-w64-mingw32-gcc'
|
||||||
|
cpp = 'x86_64-w64-mingw32-g++'
|
||||||
|
ar = 'x86_64-w64-mingw32-ar'
|
||||||
|
strip = 'x86_64-w64-mingw32-strip'
|
||||||
|
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
|
||||||
|
cmake = 'x86_64-w64-mingw32-cmake'
|
||||||
|
exe_wrapper = 'wine64'
|
||||||
|
|
||||||
|
[host_machine]
|
||||||
|
system = 'windows'
|
||||||
|
cpu_family = 'x86_64'
|
||||||
|
cpu = 'x86_64'
|
||||||
|
endian = 'little'
|
Loading…
Reference in a new issue