diff --git a/src/easymesh/easymesh-scanner.l b/src/easymesh/easymesh-scanner.l index 4bbd51a4..b73874be 100644 --- a/src/easymesh/easymesh-scanner.l +++ b/src/easymesh/easymesh-scanner.l @@ -145,7 +145,7 @@ false { yylval->bval = false; return token::BOOLEAN; } yylval->ival = std::atoi(yytext); return token::I_NUMBER; } %{ /* ======= COMMENTS ======= */ %} -"//"[^\n\r]*[\n\r] { /* ignore this */ } +"//".* { /* ignore this */ } %{ /* Semantics tokens */ %} "-" { return token_type('-'); } diff --git a/src/entity.h b/src/entity.h index b43fe351..5652988e 100644 --- a/src/entity.h +++ b/src/entity.h @@ -50,11 +50,12 @@ class Entity public: virtual char const *GetName(); + inline bool IsTicked() { return !!m_ref && !m_autorelease; } protected: Entity(); virtual ~Entity(); - inline int IsDestroying() { return m_destroy; } + inline int IsDestroying() { return m_destroy; } virtual void InitGame(); virtual void InitDraw(); diff --git a/src/generated/easymesh-scanner.cpp b/src/generated/easymesh-scanner.cpp index d48bbcb1..c2b5630b 100644 --- a/src/generated/easymesh-scanner.cpp +++ b/src/generated/easymesh-scanner.cpp @@ -339,60 +339,60 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[307] = +static yyconst flex_int16_t yy_accept[306] = { 0, 0, 0, 77, 75, 74, 73, 75, 69, 70, 75, 68, 75, 75, 66, 71, 72, 75, 75, 75, 75, - 75, 16, 39, 12, 0, 0, 66, 65, 0, 50, + 75, 16, 39, 12, 0, 0, 66, 65, 67, 50, 46, 55, 0, 0, 57, 53, 56, 0, 0, 43, 0, 0, 0, 40, 41, 42, 0, 17, 0, 13, 14, 15, 7, 0, 0, 0, 0, 0, 36, 37, 38, 0, 0, 0, 0, 9, 10, 11, 0, 0, - 0, 67, 0, 58, 0, 54, 0, 0, 0, 49, + 67, 0, 58, 0, 54, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 0, 0, 24, 25, 26, 0, 0, 0, - - 0, 27, 28, 29, 0, 18, 19, 20, 0, 0, - 6, 0, 21, 22, 23, 59, 0, 65, 48, 0, - 0, 0, 0, 0, 0, 0, 0, 52, 51, 47, - 30, 31, 32, 33, 34, 35, 0, 0, 4, 2, - 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 45, 0, 44, 0, 0, 0, 63, 0, 60, + 8, 0, 0, 24, 25, 26, 0, 0, 0, 0, + + 27, 28, 29, 0, 18, 19, 20, 0, 0, 6, + 0, 21, 22, 23, 59, 0, 65, 48, 0, 0, + 0, 0, 0, 0, 0, 0, 52, 51, 47, 30, + 31, 32, 33, 34, 35, 0, 0, 4, 2, 1, + 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 45, 0, 44, 0, 0, 0, 63, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, - 0, 0, 64, 0, 0, 0, 39, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 64, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, - 0, 0, 5, 0, 0, 16, 0, 0, 0, 0, - 0, 0, 61, 0, 0, 55, 0, 0, 0, 0, - 53, 0, 0, 43, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, + 0, 5, 0, 0, 16, 0, 0, 0, 0, 0, + 0, 61, 0, 0, 55, 0, 0, 0, 0, 53, + 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 7, 0, 0, 62, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 46, 0, 0, 0, 56, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 7, 0, 0, 62, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, + 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 1, 1, 5, 1, 1, 1, 1, 6, - 7, 1, 8, 4, 9, 10, 11, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 1, 1, 1, - 1, 1, 1, 1, 13, 13, 13, 13, 14, 13, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 4, 1, 1, 1, 1, 5, + 6, 1, 7, 3, 8, 9, 10, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 1, 1, 1, + 1, 1, 1, 1, 12, 12, 12, 12, 13, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 15, 1, 16, 1, 1, 1, 17, 18, 19, 20, + 14, 1, 15, 1, 1, 1, 16, 17, 18, 19, - 21, 22, 23, 24, 25, 26, 1, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 1, 37, 38, - 39, 40, 1, 1, 1, 1, 1, 1, 1, 1, + 20, 21, 22, 23, 24, 25, 1, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 1, 36, 37, + 38, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -409,192 +409,190 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[41] = +static yyconst flex_int32_t yy_meta[40] = { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, - 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 1, 1, 3, 3, 3, 3, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[316] = +static yyconst flex_int16_t yy_base[315] = { 0, - 0, 0, 383, 384, 384, 384, 0, 384, 384, 31, - 32, 370, 370, 35, 384, 384, 30, 33, 22, 363, - 30, 41, 63, 87, 0, 367, 47, 62, 58, 384, - 49, 358, 343, 357, 384, 44, 345, 50, 345, 356, - 349, 344, 337, 384, 384, 384, 349, 384, 333, 384, - 384, 384, 60, 332, 71, 65, 339, 74, 384, 384, - 384, 77, 69, 328, 93, 384, 384, 384, 0, 126, - 94, 384, 333, 384, 121, 384, 345, 344, 337, 384, - 83, 90, 98, 340, 331, 112, 324, 324, 331, 338, - 327, 384, 126, 336, 384, 384, 384, 322, 327, 122, - - 329, 384, 384, 384, 328, 384, 384, 384, 319, 326, - 384, 312, 384, 384, 384, 0, 333, 332, 384, 313, - 132, 317, 303, 313, 303, 123, 130, 384, 384, 384, - 384, 384, 384, 384, 384, 384, 126, 316, 308, 125, - 307, 305, 313, 303, 315, 296, 309, 310, 298, 294, - 291, 384, 290, 384, 289, 290, 288, 384, 286, 0, - 282, 288, 295, 290, 282, 284, 297, 296, 282, 287, - 293, 276, 283, 128, 132, 135, 286, 286, 384, 287, - 279, 270, 384, 269, 274, 279, 138, 269, 271, 141, - 273, 261, 276, 144, 267, 147, 0, 259, 267, 272, - - 273, 254, 268, 257, 265, 252, 248, 266, 249, 384, - 247, 250, 384, 150, 253, 153, 253, 250, 246, 242, - 250, 256, 0, 236, 242, 384, 241, 250, 233, 234, - 384, 232, 236, 384, 229, 234, 237, 232, 230, 226, - 233, 156, 222, 0, 229, 235, 234, 229, 228, 230, - 227, 216, 384, 213, 227, 213, 384, 228, 223, 384, - 222, 221, 220, 223, 220, 211, 220, 201, 210, 205, - 159, 200, 212, 203, 206, 208, 209, 206, 197, 202, - 384, 190, 201, 205, 384, 186, 187, 196, 191, 182, - 198, 187, 187, 192, 195, 181, 188, 179, 175, 169, - - 188, 171, 174, 169, 164, 384, 167, 157, 199, 117, - 104, 97, 91, 83, 71 + 0, 0, 378, 379, 379, 379, 0, 379, 379, 31, + 32, 366, 366, 35, 379, 379, 30, 33, 22, 359, + 30, 54, 76, 100, 0, 363, 47, 46, 0, 379, + 49, 354, 339, 353, 379, 42, 341, 36, 341, 352, + 345, 340, 333, 379, 379, 379, 345, 379, 329, 379, + 379, 379, 60, 328, 70, 51, 335, 49, 379, 379, + 379, 81, 62, 324, 88, 379, 379, 379, 0, 93, + 0, 329, 379, 123, 379, 341, 340, 333, 379, 83, + 45, 86, 336, 327, 112, 320, 320, 327, 334, 323, + 379, 112, 332, 379, 379, 379, 318, 323, 71, 325, + + 379, 379, 379, 324, 379, 379, 379, 315, 322, 379, + 308, 379, 379, 379, 0, 329, 328, 379, 309, 130, + 313, 299, 309, 299, 121, 102, 379, 379, 379, 379, + 379, 379, 379, 379, 379, 123, 312, 304, 63, 303, + 301, 309, 299, 311, 292, 305, 306, 294, 290, 287, + 379, 286, 379, 285, 286, 284, 379, 282, 0, 278, + 284, 291, 286, 278, 280, 293, 292, 278, 283, 289, + 272, 279, 114, 126, 129, 282, 282, 379, 283, 275, + 266, 379, 265, 270, 275, 133, 265, 267, 136, 269, + 257, 272, 139, 263, 142, 0, 255, 263, 268, 269, + + 250, 264, 253, 261, 248, 244, 262, 245, 379, 243, + 246, 379, 145, 249, 148, 249, 246, 242, 238, 246, + 252, 0, 232, 238, 379, 237, 246, 229, 230, 379, + 228, 232, 379, 225, 230, 233, 228, 226, 222, 229, + 151, 218, 0, 225, 231, 230, 225, 224, 226, 223, + 212, 379, 209, 223, 209, 379, 224, 219, 379, 218, + 217, 216, 219, 216, 207, 216, 197, 206, 201, 154, + 196, 208, 199, 202, 204, 205, 202, 193, 198, 379, + 186, 197, 201, 379, 182, 183, 192, 187, 178, 194, + 183, 183, 188, 191, 177, 184, 175, 171, 165, 184, + + 167, 170, 165, 160, 379, 192, 161, 193, 155, 147, + 132, 114, 99, 59 } ; -static yyconst flex_int16_t yy_def[316] = +static yyconst flex_int16_t yy_def[315] = { 0, - 306, 1, 306, 306, 306, 306, 307, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 308, 306, 306, 306, 309, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 310, 306, - 309, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 311, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 312, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 313, 306, 306, 306, - - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 314, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 315, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - - 306, 306, 306, 306, 306, 0, 306, 306, 306, 306, - 306, 306, 306, 306, 306 + 305, 1, 305, 305, 305, 305, 306, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 307, 305, 305, 305, 308, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 309, 305, + 308, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 310, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 311, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 312, 305, 305, 305, 305, + + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 313, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 314, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + + 305, 305, 305, 305, 0, 305, 305, 305, 305, 305, + 305, 305, 305, 305 } ; -static yyconst flex_int16_t yy_nxt[425] = +static yyconst flex_int16_t yy_nxt[419] = { 0, - 4, 5, 4, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 4, 4, 15, 16, 17, 18, 19, 4, - 4, 20, 4, 4, 4, 4, 4, 21, 4, 4, - 4, 4, 22, 23, 24, 4, 4, 4, 4, 4, - 26, 26, 27, 27, 26, 40, 27, 30, 31, 32, - 33, 34, 38, 39, 43, 41, 26, 47, 27, 72, - 72, 35, 78, 36, 37, 73, 48, 44, 45, 46, - 49, 74, 260, 28, 79, 70, 91, 92, 50, 51, - 52, 53, 70, 54, 244, 109, 55, 81, 82, 83, - 56, 94, 223, 57, 98, 72, 72, 58, 197, 99, - - 59, 60, 61, 62, 110, 160, 101, 105, 95, 96, - 97, 102, 103, 104, 106, 107, 108, 112, 116, 63, - 64, 131, 132, 65, 66, 67, 68, 133, 139, 134, - 113, 114, 115, 117, 117, 135, 136, 118, 120, 121, - 122, 123, 124, 148, 149, 140, 153, 141, 162, 142, - 169, 179, 125, 170, 126, 127, 154, 171, 69, 172, - 180, 163, 173, 174, 175, 176, 131, 132, 25, 133, - 164, 134, 135, 136, 217, 59, 60, 61, 95, 96, - 97, 106, 107, 108, 113, 114, 115, 44, 45, 46, - 50, 51, 52, 102, 103, 104, 66, 67, 68, 71, - - 71, 129, 179, 305, 304, 303, 128, 76, 302, 301, - 300, 299, 154, 298, 297, 296, 295, 294, 111, 48, - 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, - 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, - 273, 272, 119, 271, 270, 92, 269, 268, 267, 266, - 130, 265, 264, 263, 262, 261, 259, 258, 257, 256, - 255, 254, 253, 252, 251, 80, 250, 249, 248, 247, - 246, 245, 243, 242, 241, 240, 239, 238, 237, 236, - 235, 234, 233, 232, 231, 230, 229, 35, 228, 227, - 226, 225, 224, 222, 221, 220, 152, 219, 218, 216, - - 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, - 205, 204, 203, 202, 201, 200, 199, 74, 198, 30, - 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, - 186, 185, 184, 183, 182, 181, 178, 177, 168, 167, - 166, 165, 161, 118, 118, 159, 158, 157, 156, 155, - 152, 151, 150, 147, 146, 145, 144, 143, 138, 137, - 130, 129, 128, 119, 111, 100, 93, 90, 89, 88, - 87, 86, 85, 84, 80, 77, 76, 75, 28, 42, - 29, 28, 306, 3, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306 + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 4, 4, 15, 16, 17, 18, 19, 4, 4, + 20, 4, 4, 4, 4, 4, 21, 4, 4, 4, + 4, 22, 23, 24, 4, 4, 4, 4, 4, 26, + 26, 27, 27, 26, 40, 27, 30, 31, 32, 33, + 34, 38, 39, 43, 41, 26, 28, 27, 70, 77, + 35, 259, 36, 37, 72, 70, 44, 45, 46, 47, + 73, 78, 80, 81, 82, 90, 91, 108, 48, 97, + 100, 132, 49, 133, 98, 101, 102, 103, 178, 93, + 50, 51, 52, 53, 152, 54, 109, 179, 55, 116, + + 116, 243, 56, 117, 153, 57, 94, 95, 96, 58, + 104, 111, 59, 60, 61, 62, 222, 105, 106, 107, + 130, 131, 134, 135, 112, 113, 114, 138, 147, 148, + 171, 63, 64, 172, 196, 65, 66, 67, 68, 119, + 120, 121, 122, 123, 139, 161, 140, 168, 141, 159, + 169, 130, 131, 124, 170, 125, 126, 115, 162, 173, + 174, 175, 132, 69, 133, 134, 135, 163, 216, 59, + 60, 61, 94, 95, 96, 105, 106, 107, 112, 113, + 114, 44, 45, 46, 50, 51, 52, 101, 102, 103, + 66, 67, 68, 71, 25, 71, 128, 178, 304, 303, + + 302, 127, 75, 301, 300, 299, 298, 153, 297, 296, + 295, 294, 293, 110, 48, 292, 291, 290, 289, 288, + 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, + 277, 276, 275, 274, 273, 272, 271, 118, 270, 269, + 91, 268, 267, 266, 265, 129, 264, 263, 262, 261, + 260, 258, 257, 256, 255, 254, 253, 252, 251, 250, + 79, 249, 248, 247, 246, 245, 244, 242, 241, 240, + 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, + 229, 228, 35, 227, 226, 225, 224, 223, 221, 220, + 219, 151, 218, 217, 215, 214, 213, 212, 211, 210, + + 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, + 199, 198, 73, 197, 30, 195, 194, 193, 192, 191, + 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, + 180, 177, 176, 167, 166, 165, 164, 160, 117, 117, + 158, 157, 156, 155, 154, 151, 150, 149, 146, 145, + 144, 143, 142, 137, 136, 129, 128, 127, 118, 110, + 99, 92, 89, 88, 87, 86, 85, 84, 83, 79, + 76, 75, 74, 28, 42, 29, 28, 305, 3, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305 } ; -static yyconst flex_int16_t yy_chk[425] = +static yyconst flex_int16_t yy_chk[419] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 10, 11, 10, 11, 14, 19, 14, 17, 17, 17, - 17, 17, 18, 18, 21, 19, 27, 22, 27, 29, - 29, 17, 36, 17, 17, 31, 22, 21, 21, 21, - 22, 31, 315, 28, 36, 28, 53, 53, 22, 22, - 22, 23, 28, 23, 314, 63, 23, 38, 38, 38, - 23, 55, 313, 23, 56, 71, 71, 23, 312, 56, - - 23, 23, 23, 24, 63, 311, 58, 62, 55, 55, - 55, 58, 58, 58, 62, 62, 62, 65, 310, 24, - 24, 81, 81, 24, 24, 24, 24, 82, 86, 82, - 65, 65, 65, 70, 70, 83, 83, 70, 75, 75, - 75, 75, 75, 93, 93, 86, 100, 86, 121, 86, - 126, 140, 75, 126, 75, 75, 100, 126, 308, 127, - 140, 121, 127, 137, 137, 137, 174, 174, 307, 175, - 121, 175, 176, 176, 187, 187, 187, 187, 190, 190, - 190, 194, 194, 194, 196, 196, 196, 214, 214, 214, - 216, 216, 216, 242, 242, 242, 271, 271, 271, 309, - - 309, 305, 304, 303, 302, 301, 300, 299, 298, 297, - 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, - 286, 284, 283, 282, 280, 279, 278, 277, 276, 275, - 274, 273, 272, 270, 269, 268, 267, 266, 265, 264, - 263, 262, 261, 259, 258, 256, 255, 254, 252, 251, - 250, 249, 248, 247, 246, 245, 243, 241, 240, 239, - 238, 237, 236, 235, 233, 232, 230, 229, 228, 227, - 225, 224, 222, 221, 220, 219, 218, 217, 215, 212, - 211, 209, 208, 207, 206, 205, 204, 203, 202, 201, - 200, 199, 198, 195, 193, 192, 191, 189, 188, 186, - - 185, 184, 182, 181, 180, 178, 177, 173, 172, 171, - 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, - 159, 157, 156, 155, 153, 151, 150, 149, 148, 147, - 146, 145, 144, 143, 142, 141, 139, 138, 125, 124, - 123, 122, 120, 118, 117, 112, 110, 109, 105, 101, - 99, 98, 94, 91, 90, 89, 88, 87, 85, 84, - 79, 78, 77, 73, 64, 57, 54, 49, 47, 43, - 42, 41, 40, 39, 37, 34, 33, 32, 26, 20, - 13, 12, 3, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 306, 306, 306, 306 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, + 11, 10, 11, 14, 19, 14, 17, 17, 17, 17, + 17, 18, 18, 21, 19, 27, 28, 27, 28, 36, + 17, 314, 17, 17, 31, 28, 21, 21, 21, 22, + 31, 36, 38, 38, 38, 53, 53, 63, 22, 56, + 58, 81, 22, 81, 56, 58, 58, 58, 139, 55, + 22, 22, 22, 23, 99, 23, 63, 139, 23, 70, + + 70, 313, 23, 70, 99, 23, 55, 55, 55, 23, + 62, 65, 23, 23, 23, 24, 312, 62, 62, 62, + 80, 80, 82, 82, 65, 65, 65, 85, 92, 92, + 126, 24, 24, 126, 311, 24, 24, 24, 24, 74, + 74, 74, 74, 74, 85, 120, 85, 125, 85, 310, + 125, 173, 173, 74, 125, 74, 74, 309, 120, 136, + 136, 136, 174, 307, 174, 175, 175, 120, 186, 186, + 186, 186, 189, 189, 189, 193, 193, 193, 195, 195, + 195, 213, 213, 213, 215, 215, 215, 241, 241, 241, + 270, 270, 270, 308, 306, 308, 304, 303, 302, 301, + + 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, + 290, 289, 288, 287, 286, 285, 283, 282, 281, 279, + 278, 277, 276, 275, 274, 273, 272, 271, 269, 268, + 267, 266, 265, 264, 263, 262, 261, 260, 258, 257, + 255, 254, 253, 251, 250, 249, 248, 247, 246, 245, + 244, 242, 240, 239, 238, 237, 236, 235, 234, 232, + 231, 229, 228, 227, 226, 224, 223, 221, 220, 219, + 218, 217, 216, 214, 211, 210, 208, 207, 206, 205, + 204, 203, 202, 201, 200, 199, 198, 197, 194, 192, + 191, 190, 188, 187, 185, 184, 183, 181, 180, 179, + + 177, 176, 172, 171, 170, 169, 168, 167, 166, 165, + 164, 163, 162, 161, 160, 158, 156, 155, 154, 152, + 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, + 140, 138, 137, 124, 123, 122, 121, 119, 117, 116, + 111, 109, 108, 104, 100, 98, 97, 93, 90, 89, + 88, 87, 86, 84, 83, 78, 77, 76, 72, 64, + 57, 54, 49, 47, 43, 42, 41, 40, 39, 37, + 34, 33, 32, 26, 20, 13, 12, 3, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305 } ; /* The intent behind this definition is that it'll catch @@ -643,7 +641,7 @@ typedef lol::EasyMeshParser::token_type token_type; #define yyterminate() return token::T_END #define YY_NO_UNISTD_H #define YY_USER_ACTION yylloc->columns(yyleng); -#line 647 "generated/easymesh-scanner.cpp" +#line 645 "generated/easymesh-scanner.cpp" #define INITIAL 0 @@ -755,7 +753,7 @@ YY_DECL yylloc->step(); -#line 759 "generated/easymesh-scanner.cpp" +#line 757 "generated/easymesh-scanner.cpp" if ( !(yy_init) ) { @@ -808,13 +806,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 307 ) + if ( yy_current_state >= 306 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 306 ); + while ( yy_current_state != 305 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1124,7 +1122,7 @@ YY_RULE_SETUP #line 110 "easymesh/easymesh-scanner.l" { return token::T_COG; } YY_BREAK - /* ======= BASE DATA TYPES ========================================= */ + /* ======= BASE COLOR TYPES ========================================= */ /* COLOR */ case 59: YY_RULE_SETUP @@ -1191,7 +1189,6 @@ YY_RULE_SETUP YY_BREAK /* ======= COMMENTS ======= */ case 67: -/* rule 67 can match eol */ YY_RULE_SETUP #line 148 "easymesh/easymesh-scanner.l" { /* ignore this */ } @@ -1243,7 +1240,7 @@ YY_RULE_SETUP #line 160 "easymesh/easymesh-scanner.l" ECHO; YY_BREAK -#line 1247 "generated/easymesh-scanner.cpp" +#line 1244 "generated/easymesh-scanner.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1625,7 +1622,7 @@ int yyFlexLexer::yy_get_next_buffer() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 307 ) + if ( yy_current_state >= 306 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1653,11 +1650,11 @@ int yyFlexLexer::yy_get_next_buffer() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 307 ) + if ( yy_current_state >= 306 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 306); + yy_is_jam = (yy_current_state == 305); return yy_is_jam ? 0 : yy_current_state; } diff --git a/test/data/mesh-buffer.txt b/test/data/mesh-buffer.txt index ee0deff4..0fcf6117 100644 --- a/test/data/mesh-buffer.txt +++ b/test/data/mesh-buffer.txt @@ -1,13 +1,12 @@ +//addlight 0.0 position (0.6 0.5 1) color #ddf addlight 0.0 position (-0.2 -1 -0.5) color (.0 .2 .5 1) -addlight 0.0 position (0.6 0.5 1) color #ddd -custom setmesh " -sc#fff ab 4 ty 4 ab 2 - +custom setmesh "sc#fff ab 2 ty 1.5 ab 2" //splt 0 //test //[sc#f8f ab 1 splt 4 twy 90] + // splt 5 twy 90 0 //[sc#f8f afcb 10 10 10 .25 tx 0 splt 4 twy 1.6 0 ] //sc#fff @@ -49,5 +48,4 @@ sc#fff ab 4 ty 4 ab 2 //[sc#88f afcb 10 10 10 .25 tx 0] //[sc#fff afcb 10 10 10 .25 t 2 2 2 csgs] //[sc#fff afcb 7 7 7 .25] -//[sc#ff2 afcb 7 7 7 .25 t 1 1 1 csgs] -" \ No newline at end of file +//[sc#ff2 afcb 7 7 7 .25 t 1 1 1 csgs] \ No newline at end of file diff --git a/test/generated/scenesetup-scanner.cpp b/test/generated/scenesetup-scanner.cpp index e5b6b99f..cd0b67cc 100644 --- a/test/generated/scenesetup-scanner.cpp +++ b/test/generated/scenesetup-scanner.cpp @@ -339,34 +339,34 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[79] = +static yyconst flex_int16_t yy_accept[78] = { 0, 0, 0, 24, 22, 21, 20, 22, 22, 18, 19, 22, 17, 22, 22, 13, 22, 22, 22, 22, 22, - 22, 22, 0, 14, 0, 0, 13, 12, 0, 15, - 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, - 16, 15, 15, 15, 15, 15, 15, 15, 6, 0, - 12, 15, 15, 15, 15, 15, 15, 10, 7, 15, - 4, 15, 11, 15, 15, 0, 15, 5, 3, 15, - 8, 15, 15, 0, 1, 2, 9, 0 + 22, 22, 0, 14, 0, 0, 13, 12, 16, 15, + 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, + 15, 15, 15, 15, 15, 15, 15, 6, 0, 12, + 15, 15, 15, 15, 15, 15, 10, 7, 15, 4, + 15, 11, 15, 15, 0, 15, 5, 3, 15, 8, + 15, 15, 0, 1, 2, 9, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 1, 5, 6, 1, 1, 1, 1, 7, - 8, 1, 9, 4, 10, 11, 12, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, - 1, 1, 1, 1, 14, 14, 14, 14, 15, 14, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 1, 1, 1, 1, 17, 1, 18, 14, 19, 20, - - 21, 22, 23, 24, 25, 16, 26, 27, 28, 29, - 30, 31, 16, 32, 33, 34, 35, 16, 16, 16, - 16, 16, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 4, 5, 1, 1, 1, 1, 6, + 7, 1, 8, 3, 9, 10, 11, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 1, 1, 1, + 1, 1, 1, 1, 13, 13, 13, 13, 14, 13, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 1, 1, 1, 1, 16, 1, 17, 13, 18, 19, + + 20, 21, 22, 23, 24, 15, 25, 26, 27, 28, + 29, 30, 15, 31, 32, 33, 34, 15, 15, 15, + 15, 15, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -383,80 +383,80 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[36] = +static yyconst flex_int32_t yy_meta[35] = { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 1, 3, 4, 4, 2, 2, 4, 4, 4, - 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2 + 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, + 1, 4, 5, 5, 3, 3, 5, 5, 5, 5, + 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3 } ; -static yyconst flex_int16_t yy_base[90] = +static yyconst flex_int16_t yy_base[89] = { 0, - 0, 0, 122, 123, 123, 123, 116, 0, 123, 123, - 25, 26, 107, 107, 29, 0, 98, 11, 99, 86, - 85, 82, 108, 123, 0, 99, 32, 34, 48, 0, - 91, 83, 76, 81, 77, 73, 70, 0, 43, 55, - 123, 77, 73, 68, 68, 74, 74, 77, 0, 84, - 83, 70, 62, 63, 71, 73, 56, 0, 0, 66, - 0, 60, 0, 53, 61, 0, 42, 0, 0, 24, - 0, 14, 15, 0, 0, 0, 123, 123, 58, 60, - 63, 65, 69, 71, 73, 75, 77, 79, 81 + 0, 0, 118, 119, 119, 119, 113, 0, 119, 119, + 25, 26, 104, 104, 29, 0, 95, 11, 96, 83, + 82, 79, 105, 119, 0, 96, 32, 34, 0, 0, + 88, 80, 73, 78, 74, 70, 67, 0, 41, 0, + 74, 70, 65, 65, 71, 71, 74, 0, 81, 80, + 67, 59, 60, 68, 70, 53, 0, 0, 63, 0, + 57, 0, 35, 39, 0, 29, 0, 0, 22, 0, + 14, 15, 0, 0, 0, 119, 119, 54, 56, 59, + 61, 66, 68, 70, 72, 74, 76, 78 } ; -static yyconst flex_int16_t yy_def[90] = +static yyconst flex_int16_t yy_def[89] = { 0, - 78, 1, 78, 78, 78, 78, 79, 80, 78, 78, - 78, 78, 78, 78, 78, 81, 81, 81, 81, 81, - 81, 81, 79, 78, 82, 78, 78, 78, 83, 81, - 81, 81, 81, 81, 81, 81, 81, 84, 78, 83, - 78, 81, 81, 81, 81, 81, 81, 81, 85, 78, - 78, 81, 81, 81, 81, 81, 81, 81, 86, 81, - 81, 81, 81, 81, 81, 87, 81, 81, 81, 81, - 88, 81, 81, 89, 81, 81, 78, 0, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78 + 77, 1, 77, 77, 77, 77, 78, 79, 77, 77, + 77, 77, 77, 77, 77, 80, 80, 80, 80, 80, + 80, 80, 78, 77, 81, 77, 77, 77, 82, 80, + 80, 80, 80, 80, 80, 80, 80, 83, 77, 82, + 80, 80, 80, 80, 80, 80, 80, 84, 77, 77, + 80, 80, 80, 80, 80, 80, 80, 85, 80, 80, + 80, 80, 80, 80, 86, 80, 80, 80, 80, 87, + 80, 80, 88, 80, 80, 77, 0, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77 } ; -static yyconst flex_int16_t yy_nxt[159] = +static yyconst flex_int16_t yy_nxt[154] = { 0, - 4, 5, 4, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 16, 16, 4, 17, 18, 16, - 16, 19, 16, 16, 16, 16, 20, 16, 16, 16, - 21, 16, 16, 22, 16, 26, 26, 27, 27, 26, - 32, 27, 26, 76, 27, 33, 28, 75, 39, 41, - 41, 50, 50, 73, 39, 51, 41, 41, 23, 23, - 23, 23, 25, 25, 30, 72, 30, 38, 38, 40, - 40, 40, 40, 49, 49, 59, 59, 66, 66, 71, - 71, 74, 74, 77, 77, 70, 69, 68, 67, 65, - 64, 63, 62, 61, 60, 51, 51, 58, 57, 56, - - 55, 54, 53, 52, 48, 47, 46, 45, 44, 43, - 42, 28, 24, 37, 36, 35, 34, 31, 29, 28, - 24, 78, 3, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78 + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 16, 16, 4, 17, 18, 16, 16, + 19, 16, 16, 16, 16, 20, 16, 16, 16, 21, + 16, 16, 22, 16, 26, 26, 27, 27, 26, 32, + 27, 26, 75, 27, 33, 28, 74, 39, 49, 49, + 72, 71, 50, 39, 23, 23, 23, 23, 23, 25, + 25, 30, 69, 30, 38, 38, 40, 68, 40, 40, + 40, 48, 48, 58, 58, 65, 65, 70, 70, 73, + 73, 76, 76, 67, 66, 64, 63, 62, 61, 60, + 59, 50, 50, 57, 56, 55, 54, 53, 52, 51, + + 47, 46, 45, 44, 43, 42, 41, 28, 24, 37, + 36, 35, 34, 31, 29, 28, 24, 77, 3, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77 } ; -static yyconst flex_int16_t yy_chk[159] = +static yyconst flex_int16_t yy_chk[154] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 11, 12, 11, 12, 15, - 18, 15, 27, 73, 27, 18, 28, 72, 28, 29, - 29, 39, 39, 70, 28, 39, 40, 40, 79, 79, - 79, 79, 80, 80, 81, 67, 81, 82, 82, 83, - 83, 83, 83, 84, 84, 85, 85, 86, 86, 87, - 87, 88, 88, 89, 89, 65, 64, 62, 60, 57, - 56, 55, 54, 53, 52, 51, 50, 48, 47, 46, - - 45, 44, 43, 42, 37, 36, 35, 34, 33, 32, - 31, 26, 23, 22, 21, 20, 19, 17, 14, 13, - 7, 3, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78 + 1, 1, 1, 1, 11, 12, 11, 12, 15, 18, + 15, 27, 72, 27, 18, 28, 71, 28, 39, 39, + 69, 66, 39, 28, 78, 78, 78, 78, 78, 79, + 79, 80, 64, 80, 81, 81, 82, 63, 82, 82, + 82, 83, 83, 84, 84, 85, 85, 86, 86, 87, + 87, 88, 88, 61, 59, 56, 55, 54, 53, 52, + 51, 50, 49, 47, 46, 45, 44, 43, 42, 41, + + 37, 36, 35, 34, 33, 32, 31, 26, 23, 22, + 21, 20, 19, 17, 14, 13, 7, 3, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77 } ; /* The intent behind this definition is that it'll catch @@ -670,13 +670,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 79 ) + if ( yy_current_state >= 78 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 78 ); + while ( yy_current_state != 77 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -803,7 +803,6 @@ YY_RULE_SETUP YY_BREAK /* ======= COMMENTS ======= */ case 16: -/* rule 16 can match eol */ YY_RULE_SETUP #line 99 "scenesetup-scanner.l" { /* ignore this */ } @@ -845,7 +844,7 @@ YY_RULE_SETUP #line 109 "scenesetup-scanner.l" ECHO; YY_BREAK -#line 849 "generated/scenesetup-scanner.cpp" +#line 848 "generated/scenesetup-scanner.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1227,7 +1226,7 @@ int yyFlexLexer::yy_get_next_buffer() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 79 ) + if ( yy_current_state >= 78 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1255,11 +1254,11 @@ int yyFlexLexer::yy_get_next_buffer() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 79 ) + if ( yy_current_state >= 78 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 78); + yy_is_jam = (yy_current_state == 77); return yy_is_jam ? 0 : yy_current_state; } diff --git a/test/meshviewer.cpp b/test/meshviewer.cpp index 1bf125f4..bf83f291 100644 --- a/test/meshviewer.cpp +++ b/test/meshviewer.cpp @@ -479,19 +479,19 @@ public: while (o-- > 0) { SceneSetup* new_ssetup = new SceneSetup(); - if (new_ssetup->Compile(mesh.C())) + if (new_ssetup->Compile(mesh.C()) && new_ssetup->GetLightNb()) { - if (new_ssetup->GetLightNb()) - { - if (m_ssetup) - delete(m_ssetup); - m_ssetup = new_ssetup; - m_ssetup->Startup(); - } + if (m_ssetup) + delete(m_ssetup); + m_ssetup = new_ssetup; + m_ssetup->Startup(); m_mat_prev = mat4(quat::fromeuler_xyz(vec3::zero)); } else + { + m_ssetup->m_custom_cmd += new_ssetup->m_custom_cmd; delete(new_ssetup); + } } } //Check the custom cmd even if we don't have new messages. diff --git a/test/scenesetup-scanner.l b/test/scenesetup-scanner.l index 88882c37..634776bd 100644 --- a/test/scenesetup-scanner.l +++ b/test/scenesetup-scanner.l @@ -96,7 +96,7 @@ false { yylval->bval = false; return token::BOOLEAN; } yylval->svval = strdup(yytext); return token::STRING_VAR; } %{ /* ======= COMMENTS ======= */ %} -"//"[^\n\r]*[\n\r] { /* ignore this */ } +"//".* { /* ignore this */ } %{ /* Semantics tokens */ %} "-" { return token_type('-'); } diff --git a/test/scenesetup.cpp b/test/scenesetup.cpp index 94703521..8865eadb 100644 --- a/test/scenesetup.cpp +++ b/test/scenesetup.cpp @@ -51,7 +51,8 @@ bool SceneSetup::Startup() bool SceneSetup::Shutdown(bool destroy) { for (int i = 0; i < m_lights.Count(); i++) - Ticker::Unref(m_lights[i]); + if (m_lights[i]->IsTicked()) + Ticker::Unref(m_lights[i]); if (destroy) m_lights.Empty();