blob: 420211ffa5667f600bbf708a1b9b85f96bdc816a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// SPDX-FileCopyrightText: 2024 Lizzy Fleckenstein <lizzy@vlhl.dev>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
#ifndef CHUNK_H
#define CHUNK_H
#include <stdbool.h>
#include "vec.h"
#include "content.h"
typedef struct {
uint32_t pitch;
box2 bounds;
node *data;
} chunk;
chunk chunk_alloc(box2 b);
node *chunk_index(chunk c, uvec2 v);
node *chunk_index_abs(chunk c, vec2 v);
void chunk_copy(chunk dst, chunk src);
void chunk_clear(chunk c);
#endif
|