Browse Source
This cleans up a bit of code and solves a few edge cases where an item could be lost, the game be unresponsive, or miss fire an event during lag cause of the cursor not reflecting the currently held item.pull/4482/head
16 changed files with 43 additions and 49 deletions
@ -1,15 +1,11 @@
|
||||
#include <gtest/gtest.h> |
||||
|
||||
#include "cursor.h" |
||||
#include "itemdat.h" |
||||
|
||||
using namespace devilution; |
||||
|
||||
TEST(Cursor, SetCursor) |
||||
TEST(Cursor, NewCursor) |
||||
{ |
||||
int i = ICURS_SPIKED_CLUB + CURSOR_FIRSTITEM; |
||||
NewCursor(i); |
||||
EXPECT_EQ(pcurs, i); |
||||
EXPECT_EQ(cursSize.width, 1 * 28); |
||||
EXPECT_EQ(cursSize.height, 3 * 28); |
||||
NewCursor(CURSOR_HOURGLASS); |
||||
EXPECT_EQ(pcurs, CURSOR_HOURGLASS); |
||||
} |
||||
|
||||
Loading…
Reference in new issue