mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
use bitshift left for the bitfield (and uint32_t specifically)
This commit is contained in:
parent
a4feaefcf4
commit
8b618899f7
1 changed files with 32 additions and 30 deletions
62
word.h
62
word.h
|
@ -8,52 +8,54 @@
|
||||||
#include <QRect>
|
#include <QRect>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
class Word
|
class Word
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum Type : long int {
|
enum Type : uint32_t {
|
||||||
None = 0,
|
None = 0,
|
||||||
Misc = 1,
|
Misc = (1 << 0),
|
||||||
Text = 2,
|
Text = (1 << 1),
|
||||||
|
|
||||||
TimestampNoSeconds = 4,
|
TimestampNoSeconds = (1 << 2),
|
||||||
TimestampWithSeconds = 8,
|
TimestampWithSeconds = (1 << 3),
|
||||||
|
|
||||||
TwitchEmoteImage = 0x10,
|
TwitchEmoteImage = (1 << 4),
|
||||||
TwitchEmoteText = 0x20,
|
TwitchEmoteText = (1 << 5),
|
||||||
BttvEmoteImage = 0x40,
|
BttvEmoteImage = (1 << 6),
|
||||||
BttvEmoteText = 0x80,
|
BttvEmoteText = (1 << 7),
|
||||||
BttvGifEmoteImage = 0x100,
|
BttvGifEmoteImage = (1 << 8),
|
||||||
BttvGifEmoteText = 0x200,
|
BttvGifEmoteText = (1 << 9),
|
||||||
FfzEmoteImage = 0x400,
|
FfzEmoteImage = (1 << 10),
|
||||||
FfzEmoteText = 0x800,
|
FfzEmoteText = (1 << 11),
|
||||||
EmoteImages = TwitchEmoteImage | BttvEmoteImage | BttvGifEmoteImage |
|
EmoteImages = TwitchEmoteImage | BttvEmoteImage | BttvGifEmoteImage |
|
||||||
FfzEmoteImage,
|
FfzEmoteImage,
|
||||||
|
|
||||||
Bits = 0x1000,
|
Bits = (1 << 12),
|
||||||
BitsAnimated = 0x2000,
|
BitsAnimated = (1 << 13),
|
||||||
|
|
||||||
BadgeStaff = 0x4000,
|
BadgeStaff = (1 << 14),
|
||||||
BadgeAdmin = 0x8000,
|
BadgeAdmin = (1 << 15),
|
||||||
BadgeGlobalMod = 0x10000,
|
BadgeGlobalMod = (1 << 16),
|
||||||
BadgeModerator = 0x20000,
|
BadgeModerator = (1 << 17),
|
||||||
BadgeTurbo = 0x40000,
|
BadgeTurbo = (1 << 18),
|
||||||
BadgeBroadcaster = 0x80000,
|
BadgeBroadcaster = (1 << 19),
|
||||||
BadgePremium = 0x100000,
|
BadgePremium = (1 << 20),
|
||||||
BadgeChatterino = 0x200000,
|
BadgeChatterino = (1 << 21),
|
||||||
BadgeCheer = 0x400000,
|
BadgeCheer = (1 << 22),
|
||||||
Badges = BadgeStaff | BadgeAdmin | BadgeGlobalMod | BadgeModerator |
|
Badges = BadgeStaff | BadgeAdmin | BadgeGlobalMod | BadgeModerator |
|
||||||
BadgeTurbo | BadgeBroadcaster | BadgePremium |
|
BadgeTurbo | BadgeBroadcaster | BadgePremium |
|
||||||
BadgeChatterino | BadgeCheer,
|
BadgeChatterino | BadgeCheer,
|
||||||
|
|
||||||
Username = 0x800000,
|
Username = (1 << 23),
|
||||||
BitsAmount = 0x1000000,
|
BitsAmount = (1 << 24),
|
||||||
|
|
||||||
ButtonBan = 0x2000000,
|
ButtonBan = (1 << 25),
|
||||||
ButtonTimeout = 0x4000000,
|
ButtonTimeout = (1 << 26),
|
||||||
|
|
||||||
EmojiImage = 0x8000000,
|
EmojiImage = (1 << 27),
|
||||||
EmojiText = 0x10000000,
|
EmojiText = (1 << 28),
|
||||||
|
|
||||||
Default = TimestampNoSeconds | Badges | Username | Bits |
|
Default = TimestampNoSeconds | Badges | Username | Bits |
|
||||||
FfzEmoteImage | BttvEmoteImage | BttvGifEmoteImage |
|
FfzEmoteImage | BttvEmoteImage | BttvGifEmoteImage |
|
||||||
|
|
Loading…
Reference in a new issue