26 lines
712 B
C++
26 lines
712 B
C++
|
|
#include "remorse/entity_dispatch_entry.h"
|
||
|
|
|
||
|
|
#include <cassert>
|
||
|
|
|
||
|
|
int main()
|
||
|
|
{
|
||
|
|
remorse::EntityDispatchEntryBase entry{};
|
||
|
|
remorse::EntityDispatchEntry::initBase(&entry);
|
||
|
|
|
||
|
|
remorse::EntityDispatchEntry::setSourceType(entry, 0x1234);
|
||
|
|
assert(entry.bytes[0x04] == 0x34);
|
||
|
|
assert(entry.bytes[0x05] == 0x12);
|
||
|
|
|
||
|
|
remorse::EntityDispatchEntry::setEventTypeChecked(entry, 0x00f2);
|
||
|
|
assert(entry.bytes[0x06] == 0xf2);
|
||
|
|
assert(entry.bytes[0x07] == 0x00);
|
||
|
|
|
||
|
|
entry.bytes[0x08] = 0xe0;
|
||
|
|
remorse::EntityDispatchEntry::setGroupId(entry, 0x23);
|
||
|
|
assert(entry.bytes[0x08] == 0xe3);
|
||
|
|
|
||
|
|
remorse::EntityDispatchEntry::incrementGroupId(entry);
|
||
|
|
assert(entry.bytes[0x08] == 0xe4);
|
||
|
|
|
||
|
|
return 0;
|
||
|
|
}
|