Created
July 4, 2023 02:07
-
-
Save Dobby233Liu/99606e1a02ac1967f27b005c40a42400 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <std/mem.pat> | |
enum cmdids : u8 { | |
TIME = 0x00, | |
MSG = 0x08, | |
FACE = 0x0b, | |
STAFF = 0x15, | |
NPG = 0x0a, | |
END = 0x04, | |
MUSIC = 0x0c, | |
EFC = 0x03 | |
}; | |
struct SCL_TIME { | |
u32 time; | |
}; | |
struct SCL_MSG { | |
char message[]; | |
}; | |
struct SCL_FACE { | |
u8 face; | |
}; | |
struct SCL_STAFF { | |
u8 staff; | |
}; | |
struct SCL_MUSIC { | |
u8 music; | |
}; | |
struct SCL_EFC { | |
u8 effect; | |
}; | |
struct command { | |
cmdids cmdid; | |
if (cmdid == cmdids::TIME) | |
SCL_TIME [[inline]]; | |
else if (cmdid == cmdids::MSG) | |
SCL_MSG [[inline]]; | |
else if (cmdid == cmdids::FACE) | |
SCL_FACE [[inline]]; | |
else if (cmdid == cmdids::STAFF) | |
SCL_STAFF [[inline]]; | |
else if (cmdid == cmdids::MUSIC) | |
SCL_MUSIC [[inline]]; | |
else if (cmdid == cmdids::EFC) | |
SCL_EFC [[inline]]; | |
} [[name(cmdid)]]; | |
command thiz[while(!std::mem::eof())] @ $; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment