OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
navigation_bsp_lump.h
1/*
2===========================================================================
3Copyright (C) 2025 the OpenMoHAA team
4
5This file is part of OpenMoHAA source code.
6
7OpenMoHAA source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12OpenMoHAA source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with OpenMoHAA source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22
23#pragma once
24
25#include "g_local.h"
26#include "../qcommon/qfiles.h"
27
28class gameLump_c
29{
30public:
31 gameLump_c()
32 : buffer(NULL)
33 , length(0)
34 {}
35
36 gameLump_c(void *inBuffer, int inLength)
37 : buffer(inBuffer)
38 , length(inLength)
39 {}
40
41 gameLump_c(const gameLump_c&) = delete;
42 gameLump_c& operator=(const gameLump_c&) = delete;
43 gameLump_c(gameLump_c&& other) noexcept;
44 gameLump_c& operator=(gameLump_c&& other) noexcept;
45 ~gameLump_c();
46
47 static gameLump_c LoadLump(fileHandle_t handle, const lump_t& lump);
48 void FreeLump();
49
50public:
51 void *buffer;
52 int length;
53};
54
55class bspMap_c {
56public:
57 bspMap_c();
58 ~bspMap_c();
59
60 bspMap_c(const char* inMapName, fileHandle_t inHandle, int inLength);
61 gameLump_c LoadLump(int index);
62
63public:
64 const char* mapname;
65 fileHandle_t h;
66 dheader_t header;
67 int length;
68};
Definition navigation_bsp_lump.h:29
Definition qfiles.h:517
Definition qfiles.h:474