Pass ranges::subrange to bitmap_index_read_n
This commit is contained in:
parent
1e45b0b70b
commit
c428fdee0f
|
@ -52,6 +52,7 @@ enum class game_sound_offset : int
|
|||
struct digi_sound;
|
||||
extern digi_sound bogus_sound;
|
||||
extern unsigned Num_sound_files;
|
||||
struct BitmapFile;
|
||||
|
||||
}
|
||||
|
||||
|
@ -72,7 +73,6 @@ extern uint8_t Pigfile_initialized;
|
|||
|
||||
// an index into the bitmap collection of the piggy file
|
||||
enum class bitmap_index : uint16_t;
|
||||
struct BitmapFile;
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
extern int MacPig;
|
||||
|
@ -135,7 +135,6 @@ namespace dcx {
|
|||
* reads a bitmap_index structure from a PHYSFS_File
|
||||
*/
|
||||
void bitmap_index_read(PHYSFS_File *fp, bitmap_index &bi);
|
||||
void bitmap_index_read_n(PHYSFS_File *fp, partial_range_t<bitmap_index *> r);
|
||||
}
|
||||
|
||||
void remove_char( char * s, char c ); // in piggy.c
|
||||
|
|
|
@ -26,6 +26,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#pragma once
|
||||
|
||||
#include "dsx-ns.h"
|
||||
#include "backports-ranges.h"
|
||||
#include "fwd-inferno.h"
|
||||
#include "fwd-piggy.h"
|
||||
#include "fwd-robot.h"
|
||||
|
@ -47,11 +48,15 @@ enum class bitmap_index : uint16_t
|
|||
None = UINT16_MAX
|
||||
};
|
||||
|
||||
namespace dcx {
|
||||
struct BitmapFile
|
||||
{
|
||||
std::array<char, 13> name;
|
||||
};
|
||||
|
||||
void bitmap_index_read_n(PHYSFS_File *fp, ranges::subrange<bitmap_index *> r);
|
||||
}
|
||||
|
||||
#ifdef dsx
|
||||
namespace dsx {
|
||||
|
||||
|
|
|
@ -2190,7 +2190,7 @@ void bitmap_index_read(PHYSFS_File *fp, bitmap_index &bi)
|
|||
/*
|
||||
* reads n bitmap_index structs from a PHYSFS_File
|
||||
*/
|
||||
void bitmap_index_read_n(PHYSFS_File *fp, const partial_range_t<bitmap_index *> r)
|
||||
void bitmap_index_read_n(PHYSFS_File *fp, const ranges::subrange<bitmap_index *> r)
|
||||
{
|
||||
for (auto &bi : r)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue