tux-town/assets.h

61 lines
1.6 KiB
C
Raw Permalink Normal View History

2025-06-05 01:40:21 +02:00
/*
* 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 "assets/kenney_nature-kit/Models/OBJ format/"
#define ASSETS(ASSET) \
ASSET(ground_riverOpen) \
ASSET(ground_riverCornerSmall) \
ASSET(ground_riverSideOpen) \
ASSET(ground_riverSide) \
ASSET(ground_riverCross) \
ASSET(ground_riverSplit) \
ASSET(ground_riverStraight) \
ASSET(ground_riverCorner) \
ASSET(ground_riverBend) \
ASSET(ground_riverEndClosed) \
ASSET(ground_riverTile) \
ASSET(ground_grass) \
ASSET(cliff_top_rock) \
ASSET(tree_oak) \
ASSET(tent_detailedOpen)
#define AS_ENUM(name) name,
enum Asset {
ASSETS(AS_ENUM)
ASSET_LEN
};
#ifdef ASSET_IMPLEMENTATION
2025-06-05 01:40:21 +02:00
Model assets[ASSET_LEN];
#define AS_ARRAY(name) assets[name] = LoadModel(ASSET_PATH #name ".obj");
void LoadModels() {
ASSETS(AS_ARRAY)
}
#else
extern Model assets[];
#endif
2025-06-05 01:40:21 +02:00
#endif /* ASSETS_H */