| 71 | } |
| 72 | |
| 73 | static std::vector<uint8_t> ScaleDataArray(const uint8_t data[], size_t width, size_t height, size_t scale) |
| 74 | { |
| 75 | const size_t length = width * height; |
| 76 | |
| 77 | std::vector<uint8_t> res; |
| 78 | res.resize(length * scale * scale); |
| 79 | |
| 80 | for (size_t y = 0; y < height * 8; y++) |
| 81 | { |
| 82 | for (size_t x = 0; x < width; x++) |
| 83 | { |
| 84 | const bool value = GetBit(data, x, y, width); |
| 85 | if (!value) |
| 86 | continue; |
| 87 | |
| 88 | DrawRect(res.data(), x, y, width, scale); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | return res; |
| 93 | } |
| 94 | |
| 95 | SDL_Cursor* CursorRepository::Create(const CursorData* cursorInfo, uint8_t scale) |
| 96 | { |