|
|
|
@ -100,18 +100,20 @@ VkResult main_thread(ClientContext* context) {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
uint32_t region = 0;
|
|
|
|
|
for(int32_t q = -10; q < 10; q++) {
|
|
|
|
|
for(int32_t r = -10; r < 10; r++) {
|
|
|
|
|
VK_RESULT(create_hex_region(q, r, ®ions[region], context->hex, context->render));
|
|
|
|
|
for(uint32_t i = 0; i < REGION_HEX_COUNT; i++) {
|
|
|
|
|
for(uint32_t h = 0; h < 6; h++) {
|
|
|
|
|
regions[region]->data.hexes[i].color[h] = colors[(q+r+50) % (sizeof(colors)/sizeof(uint32_t))];
|
|
|
|
|
regions[region]->data.hexes[i].height[h] = (float)i/REGION_HEX_COUNT;
|
|
|
|
|
for(int32_t y = -2; y < 2; y++) {
|
|
|
|
|
for(int32_t q = -5; q < 5; q++) {
|
|
|
|
|
for(int32_t r = -5; r < 5; r++) {
|
|
|
|
|
VK_RESULT(set_hex_region(q, r, y, 0x01, ®ions[region], context->hex, context->render));
|
|
|
|
|
for(uint32_t i = 0; i < REGION_HEX_COUNT; i++) {
|
|
|
|
|
for(uint32_t h = 0; h < 6; h++) {
|
|
|
|
|
regions[region]->data.hexes[i].color[h] = colors[(q+r+50) % (sizeof(colors)/sizeof(uint32_t))];
|
|
|
|
|
regions[region]->data.hexes[i].height[h] = (float)i/REGION_HEX_COUNT;
|
|
|
|
|
}
|
|
|
|
|
regions[region]->data.hexes[i].color[6] = colors[(q+r+50) % (sizeof(colors)/sizeof(uint32_t))];
|
|
|
|
|
}
|
|
|
|
|
regions[region]->data.hexes[i].color[6] = colors[(q+r+50) % (sizeof(colors)/sizeof(uint32_t))];
|
|
|
|
|
VK_RESULT(add_transfer(®ions[region]->data.hexes, regions[region]->region, offsetof(GPUHexRegion, hexes), sizeof(GPUHex)*REGION_HEX_COUNT, 0, context->render));
|
|
|
|
|
region++;
|
|
|
|
|
}
|
|
|
|
|
VK_RESULT(add_transfer(®ions[region]->data.hexes, regions[region]->region, offsetof(GPUHexRegion, hexes), sizeof(GPUHex)*REGION_HEX_COUNT, 0, context->render));
|
|
|
|
|
region++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|