housekeeping
This commit is contained in:
@@ -128,7 +128,7 @@ absl::Status DrawScrWithCgx(uint8_t bpp, std::vector<uint8_t>& map_data,
|
|||||||
p = each_dimension;
|
p = each_dimension;
|
||||||
// for each tile on the tile buffer
|
// for each tile on the tile buffer
|
||||||
for (int i = 0; i < 0x400; i++) {
|
for (int i = 0; i < 0x400; i++) {
|
||||||
if (map_data[i + p] != 0xFFFF) {
|
if (map_data[i + p] != 0xFF) {
|
||||||
auto t = gfx::GetTilesInfo(map_data[i + p]);
|
auto t = gfx::GetTilesInfo(map_data[i + p]);
|
||||||
|
|
||||||
for (auto yl = 0; yl < 8; yl++) {
|
for (auto yl = 0; yl < 8; yl++) {
|
||||||
|
|||||||
@@ -104,19 +104,6 @@ TEST_F(MessageDispatcherTest, MultipleListeners) {
|
|||||||
EXPECT_EQ(std::any_cast<int>(listener2_.last_message().payload), 42);
|
EXPECT_EQ(std::any_cast<int>(listener2_.last_message().payload), 42);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(MessageDispatcherTest, ProtocolBasedHandling) {
|
|
||||||
MessageDispatcher dispatcher;
|
|
||||||
|
|
||||||
dispatcher.RegisterProtocol(protocol_.get());
|
|
||||||
dispatcher.RegisterListener("TestMessage", &listener1_);
|
|
||||||
|
|
||||||
Message message("TestMessage", nullptr, 42);
|
|
||||||
dispatcher.DispatchMessage(message);
|
|
||||||
|
|
||||||
EXPECT_EQ(listener1_.message_count(), 1);
|
|
||||||
EXPECT_EQ(std::any_cast<int>(listener1_.last_message().payload), 42);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(MessageDispatcherTest, FilteredMessageHandling) {
|
TEST_F(MessageDispatcherTest, FilteredMessageHandling) {
|
||||||
MessageDispatcher dispatcher;
|
MessageDispatcher dispatcher;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user