summaryrefslogtreecommitdiff
path: root/assets.h
blob: ca9deae7e45eca0f88ab42b674919eec918ae1c7 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * Tux-Town is a chill life-simulation game. 
 * Copyright (C) 2025  orangerot <me@orangerot.dev>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#include <raylib.h>

#ifndef ASSETS_H
#define ASSETS_H

#define ASSET_PATH_NATURE    "assets/kenney_nature-kit/Models/OBJ format/"
#define ASSET_PATH_FURNITURE "assets/kenney_furniture-kit/Models/OBJ format/"

#define ASSETS(ASSET)                                                          \
  ASSET(ASSET_PATH_NATURE, ground_riverOpen)                                   \
  ASSET(ASSET_PATH_NATURE, ground_riverCornerSmall)                            \
  ASSET(ASSET_PATH_NATURE, ground_riverSideOpen)                               \
  ASSET(ASSET_PATH_NATURE, ground_riverSide)                                   \
  ASSET(ASSET_PATH_NATURE, ground_riverCross)                                  \
  ASSET(ASSET_PATH_NATURE, ground_riverSplit)                                  \
  ASSET(ASSET_PATH_NATURE, ground_riverStraight)                               \
  ASSET(ASSET_PATH_NATURE, ground_riverCorner)                                 \
  ASSET(ASSET_PATH_NATURE, ground_riverBend)                                   \
  ASSET(ASSET_PATH_NATURE, ground_riverEndClosed)                              \
  ASSET(ASSET_PATH_NATURE, ground_riverTile)                                   \
  ASSET(ASSET_PATH_NATURE, ground_grass)                                       \
  ASSET(ASSET_PATH_NATURE, cliff_top_rock)                                     \
  ASSET(ASSET_PATH_NATURE, tree_oak)                                           \
  ASSET(ASSET_PATH_NATURE, tent_detailedOpen)                                  \
  ASSET(ASSET_PATH_FURNITURE, floorFull)                                       \
  ASSET(ASSET_PATH_FURNITURE, wall)

#define AS_ENUM(path, name) name,
enum Asset {
  ASSETS(AS_ENUM)
  ASSET_LEN
};

#ifdef ASSET_IMPLEMENTATION
Model assets[ASSET_LEN];

#define AS_ARRAY(path, name) assets[name] = LoadModel(path #name ".obj");
void LoadModels() {
  ASSETS(AS_ARRAY)
}
#else
extern Model assets[];
#endif

#endif /* ASSETS_H */