MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ValidateFlags

Method ValidateFlags

src/story.cpp:188–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188bool StoryPageButtonData::ValidateFlags() const
189{
190 uint8_t flags = GB(this->referenced_id, 24, 8);
191 /* Don't allow float left and right together */
192 if ((flags & SPBF_FLOAT_LEFT) && (flags & SPBF_FLOAT_RIGHT)) return false;
193 /* Don't allow undefined flags */
194 if (flags & ~(SPBF_FLOAT_LEFT | SPBF_FLOAT_RIGHT)) return false;
195 return true;
196}
197
198/** Verify that the data stores a valid StoryPageButtonCursor value */
199bool StoryPageButtonData::ValidateCursor() const

Calls 1

GBFunction · 0.85

Tested by

no test coverage detected