dxx-rebirth/common/main/piggy.h

72 lines
2 KiB
C
Raw Normal View History

2006-03-20 17:12:09 +00:00
/*
2014-06-01 17:55:23 +00:00
* Portions of this file are copyright Rebirth contributors and licensed as
* described in COPYING.txt.
* Portions of this file are copyright Parallax Software and licensed
* according to the Parallax license below.
* See COPYING.txt for license details.
2006-03-20 17:12:09 +00:00
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
*/
/*
*
* Interface to piggy functions.
*
*/
2015-04-19 04:18:52 +00:00
#pragma once
2006-03-20 17:12:09 +00:00
#include "dsx-ns.h"
2022-06-05 17:44:52 +00:00
#include "fwd-inferno.h"
#include "fwd-piggy.h"
#include "fwd-robot.h"
2022-06-05 17:44:52 +00:00
#include "gr.h"
2006-03-20 17:12:09 +00:00
#if defined(DXX_BUILD_DESCENT_II)
struct alias
{
2006-03-20 17:12:09 +00:00
char alias_name[FILENAME_LEN];
char file_name[FILENAME_LEN];
};
#endif
2006-03-20 17:12:09 +00:00
// an index into the bitmap collection of the piggy file
struct bitmap_index
{
2006-03-20 17:12:09 +00:00
ushort index;
2014-01-12 23:00:43 +00:00
};
2014-09-27 22:46:25 +00:00
#define DEFINE_BITMAP_SERIAL_UDT() DEFINE_SERIAL_UDT_TO_MESSAGE(bitmap_index, b, (b.index))
2006-03-20 17:12:09 +00:00
struct BitmapFile
{
2020-05-02 21:18:42 +00:00
std::array<char, 13> name;
};
2012-11-11 00:14:30 +00:00
2016-01-09 16:38:15 +00:00
#ifdef dsx
namespace dsx {
2006-03-20 17:12:09 +00:00
# define PIGGY_PAGE_IN(bmp) _piggy_page_in(GameBitmaps, bmp)
static inline void _piggy_page_in(GameBitmaps_array &GameBitmaps, bitmap_index bmp)
{
2017-01-15 00:03:13 +00:00
if (GameBitmaps[bmp.index].get_flag_mask(BM_FLAG_PAGED_OUT))
piggy_bitmap_page_in(GameBitmaps, bmp);
2006-03-20 17:12:09 +00:00
}
int properties_init(d_level_shared_robot_info_state &LevelSharedRobotInfoState);
#if defined(DXX_BUILD_DESCENT_II)
int read_hamfile(d_level_shared_robot_info_state &LevelSharedRobotInfoState);
#endif
}
#endif